tower-studio 0.2.5 → 0.2.6
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 +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +39 -39
- 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/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
- 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.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.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 +1 -1
- 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 +1 -1
- 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.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 +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/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 +1 -1
- 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.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +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 +69 -69
- package/.next/standalone/.next/server/app/missions/page.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +39 -39
- 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/onboarding.html +1 -1
- package/.next/standalone/.next/server/app/onboarding.rsc +16 -16
- package/.next/standalone/.next/server/app/onboarding.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/onboarding.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +39 -39
- 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 +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +52 -52
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- 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/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +16 -16
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +98 -98
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +82 -82
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +73 -73
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +68 -68
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +39 -39
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +74 -74
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +78 -78
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +1 -1
- 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 +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +59 -59
- 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_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.9mj3v._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05353yb._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05eviiz._.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07h7qz8._.js → [root-of-the-server]__09h3i6m._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_a8-jq._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dsv3wl._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0c1g5im._.js → [root-of-the-server]__0j~qauc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0p_ii~p._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0puw1af._.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ntb7n~._.js → [root-of-the-server]__0qie1gs._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0w2w3x.._.js +20 -0
- package/.next/standalone/.next/server/chunks/{_0u-~jqd._.js → _0trog_r._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{src_0o_27yu._.js → src_01ztl3b._.js} +2 -2
- package/.next/standalone/.next/server/chunks/src_lib_0ba0ntr._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_0q-~me1._.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]__0zjarb3._.js → [root-of-the-server]__0-yld.d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.5rcav._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__006_qh0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02px.0y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03ebsif._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05kq890._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-xoiaj._.js → [root-of-the-server]__079.nog._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ilem~v._.js → [root-of-the-server]__0c4.z1s._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gaa~xc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gcf4k3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ghfuuv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n8jy_r._.js → [root-of-the-server]__0k3isnk._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l43.5g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nwue~m._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ps55l6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0q7ho54._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qe~p-n._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ribsk4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tf4zp_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00wymqa._.js → [root-of-the-server]__0vh-egg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wjg_.n._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wvyks.._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y.nw7l._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zbmoit._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11bequ2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11ko84j._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12pnl8n._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0cdz55-._.js → [root-of-the-server]__13k4vkg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0j_v~sp._.js → _0-pqb_c._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0ybhyal._.js → _00d1y-k._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_13fpu~5._.js → _03xwww2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0qu2yg4._.js → _049.box._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_04b71ua._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0xh9m4.._.js → _05-r00y._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0_co86q._.js → _054w82_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_05h.8a~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_07scffz._.js → _086yn8o._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0wxd6t.._.js → _08t2xag._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0cie3rm._.js → _0_gqtgq._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0_l8.dg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0l6vadw._.js → _0_~ftjv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0a-rizg._.js → _0ah80pn._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ds6nk2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_079ks~i._.js → _0ep3sg_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_108e4..._.js → _0f8jvpw._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0-t_os6._.js → _0fri5n~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0h_~oum._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/{_13l5s-p._.js → _0i2usny._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0i4__mf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ihq._v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0r9w-k8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rbctq7._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_00pxhu2._.js → _0rfo51k._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0rt8hus._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0lcigjh._.js → _0vqyzrr._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0~80adm._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/src_095o8x6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_13jha60._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- 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_0h36tj.._.js → src_lib_08n755q._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h3ouzu._.js → src_lib_0tb2yya._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~jyveg._.js → src_lib_123jf_a._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~rxy~0._.js → src_lib_12ulcxj._.js} +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- 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 +274 -274
- package/.next/standalone/.next/static/chunks/0.zipr1bga3lu.js +1 -0
- package/.next/standalone/.next/static/chunks/{0jk6ji4j.3jod.js → 037-verumdykv.js} +2 -2
- package/.next/standalone/.next/static/chunks/04-7c5m91nvj1.js +1 -0
- package/.next/standalone/.next/static/chunks/{0~p32xa2eu79e.js → 06shpikm5rcmu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{00grznzz_zqq~.js → 07i~~ygu~oi26.js} +1 -1
- package/.next/standalone/.next/static/chunks/{00jlfmav1nk82.js → 082cedbq4pp.-.js} +1 -1
- package/.next/standalone/.next/static/chunks/089ktlh~nim1x.js +1 -0
- package/.next/standalone/.next/static/chunks/{0mijmksouoprl.js → 0ee.~~ae-vl_q.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.p7x9h8h-..l.js → 0fovq74l0wh7c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{14se8w2gb9pe0.js → 0hxgzql5.szyz.js} +1 -1
- package/.next/standalone/.next/static/chunks/{018vr5fdl426p.js → 0jscst0zjd2az.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0z0a_hlsye7mo.js → 0m2lubto0vt0x.js} +1 -1
- package/.next/standalone/.next/static/chunks/0mfgulw-d49o9.js +1 -0
- package/.next/standalone/.next/static/chunks/{0~2v6ague-7-t.js → 0m~ltp.wfnbf7.js} +2 -2
- package/.next/standalone/.next/static/chunks/{15qi~69blu~3u.js → 0nrbltth-7m~e.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0a5u1~0._dmx8.js → 0r7jm27~cp-vs.js} +1 -1
- package/.next/standalone/.next/static/chunks/0tk-ju9xhoh68.js +5 -0
- package/.next/standalone/.next/static/chunks/0v9ahxdsn0mse.js +1 -0
- package/.next/standalone/.next/static/chunks/0w9x-ap4dcwy..js +1 -0
- package/.next/standalone/.next/static/chunks/17cayeebhpt~w.js +2 -0
- package/.next/standalone/.next/static/chunks/{0-wn9b_4jrs.9.js → 186ahmq856rfj.js} +1 -1
- package/.next/standalone/package.json +2 -1
- package/bin/tower.mjs +3 -0
- package/dist/mcp-server.cjs +12 -1
- package/package.json +2 -1
- package/skills/tower/SKILL.md +381 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-eibah._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_q8qjf._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vasg9u._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__102siqc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0h0r8fk._.js +0 -7
- package/.next/standalone/.next/static/chunks/094hp8ak7su7z.js +0 -2
- package/.next/standalone/.next/static/chunks/0fe_jnfm0lqm..js +0 -5
- package/.next/standalone/.next/static/chunks/0lq1_ynox5frw.js +0 -1
- package/.next/standalone/.next/static/chunks/0qy~pj-p.oh92.js +0 -1
- package/.next/standalone/.next/static/chunks/0y_vg.f~zs~zl.js +0 -1
- package/.next/standalone/.next/static/chunks/10ih_a9~empst.js +0 -1
- package/.next/standalone/.next/static/chunks/16.w_z6.3sf2v.js +0 -1
- package/.next/standalone/.next/static/chunks/17wptayhzwy6g.js +0 -1
- /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → VGoiH5uRfCRm6SKXNPZoz}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → VGoiH5uRfCRm6SKXNPZoz}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → VGoiH5uRfCRm6SKXNPZoz}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tower-studio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tower": "bin/tower.mjs"
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"scripts/session-start-hook.js",
|
|
23
23
|
"scripts/stop-hook.js",
|
|
24
24
|
"dist/mcp-server.cjs",
|
|
25
|
+
"skills/",
|
|
25
26
|
"src/mcp/",
|
|
26
27
|
"next.config.ts",
|
|
27
28
|
"tsconfig.json"
|
package/bin/tower.mjs
CHANGED
|
@@ -284,6 +284,9 @@ async function cmdStart() {
|
|
|
284
284
|
// Next.js standalone server reads HOSTNAME (not HOST) for binding.
|
|
285
285
|
process.env.HOSTNAME = HOST;
|
|
286
286
|
// PORT is already set early in this script.
|
|
287
|
+
// Export the package root so code that needs `skills/`, `scripts/`, etc.
|
|
288
|
+
// can find them — `process.cwd()` won't work once we chdir below.
|
|
289
|
+
process.env.TOWER_PACKAGE_ROOT = PROJECT_ROOT;
|
|
287
290
|
|
|
288
291
|
log(`Tower starting on http://${HOST === "0.0.0.0" ? "localhost" : HOST}:${PORT}`);
|
|
289
292
|
|
package/dist/mcp-server.cjs
CHANGED
|
@@ -26406,6 +26406,16 @@ var init_platform = __esm({
|
|
|
26406
26406
|
}
|
|
26407
26407
|
});
|
|
26408
26408
|
|
|
26409
|
+
// src/lib/tower-paths.ts
|
|
26410
|
+
function getPackageRoot() {
|
|
26411
|
+
return process.env.TOWER_PACKAGE_ROOT || process.cwd();
|
|
26412
|
+
}
|
|
26413
|
+
var init_tower_paths = __esm({
|
|
26414
|
+
"src/lib/tower-paths.ts"() {
|
|
26415
|
+
"use strict";
|
|
26416
|
+
}
|
|
26417
|
+
});
|
|
26418
|
+
|
|
26409
26419
|
// src/lib/ai/adapters/cli/claude-cli-adapter.ts
|
|
26410
26420
|
var fs2, os2, path4, CLAUDE_MODELS, ClaudeCliAdapter;
|
|
26411
26421
|
var init_claude_cli_adapter = __esm({
|
|
@@ -26415,6 +26425,7 @@ var init_claude_cli_adapter = __esm({
|
|
|
26415
26425
|
os2 = __toESM(require("node:os"));
|
|
26416
26426
|
path4 = __toESM(require("node:path"));
|
|
26417
26427
|
init_platform();
|
|
26428
|
+
init_tower_paths();
|
|
26418
26429
|
CLAUDE_MODELS = ["sonnet", "opus", "haiku", "claude-sonnet-4-6", "claude-opus-4-6", "claude-haiku-4-5-20251001"];
|
|
26419
26430
|
ClaudeCliAdapter = class {
|
|
26420
26431
|
buildSpawnArgs(opts) {
|
|
@@ -26467,7 +26478,7 @@ var init_claude_cli_adapter = __esm({
|
|
|
26467
26478
|
try {
|
|
26468
26479
|
const settings = this.readSettings();
|
|
26469
26480
|
const hooks = settings["hooks"] ?? {};
|
|
26470
|
-
const root =
|
|
26481
|
+
const root = getPackageRoot().replace(/\\/g, "/");
|
|
26471
26482
|
let changed = false;
|
|
26472
26483
|
const sessionStartEntries = this.getHookArray(hooks, "SessionStart");
|
|
26473
26484
|
if (!this.hasHook(sessionStartEntries, "session-start-hook.js")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tower-studio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tower": "bin/tower.mjs"
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"scripts/session-start-hook.js",
|
|
23
23
|
"scripts/stop-hook.js",
|
|
24
24
|
"dist/mcp-server.cjs",
|
|
25
|
+
"skills/",
|
|
25
26
|
"src/mcp/",
|
|
26
27
|
"next.config.ts",
|
|
27
28
|
"tsconfig.json"
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tower
|
|
3
|
+
description: AI task orchestration platform — use Tower MCP tools to manage workspaces, projects, tasks, and monitor agent execution
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tower
|
|
7
|
+
|
|
8
|
+
Tower is an AI task orchestration platform. This skill teaches you how to use Tower's MCP tools to manage projects and tasks.
|
|
9
|
+
|
|
10
|
+
## MCP Setup
|
|
11
|
+
|
|
12
|
+
Before using Tower tools, check if the `tower` MCP server is available. If tools like `list_workspaces` are not found, guide the user to configure MCP:
|
|
13
|
+
|
|
14
|
+
**Claude Code** — add to `~/.claude/settings.json`:
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"tower": {
|
|
19
|
+
"command": "npx",
|
|
20
|
+
"args": ["tsx", "<project-root>/src/mcp/index.ts"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Other AI agents** — add the same config to your MCP client settings file.
|
|
27
|
+
|
|
28
|
+
After configuration, restart the AI session. The Tower tools will then be available.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## When to Use
|
|
33
|
+
|
|
34
|
+
Use Tower tools when the user wants to:
|
|
35
|
+
- View, create, or manage tasks and projects
|
|
36
|
+
- Check task execution status or progress
|
|
37
|
+
- Interact with a running task's terminal
|
|
38
|
+
- Search across workspaces, projects, or tasks
|
|
39
|
+
- Organize tasks with labels or status changes
|
|
40
|
+
- Get daily work summary or pending todo list
|
|
41
|
+
- Check what was done today or what's left to do
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Scenarios
|
|
46
|
+
|
|
47
|
+
### "Show me my workspaces" / "List projects"
|
|
48
|
+
|
|
49
|
+
1. Call `list_workspaces`
|
|
50
|
+
2. If user asks about a specific workspace, call `list_projects` with the workspaceId
|
|
51
|
+
3. Present results in a clean table format
|
|
52
|
+
|
|
53
|
+
### "Create a task" / "Add a task for ..."
|
|
54
|
+
|
|
55
|
+
1. Call `list_workspaces` to find the target workspace
|
|
56
|
+
2. Call `list_projects` with workspaceId to find the target project
|
|
57
|
+
3. Ask user to confirm the project (or infer from context)
|
|
58
|
+
4. **Worktree mode**: default is direct mode (no branch isolation). If user says "use worktree", "-w", or "branch isolation", set `useWorktree: true`. Optionally pass `baseBranch` to specify which branch to check out from (e.g. `baseBranch: "develop"`). If `baseBranch` is omitted, the project's current git branch is auto-detected.
|
|
59
|
+
5. **SubPath detection**: check the project description for directory structure hints (e.g. "monorepo: packages/web, packages/api"). If the task clearly belongs to a subdirectory, set `subPath` (e.g. "packages/web"). If unclear, omit it — it's optional.
|
|
60
|
+
6. **References (any files/images)**: ALL user-provided files — including pasted screenshots, uploaded images, and local file paths — should be passed as `references: ["/path/to/file"]` on `create_task`. The tool copies files into the project asset library automatically.
|
|
61
|
+
- **Local file paths**: pass directly (e.g. `references: ["/path/to/doc.md", "/path/to/design.png"]`)
|
|
62
|
+
- **Pasted images with known paths**: if the platform provides file paths for pasted media (e.g. OpenClaw's `{{MediaPaths}}`, Claude Code temp files), pass those paths directly — they are local files
|
|
63
|
+
- **Base64 only (no file path)**: if you only have base64 data with no local path, upload first via `manage_assets` with `action: "upload"`, `projectId`, `base64`, `mimeType`. Get back `{ id: assetId, path }`. Then pass the returned `path` in `references` — `create_task` will automatically copy and link the asset, no separate `link_task` needed
|
|
64
|
+
- **`link_task` only for retroactive linking**: use `manage_assets` with `action: "link_task"` only when you need to associate existing assets with an already-created task (e.g. user wants to add references after task creation)
|
|
65
|
+
7. Call `create_task` with projectId, title, and optional description/priority/labelIds/subPath/useWorktree/baseBranch/references
|
|
66
|
+
8. `autoStart` defaults to true — task will be created and immediately started. If user says "don't start", "just create", or "-nostart", set `autoStart: false`
|
|
67
|
+
|
|
68
|
+
### "Start a task" / "Run this task" / "Execute task ..."
|
|
69
|
+
|
|
70
|
+
1. Call `start_task_execution` with taskId and an optional prompt (instruction for the AI agent)
|
|
71
|
+
2. If no prompt is given, use the task's title/description as context
|
|
72
|
+
3. The task status changes to IN_PROGRESS automatically
|
|
73
|
+
|
|
74
|
+
### "What's running?" / "Check task progress"
|
|
75
|
+
|
|
76
|
+
1. Call `get_task_execution_status` with taskId
|
|
77
|
+
2. If status is running, call `get_task_terminal_output` with taskId (default 50 lines)
|
|
78
|
+
3. Summarize: status + recent output + duration
|
|
79
|
+
|
|
80
|
+
### "Send a message to the task" / "Tell it to ..."
|
|
81
|
+
|
|
82
|
+
1. Call `send_task_terminal_input` with taskId and the text (include `\n` for Enter)
|
|
83
|
+
2. Wait briefly, then call `get_task_terminal_output` to see the response
|
|
84
|
+
|
|
85
|
+
### "Move task to done" / "Cancel this task"
|
|
86
|
+
|
|
87
|
+
1. Call `move_task` with taskId and the target status (DONE, CANCELLED, etc.)
|
|
88
|
+
|
|
89
|
+
### "Search for ..." / "Find tasks about ..."
|
|
90
|
+
|
|
91
|
+
1. Call `search` with the query string
|
|
92
|
+
2. Optionally set category to `task`, `project`, or `repository`
|
|
93
|
+
3. Results include `navigateTo` paths for UI navigation
|
|
94
|
+
|
|
95
|
+
### "Label this task" / "Tag it as ..."
|
|
96
|
+
|
|
97
|
+
1. Call `list_labels` with workspaceId to see available labels
|
|
98
|
+
2. Call `set_task_labels` with taskId and the desired labelId array
|
|
99
|
+
3. Note: this replaces all existing labels — include current ones if you want to keep them
|
|
100
|
+
|
|
101
|
+
### "今天做了什么?" / "Daily summary" / "工作总结"
|
|
102
|
+
|
|
103
|
+
1. Call `daily_summary` (no params for today, or pass `date: "YYYY-MM-DD"` for a specific day)
|
|
104
|
+
2. Results are grouped by workspace → project, with:
|
|
105
|
+
- **completed**: tasks moved to DONE today
|
|
106
|
+
- **inProgress**: tasks with activity today but not yet done, including `progressSummary` (last AI chat excerpt)
|
|
107
|
+
3. Present stats: totalCompleted, totalInProgress
|
|
108
|
+
4. Format as a readable report
|
|
109
|
+
|
|
110
|
+
### "今天有什么待办?" / "Daily todo" / "还有哪些任务没完成?"
|
|
111
|
+
|
|
112
|
+
1. Call `daily_todo` (returns all TODO/IN_PROGRESS/IN_REVIEW tasks)
|
|
113
|
+
2. Optional filters:
|
|
114
|
+
- `workspaceId` — narrow to one workspace
|
|
115
|
+
- `projectId` — narrow to one project
|
|
116
|
+
- `status` — e.g. `["IN_PROGRESS"]` for only active tasks
|
|
117
|
+
- `priority` — e.g. `["CRITICAL", "HIGH"]` for urgent only
|
|
118
|
+
3. Results sorted by priority severity (CRITICAL first), grouped by workspace → project
|
|
119
|
+
4. Each task includes `lastSessionId` for resuming execution
|
|
120
|
+
5. Present stats: total count, breakdown by status and priority
|
|
121
|
+
|
|
122
|
+
### "Create a project" / "Set up a new project"
|
|
123
|
+
|
|
124
|
+
1. Call `list_workspaces` to pick the workspace
|
|
125
|
+
2. Call `create_project` with workspaceId, name, and optionally:
|
|
126
|
+
- `gitUrl` — makes it a GIT project with worktree support
|
|
127
|
+
- `localPath` — path to the local repository
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Task Lifecycle
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
TODO → IN_PROGRESS → IN_REVIEW → DONE
|
|
135
|
+
→ CANCELLED
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- Tasks start as `TODO`
|
|
139
|
+
- `IN_PROGRESS` means an agent is actively working
|
|
140
|
+
- `IN_REVIEW` means execution completed, awaiting review/merge
|
|
141
|
+
- `DONE` means merged and completed
|
|
142
|
+
- `CANCELLED` means dropped
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Task Description Format
|
|
147
|
+
|
|
148
|
+
The `description` field supports Markdown. **Never copy the user's raw message as-is.** Always restructure it into a clear, actionable format:
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
## 目标
|
|
152
|
+
<one sentence summary of what to achieve>
|
|
153
|
+
|
|
154
|
+
## 需求
|
|
155
|
+
- <requirement 1>
|
|
156
|
+
- <requirement 2>
|
|
157
|
+
- ...
|
|
158
|
+
|
|
159
|
+
## 参考
|
|
160
|
+
- <file paths, API endpoints, design references if any>
|
|
161
|
+
|
|
162
|
+
## 备注
|
|
163
|
+
- <constraints, edge cases, things to watch out for>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Rules:
|
|
167
|
+
- `title` should be short (under 30 chars), summarizing the task
|
|
168
|
+
- `description` should be structured Markdown that an AI agent can execute from
|
|
169
|
+
- Extract actionable requirements from the user's natural language
|
|
170
|
+
- Omit sections that have no content (e.g. skip 备注 if nothing to note)
|
|
171
|
+
- If user provides file paths, put them in 参考 section AND in `references` parameter
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Display Templates
|
|
176
|
+
|
|
177
|
+
All query results MUST follow these templates. Do NOT invent your own format. When results are empty, output "No {items} found." (e.g. "No tasks found.", "No workspaces found.").
|
|
178
|
+
|
|
179
|
+
### Priority Markers
|
|
180
|
+
|
|
181
|
+
Use consistently across all templates: 🔴 CRITICAL · 🟠 HIGH · 🟡 MEDIUM · ⚪ LOW
|
|
182
|
+
|
|
183
|
+
### Labels Format
|
|
184
|
+
|
|
185
|
+
Always render labels as comma-separated names (e.g. `bug, frontend`). Omit the column if no task has labels.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### Workspaces (`list_workspaces`)
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
| Workspace | Projects | Description |
|
|
193
|
+
|-----------|----------|-------------|
|
|
194
|
+
| {name} | {projectCount} | {description ?? "—"} |
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Projects (`list_projects`)
|
|
198
|
+
|
|
199
|
+
Note: the response does not include workspace name. Use the workspace name from the prior `list_workspaces` call or the user's context.
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
📂 {workspaceName}
|
|
203
|
+
|
|
204
|
+
| Project | Type | Tasks | Path |
|
|
205
|
+
|---------|------|-------|------|
|
|
206
|
+
| {name} ({alias}) | {type} | {taskCount} | {localPath ?? "—"} |
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Tasks (`list_tasks`)
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
📋 {projectName}
|
|
213
|
+
|
|
214
|
+
| ID | Task | Status | Priority | Labels |
|
|
215
|
+
|----|------|--------|----------|--------|
|
|
216
|
+
| {id (first 8 chars)} | {title} | {status} | {priority} | {labels} |
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Task Creation Confirmation
|
|
220
|
+
|
|
221
|
+
After `create_task` succeeds, render based on the **response** (not the input
|
|
222
|
+
parameter — `autoStart: true` does NOT mean execution actually started; check
|
|
223
|
+
`response.execution` and `response.executionError`):
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
✅ Task created: **{title}**
|
|
227
|
+
- Project: {projectName}
|
|
228
|
+
- Priority: {priority}
|
|
229
|
+
- Status: {status}
|
|
230
|
+
- Worktree: {yes/no}
|
|
231
|
+
{response.execution ? "⚡ Execution started" : response.executionError ? "⚠️ Auto-start failed: " + response.executionError : ""}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
If `executionError` is present, surface it verbatim — common causes are server
|
|
235
|
+
not running, concurrency limit hit, or project missing localPath. Do not say
|
|
236
|
+
"Execution started" when the response only shows `executionError`.
|
|
237
|
+
|
|
238
|
+
### Daily Summary (`daily_summary`)
|
|
239
|
+
|
|
240
|
+
Fields: `stats.totalCompleted`, `stats.totalInProgress`, grouped `workspaces[].projects[].completed[]` and `inProgress[]`.
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
# 📊 Daily Summary — {date}
|
|
244
|
+
|
|
245
|
+
**Stats**: ✅ {stats.totalCompleted} completed · 🔄 {stats.totalInProgress} in progress
|
|
246
|
+
|
|
247
|
+
## {workspace.name}
|
|
248
|
+
|
|
249
|
+
### {project.name}
|
|
250
|
+
|
|
251
|
+
**Completed**:
|
|
252
|
+
| Task | Priority | Completed At |
|
|
253
|
+
|------|----------|-------------|
|
|
254
|
+
| ✅ {title} | {priority} | {completedAt (HH:mm)} |
|
|
255
|
+
|
|
256
|
+
**In Progress**:
|
|
257
|
+
| Task | Status | Priority | Progress |
|
|
258
|
+
|------|--------|----------|----------|
|
|
259
|
+
| 🔄 {title} | {status} | {priority} | {progressSummary ?? "—"} |
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
If no activity: "No activity recorded for {date}."
|
|
263
|
+
|
|
264
|
+
### Daily Todo (`daily_todo`)
|
|
265
|
+
|
|
266
|
+
Fields: `stats.total`, `stats.byPriority.{CRITICAL,HIGH,MEDIUM,LOW}`, `stats.byStatus.{TODO,IN_PROGRESS,IN_REVIEW}`.
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
# 📝 Pending Tasks
|
|
270
|
+
|
|
271
|
+
**Stats**: {stats.total} tasks · 🔴 {stats.byPriority.CRITICAL} · 🟠 {stats.byPriority.HIGH} · 🟡 {stats.byPriority.MEDIUM} · ⚪ {stats.byPriority.LOW}
|
|
272
|
+
|
|
273
|
+
## {workspace.name}
|
|
274
|
+
|
|
275
|
+
### {project.name}
|
|
276
|
+
|
|
277
|
+
| # | Task | Status | Priority | Labels |
|
|
278
|
+
|---|------|--------|----------|--------|
|
|
279
|
+
| 1 | {title} {lastSessionId ? "🔁" : ""} | {status} | {priority} | {labels} |
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Sorted by priority (CRITICAL first). 🔁 = resumable session.
|
|
283
|
+
|
|
284
|
+
### Search Results (`search`)
|
|
285
|
+
|
|
286
|
+
Categories: `task`, `project`, `repository`, `note`, `asset`, `all`. Result count = `results.length`.
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
🔍 Results for "{query}" ({results.length} found)
|
|
290
|
+
|
|
291
|
+
| Type | Name | Location | Snippet |
|
|
292
|
+
|------|------|----------|---------|
|
|
293
|
+
| {type} | {title} | {subtitle} | {snippet ?? "—"} |
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Execution Status (`get_task_execution_status`)
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
⚙️ **{taskTitle}**
|
|
300
|
+
- Execution: {executionStatus} · Terminal: {terminalStatus}
|
|
301
|
+
- Started: {startedAt} {endedAt ? "· Ended: " + endedAt : ""}
|
|
302
|
+
- ID: {executionId}
|
|
303
|
+
- Output (last lines):
|
|
304
|
+
\`\`\`
|
|
305
|
+
{outputSnippet ?? "No output"}
|
|
306
|
+
\`\`\`
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Start Execution Confirmation (`start_task_execution`)
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
⚡ Execution started
|
|
313
|
+
- Task: {taskId}
|
|
314
|
+
- Execution ID: {executionId}
|
|
315
|
+
- Worktree: {worktreePath ?? "direct mode"}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Terminal Output (`get_task_terminal_output`)
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
📺 Terminal — {taskId} ({total} total lines, showing last {lines.length})
|
|
322
|
+
|
|
323
|
+
\`\`\`
|
|
324
|
+
{lines.join("\n")}
|
|
325
|
+
\`\`\`
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Labels (`list_labels`)
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
🏷️ Labels for {workspaceName}
|
|
332
|
+
|
|
333
|
+
| Label | Color | Type |
|
|
334
|
+
|-------|-------|------|
|
|
335
|
+
| {name} | {color} | {isBuiltin ? "Builtin" : "Custom"} |
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Project Identification (`identify_project`)
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
🔎 Project matches for "{query}"
|
|
342
|
+
|
|
343
|
+
| Project | Alias | Workspace | Confidence |
|
|
344
|
+
|---------|-------|-----------|------------|
|
|
345
|
+
| {name} | {alias ?? "—"} | {workspaceName} | {(confidence * 100).toFixed(0)}% |
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Notes (`manage_notes` — list/get)
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
📝 Notes for {projectName}
|
|
352
|
+
|
|
353
|
+
| Title | Updated | Preview |
|
|
354
|
+
|-------|---------|---------|
|
|
355
|
+
| {title} | {updatedAt (MM-DD HH:mm)} | {content (first 60 chars)}... |
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Assets (`manage_assets` — list)
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
📎 Assets for {projectName}
|
|
362
|
+
|
|
363
|
+
| Name | Type | Size | Linked Tasks |
|
|
364
|
+
|------|------|------|-------------|
|
|
365
|
+
| {originalName} | {mimeType} | {size} | {taskCount} |
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## Important Rules
|
|
371
|
+
|
|
372
|
+
- **Scope boundary**: You are a **task management operator only**. If the user asks you to write code, explain code, debug, search the web, read/write files, or anything outside Tower task management, reply: "抱歉,我只能帮你管理工作区、项目和任务。编码、调试等操作请在任务终端中完成。" Do NOT attempt to answer out-of-scope questions.
|
|
373
|
+
- **Display format is mandatory**: always use the templates above, never output raw JSON or invent custom formats
|
|
374
|
+
- **Empty results**: always output "No {items} found." — never silently return nothing
|
|
375
|
+
- **SubPath**: for monorepo or multi-folder projects, use `subPath` on task creation to specify the working directory (e.g. "packages/web"). The project description should document the directory structure. If not sure, omit subPath.
|
|
376
|
+
- **Cascade deletes**: deleting a workspace removes all its projects and tasks
|
|
377
|
+
- **Label replacement**: `set_task_labels` and `update_task` with labelIds do a full replace, not merge
|
|
378
|
+
- **Builtin labels**: cannot be deleted (isBuiltin: true)
|
|
379
|
+
- **One terminal per task**: each task can have at most one active PTY session
|
|
380
|
+
- **Search limit**: returns at most 20 results per query
|
|
381
|
+
- **Search categories**: `task`, `project`, `repository`, `note`, `asset`, `all`
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
module.exports=[522734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},933919,(e,r,t)=>{r.exports=e.x("@prisma/client-9249dd53ac5b6a44",()=>require("@prisma/client-9249dd53ac5b6a44"))},750227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},902157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},874533,(e,r,t)=>{r.exports=e.x("node:child_process",()=>require("node:child_process"))},193695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},918622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},324725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},843793,e=>{"use strict";var r=e.i(933919);let t=globalThis.prisma??new r.PrismaClient({log:[]});process.on("SIGTERM",()=>{t.$disconnect().catch(()=>{})}),process.on("SIGINT",()=>{t.$disconnect().catch(()=>{})}),e.s(["db",0,t])},660526,(e,r,t)=>{r.exports=e.x("node:os",()=>require("node:os"))},192520,e=>{"use strict";let r;var t=e.i(750227),s=e.i(660526),o=e.i(902157);function i(){return r||(r=process.env.TOWER_DATA_DIR||(0,t.join)((0,s.homedir)(),".tower"),(0,o.existsSync)(r)||(0,o.mkdirSync)(r,{recursive:!0})),r}e.s(["getAssistantDir",0,function(){let e=(0,t.join)(i(),"assistant");return(0,o.existsSync)(e)||(0,o.mkdirSync)(e,{recursive:!0}),e},"getBackupsDir",0,function(){let e=(0,t.join)(i(),"backups");return(0,o.existsSync)(e)||(0,o.mkdirSync)(e,{recursive:!0}),e},"getStorageDir",0,function(){let e=(0,t.join)(i(),"storage");return(0,o.existsSync)(e)||(0,o.mkdirSync)(e,{recursive:!0}),e},"getTowerDbPath",0,function(){let e;return(0,t.join)((e=(0,t.join)(i(),"database"),(0,o.existsSync)(e)||(0,o.mkdirSync)(e,{recursive:!0}),e),"tower.db")},"getTowerDir",0,i])},173215,e=>{"use strict";var r=e.i(902157),t=e.i(660526),s=e.i(750227),o=e.i(279711),i=e.i(192520);let n="tower";function a(){let e=(0,i.getTowerDir)(),r=s.join((0,t.homedir)(),".tower");if(s.resolve(e)===s.resolve(r))return"tower";let o=s.basename(e),n=o.match(/^\.?tower-(.+)$/);return n?`tower-${l(n[1])}`:`tower-${l(o)}`}function l(e){return e.replace(/[^a-z0-9_-]/gi,"-").toLowerCase().slice(0,32)}async function c(e,l){let c,d,u,p,m=o.providerRegistry.get(e),h=m?.cli?.adapter;if(!h||!await h.isAvailable())return{provider:e,available:!1,ok:!1};let k="claude"===e?function(e={}){let o=e.homeDir??t.homedir(),i=e.repoRoot??process.cwd(),n=[];return n.push(function(e){let t=s.join(e,".claude","settings.json");if(!r.existsSync(t))return{removed:!1,path:t};try{let e=r.readFileSync(t,"utf-8"),s=JSON.parse(e),o=s.mcpServers;if("object"!=typeof o||null===o||Array.isArray(o)||!("tower"in o))return{removed:!1,path:t};let i=o.tower;return delete o.tower,0===Object.keys(o).length?delete s.mcpServers:s.mcpServers=o,r.writeFileSync(t,JSON.stringify(s,null,2)+"\n","utf-8"),{removed:!0,path:t,removedEntry:i,reason:"wrong-file"}}catch(e){return{removed:!1,path:t,error:e instanceof Error?e.message:String(e)}}}(o)),n.push(function(e,t,o){if(!r.existsSync(e))return{removed:!1,path:e};try{let i=r.readFileSync(e,"utf-8"),n=JSON.parse(i),a=n.mcpServers;if("object"!=typeof a||null===a||Array.isArray(a))return{removed:!1,path:e};let l=a.tower;if(!l)return{removed:!1,path:e};let c=function(e,t){let o,i=e.args;if(!Array.isArray(i))return"foreign-repo";for(let e of i)if("string"==typeof e&&s.isAbsolute(e)){o=e;break}return o?r.existsSync(o)?s.resolve(o).startsWith(s.resolve(t)+s.sep)?"current-repo":"foreign-repo":"missing-path":"foreign-repo"}(l,o);if("current-repo"===c)return{removed:!1,path:e,reason:"alive-current-repo"};return delete a.tower,0===Object.keys(a).length?delete n.mcpServers:n.mcpServers=a,r.writeFileSync(e,JSON.stringify(n,null,2)+"\n","utf-8"),{removed:!0,path:e,removedEntry:l,reason:`${t}:${c}`}}catch(r){return{removed:!1,path:e,error:r instanceof Error?r.message:String(r)}}}(s.join(o,".mcp.json"),"home-mcp-json",i)),{steps:n,removedAny:n.some(e=>e.removed)}}():void 0,v=(c=process.cwd().replace(/\\/g,"/"),d=process.env.DATABASE_URL||`file:${(0,i.getTowerDbPath)().replace(/\\/g,"/")}`,u=`${c}/dist/mcp-server.cjs`,p=a(),(0,r.existsSync)(u)?{name:p,command:"node",args:[u],env:{DATABASE_URL:d}}:{name:p,command:`${c}/node_modules/.bin/tsx`,args:[`${c}/src/mcp/index.ts`],env:{DATABASE_URL:d}}),g=await h.installMcp(v,{scope:"user"}),f=await h.installHooks(l),y=await h.installSkill(n,s.join(process.cwd(),"skills",n));return{provider:e,available:!0,migration:k,mcp:g,hooks:f,skill:y,ok:g.ok&&f.ok&&y.ok}}e.s(["getTowerMcpName",0,a,"installAllForProvider",0,c],173215)},482819,(e,r,t)=>{"use strict";r.exports=e.r(583981).vendored["react-rsc"].ReactServerDOMTurbopackServer},921675,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"registerServerReference",{enumerable:!0,get:function(){return s.registerServerReference}});let s=e.r(482819)},86708,(e,r,t)=>{"use strict";function s(e){for(let r=0;r<e.length;r++){let t=e[r];if("function"!=typeof t)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof t}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureServerEntryExports",{enumerable:!0,get:function(){return s}})},279711,e=>{"use strict";class r{providers=new Map;register(e){this.providers.set(e.name,e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getCliAdapter(e){return this.providers.get(e)?.cli?.adapter??null}getQueryAdapter(e,r){let t=this.providers.get(e);return t?"api"===r?t.api?.adapter??null:t.cliQuery?.adapter??null:null}getAllowedCommands(){let e=[];for(let r of this.providers.values())r.cli?.command&&e.push(r.cli.command);return e}async getAvailableProviders(){let e=[];for(let r of this.providers.values()){let t=!!r.cli&&await r.cli.adapter.isAvailable(),s=t&&r.cli?await r.cli.adapter.getVersion():null,o=!!r.api&&!!process.env[r.api.keyEnvVar],i=!!r.api&&o;e.push({name:r.name,displayName:r.displayName,cli:{available:t,version:s},api:{available:i,keyConfigured:o}})}return e}}var t=e.i(472129),s=e.i(902157),o=e.i(660526),i=e.i(750227),n=e.i(769310);let a=["o4-mini","o3","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","codex-mini-latest"],l=globalThis;if(!l.__providerRegistry){let c=new r;c.register({name:"claude",displayName:"Claude Code",agentFieldValue:"CLAUDE_CODE",cli:{command:"claude",adapter:new t.ClaudeCliAdapter},models:{cli:["sonnet","opus","haiku","claude-sonnet-4-6","claude-opus-4-6","claude-haiku-4-5-20251001"],api:[]}}),c.register({name:"codex",displayName:"Codex CLI",agentFieldValue:"CODEX_CLI",cli:{command:"codex",adapter:new class r{buildSpawnArgs(e){let r=[];e.resumeSessionId?r.push("resume",e.resumeSessionId):e.continueLatest?r.push("resume","--last"):(r.push("--full-auto"),e.extraArgs?.length&&r.push(...e.extraArgs),e.prompt&&r.push(e.prompt));let t={...e.envOverrides??{}};return{command:this.resolveCommand(),args:r,env:t}}buildEnvOverrides(e){let r={TOWER_TASK_ID:e.taskId,TOWER_TASK_TITLE:e.taskTitle,TOWER_STARTED_AT:new Date().toISOString(),TOWER_API_URL:e.apiUrl};return e.callbackUrl&&(r.CALLBACK_URL=e.callbackUrl),r}async installHooks(e){try{let e=this.readHooks(),r=process.cwd().replace(/\\/g,"/"),t=!1,s=this.getHookArray(e,"SessionStart");if(!this.hasHook(s,"session-start-hook.js")){let o=i.join(r,"scripts","session-start-hook.js").replace(/\\/g,"/");s.push({hooks:[{command:`node "${o}"`,timeout:5,type:"command"}]}),e.SessionStart=s,t=!0}let o=this.getHookArray(e,"PostToolUse");if(!this.hasHook(o,"post-tool-hook.js")){let s=i.join(r,"scripts","post-tool-hook.js").replace(/\\/g,"/");o.push({hooks:[{command:`node "${s}"`,timeout:10,type:"command"}],matcher:"Write|Edit|MultiEdit"}),e.PostToolUse=o,t=!0}let n=this.getHookArray(e,"Stop");if(!this.hasHook(n,"stop-hook.js")){let s=i.join(r,"scripts","stop-hook.js").replace(/\\/g,"/");n.push({hooks:[{command:`node "${s}"`,timeout:5,type:"command"}]}),e.Stop=n,t=!0}return t&&(this.writeHooks(e),this.ensureHooksFeatureEnabled()),{ok:!0,method:"file",detail:this.getHooksPath()}}catch(e){return{ok:!1,method:"file",detail:this.getHooksPath(),error:e instanceof Error?e.message:String(e)}}}async uninstallHooks(){try{let e=this.readHooks(),r=["session-start-hook.js","post-tool-hook.js","stop-hook.js"];for(let t of["SessionStart","PostToolUse","Stop"]){let s=this.getHookArray(e,t);e[t]=s.filter(e=>!e.hooks?.some(e=>r.some(r=>e.command?.includes(r))))}return this.writeHooks(e),{ok:!0,method:"file",detail:this.getHooksPath()}}catch(e){return{ok:!1,method:"file",detail:this.getHooksPath(),error:e instanceof Error?e.message:String(e)}}}async isHooksInstalled(){let e=this.readHooks(),r=this.getHookArray(e,"PostToolUse");return this.hasHook(r,"post-tool-hook.js")}async installMcp(e,r={}){let t=this.resolveCommand(),s=["mcp","add",e.name];if(e.env)for(let[r,t]of Object.entries(e.env))s.push("--env",`${r}=${t}`);s.push("--",e.command,...e.args);try{return await this.runCli(t,["mcp","remove",e.name],r.cwd).catch(()=>{}),await this.runCli(t,s,r.cwd),{ok:!0,method:"cli",detail:`${t} ${s.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${t} ${s.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async uninstallMcp(e,r={}){let t=this.resolveCommand(),s=["mcp","remove",e];try{return await this.runCli(t,s,r.cwd),{ok:!0,method:"cli",detail:`${t} ${s.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${t} ${s.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async isMcpInstalled(e,r={}){let t=this.resolveCommand();try{return await this.runCli(t,["mcp","get",e],r.cwd,5e3),!0}catch{return!1}}async installSkill(e,r){let t=i.join(this.getConfigDir(),"skills",e);try{if(!s.existsSync(r))return{ok:!1,method:"symlink",detail:t,error:`Source skill dir does not exist: ${r}`};s.mkdirSync(i.dirname(t),{recursive:!0});let e=await s.promises.lstat(t).catch(()=>null);if(e)if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:t,error:`Refusing to overwrite non-symlink at ${t}`};else{let e=await s.promises.readlink(t);if(i.resolve(e)===i.resolve(r))return{ok:!0,method:"symlink",detail:`${t} → ${r} (already)`};await s.promises.unlink(t)}return await s.promises.symlink(r,t,"dir"),{ok:!0,method:"symlink",detail:`${t} → ${r}`}}catch(e){return{ok:!1,method:"symlink",detail:t,error:e instanceof Error?e.message:String(e)}}}async uninstallSkill(e){let r=i.join(this.getConfigDir(),"skills",e);try{let e=await s.promises.lstat(r).catch(()=>null);if(!e)return{ok:!0,method:"symlink",detail:`${r} (already absent)`};if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:r,error:`Refusing to remove non-symlink at ${r}`};return await s.promises.unlink(r),{ok:!0,method:"symlink",detail:r}}catch(e){return{ok:!1,method:"symlink",detail:r,error:e instanceof Error?e.message:String(e)}}}async isSkillInstalled(e,r){let t=i.join(this.getConfigDir(),"skills",e);try{if(!(await s.promises.lstat(t)).isSymbolicLink())return!1;if(!r)return!0;let e=await s.promises.readlink(t),o=i.isAbsolute(e)?e:i.resolve(i.dirname(t),e);return i.resolve(o)===i.resolve(r)}catch{return!1}}async runCli(r,t,s,o=1e4){let{execFile:i}=await e.A(482848),{promisify:n}=await e.A(268548),a=n(i),{stdout:l}=await a(r,t,{cwd:s,timeout:o});return l}async isAvailable(){return null!==await this.getVersion()}async getVersion(){try{let{execFile:r}=await e.A(144264),{promisify:t}=await e.A(534777),s=t(r),o=this.resolveCommand(),{stdout:i}=await s(o,["--version"],{timeout:5e3});return i.trim()||null}catch{return null}}async getModels(){return a}getConfigDir(){return i.join(o.homedir(),".codex")}getSettingsPath(){return i.join(this.getConfigDir(),"config.toml")}getSessionsDir(){return i.join(this.getConfigDir(),"sessions")}getApiKeyInfo(){return{envVar:"OPENAI_API_KEY",required:!1}}buildHelloProbeArgs(){return{command:this.resolveCommand(),args:["exec","-"]}}resolveCommand(){return process.env.CODEX_CLI_PATH?process.env.CODEX_CLI_PATH:(0,n.resolveCommandPathSync)("codex")}getHooksPath(){return i.join(this.getConfigDir(),"hooks.json")}readHooks(){try{return JSON.parse(s.readFileSync(this.getHooksPath(),"utf-8")).hooks??{}}catch{return{}}}writeHooks(e){let r=this.getConfigDir();s.existsSync(r)||s.mkdirSync(r,{recursive:!0}),s.writeFileSync(this.getHooksPath(),JSON.stringify({hooks:e},null,2),"utf-8")}ensureHooksFeatureEnabled(){let e=this.getSettingsPath(),r="";try{r=s.readFileSync(e,"utf-8")}catch{}if(/codex_hooks\s*=\s*true/.test(r))return;/\[features\]/.test(r)?r=r.replace(/\[features\]/,"[features]\ncodex_hooks = true"):r+="\n[features]\ncodex_hooks = true\n";let t=this.getConfigDir();s.existsSync(t)||s.mkdirSync(t,{recursive:!0}),s.writeFileSync(e,r,"utf-8")}getHookArray(e,r){let t=e[r];return Array.isArray(t)?t:[]}hasHook(e,r){return e.some(e=>e.hooks?.some(e=>e.command?.includes(r)))}}},models:{cli:["o4-mini","o3","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","codex-mini-latest"],api:[]}}),l.__providerRegistry=c}let c=l.__providerRegistry;e.s(["providerRegistry",0,c],279711)},932583,e=>{"use strict";var r=e.i(921675),t=e.i(843793);async function s(e,r={}){let o=r.report,i=o?JSON.stringify(o):null;await t.db.providerConnection.upsert({where:{provider:e},create:{provider:e,lastTestedAt:new Date,testOk:!0,version:r.version??null,mcpInstalled:o?.mcp?.ok??!1,hooksInstalled:o?.hooks?.ok??!1,skillsInstalled:o?.skill?.ok??!1,installLog:i},update:{lastTestedAt:new Date,testOk:!0,version:r.version??null,mcpInstalled:o?.mcp?.ok??!1,hooksInstalled:o?.hooks?.ok??!1,skillsInstalled:o?.skill?.ok??!1,installLog:i}})}async function o(e,r={}){await t.db.providerConnection.upsert({where:{provider:e},create:{provider:e,lastTestedAt:new Date,testOk:!1,installLog:r.reason??null},update:{lastTestedAt:new Date,testOk:!1,mcpInstalled:!1,hooksInstalled:!1,skillsInstalled:!1,installLog:r.reason??null}})}async function i(e){let r=await t.db.providerConnection.findUnique({where:{provider:e}});return!!r&&r.testOk&&r.mcpInstalled&&r.hooksInstalled&&r.skillsInstalled}async function n(){return(await t.db.providerConnection.findMany({where:{testOk:!0,mcpInstalled:!0,hooksInstalled:!0,skillsInstalled:!0},select:{provider:!0},orderBy:{provider:"asc"}})).map(e=>e.provider)}async function a(){return t.db.providerConnection.findMany({select:{provider:!0,lastTestedAt:!0,testOk:!0,version:!0,mcpInstalled:!0,hooksInstalled:!0,skillsInstalled:!0,installLog:!0},orderBy:{provider:"asc"}})}(0,e.i(86708).ensureServerEntryExports)([s,o,i,n,a]),(0,r.registerServerReference)(s,"60bfac4d8a84cfc8a50aaf8f7c80e53b0829767209",null),(0,r.registerServerReference)(o,"609a813a377de3ae5efca9187c0d69ab079fb791e8",null),(0,r.registerServerReference)(i,"402122372e078d3b4d354a06d46800cea3913baa0e",null),(0,r.registerServerReference)(n,"00f1b27b42c89358c138136f95d73465a530d77838",null),(0,r.registerServerReference)(a,"00633c627f11fdcba5dff95e7d77576a38c978a1ec",null),e.s(["getConnectedProviders",0,n,"isProviderConnected",0,i,"markProviderConnected",0,s,"markProviderDisconnected",0,o])},482848,e=>{e.v(e=>Promise.resolve().then(()=>e(874533)))},268548,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_node_util_0xr.y7p._.js"].map(r=>e.l(r))).then(()=>r(812057)))},144264,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_child_process_0pwkpv9._.js"].map(r=>e.l(r))).then(()=>r(233405)))},534777,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_util_0wtvqkc._.js"].map(r=>e.l(r))).then(()=>r(224361)))}];
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0-eibah._.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports=[324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},874533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},192520,e=>{"use strict";let t;var r=e.i(750227),n=e.i(660526),s=e.i(902157);function a(){return t||(t=process.env.TOWER_DATA_DIR||(0,r.join)((0,n.homedir)(),".tower"),(0,s.existsSync)(t)||(0,s.mkdirSync)(t,{recursive:!0})),t}e.s(["getAssistantDir",0,function(){let e=(0,r.join)(a(),"assistant");return(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e},"getBackupsDir",0,function(){let e=(0,r.join)(a(),"backups");return(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e},"getStorageDir",0,function(){let e=(0,r.join)(a(),"storage");return(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e},"getTowerDbPath",0,function(){let e;return(0,r.join)((e=(0,r.join)(a(),"database"),(0,s.existsSync)(e)||(0,s.mkdirSync)(e,{recursive:!0}),e),"tower.db")},"getTowerDir",0,a])},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},198840,e=>{"use strict";var t=e.i(855104);let r=["localhost","127.0.0.1","[::1]"],n=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]),s=/^c[a-z0-9]{20,30}$/;e.s(["requireLocalhost",0,function(e){let s=e.headers.get("x-forwarded-for");if(s&&!s.split(",").map(e=>e.trim()).every(e=>n.has(e)))return t.NextResponse.json({error:"Forbidden"},{status:403});let a=e.headers.get("host")??"";return r.some(e=>a.startsWith(e))?null:t.NextResponse.json({error:"Forbidden"},{status:403})},"validateProjectId",0,function(e){return s.test(e)?null:t.NextResponse.json({error:"Invalid projectId format"},{status:400})},"validateTaskId",0,function(e){return s.test(e)?null:t.NextResponse.json({error:"Invalid taskId format"},{status:400})}])},769310,e=>{"use strict";var t=e.i(902157),r=e.i(874533),n=e.i(750227);function s(e=process.platform){return"win32"===e}function a(e){let t=e.replace(/\r\n|\r|\n/g," ");if(!t.length)return'""';let r=t.replace(/"/g,'""');return/[\s"&<>|^()]/.test(r)?`"${r}"`:r}let o=["CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION","CLAUDE_CODE_PARENT_SESSION"];async function i(e,t={}){let r=t.cwd??process.cwd(),a=t.env??process.env,o=t.platform??process.platform;if(e.includes("/")||e.includes("\\")){let t=n.default.isAbsolute(e)?e:n.default.resolve(r,e);return await d(t,o)?t:null}let l=a.PATH??a.Path??"",c=s(o)?";":":",u=l.split(c).filter(Boolean),p=s(o)?(a.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";").filter(Boolean):[""],m=s(o)&&n.default.extname(e).length>0;for(let t of u)for(let r of s(o)?m?[n.default.join(t,e)]:p.map(r=>n.default.join(t,`${e}${r}`)):[n.default.join(t,e)])if(await d(r,o))return r;return null}let l=e=>(0,r.execSync)(e,{encoding:"utf-8",timeout:5e3});function c(e,t=process.platform,a=l){if(n.default.extname(e)||e.includes("/")||e.includes("\\"))return e;if(!s(t)){try{let t=(0,r.execFileSync)("which",[e],{encoding:"utf-8",timeout:5e3}).trim();if(t)return t}catch{}return e}try{let t=a(`where ${e}`).trim().split("\n").map(e=>e.trim()).filter(Boolean),r=t.find(e=>/\.(cmd|bat|exe)$/i.test(e));if(r)return r;if(t.length>0)return t[0]}catch{}return e}async function u(e,t,r={}){let n=r.env??process.env,s=r.platform??process.platform;return p(await i(e,r)??e,t,n,s)}function p(e,t,r,o){if(!s(o))return{command:e,args:t};let i=n.default.extname(e).toLowerCase();return".cmd"===i||".bat"===i||".com"===i?{command:r.ComSpec||"cmd.exe",args:["/d","/s","/c",[a(e),...t.map(a)].join(" ")]}:{command:e,args:t}}async function d(e,r=process.platform){try{return await t.promises.access(e,s(r)?t.constants.F_OK:t.constants.X_OK),!0}catch{return!1}}async function m(e=process.platform){return s(e)?h():f()}async function f(){try{let e=await t.promises.readFile("/etc/shells","utf-8"),r=[],s=new Map;for(let t of e.split("\n")){let e=t.replace(/#.*/,"").trim();if(!e||!e.startsWith("/")||!await d(e))continue;let a=n.default.basename(e),o=s.get(a)??0;s.set(a,o+1),o>0&&(a=`${a} (${o+1})`),r.push({name:a,path:e})}return r}catch{let e=[];for(let t of["/bin/zsh","/bin/bash","/bin/sh"])await d(t)&&e.push({name:n.default.basename(t),path:t});return e}}async function h(){let e=[],t=[],r=await i("git",{platform:"win32"});if(r){let e=n.default.resolve(n.default.dirname(r),"..","..");t.push(n.default.join(e,"bin","bash.exe"),n.default.join(e,"usr","bin","bash.exe"))}for(let e of[process.env.ProgramW6432,process.env.ProgramFiles,process.env["ProgramFiles(x86)"],process.env.LocalAppData?n.default.join(process.env.LocalAppData,"Programs"):null].filter(Boolean))t.push(n.default.join(e,"Git","bin","bash.exe"),n.default.join(e,"Git","usr","bin","bash.exe"));let s=process.env.USERPROFILE??"";for(let r of(s&&t.push(n.default.join(s,"scoop","apps","git","current","bin","bash.exe")),process.env.CLAUDE_CODE_GIT_BASH_PATH&&t.unshift(process.env.CLAUDE_CODE_GIT_BASH_PATH),t))if(await d(r,"win32")){e.push({name:"Git Bash",path:r});break}let a=await i("pwsh",{platform:"win32"});a&&e.push({name:"PowerShell",path:a});let o=process.env.windir??"C:\\WINDOWS",l=n.default.join(o,"System32","WindowsPowerShell","v1.0","powershell.exe");await d(l,"win32")&&e.push({name:"Windows PowerShell",path:l});let c=process.env.ComSpec??n.default.join(o,"System32","cmd.exe");return await d(c,"win32")&&e.push({name:"Command Prompt",path:c}),e}let v=[{name:"Terminal",bundleName:"Terminal"},{name:"iTerm2",bundleName:"iTerm"},{name:"Warp",bundleName:"Warp"},{name:"Alacritty",bundleName:"Alacritty"},{name:"WezTerm",bundleName:"WezTerm"},{name:"kitty",bundleName:"kitty"},{name:"Hyper",bundleName:"Hyper"}];async function w(e=process.platform){if("darwin"===e){let t=[];for(let r of v)await d(`/Applications/${r.bundleName}.app`,e)&&t.push({name:r.name,value:r.bundleName});return t}if(s(e)){let t=[],r=await i("wt",{platform:e});return r&&t.push({name:"Windows Terminal",value:r}),t}return[]}e.s(["detectShells",0,m,"detectTerminalApps",0,w,"ensurePathInEnv",0,function(e,t=process.platform){let r=s(t)?"Path":"PATH";return(e.PATH??e.Path??"").length>0?e:{...e,[r]:function(e=process.platform){return s(e)?"C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\Wbem":"/usr/local/bin:/opt/homebrew/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin"}(t)}},"resolveCommandPath",0,i,"resolveCommandPathSync",0,c,"resolveSpawnTarget",0,u,"resolveSpawnTargetSync",0,function(e,t,r=process.platform,n){return p(c(e,r,n),t,process.env,r)},"stripClaudeNestingEnv",0,function(e){let t={...e};for(let e of o)delete t[e];return t}])},173215,e=>{"use strict";var t=e.i(902157),r=e.i(660526),n=e.i(750227),s=e.i(279711),a=e.i(192520);let o="tower";function i(){let e=(0,a.getTowerDir)(),t=n.join((0,r.homedir)(),".tower");if(n.resolve(e)===n.resolve(t))return"tower";let s=n.basename(e),o=s.match(/^\.?tower-(.+)$/);return o?`tower-${l(o[1])}`:`tower-${l(s)}`}function l(e){return e.replace(/[^a-z0-9_-]/gi,"-").toLowerCase().slice(0,32)}async function c(e,l){let c,u,p,d,m=s.providerRegistry.get(e),f=m?.cli?.adapter;if(!f||!await f.isAvailable())return{provider:e,available:!1,ok:!1};let h="claude"===e?function(e={}){let s=e.homeDir??r.homedir(),a=e.repoRoot??process.cwd(),o=[];return o.push(function(e){let r=n.join(e,".claude","settings.json");if(!t.existsSync(r))return{removed:!1,path:r};try{let e=t.readFileSync(r,"utf-8"),n=JSON.parse(e),s=n.mcpServers;if("object"!=typeof s||null===s||Array.isArray(s)||!("tower"in s))return{removed:!1,path:r};let a=s.tower;return delete s.tower,0===Object.keys(s).length?delete n.mcpServers:n.mcpServers=s,t.writeFileSync(r,JSON.stringify(n,null,2)+"\n","utf-8"),{removed:!0,path:r,removedEntry:a,reason:"wrong-file"}}catch(e){return{removed:!1,path:r,error:e instanceof Error?e.message:String(e)}}}(s)),o.push(function(e,r,s){if(!t.existsSync(e))return{removed:!1,path:e};try{let a=t.readFileSync(e,"utf-8"),o=JSON.parse(a),i=o.mcpServers;if("object"!=typeof i||null===i||Array.isArray(i))return{removed:!1,path:e};let l=i.tower;if(!l)return{removed:!1,path:e};let c=function(e,r){let s,a=e.args;if(!Array.isArray(a))return"foreign-repo";for(let e of a)if("string"==typeof e&&n.isAbsolute(e)){s=e;break}return s?t.existsSync(s)?n.resolve(s).startsWith(n.resolve(r)+n.sep)?"current-repo":"foreign-repo":"missing-path":"foreign-repo"}(l,s);if("current-repo"===c)return{removed:!1,path:e,reason:"alive-current-repo"};return delete i.tower,0===Object.keys(i).length?delete o.mcpServers:o.mcpServers=i,t.writeFileSync(e,JSON.stringify(o,null,2)+"\n","utf-8"),{removed:!0,path:e,removedEntry:l,reason:`${r}:${c}`}}catch(t){return{removed:!1,path:e,error:t instanceof Error?t.message:String(t)}}}(n.join(s,".mcp.json"),"home-mcp-json",a)),{steps:o,removedAny:o.some(e=>e.removed)}}():void 0,v=(c=process.cwd().replace(/\\/g,"/"),u=process.env.DATABASE_URL||`file:${(0,a.getTowerDbPath)().replace(/\\/g,"/")}`,p=`${c}/dist/mcp-server.cjs`,d=i(),(0,t.existsSync)(p)?{name:d,command:"node",args:[p],env:{DATABASE_URL:u}}:{name:d,command:`${c}/node_modules/.bin/tsx`,args:[`${c}/src/mcp/index.ts`],env:{DATABASE_URL:u}}),w=await f.installMcp(v,{scope:"user"}),y=await f.installHooks(l),g=await f.installSkill(o,n.join(process.cwd(),"skills",o));return{provider:e,available:!0,migration:h,mcp:w,hooks:y,skill:g,ok:w.ok&&y.ok&&g.ok}}e.s(["getTowerMcpName",0,i,"installAllForProvider",0,c],173215)},471552,e=>{"use strict";var t=e.i(522734),r=e.i(814747),n=e.i(192520),s=e.i(173215);let a=`# Tower Assistant
|
|
2
|
-
|
|
3
|
-
你是 Tower Assistant — Tower 任务管理平台的内置 AI 操作员。
|
|
4
|
-
|
|
5
|
-
## 身份
|
|
6
|
-
|
|
7
|
-
- 你是一个**任务管理操作员**,不是编程助手
|
|
8
|
-
- 你通过 Tower MCP 工具帮助用户管理工作区、项目、任务
|
|
9
|
-
- 你**不能**读写文件、运行命令、编辑代码、搜索网页
|
|
10
|
-
- 如果用户请求你无法完成的操作,告诉他们需要通过开发 MCP 扩展来支持
|
|
11
|
-
|
|
12
|
-
## 回复风格
|
|
13
|
-
|
|
14
|
-
- 使用用户的语言回复(中文问中文答,英文问英文答)
|
|
15
|
-
- 简洁明了,不要冗长的解释
|
|
16
|
-
- 主动使用工具查询信息,而不是猜测
|
|
17
|
-
- 当用户问"你能做什么"时,只列出 Tower MCP 工具提供的能力
|
|
18
|
-
`;e.s(["ensureTowerDir",0,function(){let e=(0,n.getAssistantDir)(),o=(0,r.join)(e,"CLAUDE.md"),i=process.cwd(),l=(0,r.join)(i,"skills","tower","SKILL.md"),c=(0,r.join)(e,".claude","skills","tower"),u=(0,r.join)(c,"SKILL.md");return(0,t.existsSync)(o)||((0,t.writeFileSync)(o,a,"utf-8"),console.error(`[init-tower] Created ${o}`)),(0,t.existsSync)(l)&&!(0,t.existsSync)(u)&&((0,t.mkdirSync)(c,{recursive:!0}),(0,t.copyFileSync)(l,u),console.error(`[init-tower] Copied SKILL.md → ${c}`)),function(e){let a=(0,r.join)(e,".claude","settings.json");if((0,t.existsSync)(a))try{let e=JSON.parse((0,t.readFileSync)(a,"utf-8"));e&&"mcpServers"in e&&(delete e.mcpServers,(0,t.writeFileSync)(a,JSON.stringify(e,null,2)+"\n","utf-8"),console.error(`[init-tower] Removed legacy mcpServers from ${a}`))}catch{}let o=(0,r.join)(e,".mcp.json");if((0,t.existsSync)(o))try{let e,r,a,i,l=(e=process.cwd().replace(/\\/g,"/"),r=process.env.DATABASE_URL||`file:${(0,n.getTowerDbPath)().replace(/\\/g,"/")}`,a=`${e}/dist/mcp-server.cjs`,i=(0,s.getTowerMcpName)(),(0,t.existsSync)(a)?{name:i,command:"node",args:[a],env:{DATABASE_URL:r}}:{name:i,command:`${e}/node_modules/.bin/tsx`,args:[`${e}/src/mcp/index.ts`],env:{DATABASE_URL:r}}).name,c=JSON.parse((0,t.readFileSync)(o,"utf-8")),u=c.mcpServers??{};l in u&&(delete u[l],0===Object.keys(u).length?delete c.mcpServers:c.mcpServers=u,(0,t.writeFileSync)(o,JSON.stringify(c,null,2)+"\n","utf-8"),console.error(`[init-tower] Removed legacy tower entry from ${o}`))}catch{}}(e),e}])},137382,e=>{"use strict";var t=e.i(765876),r=e.i(675896),n=e.i(959160),s=e.i(97944),a=e.i(86757),o=e.i(204144),i=e.i(273436),l=e.i(743641),c=e.i(813766),u=e.i(840884),p=e.i(498814),d=e.i(780006),m=e.i(544432),f=e.i(772005),h=e.i(450223),v=e.i(193695);e.i(628400);var w=e.i(800071),y=e.i(855104),g=e.i(198840),x=e.i(471552);function S(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}async function A(t){let r=(0,g.requireLocalhost)(t);if(r)return r;let n=t.nextUrl.searchParams.get("sessionId");if(!n)return y.NextResponse.json({error:"sessionId required"},{status:400});let s=(0,x.ensureTowerDir)();try{let{getSessionMessages:t}=await e.A(145135),r=await t(n,{dir:s}),a=function(e){let t=[];for(let n of e)switch(n.type){case"user":{var r;let e=n.message,s="string"==typeof e?.content?e.content:"";s.startsWith("/tower ")&&(s=s.slice(7));let a=s.match(/<command-args>([\s\S]*?)<\/command-args>/);a&&(s=a[1].trim()),s=s.replace(/\n---\nThe user has attached the following file\(s\)[\s\S]*$/,"").replace(/\n---\nThe user has attached the following image\(s\)[\s\S]*$/,"").trim();let o=void(Array.isArray(r=e?.content)&&r.filter(e=>"image"===e.type&&e.source?.data).length);s&&t.push({id:S(),role:"user",content:s,attachmentFilenames:o});break}case"assistant":{let e=n.message,r=Array.isArray(e?.content)?e.content:[],s=r.filter(e=>"text"===e.type&&e.text).map(e=>e.text);for(let e of(s.length>0&&t.push({id:S(),role:"assistant",content:s.join("")}),r))"tool_use"===e.type&&e.name&&t.push({id:S(),role:"tool",content:JSON.stringify(e.input??{},null,2),toolName:e.name});break}case"system":{let e=n.message;e?.subtype==="tool_result"&&e.content&&t.push({id:S(),role:"tool",content:e.content,toolName:`${e.tool_name??"tool"} (result)`})}}return t}(r);return y.NextResponse.json({messages:a})}catch(t){let e=t instanceof Error?t.message:String(t);return console.error("[assistant-sessions] Error:",e),y.NextResponse.json({error:e},{status:500})}}e.s(["GET",0,A,"dynamic",0,"force-dynamic","runtime",0,"nodejs"],866197);var b=e.i(866197);let R=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/internal/assistant/sessions/route",pathname:"/api/internal/assistant/sessions",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/internal/assistant/sessions/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:E,workUnitAsyncStorage:_,serverHooks:j}=R;async function T(e,t,n){n.requestMeta&&(0,s.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/internal/assistant/sessions/route";y=y.replace(/\/index$/,"")||"/";let g=await R.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:x,params:S,nextConfig:A,parsedUrl:b,isDraftMode:E,prerenderManifest:_,routerServerContext:j,isOnDemandRevalidate:T,revalidateOnlyGenerated:C,resolvedPathname:N,clientReferenceManifest:P,serverActionsManifest:k}=g,D=(0,i.normalizeAppPath)(y),O=!!(_.dynamicRoutes[D]||_.routes[N]),$=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,b,!1):t.end("This page could not be found"),null);if(O&&!E){let e=!!_.routes[N],t=_.dynamicRoutes[D];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await $();throw new v.NoFallbackError}}let I=null;!O||R.isDev||E||(I="/index"===(I=N)?"/":I);let U=!0===R.isDev||!O,q=O&&!U;k&&P&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:P,serverActionsManifest:k});let L=e.method||"GET",H=(0,a.getTracer)(),F=H.getActiveScopeSpan(),M=!!(null==j?void 0:j.isWrappedByNextServer),W=!!(0,s.getRequestMeta)(e,"minimalMode"),B=(0,s.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,A,_,W);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let K={params:S,previewProps:_.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts},cacheComponents:!!A.cacheComponents,supportsDynamicResponse:U,incrementalCache:B,cacheLifeProfiles:A.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,s)=>R.onRequestError(e,t,n,s,j)},sharedContext:{buildId:x}},G=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),z=c.NextRequestAdapter.fromNodeNextRequest(G,(0,c.signalFromNodeResponse)(t));try{let s,o=async e=>R.handle(z,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${L} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),s&&s!==e&&(s.setAttribute("http.route",n),s.updateName(t))}else e.updateName(`${L} ${y}`)}),i=async s=>{var a,i;let l=async({previousCacheEntry:r})=>{try{if(!W&&T&&C&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(s);e.fetchMetrics=K.renderOpts.fetchMetrics;let i=K.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let l=K.renderOpts.collectedTags;if(!O)return await (0,d.sendResponse)(G,J,a,K.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[h.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:T})},!1,j),t}},c=await R.handleResponse({req:e,nextConfig:A,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:_,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:C,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:W});if(!O)return null;if((null==c||null==(a=c.value)?void 0:a.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(i=c.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",T?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,m.fromNodeOutgoingHttpHeaders)(c.value.headers);return W&&O||u.delete(h.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,f.getCacheControlHeader)(c.cacheControl)),await (0,d.sendResponse)(G,J,new Response(c.value.body,{headers:u,status:c.value.status||200})),null};M&&F?await i(F):(s=H.getActiveScopeSpan(),await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${L} ${y}`,kind:a.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},i),void 0,!M))}catch(t){if(t instanceof v.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:T})},!1,j),O)throw t;return await (0,d.sendResponse)(G,J,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:_})},"routeModule",0,R,"serverHooks",0,j,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,_],137382)},482848,e=>{e.v(e=>Promise.resolve().then(()=>e(874533)))},268548,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_util_0xr.y7p._.js"].map(t=>e.l(t))).then(()=>t(812057)))},144264,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_child_process_0pwkpv9._.js"].map(t=>e.l(t))).then(()=>t(233405)))},534777,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_util_0wtvqkc._.js"].map(t=>e.l(t))).then(()=>t(224361)))},145135,e=>{e.v(t=>Promise.all(["server/chunks/[externals]__00yf3l2._.js","server/chunks/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0.721uk._.js"].map(t=>e.l(t))).then(()=>t(217040)))}];
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0_q8qjf._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},874533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},198840,e=>{"use strict";var t=e.i(855104);let r=["localhost","127.0.0.1","[::1]"],s=new Set(["127.0.0.1","::1","::ffff:127.0.0.1"]),n=/^c[a-z0-9]{20,30}$/;e.s(["requireLocalhost",0,function(e){let n=e.headers.get("x-forwarded-for");if(n&&!n.split(",").map(e=>e.trim()).every(e=>s.has(e)))return t.NextResponse.json({error:"Forbidden"},{status:403});let a=e.headers.get("host")??"";return r.some(e=>a.startsWith(e))?null:t.NextResponse.json({error:"Forbidden"},{status:403})},"validateProjectId",0,function(e){return n.test(e)?null:t.NextResponse.json({error:"Invalid projectId format"},{status:400})},"validateTaskId",0,function(e){return n.test(e)?null:t.NextResponse.json({error:"Invalid taskId format"},{status:400})}])},769310,e=>{"use strict";var t=e.i(902157),r=e.i(874533),s=e.i(750227);function n(e=process.platform){return"win32"===e}function a(e){let t=e.replace(/\r\n|\r|\n/g," ");if(!t.length)return'""';let r=t.replace(/"/g,'""');return/[\s"&<>|^()]/.test(r)?`"${r}"`:r}let o=["CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION","CLAUDE_CODE_PARENT_SESSION"];async function i(e,t={}){let r=t.cwd??process.cwd(),a=t.env??process.env,o=t.platform??process.platform;if(e.includes("/")||e.includes("\\")){let t=s.default.isAbsolute(e)?e:s.default.resolve(r,e);return await p(t,o)?t:null}let l=a.PATH??a.Path??"",u=n(o)?";":":",c=l.split(u).filter(Boolean),d=n(o)?(a.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";").filter(Boolean):[""],m=n(o)&&s.default.extname(e).length>0;for(let t of c)for(let r of n(o)?m?[s.default.join(t,e)]:d.map(r=>s.default.join(t,`${e}${r}`)):[s.default.join(t,e)])if(await p(r,o))return r;return null}let l=e=>(0,r.execSync)(e,{encoding:"utf-8",timeout:5e3});function u(e,t=process.platform,a=l){if(s.default.extname(e)||e.includes("/")||e.includes("\\"))return e;if(!n(t)){try{let t=(0,r.execFileSync)("which",[e],{encoding:"utf-8",timeout:5e3}).trim();if(t)return t}catch{}return e}try{let t=a(`where ${e}`).trim().split("\n").map(e=>e.trim()).filter(Boolean),r=t.find(e=>/\.(cmd|bat|exe)$/i.test(e));if(r)return r;if(t.length>0)return t[0]}catch{}return e}async function c(e,t,r={}){let s=r.env??process.env,n=r.platform??process.platform;return d(await i(e,r)??e,t,s,n)}function d(e,t,r,o){if(!n(o))return{command:e,args:t};let i=s.default.extname(e).toLowerCase();return".cmd"===i||".bat"===i||".com"===i?{command:r.ComSpec||"cmd.exe",args:["/d","/s","/c",[a(e),...t.map(a)].join(" ")]}:{command:e,args:t}}async function p(e,r=process.platform){try{return await t.promises.access(e,n(r)?t.constants.F_OK:t.constants.X_OK),!0}catch{return!1}}async function m(e=process.platform){return n(e)?f():h()}async function h(){try{let e=await t.promises.readFile("/etc/shells","utf-8"),r=[],n=new Map;for(let t of e.split("\n")){let e=t.replace(/#.*/,"").trim();if(!e||!e.startsWith("/")||!await p(e))continue;let a=s.default.basename(e),o=n.get(a)??0;n.set(a,o+1),o>0&&(a=`${a} (${o+1})`),r.push({name:a,path:e})}return r}catch{let e=[];for(let t of["/bin/zsh","/bin/bash","/bin/sh"])await p(t)&&e.push({name:s.default.basename(t),path:t});return e}}async function f(){let e=[],t=[],r=await i("git",{platform:"win32"});if(r){let e=s.default.resolve(s.default.dirname(r),"..","..");t.push(s.default.join(e,"bin","bash.exe"),s.default.join(e,"usr","bin","bash.exe"))}for(let e of[process.env.ProgramW6432,process.env.ProgramFiles,process.env["ProgramFiles(x86)"],process.env.LocalAppData?s.default.join(process.env.LocalAppData,"Programs"):null].filter(Boolean))t.push(s.default.join(e,"Git","bin","bash.exe"),s.default.join(e,"Git","usr","bin","bash.exe"));let n=process.env.USERPROFILE??"";for(let r of(n&&t.push(s.default.join(n,"scoop","apps","git","current","bin","bash.exe")),process.env.CLAUDE_CODE_GIT_BASH_PATH&&t.unshift(process.env.CLAUDE_CODE_GIT_BASH_PATH),t))if(await p(r,"win32")){e.push({name:"Git Bash",path:r});break}let a=await i("pwsh",{platform:"win32"});a&&e.push({name:"PowerShell",path:a});let o=process.env.windir??"C:\\WINDOWS",l=s.default.join(o,"System32","WindowsPowerShell","v1.0","powershell.exe");await p(l,"win32")&&e.push({name:"Windows PowerShell",path:l});let u=process.env.ComSpec??s.default.join(o,"System32","cmd.exe");return await p(u,"win32")&&e.push({name:"Command Prompt",path:u}),e}let g=[{name:"Terminal",bundleName:"Terminal"},{name:"iTerm2",bundleName:"iTerm"},{name:"Warp",bundleName:"Warp"},{name:"Alacritty",bundleName:"Alacritty"},{name:"WezTerm",bundleName:"WezTerm"},{name:"kitty",bundleName:"kitty"},{name:"Hyper",bundleName:"Hyper"}];async function v(e=process.platform){if("darwin"===e){let t=[];for(let r of g)await p(`/Applications/${r.bundleName}.app`,e)&&t.push({name:r.name,value:r.bundleName});return t}if(n(e)){let t=[],r=await i("wt",{platform:e});return r&&t.push({name:"Windows Terminal",value:r}),t}return[]}e.s(["detectShells",0,m,"detectTerminalApps",0,v,"ensurePathInEnv",0,function(e,t=process.platform){let r=n(t)?"Path":"PATH";return(e.PATH??e.Path??"").length>0?e:{...e,[r]:function(e=process.platform){return n(e)?"C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\Wbem":"/usr/local/bin:/opt/homebrew/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin"}(t)}},"resolveCommandPath",0,i,"resolveCommandPathSync",0,u,"resolveSpawnTarget",0,c,"resolveSpawnTargetSync",0,function(e,t,r=process.platform,s){return d(u(e,r,s),t,process.env,r)},"stripClaudeNestingEnv",0,function(e){let t={...e};for(let e of o)delete t[e];return t}])},472129,e=>{"use strict";var t=e.i(902157),r=e.i(660526),s=e.i(750227),n=e.i(769310);let a=["sonnet","opus","haiku","claude-sonnet-4-6","claude-opus-4-6","claude-haiku-4-5-20251001"];e.s(["ClaudeCliAdapter",0,class{buildSpawnArgs(e){let t=["--dangerously-skip-permissions"];e.extraArgs?.length&&t.push(...e.extraArgs),e.resumeSessionId?t.push("--resume",e.resumeSessionId):e.continueLatest?t.push("--continue"):e.prompt&&t.push(e.prompt);let r={...e.envOverrides??{}};return{command:this.resolveCommand(),args:t,env:r}}buildEnvOverrides(e){let t={TOWER_TASK_ID:e.taskId,TOWER_TASK_TITLE:e.taskTitle,TOWER_STARTED_AT:new Date().toISOString(),TOWER_API_URL:e.apiUrl};return e.callbackUrl&&(t.CALLBACK_URL=e.callbackUrl),t}async installHooks(e){try{let e=this.readSettings(),t=e.hooks??{},r=process.cwd().replace(/\\/g,"/"),n=!1,a=this.getHookArray(t,"SessionStart");if(!this.hasHook(a,"session-start-hook.js")){let e=s.join(r,"scripts","session-start-hook.js").replace(/\\/g,"/");a.push({hooks:[{command:`node "${e}"`,timeout:5,type:"command"}]}),t.SessionStart=a,n=!0}let o=this.getHookArray(t,"PostToolUse");if(!this.hasHook(o,"post-tool-hook.js")){let e=s.join(r,"scripts","post-tool-hook.js").replace(/\\/g,"/");o.push({hooks:[{command:`node "${e}"`,timeout:10,type:"command"}],matcher:"Write|Edit|MultiEdit"}),t.PostToolUse=o,n=!0}let i=this.getHookArray(t,"Stop");if(!this.hasHook(i,"stop-hook.js")){let e=s.join(r,"scripts","stop-hook.js").replace(/\\/g,"/");i.push({hooks:[{command:`node "${e}"`,timeout:5,type:"command"}]}),t.Stop=i,n=!0}return n&&(e.hooks=t,this.writeSettings(e)),{ok:!0,method:"file",detail:this.getSettingsPath()}}catch(e){return{ok:!1,method:"file",detail:this.getSettingsPath(),error:e instanceof Error?e.message:String(e)}}}async uninstallHooks(){try{let e=this.readSettings(),t=e.hooks??{},r=["session-start-hook.js","post-tool-hook.js","stop-hook.js"];for(let e of["SessionStart","PostToolUse","Stop"]){let s=this.getHookArray(t,e);t[e]=s.filter(e=>!e.hooks?.some(e=>r.some(t=>e.command?.includes(t))))}return e.hooks=t,this.writeSettings(e),{ok:!0,method:"file",detail:this.getSettingsPath()}}catch(e){return{ok:!1,method:"file",detail:this.getSettingsPath(),error:e instanceof Error?e.message:String(e)}}}async isHooksInstalled(){let e=this.readSettings().hooks??{},t=this.getHookArray(e,"PostToolUse");return this.hasHook(t,"post-tool-hook.js")}async installMcp(e,t={}){let r=t.scope??"user",s={command:e.command,args:e.args};e.env&&Object.keys(e.env).length>0&&(s.env=e.env);let n=this.resolveCommand(),a=["mcp","add-json","-s",r,e.name,JSON.stringify(s)];try{return await this.runCli(n,["mcp","remove","-s",r,e.name],t.cwd).catch(()=>{}),await this.runCli(n,a,t.cwd),{ok:!0,method:"cli",detail:`${n} ${a.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${n} ${a.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async uninstallMcp(e,t={}){let r=t.scope??"user",s=this.resolveCommand(),n=["mcp","remove","-s",r,e];try{return await this.runCli(s,n,t.cwd),{ok:!0,method:"cli",detail:`${s} ${n.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${s} ${n.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async isMcpInstalled(e,t={}){let r=this.resolveCommand();try{return await this.runCli(r,["mcp","get",e],t.cwd,5e3),!0}catch{return!1}}async installSkill(e,r){let n=s.join(this.getConfigDir(),"skills",e);try{if(!t.existsSync(r))return{ok:!1,method:"symlink",detail:n,error:`Source skill dir does not exist: ${r}`};t.mkdirSync(s.dirname(n),{recursive:!0});let e=await t.promises.lstat(n).catch(()=>null);if(e)if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:n,error:`Refusing to overwrite non-symlink at ${n}`};else{let e=await t.promises.readlink(n);if(s.resolve(e)===s.resolve(r))return{ok:!0,method:"symlink",detail:`${n} → ${r} (already)`};await t.promises.unlink(n)}return await t.promises.symlink(r,n,"dir"),{ok:!0,method:"symlink",detail:`${n} → ${r}`}}catch(e){return{ok:!1,method:"symlink",detail:n,error:e instanceof Error?e.message:String(e)}}}async uninstallSkill(e){let r=s.join(this.getConfigDir(),"skills",e);try{let e=await t.promises.lstat(r).catch(()=>null);if(!e)return{ok:!0,method:"symlink",detail:`${r} (already absent)`};if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:r,error:`Refusing to remove non-symlink at ${r}`};return await t.promises.unlink(r),{ok:!0,method:"symlink",detail:r}}catch(e){return{ok:!1,method:"symlink",detail:r,error:e instanceof Error?e.message:String(e)}}}async isSkillInstalled(e,r){let n=s.join(this.getConfigDir(),"skills",e);try{if(!(await t.promises.lstat(n)).isSymbolicLink())return!1;if(!r)return!0;let e=await t.promises.readlink(n),a=s.isAbsolute(e)?e:s.resolve(s.dirname(n),e);return s.resolve(a)===s.resolve(r)}catch{return!1}}async runCli(t,r,s,n=1e4){let{execFile:a}=await e.A(482848),{promisify:o}=await e.A(268548),i=o(a),{stdout:l}=await i(t,r,{cwd:s,timeout:n});return l}async isAvailable(){return null!==await this.getVersion()}async getVersion(){try{let{execFile:t}=await e.A(144264),{promisify:r}=await e.A(534777),s=r(t),n=this.resolveCommand(),{stdout:a}=await s(n,["--version"],{timeout:5e3});return a.trim()||null}catch{return null}}async getModels(){return a}getConfigDir(){return s.join(r.homedir(),".claude")}getSettingsPath(){return s.join(this.getConfigDir(),"settings.json")}getSessionsDir(){return s.join(this.getConfigDir(),"projects")}getApiKeyInfo(){return{envVar:"ANTHROPIC_API_KEY",required:!1}}buildHelloProbeArgs(){return{command:this.resolveCommand(),args:["--print","-","--output-format","stream-json","--verbose"]}}resolveCommand(){return process.env.CLAUDE_CODE_PATH?process.env.CLAUDE_CODE_PATH:(0,n.resolveCommandPathSync)("claude")}readSettings(){try{return JSON.parse(t.readFileSync(this.getSettingsPath(),"utf-8"))}catch{return{}}}writeSettings(e){let r=this.getConfigDir();t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),t.writeFileSync(this.getSettingsPath(),JSON.stringify(e,null,2),"utf-8")}getHookArray(e,t){let r=e[t];return Array.isArray(r)?r:[]}hasHook(e,t){return e.some(e=>e.hooks?.some(e=>e.command?.includes(t)))}}])},212019,e=>{"use strict";var t=e.i(765876),r=e.i(675896),s=e.i(959160),n=e.i(97944),a=e.i(86757),o=e.i(204144),i=e.i(273436),l=e.i(743641),u=e.i(813766),c=e.i(840884),d=e.i(498814),p=e.i(780006),m=e.i(544432),h=e.i(772005),f=e.i(450223),g=e.i(193695);e.i(628400);var v=e.i(800071),y=e.i(855104),k=e.i(198840),w=e.i(750227);let x=new(e.i(472129)).ClaudeCliAdapter;async function S(e){let t=(0,k.requireLocalhost)(e);if(t)return t;let r=await x.isHooksInstalled(),s=w.join(process.cwd(),"scripts","post-tool-hook.js");return y.NextResponse.json({installed:r,hookPath:s})}async function C(e){let t=(0,k.requireLocalhost)(e);if(t)return t;let r=process.env.NEXTAUTH_URL??`http://localhost:${process.env.PORT??3e3}`;return await x.installHooks(r),y.NextResponse.json({success:!0})}async function A(e){let t=(0,k.requireLocalhost)(e);return t||(await x.uninstallHooks(),y.NextResponse.json({success:!0}))}e.s(["DELETE",0,A,"GET",0,S,"POST",0,C,"dynamic",0,"force-dynamic","runtime",0,"nodejs"],730599);var E=e.i(730599);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/internal/hooks/install/route",pathname:"/api/internal/hooks/install",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/internal/hooks/install/route.ts",nextConfigOutput:"standalone",userland:E}),{workAsyncStorage:R,workUnitAsyncStorage:T,serverHooks:j}=b;async function P(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/internal/hooks/install/route";y=y.replace(/\/index$/,"")||"/";let k=await b.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!k)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:w,params:x,nextConfig:S,parsedUrl:C,isDraftMode:A,prerenderManifest:E,routerServerContext:R,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,resolvedPathname:P,clientReferenceManifest:_,serverActionsManifest:N}=k,O=(0,i.normalizeAppPath)(y),H=!!(E.dynamicRoutes[O]||E.routes[P]),D=async()=>((null==R?void 0:R.render404)?await R.render404(e,t,C,!1):t.end("This page could not be found"),null);if(H&&!A){let e=!!E.routes[P],t=E.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await D();throw new g.NoFallbackError}}let I=null;!H||b.isDev||A||(I="/index"===(I=P)?"/":I);let $=!0===b.isDev||!H,U=H&&!$;N&&_&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:_,serverActionsManifest:N});let q=e.method||"GET",L=(0,a.getTracer)(),W=L.getActiveScopeSpan(),M=!!(null==R?void 0:R.isWrappedByNextServer),F=!!(0,n.getRequestMeta)(e,"minimalMode"),B=(0,n.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,S,E,F);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let K={params:x,previewProps:E.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts},cacheComponents:!!S.cacheComponents,supportsDynamicResponse:$,incrementalCache:B,cacheLifeProfiles:S.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>b.onRequestError(e,t,s,n,R)},sharedContext:{buildId:w}},G=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let n,o=async e=>b.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${q} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",s),n.updateName(t))}else e.updateName(`${q} ${y}`)}),i=async n=>{var a,i;let l=async({previousCacheEntry:r})=>{try{if(!F&&T&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let i=K.renderOpts.pendingWaitUntil;i&&s.waitUntil&&(s.waitUntil(i),i=void 0);let l=K.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(G,X,a,K.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,s=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,R),t}},u=await b.handleResponse({req:e,nextConfig:S,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:E,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,responseGenerator:l,waitUntil:s.waitUntil,isMinimalMode:F});if(!H)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(i=u.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});F||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,m.fromNodeOutgoingHttpHeaders)(u.value.headers);return F&&H||c.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(G,X,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};M&&W?await i(W):(n=L.getActiveScopeSpan(),await L.withPropagatedContext(e.headers,()=>L.trace(c.BaseServerSpan.handleRequest,{spanName:`${q} ${y}`,kind:a.SpanKind.SERVER,attributes:{"http.method":q,"http.target":e.url}},i),void 0,!M))}catch(t){if(t instanceof g.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,R),H)throw t;return await (0,p.sendResponse)(G,X,new Response(null,{status:500})),null}}e.s(["handler",0,P,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:T})},"routeModule",0,b,"serverHooks",0,j,"workAsyncStorage",0,R,"workUnitAsyncStorage",0,T],212019)},482848,e=>{e.v(e=>Promise.resolve().then(()=>e(874533)))},268548,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_util_0xr.y7p._.js"].map(t=>e.l(t))).then(()=>t(812057)))},144264,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_child_process_0pwkpv9._.js"].map(t=>e.l(t))).then(()=>t(233405)))},534777,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_util_0wtvqkc._.js"].map(t=>e.l(t))).then(()=>t(224361)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0vasg9u._.js.map
|