tower-studio 0.2.30 → 0.2.32
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +45 -33
- package/.next/standalone/.next/server/app/_not-found/page.js +4 -4
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +2 -2
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js +2 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +80 -80
- package/.next/standalone/.next/server/app/missions/page.js +4 -4
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +45 -33
- package/.next/standalone/.next/server/app/onboarding/page.js +4 -4
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +45 -33
- package/.next/standalone/.next/server/app/page.js +4 -4
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +62 -62
- package/.next/standalone/.next/server/app/settings/page.js +6 -6
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +103 -103
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +7 -7
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +97 -97
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +73 -61
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +78 -78
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +7 -7
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +45 -33
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +5 -5
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +87 -87
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +96 -84
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +7 -7
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -1
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +63 -51
- package/.next/standalone/.next/server/app/workspaces/page.js +4 -4
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_03qwlhl.js +3 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0q.piu~._.js → [root-of-the-server]__00~-bvt._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0122.hq._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01_h-re._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0bx47rj._.js → [root-of-the-server]__01n7exm._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08u6wg.._.js +20 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~au8v.._.js → [root-of-the-server]__0ag-i9m._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c513um._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0clvf~t._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__03nvcdl._.js → [root-of-the-server]__0d2japj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fey.8j._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__11c_is3._.js → [root-of-the-server]__0g2lv9x._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__062mzio._.js → [root-of-the-server]__0gk6ftq._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xelcb1._.js → [root-of-the-server]__0kay2~d._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0lioghc._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0mw.9lg._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tys9pv._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12ohpl.._.js +28 -0
- package/.next/standalone/.next/server/chunks/_0lb0q5p._.js +7 -0
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_02llcit._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0aowbzy._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0nw5n~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_providers_index_ts_0.y.3vp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-b8f6d._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01pn3ol._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02p4lry._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0eea3ta._.js → [root-of-the-server]__037nnpo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m1tg3c._.js → [root-of-the-server]__06ubi1g._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07ptf-z._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12ktvsa._.js → [root-of-the-server]__0azyv7l._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b77ayk._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bs_c.t._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cle18b._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oqhxfb._.js → [root-of-the-server]__0d76zys._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0z7pni-._.js → [root-of-the-server]__0dzfucv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e25s-_._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hg-fwv._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lx7sf8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0261~vp._.js → [root-of-the-server]__0mv64fw._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09rts_e._.js → [root-of-the-server]__0ohx~.q._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__01evhhc._.js → [root-of-the-server]__0p8otw1._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pik08u._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qp5cw1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rara9.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0v7p~3.._.js → [root-of-the-server]__0rv7-_r._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t0.u9.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tjczqw._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u7n6kw._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0uq_0mc._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wm~yai._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ymqgu_._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__13374-3._.js → [root-of-the-server]__127.0d7._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12w_sm_._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1307ll-._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0-qr_as._.js → _0-frleg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0.sfgns._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0.y2of~._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_04ia97a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0533im8._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/_06~9axc._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0nbufo.._.js → _079_ku8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0_kfemp._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_078bw0_._.js → _0_vq_9m._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0xpmq0e._.js → _0a5f4n.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0bkb_.9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ex2yo6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0gpx4jx._.js → _0fb1op1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0t01inz._.js → _0ia4gik._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0aauqey._.js → _0kqe7k7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0wy-d3b._.js → _0lw1tq2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0mci_e0._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_0njo37o._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{_05xdaz3._.js → _0np9y-t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0qd7u-y._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_0r5h7cr._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0s02eu9._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/_0tb5sv.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0kef0v6._.js → _0tf~vm8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ttg7a2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ueyys5._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0vcbjph._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/_0vl82nb._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0vz_pgd._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_0w2xtk9._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0574rlr._.js → _0xl~whi._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0dnn~ft._.js → src_lib_0-t3s4k._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0.aklj3._.js → src_lib_007-dd1._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_00tdjs9._.js → src_lib_09bjxpu._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_07bxr4y._.js → src_lib_09vospx._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0dbdb7l._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0dypzt_._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0f948rt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0h1rnc.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0lcvt1c._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0mao-of._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qlnl~c._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qt5bft._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0z75cue._.js +3 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +372 -330
- package/.next/standalone/.next/static/chunks/01iha~qq-s2iq.js +1 -0
- package/.next/standalone/.next/static/chunks/{0jp9lol2a7aop.js → 024-z6hhx6kj8.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0g_wu-ndkch9v.js → 02cdl9l647nfw.js} +1 -1
- package/.next/standalone/.next/static/chunks/02hkeaf1dqmhz.js +1 -0
- package/.next/standalone/.next/static/chunks/08fee4dmmdj39.js +5 -0
- package/.next/standalone/.next/static/chunks/{0rlg9rdgow_pv.js → 08hbrv30ik~i9.js} +1 -1
- package/.next/standalone/.next/static/chunks/0b6cq1pd_clzr.js +2 -0
- package/.next/standalone/.next/static/chunks/0cx03gmt.9kfo.js +1 -0
- package/.next/standalone/.next/static/chunks/0dsr03qh0epy8.js +1 -0
- package/.next/standalone/.next/static/chunks/{0382n4mer7zw7.js → 0g7kwivg0c5zn.js} +1 -1
- package/.next/standalone/.next/static/chunks/0m.k-orls2qu4.js +1 -0
- package/.next/standalone/.next/static/chunks/0mov-lr-7u237.js +5 -0
- package/.next/standalone/.next/static/chunks/0nkn227~1tu4_.js +1 -0
- package/.next/standalone/.next/static/chunks/0nxf2s5ppbm.b.js +1 -0
- package/.next/standalone/.next/static/chunks/0n~h~45imnm42.js +1 -0
- package/.next/standalone/.next/static/chunks/{044tctb~y5f~k.js → 0o.a8t_h5vwy-.js} +1 -1
- package/.next/standalone/.next/static/chunks/0qmzg_a-~~1-1.js +2 -0
- package/.next/standalone/.next/static/chunks/0s86miqs3h9gi.js +1 -0
- package/.next/standalone/.next/static/chunks/0serb6jug2wgz.js +1 -0
- package/.next/standalone/.next/static/chunks/0w6~b9luhbk1x.js +1 -0
- package/.next/standalone/.next/static/chunks/{0y4dmfw2s9355.js → 0x.izf3-isfsq.js} +1 -1
- package/.next/standalone/.next/static/chunks/0x.tfkgl9nu-f.js +1 -0
- package/.next/standalone/.next/static/chunks/0y_s_afcrfp3_.js +1 -0
- package/.next/standalone/.next/static/chunks/{0~zfdzg1kbyyc.js → 0~moqlrzya~z_.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0if81~5.-1uwv.js → 13dz~n5.w6hta.js} +1 -1
- package/.next/standalone/.next/static/chunks/{10xxx.13f3ai3.js → 13iipzi9xw35f.js} +1 -1
- package/.next/standalone/.next/static/chunks/15550tahnp.5j.js +1 -0
- package/.next/standalone/.next/static/chunks/17.p0kyu6y24w.js +1 -0
- package/.next/standalone/package.json +1 -1
- package/dist/mcp-server.cjs +511 -106
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.z97nx._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09sw_a5._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ogh_qu._.js +0 -28
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0v5.ht~._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0_eodxe._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04ze9p8._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c7x0o9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cv7yj9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e82_jw._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ihwpkg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0la1659._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lm5l_t._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qy0o3-._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sc_a_d._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sdd0qu._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sk.itb._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0va-no0._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wjuu0z._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y.s5ax._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z8ui4-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zq.n2w._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~bt1fr._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0-ez10.._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/_012ww1b._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_04y11oe._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_f-~8n._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0a0aq2i._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0ju8_ep._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_0me6z_3._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0n.x-_v._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0o-bbux._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_0qkxdkn._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/_0qxrl.t._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0sbxdnc._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/_0vql1oz._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_10x572b._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_12t~l2u._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_13jok5r._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0e.v07~._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0haj7_-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0l9igqj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0vp4mgz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0wd-1.k._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0yvdojq._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0zfjhu1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0~cwhiw._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_127qa83._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_12h5txa._.js +0 -3
- package/.next/standalone/.next/static/chunks/00-qsp2rgr~9e.js +0 -2
- package/.next/standalone/.next/static/chunks/00bpfr3on13rd.js +0 -1
- package/.next/standalone/.next/static/chunks/00f-5x4td6zgy.js +0 -1
- package/.next/standalone/.next/static/chunks/018nzynk-7ymo.js +0 -1
- package/.next/standalone/.next/static/chunks/043iv-p72g6be.js +0 -1
- package/.next/standalone/.next/static/chunks/06~jm.4aoyfyw.js +0 -1
- package/.next/standalone/.next/static/chunks/086bqc5i2rlpm.js +0 -1
- package/.next/standalone/.next/static/chunks/094ex~6.hxq6o.js +0 -5
- package/.next/standalone/.next/static/chunks/0ai2m~ygx_ozn.js +0 -1
- package/.next/standalone/.next/static/chunks/0g3b5c_331j4-.js +0 -2
- package/.next/standalone/.next/static/chunks/0h0glghhkqke5.js +0 -1
- package/.next/standalone/.next/static/chunks/0hcrbkhk8na.-.js +0 -5
- package/.next/standalone/.next/static/chunks/0vd_bap5imsr-.js +0 -1
- package/.next/standalone/.next/static/chunks/0z_jeui92bm3z.js +0 -1
- package/.next/standalone/.next/static/chunks/0~svr0.~cdub6.js +0 -1
- package/.next/standalone/.next/static/chunks/154m-mwti5t9y.js +0 -1
- package/.next/standalone/.next/static/chunks/16a7drp94.244.js +0 -1
- package/.next/standalone/.next/static/chunks/16e-tphf5.yiq.js +0 -1
- package/.next/standalone/.next/static/chunks/16qrq9hn5f~bi.js +0 -1
- /package/.next/standalone/.next/static/{T0_4rffAVf7qpxDyWNRLi → v4Xp8QqFHgGyfY7YcmgRm}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{T0_4rffAVf7qpxDyWNRLi → v4Xp8QqFHgGyfY7YcmgRm}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{T0_4rffAVf7qpxDyWNRLi → v4Xp8QqFHgGyfY7YcmgRm}/_ssgManifest.js +0 -0
package/dist/mcp-server.cjs
CHANGED
|
@@ -26418,7 +26418,8 @@ function resolveCommandPathSync(command, platform = process.platform, exec = def
|
|
|
26418
26418
|
try {
|
|
26419
26419
|
const resolved = (0, import_node_child_process.execFileSync)("which", [command], {
|
|
26420
26420
|
encoding: "utf-8",
|
|
26421
|
-
timeout: 5e3
|
|
26421
|
+
timeout: 5e3,
|
|
26422
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
26422
26423
|
}).trim();
|
|
26423
26424
|
if (resolved) return resolved;
|
|
26424
26425
|
} catch {
|
|
@@ -26440,23 +26441,25 @@ function resolveSdkExecutable(command, platform = process.platform, readFile = (
|
|
|
26440
26441
|
const ext = import_node_path2.default.extname(command).toLowerCase();
|
|
26441
26442
|
if (ext !== ".cmd" && ext !== ".bat") return command;
|
|
26442
26443
|
const dir = import_node_path2.default.win32.dirname(command);
|
|
26444
|
+
let shimSnippet = "";
|
|
26443
26445
|
try {
|
|
26444
26446
|
const shim = readFile(command);
|
|
26445
|
-
|
|
26447
|
+
shimSnippet = shim.replace(/\s+/g, " ").slice(0, 400);
|
|
26448
|
+
const match = shim.match(/"([^"]*\.(?:c?js|mjs))"/i);
|
|
26446
26449
|
if (match) {
|
|
26447
|
-
|
|
26450
|
+
let p2 = match[1].replace(/%~?dp0%/gi, dir).replace(/\//g, "\\");
|
|
26451
|
+
const resolved = import_node_path2.default.win32.isAbsolute(p2) ? import_node_path2.default.win32.normalize(p2) : import_node_path2.default.win32.resolve(dir, p2);
|
|
26448
26452
|
if (fileExists(resolved)) return resolved;
|
|
26453
|
+
console.error(`[resolveSdkExecutable] parsed cli="${resolved}" but it doesn't exist`);
|
|
26449
26454
|
}
|
|
26450
|
-
} catch {
|
|
26455
|
+
} catch (e2) {
|
|
26456
|
+
console.error(`[resolveSdkExecutable] shim read failed: ${e2 instanceof Error ? e2.message : e2}`);
|
|
26451
26457
|
}
|
|
26452
|
-
const guess = import_node_path2.default.win32.join(
|
|
26453
|
-
dir,
|
|
26454
|
-
"node_modules",
|
|
26455
|
-
"@anthropic-ai",
|
|
26456
|
-
"claude-code",
|
|
26457
|
-
"cli.js"
|
|
26458
|
-
);
|
|
26458
|
+
const guess = import_node_path2.default.win32.join(dir, "node_modules", "@anthropic-ai", "claude-code", "cli.js");
|
|
26459
26459
|
if (fileExists(guess)) return guess;
|
|
26460
|
+
console.error(
|
|
26461
|
+
`[resolveSdkExecutable] could not convert ${command} \u2192 guess="${guess}" exists=${fileExists(guess)} shim="${shimSnippet}"`
|
|
26462
|
+
);
|
|
26460
26463
|
return command;
|
|
26461
26464
|
}
|
|
26462
26465
|
async function resolveSpawnTarget(command, args, opts = {}) {
|
|
@@ -26638,7 +26641,13 @@ var init_platform = __esm({
|
|
|
26638
26641
|
"CLAUDE_CODE_PARENT_SESSION"
|
|
26639
26642
|
];
|
|
26640
26643
|
SENSITIVE_KEY_RE = /key|token|secret|password|passwd|authorization|cookie/i;
|
|
26641
|
-
defaultExecSync = (cmd) => (
|
|
26644
|
+
defaultExecSync = (cmd) => (
|
|
26645
|
+
// Suppress stderr: Windows `where` prints a localized "not found" line (GBK on
|
|
26646
|
+
// zh-CN, e.g. "信息: 用提供的模式无法找到文件。") to stderr when the command is
|
|
26647
|
+
// absent. With inherited stderr that leaks to the console as mojibake. The
|
|
26648
|
+
// not-found case is already handled via the thrown non-zero exit below.
|
|
26649
|
+
(0, import_node_child_process.execSync)(cmd, { encoding: "utf-8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] })
|
|
26650
|
+
);
|
|
26642
26651
|
MAC_TERMINAL_APPS = [
|
|
26643
26652
|
{ name: "Terminal", bundleName: "Terminal" },
|
|
26644
26653
|
{ name: "iTerm2", bundleName: "iTerm" },
|
|
@@ -26988,7 +26997,7 @@ var init_claude_cli_adapter = __esm({
|
|
|
26988
26997
|
fs3.mkdirSync(path4.dirname(target), { recursive: true });
|
|
26989
26998
|
const existing = await fs3.promises.lstat(target).catch(() => null);
|
|
26990
26999
|
if (existing) {
|
|
26991
|
-
if (existing.isSymbolicLink() ||
|
|
27000
|
+
if (existing.isSymbolicLink() || isWindows() && existing.isDirectory()) {
|
|
26992
27001
|
try {
|
|
26993
27002
|
const current = await fs3.promises.readlink(target);
|
|
26994
27003
|
if (path4.resolve(current) === path4.resolve(sourceDir)) {
|
|
@@ -27014,7 +27023,7 @@ var init_claude_cli_adapter = __esm({
|
|
|
27014
27023
|
};
|
|
27015
27024
|
}
|
|
27016
27025
|
}
|
|
27017
|
-
const linkType =
|
|
27026
|
+
const linkType = isWindows() ? "junction" : "dir";
|
|
27018
27027
|
await fs3.promises.symlink(sourceDir, target, linkType);
|
|
27019
27028
|
return { ok: true, method: "symlink", detail: `${target} \u2192 ${sourceDir}` };
|
|
27020
27029
|
} catch (err) {
|
|
@@ -27116,7 +27125,7 @@ var init_claude_cli_adapter = __esm({
|
|
|
27116
27125
|
* Public so claude-session.ts can reuse instead of duplicating findClaudeBinary(). */
|
|
27117
27126
|
resolveCommand() {
|
|
27118
27127
|
if (process.env.CLAUDE_CODE_PATH) return process.env.CLAUDE_CODE_PATH;
|
|
27119
|
-
if (
|
|
27128
|
+
if (isWindows()) {
|
|
27120
27129
|
const native = resolveCommandPathSync("claude-code");
|
|
27121
27130
|
if (native !== "claude-code") return native;
|
|
27122
27131
|
}
|
|
@@ -47400,27 +47409,24 @@ function getMergeBase(cwd) {
|
|
|
47400
47409
|
}
|
|
47401
47410
|
return null;
|
|
47402
47411
|
}
|
|
47403
|
-
function
|
|
47412
|
+
function resolveGitBase(cwd, forkCommit) {
|
|
47413
|
+
if (forkCommit) return forkCommit;
|
|
47414
|
+
return getMergeBase(cwd);
|
|
47415
|
+
}
|
|
47416
|
+
function captureGitLog(cwd, forkCommit) {
|
|
47404
47417
|
try {
|
|
47405
|
-
const
|
|
47406
|
-
if (
|
|
47407
|
-
|
|
47408
|
-
if (log2) return log2;
|
|
47409
|
-
}
|
|
47410
|
-
return runGit(["log", "--oneline", "-3"], cwd) || null;
|
|
47418
|
+
const base = resolveGitBase(cwd, forkCommit);
|
|
47419
|
+
if (!base) return null;
|
|
47420
|
+
return runGit(["log", "--oneline", `${base}..HEAD`], cwd) || null;
|
|
47411
47421
|
} catch {
|
|
47412
47422
|
return null;
|
|
47413
47423
|
}
|
|
47414
47424
|
}
|
|
47415
|
-
function captureGitStats(cwd) {
|
|
47425
|
+
function captureGitStats(cwd, forkCommit) {
|
|
47416
47426
|
try {
|
|
47417
|
-
|
|
47418
|
-
|
|
47419
|
-
|
|
47420
|
-
diffOutput = runGit(["diff", "--stat", `${mergeBase}..HEAD`], cwd);
|
|
47421
|
-
} else {
|
|
47422
|
-
diffOutput = runGit(["diff", "--stat", "HEAD~20", "HEAD"], cwd);
|
|
47423
|
-
}
|
|
47427
|
+
const base = resolveGitBase(cwd, forkCommit);
|
|
47428
|
+
if (!base) return null;
|
|
47429
|
+
const diffOutput = runGit(["diff", "--stat", `${base}..HEAD`], cwd);
|
|
47424
47430
|
if (!diffOutput) return null;
|
|
47425
47431
|
return parseDiffStat(diffOutput);
|
|
47426
47432
|
} catch {
|
|
@@ -47459,17 +47465,17 @@ function trimTerminalBuffer(buffer) {
|
|
|
47459
47465
|
if (clean.length <= TERMINAL_LOG_MAX) return clean;
|
|
47460
47466
|
return clean.slice(clean.length - TERMINAL_LOG_MAX);
|
|
47461
47467
|
}
|
|
47462
|
-
async function captureExecutionSummary(executionId, _taskId, exitCode, terminalBuffer, worktreePath) {
|
|
47468
|
+
async function captureExecutionSummary(executionId, _taskId, exitCode, terminalBuffer, worktreePath, forkCommit = null) {
|
|
47463
47469
|
try {
|
|
47464
|
-
console.error(`[captureExecutionSummary] Starting: exec=${executionId.slice(0, 8)} exit=${exitCode} buffer=${terminalBuffer.length}chars worktree=${worktreePath}`);
|
|
47470
|
+
console.error(`[captureExecutionSummary] Starting: exec=${executionId.slice(0, 8)} exit=${exitCode} buffer=${terminalBuffer.length}chars worktree=${worktreePath} fork=${forkCommit?.slice(0, 8) ?? "none"}`);
|
|
47465
47471
|
let gitLog = null;
|
|
47466
47472
|
let gitStats = null;
|
|
47467
47473
|
let summary = null;
|
|
47468
47474
|
if (worktreePath && (0, import_fs6.existsSync)(worktreePath)) {
|
|
47469
47475
|
try {
|
|
47470
47476
|
runGit(["rev-parse", "--git-dir"], worktreePath);
|
|
47471
|
-
gitLog = captureGitLog(worktreePath);
|
|
47472
|
-
gitStats = captureGitStats(worktreePath);
|
|
47477
|
+
gitLog = captureGitLog(worktreePath, forkCommit);
|
|
47478
|
+
gitStats = captureGitStats(worktreePath, forkCommit);
|
|
47473
47479
|
if (gitStats && gitLog) {
|
|
47474
47480
|
const commitCount = gitLog.split("\n").filter(Boolean).length;
|
|
47475
47481
|
gitStats = { ...gitStats, commits: commitCount };
|
|
@@ -47575,6 +47581,437 @@ var init_execution_summary = __esm({
|
|
|
47575
47581
|
}
|
|
47576
47582
|
});
|
|
47577
47583
|
|
|
47584
|
+
// src/lib/fts.ts
|
|
47585
|
+
async function searchNotes(db4, projectId, query) {
|
|
47586
|
+
const trimmed = query.trim();
|
|
47587
|
+
if (!trimmed) return [];
|
|
47588
|
+
if (trimmed.length < 3) {
|
|
47589
|
+
return db4.$queryRawUnsafe(
|
|
47590
|
+
`SELECT id as note_id, title, content FROM "ProjectNote"
|
|
47591
|
+
WHERE "projectId" = ? AND (title LIKE ? OR content LIKE ?)
|
|
47592
|
+
LIMIT 20`,
|
|
47593
|
+
projectId,
|
|
47594
|
+
`%${trimmed}%`,
|
|
47595
|
+
`%${trimmed}%`
|
|
47596
|
+
);
|
|
47597
|
+
}
|
|
47598
|
+
return db4.$queryRawUnsafe(
|
|
47599
|
+
`SELECT f.note_id, f.title, f.content
|
|
47600
|
+
FROM notes_fts f
|
|
47601
|
+
JOIN "ProjectNote" n ON n.id = f.note_id
|
|
47602
|
+
WHERE f.notes_fts MATCH ? AND n."projectId" = ?
|
|
47603
|
+
ORDER BY rank
|
|
47604
|
+
LIMIT 20`,
|
|
47605
|
+
trimmed,
|
|
47606
|
+
projectId
|
|
47607
|
+
);
|
|
47608
|
+
}
|
|
47609
|
+
async function syncNoteToFts(db4, note) {
|
|
47610
|
+
await db4.$executeRawUnsafe(
|
|
47611
|
+
"DELETE FROM notes_fts WHERE note_id = ?",
|
|
47612
|
+
note.id
|
|
47613
|
+
);
|
|
47614
|
+
await db4.$executeRawUnsafe(
|
|
47615
|
+
"INSERT INTO notes_fts(note_id, title, content) VALUES (?, ?, ?)",
|
|
47616
|
+
note.id,
|
|
47617
|
+
note.title,
|
|
47618
|
+
note.content
|
|
47619
|
+
);
|
|
47620
|
+
}
|
|
47621
|
+
async function deleteNoteFromFts(db4, noteId) {
|
|
47622
|
+
await db4.$executeRawUnsafe(
|
|
47623
|
+
"DELETE FROM notes_fts WHERE note_id = ?",
|
|
47624
|
+
noteId
|
|
47625
|
+
);
|
|
47626
|
+
}
|
|
47627
|
+
var init_fts = __esm({
|
|
47628
|
+
"src/lib/fts.ts"() {
|
|
47629
|
+
"use strict";
|
|
47630
|
+
}
|
|
47631
|
+
});
|
|
47632
|
+
|
|
47633
|
+
// src/lib/task-diff-resolver.ts
|
|
47634
|
+
async function resolveTaskDiffSource(taskId) {
|
|
47635
|
+
const task = await db2.task.findUnique({
|
|
47636
|
+
where: { id: taskId },
|
|
47637
|
+
include: { project: true }
|
|
47638
|
+
});
|
|
47639
|
+
if (!task) return { kind: "error", status: 404, message: "Task not found" };
|
|
47640
|
+
if (!task.project?.localPath) {
|
|
47641
|
+
return { kind: "error", status: 400, message: "Project has no local path" };
|
|
47642
|
+
}
|
|
47643
|
+
const baseBranch = task.baseBranch || "main";
|
|
47644
|
+
const localPath = task.project.localPath;
|
|
47645
|
+
const latestExecution = await db2.taskExecution.findFirst({
|
|
47646
|
+
where: { taskId },
|
|
47647
|
+
orderBy: { createdAt: "desc" }
|
|
47648
|
+
});
|
|
47649
|
+
if (!latestExecution) return { kind: "empty" };
|
|
47650
|
+
const { forkCommit, mergeCommit, branchTipCommit, worktreeBranch, worktreePath } = latestExecution;
|
|
47651
|
+
if (mergeCommit && forkCommit) {
|
|
47652
|
+
const endCommit = branchTipCommit || mergeCommit;
|
|
47653
|
+
return {
|
|
47654
|
+
kind: "ok",
|
|
47655
|
+
data: {
|
|
47656
|
+
diffCwd: localPath,
|
|
47657
|
+
diffTarget: `${forkCommit}..${endCommit}`,
|
|
47658
|
+
baseRef: forkCommit,
|
|
47659
|
+
endRef: endCommit,
|
|
47660
|
+
worktreePath: null
|
|
47661
|
+
}
|
|
47662
|
+
};
|
|
47663
|
+
}
|
|
47664
|
+
if (forkCommit && worktreePath && (0, import_fs7.existsSync)(worktreePath)) {
|
|
47665
|
+
return {
|
|
47666
|
+
kind: "ok",
|
|
47667
|
+
data: {
|
|
47668
|
+
diffCwd: worktreePath,
|
|
47669
|
+
diffTarget: forkCommit,
|
|
47670
|
+
baseRef: forkCommit,
|
|
47671
|
+
endRef: null,
|
|
47672
|
+
worktreePath
|
|
47673
|
+
}
|
|
47674
|
+
};
|
|
47675
|
+
}
|
|
47676
|
+
if (forkCommit && !worktreePath) {
|
|
47677
|
+
return {
|
|
47678
|
+
kind: "ok",
|
|
47679
|
+
data: {
|
|
47680
|
+
diffCwd: localPath,
|
|
47681
|
+
diffTarget: forkCommit,
|
|
47682
|
+
baseRef: forkCommit,
|
|
47683
|
+
endRef: null,
|
|
47684
|
+
worktreePath: null
|
|
47685
|
+
}
|
|
47686
|
+
};
|
|
47687
|
+
}
|
|
47688
|
+
if (worktreeBranch) {
|
|
47689
|
+
try {
|
|
47690
|
+
const mb2 = (0, import_child_process6.execFileSync)(
|
|
47691
|
+
"git",
|
|
47692
|
+
["merge-base", baseBranch, worktreeBranch],
|
|
47693
|
+
{ cwd: localPath, encoding: "utf-8", timeout: 5e3 }
|
|
47694
|
+
).trim();
|
|
47695
|
+
const wtp = worktreePath && (0, import_fs7.existsSync)(worktreePath) ? worktreePath : localPath;
|
|
47696
|
+
return {
|
|
47697
|
+
kind: "ok",
|
|
47698
|
+
data: {
|
|
47699
|
+
diffCwd: wtp,
|
|
47700
|
+
diffTarget: mb2,
|
|
47701
|
+
baseRef: mb2,
|
|
47702
|
+
endRef: null,
|
|
47703
|
+
worktreePath: worktreePath && (0, import_fs7.existsSync)(worktreePath) ? worktreePath : null
|
|
47704
|
+
}
|
|
47705
|
+
};
|
|
47706
|
+
} catch {
|
|
47707
|
+
return { kind: "branch-deleted" };
|
|
47708
|
+
}
|
|
47709
|
+
}
|
|
47710
|
+
return { kind: "empty" };
|
|
47711
|
+
}
|
|
47712
|
+
var import_child_process6, import_fs7;
|
|
47713
|
+
var init_task_diff_resolver = __esm({
|
|
47714
|
+
"src/lib/task-diff-resolver.ts"() {
|
|
47715
|
+
"use strict";
|
|
47716
|
+
import_child_process6 = require("child_process");
|
|
47717
|
+
import_fs7 = require("fs");
|
|
47718
|
+
init_db();
|
|
47719
|
+
}
|
|
47720
|
+
});
|
|
47721
|
+
|
|
47722
|
+
// src/lib/diff-parser.ts
|
|
47723
|
+
function parseDiffOutput(numstat, unifiedDiff) {
|
|
47724
|
+
const numstatEntries = [];
|
|
47725
|
+
for (const line of numstat.split("\n")) {
|
|
47726
|
+
const trimmed = line.trim();
|
|
47727
|
+
if (!trimmed) continue;
|
|
47728
|
+
const parts = trimmed.split(" ");
|
|
47729
|
+
if (parts.length < 3) continue;
|
|
47730
|
+
const [addedStr, removedStr, ...filenameParts] = parts;
|
|
47731
|
+
const filename = filenameParts.join(" ");
|
|
47732
|
+
if (addedStr === "-" && removedStr === "-") {
|
|
47733
|
+
numstatEntries.push({ filename, added: 0, removed: 0, isBinary: true });
|
|
47734
|
+
} else {
|
|
47735
|
+
numstatEntries.push({
|
|
47736
|
+
filename,
|
|
47737
|
+
added: parseInt(addedStr, 10) || 0,
|
|
47738
|
+
removed: parseInt(removedStr, 10) || 0,
|
|
47739
|
+
isBinary: false
|
|
47740
|
+
});
|
|
47741
|
+
}
|
|
47742
|
+
}
|
|
47743
|
+
const DIFF_GIT_HEADER = /^diff --git a\/.+ b\/.+$/m;
|
|
47744
|
+
const diffHeaderRegex = /^diff --git a\/(.+) b\/(.+)$/;
|
|
47745
|
+
const patchMap = /* @__PURE__ */ new Map();
|
|
47746
|
+
if (unifiedDiff.trim()) {
|
|
47747
|
+
const isTruncationNeeded = unifiedDiff.length > 500 * 1024;
|
|
47748
|
+
const segments = unifiedDiff.split(/(?=^diff --git )/m);
|
|
47749
|
+
for (const segment of segments) {
|
|
47750
|
+
if (!segment.trim()) continue;
|
|
47751
|
+
const firstLine = segment.split("\n")[0];
|
|
47752
|
+
const match = diffHeaderRegex.exec(firstLine);
|
|
47753
|
+
if (!match) continue;
|
|
47754
|
+
const filename = match[2];
|
|
47755
|
+
let patch = segment;
|
|
47756
|
+
if (isTruncationNeeded) {
|
|
47757
|
+
const lines = segment.split("\n");
|
|
47758
|
+
if (lines.length > 200) {
|
|
47759
|
+
patch = lines.slice(0, 200).join("\n") + "\n... (truncated)";
|
|
47760
|
+
}
|
|
47761
|
+
}
|
|
47762
|
+
patchMap.set(filename, patch);
|
|
47763
|
+
}
|
|
47764
|
+
}
|
|
47765
|
+
const files = numstatEntries.map((entry) => ({
|
|
47766
|
+
filename: entry.filename,
|
|
47767
|
+
added: entry.added,
|
|
47768
|
+
removed: entry.removed,
|
|
47769
|
+
isBinary: entry.isBinary,
|
|
47770
|
+
patch: patchMap.get(entry.filename) ?? ""
|
|
47771
|
+
}));
|
|
47772
|
+
const totalAdded = files.reduce((sum, f2) => sum + f2.added, 0);
|
|
47773
|
+
const totalRemoved = files.reduce((sum, f2) => sum + f2.removed, 0);
|
|
47774
|
+
return { files, totalAdded, totalRemoved };
|
|
47775
|
+
}
|
|
47776
|
+
var init_diff_parser = __esm({
|
|
47777
|
+
"src/lib/diff-parser.ts"() {
|
|
47778
|
+
"use strict";
|
|
47779
|
+
}
|
|
47780
|
+
});
|
|
47781
|
+
|
|
47782
|
+
// src/lib/task-overview-format.ts
|
|
47783
|
+
function buildFallbackSummary(commitLog) {
|
|
47784
|
+
if (!commitLog) return null;
|
|
47785
|
+
const lines = commitLog.split("\n").filter(Boolean);
|
|
47786
|
+
if (lines.length === 0) return null;
|
|
47787
|
+
const first = lines[0].replace(/^[a-f0-9]+\s+/, "");
|
|
47788
|
+
return lines.length === 1 ? first : `${lines.length} \u4E2A\u63D0\u4EA4\uFF1A${first}`;
|
|
47789
|
+
}
|
|
47790
|
+
function buildNoteTitle(taskTitle, kind = "done") {
|
|
47791
|
+
const prefix = kind === "cancelled" ? "\u4EFB\u52A1\u6982\u89C8\uFF08\u5DF2\u53D6\u6D88\uFF09\uFF1A" : "\u4EFB\u52A1\u6982\u89C8\uFF1A";
|
|
47792
|
+
return `${prefix}${taskTitle}`.slice(0, 200);
|
|
47793
|
+
}
|
|
47794
|
+
function formatNoteContent(data, summary, generatedAt, kind = "done") {
|
|
47795
|
+
const intro = kind === "cancelled" ? "> \u672C\u7B14\u8BB0\u7531\u4EFB\u52A1\u53D6\u6D88\u65F6\u81EA\u52A8\u751F\u6210\uFF0C\u8BB0\u5F55\u5DF2\u4EA7\u751F\u7684\u6539\u52A8\uFF0C\u4F5C\u4E3A\u4E0B\u6B21\u91CD\u542F\u8BE5\u4EFB\u52A1\u7684\u53C2\u8003\u7ECF\u9A8C\u3002" : "> \u672C\u7B14\u8BB0\u7531\u4EFB\u52A1\u5B8C\u6210\u65F6\u81EA\u52A8\u751F\u6210\uFF0C\u8BB0\u5F55\u672C\u6B21\u4EFB\u52A1\u7684\u6539\u52A8\u6982\u89C8\uFF0C\u4FBF\u4E8E\u540E\u7EED\u590D\u76D8\u4E0E\u6392\u67E5\u3002";
|
|
47796
|
+
const lines = [];
|
|
47797
|
+
lines.push(intro);
|
|
47798
|
+
lines.push("");
|
|
47799
|
+
lines.push("## \u6539\u52A8\u6458\u8981");
|
|
47800
|
+
lines.push(summary ?? "\uFF08\u672A\u80FD\u751F\u6210\u6539\u52A8\u6458\u8981\uFF09");
|
|
47801
|
+
lines.push("");
|
|
47802
|
+
lines.push("## \u6587\u4EF6\u6E05\u5355");
|
|
47803
|
+
if (data.files.length > 0) {
|
|
47804
|
+
const shown = data.files.slice(0, FILE_LIST_NOTE_MAX);
|
|
47805
|
+
for (const f2 of shown) {
|
|
47806
|
+
lines.push(
|
|
47807
|
+
f2.isBinary ? `- \`${f2.filename}\`\uFF08\u4E8C\u8FDB\u5236\uFF09` : `- \`${f2.filename}\` (+${f2.added} / -${f2.removed})`
|
|
47808
|
+
);
|
|
47809
|
+
}
|
|
47810
|
+
if (data.files.length > shown.length) {
|
|
47811
|
+
lines.push(`- \u2026\u5176\u4F59 ${data.files.length - shown.length} \u4E2A\u6587\u4EF6`);
|
|
47812
|
+
}
|
|
47813
|
+
lines.push("");
|
|
47814
|
+
lines.push(`\u5171 ${data.files.length} \u4E2A\u6587\u4EF6\u3001${data.commitCount} \u4E2A\u63D0\u4EA4\u3002`);
|
|
47815
|
+
} else {
|
|
47816
|
+
lines.push(`\uFF08\u672A\u80FD\u83B7\u53D6\u7CBE\u786E\u6587\u4EF6\u6E05\u5355\uFF0C\u672C\u6B21\u7EA6 ${data.commitCount} \u4E2A\u63D0\u4EA4\u3002\uFF09`);
|
|
47817
|
+
}
|
|
47818
|
+
lines.push("");
|
|
47819
|
+
lines.push("## \u76F8\u5173\u9644\u4EF6\u4E0E\u53C2\u8003\u8D44\u6599");
|
|
47820
|
+
if (data.assets.length > 0) {
|
|
47821
|
+
for (const a2 of data.assets) {
|
|
47822
|
+
lines.push(a2.description ? `- ${a2.filename} \u2014 ${a2.description}` : `- ${a2.filename}`);
|
|
47823
|
+
}
|
|
47824
|
+
} else {
|
|
47825
|
+
lines.push("\uFF08\u65E0\uFF09");
|
|
47826
|
+
}
|
|
47827
|
+
lines.push("");
|
|
47828
|
+
lines.push("---");
|
|
47829
|
+
lines.push(`> \u5173\u8054\u4EFB\u52A1\uFF1A${data.taskTitle} (\`${data.taskId}\`)`);
|
|
47830
|
+
lines.push(`> \u9879\u76EE\uFF1A${data.projectName}`);
|
|
47831
|
+
lines.push(`> \u751F\u6210\u65F6\u95F4\uFF1A${generatedAt}`);
|
|
47832
|
+
return lines.join("\n");
|
|
47833
|
+
}
|
|
47834
|
+
var FILE_LIST_NOTE_MAX;
|
|
47835
|
+
var init_task_overview_format = __esm({
|
|
47836
|
+
"src/lib/task-overview-format.ts"() {
|
|
47837
|
+
"use strict";
|
|
47838
|
+
FILE_LIST_NOTE_MAX = 100;
|
|
47839
|
+
}
|
|
47840
|
+
});
|
|
47841
|
+
|
|
47842
|
+
// src/lib/task-overview.ts
|
|
47843
|
+
var task_overview_exports = {};
|
|
47844
|
+
__export2(task_overview_exports, {
|
|
47845
|
+
TASK_OVERVIEW_CATEGORY: () => TASK_OVERVIEW_CATEGORY,
|
|
47846
|
+
captureTaskOverview: () => captureTaskOverview
|
|
47847
|
+
});
|
|
47848
|
+
function runGit2(args, cwd, maxBuffer = 1024 * 1024) {
|
|
47849
|
+
try {
|
|
47850
|
+
return (0, import_child_process7.execFileSync)("git", args, {
|
|
47851
|
+
cwd,
|
|
47852
|
+
encoding: "utf-8",
|
|
47853
|
+
timeout: 3e4,
|
|
47854
|
+
maxBuffer,
|
|
47855
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
47856
|
+
}).trim();
|
|
47857
|
+
} catch {
|
|
47858
|
+
return null;
|
|
47859
|
+
}
|
|
47860
|
+
}
|
|
47861
|
+
async function gatherTaskChangeData(taskId) {
|
|
47862
|
+
const task = await db2.task.findUnique({
|
|
47863
|
+
where: { id: taskId },
|
|
47864
|
+
include: { project: true }
|
|
47865
|
+
});
|
|
47866
|
+
if (!task || !task.project) return null;
|
|
47867
|
+
const localPath = task.project.localPath ?? null;
|
|
47868
|
+
let files = [];
|
|
47869
|
+
let commitLog = null;
|
|
47870
|
+
let commitCount = 0;
|
|
47871
|
+
let diffText = null;
|
|
47872
|
+
let cwd = localPath || process.cwd();
|
|
47873
|
+
if (localPath) {
|
|
47874
|
+
const resolved = await resolveTaskDiffSource(taskId);
|
|
47875
|
+
if (resolved.kind === "ok") {
|
|
47876
|
+
const { diffCwd, diffTarget } = resolved.data;
|
|
47877
|
+
cwd = diffCwd;
|
|
47878
|
+
const logRange = diffTarget.includes("..") ? diffTarget : `${diffTarget}..HEAD`;
|
|
47879
|
+
const numstat = runGit2(["diff", "--numstat", diffTarget], diffCwd, GIT_MAX_BUFFER);
|
|
47880
|
+
if (numstat) {
|
|
47881
|
+
files = parseDiffOutput(numstat, "").files;
|
|
47882
|
+
}
|
|
47883
|
+
commitLog = runGit2(["log", "--oneline", logRange], diffCwd) || null;
|
|
47884
|
+
const countStr = runGit2(["rev-list", "--count", logRange], diffCwd);
|
|
47885
|
+
commitCount = countStr ? parseInt(countStr, 10) || 0 : 0;
|
|
47886
|
+
const rawDiff = runGit2(["diff", diffTarget], diffCwd, GIT_MAX_BUFFER);
|
|
47887
|
+
if (rawDiff) {
|
|
47888
|
+
diffText = rawDiff.length > DIFF_TEXT_MAX ? rawDiff.slice(0, DIFF_TEXT_MAX) + "\n...(diff truncated)" : rawDiff;
|
|
47889
|
+
}
|
|
47890
|
+
}
|
|
47891
|
+
}
|
|
47892
|
+
if (files.length === 0 && commitCount === 0) {
|
|
47893
|
+
const latestExec = await db2.taskExecution.findFirst({
|
|
47894
|
+
where: { taskId },
|
|
47895
|
+
orderBy: { createdAt: "desc" },
|
|
47896
|
+
select: { gitLog: true, worktreePath: true }
|
|
47897
|
+
});
|
|
47898
|
+
if (latestExec?.gitLog) {
|
|
47899
|
+
commitLog = latestExec.gitLog;
|
|
47900
|
+
commitCount = latestExec.gitLog.split("\n").filter(Boolean).length;
|
|
47901
|
+
}
|
|
47902
|
+
if (latestExec?.worktreePath && (0, import_fs8.existsSync)(latestExec.worktreePath)) {
|
|
47903
|
+
cwd = latestExec.worktreePath;
|
|
47904
|
+
}
|
|
47905
|
+
}
|
|
47906
|
+
if (files.length === 0 && commitCount === 0) return null;
|
|
47907
|
+
const assetRows = await db2.projectAsset.findMany({
|
|
47908
|
+
where: { taskId },
|
|
47909
|
+
orderBy: { createdAt: "asc" },
|
|
47910
|
+
select: { filename: true, description: true }
|
|
47911
|
+
});
|
|
47912
|
+
const assets = assetRows.map((a2) => ({
|
|
47913
|
+
filename: a2.filename,
|
|
47914
|
+
description: a2.description
|
|
47915
|
+
}));
|
|
47916
|
+
return {
|
|
47917
|
+
taskId,
|
|
47918
|
+
taskTitle: task.title,
|
|
47919
|
+
projectId: task.projectId,
|
|
47920
|
+
projectName: task.project.name,
|
|
47921
|
+
files,
|
|
47922
|
+
commitLog,
|
|
47923
|
+
commitCount,
|
|
47924
|
+
diffText,
|
|
47925
|
+
assets,
|
|
47926
|
+
cwd
|
|
47927
|
+
};
|
|
47928
|
+
}
|
|
47929
|
+
async function generateChangeSummary(data) {
|
|
47930
|
+
const fileListText = data.files.slice(0, FILE_LIST_PROMPT_MAX).map(
|
|
47931
|
+
(f2) => f2.isBinary ? `${f2.filename} (binary)` : `${f2.filename} (+${f2.added}/-${f2.removed})`
|
|
47932
|
+
).join("\n") || "\uFF08\u65E0\u6587\u4EF6\u6E05\u5355\uFF09";
|
|
47933
|
+
const prompt = `\u4F60\u662F\u8D44\u6DF1\u5DE5\u7A0B\u5E08\u3002\u4E0B\u9762\u662F\u4E00\u4E2A\u521A\u5B8C\u6210\u7684\u5F00\u53D1\u4EFB\u52A1\u7684\u4EE3\u7801\u6539\u52A8\u4FE1\u606F\uFF0C\u8BF7\u7528\u7B80\u6D01\u4E2D\u6587\u5199\u4E00\u6BB5\u300C\u6539\u52A8\u6458\u8981\u300D\uFF1A\u8BF4\u660E\u8FD9\u6B21\u6539\u52A8\u505A\u4E86\u4EC0\u4E48\u3001\u89E3\u51B3\u4E86\u4EC0\u4E48\u95EE\u9898\u3001\u4E3B\u8981\u6D89\u53CA\u54EA\u4E9B\u6A21\u5757\u6216\u903B\u8F91\u3002\u8981\u6C42 3-6 \u53E5\u3001\u7EAF\u6587\u672C\uFF0C\u4E0D\u8981 markdown \u6807\u9898\uFF0C\u4E0D\u8981\u9010\u6761\u7F57\u5217\u6587\u4EF6\uFF08\u6587\u4EF6\u6E05\u5355\u4F1A\u53E6\u5916\u5C55\u793A\uFF09\u3002
|
|
47934
|
+
|
|
47935
|
+
\u4EFB\u52A1\u6807\u9898\uFF1A${data.taskTitle}
|
|
47936
|
+
|
|
47937
|
+
\u63D0\u4EA4\u8BB0\u5F55\uFF1A
|
|
47938
|
+
${data.commitLog ?? "\uFF08\u65E0\u63D0\u4EA4\u8BB0\u5F55\uFF09"}
|
|
47939
|
+
|
|
47940
|
+
\u53D8\u66F4\u6587\u4EF6\uFF08\u5171 ${data.files.length} \u4E2A\uFF09\uFF1A
|
|
47941
|
+
${fileListText}
|
|
47942
|
+
|
|
47943
|
+
diff\uFF08\u53EF\u80FD\u5DF2\u622A\u65AD\uFF09\uFF1A
|
|
47944
|
+
\`\`\`diff
|
|
47945
|
+
${data.diffText ?? "\uFF08\u65E0 diff\uFF09"}
|
|
47946
|
+
\`\`\``;
|
|
47947
|
+
const cwd = (0, import_fs8.existsSync)(data.cwd) ? data.cwd : process.cwd();
|
|
47948
|
+
const result = await aiQuery(prompt, cwd, { maxTurns: 1 });
|
|
47949
|
+
if (result) {
|
|
47950
|
+
const cleaned = result.replace(/^[#*\->"'\s]+/, "").trim();
|
|
47951
|
+
if (cleaned) return cleaned;
|
|
47952
|
+
}
|
|
47953
|
+
return buildFallbackSummary(data.commitLog);
|
|
47954
|
+
}
|
|
47955
|
+
async function captureTaskOverview(taskId, opts = {}) {
|
|
47956
|
+
const kind = opts.kind ?? "done";
|
|
47957
|
+
let data = null;
|
|
47958
|
+
try {
|
|
47959
|
+
data = await gatherTaskChangeData(taskId);
|
|
47960
|
+
} catch (err) {
|
|
47961
|
+
console.error("[captureTaskOverview] Failed to gather change data:", err);
|
|
47962
|
+
return;
|
|
47963
|
+
}
|
|
47964
|
+
if (!data) {
|
|
47965
|
+
console.error(`[captureTaskOverview] No changes for task=${taskId.slice(0, 8)} \u2014 skip`);
|
|
47966
|
+
return;
|
|
47967
|
+
}
|
|
47968
|
+
const captured = data;
|
|
47969
|
+
void (async () => {
|
|
47970
|
+
try {
|
|
47971
|
+
const summary = await generateChangeSummary(captured);
|
|
47972
|
+
const generatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
47973
|
+
const content = formatNoteContent(captured, summary, generatedAt, kind);
|
|
47974
|
+
const title = buildNoteTitle(captured.taskTitle, kind);
|
|
47975
|
+
const note = await db2.projectNote.create({
|
|
47976
|
+
data: {
|
|
47977
|
+
title,
|
|
47978
|
+
content,
|
|
47979
|
+
category: TASK_OVERVIEW_CATEGORY,
|
|
47980
|
+
projectId: captured.projectId,
|
|
47981
|
+
// taskId stays null so the note surfaces in the project Notes page
|
|
47982
|
+
// (getProjectNotes filters taskId:null). The task linkage lives as a
|
|
47983
|
+
// text backlink in the note body instead.
|
|
47984
|
+
taskId: null
|
|
47985
|
+
}
|
|
47986
|
+
});
|
|
47987
|
+
await syncNoteToFts(db2, { id: note.id, title: note.title, content: note.content });
|
|
47988
|
+
console.error(
|
|
47989
|
+
`[captureTaskOverview] Note created: ${note.id} for task=${taskId.slice(0, 8)}`
|
|
47990
|
+
);
|
|
47991
|
+
} catch (err) {
|
|
47992
|
+
console.error("[captureTaskOverview] Failed to create overview note:", err);
|
|
47993
|
+
}
|
|
47994
|
+
})();
|
|
47995
|
+
}
|
|
47996
|
+
var import_child_process7, import_fs8, TASK_OVERVIEW_CATEGORY, DIFF_TEXT_MAX, FILE_LIST_PROMPT_MAX, GIT_MAX_BUFFER;
|
|
47997
|
+
var init_task_overview = __esm({
|
|
47998
|
+
"src/lib/task-overview.ts"() {
|
|
47999
|
+
"use strict";
|
|
48000
|
+
import_child_process7 = require("child_process");
|
|
48001
|
+
import_fs8 = require("fs");
|
|
48002
|
+
init_db();
|
|
48003
|
+
init_fts();
|
|
48004
|
+
init_claude_session();
|
|
48005
|
+
init_task_diff_resolver();
|
|
48006
|
+
init_diff_parser();
|
|
48007
|
+
init_task_overview_format();
|
|
48008
|
+
TASK_OVERVIEW_CATEGORY = "\u4EFB\u52A1\u7B14\u8BB0";
|
|
48009
|
+
DIFF_TEXT_MAX = 12 * 1024;
|
|
48010
|
+
FILE_LIST_PROMPT_MAX = 60;
|
|
48011
|
+
GIT_MAX_BUFFER = 64 * 1024 * 1024;
|
|
48012
|
+
}
|
|
48013
|
+
});
|
|
48014
|
+
|
|
47578
48015
|
// node_modules/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/utils.js
|
|
47579
48016
|
var require_utils4 = __commonJS({
|
|
47580
48017
|
"node_modules/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/utils.js"(exports2) {
|
|
@@ -49127,8 +49564,8 @@ async function updateTaskStatus(taskId, status) {
|
|
|
49127
49564
|
});
|
|
49128
49565
|
if (status === "DONE" && !task.baseBranch && task.project?.localPath) {
|
|
49129
49566
|
try {
|
|
49130
|
-
const { execFileSync:
|
|
49131
|
-
const headCommit =
|
|
49567
|
+
const { execFileSync: execFileSync7 } = await import("child_process");
|
|
49568
|
+
const headCommit = execFileSync7(
|
|
49132
49569
|
"git",
|
|
49133
49570
|
["rev-parse", "HEAD"],
|
|
49134
49571
|
{ cwd: task.project.localPath, encoding: "utf-8", timeout: 5e3 }
|
|
@@ -49154,6 +49591,11 @@ async function updateTaskStatus(taskId, status) {
|
|
|
49154
49591
|
});
|
|
49155
49592
|
}).catch(() => {
|
|
49156
49593
|
});
|
|
49594
|
+
Promise.resolve().then(() => (init_task_overview(), task_overview_exports)).then(({ captureTaskOverview: captureTaskOverview2 }) => {
|
|
49595
|
+
captureTaskOverview2(taskId).catch(() => {
|
|
49596
|
+
});
|
|
49597
|
+
}).catch(() => {
|
|
49598
|
+
});
|
|
49157
49599
|
}
|
|
49158
49600
|
if (status === "DONE" || status === "CANCELLED") {
|
|
49159
49601
|
try {
|
|
@@ -49163,6 +49605,14 @@ async function updateTaskStatus(taskId, status) {
|
|
|
49163
49605
|
log.error("PTY session destroy failed", error48, { taskId });
|
|
49164
49606
|
}
|
|
49165
49607
|
}
|
|
49608
|
+
if (status === "CANCELLED" && task.project?.localPath) {
|
|
49609
|
+
try {
|
|
49610
|
+
const { captureTaskOverview: captureTaskOverview2 } = await Promise.resolve().then(() => (init_task_overview(), task_overview_exports));
|
|
49611
|
+
await captureTaskOverview2(taskId, { kind: "cancelled" });
|
|
49612
|
+
} catch (error48) {
|
|
49613
|
+
log.error("Task overview capture failed", error48, { taskId });
|
|
49614
|
+
}
|
|
49615
|
+
}
|
|
49166
49616
|
if (status === "CANCELLED" && task.project?.localPath) {
|
|
49167
49617
|
try {
|
|
49168
49618
|
await removeWorktree(task.project.localPath, taskId);
|
|
@@ -49273,20 +49723,20 @@ async function getArchivedTasks(projectId) {
|
|
|
49273
49723
|
});
|
|
49274
49724
|
}
|
|
49275
49725
|
async function checkWorktreeClean(taskId) {
|
|
49276
|
-
const { execFileSync:
|
|
49277
|
-
const { existsSync:
|
|
49726
|
+
const { execFileSync: execFileSync7 } = await import("child_process");
|
|
49727
|
+
const { existsSync: existsSync12 } = await import("fs");
|
|
49278
49728
|
const task = await db2.task.findUnique({ where: { id: taskId } });
|
|
49279
49729
|
const execution = await db2.taskExecution.findFirst({
|
|
49280
49730
|
where: { taskId },
|
|
49281
49731
|
orderBy: { createdAt: "desc" }
|
|
49282
49732
|
});
|
|
49283
|
-
if (!execution?.worktreePath || !
|
|
49733
|
+
if (!execution?.worktreePath || !existsSync12(execution.worktreePath)) {
|
|
49284
49734
|
return { clean: true, files: [], hasCommits: false, lastCommitMessage: null, commitLog: [], hasWorktree: false };
|
|
49285
49735
|
}
|
|
49286
49736
|
const cwd = execution.worktreePath;
|
|
49287
49737
|
const baseBranch = task?.baseBranch || "main";
|
|
49288
49738
|
try {
|
|
49289
|
-
const status =
|
|
49739
|
+
const status = execFileSync7(
|
|
49290
49740
|
"git",
|
|
49291
49741
|
["status", "--porcelain"],
|
|
49292
49742
|
{ cwd, encoding: "utf-8", timeout: 5e3 }
|
|
@@ -49297,24 +49747,24 @@ async function checkWorktreeClean(taskId) {
|
|
|
49297
49747
|
let lastCommitMessage = null;
|
|
49298
49748
|
let commitLog = [];
|
|
49299
49749
|
try {
|
|
49300
|
-
const forkPoint =
|
|
49750
|
+
const forkPoint = execFileSync7(
|
|
49301
49751
|
"git",
|
|
49302
49752
|
["merge-base", baseBranch, "HEAD"],
|
|
49303
49753
|
{ cwd, encoding: "utf-8", timeout: 5e3 }
|
|
49304
49754
|
).trim();
|
|
49305
|
-
const commitCount =
|
|
49755
|
+
const commitCount = execFileSync7(
|
|
49306
49756
|
"git",
|
|
49307
49757
|
["rev-list", "--count", `${forkPoint}..HEAD`],
|
|
49308
49758
|
{ cwd, encoding: "utf-8", timeout: 5e3 }
|
|
49309
49759
|
).trim();
|
|
49310
49760
|
hasCommits = parseInt(commitCount, 10) > 0;
|
|
49311
49761
|
if (hasCommits) {
|
|
49312
|
-
lastCommitMessage =
|
|
49762
|
+
lastCommitMessage = execFileSync7(
|
|
49313
49763
|
"git",
|
|
49314
49764
|
["log", "-1", "--format=%B"],
|
|
49315
49765
|
{ cwd, encoding: "utf-8", timeout: 5e3 }
|
|
49316
49766
|
).trim();
|
|
49317
|
-
const log2 =
|
|
49767
|
+
const log2 = execFileSync7(
|
|
49318
49768
|
"git",
|
|
49319
49769
|
["log", "--oneline", `${forkPoint}..HEAD`],
|
|
49320
49770
|
{ cwd, encoding: "utf-8", timeout: 5e3 }
|
|
@@ -49329,23 +49779,23 @@ async function checkWorktreeClean(taskId) {
|
|
|
49329
49779
|
}
|
|
49330
49780
|
}
|
|
49331
49781
|
async function commitWorktreeChanges(taskId, message) {
|
|
49332
|
-
const { execFileSync:
|
|
49333
|
-
const { existsSync:
|
|
49782
|
+
const { execFileSync: execFileSync7 } = await import("child_process");
|
|
49783
|
+
const { existsSync: existsSync12 } = await import("fs");
|
|
49334
49784
|
const execution = await db2.taskExecution.findFirst({
|
|
49335
49785
|
where: { taskId },
|
|
49336
49786
|
orderBy: { createdAt: "desc" }
|
|
49337
49787
|
});
|
|
49338
|
-
if (!execution?.worktreePath || !
|
|
49788
|
+
if (!execution?.worktreePath || !existsSync12(execution.worktreePath)) {
|
|
49339
49789
|
throw new Error("No active worktree for this task");
|
|
49340
49790
|
}
|
|
49341
49791
|
const cwd = execution.worktreePath;
|
|
49342
|
-
|
|
49343
|
-
const status =
|
|
49792
|
+
execFileSync7("git", ["add", "-A"], { cwd, timeout: 1e4 });
|
|
49793
|
+
const status = execFileSync7("git", ["status", "--porcelain"], { cwd, encoding: "utf-8", timeout: 5e3 }).trim();
|
|
49344
49794
|
if (!status) {
|
|
49345
49795
|
throw new Error("No changes to commit");
|
|
49346
49796
|
}
|
|
49347
|
-
|
|
49348
|
-
const hash2 =
|
|
49797
|
+
execFileSync7("git", ["commit", "-m", message], { cwd, encoding: "utf-8", timeout: 15e3 });
|
|
49798
|
+
const hash2 = execFileSync7("git", ["rev-parse", "--short", "HEAD"], { cwd, encoding: "utf-8", timeout: 5e3 }).trim();
|
|
49349
49799
|
return { hash: hash2 };
|
|
49350
49800
|
}
|
|
49351
49801
|
async function getTaskOverview(taskId) {
|
|
@@ -49558,8 +50008,8 @@ var projectTools = {
|
|
|
49558
50008
|
|
|
49559
50009
|
// src/mcp/tools/task-tools.ts
|
|
49560
50010
|
init_zod();
|
|
49561
|
-
var
|
|
49562
|
-
var
|
|
50011
|
+
var import_child_process8 = require("child_process");
|
|
50012
|
+
var import_fs9 = require("fs");
|
|
49563
50013
|
var import_path11 = require("path");
|
|
49564
50014
|
|
|
49565
50015
|
// src/lib/config-reader.ts
|
|
@@ -49736,7 +50186,7 @@ var taskTools = {
|
|
|
49736
50186
|
const project = await db.project.findUnique({ where: { id: args.projectId }, select: { localPath: true } });
|
|
49737
50187
|
if (project?.localPath) {
|
|
49738
50188
|
try {
|
|
49739
|
-
baseBranch = (0,
|
|
50189
|
+
baseBranch = (0, import_child_process8.execFileSync)("git", ["branch", "--show-current"], {
|
|
49740
50190
|
cwd: project.localPath,
|
|
49741
50191
|
encoding: "utf-8",
|
|
49742
50192
|
timeout: 5e3
|
|
@@ -49767,20 +50217,20 @@ var taskTools = {
|
|
|
49767
50217
|
let updatedDesc = null;
|
|
49768
50218
|
if (args.references && args.references.length > 0) {
|
|
49769
50219
|
const assetsDir = (0, import_path11.join)(MCP_PROJECT_ROOT, "data", "assets", args.projectId);
|
|
49770
|
-
(0,
|
|
50220
|
+
(0, import_fs9.mkdirSync)(assetsDir, { recursive: true });
|
|
49771
50221
|
for (const filePath of args.references) {
|
|
49772
50222
|
try {
|
|
49773
|
-
if (!(0,
|
|
49774
|
-
const stat = (0,
|
|
50223
|
+
if (!(0, import_fs9.existsSync)(filePath)) continue;
|
|
50224
|
+
const stat = (0, import_fs9.statSync)(filePath);
|
|
49775
50225
|
if (!stat.isFile()) continue;
|
|
49776
50226
|
const isCache = isAssistantCachePath(filePath);
|
|
49777
50227
|
let filename = isCache ? stripCacheUuidSuffix((0, import_path11.basename)(filePath)) : (0, import_path11.basename)(filePath);
|
|
49778
|
-
if ((0,
|
|
50228
|
+
if ((0, import_fs9.existsSync)((0, import_path11.join)(assetsDir, filename))) {
|
|
49779
50229
|
const ext = (0, import_path11.extname)(filename);
|
|
49780
50230
|
const base = (0, import_path11.basename)(filename, ext);
|
|
49781
50231
|
if (isCache) {
|
|
49782
50232
|
let counter = 1;
|
|
49783
|
-
while ((0,
|
|
50233
|
+
while ((0, import_fs9.existsSync)((0, import_path11.join)(assetsDir, `${base} (${counter})${ext}`))) {
|
|
49784
50234
|
counter++;
|
|
49785
50235
|
}
|
|
49786
50236
|
filename = `${base} (${counter})${ext}`;
|
|
@@ -49789,7 +50239,7 @@ var taskTools = {
|
|
|
49789
50239
|
}
|
|
49790
50240
|
}
|
|
49791
50241
|
const dest = (0, import_path11.join)(assetsDir, filename);
|
|
49792
|
-
(0,
|
|
50242
|
+
(0, import_fs9.copyFileSync)(filePath, dest);
|
|
49793
50243
|
await db.projectAsset.create({
|
|
49794
50244
|
data: {
|
|
49795
50245
|
filename,
|
|
@@ -50272,52 +50722,7 @@ var knowledgeTools = {
|
|
|
50272
50722
|
init_zod();
|
|
50273
50723
|
var fs4 = __toESM(require("node:fs"));
|
|
50274
50724
|
var path5 = __toESM(require("node:path"));
|
|
50275
|
-
|
|
50276
|
-
// src/lib/fts.ts
|
|
50277
|
-
async function searchNotes(db4, projectId, query) {
|
|
50278
|
-
const trimmed = query.trim();
|
|
50279
|
-
if (!trimmed) return [];
|
|
50280
|
-
if (trimmed.length < 3) {
|
|
50281
|
-
return db4.$queryRawUnsafe(
|
|
50282
|
-
`SELECT id as note_id, title, content FROM "ProjectNote"
|
|
50283
|
-
WHERE "projectId" = ? AND (title LIKE ? OR content LIKE ?)
|
|
50284
|
-
LIMIT 20`,
|
|
50285
|
-
projectId,
|
|
50286
|
-
`%${trimmed}%`,
|
|
50287
|
-
`%${trimmed}%`
|
|
50288
|
-
);
|
|
50289
|
-
}
|
|
50290
|
-
return db4.$queryRawUnsafe(
|
|
50291
|
-
`SELECT f.note_id, f.title, f.content
|
|
50292
|
-
FROM notes_fts f
|
|
50293
|
-
JOIN "ProjectNote" n ON n.id = f.note_id
|
|
50294
|
-
WHERE f.notes_fts MATCH ? AND n."projectId" = ?
|
|
50295
|
-
ORDER BY rank
|
|
50296
|
-
LIMIT 20`,
|
|
50297
|
-
trimmed,
|
|
50298
|
-
projectId
|
|
50299
|
-
);
|
|
50300
|
-
}
|
|
50301
|
-
async function syncNoteToFts(db4, note) {
|
|
50302
|
-
await db4.$executeRawUnsafe(
|
|
50303
|
-
"DELETE FROM notes_fts WHERE note_id = ?",
|
|
50304
|
-
note.id
|
|
50305
|
-
);
|
|
50306
|
-
await db4.$executeRawUnsafe(
|
|
50307
|
-
"INSERT INTO notes_fts(note_id, title, content) VALUES (?, ?, ?)",
|
|
50308
|
-
note.id,
|
|
50309
|
-
note.title,
|
|
50310
|
-
note.content
|
|
50311
|
-
);
|
|
50312
|
-
}
|
|
50313
|
-
async function deleteNoteFromFts(db4, noteId) {
|
|
50314
|
-
await db4.$executeRawUnsafe(
|
|
50315
|
-
"DELETE FROM notes_fts WHERE note_id = ?",
|
|
50316
|
-
noteId
|
|
50317
|
-
);
|
|
50318
|
-
}
|
|
50319
|
-
|
|
50320
|
-
// src/mcp/tools/note-asset-tools.ts
|
|
50725
|
+
init_fts();
|
|
50321
50726
|
var manageNotesSchema = external_exports.object({
|
|
50322
50727
|
action: external_exports.enum(["create", "update", "delete", "get", "list", "search"]),
|
|
50323
50728
|
projectId: external_exports.string().optional(),
|