tower-studio 0.2.45 → 0.2.47
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/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- 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 +3 -3
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/_not-found/page.js +8 -8
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +2 -2
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js +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 +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 +2 -4
- 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 +2 -2
- 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 +5 -4
- 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.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +3 -5
- 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/harness/ask/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/harness/notify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/harness/pending/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/harness/reply/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/harness/reply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +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 +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +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 +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]/paste-image/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +5 -3
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/harness/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/harness/page/server-reference-manifest.json +172 -112
- package/.next/standalone/.next/server/app/harness/page.js +8 -8
- package/.next/standalone/.next/server/app/harness/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/harness/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +3 -2
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +254 -158
- package/.next/standalone/.next/server/app/missions/page.js +10 -9
- 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 +3 -3
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/onboarding/page.js +8 -8
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/page.js +8 -8
- 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 +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +245 -149
- package/.next/standalone/.next/server/app/settings/page.js +10 -11
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +286 -238
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +9 -9
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +251 -203
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +9 -9
- 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]/groups/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/build-manifest.json +18 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/react-loadable-manifest.json +18 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/server-reference-manifest.json +413 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js +25 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +228 -180
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +9 -9
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +266 -218
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +10 -11
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +9 -9
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +226 -178
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +9 -9
- 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 +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +293 -233
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +11 -12
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +177 -129
- package/.next/standalone/.next/server/app/workspaces/page.js +8 -8
- 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/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_09ikw5j.js +5 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +9 -5
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-1~xqo._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.3n3t.._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.wsvr6._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0y3adwk._.js → [root-of-the-server]__0.yf1mx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0o6i1wy._.js → [root-of-the-server]__00xe-t8._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0vh3112._.js → [root-of-the-server]__02yvm55._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__09arklv._.js → [root-of-the-server]__04-ty51._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0v98a~t._.js → [root-of-the-server]__065hi6e._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0k9rz_z._.js → [root-of-the-server]__06iuq17._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06x1zwj._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06~wmlx._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__092475e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0atap--._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c3je91._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dz.knv._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ehwsa1._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0esywxf._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fd9z.r._.js +30 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gcg7i.._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iyp~.k._.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07xsu6m._.js → [root-of-the-server]__0j7565a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kkrbn-._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0m8t3vi._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0nv83.p._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0squ613._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0u8tl88._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wugb-9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yeg1kp._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zchqv1._.js +43 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_~s0z4._.js → [root-of-the-server]__0zcy11y._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~1-i5h._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~ju4-d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10qclz-._.js +3 -0
- package/.next/standalone/.next/server/chunks/_02hac5p._.js +25 -2
- package/.next/standalone/.next/server/chunks/_0_w835g._.js +4 -0
- package/.next/standalone/.next/server/chunks/_0je3dz2._.js +25 -2
- package/.next/standalone/.next/server/chunks/_0tidm8l._.js +25 -2
- package/.next/standalone/.next/server/chunks/_0zok2an._.js +25 -2
- package/.next/standalone/.next/server/chunks/src_05balzk._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0aygchu._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0gif-f5._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0pg9w-x._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_0vp6.co._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_11k6i~l._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +3 -3
- package/.next/standalone/.next/server/chunks/src_lib_0d~1~wz._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0ylel_1._.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/src_lib_config-defaults_ts_10ayktg._.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/0se9_next_dist_0i5qmqd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0se9_next_dist_esm_build_templates_app-page_04~dhws.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_0r~ty--._.js → 0ws9_lucide-react_dist_esm_icons_0gv_cwy._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00qdvw7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01bz3_g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__051tpij._.js → [root-of-the-server]__0282989._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dfqa5a._.js → [root-of-the-server]__03jikql._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ixgha6._.js → [root-of-the-server]__04dod9d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05tx27l._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0fl0l82._.js → [root-of-the-server]__07ha-7q._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07~giyb._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0872sqe._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090y_.y._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__096w7g2._.js → [root-of-the-server]__09qoc8v._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b.ej5q._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dmjt7o._.js → [root-of-the-server]__0bl842b._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lau3k_._.js → [root-of-the-server]__0c81jqz._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dh0alq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e79g0v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t_zq~v._.js → [root-of-the-server]__0fy8mj6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0g2wrd2._.js → [root-of-the-server]__0gsk~9d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h4ltpn._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hx2p17._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0iaw1ms._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ie8~g5._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~s8otw._.js → [root-of-the-server]__0j1w7ro._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0i0k_zi._.js → [root-of-the-server]__0jxfeb6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l0~scn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0tb.1li._.js → [root-of-the-server]__0mi.v4q._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vi-5xg._.js → [root-of-the-server]__0nell0t._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0odoa97._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0o9jkew._.js → [root-of-the-server]__0q8o5us._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dv.-zu._.js → [root-of-the-server]__0qjjy1r._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rg73f.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~4y3y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~ak20._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t3q30a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tpho3f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__08etd~v._.js → [root-of-the-server]__0tusyj0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06s-_gx._.js → [root-of-the-server]__0x6eyvj._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xftcya._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xiiocg._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xnuz05._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0znl9us._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zsnp~d._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~fdua7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11fp64w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1290yo~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12s3kky._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ydiu_y._.js → [root-of-the-server]__136sh9u._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0dye20y._.js → _0-wp_zu._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0.-.0zk._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0..h3hk._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_09rq08e._.js → _0111pr2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0~6pqk.._.js → _029yl-g._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_02mcoex._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_02p-udo._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_02t7f2_._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_04brhyt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_08b3kyv._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/_0a___34._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ljrvyt._.js → _0b4v~ls._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0bdyusg._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/_0c8-9m9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0xnn~jq._.js → _0gcox_6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_01fdzzv._.js → _0gte_c4._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0hyn4md._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_13_b8hh._.js → _0lqjtwo._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0noar.v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0os43sb._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rilhs1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_078cdw~._.js → _0sbkase._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_08bq4g8._.js → _0t-0.1o._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0w~~xn0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_12la163._.js → _0xexuoi._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0xu906p._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_0z-z415._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0z5~opf._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0zx1ubq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0~2k74h._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/_0~rpgs_._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_10a_vqn._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0h0b46r._.js → _10or.ne._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_09z-55_._.js → _10q2mbe._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_11.knhq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ytcm0j._.js → _124j7aj._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_13yv8at._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_11j0qlp._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_actions_07_wts6._.js +47 -0
- 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]_notes_notes-page-client_tsx_10gyo3v._.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_components_0rowjw~._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0bndp1~._.js → src_components_ui_popover_tsx_0a78wqo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_03xtona._.js → src_lib_0-3zx.v._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_lib_00ial55._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_01-0ix1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_01d~ml9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_04y-65j._.js → src_lib_0278czx._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_07o.0r6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_09jpiip._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0bmg7ix._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0cb~2g1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fdsvpu._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fyrfen._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0-x.wbd._.js → src_lib_0gqe-g3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ixnmd0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0lpxsj~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0pgz5n6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_00p-ir2._.js → src_lib_0tq69ek._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0y5zzg-._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_pty_11~ojr2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_pty_orphan-reaper_ts_0a0qmlo._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ng0eku._.js → src_lib_schemas_ts_0ph~1ak._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.json +4 -0
- 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 +2308 -1642
- package/.next/standalone/.next/static/chunks/0.2y9uc38xso-.js +1 -0
- package/.next/standalone/.next/static/chunks/00agq5_c-.llc.js +1 -0
- package/.next/standalone/.next/static/chunks/015i97g3voot2.js +2 -0
- package/.next/standalone/.next/static/chunks/01wvj~s3skc-5.js +1 -0
- package/.next/standalone/.next/static/chunks/{0c4-6qdhi645s.js → 031br6.h-zycv.js} +1 -1
- package/.next/standalone/.next/static/chunks/04.2m8l~ws19v.js +1 -0
- package/.next/standalone/.next/static/chunks/054ztat09k8d8.js +1 -0
- package/.next/standalone/.next/static/chunks/07c4b1kp_85qg.js +1 -0
- package/.next/standalone/.next/static/chunks/07f592yv~pptf.js +1 -0
- package/.next/standalone/.next/static/chunks/{0bvhkgitn__gl.js → 08j4ettv1zbmn.js} +1 -1
- package/.next/standalone/.next/static/chunks/08kc0~d-bpqxd.js +1 -0
- package/.next/standalone/.next/static/chunks/{0c.t.evwah_m4.js → 08s_oyki61yjf.js} +1 -1
- package/.next/standalone/.next/static/chunks/09bc_~h466~tj.js +1 -0
- package/.next/standalone/.next/static/chunks/0_hj_1l73v-on.js +1 -0
- package/.next/standalone/.next/static/chunks/0a54zbhpg7-ql.js +1 -0
- package/.next/standalone/.next/static/chunks/0c2po53wqe-op.js +1 -0
- package/.next/standalone/.next/static/chunks/0clhvl~13pwv2.js +1 -0
- package/.next/standalone/.next/static/chunks/0fi1kdxrc9m~d.js +1 -0
- package/.next/standalone/.next/static/chunks/0ix28r65.7o_r.js +12 -0
- package/.next/standalone/.next/static/chunks/0j56_.0_wup.m.js +1 -0
- package/.next/standalone/.next/static/chunks/0lokkque~1fox.js +1 -0
- package/.next/standalone/.next/static/chunks/0m5k~sgt78d8a.js +1 -0
- package/.next/standalone/.next/static/chunks/0mzzaly9-cwhd.js +5 -0
- package/.next/standalone/.next/static/chunks/0ov_akpudbv96.js +5 -0
- package/.next/standalone/.next/static/chunks/0pg~fc3o64-u0.js +1 -0
- package/.next/standalone/.next/static/chunks/0pvc93qomwhkq.js +1 -0
- package/.next/standalone/.next/static/chunks/0seo-lerjdkbn.js +1 -0
- package/.next/standalone/.next/static/chunks/0smoiulyzysrc.js +2 -0
- package/.next/standalone/.next/static/chunks/0ufatfbq87c84.js +1 -0
- package/.next/standalone/.next/static/chunks/{09bezwcb__18t.js → 0ujznvfinjpzn.js} +1 -1
- package/.next/standalone/.next/static/chunks/{02xqrfqu.s8-i.js → 0ux~8zee88x-j.js} +1 -1
- package/.next/standalone/.next/static/chunks/0vy01_a6xhhrr.js +1 -0
- package/.next/standalone/.next/static/chunks/0wl8cpmvyhv0l.js +1 -0
- package/.next/standalone/.next/static/chunks/0xd_tk4asn0qj.js +1 -0
- package/.next/standalone/.next/static/chunks/0~l470bpaoz9f.js +1 -0
- package/.next/standalone/.next/static/chunks/118j.0w2pbdea.js +1 -0
- package/.next/standalone/.next/static/chunks/11yhe31en~dvt.js +1 -0
- package/.next/standalone/.next/static/chunks/13yfli6~6o4z~.js +1 -0
- package/.next/standalone/.next/static/chunks/14fch6~swodjf.css +1 -0
- package/.next/standalone/.next/static/chunks/15rlbf5rw1dd..js +1 -0
- package/.next/standalone/package.json +1 -2
- package/dist/mcp-server.cjs +1205 -4330
- package/package.json +1 -2
- package/prisma/schema.prisma +46 -5
- package/scripts/migrations/0006-project-knowledge.ts +58 -0
- package/scripts/migrations/0007-product-group.ts +67 -0
- package/skills/tower/SKILL.md +22 -92
- package/skills/tower/references/task-source.md +80 -0
- package/.next/standalone/.next/server/chunks/[externals]__0x_wqa7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__034jopu._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08-s.nv._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__098.3z2._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ehx6q.._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iggiij._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pmamzv._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pzyjqf._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tplo5s._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tpzojh._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xasom7._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xy1t4x._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0y~y6sh._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10jnn26._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__116v_bx._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__119rbly._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0qk_esg._.js +0 -4
- package/.next/standalone/.next/server/chunks/_0t31z6q._.js +0 -5
- package/.next/standalone/.next/server/chunks/src_0aqjfcv._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_lib_0nw5n~t._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.q~~2p._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01zrinc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03x8axh._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06t.cx~._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0__klx0._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ccy_gg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cjmeyl._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dx9sp-._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f57j8r._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j1dx6p._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kn~asi._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m.hayd._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mpjat-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sg4fde._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w24qox._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wq~4aj._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yihqy6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zouyfp._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1184s~q._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0.iq8t8._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_00.myc6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_00eymu8._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_03-we0p._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_04szgc6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0kd_tda._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_0ktexki._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_0lo1nei._.js +0 -6
- package/.next/standalone/.next/server/chunks/ssr/_0mdd702._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0n0q6~9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0pab_al._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0pg6-.y._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0pvp63a._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_0qi4x-5._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0qnobd-._.js +0 -43
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0ts~td3._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0y0_4zs._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0yva1-.._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0yz5dmq._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_11w13--._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_09eeb85._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_0vv366l._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_03x1i~1._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/src_lib_08gthaz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_090~6pq._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0k8dkbn._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0knbpxk._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0p_iehl._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qve1ri._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0s35u~4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x2ui80._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ypc5_d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_10jh2mz._.js +0 -3
- package/.next/standalone/.next/static/chunks/0-nppzqp-r.9c.js +0 -1
- package/.next/standalone/.next/static/chunks/0-te2tg6~a23u.js +0 -1
- package/.next/standalone/.next/static/chunks/0.64.6c1mh7d2.js +0 -1
- package/.next/standalone/.next/static/chunks/0.8n1ce9lggg4.js +0 -1
- package/.next/standalone/.next/static/chunks/0.nsmn6shzidu.js +0 -2
- package/.next/standalone/.next/static/chunks/0.zgqz~m3sjej.js +0 -1
- package/.next/standalone/.next/static/chunks/00.eotegra08r.js +0 -1
- package/.next/standalone/.next/static/chunks/01j9m895w64zn.js +0 -1
- package/.next/standalone/.next/static/chunks/03y272e6e9o8i.js +0 -1
- package/.next/standalone/.next/static/chunks/08eyd7sq064r0.js +0 -1
- package/.next/standalone/.next/static/chunks/09b33znj4m__c.js +0 -1
- package/.next/standalone/.next/static/chunks/0d0zm8viq3ol4.js +0 -12
- package/.next/standalone/.next/static/chunks/0dktl5t_dtxu..js +0 -1
- package/.next/standalone/.next/static/chunks/0e5~nzt657k92.js +0 -1
- package/.next/standalone/.next/static/chunks/0erwxvpb9w29_.js +0 -1
- package/.next/standalone/.next/static/chunks/0gf~0e3xpa0fj.js +0 -5
- package/.next/standalone/.next/static/chunks/0gy79dfi~lnig.js +0 -1
- package/.next/standalone/.next/static/chunks/0gz3xwb5_8xwv.js +0 -1
- package/.next/standalone/.next/static/chunks/0i75~pu.bp20..js +0 -1
- package/.next/standalone/.next/static/chunks/0jn_w5b9r~beu.js +0 -1
- package/.next/standalone/.next/static/chunks/0l59z2mf1ouxu.js +0 -1
- package/.next/standalone/.next/static/chunks/0m4xd-ie7j.hx.js +0 -1
- package/.next/standalone/.next/static/chunks/0mx9ebe6we4z0.js +0 -1
- package/.next/standalone/.next/static/chunks/0nsggimu5je3g.js +0 -1
- package/.next/standalone/.next/static/chunks/0nw8nx8kafy79.js +0 -1
- package/.next/standalone/.next/static/chunks/0pzjryav9pm7p.js +0 -1
- package/.next/standalone/.next/static/chunks/0q-rl50zskr35.js +0 -1
- package/.next/standalone/.next/static/chunks/0qqy2x-fsmmmx.js +0 -1
- package/.next/standalone/.next/static/chunks/0t59wpux0g1~l.js +0 -1
- package/.next/standalone/.next/static/chunks/0uezq8wiwkq8d.js +0 -1
- package/.next/standalone/.next/static/chunks/0vrc~7m1_cuvl.js +0 -1
- package/.next/standalone/.next/static/chunks/0xbh24-hxrt~m.css +0 -1
- package/.next/standalone/.next/static/chunks/0xkkmruo8p.l_.js +0 -1
- package/.next/standalone/.next/static/chunks/0xx0pe_j2kmr9.js +0 -2
- package/.next/standalone/.next/static/chunks/0zqjqiqmorenw.js +0 -5
- package/.next/standalone/.next/static/chunks/136l78utn~v08.js +0 -1
- package/.next/standalone/.next/static/chunks/171x9kw9wcyk4.js +0 -1
- package/.next/standalone/.next/static/chunks/17m4o~gdsvuo3.js +0 -1
- package/next.config.ts +0 -18
- /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → dFewkdixeBoRBY6Fvw11J}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → dFewkdixeBoRBY6Fvw11J}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → dFewkdixeBoRBY6Fvw11J}/_ssgManifest.js +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
module.exports=[605171,t=>{"use strict";var e=t.i(750227),i=t.i(902157);t.i(660526);var s=t.i(427699),r=t.i(522734),n=t.i(687769),h=t.i(81111),o=t.i(899871),a=t.i(814747),l=t.i(449719),d=t.i(500874),u=t.i(406461),f=t.i(57328),c=t.i(666680),p=t.i(912714),m=Object.defineProperty,y="object"==typeof process&&process?process:{stdout:null,stderr:null},b=t=>!!t&&"object"==typeof t&&(t instanceof te||t instanceof h.default||E(t)||g(t)),E=t=>!!t&&"object"==typeof t&&t instanceof n.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==h.default.Writable.prototype.pipe,g=t=>!!t&&"object"==typeof t&&t instanceof n.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end,w=Symbol("EOF"),R=Symbol("maybeEmitEnd"),v=Symbol("emittedEnd"),_=Symbol("emittingEnd"),S=Symbol("emittedError"),O=Symbol("closed"),T=Symbol("read"),k=Symbol("flush"),L=Symbol("flushChunk"),x=Symbol("encoding"),A=Symbol("decoder"),N=Symbol("flowing"),D=Symbol("paused"),I=Symbol("resume"),C=Symbol("buffer"),B=Symbol("pipes"),M=Symbol("bufferLength"),F=Symbol("bufferPush"),P=Symbol("bufferShift"),z=Symbol("objectMode"),U=Symbol("destroyed"),j=Symbol("error"),H=Symbol("emitData"),Z=Symbol("emitEnd"),G=Symbol("emitEnd2"),W=Symbol("async"),$=Symbol("abort"),V=Symbol("aborted"),Y=Symbol("signal"),q=Symbol("dataListeners"),K=Symbol("discarded"),X=t=>Promise.resolve().then(t),Q=t=>t(),J=class{src;dest;opts;ondrain;constructor(t,e,i){this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[I](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},tt=class extends J{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,i){super(t,e,i),this.proxyErrors=t=>this.dest.emit("error",t),t.on("error",this.proxyErrors)}},te=class extends n.EventEmitter{[N]=!1;[D]=!1;[B]=[];[C]=[];[z];[x];[W];[A];[w]=!1;[v]=!1;[_]=!1;[O]=!1;[S]=null;[M]=0;[U]=!1;[Y];[V]=!1;[q]=0;[K]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw TypeError("Encoding and objectMode may not be used together");(t=>!!t.objectMode)(e)?(this[z]=!0,this[x]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[x]=e.encoding,this[z]=!1):(this[z]=!1,this[x]=null),this[W]=!!e.async,this[A]=this[x]?new o.StringDecoder(this[x]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[C]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[B]});let{signal:i}=e;i&&(this[Y]=i,i.aborted?this[$]():i.addEventListener("abort",()=>this[$]()))}get bufferLength(){return this[M]}get encoding(){return this[x]}set encoding(t){throw Error("Encoding must be set at instantiation time")}setEncoding(t){throw Error("Encoding must be set at instantiation time")}get objectMode(){return this[z]}set objectMode(t){throw Error("objectMode must be set at instantiation time")}get async(){return this[W]}set async(t){this[W]=this[W]||!!t}[$](){this[V]=!0,this.emit("abort",this[Y]?.reason),this.destroy(this[Y]?.reason)}get aborted(){return this[V]}set aborted(t){}write(t,e,i){if(this[V])return!1;if(this[w])throw Error("write after end");if(this[U])return this.emit("error",Object.assign(Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(i=e,e="utf8"),e||(e="utf8");let s=this[W]?X:Q;if(!this[z]&&!Buffer.isBuffer(t)){let e;if(e=t,!Buffer.isBuffer(e)&&ArrayBuffer.isView(e))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else{let e;if((e=t)instanceof ArrayBuffer||e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)t=Buffer.from(t);else if("string"!=typeof t)throw Error("Non-contiguous data written to non-objectMode stream")}}return this[z]?(this[N]&&0!==this[M]&&this[k](!0),this[N]?this.emit("data",t):this[F](t)):t.length&&("string"==typeof t&&(e!==this[x]||this[A]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[x]&&(t=this[A].write(t)),this[N]&&0!==this[M]&&this[k](!0),this[N]?this.emit("data",t):this[F](t)),0!==this[M]&&this.emit("readable"),i&&s(i),this[N]}read(t){if(this[U])return null;if(this[K]=!1,0===this[M]||0===t||t&&t>this[M])return this[R](),null;this[z]&&(t=null),this[C].length>1&&!this[z]&&(this[C]=[this[x]?this[C].join(""):Buffer.concat(this[C],this[M])]);let e=this[T](t||null,this[C][0]);return this[R](),e}[T](t,e){if(this[z])this[P]();else{let i=e;t===i.length||null===t?this[P]():("string"==typeof i?(this[C][0]=i.slice(t),e=i.slice(0,t)):(this[C][0]=i.subarray(t),e=i.subarray(0,t)),this[M]-=t)}return this.emit("data",e),this[C].length||this[w]||this.emit("drain"),e}end(t,e,i){return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e="utf8"),void 0!==t&&this.write(t,e),i&&this.once("end",i),this[w]=!0,this.writable=!1,(this[N]||!this[D])&&this[R](),this}[I](){this[U]||(this[q]||this[B].length||(this[K]=!0),this[D]=!1,this[N]=!0,this.emit("resume"),this[C].length?this[k]():this[w]?this[R]():this.emit("drain"))}resume(){return this[I]()}pause(){this[N]=!1,this[D]=!0,this[K]=!1}get destroyed(){return this[U]}get flowing(){return this[N]}get paused(){return this[D]}[F](t){this[z]?this[M]+=1:this[M]+=t.length,this[C].push(t)}[P](){return this[z]?this[M]-=1:this[M]-=this[C][0].length,this[C].shift()}[k](t=!1){do;while(this[L](this[P]())&&this[C].length)t||this[C].length||this[w]||this.emit("drain")}[L](t){return this.emit("data",t),this[N]}pipe(t,e){if(this[U])return t;this[K]=!1;let i=this[v];return e=e||{},t===y.stdout||t===y.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[B].push(e.proxyErrors?new tt(this,t,e):new J(this,t,e)),this[W]?X(()=>this[I]()):this[I]()),t}unpipe(t){let e=this[B].find(e=>e.dest===t);e&&(1===this[B].length?(this[N]&&0===this[q]&&(this[N]=!1),this[B]=[]):this[B].splice(this[B].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let i=super.on(t,e);if("data"===t)this[K]=!1,this[q]++,this[B].length||this[N]||this[I]();else if("readable"===t&&0!==this[M])super.emit("readable");else("end"===t||"finish"===t||"prefinish"===t)&&this[v]?(super.emit(t),this.removeAllListeners(t)):"error"===t&&this[S]&&(this[W]?X(()=>e.call(this,this[S])):e.call(this,this[S]));return i}removeListener(t,e){return this.off(t,e)}off(t,e){let i=super.off(t,e);return"data"===t&&(this[q]=this.listeners("data").length,0!==this[q]||this[K]||this[B].length||(this[N]=!1)),i}removeAllListeners(t){let e=super.removeAllListeners(t);return("data"===t||void 0===t)&&(this[q]=0,this[K]||this[B].length||(this[N]=!1)),e}get emittedEnd(){return this[v]}[R](){this[_]||this[v]||this[U]||0!==this[C].length||!this[w]||(this[_]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[O]&&this.emit("close"),this[_]=!1)}emit(t,...e){let i=e[0];if("error"!==t&&"close"!==t&&t!==U&&this[U])return!1;if("data"===t)return(!!this[z]||!!i)&&(this[W]?(X(()=>this[H](i)),!0):this[H](i));if("end"===t)return this[Z]();if("close"===t){if(this[O]=!0,!this[v]&&!this[U])return!1;let t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[S]=i,super.emit(j,i);let t=(!this[Y]||!!this.listeners("error").length)&&super.emit("error",i);return this[R](),t}if("resume"===t){let t=super.emit("resume");return this[R](),t}if("finish"===t||"prefinish"===t){let e=super.emit(t);return this.removeAllListeners(t),e}let s=super.emit(t,...e);return this[R](),s}[H](t){for(let e of this[B])!1===e.dest.write(t)&&this.pause();let e=!this[K]&&super.emit("data",t);return this[R](),e}[Z](){return!this[v]&&(this[v]=!0,this.readable=!1,this[W]?(X(()=>this[G]()),!0):this[G]())}[G](){if(this[A]){let t=this[A].end();if(t){for(let e of this[B])e.dest.write(t);this[K]||super.emit("data",t)}}for(let t of this[B])t.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[z]||(t.dataLength=0);let e=this.promise();return this.on("data",e=>{t.push(e),this[z]||(t.dataLength+=e.length)}),await e,t}async concat(){if(this[z])throw Error("cannot concat in objectMode");let t=await this.collect();return this[x]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(U,()=>e(Error("stream destroyed"))),this.on("error",t=>e(t)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[K]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(null!==i)return Promise.resolve({done:!1,value:i});if(this[w])return e();let s,r,n=t=>{this.off("data",h),this.off("end",o),this.off(U,a),e(),r(t)},h=t=>{this.off("error",n),this.off("end",o),this.off(U,a),this.pause(),s({value:t,done:!!this[w]})},o=()=>{this.off("error",n),this.off("data",h),this.off(U,a),e(),s({done:!0,value:void 0})},a=()=>n(Error("stream destroyed"));return new Promise((t,e)=>{r=e,s=t,this.once(U,a),this.once("error",n),this.once("end",o),this.once("data",h)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[K]=!1;let t=!1,e=()=>(this.pause(),this.off(j,e),this.off(U,e),this.off("end",e),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return e();let i=this.read();return null===i?e():{done:!1,value:i}};return this.once("end",e),this.once(j,e),this.once(U,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){return this[U]||(this[U]=!0,this[K]=!0,this[C].length=0,this[M]=0,"function"!=typeof this.close||this[O]||this.close()),t?this.emit("error",t):this.emit(U),this}static get isStream(){return b}},ti=r.default.writev,ts=Symbol("_autoClose"),tr=Symbol("_close"),tn=Symbol("_ended"),th=Symbol("_fd"),to=Symbol("_finished"),ta=Symbol("_flags"),tl=Symbol("_flush"),td=Symbol("_handleChunk"),tu=Symbol("_makeBuf"),tf=Symbol("_mode"),tc=Symbol("_needDrain"),tp=Symbol("_onerror"),tm=Symbol("_onopen"),ty=Symbol("_onread"),tb=Symbol("_onwrite"),tE=Symbol("_open"),tg=Symbol("_path"),tw=Symbol("_pos"),tR=Symbol("_queue"),tv=Symbol("_read"),t_=Symbol("_readSize"),tS=Symbol("_reading"),tO=Symbol("_remain"),tT=Symbol("_size"),tk=Symbol("_write"),tL=Symbol("_writing"),tx=Symbol("_defaultFlag"),tA=Symbol("_errored"),tN=class extends te{[tA]=!1;[th];[tg];[t_];[tS]=!1;[tT];[tO];[ts];constructor(t,e){if(super(e=e||{}),this.readable=!0,this.writable=!1,"string"!=typeof t)throw TypeError("path must be a string");this[tA]=!1,this[th]="number"==typeof e.fd?e.fd:void 0,this[tg]=t,this[t_]=e.readSize||0x1000000,this[tS]=!1,this[tT]="number"==typeof e.size?e.size:1/0,this[tO]=this[tT],this[ts]="boolean"!=typeof e.autoClose||e.autoClose,"number"==typeof this[th]?this[tv]():this[tE]()}get fd(){return this[th]}get path(){return this[tg]}write(){throw TypeError("this is a readable stream")}end(){throw TypeError("this is a readable stream")}[tE](){r.default.open(this[tg],"r",(t,e)=>this[tm](t,e))}[tm](t,e){t?this[tp](t):(this[th]=e,this.emit("open",e),this[tv]())}[tu](){return Buffer.allocUnsafe(Math.min(this[t_],this[tO]))}[tv](){if(!this[tS]){this[tS]=!0;let t=this[tu]();if(0===t.length)return process.nextTick(()=>this[ty](null,0,t));r.default.read(this[th],t,0,t.length,null,(t,e,i)=>this[ty](t,e,i))}}[ty](t,e,i){this[tS]=!1,t?this[tp](t):this[td](e,i)&&this[tv]()}[tr](){if(this[ts]&&"number"==typeof this[th]){let t=this[th];this[th]=void 0,r.default.close(t,t=>t?this.emit("error",t):this.emit("close"))}}[tp](t){this[tS]=!0,this[tr](),this.emit("error",t)}[td](t,e){let i=!1;return this[tO]-=t,t>0&&(i=super.write(t<e.length?e.subarray(0,t):e)),(0===t||this[tO]<=0)&&(i=!1,this[tr](),super.end()),i}emit(t,...e){switch(t){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[th]&&this[tv](),!1;case"error":return!this[tA]&&(this[tA]=!0,super.emit(t,...e));default:return super.emit(t,...e)}}},tD=class extends tN{[tE](){let t=!0;try{this[tm](null,r.default.openSync(this[tg],"r")),t=!1}finally{t&&this[tr]()}}[tv](){let t=!0;try{if(!this[tS]){for(this[tS]=!0;;){let t=this[tu](),e=0===t.length?0:r.default.readSync(this[th],t,0,t.length,null);if(!this[td](e,t))break}this[tS]=!1}t=!1}finally{t&&this[tr]()}}[tr](){if(this[ts]&&"number"==typeof this[th]){let t=this[th];this[th]=void 0,r.default.closeSync(t),this.emit("close")}}},tI=class extends s.default{readable=!1;writable=!0;[tA]=!1;[tL]=!1;[tn]=!1;[tR]=[];[tc]=!1;[tg];[tf];[ts];[th];[tx];[ta];[to]=!1;[tw];constructor(t,e){super(e=e||{}),this[tg]=t,this[th]="number"==typeof e.fd?e.fd:void 0,this[tf]=void 0===e.mode?438:e.mode,this[tw]="number"==typeof e.start?e.start:void 0,this[ts]="boolean"!=typeof e.autoClose||e.autoClose;let i=void 0!==this[tw]?"r+":"w";this[tx]=void 0===e.flags,this[ta]=void 0===e.flags?i:e.flags,void 0===this[th]&&this[tE]()}emit(t,...e){if("error"===t){if(this[tA])return!1;this[tA]=!0}return super.emit(t,...e)}get fd(){return this[th]}get path(){return this[tg]}[tp](t){this[tr](),this[tL]=!0,this.emit("error",t)}[tE](){r.default.open(this[tg],this[ta],this[tf],(t,e)=>this[tm](t,e))}[tm](t,e){this[tx]&&"r+"===this[ta]&&t&&"ENOENT"===t.code?(this[ta]="w",this[tE]()):t?this[tp](t):(this[th]=e,this.emit("open",e),this[tL]||this[tl]())}end(t,e){return t&&this.write(t,e),this[tn]=!0,this[tL]||this[tR].length||"number"!=typeof this[th]||this[tb](null,0),this}write(t,e){return"string"==typeof t&&(t=Buffer.from(t,e)),this[tn]?(this.emit("error",Error("write() after end()")),!1):void 0===this[th]||this[tL]||this[tR].length?(this[tR].push(t),this[tc]=!0,!1):(this[tL]=!0,this[tk](t),!0)}[tk](t){r.default.write(this[th],t,0,t.length,this[tw],(t,e)=>this[tb](t,e))}[tb](t,e){t?this[tp](t):(void 0!==this[tw]&&"number"==typeof e&&(this[tw]+=e),this[tR].length?this[tl]():(this[tL]=!1,this[tn]&&!this[to]?(this[to]=!0,this[tr](),this.emit("finish")):this[tc]&&(this[tc]=!1,this.emit("drain"))))}[tl](){if(0===this[tR].length)this[tn]&&this[tb](null,0);else if(1===this[tR].length)this[tk](this[tR].pop());else{let t=this[tR];this[tR]=[],ti(this[th],t,this[tw],(t,e)=>this[tb](t,e))}}[tr](){if(this[ts]&&"number"==typeof this[th]){let t=this[th];this[th]=void 0,r.default.close(t,t=>t?this.emit("error",t):this.emit("close"))}}},tC=class extends tI{[tE](){let t;if(this[tx]&&"r+"===this[ta])try{t=r.default.openSync(this[tg],this[ta],this[tf])}catch(t){if(t?.code==="ENOENT")return this[ta]="w",this[tE]();throw t}else t=r.default.openSync(this[tg],this[ta],this[tf]);this[tm](null,t)}[tr](){if(this[ts]&&"number"==typeof this[th]){let t=this[th];this[th]=void 0,r.default.closeSync(t),this.emit("close")}}[tk](t){let e=!0;try{this[tb](null,r.default.writeSync(this[th],t,0,t.length,this[tw])),e=!1}finally{if(e)try{this[tr]()}catch{}}}},tB=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),tM=t=>tB.get(t)||t,tF=(t={})=>{if(!t)return{};let e={};for(let[i,s]of Object.entries(t))e[tM(i)]=s;return void 0===e.chmod&&!1===e.noChmod&&(e.chmod=!0),delete e.noChmod,e},tP=(t,e,i,s,r)=>Object.assign((n=[],h,o)=>{Array.isArray(n)&&(h=n,n={}),"function"==typeof h&&(o=h,h=void 0),h=h?Array.from(h):[];let a=tF(n);if(r?.(a,h),a.sync&&a.file){if("function"==typeof o)throw TypeError("callback not supported for sync tar functions");return t(a,h)}if(a.sync||!a.file)if(!a.sync||a.file){if(!a.sync&&!a.file){if("function"==typeof o)throw TypeError("callback only supported with file option");return s(a,h)}}else{if("function"==typeof o)throw TypeError("callback not supported for sync tar functions");return i(a,h)}else{let t=e(a,h);return o?t.then(()=>o(),o):t}throw Error("impossible options??")},{syncFile:t,asyncFile:e,syncNoFile:i,asyncNoFile:s,validate:r}),tz=u.default.constants||{ZLIB_VERNUM:4736},tU=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},tz)),tj=d.Buffer.concat,tH=Object.getOwnPropertyDescriptor(d.Buffer,"concat"),tZ=t=>t,tG=tH?.writable===!0||tH?.set!==void 0?t=>{d.Buffer.concat=t?tZ:tj}:t=>{},tW=Symbol("_superWrite"),t$=class extends Error{code;errno;constructor(t,e){super("zlib: "+t.message,{cause:t}),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,e??this.constructor)}get name(){return"ZlibError"}},tV=Symbol("flushFlag"),tY=class extends te{#t=!1;#e=!1;#i;#s;#r;#n;#h;get sawError(){return this.#t}get handle(){return this.#n}get flushFlag(){return this.#i}constructor(t,e){if(!t||"object"!=typeof t)throw TypeError("invalid options for ZlibBase constructor");if(super(t),this.#i=t.flush??0,this.#s=t.finishFlush??0,this.#r=t.fullFlushFlag??0,"function"!=typeof u[e])throw TypeError("Compression method not supported: "+e);try{this.#n=new u[e](t)}catch(t){throw new t$(t,this.constructor)}this.#h=t=>{this.#t||(this.#t=!0,this.close(),this.emit("error",t))},this.#n?.on("error",t=>this.#h(new t$(t))),this.once("end",()=>this.close)}close(){this.#n&&(this.#n.close(),this.#n=void 0,this.emit("close"))}reset(){if(!this.#t)return(0,l.default)(this.#n,"zlib binding closed"),this.#n.reset?.()}flush(t){this.ended||("number"!=typeof t&&(t=this.#r),this.write(Object.assign(d.Buffer.alloc(0),{[tV]:t})))}end(t,e,i){return"function"==typeof t&&(i=t,e=void 0,t=void 0),"function"==typeof e&&(i=e,e=void 0),t&&(e?this.write(t,e):this.write(t)),this.flush(this.#s),this.#e=!0,super.end(i)}get ended(){return this.#e}[tW](t){return super.write(t)}write(t,e,i){let s,r;if("function"==typeof e&&(i=e,e="utf8"),"string"==typeof t&&(t=d.Buffer.from(t,e)),this.#t)return;(0,l.default)(this.#n,"zlib binding closed");let n=this.#n._handle,h=n.close;n.close=()=>{};let o=this.#n.close;this.#n.close=()=>{},tG(!0);try{let e="number"==typeof t[tV]?t[tV]:this.#i;s=this.#n._processChunk(t,e),tG(!1)}catch(t){tG(!1),this.#h(new t$(t,this.write))}finally{this.#n&&(this.#n._handle=n,n.close=h,this.#n.close=o,this.#n.removeAllListeners("error"))}if(this.#n&&this.#n.on("error",t=>this.#h(new t$(t,this.write))),s)if(Array.isArray(s)&&s.length>0){let t=s[0];r=this[tW](d.Buffer.from(t));for(let t=1;t<s.length;t++)r=this[tW](s[t])}else r=this[tW](d.Buffer.from(s));return i&&i(),r}},tq=class extends tY{#t;#e;constructor(t,e){(t=t||{}).flush=t.flush||tU.Z_NO_FLUSH,t.finishFlush=t.finishFlush||tU.Z_FINISH,t.fullFlushFlag=tU.Z_FULL_FLUSH,super(t,e),this.#t=t.level,this.#e=t.strategy}params(t,e){if(!this.sawError){if(!this.handle)throw Error("cannot switch params when binding is closed");if(!this.handle.params)throw Error("not supported in this implementation");if(this.#t!==t||this.#e!==e){this.flush(tU.Z_SYNC_FLUSH),(0,l.default)(this.handle,"zlib binding closed");let i=this.handle.flush;this.handle.flush=(t,e)=>{"function"==typeof t&&(e=t,t=this.flushFlag),this.flush(t),e?.()};try{this.handle.params(t,e)}finally{this.handle.flush=i}this.handle&&(this.#t=t,this.#e=e)}}}},tK=class extends tq{#t;constructor(t){super(t,"Gzip"),this.#t=t&&!!t.portable}[tW](t){return this.#t&&(this.#t=!1,t[9]=255),super[tW](t)}},tX=class extends tq{constructor(t){super(t,"Unzip")}},tQ=class extends tY{constructor(t,e){(t=t||{}).flush=t.flush||tU.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||tU.BROTLI_OPERATION_FINISH,t.fullFlushFlag=tU.BROTLI_OPERATION_FLUSH,super(t,e)}},tJ=class extends tQ{constructor(t){super(t,"BrotliCompress")}},t0=class extends tQ{constructor(t){super(t,"BrotliDecompress")}},t1=class extends tY{constructor(t,e){(t=t||{}).flush=t.flush||tU.ZSTD_e_continue,t.finishFlush=t.finishFlush||tU.ZSTD_e_end,t.fullFlushFlag=tU.ZSTD_e_flush,super(t,e)}},t2=class extends t1{constructor(t){super(t,"ZstdCompress")}},t5=class extends t1{constructor(t){super(t,"ZstdDecompress")}},t4=t=>(255^t)&255,t8=t=>(255^t)+1&255,t3={},t6={code:()=>ei,isCode:()=>t9,isName:()=>et,name:()=>ee};for(var t7 in t6)m(t3,t7,{get:t6[t7],enumerable:!0});var t9=t=>ee.has(t),et=t=>ei.has(t),ee=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),ei=new Map(Array.from(ee).map(t=>[t[1],t[0]])),es=class{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#t="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,e=0,i,s){Buffer.isBuffer(t)?this.decode(t,e||0,i,s):t&&this.#e(t)}decode(t,e,i,s){if(e||(e=0),!t||!(t.length>=e+512))throw Error("need 512 bytes for header");this.path=i?.path??en(t,e,100),this.mode=i?.mode??s?.mode??ea(t,e+100,8),this.uid=i?.uid??s?.uid??ea(t,e+108,8),this.gid=i?.gid??s?.gid??ea(t,e+116,8),this.size=i?.size??s?.size??ea(t,e+124,12),this.mtime=i?.mtime??s?.mtime??eh(t,e+136,12),this.cksum=ea(t,e+148,12),s&&this.#e(s,!0),i&&this.#e(i);let r=en(t,e+156,1);if(t9(r)&&(this.#t=r||"0"),"0"===this.#t&&"/"===this.path.slice(-1)&&(this.#t="5"),"5"===this.#t&&(this.size=0),this.linkpath=en(t,e+157,100),"ustar\x0000"===t.subarray(e+257,e+265).toString())if(this.uname=i?.uname??s?.uname??en(t,e+265,32),this.gname=i?.gname??s?.gname??en(t,e+297,32),this.devmaj=i?.devmaj??s?.devmaj??ea(t,e+329,8)??0,this.devmin=i?.devmin??s?.devmin??ea(t,e+337,8)??0,0!==t[e+475]){let i=en(t,e+345,155);this.path=i+"/"+this.path}else{let r=en(t,e+345,130);r&&(this.path=r+"/"+this.path),this.atime=i?.atime??s?.atime??eh(t,e+476,12),this.ctime=i?.ctime??s?.ctime??eh(t,e+488,12)}let n=256;for(let i=e;i<e+148;i++)n+=t[i];for(let i=e+156;i<e+512;i++)n+=t[i];this.cksumValid=n===this.cksum,void 0===this.cksum&&256===n&&(this.nullBlock=!0)}#e(t,e=!1){Object.assign(this,Object.fromEntries(Object.entries(t).filter(([t,i])=>!(null==i||"path"===t&&e||"linkpath"===t&&e||"global"===t))))}encode(t,e=0){if(t||(t=this.block=Buffer.alloc(512)),"Unsupported"===this.#t&&(this.#t="0"),!(t.length>=e+512))throw Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,s=er(this.path||"",i),r=s[0],n=s[1];this.needPax=!!s[2],this.needPax=eb(t,e,100,r)||this.needPax,this.needPax=eu(t,e+100,8,this.mode)||this.needPax,this.needPax=eu(t,e+108,8,this.uid)||this.needPax,this.needPax=eu(t,e+116,8,this.gid)||this.needPax,this.needPax=eu(t,e+124,12,this.size)||this.needPax,this.needPax=em(t,e+136,12,this.mtime)||this.needPax,t[e+156]=Number(this.#t.codePointAt(0)),this.needPax=eb(t,e+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",e+257,8),this.needPax=eb(t,e+265,32,this.uname)||this.needPax,this.needPax=eb(t,e+297,32,this.gname)||this.needPax,this.needPax=eu(t,e+329,8,this.devmaj)||this.needPax,this.needPax=eu(t,e+337,8,this.devmin)||this.needPax,this.needPax=eb(t,e+345,i,n)||this.needPax,0!==t[e+475]?this.needPax=eb(t,e+345,155,n)||this.needPax:(this.needPax=eb(t,e+345,130,n)||this.needPax,this.needPax=em(t,e+476,12,this.atime)||this.needPax,this.needPax=em(t,e+488,12,this.ctime)||this.needPax);let h=256;for(let i=e;i<e+148;i++)h+=t[i];for(let i=e+156;i<e+512;i++)h+=t[i];return this.cksum=h,eu(t,e+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#t?this.#t:ee.get(this.#t)}get typeKey(){return this.#t}set type(t){let e=String(ei.get(t));if(t9(e)||"Unsupported"===e)this.#t=e;else if(t9(t))this.#t=t;else throw TypeError("invalid entry type: "+t)}},er=(t,i)=>{let s=t,r="",n,h=e.posix.parse(t).root||".";if(100>Buffer.byteLength(s))n=[s,r,!1];else{r=e.posix.dirname(s),s=e.posix.basename(s);do 100>=Buffer.byteLength(s)&&Buffer.byteLength(r)<=i?n=[s,r,!1]:Buffer.byteLength(s)>100&&Buffer.byteLength(r)<=i?n=[s.slice(0,99),r,!0]:(s=e.posix.join(e.posix.basename(r),s),r=e.posix.dirname(r));while(r!==h&&void 0===n)n||(n=[t.slice(0,99),"",!0])}return n},en=(t,e,i)=>t.subarray(e,e+i).toString("utf8").replace(/\0.*/,""),eh=(t,e,i)=>eo(ea(t,e,i)),eo=t=>void 0===t?void 0:new Date(1e3*t),ea=(t,e,i)=>128&Number(t[e])?(t=>{let e=t[0],i=128===e?(t=>{for(var e=t.length,i=0,s=e-1;s>-1;s--){var r=Number(t[s]);0!==r&&(i+=r*Math.pow(256,e-s-1))}return i})(t.subarray(1,t.length)):255===e?(t=>{for(var e=t.length,i=0,s=!1,r=e-1;r>-1;r--){var n,h=Number(t[r]);s?n=t4(h):0===h?n=h:(s=!0,n=t8(h)),0!==n&&(i-=n*Math.pow(256,e-r-1))}return i})(t):null;if(null===i)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(i))throw Error("parsed number outside of javascript safe integer range");return i})(t.subarray(e,e+i)):el(t,e,i),el=(t,e,i)=>{let s;return isNaN(s=parseInt(t.subarray(e,e+i).toString("utf8").replace(/\0.*$/,"").trim(),8))?void 0:s},ed={12:0x1ffffffff,8:2097151},eu=(t,e,i,s)=>void 0!==s&&(s>ed[i]||s<0?(((t,e)=>{if(Number.isSafeInteger(t))t<0?((t,e)=>{e[0]=255;var i=!1;t*=-1;for(var s=e.length;s>1;s--){var r=255&t;t=Math.floor(t/256),i?e[s-1]=t4(r):0===r?e[s-1]=0:(i=!0,e[s-1]=t8(r))}})(t,e):((t,e)=>{e[0]=128;for(var i=e.length;i>1;i--)e[i-1]=255&t,t=Math.floor(t/256)})(t,e);else throw Error("cannot encode number outside of javascript safe integer range")})(s,t.subarray(e,e+i)),!0):(ef(t,e,i,s),!1)),ef=(t,e,i,s)=>t.write(ec(s,i),e,i,"ascii"),ec=(t,e)=>ep(Math.floor(t).toString(8),e),ep=(t,e)=>(t.length===e-1?t:Array(e-t.length-1).join("0")+t+" ")+"\0",em=(t,e,i,s)=>void 0!==s&&eu(t,e,i,s.getTime()/1e3),ey=Array(156).join("\0"),eb=(t,e,i,s)=>void 0!==s&&(t.write(s+ey,e,i,"utf8"),s.length!==Buffer.byteLength(s)||s.length>i),eE=class t{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,e=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=e,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){let t=this.encodeBody();if(""===t)return Buffer.allocUnsafe(0);let i=Buffer.byteLength(t),s=512*Math.ceil(1+i/512),r=Buffer.allocUnsafe(s);for(let t=0;t<512;t++)r[t]=0;new es({path:("PaxHeader/"+(0,e.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:i,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(t,512,i,"utf8");for(let t=i+512;t<r.length;t++)r[t]=0;return r}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(void 0===this[t])return"";let e=this[t],i=" "+("dev"===t||"ino"===t||"nlink"===t?"SCHILY.":"")+t+"="+(e instanceof Date?e.getTime()/1e3:e)+`
|
|
2
|
-
`,s=Buffer.byteLength(i),r=Math.floor(Math.log(s)/Math.log(10))+1;return s+r>=Math.pow(10,r)&&(r+=1),r+s+i}static parse(e,i,s=!1){return new t(eg(ew(e),i),s)}},eg=(t,e)=>e?Object.assign({},e,t):t,ew=t=>t.replace(/\n$/,"").split(`
|
|
3
|
-
`).reduce(eR,Object.create(null)),eR=(t,e)=>{let i=parseInt(e,10);if(i!==Buffer.byteLength(e)+1)return t;let s=(e=e.slice((i+" ").length)).split("="),r=s.shift();if(!r)return t;let n=r.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),h=s.join("=");return t[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(1e3*Number(h)):/^[0-9]+$/.test(h)?+h:h,t},ev="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?t=>t:t=>t&&t.replaceAll(/\\/g,"/"),e_=class extends te{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,e,i){switch(super({}),this.pause(),this.extended=e,this.globalExtended=i,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw Error("no path provided for tar.ReadEntry");this.path=ev(t.path),this.mode=t.mode,this.mode&&(this.mode=4095&this.mode),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?ev(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,e&&this.#t(e),i&&this.#t(i,!0)}write(t){let e=t.length;if(e>this.blockRemain)throw Error("writing more to entry than is appropriate");let i=this.remain,s=this.blockRemain;return this.remain=Math.max(0,i-e),this.blockRemain=Math.max(0,s-e),!!this.ignore||(i>=e?super.write(t):super.write(t.subarray(0,i)))}#t(t,e=!1){t.path&&(t.path=ev(t.path)),t.linkpath&&(t.linkpath=ev(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter(([t,i])=>!(null==i||"path"===t&&e))))}},eS=(t,e,i,s={})=>{t.file&&(s.file=t.file),t.cwd&&(s.cwd=t.cwd),s.code=i instanceof Error&&i.code||e,s.tarCode=e,t.strict||!1===s.recoverable?i instanceof Error?t.emit("error",Object.assign(i,s)):t.emit("error",Object.assign(Error(`${e}: ${i}`),s)):(i instanceof Error&&(s=Object.assign(i,s),i=i.message),t.emit("warn",e,i,s))},eO=Buffer.from([31,139]),eT=Buffer.from([40,181,47,253]),ek=Math.max(eO.length,eT.length),eL=Symbol("state"),ex=Symbol("writeEntry"),eA=Symbol("readEntry"),eN=Symbol("nextEntry"),eD=Symbol("processEntry"),eI=Symbol("extendedHeader"),eC=Symbol("globalExtendedHeader"),eB=Symbol("meta"),eM=Symbol("emitMeta"),eF=Symbol("buffer"),eP=Symbol("queue"),ez=Symbol("ended"),eU=Symbol("emittedEnd"),ej=Symbol("emit"),eH=Symbol("unzip"),eZ=Symbol("consumeChunk"),eG=Symbol("consumeChunkSub"),eW=Symbol("consumeBody"),e$=Symbol("consumeMeta"),eV=Symbol("consumeHeader"),eY=Symbol("consuming"),eq=Symbol("bufferConcat"),eK=Symbol("maybeEnd"),eX=Symbol("writing"),eQ=Symbol("aborted"),eJ=Symbol("onDone"),e0=Symbol("sawValidEntry"),e1=Symbol("sawNullBlock"),e2=Symbol("sawEOF"),e5=Symbol("closeStream"),e4=()=>!0,e8=class extends s.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[eP]=[];[eF];[eA];[ex];[eL]="begin";[eB]="";[eI];[eC];[ez]=!1;[eH];[eQ]=!1;[e0];[e1]=!1;[e2]=!1;[eX]=!1;[eY]=!1;[eU]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(eJ,()=>{("begin"===this[eL]||!1===this[e0])&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),t.ondone?this.on(eJ,t.ondone):this.on(eJ,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||1048576,this.filter="function"==typeof t.filter?t.filter:e4;let e=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=t.gzip||t.zstd||void 0===t.brotli?!!e&&void 0:t.brotli;let i=t.file&&(t.file.endsWith(".tar.zst")||t.file.endsWith(".tzst"));this.zstd=t.gzip||t.brotli||void 0===t.zstd?!!i||void 0:t.zstd,this.on("end",()=>this[e5]()),"function"==typeof t.onwarn&&this.on("warn",t.onwarn),"function"==typeof t.onReadEntry&&this.on("entry",t.onReadEntry)}warn(t,e,i={}){eS(this,t,e,i)}[eV](t,e){let i;void 0===this[e0]&&(this[e0]=!1);try{i=new es(t,e,this[eI],this[eC])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(i.nullBlock)this[e1]?(this[e2]=!0,"begin"===this[eL]&&(this[eL]="header"),this[ej]("eof")):(this[e1]=!0,this[ej]("nullBlock"));else if(this[e1]=!1,i.cksumValid)if(i.path){let t=i.type;if(/^(Symbolic)?Link$/.test(t)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(/^(Symbolic)?Link$/.test(t)||/^(Global)?ExtendedHeader$/.test(t)||!i.linkpath){let t=this[ex]=new e_(i,this[eI],this[eC]);if(!this[e0])if(t.remain){let e=()=>{t.invalid||(this[e0]=!0)};t.on("end",e)}else this[e0]=!0;t.meta?t.size>this.maxMetaEntrySize?(t.ignore=!0,this[ej]("ignoredEntry",t),this[eL]="ignore",t.resume()):t.size>0&&(this[eB]="",t.on("data",t=>this[eB]+=t),this[eL]="meta"):(this[eI]=void 0,t.ignore=t.ignore||!this.filter(t.path,t),t.ignore?(this[ej]("ignoredEntry",t),this[eL]=t.remain?"ignore":"header",t.resume()):(t.remain?this[eL]="body":(this[eL]="header",t.end()),this[eA]?this[eP].push(t):(this[eP].push(t),this[eN]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i})}[e5](){queueMicrotask(()=>this.emit("close"))}[eD](t){let e=!0;if(t)if(Array.isArray(t)){let[e,...i]=t;this.emit(e,...i)}else this[eA]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",()=>this[eN]()),e=!1);else this[eA]=void 0,e=!1;return e}[eN](){do;while(this[eD](this[eP].shift()))if(0===this[eP].length){let t=this[eA];!t||t.flowing||t.size===t.remain?this[eX]||this.emit("drain"):t.once("drain",()=>this.emit("drain"))}}[eW](t,e){let i=this[ex];if(!i)throw Error("attempt to consume body without entry??");let s=i.blockRemain??0,r=s>=t.length&&0===e?t:t.subarray(e,e+s);return i.write(r),i.blockRemain||(this[eL]="header",this[ex]=void 0,i.end()),r.length}[e$](t,e){let i=this[ex],s=this[eW](t,e);return!this[ex]&&i&&this[eM](i),s}[ej](t,e,i){0!==this[eP].length||this[eA]?this[eP].push([t,e,i]):this.emit(t,e,i)}[eM](t){switch(this[ej]("meta",this[eB]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[eI]=eE.parse(this[eB],this[eI],!1);break;case"GlobalExtendedHeader":this[eC]=eE.parse(this[eB],this[eC],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let t=this[eI]??Object.create(null);this[eI]=t,t.path=this[eB].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let t=this[eI]||Object.create(null);this[eI]=t,t.linkpath=this[eB].replace(/\0.*/,"");break}default:throw Error("unknown meta: "+t.type)}}abort(t){this[eQ]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,e,i){if("function"==typeof e&&(i=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this[eQ])return i?.(),!1;if((void 0===this[eH]||void 0===this.brotli&&!1===this[eH])&&t){if(this[eF]&&(t=Buffer.concat([this[eF],t]),this[eF]=void 0),t.length<ek)return this[eF]=t,i?.(),!0;for(let e=0;void 0===this[eH]&&e<eO.length;e++)t[e]!==eO[e]&&(this[eH]=!1);let e=!1;if(!1===this[eH]&&!1!==this.zstd){e=!0;for(let i=0;i<eT.length;i++)if(t[i]!==eT[i]){e=!1;break}}let s=void 0===this.brotli&&!e;if(!1===this[eH]&&s)if(t.length<512)if(!this[ez])return this[eF]=t,i?.(),!0;else this.brotli=!0;else try{new es(t.subarray(0,512)),this.brotli=!1}catch{this.brotli=!0}if(void 0===this[eH]||!1===this[eH]&&(this.brotli||e)){let s=this[ez];this[ez]=!1,this[eH]=void 0===this[eH]?new tX({}):e?new t5({}):new t0({}),this[eH].on("data",t=>this[eZ](t)),this[eH].on("error",t=>this.abort(t)),this[eH].on("end",()=>{this[ez]=!0,this[eZ]()}),this[eX]=!0;let r=!!this[eH][s?"end":"write"](t);return this[eX]=!1,i?.(),r}}this[eX]=!0,this[eH]?this[eH].write(t):this[eZ](t),this[eX]=!1;let s=!(this[eP].length>0)&&(!this[eA]||this[eA].flowing);return s||0!==this[eP].length||this[eA]?.once("drain",()=>this.emit("drain")),i?.(),s}[eq](t){t&&!this[eQ]&&(this[eF]=this[eF]?Buffer.concat([this[eF],t]):t)}[eK](){if(this[ez]&&!this[eU]&&!this[eQ]&&!this[eY]){this[eU]=!0;let t=this[ex];if(t&&t.blockRemain){let e=this[eF]?this[eF].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`,{entry:t}),this[eF]&&t.write(this[eF]),t.end()}this[ej](eJ)}}[eZ](t){if(this[eY]&&t)this[eq](t);else if(t||this[eF]){if(t){if(this[eY]=!0,this[eF]){this[eq](t);let e=this[eF];this[eF]=void 0,this[eG](e)}else this[eG](t);for(;this[eF]&&this[eF]?.length>=512&&!this[eQ]&&!this[e2];){let t=this[eF];this[eF]=void 0,this[eG](t)}this[eY]=!1}}else this[eK]();(!this[eF]||this[ez])&&this[eK]()}[eG](t){let e=0,i=t.length;for(;e+512<=i&&!this[eQ]&&!this[e2];)switch(this[eL]){case"begin":case"header":this[eV](t,e),e+=512;break;case"ignore":case"body":e+=this[eW](t,e);break;case"meta":e+=this[e$](t,e);break;default:throw Error("invalid state: "+this[eL])}e<i&&(this[eF]=this[eF]?Buffer.concat([t.subarray(e),this[eF]]):t.subarray(e))}end(t,e,i){return"function"==typeof t&&(i=t,e=void 0,t=void 0),"function"==typeof e&&(i=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e)),i&&this.once("finish",i),this[eQ]||(this[eH]?(t&&this[eH].write(t),this[eH].end()):(this[ez]=!0,(void 0===this.brotli||void 0===this.zstd)&&(t=t||Buffer.alloc(0)),t&&this.write(t),this[eK]())),this}},e3=t=>{let e=t.length-1,i=-1;for(;e>-1&&"/"===t.charAt(e);)i=e,e--;return -1===i?t:t.slice(0,i)},e6=(t,e)=>{let i=new Map(e.map(t=>[e3(t),!0])),s=t.filter,r=(t,e="")=>{let s=e||(0,a.parse)(t).root||".",n;if(t===s)n=!1;else{let e=i.get(t);n=void 0!==e?e:r((0,a.dirname)(t),s)}return i.set(t,n),n};t.filter=s?(t,e)=>s(t,e)&&r(e3(t)):t=>r(e3(t))},e7=tP(t=>{let e=new e8(t),s=t.file,r;try{r=i.default.openSync(s,"r");let n=i.default.fstatSync(r),h=t.maxReadSize||0x1000000;if(n.size<h){let t=Buffer.allocUnsafe(n.size),s=i.default.readSync(r,t,0,n.size,0);e.end(s===t.byteLength?t:t.subarray(0,s))}else{let t=0,s=Buffer.allocUnsafe(h);for(;t<n.size;){let n=i.default.readSync(r,s,0,h,t);if(0===n)break;t+=n,e.write(s.subarray(0,n))}e.end()}}finally{if("number"==typeof r)try{i.default.closeSync(r)}catch{}}},(t,e)=>{let s=new e8(t),r=t.maxReadSize||0x1000000,n=t.file;return new Promise((t,e)=>{s.on("error",e),s.on("end",t),i.default.stat(n,(t,i)=>{if(t)e(t);else{let t=new tN(n,{readSize:r,size:i.size});t.on("error",e),t.pipe(s)}})})},t=>new e8(t),t=>new e8(t),(t,e)=>{let i;e?.length&&e6(t,e),t.noResume||(i=t.onReadEntry,t.onReadEntry=i?t=>{i(t),t.resume()}:t=>t.resume())}),e9=(t,e,i)=>(t&=4095,i&&(t=(384|t)&-19),e&&(256&t&&(t|=64),32&t&&(t|=8),4&t&&(t|=1)),t),{isAbsolute:it,parse:ie}=e.win32,ii=t=>{let e="",i=ie(t);for(;it(t)||i.root;){let s="/"===t.charAt(0)&&"//?/"!==t.slice(0,4)?"/":i.root;t=t.slice(s.length),e+=s,i=ie(t)}return[e,t]},is=["|","<",">","?",":"],ir=is.map(t=>String.fromCodePoint(61440+Number(t.codePointAt(0)))),ih=new Map(is.map((t,e)=>[t,ir[e]])),io=new Map(ir.map((t,e)=>[t,is[e]])),ia=t=>is.reduce((t,e)=>t.split(e).join(ih.get(e)),t),il=(t,e)=>e?(t=ev(t).replace(/^\.(\/|$)/,""),e3(e)+"/"+t):ev(t),id=Symbol("process"),iu=Symbol("file"),ic=Symbol("directory"),ip=Symbol("symlink"),im=Symbol("hardlink"),iy=Symbol("header"),ib=Symbol("read"),iE=Symbol("lstat"),ig=Symbol("onlstat"),iw=Symbol("onread"),iR=Symbol("onreadlink"),iv=Symbol("openfile"),i_=Symbol("onopenfile"),iS=Symbol("close"),iO=Symbol("mode"),iT=Symbol("awaitDrain"),ik=Symbol("ondrain"),iL=Symbol("prefix"),ix=class extends te{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#t=!1;constructor(t,e={}){let i=tF(e);super(),this.path=ev(t),this.portable=!!i.portable,this.maxReadSize=i.maxReadSize||0x1000000,this.linkCache=i.linkCache||new Map,this.statCache=i.statCache||new Map,this.preservePaths=!!i.preservePaths,this.cwd=ev(i.cwd||process.cwd()),this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.mtime=i.mtime,this.prefix=i.prefix?ev(i.prefix):void 0,this.onWriteEntry=i.onWriteEntry,"function"==typeof i.onwarn&&this.on("warn",i.onwarn);let s=!1;if(!this.preservePaths){let[t,e]=ii(this.path);t&&"string"==typeof e&&(this.path=e,s=t)}this.win32=!!i.win32||"win32"===process.platform,this.win32&&(this.path=(t=>ir.reduce((t,e)=>t.split(e).join(io.get(e)),t))(this.path.replaceAll(/\\/g,"/")),t=t.replaceAll(/\\/g,"/")),this.absolute=ev(i.absolute||a.default.resolve(this.cwd,t)),""===this.path&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path});let r=this.statCache.get(this.absolute);r?this[ig](r):this[iE]()}warn(t,e,i={}){return eS(this,t,e,i)}emit(t,...e){return"error"===t&&(this.#t=!0),super.emit(t,...e)}[iE](){r.default.lstat(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[ig](e)})}[ig](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=iD(t),this.emit("stat",t),this[id]()}[id](){switch(this.type){case"File":return this[iu]();case"Directory":return this[ic]();case"SymbolicLink":return this[ip]();default:return this.end()}}[iO](t){return e9(t,"Directory"===this.type,this.portable)}[iL](t){return il(t,this.prefix)}[iy](){if(!this.stat)throw Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new es({path:this[iL](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[iL](this.linkpath):this.linkpath,mode:this[iO](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new eE({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[iL](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[iL](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let t=this.header?.block;if(!t)throw Error("failed to encode header");super.write(t)}[ic](){if(!this.stat)throw Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[iy](),this.end()}[ip](){r.default.readlink(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[iR](e)})}[iR](t){this.linkpath=ev(t),this[iy](),this.end()}[im](t){if(!this.stat)throw Error("cannot create link entry without stat");this.type="Link",this.linkpath=ev(a.default.relative(this.cwd,t)),this.stat.size=0,this[iy](),this.end()}[iu](){if(!this.stat)throw Error("cannot create file entry without stat");if(this.stat.nlink>1){let t=`${this.stat.dev}:${this.stat.ino}`,e=this.linkCache.get(t);if(e?.indexOf(this.cwd)===0)return this[im](e);this.linkCache.set(t,this.absolute)}if(this[iy](),0===this.stat.size)return this.end();this[iv]()}[iv](){r.default.open(this.absolute,"r",(t,e)=>{if(t)return this.emit("error",t);this[i_](e)})}[i_](t){if(this.fd=t,this.#t)return this[iS]();if(!this.stat)throw Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let e=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(e),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[ib]()}[ib](){let{fd:t,buf:e,offset:i,length:s,pos:n}=this;if(void 0===t||void 0===e)throw Error("cannot read file without first opening");r.default.read(t,e,i,s,n,(t,e)=>{if(t)return this[iS](()=>this.emit("error",t));this[iw](e)})}[iS](t=()=>{}){void 0!==this.fd&&r.default.close(this.fd,t)}[iw](t){if(t<=0&&this.remain>0){let t=Object.assign(Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[iS](()=>this.emit("error",t))}if(t>this.remain){let t=Object.assign(Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[iS](()=>this.emit("error",t))}if(!this.buf)throw Error("should have created buffer prior to reading");if(t===this.remain)for(let e=t;e<this.length&&t<this.blockRemain;e++)this.buf[e+this.offset]=0,t++,this.remain++;let e=0===this.offset&&t===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+t);this.write(e)?this[ik]():this[iT](()=>this[ik]())}[iT](t){this.once("drain",t)}write(t,e,i){if("function"==typeof e&&(i=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this.blockRemain<t.length){let t=Object.assign(Error("writing more data than expected"),{path:this.absolute});return this.emit("error",t)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t,null,i)}[ik](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[iS](t=>t?this.emit("error",t):this.end());if(!this.buf)throw Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[ib]()}},iA=class extends ix{sync=!0;[iE](){this[ig](r.default.lstatSync(this.absolute))}[ip](){this[iR](r.default.readlinkSync(this.absolute))}[iv](){this[i_](r.default.openSync(this.absolute,"r"))}[ib](){let t=!0;try{let{fd:e,buf:i,offset:s,length:n,pos:h}=this;if(void 0===e||void 0===i)throw Error("fd and buf must be set in READ method");let o=r.default.readSync(e,i,s,n,h);this[iw](o),t=!1}finally{if(t)try{this[iS](()=>{})}catch{}}}[iT](t){t()}[iS](t=()=>{}){void 0!==this.fd&&r.default.closeSync(this.fd),t()}},iN=class extends te{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,e,i={}){return eS(this,t,e,i)}constructor(t,e={}){let i=tF(e);super(),this.preservePaths=!!i.preservePaths,this.portable=!!i.portable,this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.onWriteEntry=i.onWriteEntry,this.readEntry=t;let{type:s}=t;if("Unsupported"===s)throw Error("writing entry that should be ignored");this.type=s,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=i.prefix,this.path=ev(t.path),this.mode=void 0!==t.mode?this[iO](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:i.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=void 0!==t.linkpath?ev(t.linkpath):void 0,"function"==typeof i.onwarn&&this.on("warn",i.onwarn);let r=!1;if(!this.preservePaths){let[t,e]=ii(this.path);t&&"string"==typeof e&&(this.path=e,r=t)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new es({path:this[iL](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[iL](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path}),this.header.encode()&&!this.noPax&&super.write(new eE({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[iL](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[iL](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let n=this.header?.block;if(!n)throw Error("failed to encode header");super.write(n),t.pipe(this)}[iL](t){return il(t,this.prefix)}[iO](t){return e9(t,"Directory"===this.type,this.portable)}write(t,e,i){"function"==typeof e&&(i=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8"));let s=t.length;if(s>this.blockRemain)throw Error("writing more to entry than is appropriate");return this.blockRemain-=s,super.write(t,i)}end(t,e,i){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof t&&(i=t,e=void 0,t=void 0),"function"==typeof e&&(i=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e??"utf8")),i&&this.once("finish",i),t?super.end(t,i):super.end(i),this}},iD=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported",iI=class t{tail;head;length=0;static create(e=[]){return new t(e)}constructor(t=[]){for(let e of t)this.push(e)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw Error("removing node which does not belong to this list");let e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,e}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);let e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);let e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let i=0,s=t.length;i<s;i++){var e;e=this,e.tail=new iC(t[i],e.tail,void 0,e),e.head||(e.head=e.tail),e.length++}return this.length}unshift(...t){for(var e,i=0,s=t.length;i<s;i++){e=this,e.head=new iC(t[i],void 0,e.head,e),e.tail||(e.tail=e.head),e.length++}return this.length}pop(){if(!this.tail)return;let t=this.tail.value,e=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,e.list=void 0,this.length--,t}shift(){if(!this.head)return;let t=this.head.value,e=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,e.list=void 0,this.length--,t}forEach(t,e){e=e||this;for(let i=this.head,s=0;i;s++)t.call(e,i.value,s,this),i=i.next}forEachReverse(t,e){e=e||this;for(let i=this.tail,s=this.length-1;i;s--)t.call(e,i.value,s,this),i=i.prev}get(t){let e=0,i=this.head;for(;i&&e<t;e++)i=i.next;if(e===t&&i)return i.value}getReverse(t){let e=0,i=this.tail;for(;i&&e<t;e++)i=i.prev;if(e===t&&i)return i.value}map(e,i){i=i||this;let s=new t;for(let t=this.head;t;)s.push(e.call(i,t.value,this)),t=t.next;return s}mapReverse(e,i){i=i||this;var s=new t;for(let t=this.tail;t;)s.push(e.call(i,t.value,this)),t=t.prev;return s}reduce(t,e){let i,s=this.head;if(arguments.length>1)i=e;else if(this.head)s=this.head.next,i=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var r=0;s;r++)i=t(i,s.value,r),s=s.next;return i}reduceReverse(t,e){let i,s=this.tail;if(arguments.length>1)i=e;else if(this.tail)s=this.tail.prev,i=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(let e=this.length-1;s;e--)i=t(i,s.value,e),s=s.prev;return i}toArray(){let t=Array(this.length);for(let e=0,i=this.head;i;e++)t[e]=i.value,i=i.next;return t}toArrayReverse(){let t=Array(this.length);for(let e=0,i=this.tail;i;e++)t[e]=i.value,i=i.prev;return t}slice(e=0,i=this.length){i<0&&(i+=this.length),e<0&&(e+=this.length);let s=new t;if(i<e||i<0)return s;e<0&&(e=0),i>this.length&&(i=this.length);let r=this.head,n=0;for(n=0;r&&n<e;n++)r=r.next;for(;r&&n<i;n++,r=r.next)s.push(r.value);return s}sliceReverse(e=0,i=this.length){i<0&&(i+=this.length),e<0&&(e+=this.length);let s=new t;if(i<e||i<0)return s;e<0&&(e=0),i>this.length&&(i=this.length);let r=this.length,n=this.tail;for(;n&&r>i;r--)n=n.prev;for(;n&&r>e;r--,n=n.prev)s.push(n.value);return s}splice(t,e=0,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let s=this.head;for(let e=0;s&&e<t;e++)s=s.next;let r=[];for(let t=0;s&&t<e;t++)r.push(s.value),s=this.removeNode(s);for(let t of(s?s!==this.tail&&(s=s.prev):s=this.tail,i))s=function(t,e,i){let s=e?e.next:t.head,r=new iC(i,e,s,t);return void 0===r.next&&(t.tail=r),void 0===r.prev&&(t.head=r),t.length++,r}(this,s,t);return r}reverse(){let t=this.head,e=this.tail;for(let e=t;e;e=e.prev){let t=e.prev;e.prev=e.next,e.next=t}return this.head=e,this.tail=t,this}},iC=class{list;next;prev;value;constructor(t,e,i,s){this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=void 0,i?(i.prev=this,this.next=i):this.next=void 0}},iB=class{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(t,e){this.path=t||"./",this.absolute=e}},iM=Buffer.alloc(1024),iF=Symbol("onStat"),iP=Symbol("ended"),iz=Symbol("queue"),iU=Symbol("current"),ij=Symbol("process"),iH=Symbol("processing"),iZ=Symbol("processJob"),iG=Symbol("jobs"),iW=Symbol("jobDone"),i$=Symbol("addFSEntry"),iV=Symbol("addTarEntry"),iY=Symbol("stat"),iq=Symbol("readdir"),iK=Symbol("onreaddir"),iX=Symbol("pipe"),iQ=Symbol("entry"),iJ=Symbol("entryOpt"),i0=Symbol("writeEntryClass"),i1=Symbol("write"),i2=Symbol("ondrain"),i5=class extends te{sync=!1;opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[i0];onWriteEntry;[iz];[iG]=0;[iH]=!1;[iP]=!1;constructor(t={}){if(super(),this.opt=t,this.file=t.file||"",this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=ev(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this.onWriteEntry=t.onWriteEntry,this[i0]=ix,"function"==typeof t.onwarn&&this.on("warn",t.onwarn),this.portable=!!t.portable,t.gzip||t.brotli||t.zstd){if(+!!t.gzip+ +!!t.brotli+ +!!t.zstd>1)throw TypeError("gzip, brotli, zstd are mutually exclusive");if(t.gzip&&("object"!=typeof t.gzip&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new tK(t.gzip)),t.brotli&&("object"!=typeof t.brotli&&(t.brotli={}),this.zip=new tJ(t.brotli)),t.zstd&&("object"!=typeof t.zstd&&(t.zstd={}),this.zip=new t2(t.zstd)),!this.zip)throw Error("impossible");let e=this.zip;e.on("data",t=>super.write(t)),e.on("end",()=>super.end()),e.on("drain",()=>this[i2]()),this.on("resume",()=>e.resume())}else this.on("drain",this[i2]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter="function"==typeof t.filter?t.filter:()=>!0,this[iz]=new iI,this[iG]=0,this.jobs=Number(t.jobs)||4,this[iH]=!1,this[iP]=!1}[i1](t){return super.write(t)}add(t){return this.write(t),this}end(t,e,i){return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e=void 0),t&&this.add(t),this[iP]=!0,this[ij](),i&&i(),this}write(t){if(this[iP])throw Error("write after end");return t instanceof e_?this[iV](t):this[i$](t),this.flowing}[iV](t){let e=ev(a.default.resolve(this.cwd,t.path));if(this.filter(t.path,t)){let i=new iB(t.path,e);i.entry=new iN(t,this[iJ](i)),i.entry.on("end",()=>this[iW](i)),this[iG]+=1,this[iz].push(i)}else t.resume();this[ij]()}[i$](t){let e=ev(a.default.resolve(this.cwd,t));this[iz].push(new iB(t,e)),this[ij]()}[iY](t){t.pending=!0,this[iG]+=1;let e=this.follow?"stat":"lstat";r.default[e](t.absolute,(e,i)=>{t.pending=!1,this[iG]-=1,e?this.emit("error",e):this[iF](t,i)})}[iF](t,e){this.statCache.set(t.absolute,e),t.stat=e,this.filter(t.path,e)?e.isFile()&&e.nlink>1&&t===this[iU]&&!this.linkCache.get(`${e.dev}:${e.ino}`)&&!this.sync&&this[iZ](t):t.ignore=!0,this[ij]()}[iq](t){t.pending=!0,this[iG]+=1,r.default.readdir(t.absolute,(e,i)=>{if(t.pending=!1,this[iG]-=1,e)return this.emit("error",e);this[iK](t,i)})}[iK](t,e){this.readdirCache.set(t.absolute,e),t.readdir=e,this[ij]()}[ij](){if(!this[iH]){this[iH]=!0;for(let t=this[iz].head;t&&this[iG]<this.jobs;t=t.next)if(this[iZ](t.value),t.value.ignore){let e=t.next;this[iz].removeNode(t),t.next=e}this[iH]=!1,this[iP]&&0===this[iz].length&&0===this[iG]&&(this.zip?this.zip.end(iM):(super.write(iM),super.end()))}}get[iU](){return this[iz]&&this[iz].head&&this[iz].head.value}[iW](t){this[iz].shift(),this[iG]-=1,this[ij]()}[iZ](t){if(!t.pending){if(t.entry){t!==this[iU]||t.piped||this[iX](t);return}if(!t.stat){let e=this.statCache.get(t.absolute);e?this[iF](t,e):this[iY](t)}if(t.stat&&!t.ignore){if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){let e=this.readdirCache.get(t.absolute);if(e?this[iK](t,e):this[iq](t),!t.readdir)return}if(t.entry=this[iQ](t),!t.entry){t.ignore=!0;return}t!==this[iU]||t.piped||this[iX](t)}}}[iJ](t){return{onwarn:(t,e,i)=>this.warn(t,e,i),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[iQ](t){this[iG]+=1;try{return new this[i0](t.path,this[iJ](t)).on("end",()=>this[iW](t)).on("error",t=>this.emit("error",t))}catch(t){this.emit("error",t)}}[i2](){this[iU]&&this[iU].entry&&this[iU].entry.resume()}[iX](t){t.piped=!0,t.readdir&&t.readdir.forEach(e=>{let i=t.path,s="./"===i?"":i.replace(/\/*$/,"/");this[i$](s+e)});let e=t.entry,i=this.zip;if(!e)throw Error("cannot pipe without source");i?e.on("data",t=>{i.write(t)||e.pause()}):e.on("data",t=>{super.write(t)||e.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,e,i={}){eS(this,t,e,i)}},i4=class extends i5{sync=!0;constructor(t){super(t),this[i0]=iA}pause(){}resume(){}[iY](t){let e=this.follow?"statSync":"lstatSync";this[iF](t,r.default[e](t.absolute))}[iq](t){this[iK](t,r.default.readdirSync(t.absolute))}[iX](t){let e=t.entry,i=this.zip;if(t.readdir&&t.readdir.forEach(e=>{let i=t.path,s="./"===i?"":i.replace(/\/*$/,"/");this[i$](s+e)}),!e)throw Error("Cannot pipe without source");i?e.on("data",t=>{i.write(t)}):e.on("data",t=>{super[i1](t)})}},i8=(t,i)=>{i.forEach(i=>{"@"===i.charAt(0)?e7({file:e.default.resolve(t.cwd,i.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(i)}),t.end()},i3=async(t,i)=>{for(let s of i)"@"===s.charAt(0)?await e7({file:e.default.resolve(String(t.cwd),s.slice(1)),noResume:!0,onReadEntry:e=>{t.add(e)}}):t.add(s);t.end()};tP((t,e)=>{let i=new i4(t),s=new tC(t.file,{mode:t.mode||438});i.pipe(s),i8(i,e)},(t,e)=>{let i=new i5(t),s=new tI(t.file,{mode:t.mode||438});i.pipe(s);let r=new Promise((t,e)=>{s.on("error",e),s.on("close",t),i.on("error",e)});return i3(i,e).catch(t=>i.emit("error",t)),r},(t,e)=>{let i=new i4(t);return i8(i,e),i},(t,e)=>{let i=new i5(t);return i3(i,e).catch(t=>i.emit("error",t)),i},(t,e)=>{if(!e?.length)throw TypeError("no paths specified to add to archive")});var i6="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:i7,O_NOFOLLOW:i9,O_TRUNC:st,O_WRONLY:se}=r.default.constants,si=Number(process.env.__FAKE_FS_O_FILENAME__)||r.default.constants.UV_FS_O_FILEMAP||0,ss=si|st|i7|se,sr=i6||"number"!=typeof i9?null:i9|st|i7|se,sn=null!==sr?()=>sr:i6&&si?t=>t<524288?ss:"w":()=>"w",sh=(t,e,s)=>{try{return i.default.lchownSync(t,e,s)}catch(t){if(t?.code!=="ENOENT")throw t}},so=(t,e,s,r)=>{i.default.lchown(t,e,s,t=>{r(t&&t?.code!=="ENOENT"?t:null)})},sa=(t,i,s,r,n)=>{i.isDirectory()?sl(e.default.resolve(t,i.name),s,r,h=>{if(h)return n(h);so(e.default.resolve(t,i.name),s,r,n)}):so(e.default.resolve(t,i.name),s,r,n)},sl=(t,e,s,r)=>{i.default.readdir(t,{withFileTypes:!0},(i,n)=>{if(i){if("ENOENT"===i.code)return r();if("ENOTDIR"!==i.code&&"ENOTSUP"!==i.code)return r(i)}if(i||!n.length)return so(t,e,s,r);let h=n.length,o=null,a=i=>{if(!o){if(i)return r(o=i);if(0==--h)return so(t,e,s,r)}};for(let i of n)sa(t,i,e,s,a)})},sd=(t,i,s,r)=>{i.isDirectory()&&su(e.default.resolve(t,i.name),s,r),sh(e.default.resolve(t,i.name),s,r)},su=(t,e,s)=>{let r;try{r=i.default.readdirSync(t,{withFileTypes:!0})}catch(i){if(i?.code==="ENOENT")return;if(i?.code==="ENOTDIR"||i?.code==="ENOTSUP")return sh(t,e,s);throw i}for(let i of r)sd(t,i,e,s);return sh(t,e,s)},sf=class extends Error{path;code;syscall="chdir";constructor(t,e){super(`${e}: Cannot cd into '${t}'`),this.path=t,this.code=e}get name(){return"CwdError"}},sc=class extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,e){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=e}get name(){return"SymlinkError"}},sp=(t,s,r,n,h,o,a)=>{if(0===s.length)return a(null,o);let l=s.shift(),d=ev(e.default.resolve(t+"/"+l));i.default.mkdir(d,r,sm(d,s,r,n,h,o,a))},sm=(t,e,s,r,n,h,o)=>a=>{a?i.default.lstat(t,(l,d)=>{if(l)l.path=l.path&&ev(l.path),o(l);else if(d.isDirectory())sp(t,e,s,r,n,h,o);else if(r)i.default.unlink(t,a=>{if(a)return o(a);i.default.mkdir(t,s,sm(t,e,s,r,n,h,o))});else{if(d.isSymbolicLink())return o(new sc(t,t+"/"+e.join("/")));o(a)}}):(h=h||t,sp(t,e,s,r,n,h,o))},sy=Object.create(null),sb=new Set,sE="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),sg=class{#t=new Map;#e=new Map;#i=new Set;reserve(t,i){let s=new Set((t=sE?["win32 parallelization disabled"]:t.map(t=>e3((0,e.join)((t=>{sb.has(t)?sb.delete(t):sy[t]=t.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"),sb.add(t);let e=sy[t],i=sb.size-1e4;if(i>1e3){for(let t of sb)if(sb.delete(t),delete sy[t],--i<=0)break}return e})(t))))).map(t=>t.split("/").slice(0,-1).reduce((t,i)=>{let s=t.at(-1);return void 0!==s&&(i=(0,e.join)(s,i)),t.push(i||"/"),t},[])).reduce((t,e)=>t.concat(e)));for(let e of(this.#e.set(i,{dirs:s,paths:t}),t)){let t=this.#t.get(e);t?t.push(i):this.#t.set(e,[i])}for(let t of s){let e=this.#t.get(t);if(e){let t=e.at(-1);t instanceof Set?t.add(i):e.push(new Set([i]))}else this.#t.set(t,[new Set([i])])}return this.#r(i)}#s(t){let e=this.#e.get(t);if(!e)throw Error("function does not have any path reservations");return{paths:e.paths.map(t=>this.#t.get(t)),dirs:[...e.dirs].map(t=>this.#t.get(t))}}check(t){let{paths:e,dirs:i}=this.#s(t);return e.every(e=>e&&e[0]===t)&&i.every(e=>e&&e[0]instanceof Set&&e[0].has(t))}#r(t){return!this.#i.has(t)&&!!this.check(t)&&(this.#i.add(t),t(()=>this.#n(t)),!0)}#n(t){if(!this.#i.has(t))return!1;let e=this.#e.get(t);if(!e)throw Error("invalid reservation");let{paths:i,dirs:s}=e,r=new Set;for(let e of i){let i=this.#t.get(e);if(!i||i?.[0]!==t)continue;let s=i[1];if(!s){this.#t.delete(e);continue}if(i.shift(),"function"==typeof s)r.add(s);else for(let t of s)r.add(t)}for(let e of s){let i=this.#t.get(e),s=i?.[0];if(!(!i||!(s instanceof Set)))if(1===s.size&&1===i.length){this.#t.delete(e);continue}else if(1===s.size){i.shift();let t=i[0];"function"==typeof t&&r.add(t)}else s.delete(t)}return this.#i.delete(t),r.forEach(t=>this.#r(t)),!0}},sw=Symbol("onEntry"),sR=Symbol("checkFs"),sv=Symbol("checkFs2"),s_=Symbol("isReusable"),sS=Symbol("makeFs"),sO=Symbol("file"),sT=Symbol("directory"),sk=Symbol("link"),sL=Symbol("symlink"),sx=Symbol("hardlink"),sA=Symbol("ensureNoSymlink"),sN=Symbol("unsupported"),sD=Symbol("checkPath"),sI=Symbol("stripAbsolutePath"),sC=Symbol("mkdir"),sB=Symbol("onError"),sM=Symbol("pending"),sF=Symbol("pend"),sP=Symbol("unpend"),sz=Symbol("ended"),sU=Symbol("maybeClose"),sj=Symbol("skip"),sH=Symbol("doChown"),sZ=Symbol("uid"),sG=Symbol("gid"),sW=Symbol("checkedCwd"),s$="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),sV=(t,e,i)=>void 0!==t&&t===t>>>0?t:void 0!==e&&e===e>>>0?e:i,sY=class extends e8{[sz]=!1;[sW]=!1;[sM]=0;reservations=new sg;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[sz]=!0,this[sU]()},super(t),this.transform=t.transform,this.chmod=!!t.chmod,"number"==typeof t.uid||"number"==typeof t.gid){if("number"!=typeof t.uid||"number"!=typeof t.gid)throw TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;this.preserveOwner=void 0===t.preserveOwner&&"number"!=typeof t.uid?!!(process.getuid&&0===process.getuid()):!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1024,this.forceChown=!0===t.forceChown,this.win32=!!t.win32||s$,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=ev(e.default.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?"number"==typeof t.processUmask?t.processUmask:process.umask():0,this.umask="number"==typeof t.umask?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",t=>this[sw](t))}warn(t,e,i={}){return("TAR_BAD_ARCHIVE"===t||"TAR_ABORT"===t)&&(i.recoverable=!1),super.warn(t,e,i)}[sU](){this[sz]&&0===this[sM]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[sI](t,i){let s=t[i],{type:r}=t;if(!s||this.preservePaths)return!0;let[n,h]=ii(s),o=h.replaceAll(/\\/g,"/").split("/");if(o.includes("..")||s$&&/^[a-z]:\.\.$/i.test(o[0]??"")){if("path"===i||"Link"===r)return this.warn("TAR_ENTRY_ERROR",`${i} contains '..'`,{entry:t,[i]:s}),!1;let n=e.default.posix.dirname(t.path),h=e.default.posix.normalize(e.default.posix.join(n,o.join("/")));if(h.startsWith("../")||".."===h)return this.warn("TAR_ENTRY_ERROR",`${i} escapes extraction directory`,{entry:t,[i]:s}),!1}return n&&(t[i]=String(h),this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute ${i}`,{entry:t,[i]:s})),!0}[sD](t){let i=ev(t.path),s=i.split("/");if(this.strip){if(s.length<this.strip)return!1;if("Link"===t.type){let e=ev(String(t.linkpath)).split("/");if(!(e.length>=this.strip))return!1;t.linkpath=e.slice(this.strip).join("/")}s.splice(0,this.strip),t.path=s.join("/")}if(isFinite(this.maxDepth)&&s.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:i,depth:s.length,maxDepth:this.maxDepth}),!1;if(!this[sI](t,"path")||!this[sI](t,"linkpath"))return!1;if(t.absolute=e.default.isAbsolute(t.path)?ev(e.default.resolve(t.path)):ev(e.default.resolve(this.cwd,t.path)),!this.preservePaths&&"string"==typeof t.absolute&&0!==t.absolute.indexOf(this.cwd+"/")&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:ev(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&"Directory"!==t.type&&"GNUDumpDir"!==t.type)return!1;if(this.win32){let{root:i}=e.default.win32.parse(String(t.absolute));t.absolute=i+ia(String(t.absolute).slice(i.length));let{root:s}=e.default.win32.parse(t.path);t.path=s+ia(t.path.slice(s.length))}return!0}[sw](t){if(!this[sD](t))return t.resume();switch(f.default.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=448|t.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[sR](t);default:return this[sN](t)}}[sB](t,e){"CwdError"===t.name?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:e}),this[sP](),e.resume())}[sC](t,s,r){((t,s,r)=>{t=ev(t);let n=s.umask??18,h=448|s.mode,o=(h&n)!=0,a=s.uid,l=s.gid,d="number"==typeof a&&"number"==typeof l&&(a!==s.processUid||l!==s.processGid),u=s.preserve,f=s.unlink,c=ev(s.cwd),m=(e,s)=>{e?r(e):s&&d?sl(s,a,l,t=>m(t)):o?i.default.chmod(t,h,r):r()};if(t===c){var y;return y=t,i.default.stat(y,(t,e)=>{(t||!e.isDirectory())&&(t=new sf(y,t?.code||"ENOTDIR")),m(t)})}if(u)return p.default.mkdir(t,{mode:h,recursive:!0}).then(t=>m(null,t??void 0),m);let b=ev(e.default.relative(c,t)).split("/");sp(c,b,h,f,c,void 0,m)})(ev(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:s},r)}[sH](t){return this.forceChown||this.preserveOwner&&("number"==typeof t.uid&&t.uid!==this.processUid||"number"==typeof t.gid&&t.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[sZ](t){return sV(this.uid,t.uid,this.processUid)}[sG](t){return sV(this.gid,t.gid,this.processGid)}[sO](t,e){let s="number"==typeof t.mode?4095&t.mode:this.fmode,r=new tI(String(t.absolute),{flags:sn(t.size),mode:s,autoClose:!1});r.on("error",s=>{r.fd&&i.default.close(r.fd,()=>{}),r.write=()=>!0,this[sB](s,t),e()});let n=1,h=s=>{if(s){r.fd&&i.default.close(r.fd,()=>{}),this[sB](s,t),e();return}0==--n&&void 0!==r.fd&&i.default.close(r.fd,i=>{i?this[sB](i,t):this[sP](),e()})};r.on("finish",()=>{let e=String(t.absolute),s=r.fd;if("number"==typeof s&&t.mtime&&!this.noMtime){n++;let r=t.atime||new Date,o=t.mtime;i.default.futimes(s,r,o,t=>t?i.default.utimes(e,r,o,e=>h(e&&t)):h())}if("number"==typeof s&&this[sH](t)){n++;let r=this[sZ](t),o=this[sG](t);"number"==typeof r&&"number"==typeof o&&i.default.fchown(s,r,o,t=>t?i.default.chown(e,r,o,e=>h(e&&t)):h())}h()});let o=this.transform&&this.transform(t)||t;o!==t&&(o.on("error",i=>{this[sB](i,t),e()}),t.pipe(o)),o.pipe(r)}[sT](t,e){let s="number"==typeof t.mode?4095&t.mode:this.dmode;this[sC](String(t.absolute),s,s=>{if(s){this[sB](s,t),e();return}let r=1,n=()=>{0==--r&&(e(),this[sP](),t.resume())};t.mtime&&!this.noMtime&&(r++,i.default.utimes(String(t.absolute),t.atime||new Date,t.mtime,n)),this[sH](t)&&(r++,i.default.chown(String(t.absolute),Number(this[sZ](t)),Number(this[sG](t)),n)),n()})}[sN](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[sL](t,i){let s=ev(e.default.relative(this.cwd,e.default.resolve(e.default.dirname(String(t.absolute)),String(t.linkpath)))).split("/");this[sA](t,this.cwd,s,()=>this[sk](t,String(t.linkpath),"symlink",i),e=>{this[sB](e,t),i()})}[sx](t,i){let s=ev(e.default.resolve(this.cwd,String(t.linkpath))),r=ev(String(t.linkpath)).split("/");this[sA](t,this.cwd,r,()=>this[sk](t,s,"link",i),e=>{this[sB](e,t),i()})}[sA](t,s,r,n,h){let o=r.shift();if(this.preservePaths||void 0===o)return n();let a=e.default.resolve(s,o);i.default.lstat(a,(i,s)=>i?n():s?.isSymbolicLink()?h(new sc(a,e.default.resolve(a,r.join("/")))):void this[sA](t,a,r,n,h))}[sF](){this[sM]++}[sP](){this[sM]--,this[sU]()}[sj](t){this[sP](),t.resume()}[s_](t,e){return"File"===t.type&&!this.unlink&&e.isFile()&&e.nlink<=1&&!s$}[sR](t){this[sF]();let e=[t.path];t.linkpath&&e.push(t.linkpath),this.reservations.reserve(e,e=>this[sv](t,e))}[sv](t,s){let r=t=>{s(t)},n=()=>{this[sC](this.cwd,this.dmode,e=>{if(e){this[sB](e,t),r();return}this[sW]=!0,h()})},h=()=>{if(t.absolute!==this.cwd){let i=ev(e.default.dirname(String(t.absolute)));if(i!==this.cwd)return this[sC](i,this.dmode,e=>{if(e){this[sB](e,t),r();return}o()})}o()},o=()=>{i.default.lstat(String(t.absolute),(e,s)=>{if(s&&(this.keep||this.newer&&s.mtime>(t.mtime??s.mtime))){this[sj](t),r();return}if(e||this[s_](t,s))return this[sS](null,t,r);if(s.isDirectory()){if("Directory"===t.type){let e=this.chmod&&t.mode&&(4095&s.mode)!==t.mode,n=e=>this[sS](e??null,t,r);return e?i.default.chmod(String(t.absolute),Number(t.mode),n):n()}if(t.absolute!==this.cwd)return i.default.rmdir(String(t.absolute),e=>this[sS](e??null,t,r))}if(t.absolute===this.cwd)return this[sS](null,t,r);((t,e)=>{if(!s$)return i.default.unlink(t,e);let s=t+".DELETE."+(0,c.randomBytes)(16).toString("hex");i.default.rename(t,s,t=>{if(t)return e(t);i.default.unlink(s,e)})})(String(t.absolute),e=>this[sS](e??null,t,r))})};this[sW]?h():n()}[sS](t,e,i){if(t){this[sB](t,e),i();return}switch(e.type){case"File":case"OldFile":case"ContiguousFile":return this[sO](e,i);case"Link":return this[sx](e,i);case"SymbolicLink":return this[sL](e,i);case"Directory":case"GNUDumpDir":return this[sT](e,i)}}[sk](t,e,s,r){i.default[s](e,String(t.absolute),e=>{e?this[sB](e,t):(this[sP](),t.resume()),r()})}},sq=t=>{try{return[null,t()]}catch(t){return[t,null]}},sK=class extends sY{sync=!0;[sS](t,e){return super[sS](t,e,()=>{})}[sR](t){if(!this[sW]){let e=this[sC](this.cwd,this.dmode);if(e)return this[sB](e,t);this[sW]=!0}if(t.absolute!==this.cwd){let i=ev(e.default.dirname(String(t.absolute)));if(i!==this.cwd){let e=this[sC](i,this.dmode);if(e)return this[sB](e,t)}}let[s,r]=sq(()=>i.default.lstatSync(String(t.absolute)));if(r&&(this.keep||this.newer&&r.mtime>(t.mtime??r.mtime)))return this[sj](t);if(s||this[s_](t,r))return this[sS](null,t);if(r.isDirectory()){if("Directory"===t.type){let[e]=this.chmod&&t.mode&&(4095&r.mode)!==t.mode?sq(()=>{i.default.chmodSync(String(t.absolute),Number(t.mode))}):[];return this[sS](e,t)}let[e]=sq(()=>i.default.rmdirSync(String(t.absolute)));this[sS](e,t)}let[n]=t.absolute===this.cwd?[]:sq(()=>(t=>{if(!s$)return i.default.unlinkSync(t);let e=t+".DELETE."+(0,c.randomBytes)(16).toString("hex");i.default.renameSync(t,e),i.default.unlinkSync(e)})(String(t.absolute)));this[sS](n,t)}[sO](t,e){let s="number"==typeof t.mode?4095&t.mode:this.fmode,r=s=>{let r;try{i.default.closeSync(n)}catch(t){r=t}(s||r)&&this[sB](s||r,t),e()},n;try{n=i.default.openSync(String(t.absolute),sn(t.size),s)}catch(t){return r(t)}let h=this.transform&&this.transform(t)||t;h!==t&&(h.on("error",e=>this[sB](e,t)),t.pipe(h)),h.on("data",t=>{try{i.default.writeSync(n,t,0,t.length)}catch(t){r(t)}}),h.on("end",()=>{let e=null;if(t.mtime&&!this.noMtime){let s=t.atime||new Date,r=t.mtime;try{i.default.futimesSync(n,s,r)}catch(n){try{i.default.utimesSync(String(t.absolute),s,r)}catch{e=n}}}if(this[sH](t)){let s=this[sZ](t),r=this[sG](t);try{i.default.fchownSync(n,Number(s),Number(r))}catch(n){try{i.default.chownSync(String(t.absolute),Number(s),Number(r))}catch{e=e||n}}}r(e)})}[sT](t,e){let s="number"==typeof t.mode?4095&t.mode:this.dmode,r=this[sC](String(t.absolute),s);if(r){this[sB](r,t),e();return}if(t.mtime&&!this.noMtime)try{i.default.utimesSync(String(t.absolute),t.atime||new Date,t.mtime)}catch{}if(this[sH](t))try{i.default.chownSync(String(t.absolute),Number(this[sZ](t)),Number(this[sG](t)))}catch{}e(),t.resume()}[sC](t,s){try{return((t,s)=>{t=ev(t);let r=s.umask??18,n=448|s.mode,h=(n&r)!=0,o=s.uid,a=s.gid,l="number"==typeof o&&"number"==typeof a&&(o!==s.processUid||a!==s.processGid),d=s.preserve,u=s.unlink,f=ev(s.cwd),c=e=>{e&&l&&su(e,o,a),h&&i.default.chmodSync(t,n)};if(t===f)return(t=>{let e=!1,s;try{e=i.default.statSync(t).isDirectory()}catch(t){s=t?.code}finally{if(!e)throw new sf(t,s??"ENOTDIR")}})(f),c();if(d)return c(i.default.mkdirSync(t,{mode:n,recursive:!0})??void 0);let p=ev(e.default.relative(f,t)).split("/"),m;for(let t=p.shift(),s=f;t&&(s+="/"+t);t=p.shift()){s=ev(e.default.resolve(s));try{i.default.mkdirSync(s,n),m=m||s}catch{let t=i.default.lstatSync(s);if(t.isDirectory())continue;if(u){i.default.unlinkSync(s),i.default.mkdirSync(s,n),m=m||s;continue}if(t.isSymbolicLink())return new sc(s,s+"/"+p.join("/"))}}return c(m)})(ev(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:s})}catch(t){return t}}[sA](t,s,r,n,h){if(this.preservePaths||0===r.length)return n();let o=s;for(let t of r){o=e.default.resolve(o,t);let[a,l]=sq(()=>i.default.lstatSync(o));if(a)return n();if(l.isSymbolicLink())return h(new sc(o,e.default.resolve(s,r.join("/"))))}n()}[sk](t,e,s,r){let n=`${s}Sync`;try{i.default[n](e,String(t.absolute)),r(),t.resume()}catch(e){return this[sB](e,t)}}},sX=tP(t=>{let e=new sK(t),s=t.file,r=i.default.statSync(s);new tD(s,{readSize:t.maxReadSize||0x1000000,size:r.size}).pipe(e)},(t,e)=>{let s=new sY(t),r=t.maxReadSize||0x1000000,n=t.file;return new Promise((t,e)=>{s.on("error",e),s.on("close",t),i.default.stat(n,(t,i)=>{if(t)e(t);else{let t=new tN(n,{readSize:r,size:i.size});t.on("error",e),t.pipe(s)}})})},t=>new sK(t),t=>new sY(t),(t,e)=>{e?.length&&e6(t,e)}),sQ=(t,i)=>{i.forEach(i=>{"@"===i.charAt(0)?e7({file:e.default.resolve(t.cwd,i.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(i)}),t.end()},sJ=async(t,i)=>{for(let s of i)"@"===s.charAt(0)?await e7({file:e.default.resolve(String(t.cwd),s.slice(1)),noResume:!0,onReadEntry:e=>t.add(e)}):t.add(s);t.end()},s0=tP((t,e)=>{let s=new i4(t),r=!0,n,h;try{var o,a,l,d,u;let f;try{n=i.default.openSync(t.file,"r+")}catch(e){if(e?.code==="ENOENT")n=i.default.openSync(t.file,"w+");else throw e}let c=i.default.fstatSync(n),p=Buffer.alloc(512);t:for(h=0;h<c.size;h+=512){for(let t=0,e=0;t<512;t+=e){if(e=i.default.readSync(n,p,t,p.length-t,h+t),0===h&&31===p[0]&&139===p[1])throw Error("cannot append to compressed archives");if(!e)break t}let e=new es(p);if(!e.cksumValid)break;let s=512*Math.ceil((e.size||0)/512);if(h+s+512>c.size)break;h+=s,t.mtimeCache&&e.mtime&&t.mtimeCache.set(String(e.path),e.mtime)}r=!1,o=t,a=s,l=h,d=n,u=e,f=new tC(o.file,{fd:d,start:l}),a.pipe(f),sQ(a,u)}finally{if(r)try{i.default.closeSync(n)}catch{}}},(t,e)=>{e=Array.from(e);let s=new i5(t);return new Promise((r,n)=>{s.on("error",n);let h="r+",o=(a,l)=>a&&"ENOENT"===a.code&&"r+"===h?(h="w+",i.default.open(t.file,h,o)):a||!l?n(a):void i.default.fstat(l,(h,o)=>{if(h)return i.default.close(l,()=>n(h));((e,s,r)=>{let n=(t,s)=>{t?i.default.close(e,e=>r(t)):r(null,s)},h=0;if(0===s)return n(null,0);let o=0,a=Buffer.alloc(512),l=(r,d)=>{if(r||void 0===d)return n(r);if((o+=d)<512&&d)return i.default.read(e,a,o,a.length-o,h+o,l);if(0===h&&31===a[0]&&139===a[1])return n(Error("cannot append to compressed archives"));if(o<512)return n(null,h);let u=new es(a);if(!u.cksumValid)return n(null,h);let f=512*Math.ceil((u.size??0)/512);if(h+f+512>s||(h+=f+512)>=s)return n(null,h);t.mtimeCache&&u.mtime&&t.mtimeCache.set(String(u.path),u.mtime),o=0,i.default.read(e,a,0,512,h,l)};i.default.read(e,a,0,512,h,l)})(l,o.size,(i,h)=>{if(i)return n(i);let o=new tI(t.file,{fd:l,start:h});s.pipe(o),o.on("error",n),o.on("close",r),sJ(s,e)})});i.default.open(t.file,h,o)})},()=>{throw TypeError("file is required")},()=>{throw TypeError("file is required")},(t,e)=>{if(!t.file)throw TypeError("file is required");if(t.gzip||t.brotli||t.zstd||t.file.endsWith(".br")||t.file.endsWith(".tbr"))throw TypeError("cannot append to compressed archives");if(!e?.length)throw TypeError("no paths specified to add/replace")});tP(s0.syncFile,s0.asyncFile,s0.syncNoFile,s0.asyncNoFile,(t,e=[])=>{s0.validate?.(t,e),s1(t)});var s1=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(i,s)=>e(i,s)&&!((t.mtimeCache?.get(i)??s.mtime??0)>(s.mtime??0)):(e,i)=>!((t.mtimeCache?.get(e)??i.mtime??0)>(i.mtime??0))};let s2=/^tower-(backup|auto)-\d{8}-\d{6}\.tar\.gz$/;async function s5(t){let s=(0,e.join)((0,e.dirname)(t),`_meta_tmp_${Date.now()}`);try{(0,i.mkdirSync)(s,{recursive:!0}),await sX({file:t,cwd:s,filter:t=>"metadata.json"===t});let r=(0,e.join)(s,"metadata.json");if(!(0,i.existsSync)(r))return null;return JSON.parse((0,i.readFileSync)(r,"utf-8"))}catch{return null}finally{(0,i.rmSync)(s,{recursive:!0,force:!0})}}(0,e.join)("storage","assets"),t.s(["readMetadataFromArchive",0,s5,"validateFilename",0,function(t){if(!s2.test(t))throw Error(`Invalid backup filename: ${t}`)}],605171)},119620,t=>t.a(async(e,i)=>{try{var s=t.i(855104),r=t.i(198840),n=t.i(750227),h=t.i(902157),o=t.i(192520),a=t.i(605171),l=t.i(22569),d=e([l]);async function u(e){let i=(0,r.requireLocalhost)(e);if(i)return i;try{let i=(await e.formData()).get("file");if(!i)return s.NextResponse.json({error:"No file provided"},{status:400});try{(0,a.validateFilename)(i.name)}catch{return s.NextResponse.json({error:"Invalid backup filename"},{status:400})}let r=await (0,l.getConfigValue)("system.backupDir","")||(0,o.getBackupsDir)();(0,h.mkdirSync)(r,{recursive:!0});let d=(0,n.join)(r,i.name);if((0,h.existsSync)(d))return s.NextResponse.json({error:"File already exists"},{status:409});let u=Buffer.from(await i.arrayBuffer());(0,h.writeFileSync)(d,u);let f=await (0,a.readMetadataFromArchive)(d);if(!f||!f.version){try{t.r(902157).unlinkSync(d)}catch{}return s.NextResponse.json({error:"Invalid backup archive"},{status:400})}return s.NextResponse.json({filename:i.name,metadata:f})}catch{return s.NextResponse.json({error:"Import failed"},{status:500})}}[l]=d.then?(await d)():d,t.s(["POST",0,u,"dynamic",0,"force-dynamic","runtime",0,"nodejs"]),i()}catch(t){i(t)}},!1),766434,t=>t.a(async(e,i)=>{try{var s=t.i(765876),r=t.i(675896),n=t.i(959160),h=t.i(97944),o=t.i(86757),a=t.i(204144),l=t.i(273436),d=t.i(743641),u=t.i(813766),f=t.i(840884),c=t.i(498814),p=t.i(780006),m=t.i(544432),y=t.i(772005),b=t.i(450223),E=t.i(193695);t.i(628400);var g=t.i(800071),w=t.i(119620),R=e([w]);[w]=R.then?(await R)():R;let _=new s.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/internal/backup/import/route",pathname:"/api/internal/backup/import",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/internal/backup/import/route.ts",nextConfigOutput:"standalone",userland:w}),{workAsyncStorage:S,workUnitAsyncStorage:O,serverHooks:T}=_;async function v(t,e,i){i.requestMeta&&(0,h.setRequestMeta)(t,i.requestMeta),_.isDev&&(0,h.addRequestMeta)(t,"devRequestTimingInternalsEnd",process.hrtime.bigint());let s="/api/internal/backup/import/route";s=s.replace(/\/index$/,"")||"/";let n=await _.prepare(t,e,{srcPage:s,multiZoneDraftMode:!1});if(!n)return e.statusCode=400,e.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:w,params:R,nextConfig:v,parsedUrl:S,isDraftMode:O,prerenderManifest:T,routerServerContext:k,isOnDemandRevalidate:L,revalidateOnlyGenerated:x,resolvedPathname:A,clientReferenceManifest:N,serverActionsManifest:D}=n,I=(0,l.normalizeAppPath)(s),C=!!(T.dynamicRoutes[I]||T.routes[A]),B=async()=>((null==k?void 0:k.render404)?await k.render404(t,e,S,!1):e.end("This page could not be found"),null);if(C&&!O){let t=!!T.routes[A],e=T.dynamicRoutes[I];if(e&&!1===e.fallback&&!t){if(v.adapterPath)return await B();throw new E.NoFallbackError}}let M=null;!C||_.isDev||O||(M=A,M="/index"===M?"/":M);let F=!0===_.isDev||!C,P=C&&!F;D&&N&&(0,a.setManifestsSingleton)({page:s,clientReferenceManifest:N,serverActionsManifest:D});let z=t.method||"GET",U=(0,o.getTracer)(),j=U.getActiveScopeSpan(),H=!!(null==k?void 0:k.isWrappedByNextServer),Z=!!(0,h.getRequestMeta)(t,"minimalMode"),G=(0,h.getRequestMeta)(t,"incrementalCache")||await _.getIncrementalCache(t,v,T,Z);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let W={params:R,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!v.experimental.authInterrupts},cacheComponents:!!v.cacheComponents,supportsDynamicResponse:F,incrementalCache:G,cacheLifeProfiles:v.cacheLife,waitUntil:i.waitUntil,onClose:t=>{e.on("close",t)},onAfterTaskError:void 0,onInstrumentationRequestError:(e,i,s,r)=>_.onRequestError(t,e,s,r,k)},sharedContext:{buildId:w}},$=new d.NodeNextRequest(t),V=new d.NodeNextResponse(e),Y=u.NextRequestAdapter.fromNodeNextRequest($,(0,u.signalFromNodeResponse)(e));try{let n,h=async t=>_.handle(Y,W).finally(()=>{if(!t)return;t.setAttributes({"http.status_code":e.statusCode,"next.rsc":!1});let i=U.getRootSpanAttributes();if(!i)return;if(i.get("next.span_type")!==f.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${i.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=i.get("next.route");if(r){let e=`${z} ${r}`;t.setAttributes({"next.route":r,"http.route":r,"next.span_name":e}),t.updateName(e),n&&n!==t&&(n.setAttribute("http.route",r),n.updateName(e))}else t.updateName(`${z} ${s}`)}),a=async n=>{var o,a;let l=async({previousCacheEntry:r})=>{try{if(!Z&&L&&x&&!r)return e.statusCode=404,e.setHeader("x-nextjs-cache","REVALIDATED"),e.end("This page could not be found"),null;let s=await h(n);t.fetchMetrics=W.renderOpts.fetchMetrics;let o=W.renderOpts.pendingWaitUntil;o&&i.waitUntil&&(i.waitUntil(o),o=void 0);let a=W.renderOpts.collectedTags;if(!C)return await (0,p.sendResponse)($,V,s,W.renderOpts.pendingWaitUntil),null;{let t=await s.blob(),e=(0,m.toNodeOutgoingHttpHeaders)(s.headers);a&&(e[b.NEXT_CACHE_TAGS_HEADER]=a),!e["content-type"]&&t.type&&(e["content-type"]=t.type);let i=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=b.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=b.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await t.arrayBuffer()),headers:e},cacheControl:{revalidate:i,expire:r}}}}catch(e){throw(null==r?void 0:r.isStale)&&await _.onRequestError(t,e,{routerKind:"App Router",routePath:s,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:L})},!1,k),e}},d=await _.handleResponse({req:t,nextConfig:v,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:L,revalidateOnlyGenerated:x,responseGenerator:l,waitUntil:i.waitUntil,isMinimalMode:Z});if(!C)return null;if((null==d||null==(o=d.value)?void 0:o.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(a=d.value)?void 0:a.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});Z||e.setHeader("x-nextjs-cache",L?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),O&&e.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,m.fromNodeOutgoingHttpHeaders)(d.value.headers);return Z&&C||u.delete(b.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||e.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,y.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)($,V,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};H&&j?await a(j):(n=U.getActiveScopeSpan(),await U.withPropagatedContext(t.headers,()=>U.trace(f.BaseServerSpan.handleRequest,{spanName:`${z} ${s}`,kind:o.SpanKind.SERVER,attributes:{"http.method":z,"http.target":t.url}},a),void 0,!H))}catch(e){if(e instanceof E.NoFallbackError||await _.onRequestError(t,e,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:L})},!1,k),C)throw e;return await (0,p.sendResponse)($,V,new Response(null,{status:500})),null}}t.s(["handler",0,v,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:O})},"routeModule",0,_,"serverHooks",0,T,"workAsyncStorage",0,S,"workUnitAsyncStorage",0,O]),i()}catch(t){i(t)}},!1)];
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=_0t31z6q._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[276534,e=>{"use strict";e.s(["CONFIG_DEFAULTS",0,{"git.pathMappingRules":{defaultValue:[],type:"object",label:"Git Path Mapping Rules"},"system.maxUploadBytes":{defaultValue:0x3200000,type:"number",label:"Max Upload Size (bytes)"},"system.maxConcurrentExecutions":{defaultValue:20,type:"number",label:"Max Concurrent Executions"},"system.maxReadableFileBytes":{defaultValue:5242880,type:"number",label:"Max Readable File Size (bytes)"},"system.backupDir":{defaultValue:"",type:"string",label:"Backup Directory"},"git.timeoutSec":{defaultValue:30,type:"number",label:"Git Operation Timeout (seconds)"},"search.resultLimit":{defaultValue:20,type:"number",label:"Search Result Limit"},"search.allModeCap":{defaultValue:5,type:"number",label:"All-Mode Per-Type Cap"},"search.debounceMs":{defaultValue:250,type:"number",label:"Search Debounce (ms)"},"search.snippetLength":{defaultValue:80,type:"number",label:"Snippet Length (characters)"},"search.codeTimeoutSec":{defaultValue:30,type:"number",label:"Code Search Timeout (seconds)"},"board.archiveDelayDays":{defaultValue:7,type:"number",label:"Archive Delay (days)"},"missions.grid.minCols":{defaultValue:1,type:"number",label:"Grid Min Columns"},"missions.grid.maxCols":{defaultValue:5,type:"number",label:"Grid Max Columns"},"missions.grid.minRows":{defaultValue:1,type:"number",label:"Grid Min Rows"},"missions.grid.maxRows":{defaultValue:5,type:"number",label:"Grid Max Rows"},"terminal.app":{defaultValue:"Terminal",type:"string",label:"Default Terminal App"},"editor.command":{defaultValue:"",type:"string",label:"Default Editor Command"},"terminal.wsPort":{defaultValue:3001,type:"number",label:"WebSocket Port"},"terminal.idleTimeoutSec":{defaultValue:180,type:"number",label:"Idle Timeout (seconds)"},"terminal.fontSize":{defaultValue:13,type:"number",label:"Terminal Font Size"},"terminal.fontFamily":{defaultValue:"Menlo, Monaco, 'Courier New', monospace",type:"string",label:"Terminal Font Family"},"assistant.systemPrompt":{defaultValue:'You are Tower Assistant — the built-in AI operator for the Tower task management platform.\n\n## Identity\n- You are a task management operator, NOT a coding assistant.\n- You can ONLY use Tower MCP tools. You CANNOT read files, edit code, run shell commands, or search the web.\n- Always respond in the same language the user uses.\n\n## Capabilities\nWhen users ask what you can do, respond with EXACTLY these 6 groups. Translate to the user\'s language.\n\n1. **Workspace & Project** — View, create, update, delete workspaces and projects. Search projects and repositories.\n2. **Task Management** — Create tasks (priority, labels, worktree branch isolation, sub-path, auto-start). Move task status (TODO → IN_PROGRESS → IN_REVIEW → DONE / CANCELLED). Update task info and labels.\n3. **Execution Monitor** — Start task execution, check execution status, get terminal output, send commands to running terminals.\n4. **Daily Report & Todo** — Generate daily work summary (completed + in-progress). View pending task list sorted by priority.\n5. **Labels & Notes & Assets** — Manage workspace labels, project notes, and file attachments.\n6. **Global Search** — Search tasks, projects, repositories, notes, and assets by keyword.\n\nDo NOT list any capabilities beyond the above. Do NOT mention code editing, debugging, testing, git operations, or any development capabilities.\n\n## Scope Boundary\nIf the user asks you to write code, explain code, debug, search the web, read/write files, or anything outside Tower task management, reply:\n"抱歉,我只能帮你管理工作区、项目和任务。编码、调试等操作请在任务终端中完成。"\n\n## 任务来源标注\n每次通过 create_task 创建任务时,在 description 末尾追加一段来源标注(与任务终端、飞书的来源规范一致):\n## 来源\nTower Assistant',type:"string",label:"Assistant System Prompt"},"assistant.displayMode":{defaultValue:"sidebar",type:"string",label:"Assistant Display Mode"},"assistant.communicationMode":{defaultValue:"chat",type:"string",label:"Assistant Communication Mode"},"task.defaultUseWorktree":{defaultValue:!0,type:"boolean",label:"Default: Use Worktree"},"task.defaultAutoStart":{defaultValue:!1,type:"boolean",label:"Default: Auto-start Execution"},"task.mcpDefaultsConfigured":{defaultValue:!1,type:"boolean",label:"MCP Task Defaults Configured"},"task.systemDirective":{defaultValue:"## Tower 系统说明\n你运行在 Tower(一个 AI 任务调度平台)的任务终端里,为某个具体任务而启动。你的产出会被 Tower 记录为「任务执行」,任务结束后进入 review 状态,可能被派生你的父任务或用户审阅。环境变量里有 TOWER_TASK_ID(当前任务 id)、TOWER_TASK_TITLE(任务标题)等,可用来识别自己。\n\n## 首要原则\n- **项目自身规则优先**:工作目录里项目的 CLAUDE.md / AGENTS.md 等约定优先级最高,与本声明冲突时以项目规则为准。本声明只规定「作为一个 Tower 任务」的通用行为,不覆盖具体项目的技术规范。\n- **只做任务范围内的事**:紧扣当前任务目标,不顺手改无关代码、不擅自扩大改动面。\n- **完成即验证**:有测试 / 构建 / lint / 类型检查就先跑一遍再宣称「做完」;失败如实报告,不确定就说不确定,别把没验证的当成功。\n- **长进程别占住终端**:dev server、watch 等需长时间前台运行的命令,用完即停或放后台,别让任务终端被永久卡住(Tower 的 Preview 有独立管理,通常不需要你手动起 dev server)。\n- **默认用中文回复**(除非项目或用户另有要求)。\n\n## Git 工作规则\n- 完成一段有意义的改动后,主动用清晰的 message 创建 commit(约定式:feat / fix / refactor / docs / chore…),不要留一堆未提交的改动。\n- 若当前任务运行在 Git worktree 隔离分支里(worktree 任务):**只 commit,不要 push** —— worktree 分支由 Tower 统一管理与合并。\n- 若当前任务直接在项目主工作区里(非 worktree 任务):可以 push。\n- 不确定自己是不是 worktree 任务时,默认只 commit、不 push。\n\n## 并发与协作(多任务可能同改一个仓库)\n- Tower 常同时跑多个任务、甚至同一仓库多个 worktree。**只 stage / commit 你这轮亲手改的文件**,一律 `git add <明确路径>`;禁止 `git add .` / `-A` / `-u` / `git commit -a`,别把别的窗口或用户手动的改动一并提交。\n- `git status` 里不认识、不是你改的文件一律不碰、不提交,需要时在小结里提一句即可。\n- 不 force-push、不改写共享分支历史;不对不属于你的改动做 `git reset --hard` / `git clean -fd`。\n\n## Worktree 纪律(务必防止改到主仓库)\n- 开工第一件事先跑 `pwd`:它就是你的工作根。之后所有 Read/Edit/Write/Bash 路径都以它为基准,优先用相对路径;用绝对路径时必须以这个根开头,**绝不**凭上下文/记忆里的主仓库路径去拼绝对路径——这正是历次「worktree 里看什么都没变」的根因。\n- 判断自己是不是 worktree 任务:`pwd` 落在 `.worktrees/task-$TOWER_TASK_ID` 下、或 `git branch --show-current` 为 `task/$TOWER_TASK_ID`,即是。是则严格走本节纪律。\n- 动任何文件 / 提交前,先核对三件事都成立:① `git rev-parse --show-toplevel` 等于当前 worktree 根(不是主仓库路径);② `git branch --show-current` 为 `task/$TOWER_TASK_ID`(不是 main / feature / 其它分支);③ 要改的文件绝对路径含 `.worktrees/task-$TOWER_TASK_ID/` 段。任一不满足,说明你操作到主仓库了,**立即停止、不要提交**,先纠正目录。\n- 绝不 `cd` 到主仓库或 worktree 之外去改文件 / 跑 git;所有 git 命令都在当前 worktree 根内执行(跨目录时用 `git -C <worktree 根>` 显式指定,别靠默认 cwd 猜)。\n- 万一已经改错到主仓库:把改动搬回 worktree(`git -C <worktree 根> cherry-pick <误提交>` 或重打一遍),主仓库工作区用 `git restore` 复原、误提交按情况处理——已被别的提交叠在上面就用 `git revert`(保历史、不动别人的提交),确认独占且未 push 才用 `git reset`;最后如实报告两边最终状态,不要隐瞒。\n\n## 汇报与交接\n- 产出会被 review,结尾给一段可速读的小结:做了什么、改了哪些关键文件、验证结果、还剩什么没做 / 被什么阻塞、有没有需要用户或父任务拍板的决策。\n- 真被外部因素阻塞(待接口、待素材、待人决策)就**明确说明并停下**,别反复空转或自行臆测硬做。\n- 危险 / 不可逆操作(删数据库、删大目录、`rm -rf`、`drop table`、对外发布 / 部署)先说明并征得确认再执行。\n\n## 无人值守(环境变量 TOWER_UNATTENDED=1 时尤其重要)\n- 你可能在无人盯守下运行。两个与人沟通的 MCP 工具:`ask_human`(阻塞:**记录**问题并挂起任务——本回合到此为止,人回复后自动唤醒、带答案续跑)和 `notify_human`(非阻塞:**记录**一条进度/FYI 后立即继续,不必等回复、不挂起)。**注意:这两个工具只在 Tower 内记录(/harness 面板可见),本身不把消息发给人**;无人值守下要真正通知到人,须按系统提示里「无人值守外推」段先经平台渠道把消息发出去,再调这两个工具留档。\n- 需要人拍板才能推进(选型、二义需求、缺关键信息、对外发布/部署等)→ 用 `ask_human` 把问题和可选项讲清楚,然后停下等待,别自行臆测硬做。\n- 危险 / 不可逆操作(删库、删大目录、`rm -rf`、`drop table`、force-push、对外发布)→ 一律先 `ask_human` 征得同意再执行,即使终端已放开权限也不例外。\n- 只是想同步进展或抛个 FYI、无需回复 → 用 `notify_human`,发完继续干。\n- 调用 `ask_human` 后立即结束本回合、不要再继续操作;它会关闭终端省资源,人回复后任务自动恢复。\n\n## 本轮 commit 回显\n- **每轮回复的最后,必须把本轮创建的 commit 列出来让用户一眼看到**。格式固定:先一行加粗小标题 `**本轮 commit**`(不要用 `---` 分隔线、不要用 emoji),换行后每条 commit 单独一行、以 `- ` 开头,形如 `` - `<短 hash>` <message 首行> ``(hash 用行内代码包住)。本轮没有创建任何 commit 时,只回一行 `本轮无 commit`。",type:"string",label:"Task System Directive (built-in)"},"harness.targets":{defaultValue:[],type:"object",label:"Harness Notify Targets (multi-platform registry)"},"harness.pendingTtlDays":{defaultValue:14,type:"number",label:"Harness Pending Ask TTL (days)"}}])},519827,e=>{"use strict";e.s(["ARCHIVE_DELAY_KEY",0,"board.archiveDelayDays","DEFAULT_ARCHIVE_DELAY_DAYS",0,7,"normalizeArchiveDelayDays",0,function(e){let t=Math.floor(Number(e));return Number.isFinite(t)?Math.min(Math.max(t,1),365):7}])},61920,e=>{"use strict";var t=e.i(446786),a=e.i(814747);function r(e){return e.startsWith("~/")?a.default.join(t.default.homedir(),e.slice(2)):e}function n(e){let t,a=e.match(/^git@([^:]+):(.+)$/);if(a)return{host:a[1],pathSegments:s(a[2]).split("/").filter(Boolean)};try{t=new URL(e)}catch{return null}return{host:t.hostname,pathSegments:s(decodeURIComponent(t.pathname)).split("/").filter(Boolean)}}function s(e){return e.replace(/\.git\/?$/,"")}e.s(["gitUrlToLocalPath",0,function(e){let t=e.trim();if(!t)return"";try{let e=n(t);if(!e)return"";let{host:s,pathSegments:l}=e;if("code.iflytek.com"===s){let e,t;return r((e=[...l],"osc"===e[0]&&"_source"===e[1]&&(e=e.slice(2)),((t=e.indexOf("-"))>0&&(e=e.slice(0,t)),0===e.length)?"":`~/company/${e.join("/")}`))}if("github.com"===s){var a;let e,t;return r((e=(a=l)[0],t=a[1],e&&t?`${"jp-liu"===e?"~/project/i":"~/project/f"}/${t}`:""))}let i=l[l.length-1];return i?r(`~/project/f/${i}`):""}catch{return""}},"matchGitPathRule",0,function(e,t){if(!t.length)return"";let a=e.trim();if(!a)return"";let s=n(a);if(!s)return"";let{host:l,pathSegments:i}=s,o=i[0]??"",u=i[i.length-1]??"",c=[...t].sort((e,t)=>{let a=+("*"===e.ownerMatch),r=+("*"===t.ownerMatch);return a!==r?a-r:e.priority-t.priority}),d=i.join("/");for(let e of c){if(e.host!==l||"*"!==e.ownerMatch&&e.ownerMatch!==o)continue;let t=e.localPathTemplate;if(t.includes("{path}"))return r(t.replace("{path}",d).replace("{owner}",o).replace("{repo}",u).replace(/\/+$/,""));let a=t.replace("{owner}",o).replace("{repo}","").replace(/\/+$/,"");return r(`${a}/${u}`)}return""}])},22569,e=>e.a(async(t,a)=>{try{var r=e.i(921675),n=e.i(843793),s=e.i(276534),l=e.i(519827),i=e.i(61920),o=e.i(769310),u=e.i(721390),c=e.i(86708),d=t([u]);async function m(e,t){let a=await n.db.systemConfig.findUnique({where:{key:e}});if(!a)return t;try{return JSON.parse(a.value)}catch{return t}}async function p(e,t){await n.db.systemConfig.upsert({where:{key:e},create:{key:e,value:JSON.stringify(t)},update:{value:JSON.stringify(t)}})}async function f(){let e=await m(l.ARCHIVE_DELAY_KEY,l.DEFAULT_ARCHIVE_DELAY_DAYS);return(0,l.normalizeArchiveDelayDays)(e)}async function b(e){let t=e.trim();if(!t)return{path:"",source:"empty"};try{let e=await m("git.pathMappingRules",[]),a=(0,i.matchGitPathRule)(t,e);if(a)return{path:a,source:"rule"};return{path:(0,i.gitUrlToLocalPath)(t),source:"fallback"}}catch{return{path:(0,i.gitUrlToLocalPath)(t),source:"fallback"}}}async function h(e){let{path:t}=await b(e);return t}async function y(e){let t=await n.db.systemConfig.findMany({where:{key:{in:e}}}),a=Object.fromEntries(t.map(e=>{try{return[e.key,JSON.parse(e.value)]}catch{return[e.key,null]}})),r={};for(let t of e)r[t]=t in a?a[t]:s.CONFIG_DEFAULTS[t]?.defaultValue??null;return r}async function g(){return(0,o.detectShells)()}async function w(){return(0,o.detectTerminalApps)()}async function T(){return(0,o.detectEditors)()}async function k(){return{platform:process.platform}}async function S(){let e=(0,u.getActiveWsPort)();if(null!==e)return e;let t=parseInt(process.env.PORT||"3000",10);return m("terminal.wsPort",t+1)}[u]=d.then?(await d)():d,(0,c.ensureServerEntryExports)([m,p,f,b,h,y,g,w,T,k,S]),(0,r.registerServerReference)(m,"6022dc05b858325d54679979f48ec6986b1257019b",null),(0,r.registerServerReference)(p,"600c0360fc4ce13a01e338268cc272dde1b16ec989",null),(0,r.registerServerReference)(f,"0018c44abcb186f7ba3403be069e7e9f6da8616369",null),(0,r.registerServerReference)(b,"406446cc2b798b6d5a8041b1a353ccdb1582682094",null),(0,r.registerServerReference)(h,"404ef38e3210ade662b09756d1418c29f2fab30709",null),(0,r.registerServerReference)(y,"40a8d9987d8b71ec56eef76f4a4ea0c28fdcd8edc0",null),(0,r.registerServerReference)(g,"003999071c484871321a8108440d7489c3f12e05ad",null),(0,r.registerServerReference)(w,"005c2726b05a25fd0df69e27f64e4c4d3ac62d4aeb",null),(0,r.registerServerReference)(T,"000978f807ee1c10e9f24a8760105b9a4286b20f03",null),(0,r.registerServerReference)(k,"00b51d8a985a33823255b31ad031b117cbf4d4026b",null),(0,r.registerServerReference)(S,"00bbe981391f69ab27be7d2c2adf20dcedb8f4caea",null),e.s(["getConfigValue",0,m]),a()}catch(e){a(e)}},!1)];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=src_0aqjfcv._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[53674,e=>{"use strict";e.s(["getPackageRoot",0,function(){return process.env.TOWER_PACKAGE_ROOT||process.cwd()}])},472129,e=>{"use strict";var t=e.i(902157),o=e.i(660526),s=e.i(750227),r=e.i(769310),i=e.i(53674);let n=["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 o={...e.envOverrides??{}};return{command:this.resolveCommand(),args:t,env:o}}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??{},o=(0,i.getPackageRoot)().replace(/\\/g,"/"),r=s.join(o,"scripts","tower-session-start-hook.js").replace(/\\/g,"/"),n=s.join(o,"scripts","tower-post-tool-hook.js").replace(/\\/g,"/"),a=s.join(o,"scripts","tower-stop-hook.js").replace(/\\/g,"/"),l=!1;return l=this.upsertHook(t,"SessionStart","session-start-hook.js",{hooks:[{command:`node "${r}"`,timeout:5,type:"command"}]})||l,l=this.upsertHook(t,"PostToolUse","post-tool-hook.js",{hooks:[{command:`node "${n}"`,timeout:10,type:"command"}],matcher:"Write|Edit|MultiEdit"})||l,(l=this.upsertHook(t,"Stop","stop-hook.js",{hooks:[{command:`node "${a}"`,timeout:5,type:"command"}]})||l)&&(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 repairHookPaths(){try{let e=this.readSettings(),t=e.hooks??{},o=(0,i.getPackageRoot)().replace(/\\/g,"/"),r=!1;for(let[e,i,n]of[["SessionStart","session-start-hook.js","tower-session-start-hook.js"],["PostToolUse","post-tool-hook.js","tower-post-tool-hook.js"],["Stop","stop-hook.js","tower-stop-hook.js"]]){let a=this.getHookArray(t,e),l=a.findIndex(e=>e?.hooks?.some?.(e=>e.command?.includes(i)));if(l<0)continue;let c=s.join(o,"scripts",n).replace(/\\/g,"/"),d=`node "${c}"`,m=a[l]?.hooks?.[0];m&&m.command!==d&&(m.command=d,t[e]=a,r=!0)}r&&(e.hooks=t,this.writeSettings(e))}catch{}}upsertHook(e,t,o,s){let r=this.getHookArray(e,t),i=s?.hooks?.[0]?.command,n=r.findIndex(e=>e?.hooks?.some?.(e=>e.command?.includes(o)));if(n>=0){if(r[n]?.hooks?.[0]?.command===i)return!1;r.splice(n,1)}return r.push(s),e[t]=r,!0}async uninstallHooks(){try{let e=this.readSettings(),t=e.hooks??{},o=["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=>o.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 o=t.scope??"user",s={command:e.command,args:e.args};e.env&&Object.keys(e.env).length>0&&(s.env=e.env);let r=this.resolveCommand(),i=["mcp","add-json","-s",o,e.name,JSON.stringify(s)];try{return await this.runCli(r,["mcp","remove","-s",o,e.name],t.cwd).catch(()=>{}),await this.runCli(r,i,t.cwd),{ok:!0,method:"cli",detail:`${r} ${i.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${r} ${i.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async uninstallMcp(e,t={}){let o=t.scope??"user",s=this.resolveCommand(),r=["mcp","remove","-s",o,e];try{return await this.runCli(s,r,t.cwd),{ok:!0,method:"cli",detail:`${s} ${r.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${s} ${r.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async isMcpInstalled(e,t={}){let o=this.resolveCommand();try{return await this.runCli(o,["mcp","get",e],t.cwd,5e3),!0}catch{return!1}}async installSkill(e,o){let i=s.join(this.getConfigDir(),"skills",e);try{if(!t.existsSync(o))return{ok:!1,method:"symlink",detail:i,error:`Source skill dir does not exist: ${o}`};t.mkdirSync(s.dirname(i),{recursive:!0});let e=await t.promises.lstat(i).catch(()=>null);if(e)if(!(e.isSymbolicLink()||(0,r.isWindows)()&&e.isDirectory()))return{ok:!1,method:"symlink",detail:i,error:`Refusing to overwrite non-symlink at ${i}`};else try{let e=await t.promises.readlink(i);if(s.resolve(e)===s.resolve(o))return{ok:!0,method:"symlink",detail:`${i} → ${o} (already)`};await t.promises.unlink(i)}catch{if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:i,error:`Refusing to overwrite non-symlink at ${i}`}}let n=(0,r.isWindows)()?"junction":"dir";return await t.promises.symlink(o,i,n),{ok:!0,method:"symlink",detail:`${i} → ${o}`}}catch(e){return{ok:!1,method:"symlink",detail:i,error:e instanceof Error?e.message:String(e)}}}async uninstallSkill(e){let o=s.join(this.getConfigDir(),"skills",e);try{let e=await t.promises.lstat(o).catch(()=>null);if(!e)return{ok:!0,method:"symlink",detail:`${o} (already absent)`};if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:o,error:`Refusing to remove non-symlink at ${o}`};return await t.promises.unlink(o),{ok:!0,method:"symlink",detail:o}}catch(e){return{ok:!1,method:"symlink",detail:o,error:e instanceof Error?e.message:String(e)}}}async isSkillInstalled(e,o){let r=s.join(this.getConfigDir(),"skills",e);try{if(!(await t.promises.lstat(r)).isSymbolicLink())return!1;if(!o)return!0;let e=await t.promises.readlink(r),i=s.isAbsolute(e)?e:s.resolve(s.dirname(r),e);return s.resolve(i)===s.resolve(o)}catch{return!1}}async runCli(t,o,s,r=1e4){let{execFile:i}=await e.A(482848),{promisify:n}=await e.A(268548),a=n(i),{stdout:l}=await a(t,o,{cwd:s,timeout:r});return l}async isAvailable(){return null!==await this.getVersion()}async getVersion(){try{let{execFile:t}=await e.A(144264),{promisify:o}=await e.A(534777),{resolveSpawnTarget:s}=await e.A(200628),r=o(t),i=await s(this.resolveCommand(),["--version"]),{stdout:n}=await r(i.command,i.args,{timeout:5e3});return n.trim()||null}catch{return null}}async getModels(){return n}getConfigDir(){return s.join(o.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(e){return{command:this.resolveCommand(),args:["--print",e,"--output-format","stream-json","--verbose"]}}resolveCommand(){if(process.env.CLAUDE_CODE_PATH)return process.env.CLAUDE_CODE_PATH;if((0,r.isWindows)()){let e=(0,r.resolveCommandPathSync)("claude-code");if("claude-code"!==e)return e}return(0,r.resolveCommandPathSync)("claude")}readSettings(){try{return JSON.parse(t.readFileSync(this.getSettingsPath(),"utf-8"))}catch{return{}}}writeSettings(e){let o=this.getConfigDir();t.existsSync(o)||t.mkdirSync(o,{recursive:!0}),t.writeFileSync(this.getSettingsPath(),JSON.stringify(e,null,2),"utf-8")}getHookArray(e,t){let o=e[t];return Array.isArray(o)?o:[]}hasHook(e,t){return e.some(e=>e.hooks?.some(e=>e.command?.includes(t)))}}])},279711,e=>{"use strict";class t{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,t){let o=this.providers.get(e);return o?"api"===t?o.api?.adapter??null:o.cliQuery?.adapter??null:null}getAllowedCommands(){let e=[];for(let t of this.providers.values())t.cli?.command&&e.push(t.cli.command);return e}async getAvailableProviders(){let e=[];for(let t of this.providers.values()){let o=!!t.cli&&await t.cli.adapter.isAvailable(),s=o&&t.cli?await t.cli.adapter.getVersion():null,r=!!t.api&&!!process.env[t.api.keyEnvVar],i=!!t.api&&r;e.push({name:t.name,displayName:t.displayName,cli:{available:o,version:s},api:{available:i,keyConfigured:r}})}return e}}var o=e.i(472129),s=e.i(902157),r=e.i(660526),i=e.i(750227),n=e.i(769310),a=e.i(53674);let l=["o4-mini","o3","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","codex-mini-latest"],c=globalThis;if(!c.__providerRegistry){let d=new t;d.register({name:"claude",displayName:"Claude Code",agentFieldValue:"CLAUDE_CODE",cli:{command:"claude",adapter:new o.ClaudeCliAdapter},models:{cli:["sonnet","opus","haiku","claude-sonnet-4-6","claude-opus-4-6","claude-haiku-4-5-20251001"],api:[]}}),d.register({name:"codex",displayName:"Codex CLI",agentFieldValue:"CODEX_CLI",cli:{command:"codex",adapter:new class t{buildSpawnArgs(e){let t=[];e.resumeSessionId?t.push("resume",e.resumeSessionId):e.continueLatest?t.push("resume","--last"):(t.push("--full-auto"),e.extraArgs?.length&&t.push(...e.extraArgs),e.prompt&&t.push(e.prompt));let o={...e.envOverrides??{}};return{command:this.resolveCommand(),args:t,env:o}}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.readHooks(),t=(0,a.getPackageRoot)().replace(/\\/g,"/"),o=i.join(t,"scripts","tower-session-start-hook.js").replace(/\\/g,"/"),s=i.join(t,"scripts","tower-post-tool-hook.js").replace(/\\/g,"/"),r=i.join(t,"scripts","tower-stop-hook.js").replace(/\\/g,"/"),n=!1;return n=this.upsertHook(e,"SessionStart","session-start-hook.js",{hooks:[{command:`node "${o}"`,timeout:5,type:"command"}]})||n,n=this.upsertHook(e,"PostToolUse","post-tool-hook.js",{hooks:[{command:`node "${s}"`,timeout:10,type:"command"}],matcher:"Write|Edit|MultiEdit"})||n,(n=this.upsertHook(e,"Stop","stop-hook.js",{hooks:[{command:`node "${r}"`,timeout:5,type:"command"}]})||n)&&(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 repairHookPaths(){try{let e=this.readHooks(),t=(0,a.getPackageRoot)().replace(/\\/g,"/"),o=!1;for(let[s,r,n]of[["SessionStart","session-start-hook.js","tower-session-start-hook.js"],["PostToolUse","post-tool-hook.js","tower-post-tool-hook.js"],["Stop","stop-hook.js","tower-stop-hook.js"]]){let a=this.getHookArray(e,s),l=a.findIndex(e=>e?.hooks?.some?.(e=>e.command?.includes(r)));if(l<0)continue;let c=i.join(t,"scripts",n).replace(/\\/g,"/"),d=`node "${c}"`,m=a[l]?.hooks?.[0];m&&m.command!==d&&(m.command=d,e[s]=a,o=!0)}o&&(this.writeHooks(e),this.ensureHooksFeatureEnabled())}catch{}}upsertHook(e,t,o,s){let r=this.getHookArray(e,t),i=s?.hooks?.[0]?.command,n=r.findIndex(e=>e?.hooks?.some?.(e=>e.command?.includes(o)));if(n>=0){if(r[n]?.hooks?.[0]?.command===i)return!1;r.splice(n,1)}return r.push(s),e[t]=r,!0}async uninstallHooks(){try{let e=this.readHooks(),t=["session-start-hook.js","post-tool-hook.js","stop-hook.js"];for(let o of["SessionStart","PostToolUse","Stop"]){let s=this.getHookArray(e,o);e[o]=s.filter(e=>!e.hooks?.some(e=>t.some(t=>e.command?.includes(t))))}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(),t=this.getHookArray(e,"PostToolUse");return this.hasHook(t,"post-tool-hook.js")}async installMcp(e,t={}){let o=this.resolveCommand(),s=["mcp","add",e.name];if(e.env)for(let[t,o]of Object.entries(e.env))s.push("--env",`${t}=${o}`);s.push("--",e.command,...e.args);try{return await this.runCli(o,["mcp","remove",e.name],t.cwd).catch(()=>{}),await this.runCli(o,s,t.cwd),{ok:!0,method:"cli",detail:`${o} ${s.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${o} ${s.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async uninstallMcp(e,t={}){let o=this.resolveCommand(),s=["mcp","remove",e];try{return await this.runCli(o,s,t.cwd),{ok:!0,method:"cli",detail:`${o} ${s.join(" ")}`}}catch(e){return{ok:!1,method:"cli",detail:`${o} ${s.join(" ")}`,error:e instanceof Error?e.message:String(e)}}}async isMcpInstalled(e,t={}){let o=this.resolveCommand();try{return await this.runCli(o,["mcp","get",e],t.cwd,5e3),!0}catch{return!1}}async installSkill(e,t){let o=i.join(this.getConfigDir(),"skills",e);try{if(!s.existsSync(t))return{ok:!1,method:"symlink",detail:o,error:`Source skill dir does not exist: ${t}`};s.mkdirSync(i.dirname(o),{recursive:!0});let e=await s.promises.lstat(o).catch(()=>null);if(e)if(!(e.isSymbolicLink()||(0,n.isWindows)()&&e.isDirectory()))return{ok:!1,method:"symlink",detail:o,error:`Refusing to overwrite non-symlink at ${o}`};else try{let e=await s.promises.readlink(o);if(i.resolve(e)===i.resolve(t))return{ok:!0,method:"symlink",detail:`${o} → ${t} (already)`};await s.promises.unlink(o)}catch{if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:o,error:`Refusing to overwrite non-symlink at ${o}`}}let r=(0,n.isWindows)()?"junction":"dir";return await s.promises.symlink(t,o,r),{ok:!0,method:"symlink",detail:`${o} → ${t}`}}catch(e){return{ok:!1,method:"symlink",detail:o,error:e instanceof Error?e.message:String(e)}}}async uninstallSkill(e){let t=i.join(this.getConfigDir(),"skills",e);try{let e=await s.promises.lstat(t).catch(()=>null);if(!e)return{ok:!0,method:"symlink",detail:`${t} (already absent)`};if(!e.isSymbolicLink())return{ok:!1,method:"symlink",detail:t,error:`Refusing to remove non-symlink at ${t}`};return await s.promises.unlink(t),{ok:!0,method:"symlink",detail:t}}catch(e){return{ok:!1,method:"symlink",detail:t,error:e instanceof Error?e.message:String(e)}}}async isSkillInstalled(e,t){let o=i.join(this.getConfigDir(),"skills",e);try{if(!(await s.promises.lstat(o)).isSymbolicLink())return!1;if(!t)return!0;let e=await s.promises.readlink(o),r=i.isAbsolute(e)?e:i.resolve(i.dirname(o),e);return i.resolve(r)===i.resolve(t)}catch{return!1}}async runCli(t,o,s,r=1e4){let{execFile:i}=await e.A(482848),{promisify:n}=await e.A(268548),a=n(i),{stdout:l}=await a(t,o,{cwd:s,timeout:r});return l}async isAvailable(){return null!==await this.getVersion()}async getVersion(){try{let{execFile:t}=await e.A(144264),{promisify:o}=await e.A(534777),{resolveSpawnTarget:s}=await e.A(200628),r=o(t),i=await s(this.resolveCommand(),["--version"]),{stdout:n}=await r(i.command,i.args,{timeout:5e3});return n.trim()||null}catch{return null}}async getModels(){return l}getConfigDir(){return i.join(r.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(e){return{command:this.resolveCommand(),args:["exec",e]}}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 t=this.getConfigDir();s.existsSync(t)||s.mkdirSync(t,{recursive:!0}),s.writeFileSync(this.getHooksPath(),JSON.stringify({hooks:e},null,2),"utf-8")}ensureHooksFeatureEnabled(){let e=this.getSettingsPath(),t="";try{t=s.readFileSync(e,"utf-8")}catch{}if(/codex_hooks\s*=\s*true/.test(t))return;/\[features\]/.test(t)?t=t.replace(/\[features\]/,"[features]\ncodex_hooks = true"):t+="\n[features]\ncodex_hooks = true\n";let o=this.getConfigDir();s.existsSync(o)||s.mkdirSync(o,{recursive:!0}),s.writeFileSync(e,t,"utf-8")}getHookArray(e,t){let o=e[t];return Array.isArray(o)?o:[]}hasHook(e,t){return e.some(e=>e.hooks?.some(e=>e.command?.includes(t)))}}},models:{cli:["o4-mini","o3","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","codex-mini-latest"],api:[]}}),c.__providerRegistry=d}let d=c.__providerRegistry;e.s(["providerRegistry",0,d],279711)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=src_lib_0nw5n~t._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[918622,(a,b,c)=>{b.exports=a.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,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(a,b,c)=>{b.exports=a.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,(a,b,c)=>{b.exports=a.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},324725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},931708,(a,b,c)=>{(()=>{"use strict";"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="/ROOT/node_modules/.pnpm/next@16.2.1_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/cookie/");var a,c,d,e,f={};f.parse=function(b,c){if("string"!=typeof b)throw TypeError("argument str must be a string");for(var e={},f=b.split(d),g=(c||{}).decode||a,h=0;h<f.length;h++){var i=f[h],j=i.indexOf("=");if(!(j<0)){var k=i.substr(0,j).trim(),l=i.substr(++j,i.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),void 0==e[k]&&(e[k]=function(a,b){try{return b(a)}catch(b){return a}}(l,g))}}return e},f.serialize=function(a,b,d){var f=d||{},g=f.encode||c;if("function"!=typeof g)throw TypeError("option encode is invalid");if(!e.test(a))throw TypeError("argument name is invalid");var h=g(b);if(h&&!e.test(h))throw TypeError("argument val is invalid");var i=a+"="+h;if(null!=f.maxAge){var j=f.maxAge-0;if(isNaN(j)||!isFinite(j))throw TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(j)}if(f.domain){if(!e.test(f.domain))throw TypeError("option domain is invalid");i+="; Domain="+f.domain}if(f.path){if(!e.test(f.path))throw TypeError("option path is invalid");i+="; Path="+f.path}if(f.expires){if("function"!=typeof f.expires.toUTCString)throw TypeError("option expires is invalid");i+="; Expires="+f.expires.toUTCString()}if(f.httpOnly&&(i+="; HttpOnly"),f.secure&&(i+="; Secure"),f.sameSite)switch("string"==typeof f.sameSite?f.sameSite.toLowerCase():f.sameSite){case!0:case"strict":i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"none":i+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return i},a=decodeURIComponent,c=encodeURIComponent,d=/; */,e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,b.exports=f})()},771751,(a,b,c)=>{(()=>{"use strict";var a={56:a=>{a.exports=function(a,b){return"string"==typeof a?g(a):"number"==typeof a?f(a,b):null},a.exports.format=f,a.exports.parse=g;var b=/\B(?=(\d{3})+(?!\d))/g,c=/(?:\.0*|(\.[^0]+)0+)$/,d={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},e=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function f(a,e){if(!Number.isFinite(a))return null;var f=Math.abs(a),g=e&&e.thousandsSeparator||"",h=e&&e.unitSeparator||"",i=e&&void 0!==e.decimalPlaces?e.decimalPlaces:2,j=!!(e&&e.fixedDecimals),k=e&&e.unit||"";k&&d[k.toLowerCase()]||(k=f>=d.pb?"PB":f>=d.tb?"TB":f>=d.gb?"GB":f>=d.mb?"MB":f>=d.kb?"KB":"B");var l=(a/d[k.toLowerCase()]).toFixed(i);return j||(l=l.replace(c,"$1")),g&&(l=l.split(".").map(function(a,c){return 0===c?a.replace(b,g):a}).join(".")),l+h+k}function g(a){if("number"==typeof a&&!isNaN(a))return a;if("string"!=typeof a)return null;var b,c=e.exec(a),f="b";return c?(b=parseFloat(c[1]),f=c[4].toLowerCase()):(b=parseInt(a,10),f="b"),Math.floor(d[f]*b)}}},c={};function d(b){var e=c[b];if(void 0!==e)return e.exports;var f=c[b]={exports:{}},g=!0;try{a[b](f,f.exports,d),g=!1}finally{g&&delete c[b]}return f.exports}d.ab="/ROOT/node_modules/.pnpm/next@16.2.1_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/bytes/",b.exports=d(56)})()},120635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},814747,(a,b,c)=>{b.exports=a.x("path",()=>require("path"))},797225,(a,b,c)=>{"use strict";b.exports=a.r(227433).vendored["react-rsc"].ReactServerDOMTurbopackServer},227433,(a,b,c)=>{"use strict";b.exports=a.r(918622)},942372,(a,b,c)=>{"use strict";b.exports=a.r(227433).vendored["react-rsc"].React},203469,(a,b,c)=>{"use strict";b.exports=a.r(227433).vendored["react-rsc"].ReactJsxRuntime},224361,(a,b,c)=>{b.exports=a.x("util",()=>require("util"))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0.q~~2p._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},648512,a=>{"use strict";let b=(0,a.i(711796).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],648512)},415792,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407c99391176893b8a2e253c2c3b3960dcacb087bb",b.callServer,void 0,b.findSourceMapURL,"openInTerminal");a.s(["openInTerminal",0,c])},269280,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],269280)},928743,527311,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40a089c63d411bf7626e8f935b26694ecaa70776d7",b.callServer,void 0,b.findSourceMapURL,"openInFileManager");a.s(["openInFileManager",0,c],928743);let d=(0,b.createServerReference)("40c7acda131c0c6869991a269f8dd990df6edc454c",b.callServer,void 0,b.findSourceMapURL,"openInEditor");a.s(["openInEditor",0,d],527311)},165614,a=>{"use strict";let b=(0,a.i(711796).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["PlayCircle",0,b],165614)},625892,939859,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);a.s(["FolderSearch",0,c],625892);let d=(0,b.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);a.s(["Code",0,d],939859)},551578,a=>{"use strict";var b=a.i(728778);let c=(0,a.i(711796).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var d=a.i(951192);let e=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function f(a){return e[function(a){let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)>>>0;return b}(a)%e.length]}let g={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};a.s(["TaskVersionTag",0,function({number:a,name:d,showName:e=!1,className:f="",title:g}){return(0,b.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${f}`,title:g??(d?`${a} \xb7 ${d}`:a),children:[(0,b.jsx)(c,{className:"h-2.5 w-2.5 shrink-0"}),(0,b.jsx)("span",{className:"font-mono",children:a}),e&&d?(0,b.jsx)("span",{className:"max-w-[140px] truncate",children:d}):null]})},"VersionStatusBadge",0,function({status:a}){let{t:c}=(0,d.useI18n)();return(0,b.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${g[a]}`,children:c(`version.status.${a}`)})},"VersionTypeBadge",0,function({name:a}){let{t:c}=(0,d.useI18n)();return a?(0,b.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${f(a)}`,children:a}):(0,b.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:c("version.type.uncategorized")})},"typeBadgeColor",0,f],551578)},579834,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},264589,a=>{"use strict";let b=(0,a.i(711796).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);a.s(["Package",0,b],264589)},10390,a=>{"use strict";var b=a.i(421992);a.s(["ChevronRight",()=>b.default])},912868,a=>{"use strict";let b=(0,a.i(711796).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",0,b],912868)},405540,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40a8d9987d8b71ec56eef76f4a4ea0c28fdcd8edc0",b.callServer,void 0,b.findSourceMapURL,"getConfigValues");a.s(["getConfigValues",0,c])},412783,22761,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...d})}],412783);let d=(0,a.i(711796).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,d],22761)},865011,a=>{"use strict";var b=a.i(728778),c=a.i(634910),d=a.i(553798),e=a.i(269280),f=a.i(350739),g=a.i(347165),h=a.i(607219),i=a.i(951192);let j=[{key:"notes",icon:f.FileText},{key:"assets",icon:g.FolderOpen},{key:"archive",icon:h.Archive}];a.s(["SubPageNav",0,function({workspaceId:a}){let{t:f}=(0,i.useI18n)(),g=(0,d.usePathname)(),h=j.find(a=>g.includes(`/${a.key}`))?.key;return(0,b.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,b.jsxs)(c.default,{href:`/workspaces/${a}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f("archive.backToBoard")})]}),(0,b.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),j.map(d=>{let e=d.icon,g=h===d.key;return(0,b.jsxs)(c.default,{href:`/workspaces/${a}/${d.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${g?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,b.jsx)(e,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f(`sidebar.${d.key}`)})]},d.key)})]})}])},404726,330942,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40e6b62dbdef50eb811b0e974242ec559cf5e8592a",b.callServer,void 0,b.findSourceMapURL,"createNote");a.s(["createNote",0,c],404726);let d=(0,b.createServerReference)("40cca7fb2c530a1535e8717793c47766fd56156672",b.callServer,void 0,b.findSourceMapURL,"deleteNote");a.s(["deleteNote",0,d],330942)},574046,a=>{a.v(b=>Promise.all(["server/chunks/ssr/04y0_streamdown_dist_highlighted-body-OFNGDK62_0dm8t_v.js"].map(b=>a.l(b))).then(()=>b(514138)))},170967,a=>{a.v(b=>Promise.all(["server/chunks/ssr/04y0_streamdown_dist_mermaid-GHXKKRXX_0oxtju0.js"].map(b=>a.l(b))).then(()=>b(729004)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__01zrinc._.js.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
module.exports=[495370,a=>{"use strict";var b=a.i(815429),c=a.i(761469),d=a.i(188139),e=a.i(496877);async function f(a){return c.db.label.findMany({where:{OR:[{isBuiltin:!0},{workspaceId:a}]},orderBy:[{isBuiltin:"desc"},{name:"asc"}]})}async function g(a){let b=e.createLabelSchema.parse(a),f=await c.db.label.create({data:{name:b.name,color:b.color,workspaceId:b.workspaceId}});return(0,d.revalidatePath)("/workspaces"),f}async function h(a){let b=await c.db.label.findUnique({where:{id:a}});if(!b)throw Error("Label not found");if(b.isBuiltin)throw Error("Cannot delete builtin labels");await c.db.label.delete({where:{id:a}}),(0,d.revalidatePath)("/workspaces")}async function i(a,b){await c.db.$transaction(async c=>{await c.taskLabel.deleteMany({where:{taskId:a}}),b.length>0&&await c.taskLabel.createMany({data:b.map(b=>({taskId:a,labelId:b}))})}),(0,d.revalidatePath)("/workspaces")}async function j(a){return(await c.db.taskLabel.findMany({where:{taskId:a},include:{label:!0}})).map(a=>a.label)}(0,a.i(630048).ensureServerEntryExports)([f,g,h,i,j]),(0,b.registerServerReference)(f,"40fbb3e458fb2f6232bf53424e19aeff36368f1644",null),(0,b.registerServerReference)(g,"40f49f4fcc711c1a5ef88b7b38ff6fcad0830ad879",null),(0,b.registerServerReference)(h,"402c06d432e3a1c443c8469f9c2d277213c901c111",null),(0,b.registerServerReference)(i,"60ad65ff822eb47015ec099c8d6c66f610b31a4068",null),(0,b.registerServerReference)(j,"4003546e3342df631ed3c27de7350c941567aec81d",null),a.s(["createLabel",0,g,"deleteLabel",0,h,"getLabelsForWorkspace",0,f,"getTaskLabels",0,j,"setTaskLabels",0,i])},287068,a=>{"use strict";var b=a.i(761469);function c(a,b){return{id:a.note_id,type:"note",title:a.title,subtitle:`${a.workspace_name} / ${a.project_name}`,navigateTo:`/workspaces/${a.workspaceId}/notes?projectId=${a.projectId}`,snippet:a.content?a.content.slice(0,b):void 0}}async function d(a,e="task",f){if(!a.trim())return[];let g=a.trim(),{resultLimit:h,allModeCap:i,snippetLength:j}=f;if("all"===e){let[a,b,c,e,h]=await Promise.allSettled([d(g,"task",f),d(g,"project",f),d(g,"repository",f),d(g,"note",f),d(g,"asset",f)]),j=a=>"fulfilled"===a.status?a.value.slice(0,i):[];return[...j(a),...j(b),...j(c),...j(e),...j(h)]}if("task"===e)return(await b.db.task.findMany({where:{OR:[{title:{contains:g}},{description:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h,orderBy:{updatedAt:"desc"}})).map(a=>{let b="DONE"===a.status||"CANCELLED"===a.status,c=a.project.workspaceId;return{id:a.id,type:"task",title:a.title,subtitle:`${a.project.workspace.name} / ${a.project.name}`,navigateTo:b?`/workspaces/${c}/archive?projectId=${a.projectId}`:`/workspaces/${c}?projectId=${a.projectId}`}});if("project"===e)return(await b.db.project.findMany({where:{OR:[{name:{contains:g}},{alias:{contains:g}},{description:{contains:g}}]},include:{workspace:!0},take:h,orderBy:{updatedAt:"desc"}})).map(a=>({id:a.id,type:"project",title:a.alias?`${a.name} (${a.alias})`:a.name,subtitle:a.workspace.name,navigateTo:`/workspaces/${a.workspaceId}?projectId=${a.id}`}));if("repository"===e)return(await b.db.repository.findMany({where:{OR:[{name:{contains:g}},{path:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h})).map(a=>({id:a.id,type:"repository",title:a.name,subtitle:`${a.project.workspace.name} / ${a.project.name} \xb7 ${a.branch}`,navigateTo:`/workspaces/${a.project.workspaceId}?projectId=${a.projectId}`}));if("note"===e){if(g.length<3)return(await b.db.$queryRawUnsafe(`SELECT n.id as note_id, n.title, n.content,
|
|
2
|
-
n."projectId", p."workspaceId", p.name as project_name, w.name as workspace_name
|
|
3
|
-
FROM "ProjectNote" n
|
|
4
|
-
JOIN "Project" p ON p.id = n."projectId"
|
|
5
|
-
JOIN "Workspace" w ON w.id = p."workspaceId"
|
|
6
|
-
WHERE n.title LIKE ? OR n.content LIKE ?
|
|
7
|
-
LIMIT ?`,`%${g}%`,`%${g}%`,h)).map(a=>c(a,j));try{return(await b.db.$queryRawUnsafe(`SELECT f.note_id, f.title, f.content,
|
|
8
|
-
n."projectId", p."workspaceId", p.name as project_name, w.name as workspace_name
|
|
9
|
-
FROM notes_fts f
|
|
10
|
-
JOIN "ProjectNote" n ON n.id = f.note_id
|
|
11
|
-
JOIN "Project" p ON p.id = n."projectId"
|
|
12
|
-
JOIN "Workspace" w ON w.id = p."workspaceId"
|
|
13
|
-
WHERE f.notes_fts MATCH ?
|
|
14
|
-
ORDER BY rank
|
|
15
|
-
LIMIT ?`,g,h)).map(a=>c(a,j))}catch{return(await b.db.$queryRawUnsafe(`SELECT n.id as note_id, n.title, n.content,
|
|
16
|
-
n."projectId", p."workspaceId", p.name as project_name, w.name as workspace_name
|
|
17
|
-
FROM "ProjectNote" n
|
|
18
|
-
JOIN "Project" p ON p.id = n."projectId"
|
|
19
|
-
JOIN "Workspace" w ON w.id = p."workspaceId"
|
|
20
|
-
WHERE n.title LIKE ? OR n.content LIKE ?
|
|
21
|
-
LIMIT ?`,`%${g}%`,`%${g}%`,h)).map(a=>c(a,j))}}return"asset"===e?(await b.db.projectAsset.findMany({where:{OR:[{filename:{contains:g}},{description:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h,orderBy:{createdAt:"desc"}})).map(a=>({id:a.id,type:"asset",title:a.filename,subtitle:`${a.project.workspace.name} / ${a.project.name}`,navigateTo:`/workspaces/${a.project.workspaceId}/assets?projectId=${a.projectId}`,snippet:a.description||void 0})):[]}a.s(["search",0,d])},396904,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(287068),f=a.i(980999),g=a.i(630048),h=b([f]);async function i(a,b="task"){let c=await (0,f.getConfigValues)(["search.resultLimit","search.allModeCap","search.snippetLength"]);return(0,e.search)(a,b,{resultLimit:c["search.resultLimit"]??20,allModeCap:c["search.allModeCap"]??5,snippetLength:c["search.snippetLength"]??80})}[f]=h.then?(await h)():h,(0,g.ensureServerEntryExports)([i]),(0,d.registerServerReference)(i,"60ecfea1ec1b61566df8bd7edc9723fb9ab08e75b6",null),a.s(["globalSearch",0,i]),c()}catch(a){c(a)}},!1),101844,a=>{"use strict";var b=a.i(815429),c=a.i(924868),d=a.i(522734),e=a.i(814747),f=a.i(761469),g=a.i(188139),h=a.i(630048);async function i(b){if(!b||"string"!=typeof b)return{safe:!1,reason:"无效的项目 ID"};let g=await f.db.project.findUnique({where:{id:b}});if(!g||!g.localPath)return{safe:!1,reason:"项目不存在或未设置本地路径"};if((await f.db.taskExecution.findMany({where:{task:{projectId:b},status:"RUNNING"},select:{id:!0}})).length>0)return{safe:!1,reason:"该项目有正在运行的任务执行,请先停止所有执行"};let h=await f.db.task.findMany({where:{projectId:b},select:{id:!0}}),{getSession:i}=await a.A(98813);for(let a of h)if(void 0!==i(a.id))return{safe:!1,reason:"该项目有活跃的终端会话,请先关闭"};let j=e.default.join(g.localPath,".worktrees");if((0,d.existsSync)(j))try{if((await (0,c.readdir)(j)).length>0)return{safe:!1,reason:"该项目有活跃的 Git Worktree,请先清理"}}catch{}return{safe:!0}}async function j(b,h){if(!b||"string"!=typeof b)return{success:!1,error:"无效的项目 ID"};if(!h||"string"!=typeof h||!e.default.isAbsolute(h))return{success:!1,error:"目标路径必须是非空的绝对路径"};let i=await f.db.project.findUnique({where:{id:b}});if(!i||!i.localPath)return{success:!1,error:"项目不存在或未设置本地路径"};let j=i.localPath;if(h===j)return{success:!1,error:"源路径和目标路径相同"};if((await f.db.taskExecution.findMany({where:{task:{projectId:b},status:"RUNNING"},select:{id:!0}})).length>0)return{success:!1,error:"该项目有正在运行的任务执行,请先停止所有执行"};let k=await f.db.task.findMany({where:{projectId:b},select:{id:!0}}),{getSession:l}=await a.A(98813);for(let a of k)if(void 0!==l(a.id))return{success:!1,error:"该项目有活跃的终端会话,请先关闭"};let m=e.default.join(j,".worktrees");if((0,d.existsSync)(m))try{if((await (0,c.readdir)(m)).length>0)return{success:!1,error:"该项目有活跃的 Git Worktree,请先清理"}}catch{}if((0,d.existsSync)(h))try{if((await (0,c.readdir)(h)).length>0)return{success:!1,error:"目标路径已存在且不为空"}}catch{return{success:!1,error:"目标路径已存在且不为空"}}let n=e.default.dirname(h);try{await (0,c.mkdir)(n,{recursive:!0})}catch(a){if("EACCES"===a.code||"EPERM"===a.code)return{success:!1,error:`无权限创建父目录 ${n} — 请检查 Git 路径映射规则的模板是否漏了 "~/" 前缀`};if("EROFS"===a.code)return{success:!1,error:`父目录所在文件系统只读:${n}`};return{success:!1,error:`创建父目录失败:${a.message||a.code||"未知错误"}`}}try{await (0,c.rename)(j,h)}catch(a){if("EXDEV"===a.code)return{success:!1,error:"源路径和目标路径不在同一文件系统,不支持跨设备迁移"};if("EACCES"===a.code||"EPERM"===a.code)return{success:!1,error:`无权限移动到 ${h}`};return{success:!1,error:a.message||"文件系统操作失败"}}return await f.db.project.update({where:{id:b},data:{localPath:h}}),(0,g.revalidatePath)("/workspaces"),{success:!0}}let k=`分析这个项目目录,生成一段简短的 Markdown 项目描述。
|
|
22
|
-
|
|
23
|
-
读取 package.json、README.md 等关键文件,然后概括:
|
|
24
|
-
|
|
25
|
-
**技术栈:** 一句话列出主要语言、框架、关键库
|
|
26
|
-
**定位:** 一句话说明项目是什么
|
|
27
|
-
**核心模块:** 2-3 个关键模块,每个一句话
|
|
28
|
-
|
|
29
|
-
要求:
|
|
30
|
-
- 总字数不超过 500 字
|
|
31
|
-
- 用简洁的 Markdown(加粗标签 + 短句),不要用 ## 大标题和表格
|
|
32
|
-
- 不要罗列每个文件/目录,只说关键信息
|
|
33
|
-
- 中文输出`,l=`Analyze this project directory and generate a brief Markdown project description.
|
|
34
|
-
|
|
35
|
-
Read package.json, README.md and other key files, then summarize:
|
|
36
|
-
|
|
37
|
-
**Tech Stack:** One sentence listing primary languages, frameworks, and key libraries
|
|
38
|
-
**Overview:** One sentence describing what this project is
|
|
39
|
-
**Core Modules:** 2-3 key modules, one sentence each
|
|
40
|
-
|
|
41
|
-
Requirements:
|
|
42
|
-
- Keep it under 1000 words
|
|
43
|
-
- Use concise Markdown (bold labels + short sentences), no ## headings or tables
|
|
44
|
-
- Don't list every file/directory, only key information
|
|
45
|
-
- Output in English`;async function m(b,c="zh"){if(!b||"string"!=typeof b)throw Error("无效的本地路径");if(b.startsWith("~"))throw Error("不支持 ~ 别名,请提供绝对路径");if(!e.default.isAbsolute(b))throw Error("本地路径必须为绝对路径");let{aiQuery:d}=await a.A(752453),f=await d("en"===c?l:k,b,{maxTurns:10,tools:["Read","Glob"],allowedTools:["Read","Glob"]});if(!f)throw Error("AI 分析未返回结果");return f.length>2e3?f.slice(0,2e3).trimEnd()+"\n\n...":f}(0,h.ensureServerEntryExports)([i,j,m]),(0,b.registerServerReference)(i,"404f136c41eadb3e97a68b430fbc2fa599ad9d4d57",null),(0,b.registerServerReference)(j,"605f4443fc3374e185454b9d921f0c30c20bf69e58",null),(0,b.registerServerReference)(m,"6001916a516d08d39943c76209c1b6a1d316f8bab3",null),a.s(["analyzeProjectDirectory",0,m,"checkMigrationSafety",0,i,"migrateProjectPath",0,j])},859071,a=>{"use strict";a.i(666680);var b=a.i(902157),c=a.i(750227),d=a.i(319997);a.s(["ensureAssetsDir",0,function(a){let e=function(a){let b=c.join((0,d.getStorageDir)(),"assets",a);if(!b.startsWith((0,d.getStorageDir)()+c.sep))throw Error("Path traversal detected");return b}(a);return b.mkdirSync(e,{recursive:!0}),e}])},97397,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(902157),f=a.i(750227),g=a.i(75681),h=a.i(761469),i=a.i(188139),j=a.i(859071),k=a.i(980999),l=a.i(630048),m=b([k]);[k]=m.then?(await m)():m;let t=g.z.object({filename:g.z.string().min(1).max(255),path:g.z.string().min(1),mimeType:g.z.string().max(100).optional(),size:g.z.number().int().nonnegative().optional(),projectId:g.z.string().min(1),description:g.z.string().max(500).optional(),taskId:g.z.string().optional()});async function n(a){let b=t.parse(a);(0,j.ensureAssetsDir)(b.projectId);let c=await h.db.projectAsset.create({data:{...b,taskId:b.taskId??null}});return(0,i.revalidatePath)("/workspaces"),c}async function o(a){let b=await h.db.projectAsset.findUnique({where:{id:a}});b?.path&&await e.promises.unlink(b.path).catch(()=>{}),await h.db.projectAsset.delete({where:{id:a}}),(0,i.revalidatePath)("/workspaces")}async function p(a){return h.db.projectAsset.findMany({where:{projectId:a},orderBy:{createdAt:"desc"},include:{task:{select:{id:!0,title:!0,status:!0,priority:!0,description:!0,createdAt:!0,labels:{include:{label:!0}},executions:{orderBy:{createdAt:"desc"},take:1,select:{summary:!0,status:!0,endedAt:!0}},_count:{select:{assets:!0}}}}}})}async function q(a){return h.db.projectAsset.findMany({where:{taskId:a},orderBy:{createdAt:"desc"}})}async function r(a){return h.db.projectAsset.findUnique({where:{id:a}})}async function s(a){let b=a.get("file"),c=a.get("projectId"),d=a.get("taskId")||void 0;if(!b||!c)throw Error("Missing file or projectId");let g=await (0,k.getConfigValue)("system.maxUploadBytes",0x3200000);if(b.size>g)throw Error(`File too large (max ${Math.round(g/1024/1024)} MB)`);let l=a.get("description")??"";if(!await h.db.project.findUnique({where:{id:c}}))throw Error("Invalid projectId");let m=Buffer.from(await b.arrayBuffer()),o=(0,j.ensureAssetsDir)(c),p=f.basename(b.name);p&&"."!==p&&".."!==p||(p=`upload-${Date.now()}`);let q=f.join(o,p);if(e.existsSync(q)){let a=f.extname(p),b=f.basename(p,a);p=`${b}-${Date.now()}${a}`}let r=f.join(o,p);if(!r.startsWith(o))throw Error("Invalid filename");await e.promises.writeFile(r,m);let s=await n({filename:p,path:r,mimeType:b.type||void 0,size:b.size,projectId:c,description:l||void 0,taskId:d});return(0,i.revalidatePath)("/workspaces"),s}(0,l.ensureServerEntryExports)([n,o,p,q,r,s]),(0,d.registerServerReference)(n,"4057679a5e17e218f99d516fd673668778c9625ab3",null),(0,d.registerServerReference)(o,"40bcf862c29e445e4dfb1cb38094dfdc4dcedae10a",null),(0,d.registerServerReference)(p,"407c78e7f68828a5825bfb2d5dbb6799d550ccf547",null),(0,d.registerServerReference)(q,"407a8d30b67334b469af1d4a947b6ed37990f23546",null),(0,d.registerServerReference)(r,"4074e48762f5aa0fdf1550172a4f4d0815555fb442",null),(0,d.registerServerReference)(s,"40853b27a81176e1cbb850728e1d26e7b22e277ac4",null),a.s(["createAsset",0,n,"deleteAsset",0,o,"getAssetById",0,r,"getProjectAssets",0,p,"getTaskAssets",0,q,"uploadAsset",0,s]),c()}catch(a){c(a)}},!1),835032,a=>{"use strict";async function b(a,b){await a.$executeRawUnsafe("DELETE FROM notes_fts WHERE note_id = ?",b.id),await a.$executeRawUnsafe("INSERT INTO notes_fts(note_id, title, content) VALUES (?, ?, ?)",b.id,b.title,b.content)}async function c(a,b){await a.$executeRawUnsafe("DELETE FROM notes_fts WHERE note_id = ?",b)}a.s(["deleteNoteFromFts",0,c,"syncNoteToFts",0,b])},392164,a=>{"use strict";var b=a.i(815429),c=a.i(75681),d=a.i(761469),e=a.i(188139),f=a.i(835032),g=a.i(630048);let h=c.z.object({title:c.z.string().min(1).max(200),content:c.z.string(),category:c.z.string().max(50).optional(),projectId:c.z.string().min(1),taskId:c.z.string().optional()}),i=c.z.object({title:c.z.string().min(1).max(200).optional(),content:c.z.string().optional(),category:c.z.string().max(50).optional()});async function j(a){let b=h.parse(a),c=await d.db.projectNote.create({data:{title:b.title,content:b.content,category:b.category??"备忘",projectId:b.projectId,taskId:b.taskId??null}});return await (0,f.syncNoteToFts)(d.db,{id:c.id,title:c.title,content:c.content}),(0,e.revalidatePath)("/workspace"),c}async function k(a,b){let c=i.parse(b),g=await d.db.projectNote.update({where:{id:a},data:c});return await (0,f.syncNoteToFts)(d.db,{id:g.id,title:g.title,content:g.content}),(0,e.revalidatePath)("/workspace"),g}async function l(a){await (0,f.deleteNoteFromFts)(d.db,a),await d.db.projectNote.delete({where:{id:a}}),(0,e.revalidatePath)("/workspace")}async function m(a){return d.db.projectNote.findUnique({where:{id:a}})}async function n(a,b){return d.db.projectNote.findMany({where:{projectId:a,...b?.category?{category:b.category}:{}},orderBy:[{updatedAt:"desc"},{id:"desc"}],include:{task:{select:{id:!0,title:!0}}}})}async function o(a){return d.db.projectNote.findMany({where:{taskId:a},orderBy:[{updatedAt:"desc"},{id:"desc"}]})}(0,g.ensureServerEntryExports)([j,k,l,m,n,o]),(0,b.registerServerReference)(j,"40e6b62dbdef50eb811b0e974242ec559cf5e8592a",null),(0,b.registerServerReference)(k,"604bd1440fe977c0c8adba1f122af0baa0392e85fe",null),(0,b.registerServerReference)(l,"40cca7fb2c530a1535e8717793c47766fd56156672",null),(0,b.registerServerReference)(m,"404781e98a54281c5d9582b9a99fe7def8a2c3053b",null),(0,b.registerServerReference)(n,"607d5ac1e6c0906c82d30ca8a8d0051d2436ffe127",null),(0,b.registerServerReference)(o,"4067e5997b2f651c5a7301593b8f02b9394552aba6",null),a.s(["createNote",0,j,"deleteNote",0,l,"getNoteById",0,m,"getProjectNotes",0,n,"getTaskNotes",0,o,"updateNote",0,k])},196195,a=>{"use strict";var b=a.i(815429),c=a.i(233405),d=a.i(814747),e=a.i(446786);function f(a){return a.startsWith("~/")||"~"===a?d.default.join(e.default.homedir(),a.slice(1)):a}async function g(a){if(!a?.trim())return null;let b=d.default.resolve(f(a));try{return(0,c.execSync)("git rev-parse --abbrev-ref HEAD",{cwd:b,encoding:"utf-8",timeout:5e3}).trim()}catch{return null}}async function h(a){if(!a?.trim())return[];let b=d.default.resolve(f(a));try{let a,d;return a=new Set((0,c.execSync)("git branch --format='%(refname:short)'",{cwd:b,encoding:"utf-8",timeout:5e3}).trim().split("\n").filter(Boolean).map(a=>a.replace(/'/g,""))),d=(0,c.execSync)("git branch -r --format='%(refname:short)'",{cwd:b,encoding:"utf-8",timeout:5e3}).trim().split("\n").filter(Boolean).map(a=>a.replace(/'/g,"").replace(/^origin\//,"")).filter(b=>"HEAD"!==b&&!a.has(b)),[...a,...d]}catch{return[]}}async function i(a){if(!a?.trim())return;let b=d.default.resolve(f(a));try{(0,c.spawn)("git",["fetch","--prune"],{cwd:b,stdio:"ignore",detached:!0}).unref()}catch{}}(0,a.i(630048).ensureServerEntryExports)([g,h,i]),(0,b.registerServerReference)(g,"4024491f212c5c0ec88a25ad5b286fc74002291cdf",null),(0,b.registerServerReference)(h,"40d00f0fe1074434c19eee398f82bf9b97dee0b9d8",null),(0,b.registerServerReference)(i,"40934710fa40bda463653e740d2d4021d345c07996",null),a.s(["fetchRemoteBranches",0,i,"getCurrentBranch",0,g,"getProjectBranches",0,h])},449496,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=a.i(689171);a.i(392164);var g=a.i(97397);a.i(536960),a.i(196195);var h=b([d,e,f,g]);[d,e,f,g]=h.then?(await h)():h,a.s([]),c()}catch(a){c(a)}},!1),670300,a=>a.a(async(b,c)=>{try{var d=a.i(449496),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=a.i(689171),m=a.i(392164),n=a.i(97397),o=a.i(536960),p=a.i(196195),q=b([d,g,h,l,n]);[d,g,h,l,n]=q.then?(await q)():q,a.s(["000978f807ee1c10e9f24a8760105b9a4286b20f03",()=>h.getAvailableEditors,"0018c44abcb186f7ba3403be069e7e9f6da8616369",()=>h.getArchiveDelayDays,"0018fbdd66aba52ffae0eea94c547cdac80082d648",()=>k.getOnboardingStatus,"0030355a1abb5bf3387a318cd4519959200544964e",()=>e.getWorkspacesWithActiveTasks,"003999071c484871321a8108440d7489c3f12e05ad",()=>h.getAvailableShells,"0046fe8e0c4ef66fd5bdba95b505cd928d8497bac6",()=>j.listAllExtensionStatus,"005c2726b05a25fd0df69e27f64e4c4d3ac62d4aeb",()=>h.getAvailableTerminalApps,"00aab6ff79952ffd82cb986ec267a844b5e815bd10",()=>e.getWorkspacesWithProjects,"00b51d8a985a33823255b31ad031b117cbf4d4026b",()=>h.getPlatformInfo,"00bbe981391f69ab27be7d2c2adf20dcedb8f4caea",()=>h.getActualWsPort,"4003546e3342df631ed3c27de7350c941567aec81d",()=>f.getTaskLabels,"400a2caf730db05d2446002677f12c7ee98469ce20",()=>e.getRecentLocalProjects,"4016677573181545463b41adb1663fc9cc67ede495",()=>l.getArchivedTasks,"40212a56018fad2d915940c89dfaf6054354af68c3",()=>l.deleteTask,"4024491f212c5c0ec88a25ad5b286fc74002291cdf",()=>p.getCurrentBranch,"4026b5934eb17f08d1c056f40a4fafe52074d352de",()=>j.uninstallExtension,"402b9e604ebfd42af76626d470e58c634b243bf544",()=>e.deleteWorkspace,"402c06d432e3a1c443c8469f9c2d277213c901c111",()=>f.deleteLabel,"4039d8595b35d9b2ce680752357376b2493b4c2de0",()=>e.deleteProject,"403ea5ae0f3d1e97155fd492ca9a022b8bbe330b90",()=>e.createWorkspace,"4043130a1d362ee33ae88de0ed751aa1fbfa0fb132",()=>k.setOnboardingProgress,"40477832c201e86d76b65ee452b2f266bd01748a15",()=>j.checkExtension,"404ef38e3210ade662b09756d1418c29f2fab30709",()=>h.resolveGitLocalPath,"404f136c41eadb3e97a68b430fbc2fa599ad9d4d57",()=>i.checkMigrationSafety,"40537a6f4c1ea4b4f73abb0d0f7fbd5335f66d9335",()=>e.getOrCreateTowerTaskId,"405752d645249795637c0b214cbb0e6091f1af27f8",()=>e.createProject,"406446cc2b798b6d5a8041b1a353ccdb1582682094",()=>h.resolveGitLocalPathWithSource,"4067e5997b2f651c5a7301593b8f02b9394552aba6",()=>m.getTaskNotes,"406da6d9dca36b89032a75437431a27da281273a09",()=>e.reorderWorkspaces,"407a8d30b67334b469af1d4a947b6ed37990f23546",()=>n.getTaskAssets,"407c99391176893b8a2e253c2c3b3960dcacb087bb",()=>o.openInTerminal,"407cc4cf282a353498dc0c8bc1f9018e458c4d37b7",()=>e.getWorkspacesWithRecentTasks,"4090ac8fc97f1a8be256882a5325c5b103d71a4070",()=>j.installExtension,"40934710fa40bda463653e740d2d4021d345c07996",()=>p.fetchRemoteBranches,"40a089c63d411bf7626e8f935b26694ecaa70776d7",()=>o.openInFileManager,"40a1a3a48e423b5025ad9ea626aea044ec13b620a1",()=>l.getProjectTasks,"40a8d9987d8b71ec56eef76f4a4ea0c28fdcd8edc0",()=>h.getConfigValues,"40a9ab396e79818e2ea0459b4f4c315855196db134",()=>k.dispatchTaskCompletionEvent,"40b26f9338c41e2bc1058357cf4d4cdb868fdd500a",()=>l.checkWorktreeClean,"40b7f37b8ba2f67751d6f74d8f984da070ea392278",()=>l.getArchivedTaskCount,"40c206003beeb07820a10e89dcc05db33cebc99e57",()=>l.searchTasks,"40c7acda131c0c6869991a269f8dd990df6edc454c",()=>o.openInEditor,"40cd152827b2541e22314d39c52175c67430121cfd",()=>e.getWorkspaceById,"40cdcb51244d794d89deb8627e6815567f06b3794f",()=>l.createTask,"40d00f0fe1074434c19eee398f82bf9b97dee0b9d8",()=>p.getProjectBranches,"40e04fb1dceb7c8df1bfd03b4997390e3055596a96",()=>l.toggleTaskPinned,"40e27e585c87948d5ac60d49a3407d347bd149e01a",()=>l.getTaskOverview,"40f49f4fcc711c1a5ef88b7b38ff6fcad0830ad879",()=>f.createLabel,"40f5f2ac714a7abd314a396020362aed61fb4b74cc",()=>e.getProjectByLocalPath,"40fbb3e458fb2f6232bf53424e19aeff36368f1644",()=>f.getLabelsForWorkspace,"6001916a516d08d39943c76209c1b6a1d316f8bab3",()=>i.analyzeProjectDirectory,"600c0360fc4ce13a01e338268cc272dde1b16ec989",()=>h.setConfigValue,"6015756a574100c33e629faa82ab6f69050c97821c",()=>l.commitWorktreeChanges,"6022dc05b858325d54679979f48ec6986b1257019b",()=>h.getConfigValue,"602e0b75d87a1db34c3ffadaf61190e40e67bb0a42",()=>k.completeOnboarding,"603480184e60c27214a54381387436ff640e52b1b6",()=>k.setOnboardingExtensions,"60376b404b9ee9ec39227faf56b6e478179be622ad",()=>e.updateWorkspace,"605f4443fc3374e185454b9d921f0c30c20bf69e58",()=>i.migrateProjectPath,"60802ddcaf4688e156e12cdb5d82072ca232cbb61a",()=>l.updateTask,"60ad65ff822eb47015ec099c8d6c66f610b31a4068",()=>f.setTaskLabels,"60ba8b9b50e3c96b2dd502b362b8abb1f22b3fd7e6",()=>e.updateProject,"60e8d0cf95a46e42187063c717ad0a48a4fce02858",()=>l.updateTaskStatus,"60ecfea1ec1b61566df8bd7edc9723fb9ab08e75b6",()=>g.globalSearch]),c()}catch(a){c(a)}},!1),76052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_0k8dkbn._.js"].map(b=>a.l(b))).then(()=>b(492067)))},98813,a=>{a.v(a=>Promise.resolve().then(()=>a(962620)))},507502,a=>{a.v(a=>Promise.resolve().then(()=>a(845427)))},752453,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0dv.-zu._.js"].map(b=>a.l(b))).then(()=>b(897667)))},144264,a=>{a.v(a=>Promise.resolve().then(()=>a(233405)))},662330,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0t_zq~v._.js"].map(b=>a.l(b))).then(()=>b(818992)))},200442,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__096w7g2._.js"].map(b=>a.l(b))).then(()=>b(941750)))},323970,a=>{a.v(a=>Promise.resolve().then(()=>a(522734)))},173855,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_open-targets_ts_12a-_~u._.js"].map(b=>a.l(b))).then(()=>b(289288)))},889618,a=>{a.v(a=>Promise.resolve().then(()=>a(163812)))},482848,a=>{a.v(a=>Promise.resolve().then(()=>a(874533)))}];
|
|
46
|
-
|
|
47
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__03x8axh._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[980738,(a,b,c)=>{b.exports=a.x("node-pty-c710df912a232c01",()=>require("node-pty-c710df912a232c01"))},433541,a=>a.a(async(b,c)=>{try{let b=await a.y("ws-4df7fc762dfa9a52");a.n(b),c()}catch(a){c(a)}},!0),504446,(a,b,c)=>{b.exports=a.x("net",()=>require("net"))},328521,a=>{"use strict";var b=a.i(874533),c=a.i(912714),d=a.i(750227);let e=(0,a.i(319997).getSignalDir)(),f="pid-",g=["claude","claude-code","codex"];function h(a){return(0,d.join)(e,`${f}${a}`)}async function i(a,b){try{await (0,c.mkdir)(e,{recursive:!0,mode:448}),await (0,c.writeFile)(h(a),String(b),{mode:384})}catch{}}async function j(a){try{await (0,c.unlink)(h(a))}catch{}}async function k(){let a;try{a=await (0,c.readdir)(e)}catch{return 0}let h=0;for(let i of a){let a;if(!i.startsWith(f))continue;let j=(0,d.join)(e,i);try{a=parseInt((await (0,c.readFile)(j,"utf-8")).trim(),10)}catch{continue}if((await (0,c.unlink)(j).catch(()=>{}),Number.isInteger(a)&&!(a<=1)&&function(a){try{return process.kill(a,0),!0}catch(a){return a?.code==="EPERM"}}(a)&&"win32"!==process.platform)&&function(a){try{let c=(0,b.execFileSync)("ps",["-p",String(a),"-o","command="],{encoding:"utf-8",timeout:3e3}).trim();if(!c)return!1;return g.some(a=>c.includes(a))}catch{return!1}}(a))try{process.kill(-a,"SIGKILL"),h++}catch{}}return h}a.s(["clearSessionPid",0,j,"reapOrphanedProcesses",0,k,"recordSessionPid",0,i])},42847,a=>{"use strict";var b=a.i(980738),c=a.i(163812);class d{taskId;_pty;killed=!1;disconnectTimer=null;_buffer="";static BUFFER_MAX=51200;_onData;_exitListeners=[];_idleTimer=null;_idleThresholdMs;_onIdle;_idleFired=!1;constructor(a,e,f,g,h,i,j,k,l){this.taskId=a,this._onData=h,this._onIdle=k??null,this._idleThresholdMs=Math.max(l??18e4,18e4);const m={...(0,c.stripClaudeNestingEnv)((0,c.ensurePathInEnv)(process.env)),TERM:"xterm-color",...j};try{this._pty=b.spawn(e,f,{name:"xterm-color",cols:80,rows:24,cwd:g,env:m})}catch(a){throw console.error(`[pty] spawn failed: command="${e}", cwd="${g}", PATH="${m.PATH?.slice(0,200)}"`),a}this._pty.onData(a=>{this._buffer+=a,this._buffer.length>d.BUFFER_MAX&&(this._buffer=this._buffer.slice(this._buffer.length-d.BUFFER_MAX)),this._resetIdleTimer(),this._onData(a)}),this._pty.onExit(({exitCode:a,signal:b})=>{for(let c of(this.killed=!0,this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null),i(a,b),this._exitListeners))c(a)}),this._resetIdleTimer()}_resetIdleTimer(){this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null),null===this._onIdle||this.killed||this._idleFired||(this._idleTimer=setTimeout(()=>{this._idleFired=!0,this._onIdle?.()},this._idleThresholdMs))}setDataListener(a){this._onData=a}setExitListener(a){this._exitListeners=[a]}write(a){this.killed||(this._resetIdleTimer(),this._pty.write(a))}resize(a,b){this.killed||this._pty.resize(a,b)}getBuffer(){return this._buffer}get isIdle(){return this._idleFired}get pid(){return this._pty.pid}kill(a){if(!this.killed){this.killed=!0,this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null);try{this._pty.kill(a)}catch{}}}forceKill(){try{this._pty.kill("SIGKILL")}catch{}this.killed=!0}killTree(a=3e3){if(this.killed)return;this.killed=!0,this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null);let b=this._pty.pid;try{process.kill(-b,"SIGTERM")}catch{try{this._pty.kill()}catch{}return}let c=setTimeout(()=>{try{process.kill(-b,"SIGKILL")}catch{}},a);c.unref?.()}}a.s(["PtySession",0,d])},962620,a=>{"use strict";var b=a.i(42847),c=a.i(163812),d=a.i(328521);let e=globalThis;e.__ptySessions||(e.__ptySessions=new Map);let f=e.__ptySessions;function g(a){let b=f.get(a);if(b)return f.delete(a),b.disconnectTimer&&(clearTimeout(b.disconnectTimer),b.disconnectTimer=null),b.killTree(),b}function h(a){g(a)&&(0,d.clearSessionPid)(a)}function i(){for(let a of f.keys())h(a)}let j=globalThis;"phase-production-build"===process.env.NEXT_PHASE||j.__ptySignalHandlersRegistered||(j.__ptySignalHandlersRegistered=!0,process.once("SIGTERM",()=>{console.error("[session-store] SIGTERM received — cleaning up PTY sessions"),i()}),process.once("SIGINT",()=>{console.error("[session-store] SIGINT received — cleaning up PTY sessions"),i()})),a.s(["createSession",0,function(a,e,h,i,j,k,l,m,n){g(a);let{command:o,args:p}=(0,c.resolveSpawnTargetSync)(e,h),q=new b.PtySession(a,o,p,i,j,k,l,m,n);return f.set(a,q),(0,d.recordSessionPid)(a,q.pid),q},"destroyAllSessions",0,i,"destroySession",0,h,"getSession",0,function(a){return f.get(a)}])},312369,a=>{"use strict";var b=a.i(761469);async function c(a,c){let d=await b.db.systemConfig.findUnique({where:{key:a}});if(!d)return c;try{return JSON.parse(d.value)}catch{return c}}a.s(["readConfigValue",0,c])},830296,a=>{"use strict";a.s(["CONFIG_DEFAULTS",0,{"git.pathMappingRules":{defaultValue:[],type:"object",label:"Git Path Mapping Rules"},"system.maxUploadBytes":{defaultValue:0x3200000,type:"number",label:"Max Upload Size (bytes)"},"system.maxConcurrentExecutions":{defaultValue:20,type:"number",label:"Max Concurrent Executions"},"system.maxReadableFileBytes":{defaultValue:5242880,type:"number",label:"Max Readable File Size (bytes)"},"system.backupDir":{defaultValue:"",type:"string",label:"Backup Directory"},"git.timeoutSec":{defaultValue:30,type:"number",label:"Git Operation Timeout (seconds)"},"search.resultLimit":{defaultValue:20,type:"number",label:"Search Result Limit"},"search.allModeCap":{defaultValue:5,type:"number",label:"All-Mode Per-Type Cap"},"search.debounceMs":{defaultValue:250,type:"number",label:"Search Debounce (ms)"},"search.snippetLength":{defaultValue:80,type:"number",label:"Snippet Length (characters)"},"search.codeTimeoutSec":{defaultValue:30,type:"number",label:"Code Search Timeout (seconds)"},"board.archiveDelayDays":{defaultValue:7,type:"number",label:"Archive Delay (days)"},"missions.grid.minCols":{defaultValue:1,type:"number",label:"Grid Min Columns"},"missions.grid.maxCols":{defaultValue:5,type:"number",label:"Grid Max Columns"},"missions.grid.minRows":{defaultValue:1,type:"number",label:"Grid Min Rows"},"missions.grid.maxRows":{defaultValue:5,type:"number",label:"Grid Max Rows"},"terminal.app":{defaultValue:"Terminal",type:"string",label:"Default Terminal App"},"editor.command":{defaultValue:"",type:"string",label:"Default Editor Command"},"terminal.wsPort":{defaultValue:3001,type:"number",label:"WebSocket Port"},"terminal.idleTimeoutSec":{defaultValue:180,type:"number",label:"Idle Timeout (seconds)"},"terminal.fontSize":{defaultValue:13,type:"number",label:"Terminal Font Size"},"terminal.fontFamily":{defaultValue:"Menlo, Monaco, 'Courier New', monospace",type:"string",label:"Terminal Font Family"},"assistant.systemPrompt":{defaultValue:'You are Tower Assistant — the built-in AI operator for the Tower task management platform.\n\n## Identity\n- You are a task management operator, NOT a coding assistant.\n- You can ONLY use Tower MCP tools. You CANNOT read files, edit code, run shell commands, or search the web.\n- Always respond in the same language the user uses.\n\n## Capabilities\nWhen users ask what you can do, respond with EXACTLY these 6 groups. Translate to the user\'s language.\n\n1. **Workspace & Project** — View, create, update, delete workspaces and projects. Search projects and repositories.\n2. **Task Management** — Create tasks (priority, labels, worktree branch isolation, sub-path, auto-start). Move task status (TODO → IN_PROGRESS → IN_REVIEW → DONE / CANCELLED). Update task info and labels.\n3. **Execution Monitor** — Start task execution, check execution status, get terminal output, send commands to running terminals.\n4. **Daily Report & Todo** — Generate daily work summary (completed + in-progress). View pending task list sorted by priority.\n5. **Labels & Notes & Assets** — Manage workspace labels, project notes, and file attachments.\n6. **Global Search** — Search tasks, projects, repositories, notes, and assets by keyword.\n\nDo NOT list any capabilities beyond the above. Do NOT mention code editing, debugging, testing, git operations, or any development capabilities.\n\n## Scope Boundary\nIf the user asks you to write code, explain code, debug, search the web, read/write files, or anything outside Tower task management, reply:\n"抱歉,我只能帮你管理工作区、项目和任务。编码、调试等操作请在任务终端中完成。"\n\n## 任务来源标注\n每次通过 create_task 创建任务时,在 description 末尾追加一段来源标注(与任务终端、飞书的来源规范一致):\n## 来源\nTower Assistant',type:"string",label:"Assistant System Prompt"},"assistant.displayMode":{defaultValue:"sidebar",type:"string",label:"Assistant Display Mode"},"assistant.communicationMode":{defaultValue:"chat",type:"string",label:"Assistant Communication Mode"},"task.defaultUseWorktree":{defaultValue:!0,type:"boolean",label:"Default: Use Worktree"},"task.defaultAutoStart":{defaultValue:!1,type:"boolean",label:"Default: Auto-start Execution"},"task.mcpDefaultsConfigured":{defaultValue:!1,type:"boolean",label:"MCP Task Defaults Configured"},"task.systemDirective":{defaultValue:"## Tower 系统说明\n你运行在 Tower(一个 AI 任务调度平台)的任务终端里,为某个具体任务而启动。你的产出会被 Tower 记录为「任务执行」,任务结束后进入 review 状态,可能被派生你的父任务或用户审阅。环境变量里有 TOWER_TASK_ID(当前任务 id)、TOWER_TASK_TITLE(任务标题)等,可用来识别自己。\n\n## 首要原则\n- **项目自身规则优先**:工作目录里项目的 CLAUDE.md / AGENTS.md 等约定优先级最高,与本声明冲突时以项目规则为准。本声明只规定「作为一个 Tower 任务」的通用行为,不覆盖具体项目的技术规范。\n- **只做任务范围内的事**:紧扣当前任务目标,不顺手改无关代码、不擅自扩大改动面。\n- **完成即验证**:有测试 / 构建 / lint / 类型检查就先跑一遍再宣称「做完」;失败如实报告,不确定就说不确定,别把没验证的当成功。\n- **长进程别占住终端**:dev server、watch 等需长时间前台运行的命令,用完即停或放后台,别让任务终端被永久卡住(Tower 的 Preview 有独立管理,通常不需要你手动起 dev server)。\n- **默认用中文回复**(除非项目或用户另有要求)。\n\n## Git 工作规则\n- 完成一段有意义的改动后,主动用清晰的 message 创建 commit(约定式:feat / fix / refactor / docs / chore…),不要留一堆未提交的改动。\n- 若当前任务运行在 Git worktree 隔离分支里(worktree 任务):**只 commit,不要 push** —— worktree 分支由 Tower 统一管理与合并。\n- 若当前任务直接在项目主工作区里(非 worktree 任务):可以 push。\n- 不确定自己是不是 worktree 任务时,默认只 commit、不 push。\n\n## 并发与协作(多任务可能同改一个仓库)\n- Tower 常同时跑多个任务、甚至同一仓库多个 worktree。**只 stage / commit 你这轮亲手改的文件**,一律 `git add <明确路径>`;禁止 `git add .` / `-A` / `-u` / `git commit -a`,别把别的窗口或用户手动的改动一并提交。\n- `git status` 里不认识、不是你改的文件一律不碰、不提交,需要时在小结里提一句即可。\n- 不 force-push、不改写共享分支历史;不对不属于你的改动做 `git reset --hard` / `git clean -fd`。\n\n## Worktree 纪律(务必防止改到主仓库)\n- 开工第一件事先跑 `pwd`:它就是你的工作根。之后所有 Read/Edit/Write/Bash 路径都以它为基准,优先用相对路径;用绝对路径时必须以这个根开头,**绝不**凭上下文/记忆里的主仓库路径去拼绝对路径——这正是历次「worktree 里看什么都没变」的根因。\n- 判断自己是不是 worktree 任务:`pwd` 落在 `.worktrees/task-$TOWER_TASK_ID` 下、或 `git branch --show-current` 为 `task/$TOWER_TASK_ID`,即是。是则严格走本节纪律。\n- 动任何文件 / 提交前,先核对三件事都成立:① `git rev-parse --show-toplevel` 等于当前 worktree 根(不是主仓库路径);② `git branch --show-current` 为 `task/$TOWER_TASK_ID`(不是 main / feature / 其它分支);③ 要改的文件绝对路径含 `.worktrees/task-$TOWER_TASK_ID/` 段。任一不满足,说明你操作到主仓库了,**立即停止、不要提交**,先纠正目录。\n- 绝不 `cd` 到主仓库或 worktree 之外去改文件 / 跑 git;所有 git 命令都在当前 worktree 根内执行(跨目录时用 `git -C <worktree 根>` 显式指定,别靠默认 cwd 猜)。\n- 万一已经改错到主仓库:把改动搬回 worktree(`git -C <worktree 根> cherry-pick <误提交>` 或重打一遍),主仓库工作区用 `git restore` 复原、误提交按情况处理——已被别的提交叠在上面就用 `git revert`(保历史、不动别人的提交),确认独占且未 push 才用 `git reset`;最后如实报告两边最终状态,不要隐瞒。\n\n## 汇报与交接\n- 产出会被 review,结尾给一段可速读的小结:做了什么、改了哪些关键文件、验证结果、还剩什么没做 / 被什么阻塞、有没有需要用户或父任务拍板的决策。\n- 真被外部因素阻塞(待接口、待素材、待人决策)就**明确说明并停下**,别反复空转或自行臆测硬做。\n- 危险 / 不可逆操作(删数据库、删大目录、`rm -rf`、`drop table`、对外发布 / 部署)先说明并征得确认再执行。\n\n## 无人值守(环境变量 TOWER_UNATTENDED=1 时尤其重要)\n- 你可能在无人盯守下运行。两个与人沟通的 MCP 工具:`ask_human`(阻塞:**记录**问题并挂起任务——本回合到此为止,人回复后自动唤醒、带答案续跑)和 `notify_human`(非阻塞:**记录**一条进度/FYI 后立即继续,不必等回复、不挂起)。**注意:这两个工具只在 Tower 内记录(/harness 面板可见),本身不把消息发给人**;无人值守下要真正通知到人,须按系统提示里「无人值守外推」段先经平台渠道把消息发出去,再调这两个工具留档。\n- 需要人拍板才能推进(选型、二义需求、缺关键信息、对外发布/部署等)→ 用 `ask_human` 把问题和可选项讲清楚,然后停下等待,别自行臆测硬做。\n- 危险 / 不可逆操作(删库、删大目录、`rm -rf`、`drop table`、force-push、对外发布)→ 一律先 `ask_human` 征得同意再执行,即使终端已放开权限也不例外。\n- 只是想同步进展或抛个 FYI、无需回复 → 用 `notify_human`,发完继续干。\n- 调用 `ask_human` 后立即结束本回合、不要再继续操作;它会关闭终端省资源,人回复后任务自动恢复。\n\n## 本轮 commit 回显\n- **每轮回复的最后,必须把本轮创建的 commit 列出来让用户一眼看到**。格式固定:先一行加粗小标题 `**本轮 commit**`(不要用 `---` 分隔线、不要用 emoji),换行后每条 commit 单独一行、以 `- ` 开头,形如 `` - `<短 hash>` <message 首行> ``(hash 用行内代码包住)。本轮没有创建任何 commit 时,只回一行 `本轮无 commit`。",type:"string",label:"Task System Directive (built-in)"},"harness.targets":{defaultValue:[],type:"object",label:"Harness Notify Targets (multi-platform registry)"},"harness.pendingTtlDays":{defaultValue:14,type:"number",label:"Harness Pending Ask TTL (days)"}}])},279697,a=>{"use strict";function b(a,b){let c=new Date(b);c.setHours(0,0,0,0);let d=new Date(c);return d.setDate(d.getDate()-(a-1)),{startOfToday:c,doneCutoff:d}}a.s(["ARCHIVE_DELAY_KEY",0,"board.archiveDelayDays","DEFAULT_ARCHIVE_DELAY_DAYS",0,7,"archivedTaskWhere",0,function(a,c=new Date){let{startOfToday:d,doneCutoff:e}=b(a,c);return{status:{in:["DONE","CANCELLED"]},OR:[{status:"CANCELLED",updatedAt:{lt:d}},{status:"DONE",doneAt:{lt:e}},{status:"DONE",doneAt:null}]}},"normalizeArchiveDelayDays",0,function(a){let b=Math.floor(Number(a));return Number.isFinite(b)?Math.min(Math.max(b,1),365):7},"visibleTaskWhere",0,function(a,c=new Date){let{startOfToday:d,doneCutoff:e}=b(a,c);return{OR:[{status:{notIn:["DONE","CANCELLED"]}},{status:"CANCELLED",updatedAt:{gte:d}},{status:"DONE",doneAt:{gte:e}}]}}])},980999,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(761469),f=a.i(830296),g=a.i(279697),h=a.i(989927),i=a.i(163812),j=a.i(823615),k=a.i(630048),l=b([j]);async function m(a,b){let c=await e.db.systemConfig.findUnique({where:{key:a}});if(!c)return b;try{return JSON.parse(c.value)}catch{return b}}async function n(a,b){await e.db.systemConfig.upsert({where:{key:a},create:{key:a,value:JSON.stringify(b)},update:{value:JSON.stringify(b)}})}async function o(){let a=await m(g.ARCHIVE_DELAY_KEY,g.DEFAULT_ARCHIVE_DELAY_DAYS);return(0,g.normalizeArchiveDelayDays)(a)}async function p(a){let b=a.trim();if(!b)return{path:"",source:"empty"};try{let a=await m("git.pathMappingRules",[]),c=(0,h.matchGitPathRule)(b,a);if(c)return{path:c,source:"rule"};return{path:(0,h.gitUrlToLocalPath)(b),source:"fallback"}}catch{return{path:(0,h.gitUrlToLocalPath)(b),source:"fallback"}}}async function q(a){let{path:b}=await p(a);return b}async function r(a){let b=await e.db.systemConfig.findMany({where:{key:{in:a}}}),c=Object.fromEntries(b.map(a=>{try{return[a.key,JSON.parse(a.value)]}catch{return[a.key,null]}})),d={};for(let b of a)d[b]=b in c?c[b]:f.CONFIG_DEFAULTS[b]?.defaultValue??null;return d}async function s(){return(0,i.detectShells)()}async function t(){return(0,i.detectTerminalApps)()}async function u(){return(0,i.detectEditors)()}async function v(){return{platform:process.platform}}async function w(){let a=(0,j.getActiveWsPort)();if(null!==a)return a;let b=parseInt(process.env.PORT||"3000",10);return m("terminal.wsPort",b+1)}[j]=l.then?(await l)():l,(0,k.ensureServerEntryExports)([m,n,o,p,q,r,s,t,u,v,w]),(0,d.registerServerReference)(m,"6022dc05b858325d54679979f48ec6986b1257019b",null),(0,d.registerServerReference)(n,"600c0360fc4ce13a01e338268cc272dde1b16ec989",null),(0,d.registerServerReference)(o,"0018c44abcb186f7ba3403be069e7e9f6da8616369",null),(0,d.registerServerReference)(p,"406446cc2b798b6d5a8041b1a353ccdb1582682094",null),(0,d.registerServerReference)(q,"404ef38e3210ade662b09756d1418c29f2fab30709",null),(0,d.registerServerReference)(r,"40a8d9987d8b71ec56eef76f4a4ea0c28fdcd8edc0",null),(0,d.registerServerReference)(s,"003999071c484871321a8108440d7489c3f12e05ad",null),(0,d.registerServerReference)(t,"005c2726b05a25fd0df69e27f64e4c4d3ac62d4aeb",null),(0,d.registerServerReference)(u,"000978f807ee1c10e9f24a8760105b9a4286b20f03",null),(0,d.registerServerReference)(v,"00b51d8a985a33823255b31ad031b117cbf4d4026b",null),(0,d.registerServerReference)(w,"00bbe981391f69ab27be7d2c2adf20dcedb8f4caea",null),a.s(["getActualWsPort",0,w,"getArchiveDelayDays",0,o,"getAvailableEditors",0,u,"getAvailableShells",0,s,"getAvailableTerminalApps",0,t,"getConfigValue",0,m,"getConfigValues",0,r,"getPlatformInfo",0,v,"resolveGitLocalPath",0,q,"resolveGitLocalPathWithSource",0,p,"setConfigValue",0,n]),c()}catch(a){c(a)}},!1)];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__04wbr9x._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[924868,(a,b,c)=>{b.exports=a.x("fs/promises",()=>require("fs/promises"))},989927,a=>{"use strict";var b=a.i(446786),c=a.i(814747);function d(a){return a.startsWith("~/")?c.default.join(b.default.homedir(),a.slice(2)):a}function e(a){let b,c=a.match(/^git@([^:]+):(.+)$/);if(c)return{host:c[1],pathSegments:f(c[2]).split("/").filter(Boolean)};try{b=new URL(a)}catch{return null}return{host:b.hostname,pathSegments:f(decodeURIComponent(b.pathname)).split("/").filter(Boolean)}}function f(a){return a.replace(/\.git\/?$/,"")}a.s(["expandHome",0,d,"gitUrlToLocalPath",0,function(a){let b=a.trim();if(!b)return"";try{let a=e(b);if(!a)return"";let{host:f,pathSegments:g}=a;if("code.iflytek.com"===f){let a,b;return d((a=[...g],"osc"===a[0]&&"_source"===a[1]&&(a=a.slice(2)),((b=a.indexOf("-"))>0&&(a=a.slice(0,b)),0===a.length)?"":`~/company/${a.join("/")}`))}if("github.com"===f){var c;let a,b;return d((a=(c=g)[0],b=c[1],a&&b?`${"jp-liu"===a?"~/project/i":"~/project/f"}/${b}`:""))}let h=g[g.length-1];return h?d(`~/project/f/${h}`):""}catch{return""}},"matchGitPathRule",0,function(a,b){if(!b.length)return"";let c=a.trim();if(!c)return"";let f=e(c);if(!f)return"";let{host:g,pathSegments:h}=f,i=h[0]??"",j=h[h.length-1]??"",k=[...b].sort((a,b)=>{let c=+("*"===a.ownerMatch),d=+("*"===b.ownerMatch);return c!==d?c-d:a.priority-b.priority}),l=h.join("/");for(let a of k){if(a.host!==g||"*"!==a.ownerMatch&&a.ownerMatch!==i)continue;let b=a.localPathTemplate;if(b.includes("{path}"))return d(b.replace("{path}",l).replace("{owner}",i).replace("{repo}",j).replace(/\/+$/,""));let c=b.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return d(`${c}/${j}`)}return""}])},292380,742978,a=>{"use strict";var b=a.i(912714),c=a.i(902157),d=a.i(750227);function e(a,b){let c=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(a.files["package.json"]);return!!c&&b in{...c.dependencies,...c.devDependencies}}let f=[{id:"next",name:"Next.js",icon:"simple-icons:nextdotjs",detect:a=>e(a,"next"),command:"pnpm dev",port:3e3,installCommand:"pnpm install",installMarker:["node_modules"],readyRegex:/Ready in \d+/i,urlExtractRegex:/(https?:\/\/[^\s]+)/,docUrl:"https://nextjs.org/docs"},{id:"nuxt",name:"Nuxt",icon:"simple-icons:nuxtdotjs",detect:a=>e(a,"nuxt"),command:"pnpm dev",port:3e3,installCommand:"pnpm install",installMarker:["node_modules"],readyRegex:/Nuxt .* ready in/i,urlExtractRegex:/(https?:\/\/[^\s]+)/},{id:"uniapp",name:"uni-app",icon:"simple-icons:vuedotjs",detect:a=>e(a,"@dcloudio/uni-app"),command:"pnpm dev:h5",port:9e3,installCommand:"pnpm install",installMarker:["node_modules"],readyRegex:/ready in|App running at|Network:/i,urlExtractRegex:/Local:\s+(https?:\/\/[^\s]+)/,docUrl:"https://uniapp.dcloud.net.cn/"},{id:"vue-cli",name:"Vue (CLI)",icon:"simple-icons:vuedotjs",detect:a=>e(a,"@vue/cli-service"),command:"pnpm serve",port:8080,installCommand:"pnpm install",installMarker:["node_modules"],readyRegex:/App running at|DONE\s+Compiled successfully/i,urlExtractRegex:/Local:\s+(https?:\/\/[^\s]+)/,docUrl:"https://cli.vuejs.org/"},{id:"cra",name:"Create React App",icon:"simple-icons:react",detect:a=>e(a,"react-scripts"),command:"pnpm start",port:3e3,installCommand:"pnpm install",installMarker:["node_modules"],readyRegex:/Compiled successfully|webpack compiled/i,urlExtractRegex:/Local:\s+(https?:\/\/[^\s]+)/,docUrl:"https://create-react-app.dev/"},{id:"vite",name:"Vite",icon:"simple-icons:vite",detect:a=>e(a,"vite"),command:"pnpm dev",port:5173,installCommand:"pnpm install",installMarker:["node_modules"],readyRegex:/ready in \d+\s*ms/i,urlExtractRegex:/Local:\s+(https?:\/\/[^\s]+)/},{id:"angular",name:"Angular",icon:"simple-icons:angular",detect:a=>e(a,"@angular/core"),command:"pnpm start",port:4200,installCommand:"pnpm install",installMarker:["node_modules"],readyRegex:/Compiled successfully|Application bundle generation complete/i,urlExtractRegex:/(https?:\/\/[^\s]+)/},{id:"spring-boot-maven",name:"Spring Boot (Maven)",icon:"simple-icons:springboot",detect:a=>{let b=a.files["pom.xml"];return!!(b&&/spring-boot-starter/.test(b))},command:"./mvnw spring-boot:run",port:8080,installCommand:"./mvnw dependency:resolve",installMarker:["target"],readyRegex:/Started \w+Application in [\d.]+ seconds/i,urlExtractRegex:null,startTimeoutMs:12e4},{id:"spring-boot-gradle",name:"Spring Boot (Gradle)",icon:"simple-icons:springboot",detect:a=>{let b=a.files["build.gradle"]??a.files["build.gradle.kts"];return!!(b&&/spring-boot/.test(b))},command:"./gradlew bootRun",port:8080,installCommand:"./gradlew --refresh-dependencies",installMarker:[".gradle"],readyRegex:/Started \w+Application in [\d.]+ seconds/i,urlExtractRegex:null,startTimeoutMs:12e4},{id:"django",name:"Django",icon:"simple-icons:django",detect:a=>null!==a.files["manage.py"]&&void 0!==a.files["manage.py"],command:"python manage.py runserver",port:8e3,installCommand:"pip install -r requirements.txt",installMarker:[".venv","venv"],readyRegex:/Starting development server at/i,urlExtractRegex:/at\s+(https?:\/\/[^\s]+)/},{id:"fastapi",name:"FastAPI",icon:"simple-icons:fastapi",detect:a=>{let b=a.files["requirements.txt"]??"",c=a.files["pyproject.toml"]??"";return/fastapi/i.test((b??"")+(c??""))},command:"uvicorn main:app --reload",port:8e3,installCommand:"pip install -r requirements.txt",installMarker:[".venv","venv"],readyRegex:/Application startup complete|Uvicorn running on/i,urlExtractRegex:/running on\s+(https?:\/\/[^\s]+)/},{id:"flask",name:"Flask",icon:"simple-icons:flask",detect:a=>{let b=a.files["requirements.txt"]??"";return/^flask/im.test(b??"")},command:"flask --app app run",port:5e3,installCommand:"pip install -r requirements.txt",installMarker:[".venv","venv"],readyRegex:/Running on\s+http/i,urlExtractRegex:/Running on\s+(https?:\/\/[^\s]+)/},{id:"go-generic",name:"Go",icon:"simple-icons:go",detect:a=>null!==a.files["go.mod"]&&void 0!==a.files["go.mod"],command:"go run .",port:8080,installCommand:"go mod download",installMarker:["go.sum"],readyRegex:null,urlExtractRegex:/(https?:\/\/[^\s]+)/},{id:"static",name:"Static HTML",icon:"simple-icons:html5",detect:a=>null!==a.files["index.html"]&&void 0!==a.files["index.html"]&&!a.files["package.json"]&&!a.files["pom.xml"],command:"npx serve -l {port} .",port:3e3,installCommand:null,installMarker:null,readyRegex:/Accepting connections at/i,urlExtractRegex:/(https?:\/\/[^\s]+)/}];a.s(["PRESETS",0,f],742978);let g=["package.json","pom.xml","build.gradle","build.gradle.kts","manage.py","requirements.txt","pyproject.toml","go.mod","index.html"];async function h(a){return Object.fromEntries(await Promise.all(g.map(async c=>{try{let e=await (0,b.readFile)((0,d.join)(a,c),"utf-8");return[c,e]}catch{return[c,null]}})))}async function i(a){return{files:await h(a),hasDir:()=>!1}}async function j(a){try{await (0,b.access)(a,c.constants.R_OK)}catch{return null}let d=await i(a);for(let a of f)try{if(a.detect(d))return a}catch{}return null}a.s(["detectPreset",0,j],292380)},244256,a=>{"use strict";var b=a.i(815429),c=a.i(924868),d=a.i(912714),e=a.i(814747),f=a.i(761469),g=a.i(188139),h=a.i(496877),i=a.i(989927),j=a.i(292380);async function k(){return f.db.workspace.findMany({select:{id:!0,name:!0,projects:{select:{id:!0,name:!0,alias:!0},orderBy:{createdAt:"asc"}}},orderBy:{updatedAt:"desc"}})}async function l(a){return f.db.workspace.findUnique({where:{id:a},include:{projects:{include:{tasks:{orderBy:[{order:"asc"},{createdAt:"desc"}]},repositories:!0}}}})}async function m(a){let b=h.createWorkspaceSchema.parse(a),c=await f.db.workspace.create({data:b});return(0,g.revalidatePath)("/workspaces"),c}async function n(a,b){let c=h.updateWorkspaceSchema.parse(b),d=await f.db.workspace.update({where:{id:a},data:c});return(0,g.revalidatePath)("/workspaces"),d}async function o(a){let b=h.reorderWorkspacesSchema.parse(a);if(new Set(b).size!==b.length)throw Error("Duplicate workspace ids in reorder request");let c=new Set((await f.db.workspace.findMany({select:{id:!0}})).map(a=>a.id));for(let a of b)if(!c.has(a))throw Error("Unknown workspace id in reorder request");if(b.length!==c.size)throw Error("Reorder request must include every workspace");await f.db.$transaction(b.map((a,b)=>f.db.workspace.update({where:{id:a},data:{order:b}}))),(0,g.revalidatePath)("/workspaces")}async function p(a){if(await f.db.workspace.count()<=1)throw Error("Cannot delete the last workspace");await f.db.workspace.delete({where:{id:a}}),(0,g.revalidatePath)("/workspaces")}async function q(b){let k=h.createProjectSchema.parse(b),l=k.localPath?(0,i.expandHome)(k.localPath):void 0;if(l&&!k.gitUrl&&e.default.isAbsolute(l))try{await (0,c.mkdir)(l,{recursive:!0})}catch(a){throw Error(`无法创建项目目录 ${l}: ${a.message}`)}let m=await f.db.project.create({data:{name:k.name,alias:k.alias,description:k.description,type:k.gitUrl?"GIT":"NORMAL",gitUrl:k.gitUrl||void 0,localPath:l,projectType:k.projectType,previewCommand:k.previewCommand,workspaceId:k.workspaceId}});try{let{ensureTowerTask:b}=await a.A(76052);await b(m.id,k.name)}catch(a){console.warn("Failed to auto-create Tower task",a)}if(l)try{if((await (0,d.readdir)(l).catch(()=>[])).length>0){let a=await (0,j.detectPreset)(l);a&&await f.db.project.update({where:{id:m.id},data:{previewPreset:a.id}})}}catch{}return(0,g.revalidatePath)("/workspaces"),m}async function r(a,b){let c={...h.updateProjectSchema.parse(b)};c.localPath&&(c.localPath=(0,i.expandHome)(c.localPath));let e=await f.db.project.update({where:{id:a},data:c});if(void 0!==b.localPath){let c=b.localPath?(0,i.expandHome)(b.localPath):null;if(c)try{if((await (0,d.readdir)(c).catch(()=>[])).length>0){let b=await (0,j.detectPreset)(c);await f.db.project.update({where:{id:a},data:{previewPreset:b?.id??null}})}}catch{}}return(0,g.revalidatePath)("/workspaces"),e}async function s(b){let c=await f.db.task.findMany({where:{projectId:b},include:{project:{select:{localPath:!0}}}}),{destroySession:d}=await a.A(98813),{removeWorktree:e}=await a.A(507502);for(let a of c){try{d(a.id)}catch{}if(await f.db.taskExecution.updateMany({where:{taskId:a.id,status:{in:["PENDING","RUNNING","PAUSED"]}},data:{status:"FAILED",endedAt:new Date}}),a.project?.localPath)try{await e(a.project.localPath,a.id)}catch{}["DONE","CANCELLED"].includes(a.status)||await f.db.task.update({where:{id:a.id},data:{status:"CANCELLED"}})}await f.db.project.delete({where:{id:b}}),(0,g.revalidatePath)("/workspaces")}async function t(a){return f.db.project.findFirst({where:{localPath:a},include:{workspace:!0}})}async function u(a=3){return f.db.workspace.findMany({select:{id:!0,name:!0,projects:{select:{id:!0,name:!0,alias:!0,tasks:{where:{status:{in:["TODO","IN_PROGRESS","IN_REVIEW"]},NOT:{labels:{some:{label:{name:"Tower",isBuiltin:!0}}}}},select:{id:!0,title:!0,status:!0,priority:!0,executions:{where:{sessionId:{not:null}},select:{sessionId:!0},orderBy:{createdAt:"desc"},take:1}},orderBy:{updatedAt:"desc"},take:a},_count:{select:{tasks:{where:{status:{in:["TODO","IN_PROGRESS","IN_REVIEW"]},NOT:{labels:{some:{label:{name:"Tower",isBuiltin:!0}}}}}}}}},orderBy:{createdAt:"asc"}}},orderBy:{updatedAt:"desc"}})}async function v(){return f.db.workspace.findMany({select:{id:!0,name:!0,projects:{select:{id:!0,name:!0,alias:!0,tasks:{where:{OR:[{status:{in:["TODO","IN_PROGRESS","IN_REVIEW"]}},{labels:{some:{label:{name:"Tower",isBuiltin:!0}}}}]},select:{id:!0,title:!0,status:!0,priority:!0,labels:{where:{label:{name:"Tower",isBuiltin:!0}},select:{labelId:!0}},executions:{where:{sessionId:{not:null}},select:{sessionId:!0},orderBy:{createdAt:"desc"},take:1}},orderBy:{updatedAt:"desc"}},_count:{select:{tasks:{where:{status:{in:["TODO","IN_PROGRESS","IN_REVIEW"]},NOT:{labels:{some:{label:{name:"Tower",isBuiltin:!0}}}}}}}}},orderBy:{createdAt:"asc"}}},orderBy:[{order:"asc"},{updatedAt:"desc"}]})}async function w(a=10){return f.db.project.findMany({where:{localPath:{not:null}},select:{id:!0,name:!0,alias:!0,localPath:!0,workspaceId:!0,type:!0,updatedAt:!0},orderBy:{updatedAt:"desc"},take:a})}async function x(b){let c=await f.db.project.findUnique({where:{id:b},select:{id:!0,name:!0}});if(!c)throw Error("Project not found");let{ensureTowerTask:d}=await a.A(76052);return d(c.id,c.name)}(0,a.i(630048).ensureServerEntryExports)([k,l,m,n,o,p,q,r,s,t,u,v,w,x]),(0,b.registerServerReference)(k,"00aab6ff79952ffd82cb986ec267a844b5e815bd10",null),(0,b.registerServerReference)(l,"40cd152827b2541e22314d39c52175c67430121cfd",null),(0,b.registerServerReference)(m,"403ea5ae0f3d1e97155fd492ca9a022b8bbe330b90",null),(0,b.registerServerReference)(n,"60376b404b9ee9ec39227faf56b6e478179be622ad",null),(0,b.registerServerReference)(o,"406da6d9dca36b89032a75437431a27da281273a09",null),(0,b.registerServerReference)(p,"402b9e604ebfd42af76626d470e58c634b243bf544",null),(0,b.registerServerReference)(q,"405752d645249795637c0b214cbb0e6091f1af27f8",null),(0,b.registerServerReference)(r,"60ba8b9b50e3c96b2dd502b362b8abb1f22b3fd7e6",null),(0,b.registerServerReference)(s,"4039d8595b35d9b2ce680752357376b2493b4c2de0",null),(0,b.registerServerReference)(t,"40f5f2ac714a7abd314a396020362aed61fb4b74cc",null),(0,b.registerServerReference)(u,"407cc4cf282a353498dc0c8bc1f9018e458c4d37b7",null),(0,b.registerServerReference)(v,"0030355a1abb5bf3387a318cd4519959200544964e",null),(0,b.registerServerReference)(w,"400a2caf730db05d2446002677f12c7ee98469ce20",null),(0,b.registerServerReference)(x,"40537a6f4c1ea4b4f73abb0d0f7fbd5335f66d9335",null),a.s(["createProject",0,q,"createWorkspace",0,m,"deleteProject",0,s,"deleteWorkspace",0,p,"getOrCreateTowerTaskId",0,x,"getProjectByLocalPath",0,t,"getRecentLocalProjects",0,w,"getWorkspaceById",0,l,"getWorkspacesWithActiveTasks",0,v,"getWorkspacesWithProjects",0,k,"getWorkspacesWithRecentTasks",0,u,"reorderWorkspaces",0,o,"updateProject",0,r,"updateWorkspace",0,n])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__05xg05r._.js.map
|