@henlii/pidance 0.2.36 → 0.2.39
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/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +13 -10
- package/.next/build-manifest.json +6 -6
- package/.next/prerender-manifest.json +18 -3
- package/.next/required-server-files.json +29 -9
- package/.next/routes-manifest.json +20 -0
- package/.next/server/app/_global-error/page.js +2 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.meta +16 -5
- package/.next/server/app/_global-error.rsc +3 -3
- package/.next/server/app/_global-error.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +16 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.meta +16 -5
- package/.next/server/app/_not-found.rsc +7 -7
- package/.next/server/app/_not-found.segments/_full.segment.rsc +7 -7
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +20 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/about/route.js +1 -1
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/running/events/route.js +2 -2
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/submissions/[submissionId]/route.js +1 -1
- package/.next/server/app/api/agent-settings/route.js +2 -2
- package/.next/server/app/api/attachments/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/ui-session/route.js +1 -1
- package/.next/server/app/api/auth/ui-sessions/[id]/route.js +1 -1
- package/.next/server/app/api/auth/ui-sessions/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/create/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +3 -3
- package/.next/server/app/api/files/save-as/route.js +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/message-media/route.js +1 -1
- package/.next/server/app/api/models/enabled/route.js +1 -0
- package/.next/server/app/api/models/enabled/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/refresh/route.js +1 -0
- package/.next/server/app/api/models/refresh/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/raw/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/plugins/search/route.js +1 -1
- package/.next/server/app/api/plugins/updates/route.js +1 -1
- package/.next/server/app/api/preferences/route.js +1 -1
- package/.next/server/app/api/project-assets/route.js +2 -2
- package/.next/server/app/api/prompts/route.js +1 -1
- package/.next/server/app/api/pty/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/command-entry/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/info/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/lock/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/lock/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/outline/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/tool-results/[toolCallId]/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/settings/raw/route.js +2 -2
- package/.next/server/app/api/settings/remote/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/subagent-runs/route.js +1 -1
- package/.next/server/app/api/update/apply/route.js +2 -2
- package/.next/server/app/api/update/check/route.js +1 -1
- package/.next/server/app/icon.png/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.meta +11 -4
- package/.next/server/app/index.rsc +5 -5
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +19 -3
- package/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/page.js +13 -14
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +13 -10
- package/.next/server/chunks/1069.js +1 -1
- package/.next/server/chunks/1207.js +2 -2
- package/.next/server/chunks/1813.js +1 -1
- package/.next/server/chunks/2325.js +2 -2
- package/.next/server/chunks/2430.js +193 -0
- package/.next/server/chunks/329.js +1 -1
- package/.next/server/chunks/3379.js +1 -1
- package/.next/server/chunks/3960.js +1 -1
- package/.next/server/chunks/42.js +1 -0
- package/.next/server/chunks/4367.js +1 -1
- package/.next/server/chunks/4674.js +1 -1
- package/.next/server/chunks/4741.js +152 -7
- package/.next/server/chunks/4980.js +1 -1
- package/.next/server/chunks/5274.js +1 -1
- package/.next/server/chunks/5304.js +2 -2
- package/.next/server/chunks/5318.js +1 -1
- package/.next/server/chunks/5420.js +1 -0
- package/.next/server/chunks/5726.js +1 -1
- package/.next/server/chunks/7307.js +1 -1
- package/.next/server/chunks/7594.js +11 -10
- package/.next/server/chunks/7818.js +1 -0
- package/.next/server/chunks/8359.js +1 -1
- package/.next/server/chunks/8443.js +1 -0
- package/.next/server/chunks/8645.js +1 -1
- package/.next/server/chunks/9280.js +3 -3
- package/.next/server/chunks/940.js +1 -1
- package/.next/server/chunks/981.js +1 -1
- package/.next/server/chunks/9935.js +1 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +151 -6
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/prefetch-hints.json +39 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{1377.e883e13864574c26.js → 1377.540f9477711dcf8f.js} +1 -1
- package/.next/static/chunks/{3308.23eadd1744bb967c.js → 3308.c0a1a01bfd826d65.js} +2 -2
- package/.next/static/chunks/{370.57cfa27da8567918.js → 370.8e8f3cf8eb0e29dd.js} +1 -1
- package/.next/static/chunks/3794-0a1186eb85c3950f.js +52 -0
- package/.next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js +1 -0
- package/.next/static/chunks/6121.eb9023b1cbc78ee2.js +1 -0
- package/.next/static/chunks/{5519-9fb47277a49697d8.js → 7444-80a846a8795bf6f4.js} +1 -1
- package/.next/static/chunks/{776.fe8e64ab3669a915.js → 776.4d418d68f76336c7.js} +1 -1
- package/.next/static/chunks/{8233.a465d18b04719c6d.js → 8233.e3b47a59bd72a3b3.js} +1 -1
- package/.next/static/chunks/{90542734.b75ad0df50bf68f5.js → 90542734.ae439f2382f58c51.js} +1 -1
- package/.next/static/chunks/9780-864f35ace9287b0b.js +1 -0
- package/.next/static/chunks/app/_global-error/page-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/about/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent/running/events/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent/submissions/[submissionId]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/agent-settings/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/attachments/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/ui-session/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/ui-sessions/[id]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/auth/ui-sessions/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/cwd/create/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/files/save-as/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/home/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/message-media/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/models/enabled/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/models/refresh/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/models/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/models-config/raw/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/plugins/search/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/plugins/updates/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/preferences/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/project-assets/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/prompts/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/pty/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/archive/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/command-entry/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/info/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/lock/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/outline/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/tool-results/[toolCallId]/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/settings/raw/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/settings/remote/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/skills/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/subagent-runs/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/update/apply/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/api/update/check/route-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/app/page-5f78e55ff0d87ec7.js +24 -0
- package/.next/static/chunks/{da12927c.00775c0e4542fd3e.js → da12927c.476aa688a637649c.js} +2 -2
- package/.next/static/chunks/{e868780c-16e43c5968ccf2bf.js → e868780c-1584512c612787d7.js} +1 -1
- package/.next/static/chunks/framework-b33a8f5d57cd8d87.js +1 -0
- package/.next/static/chunks/main-1b407bf74905d84a.js +5 -0
- package/.next/static/chunks/{main-app-06b2b50b226e40d1.js → main-app-d353053e6467499a.js} +1 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-8f70dda1817cd20c.js +1 -0
- package/.next/static/chunks/{webpack-d2379fd13c5c78c6.js → webpack-2423c4442766d244.js} +1 -1
- package/.next/static/css/ea117138d33e0b37.css +1 -0
- package/.next/static/vD56I5OFkAr4Y9TsF1L7c/_buildManifest.js +1 -0
- package/README.en.md +10 -1
- package/README.md +10 -1
- package/bin/pidance-auth-gate.js +41 -11
- package/bin/pidance-http-server.js +7 -0
- package/bin/pidance.js +5 -1
- package/bin/pty-ws.js +126 -3
- package/package.json +6 -4
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +0 -5
- package/.next/server/app/_global-error.segments/_head.segment.rsc +0 -5
- package/.next/server/app/_global-error.segments/_index.segment.rsc +0 -5
- package/.next/server/app/_not-found.segments/_head.segment.rsc +0 -6
- package/.next/server/app/_not-found.segments/_index.segment.rsc +0 -7
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -5
- package/.next/server/app/index.segments/_head.segment.rsc +0 -6
- package/.next/server/app/index.segments/_index.segment.rsc +0 -7
- package/.next/server/chunks/188.js +0 -1
- package/.next/server/chunks/319.js +0 -45
- package/.next/server/chunks/6953.js +0 -1
- package/.next/static/9m7dmaudtohXTam6OFJrW/_buildManifest.js +0 -1
- package/.next/static/chunks/3794-907785a527d8128b.js +0 -32
- package/.next/static/chunks/4bd1b696-e356ca5ba0218e27.js +0 -1
- package/.next/static/chunks/6121.5b8cb3199531d194.js +0 -1
- package/.next/static/chunks/9780-190981a7d5f4799b.js +0 -1
- package/.next/static/chunks/app/_global-error/page-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/about/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent/running/events/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent/submissions/[submissionId]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/agent-settings/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/attachments/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/ui-session/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/ui-sessions/[id]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/auth/ui-sessions/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/cwd/create/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/files/save-as/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/home/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/message-media/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/models/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/models-config/raw/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/plugins/search/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/plugins/updates/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/project-assets/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/prompts/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/pty/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/archive/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/command-entry/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/info/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/outline/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/tool-results/[toolCallId]/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/sessions/search/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/settings/raw/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/settings/remote/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/skills/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/subagent-runs/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/update/apply/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/api/update/check/route-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/app/page-a67f4b63843f6c4b.js +0 -24
- package/.next/static/chunks/framework-711ef29bc66f648c.js +0 -1
- package/.next/static/chunks/main-8e7ef001ea9dd641.js +0 -5
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-7c63ab7d3880fba7.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-7c63ab7d3880fba7.js +0 -1
- package/.next/static/css/82b378f5d9cf6c9d.css +0 -1
- /package/.next/static/{9m7dmaudtohXTam6OFJrW → vD56I5OFkAr4Y9TsF1L7c}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7198,a.ids=[7198],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},
|
|
2
|
-
`;try{(0,d.writeFileSync)(f,g,{flag:"wx",mode:384}),(0,d.renameSync)(f,a)}catch(a){try{(0,d.unlinkSync)(f)}catch{}throw a}}function k(a){return"string"==typeof a&&a.length>0?a:void 0}function l(a,b){return"all"===a||"one-at-a-time"===a?a:b}class m{constructor(a={}){this.dirty=!1;const b=a.agentDir??(0,f.$M)();this.globalPath=(0,e.join)((0,e.resolve)(b),"settings.json"),this.global=i(this.globalPath)}static create(a,b){return new m({agentDir:b})}view(){return this.global}getDefaultProvider(){return k(this.view().defaultProvider)}getDefaultModel(){return k(this.view().defaultModel)}getDefaultThinkingLevel(){return k(this.view().defaultThinkingLevel)}getSteeringMode(){return l(this.view().steeringMode,"one-at-a-time")}getFollowUpMode(){return l(this.view().followUpMode,"one-at-a-time")}getCompactionSettings(){let a=h(this.view().compaction)?this.view().compaction:{};return{enabled:"boolean"!=typeof a.enabled||a.enabled,reserveTokens:"number"==typeof a.reserveTokens?a.reserveTokens:16384,keepRecentTokens:"number"==typeof a.keepRecentTokens?a.keepRecentTokens:2e4}}getRetrySettings(){let a=h(this.view().retry)?this.view().retry:{};return{enabled:"boolean"!=typeof a.enabled||a.enabled,maxRetries:"number"==typeof a.maxRetries?a.maxRetries:3,baseDelayMs:"number"==typeof a.baseDelayMs?a.baseDelayMs:2e3}}getPackages(){return this.global.packages}setDefaultProvider(a){this.global.defaultProvider=a,this.dirty=!0}setDefaultModel(a){this.global.defaultModel=a,this.dirty=!0}setDefaultModelAndProvider(a,b){this.global.defaultProvider=a,this.global.defaultModel=b,this.dirty=!0}setDefaultThinkingLevel(a){this.global.defaultThinkingLevel=a,this.dirty=!0}setSteeringMode(a){this.global.steeringMode=a,this.dirty=!0}setFollowUpMode(a){this.global.followUpMode=a,this.dirty=!0}setCompactionEnabled(a){let b=h(this.global.compaction)?{...this.global.compaction}:{};b.enabled=a,this.global.compaction=b,this.dirty=!0}setRetryEnabled(a){let b=h(this.global.retry)?{...this.global.retry}:{};b.enabled=a,this.global.retry=b,this.dirty=!0}setPackages(a){this.global.packages=a,this.dirty=!0}async flush(){this.dirty&&(j(this.globalPath,this.global),this.dirty=!1)}flushSync(){this.dirty&&(j(this.globalPath,this.global),this.dirty=!1)}}function n(a){return Array.isArray(a)?a:[]}function o(a){return"string"==typeof a?a:a.source}function p(a){return"string"!=typeof a&&Array.isArray(a.extensions)&&0===a.extensions.length&&Array.isArray(a.skills)&&0===a.skills.length&&Array.isArray(a.prompts)&&0===a.prompts.length&&Array.isArray(a.themes)&&0===a.themes.length}function q(a,b={}){return"global"===a?n(i(b.agentDir?(0,e.join)((0,e.resolve)(b.agentDir),"settings.json"):(0,f.pA)()).packages):b.cwd?n(i(g(b.cwd)).packages):[]}function r(a,b,c={}){if("global"===a){let a=c.agentDir?(0,e.join)((0,e.resolve)(c.agentDir),"settings.json"):(0,f.pA)(),d=i(a);d.packages=b,j(a,d);return}if(!c.cwd)throw Error("project packages 需要 cwd");let d=g(c.cwd),h=i(d);h.packages=b,j(d,h)}function s(a,b,c,d={}){let e=q(b,d),f=!1,g=e.map(b=>o(b)!==a?b:(f=!0,c)?{..."string"==typeof b?{source:b}:b,extensions:[],skills:[],prompts:[],themes:[]}:o(b));return!!f&&(r(b,g,d),!0)}function t(a){let b=new Map;for(let c of q("global",a))b.set(`global\0${o(c)}`,p(c));if(a.cwd)for(let c of q("project",a))b.set(`project\0${o(c)}`,p(c));return b}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=
|
|
1
|
+
(()=>{var a={};a.id=7198,a.ids=[7198],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},60396:(a,b,c)=>{"use strict";c.d(b,{$M:()=>f,CZ:()=>h,Mc:()=>g,pA:()=>i});var d=c(62228),e=c(86697);function f(a=process.env){let b=a.PI_CODING_AGENT_DIR?.trim();if(b)return"~"===b?(0,d.homedir)():b.startsWith("~/")||b.startsWith("~\\")?(0,e.join)((0,d.homedir)(),b.slice(2)):b;return(0,e.join)((0,d.homedir)(),".pi","agent")}function g(a=process.env){return(0,e.join)(f(a),"models.json")}function h(a=process.env){return(0,e.join)(f(a),"auth.json")}function i(a=process.env){return(0,e.join)(f(a),"settings.json")}},62228:a=>{"use strict";a.exports=require("node:os")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67169:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>i,PUT:()=>j,dynamic:()=>h});var d=c(23211),e=c(89477),f=c(60396),g=c(92395);let h="force-dynamic";async function i(){try{let a,b=(0,f.pA)();try{a=(0,e.readFileSync)(b,"utf8")}catch{a="{}\n"}return d.NextResponse.json({json:a},{headers:{"Cache-Control":"no-store"}})}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}async function j(a){try{var b;let c,e=await a.json().catch(()=>({}));if("string"!=typeof e.json)return d.NextResponse.json({error:"json must be a string"},{status:400});if(Buffer.byteLength(e.json,"utf8")>1e6)return d.NextResponse.json({error:"settings.json exceeds 1000000 bytes"},{status:413});try{c=JSON.parse(e.json)}catch(b){let a=b instanceof Error?b.message:String(b);return d.NextResponse.json({error:`Invalid JSON: ${a}`},{status:400})}if(b=c,"object"!=typeof b||null===b||Array.isArray(b))return d.NextResponse.json({error:"settings.json must be a JSON object"},{status:400});return(0,g.FN)((0,f.pA)(),c),d.NextResponse.json({ok:!0})}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}},78335:()=>{},84343:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/settings/raw/route",pathname:"/api/settings/raw",filename:"route",bundlePath:"app/api/settings/raw/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/settings/raw/route.ts",nextConfigOutput:"",userland:()=>c(67169),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/settings/raw/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{"use strict";a.exports=require("node:path")},89477:a=>{"use strict";a.exports=require("node:fs")},92395:(a,b,c)=>{"use strict";c.d(b,{Ej:()=>q,FN:()=>j,J7:()=>s,Tj:()=>r,oK:()=>g,oT:()=>m,wq:()=>i,xH:()=>t});var d=c(89477),e=c(86697),f=c(60396);function g(a){return(0,e.join)((0,e.resolve)(a),".pi","settings.json")}function h(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function i(a){if(!(0,d.existsSync)(a))return{};try{let b=JSON.parse((0,d.readFileSync)(a,"utf8"));return h(b)?{...b}:{}}catch{return{}}}function j(a,b){let c=(0,e.dirname)(a);(0,d.mkdirSync)(c,{recursive:!0});let f=`${a}.${process.pid}.${Date.now()}.tmp`,g=`${JSON.stringify(b,null,2)}
|
|
2
|
+
`;try{(0,d.writeFileSync)(f,g,{flag:"wx",mode:384}),(0,d.renameSync)(f,a)}catch(a){try{(0,d.unlinkSync)(f)}catch{}throw a}}function k(a){return"string"==typeof a&&a.length>0?a:void 0}function l(a,b){return"all"===a||"one-at-a-time"===a?a:b}class m{constructor(a={}){this.dirty=!1;const b=a.agentDir??(0,f.$M)();this.globalPath=(0,e.join)((0,e.resolve)(b),"settings.json"),this.global=i(this.globalPath)}static create(a,b){return new m({agentDir:b})}view(){return this.global}getDefaultProvider(){return k(this.view().defaultProvider)}getDefaultModel(){return k(this.view().defaultModel)}getDefaultThinkingLevel(){return k(this.view().defaultThinkingLevel)}getSteeringMode(){return l(this.view().steeringMode,"one-at-a-time")}getFollowUpMode(){return l(this.view().followUpMode,"one-at-a-time")}getCompactionSettings(){let a=h(this.view().compaction)?this.view().compaction:{};return{enabled:"boolean"!=typeof a.enabled||a.enabled,reserveTokens:"number"==typeof a.reserveTokens?a.reserveTokens:16384,keepRecentTokens:"number"==typeof a.keepRecentTokens?a.keepRecentTokens:2e4}}getRetrySettings(){let a=h(this.view().retry)?this.view().retry:{};return{enabled:"boolean"!=typeof a.enabled||a.enabled,maxRetries:"number"==typeof a.maxRetries?a.maxRetries:3,baseDelayMs:"number"==typeof a.baseDelayMs?a.baseDelayMs:2e3}}getPackages(){return this.global.packages}setDefaultProvider(a){this.global.defaultProvider=a,this.dirty=!0}setDefaultModel(a){this.global.defaultModel=a,this.dirty=!0}setDefaultModelAndProvider(a,b){this.global.defaultProvider=a,this.global.defaultModel=b,this.dirty=!0}setDefaultThinkingLevel(a){this.global.defaultThinkingLevel=a,this.dirty=!0}setSteeringMode(a){this.global.steeringMode=a,this.dirty=!0}setFollowUpMode(a){this.global.followUpMode=a,this.dirty=!0}setCompactionEnabled(a){let b=h(this.global.compaction)?{...this.global.compaction}:{};b.enabled=a,this.global.compaction=b,this.dirty=!0}setRetryEnabled(a){let b=h(this.global.retry)?{...this.global.retry}:{};b.enabled=a,this.global.retry=b,this.dirty=!0}setPackages(a){this.global.packages=a,this.dirty=!0}async flush(){this.dirty&&(j(this.globalPath,this.global),this.dirty=!1)}flushSync(){this.dirty&&(j(this.globalPath,this.global),this.dirty=!1)}}function n(a){return Array.isArray(a)?a:[]}function o(a){return"string"==typeof a?a:a.source}function p(a){return"string"!=typeof a&&Array.isArray(a.extensions)&&0===a.extensions.length&&Array.isArray(a.skills)&&0===a.skills.length&&Array.isArray(a.prompts)&&0===a.prompts.length&&Array.isArray(a.themes)&&0===a.themes.length}function q(a,b={}){return"global"===a?n(i(b.agentDir?(0,e.join)((0,e.resolve)(b.agentDir),"settings.json"):(0,f.pA)()).packages):b.cwd?n(i(g(b.cwd)).packages):[]}function r(a,b,c={}){if("global"===a){let a=c.agentDir?(0,e.join)((0,e.resolve)(c.agentDir),"settings.json"):(0,f.pA)(),d=i(a);d.packages=b,j(a,d);return}if(!c.cwd)throw Error("project packages 需要 cwd");let d=g(c.cwd),h=i(d);h.packages=b,j(d,h)}function s(a,b,c,d={}){let e=q(b,d),f=!1,g=e.map(b=>o(b)!==a?b:(f=!0,c)?{..."string"==typeof b?{source:b}:b,extensions:[],skills:[],prompts:[],themes:[]}:o(b));return!!f&&(r(b,g,d),!0)}function t(a){let b=new Map;for(let c of q("global",a))b.set(`global\0${o(c)}`,p(c));if(a.cwd)for(let c of q("project",a))b.set(`project\0${o(c)}`,p(c));return b}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=84343));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=9258,a.ids=[9258],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},716:a=>{a.exports=require("node:crypto")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=9258,a.ids=[9258],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},716:a=>{a.exports=require("node:crypto")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63093:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/settings/remote/route",pathname:"/api/settings/remote",filename:"route",bundlePath:"app/api/settings/remote/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/settings/remote/route.ts",nextConfigOutput:"",userland:()=>c(75889),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/settings/remote/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},75889:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>j,PUT:()=>k,dynamic:()=>h,runtime:()=>i});var d=c(23211),e=c(78749),f=c(7635),g=c(24813);let h="force-dynamic",i="nodejs";async function j(){let a=(0,f.uy)();return d.NextResponse.json({passwordSet:(0,f.OW)((0,e.IM)(process.env),a),remoteEnabled:a.remoteEnabled,port:a.port})}async function k(a){let b=await a.json().catch(()=>null),c={password:"string"==typeof b?.password?b.password:void 0,clearPassword:b?.clearPassword===!0,remoteEnabled:"boolean"==typeof b?.remoteEnabled?b.remoteEnabled:void 0,port:"number"==typeof b?.port||b?.port===null?b.port:void 0},h=(0,f.uy)(),i=(0,f.Um)(h,c,(0,e.IM)(process.env));if("error"in i)return d.NextResponse.json({error:i.error},{status:400,headers:{"Cache-Control":"no-store"}});if((0,f.jT)(i.config),i.changedPassword)try{(0,g.Lo)(process.env),(0,g.hx)()}catch{}return d.NextResponse.json({passwordSet:(0,f.OW)((0,e.IM)(process.env),i.config),remoteEnabled:i.config.remoteEnabled,port:i.config.port},{headers:{"Cache-Control":"no-store"}})}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")},91645:a=>{a.exports=require("net")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,329],()=>b(b.s=63093));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=2053,a.ids=[2053],a.modules={
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2053,a.ids=[2053],a.modules={31:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/check/route",pathname:"/api/skills/check",filename:"route",bundlePath:"app/api/skills/check/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/check/route.ts",nextConfigOutput:"",userland:()=>c(21972),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/check/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},21972:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>h,dynamic:()=>g});var d=c(23211),e=c(19038),f=c(34556);let g="force-dynamic";async function h(a){try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd:"";if(!c)return d.NextResponse.json({error:"cwd required"},{status:400});let g="string"==typeof b.package?b.package:void 0,h="global"===b.scope||"project"===b.scope?b.scope:void 0;if(g&&!h||!g&&h)return d.NextResponse.json({error:"package and scope must be provided together"},{status:400});let{skills:i}=await (0,f.y)(c),j=i.map(a=>a.install).filter(a=>!!a).filter(a=>!g||a.package===g&&a.scope===h);if(g&&0===j.length)return d.NextResponse.json({error:"Installed skill not found"},{status:404});let k=await (0,e.S7)(j,{githubToken:process.env.GITHUB_TOKEN||process.env.GH_TOKEN});return d.NextResponse.json({updates:k})}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5319],()=>b(b.s=31));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7812,a.ids=[7812],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},
|
|
1
|
+
(()=>{var a={};a.id=7812,a.ids=[7812],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},43987:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>h,dynamic:()=>f});var d=c(23211),e=c(84107);let f="force-dynamic",g=/\x1B\[[0-9;]*m/g;async function h(a){try{let{package:b,scope:c,cwd:f}=await a.json();if(!b?.trim())return d.NextResponse.json({error:"package required"},{status:400});let h="project"!==c;if(!h&&!f?.trim())return d.NextResponse.json({error:"cwd required for project install"},{status:400});let i=["skills","add",b.trim(),"-y","--agent","pi"];h&&i.push("-g"),console.log(`[skills/install] running: npx ${i.join(" ")}`);let{stdout:j,stderr:k}=await (0,e.a)(i,{timeout:6e4,cwd:!h&&f?f:void 0,env:{...process.env,FORCE_COLOR:"0"}}),l=(j+k).replace(g,"");if(!/Installation complete|Installed \d+ skill/.test(l))return d.NextResponse.json({error:l.slice(-300)||"Install failed"},{status:500});return d.NextResponse.json({success:!0,output:l})}catch(b){let a=((b.stdout??"")+(b.stderr??"")).replace(g,"");return d.NextResponse.json({error:a||(b.message??String(b))},{status:500})}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},84107:(a,b,c)=>{"use strict";c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},97715:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/install/route",pathname:"/api/skills/install",filename:"route",bundlePath:"app/api/skills/install/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/install/route.ts",nextConfigOutput:"",userland:()=>c(43987),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/install/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=97715));module.exports=c})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=9968,a.ids=[9968],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},400:(a,b,c)=>{c.d(b,{OJ:()=>n,Sk:()=>j,j0:()=>l});var d=c(89477),e=c.n(d),f=c(86697),g=c.n(f),h=c(716);let i="true"===process.env.SAVE_FSYNC;class j extends Error{constructor(a,b){super(b),this.code=a}}function k(a){return/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function l(a,b,c=k(a)||k(b)){let d=c?g().win32:g(),e=d.resolve(a),f=d.resolve(b),h=c?e.toLowerCase():e,i=c?f.toLowerCase():f;return h!==i&&h.startsWith(i.endsWith(d.sep)?i:i+d.sep)}function m(a,b){let c=a?.code;if("ENOENT"===c)throw new j("not-found",b);if("EACCES"===c||"EPERM"===c)throw new j("forbidden","文件访问被拒绝");throw a}function n(a){let b,c,d,{target:f,cwd:k,allowedRoots:n,content:o,baseline:p}=a,q=function(a,b){if(!Number.isFinite(b?.mtimeMs)||b.mtimeMs<0||!Number.isFinite(b?.size)||b.size<0)throw new j("bad-request","保存请求格式无效");for(let b=0;b<a.length;b+=1){let c=a.charCodeAt(b);if(c>=55296&&c<=57343){if(c<=56319&&b+1<a.length&&a.charCodeAt(b+1)>=56320&&57343>=a.charCodeAt(b+1)){b+=1;continue}throw new j("bad-request","内容包含不可逆 UTF-8 字符")}}return Buffer.from(a,"utf8")}(o,p),r=a.isAllowed??((a,b)=>[...b].some(b=>a===b||a.startsWith(`${b}/`)||a.startsWith(`${b}\\`)));if(!r(f,n))throw new j("forbidden","目标不在授权目录内");try{b=e().lstatSync(f)}catch(a){return m(a,"目标文件不存在")}if(b.isSymbolicLink())throw new j("forbidden","目标不能是符号链接");if(!b.isFile())throw new j("bad-request","目标不是常规文件");try{for(let a of(c=e().realpathSync(f),d=new Set,n))try{d.add(e().realpathSync(a))}catch{}if(!r(c,d))throw new j("forbidden","目标不在授权目录内");if(e().existsSync(k)){for(let a=g().dirname(f);l(a,k);a=g().dirname(a))if(e().lstatSync(a).isSymbolicLink())throw new j("forbidden","目标父目录不能是符号链接")}}catch(a){if(a instanceof j)throw a;return m(a,"目标路径不存在")}try{e().statSync(c)}catch(a){return m(a,"目标文件不存在")}let s=g().dirname(c),t=g().join(s,`.pi-save-${process.pid}-${(0,h.randomUUID)()}`);try{if(e().writeFileSync(t,q,{flag:"wx",mode:4095&b.mode}),e().chmodSync(t,4095&b.mode),i){let a=e().openSync(t,"r+");try{e().fsyncSync(a)}finally{e().closeSync(a)}}e().renameSync(t,c)}catch(a){try{e().unlinkSync(t)}catch{}return m(a,"保存目标不存在")}let u=e().statSync(c);return{path:f,size:u.size,mtimeMs:u.mtimeMs}}},716:a=>{a.exports=require("node:crypto")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10210:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$v:()=>p,fN:()=>r,uX:()=>q});var e=c(89477),f=c(62228),g=c(86697),h=c(716),i=c(60396),j=c(34556),k=c(60601),l=a([k]);function m(a){if(!a||"string"!=typeof a)return!1;try{return(0,e.statSync)(a).isDirectory()}catch{return!1}}k=(l.then?(await l)():l)[0];class r extends Error{constructor(a,b){super(b),this.code=a}}let s="disable-model-invocation",t={loadSkills:a=>(0,j.y)(a),agentDir:(0,i.$M)(),homeDir:(0,f.homedir)()};function n(a,b,c,d){let f=a=>a.some(a=>{var c;let d,f;try{d=(0,e.realpathSync)(a)}catch{return!1}return c=d,f=(0,g.relative)((0,g.resolve)(c),(0,g.resolve)(b)),""!==f&&".."!==f&&!f.startsWith(`..${g.sep}`)&&!(0,g.isAbsolute)(f)}),h=[(0,g.join)(d.agentDir,"skills"),(0,g.join)(d.homeDir,".agents","skills")];if(f(h))return"global";let i=[(0,g.join)(c,".pi","skills"),(0,g.join)(c,".agents","skills")];return f(i)?"project":"denied"}function o(a,b){return[(0,g.join)(b.agentDir,"skills"),(0,g.join)(b.homeDir,".agents","skills"),(0,g.join)(a,".pi","skills"),(0,g.join)(a,".agents","skills")]}async function p(a,b=t){let c,d,f,i,{cwd:j,filePath:l,disableModelInvocation:q}=a;if(!j||"string"!=typeof j)throw new r("bad-request","cwd required");if(!l||"string"!=typeof l)throw new r("bad-request","filePath required");if("boolean"!=typeof q)throw new r("bad-request","disableModelInvocation must be boolean");if(!(0,g.isAbsolute)(l))throw new r("bad-request","filePath must be absolute");if(!m(j))throw new r("bad-request","cwd must be an existing directory");let{skills:u}=await b.loadSkills(j);if(!u.find(a=>(0,g.resolve)(a.filePath)===(0,g.resolve)(l)))throw new r("not-found","skill not in loader list for cwd");try{c=(0,e.lstatSync)(l)}catch{throw new r("not-found","file not found")}if(c.isSymbolicLink())throw new r("forbidden","target must not be a symbolic link");if(!c.isFile())throw new r("bad-request","target is not a regular file");try{d=(0,e.realpathSync)(l)}catch{throw new r("forbidden","target path cannot be resolved")}let v=n(l,d,j,b);if("denied"===v)throw new r("forbidden","skill source is not writable (package/temporary or symlink escape)");!function(a,b){let c=(0,g.dirname)(a);for(;;){let a,d=b.some(a=>(0,g.resolve)(a)===(0,g.resolve)(c));try{a=(0,e.lstatSync)(c)}catch{if(d)throw new r("not-found","file not found");if(c===(0,g.dirname)(c))break;c=(0,g.dirname)(c);continue}if(a.isSymbolicLink())throw new r("forbidden","path component must not be a symbolic link");if(d||c===(0,g.dirname)(c))break;c=(0,g.dirname)(c)}}(l,o(j,b));try{f=(0,k.fu)(d)}catch(b){let a=b?.code;if("ENOENT"===a)throw new r("not-found","file not found");throw new r("forbidden","target cannot be read safely")}try{i=(0,e.readFileSync)(f,"utf8")}finally{(0,e.closeSync)(f)}let w=function(a,b){let c,d=(c=a.indexOf("\n"))>0&&13===a.charCodeAt(c-1)?"\r\n":"\n",e=function(a){let b=a.indexOf("\n");if(-1===b||"---"!==a.slice(0,b).replace(/\r$/,""))return null;let c=b+1,d=c;for(;d<=a.length;){let b=a.indexOf("\n",d),e=-1===b?a.length:b;if("---"===a.slice(d,e).replace(/\r$/,""))return{start:c,end:d};if(-1===b)break;d=b+1}return null}(a);if(!e)return b?`---${d}${s}: true${d}---${d}${a}`:a;let f=a.slice(e.start,e.end),g=RegExp(`^${s}\\s*:`,"m").test(f);if(b&&!g)return a.slice(0,e.start)+`${s}: true${d}`+a.slice(e.start);if(!b&&g){let b=f.replace(RegExp(`^${s}\\s*:.*(?:\r?
|
|
2
|
-
)`,"m"),"");if(b!==f)return a.slice(0,e.start)+b+a.slice(e.end)}return a}(i,q),x=(0,g.dirname)(d),y=(0,g.join)(x,`.pi-skill-${process.pid}-${(0,h.randomUUID)()}`);try{if((0,e.writeFileSync)(y,w,{flag:"wx",mode:4095&c.mode}),(0,e.lstatSync)(x).isSymbolicLink())throw new r("forbidden","target directory must not be a symbolic link");let a=(0,e.lstatSync)(d);if(a.isSymbolicLink())throw new r("forbidden","target must not be a symbolic link");if(!a.isFile())throw new r("bad-request","target is not a regular file");(0,e.renameSync)(y,d)}catch(a){try{(0,e.unlinkSync)(y)}catch{}if(a instanceof r)throw a;if(a?.code==="EACCES"||a?.code==="EPERM")throw new r("forbidden","file write denied");throw a}return{success:!0}}async function q(a,b=t){let c,{cwd:d,filePath:f}=a;if(!d||"string"!=typeof d)throw new r("bad-request","cwd required");if(!f||"string"!=typeof f)throw new r("bad-request","filePath required");if(!(0,g.isAbsolute)(f))throw new r("bad-request","filePath must be absolute");if(!m(d))throw new r("bad-request","cwd must be an existing directory");let{skills:h}=await b.loadSkills(d),i=h.find(a=>(0,g.resolve)(a.filePath)===(0,g.resolve)(f));if(!i)throw new r("not-found","skill not in loader list for cwd");let j=i.baseDir;if(!j||!(0,g.isAbsolute)(j))throw new r("bad-request","skill baseDir invalid");try{c=(0,e.realpathSync)(j)}catch{throw new r("not-found","skill directory not found")}let k=n((0,g.join)(j,"SKILL.md"),(0,g.join)(c,"SKILL.md"),d,b);if("denied"===k)throw new r("forbidden","skill source is not removable");let l=o(d,b).map(a=>{try{return(0,e.realpathSync)(a)}catch{return(0,g.resolve)(a)}});if(!l.some(a=>c===a||c.startsWith(a+g.sep)))throw new r("forbidden","skill directory outside allowed roots");if(l.some(a=>c===a))throw new r("forbidden","cannot remove skill root");try{(0,e.rmSync)(c,{recursive:!0,force:!1})}catch(a){if(a?.code==="ENOENT")throw new r("not-found","skill directory not found");if(a?.code==="EACCES"||a?.code==="EPERM")throw new r("forbidden","directory remove denied");throw a}return{success:!0}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},25252:(a,b,c)=>{c.d(b,{HM:()=>e,wz:()=>f});var d=c(50593);function e(){return globalThis.__piAdditionalAllowedRoots||(globalThis.__piAdditionalAllowedRoots=new Set),globalThis.__piAdditionalAllowedRoots}function f(a){if(!a)return;let b=(0,d.Nw)(a);e().add(b),globalThis.__piAllowedRootsCache?.roots.add(b)}},27910:a=>{a.exports=require("stream")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},34556:(a,b,c)=>{c.d(b,{y:()=>p});var d=c(60396),e=c(89477),f=c(62228),g=c(86697);function h(a,b){let c=[];try{var d;let f=(0,e.readFileSync)(a,"utf8"),h=function(a){let b={},c=a.split(/\r?\n/);if(!c[0]||"---"!==c[0].replace(/\r$/,""))return b;for(let a=1;a<c.length;a++){let d=c[a].replace(/\r$/,"");if("---"===d)break;let e=/^([A-Za-z0-9_-]+):\s*(.*)$/.exec(d);e&&(b[e[1]]=e[2].trim())}return b}(f),i=(0,g.dirname)(a);return{skill:{name:h.name||function(a){if("skill.md"===(0,g.basename)(a).toLowerCase())return(0,g.basename)((0,g.dirname)(a));let b=(0,g.basename)(a);return b.endsWith(".md")?b.slice(0,-3):b}(a),description:h.description??"",filePath:a,baseDir:i,disableModelInvocation:(d=h["disable-model-invocation"],void 0!==d&&"true"===d.trim().toLowerCase()),sourceInfo:{source:"local",scope:b}},diagnostics:c}}catch(d){let b=d instanceof Error?d.message:"failed to parse skill file";return c.push({type:"warning",message:b,path:a}),{skill:null,diagnostics:c}}}function i(a,b,c,d=0){let f,j=c??new Set;if(d>16)return{skills:[],diagnostics:[]};try{let b=(0,e.realpathSync)(a);if(j.has(b))return{skills:[],diagnostics:[]};j.add(b)}catch{}let k=[],l=[];try{f=(0,e.readdirSync)(a,{withFileTypes:!0})}catch{return{skills:k,diagnostics:l}}let m=f.find(a=>"SKILL.md"===a.name);if(m){let c=(0,g.join)(a,"SKILL.md");if(function(a,b){if(a.isFile())return!0;if(a.isSymbolicLink())try{return(0,e.statSync)(b).isFile()}catch{}return!1}(m,c)){let a=h(c,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}return{skills:k,diagnostics:l}}for(let c of f){if(c.name.startsWith(".")||"node_modules"===c.name)continue;let f=(0,g.join)(a,c.name),m=c.isDirectory(),n=c.isFile();if(c.isSymbolicLink())try{let a=(0,e.statSync)(f);m=a.isDirectory(),n=a.isFile()}catch{continue}if(m){let a=i(f,b,j,d+1);k.push(...a.skills),l.push(...a.diagnostics)}else if(n&&c.name.endsWith(".md")){let a=h(f,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}}return{skills:k,diagnostics:l}}var j=c(29021),k=c(21820),l=c(33873);function m(a){try{let b=JSON.parse((0,j.readFileSync)(a,"utf8"));return b.skills&&"object"==typeof b.skills?b.skills:{}}catch{return{}}}function n(a,b){let c=(0,l.relative)((0,l.resolve)(b),(0,l.resolve)(a));return""!==c&&".."!==c&&!c.startsWith(`..${l.sep}`)&&!(0,l.isAbsolute)(c)}function o(a,b,c){var d;let e=function(a,b){if(a[b])return a[b];let c=b.toLowerCase(),d=Object.keys(a).find(a=>a.toLowerCase()===c);return d?a[d]:void 0}(a,b);if(!e||"string"!=typeof e.source||!e.source.trim())return;let f="string"==typeof e.sourceType?e.sourceType:void 0,g=(d=e.source.trim(),"github"!==f?d.replace(/\/$/,""):d.replace(/^git\+/,"").replace(/^https?:\/\/github\.com\//,"").replace(/^git@github\.com:/,"").replace(/\.git$/,"").replace(/\/$/,""));if(!g)return;let h="string"==typeof e.skillPath?e.skillPath:void 0,i="string"==typeof e.ref?e.ref:void 0,j="global"===c?e.skillFolderHash:e.computedHash,k="string"==typeof j&&j?j:void 0,l="github"===f&&/^[\w.-]+\/[\w.-]+$/.test(g);return{package:`${g}@${b}`,scope:c,source:g,sourceType:f,skillsShUrl:"local"===f?void 0:function(a,b){if(!a||a.includes("://")||a.startsWith("git@"))return;let c=a.split("/").filter(Boolean).map(encodeURIComponent).join("/");if(c)return`https://skills.sh/${c}/${encodeURIComponent(b)}`}(g,b),...h&&{skillPath:h},...i&&{ref:i},...k&&{versionHash:k},canCheckForUpdates:!!(l&&h&&k&&("global"===c||!i))}}async function p(a){let b=(0,d.$M)(),{skills:c,diagnostics:p}=function(a){let{cwd:b,agentDir:c}=a,d=a.homeDir??(0,f.homedir)(),j=[(0,g.join)(c,"skills"),(0,g.join)(d,".agents","skills")],k=[(0,g.join)(b,".pi","skills"),(0,g.join)(b,".agents","skills"),...function(a,b){let c=[],d=(0,g.resolve)((0,g.join)(b,".agents","skills")),f=(0,g.resolve)(a),h=function(a){let b=(0,g.resolve)(a);for(;;){if((0,e.existsSync)((0,g.join)(b,".git")))return b;let a=(0,g.dirname)(b);if(a===b)return null;b=a}}(f);for(;;){let a=(0,g.join)(f,".agents","skills");if((0,g.resolve)(a)!==d&&c.push(a),h&&f===h)break;let b=(0,g.dirname)(f);if(b===f)break;f=b}return c}(b,d)],l=new Map,m=new Set,n=[],o=a=>{for(let b of(n.push(...a.diagnostics),a.skills)){let a;try{a=(0,e.realpathSync)(b.filePath)}catch{a=(0,g.resolve)(b.filePath)}if(!m.has(a)){if(l.get(b.name)){n.push({type:"collision",message:`name "${b.name}" collision`,path:b.filePath});continue}l.set(b.name,b),m.add(a)}}};for(let a of[...j,...k]){let b=j.some(b=>(0,g.resolve)(b)===(0,g.resolve)(a))?"user":"project";o(i(a,b))}for(let a of function(a){try{let b=JSON.parse((0,e.readFileSync)(a,"utf8")).skills;if(Array.isArray(b))return b.filter(a=>"string"==typeof a);if(b&&"object"==typeof b&&!Array.isArray(b)){let a=b.customDirectories;if(Array.isArray(a))return a.filter(a=>"string"==typeof a)}}catch{}return[]}((0,g.join)(c,"settings.json"))){let c=(0,g.resolve)(b,a);if(!(0,e.existsSync)(c)){n.push({type:"warning",message:"skill path does not exist",path:c});continue}try{let a=(0,e.statSync)(c),b=j.some(a=>(function(a,b){let c=(0,g.resolve)(b);if(a===c)return!0;let d=c.endsWith(g.sep)?c:`${c}${g.sep}`;return a.startsWith(d)})(c,a))?"user":"project";if(a.isDirectory())o(i(c,b));else if(a.isFile()&&c.endsWith(".md")){let a=h(c,b);o({skills:a.skill?[a.skill]:[],diagnostics:a.diagnostics})}else n.push({type:"warning",message:"skill path is not a markdown file",path:c})}catch(b){let a=b instanceof Error?b.message:"failed to read skill path";n.push({type:"warning",message:a,path:c})}}return{skills:Array.from(l.values()),diagnostics:n}}({cwd:a,agentDir:b});return{skills:function(a,{cwd:b,agentDir:c,globalLockPath:d=function({homeDir:a=(0,k.homedir)(),xdgStateHome:b=process.env.XDG_STATE_HOME}={}){return b?(0,l.join)(b,"skills",".skill-lock.json"):(0,l.join)(a,".agents",".skill-lock.json")}(),projectLockPath:e=(0,l.join)(b,"skills-lock.json")}){let f=m(d),g=m(e),h=(0,l.join)(c,"skills"),i=(0,l.join)(b,".pi","skills");return a.map(a=>{if(!(0,j.existsSync)(a.filePath))return a;let b=n(a.filePath,h)?o(f,a.name,"global"):n(a.filePath,i)?o(g,a.name,"project"):void 0;return b?{...a,install:b}:a})}(c,{cwd:a,agentDir:b}),diagnostics:p}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45403:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,PATCH:()=>j,dynamic:()=>l});var e=c(23211),f=c(34556),g=c(10210),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a){let{searchParams:b}=new URL(a.url),c=b.get("cwd");if(!c)return e.NextResponse.json({error:"cwd required"},{status:400});try{return e.NextResponse.json(await (0,f.y)(c))}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function j(a){try{let b=await a.json();return e.NextResponse.json(await (0,g.$v)({cwd:b.cwd??"",filePath:b.filePath??"",disableModelInvocation:b.disableModelInvocation??!1}))}catch(a){if(a instanceof g.fN){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return e.NextResponse.json({error:a.message},{status:b})}return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a){try{let b=await a.json();return e.NextResponse.json(await (0,g.uX)({cwd:b.cwd??"",filePath:b.filePath??""}))}catch(a){if(a instanceof g.fN){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return e.NextResponse.json({error:a.message},{status:b})}return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{a.exports=require("crypto")},60601:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{fu:()=>p,hI:()=>o,iM:()=>m});var e=c(89477),f=c.n(e),g=c(86697),h=c.n(g),i=c(400),j=c(80547),k=a([j]);function l(a){let b=a?.code;return"ENOENT"===b||"ENOTDIR"===b}function m(a,b){let c,d;try{c=f().realpathSync(a)}catch(a){if(l(a))return{kind:"not-found"};return{kind:"denied"}}try{d=f().statSync(c)}catch(a){if(l(a))return{kind:"not-found"};return{kind:"denied"}}if((0,j.bk)())return{kind:"ok",realPath:c,stat:d};let e=!1;for(let a of b){let b;try{b=f().realpathSync(a)}catch{continue}if(e=!0,c===b||(0,i.j0)(c,b))return{kind:"ok",realPath:c,stat:d}}return e?{kind:"outside-roots",realPath:c,stat:d}:{kind:"denied"}}function n(a){return"win32"===process.platform?a.toLowerCase():a}function o(a,b){try{return n(h().resolve(a))===n(b)}catch{return!1}}function p(a){let b="number"==typeof f().constants.O_NOFOLLOW?f().constants.O_NOFOLLOW:0,c=f().openSync(a,f().constants.O_RDONLY|b);try{if(!f().fstatSync(c).isFile())throw Error("Read path is not a regular file");return c}catch(a){try{f().closeSync(c)}catch{}throw a}}j=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69835:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$t:()=>w,Gt:()=>z,Lj:()=>y,Md:()=>x,eq:()=>n,fb:()=>u,fm:()=>v,ki:()=>r,qo:()=>m,uF:()=>o,vy:()=>t,xd:()=>q});var e=c(29021),f=c(33873),g=c(55511),h=c(27910),i=c(77725),j=c(60396),k=c(80547),l=a([k]);k=(l.then?(await l)():l)[0];let x=0x1900000,y=0x6400000,z=0x20000000;function m(a=(0,j.$M)()){return(0,k.Nw)((0,f.join)(a,"pidance-attachments"))}function n(a=(0,j.$M)()){let b=m(a);return(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0,mode:448}),(0,k.wz)(b),b}function o(a){let b=(a.replace(/\\/g,"/").split("/").pop()??"file").replace(/\0/g,"").replace(/^\.+/,"").trim()||"file";if(b.length<=180)return b;let c=b.lastIndexOf(".");if(c>0&&b.length-c<=20){let a=b.slice(c);return b.slice(0,180-a.length)+a}return b.slice(0,180)}function p(a,b=Date.now()){let c=o(a),d=new Date(b).toISOString().replace(/[:.]/g,"-"),e=(0,g.randomUUID)().slice(0,8);return`${d}_${e}_${c}`}async function q(a,b,c=(0,j.$M)(),d=z){let l=n(c),m=p(a),r=(0,f.join)(l,m),s=(0,f.join)(l,`.${m}.${(0,g.randomUUID)()}.tmp`),t=0,u=new h.Transform({transform(a,b,c){let e=Buffer.isBuffer(a)?a:Buffer.from(a);(t+=e.length)>d?c(Error(`message media exceeds ${d} bytes`)):c(null,e)}});try{await (0,i.pipeline)(h.Readable.fromWeb(b),u,(0,e.createWriteStream)(s,{flags:"wx",mode:384})),(0,e.renameSync)(s,r)}catch(a){try{(0,e.unlinkSync)(s)}catch{}throw a}return{path:(0,k.Nw)(r),name:o(a),storedName:m,size:t}}function r(a,b,c=(0,j.$M)()){let d=n(c),g=p(a),h=(0,f.join)(d,g);return(0,e.writeFileSync)(h,b,{flag:"wx",mode:384}),{path:(0,k.Nw)(h),name:o(a),storedName:g,size:b.length}}function s(a,b,c){let d=a.trim();if(!d)return null;try{let a=(0,k.Nw)((0,e.realpathSync)(n(b))),f=(0,k.Nw)((0,e.realpathSync)(d));if(f!==a&&!f.startsWith(`${a}/`)||!(0,e.statSync)(f).isFile())return null;return c(f)}catch{return null}}function t(a,b=(0,j.$M)()){return s(a,b,a=>(0,e.statSync)(a).size)}function u(a,b=(0,j.$M)(),c=0x1900000){return s(a,b,a=>(0,e.statSync)(a).size>c?null:(0,e.readFileSync)(a).toString("base64"))}function v(a,b=(0,j.$M)()){return s(a,b,a=>{try{return(0,e.unlinkSync)(a),!0}catch{return!1}})??!1}function w(a=(0,j.$M)()){let b=[];return function a(b,c){for(let d of(()=>{try{return(0,e.readdirSync)(b,{withFileTypes:!0})}catch{return[]}})()){let g=(0,f.join)(b,d.name);if(d.isDirectory()){a(g,c);continue}if(d.isFile())try{let a=(0,e.statSync)(g);c.push({path:(0,k.Nw)(g),size:a.size,mtimeMs:a.mtimeMs})}catch{}}}(m(a),b),b}d()}catch(a){d(a)}})},74370:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(45403),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},77725:a=>{a.exports=require("stream/promises")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>r,Nw:()=>j.Nw,bk:()=>q,mc:()=>p,uK:()=>o,wz:()=>k.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(60396),j=c(50593),k=c(25252),l=c(69835),m=c(40402),n=a([l,m]);[l,m]=n.then?(await n)():n;let s=/^[a-zA-Z]:[\\/]/;function o(a){return s.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function p(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,m.dQ)(),d=function(a){let b=new Set;for(let c of a)!0!==c.readOnly&&c.cwd&&b.add((0,j.Nw)(c.cwd)),!0!==c.readOnly&&c.projectRoot&&b.add((0,j.Nw)(c.projectRoot));return b}(c);try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&d.add((0,j.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,k.HM)())d.add(a);try{d.add((0,l.qo)((0,i.$M)()))}catch{}return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function q(){return!0}function r(a,b){return!0}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5726],()=>b(b.s=74370));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=9968,a.ids=[9968],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},400:(a,b,c)=>{c.d(b,{OJ:()=>n,Sk:()=>j,j0:()=>l});var d=c(89477),e=c.n(d),f=c(86697),g=c.n(f),h=c(716);let i="true"===process.env.SAVE_FSYNC;class j extends Error{constructor(a,b){super(b),this.code=a}}function k(a){return/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function l(a,b,c=k(a)||k(b)){let d=c?g().win32:g(),e=d.resolve(a),f=d.resolve(b),h=c?e.toLowerCase():e,i=c?f.toLowerCase():f;return h!==i&&h.startsWith(i.endsWith(d.sep)?i:i+d.sep)}function m(a,b){let c=a?.code;if("ENOENT"===c)throw new j("not-found",b);if("EACCES"===c||"EPERM"===c)throw new j("forbidden","文件访问被拒绝");throw a}function n(a){let b,c,d,{target:f,cwd:k,allowedRoots:n,content:o,baseline:p}=a,q=function(a,b){if(!Number.isFinite(b?.mtimeMs)||b.mtimeMs<0||!Number.isFinite(b?.size)||b.size<0)throw new j("bad-request","保存请求格式无效");for(let b=0;b<a.length;b+=1){let c=a.charCodeAt(b);if(c>=55296&&c<=57343){if(c<=56319&&b+1<a.length&&a.charCodeAt(b+1)>=56320&&57343>=a.charCodeAt(b+1)){b+=1;continue}throw new j("bad-request","内容包含不可逆 UTF-8 字符")}}return Buffer.from(a,"utf8")}(o,p),r=a.isAllowed??((a,b)=>[...b].some(b=>a===b||a.startsWith(`${b}/`)||a.startsWith(`${b}\\`)));if(!r(f,n))throw new j("forbidden","目标不在授权目录内");try{b=e().lstatSync(f)}catch(a){return m(a,"目标文件不存在")}if(b.isSymbolicLink())throw new j("forbidden","目标不能是符号链接");if(!b.isFile())throw new j("bad-request","目标不是常规文件");try{for(let a of(c=e().realpathSync(f),d=new Set,n))try{d.add(e().realpathSync(a))}catch{}if(!r(c,d))throw new j("forbidden","目标不在授权目录内");if(e().existsSync(k)){for(let a=g().dirname(f);l(a,k);a=g().dirname(a))if(e().lstatSync(a).isSymbolicLink())throw new j("forbidden","目标父目录不能是符号链接")}}catch(a){if(a instanceof j)throw a;return m(a,"目标路径不存在")}try{e().statSync(c)}catch(a){return m(a,"目标文件不存在")}let s=g().dirname(c),t=g().join(s,`.pi-save-${process.pid}-${(0,h.randomUUID)()}`);try{if(e().writeFileSync(t,q,{flag:"wx",mode:4095&b.mode}),e().chmodSync(t,4095&b.mode),i){let a=e().openSync(t,"r+");try{e().fsyncSync(a)}finally{e().closeSync(a)}}e().renameSync(t,c)}catch(a){try{e().unlinkSync(t)}catch{}return m(a,"保存目标不存在")}let u=e().statSync(c);return{path:f,size:u.size,mtimeMs:u.mtimeMs}}},716:a=>{a.exports=require("node:crypto")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10210:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$v:()=>p,fN:()=>r,uX:()=>q});var e=c(89477),f=c(62228),g=c(86697),h=c(716),i=c(60396),j=c(34556),k=c(60601),l=a([k]);function m(a){if(!a||"string"!=typeof a)return!1;try{return(0,e.statSync)(a).isDirectory()}catch{return!1}}k=(l.then?(await l)():l)[0];class r extends Error{constructor(a,b){super(b),this.code=a}}let s="disable-model-invocation",t={loadSkills:a=>(0,j.y)(a),agentDir:(0,i.$M)(),homeDir:(0,f.homedir)()};function n(a,b,c,d){let f=a=>a.some(a=>{var c;let d,f;try{d=(0,e.realpathSync)(a)}catch{return!1}return c=d,f=(0,g.relative)((0,g.resolve)(c),(0,g.resolve)(b)),""!==f&&".."!==f&&!f.startsWith(`..${g.sep}`)&&!(0,g.isAbsolute)(f)}),h=[(0,g.join)(d.agentDir,"skills"),(0,g.join)(d.homeDir,".agents","skills")];if(f(h))return"global";let i=[(0,g.join)(c,".pi","skills"),(0,g.join)(c,".agents","skills")];return f(i)?"project":"denied"}function o(a,b){return[(0,g.join)(b.agentDir,"skills"),(0,g.join)(b.homeDir,".agents","skills"),(0,g.join)(a,".pi","skills"),(0,g.join)(a,".agents","skills")]}async function p(a,b=t){let c,d,f,i,{cwd:j,filePath:l,disableModelInvocation:q}=a;if(!j||"string"!=typeof j)throw new r("bad-request","cwd required");if(!l||"string"!=typeof l)throw new r("bad-request","filePath required");if("boolean"!=typeof q)throw new r("bad-request","disableModelInvocation must be boolean");if(!(0,g.isAbsolute)(l))throw new r("bad-request","filePath must be absolute");if(!m(j))throw new r("bad-request","cwd must be an existing directory");let{skills:u}=await b.loadSkills(j);if(!u.find(a=>(0,g.resolve)(a.filePath)===(0,g.resolve)(l)))throw new r("not-found","skill not in loader list for cwd");try{c=(0,e.lstatSync)(l)}catch{throw new r("not-found","file not found")}if(c.isSymbolicLink())throw new r("forbidden","target must not be a symbolic link");if(!c.isFile())throw new r("bad-request","target is not a regular file");try{d=(0,e.realpathSync)(l)}catch{throw new r("forbidden","target path cannot be resolved")}let v=n(l,d,j,b);if("denied"===v)throw new r("forbidden","skill source is not writable (package/temporary or symlink escape)");!function(a,b){let c=(0,g.dirname)(a);for(;;){let a,d=b.some(a=>(0,g.resolve)(a)===(0,g.resolve)(c));try{a=(0,e.lstatSync)(c)}catch{if(d)throw new r("not-found","file not found");if(c===(0,g.dirname)(c))break;c=(0,g.dirname)(c);continue}if(a.isSymbolicLink())throw new r("forbidden","path component must not be a symbolic link");if(d||c===(0,g.dirname)(c))break;c=(0,g.dirname)(c)}}(l,o(j,b));try{f=(0,k.fu)(d)}catch(b){let a=b?.code;if("ENOENT"===a)throw new r("not-found","file not found");throw new r("forbidden","target cannot be read safely")}try{i=(0,e.readFileSync)(f,"utf8")}finally{(0,e.closeSync)(f)}let w=function(a,b){let c,d=(c=a.indexOf("\n"))>0&&13===a.charCodeAt(c-1)?"\r\n":"\n",e=function(a){let b=a.indexOf("\n");if(-1===b||"---"!==a.slice(0,b).replace(/\r$/,""))return null;let c=b+1,d=c;for(;d<=a.length;){let b=a.indexOf("\n",d),e=-1===b?a.length:b;if("---"===a.slice(d,e).replace(/\r$/,""))return{start:c,end:d};if(-1===b)break;d=b+1}return null}(a);if(!e)return b?`---${d}${s}: true${d}---${d}${a}`:a;let f=a.slice(e.start,e.end),g=RegExp(`^${s}\\s*:`,"m").test(f);if(b&&!g)return a.slice(0,e.start)+`${s}: true${d}`+a.slice(e.start);if(!b&&g){let b=f.replace(RegExp(`^${s}\\s*:.*(?:\r?
|
|
2
|
+
)`,"m"),"");if(b!==f)return a.slice(0,e.start)+b+a.slice(e.end)}return a}(i,q),x=(0,g.dirname)(d),y=(0,g.join)(x,`.pi-skill-${process.pid}-${(0,h.randomUUID)()}`);try{if((0,e.writeFileSync)(y,w,{flag:"wx",mode:4095&c.mode}),(0,e.lstatSync)(x).isSymbolicLink())throw new r("forbidden","target directory must not be a symbolic link");let a=(0,e.lstatSync)(d);if(a.isSymbolicLink())throw new r("forbidden","target must not be a symbolic link");if(!a.isFile())throw new r("bad-request","target is not a regular file");(0,e.renameSync)(y,d)}catch(a){try{(0,e.unlinkSync)(y)}catch{}if(a instanceof r)throw a;if(a?.code==="EACCES"||a?.code==="EPERM")throw new r("forbidden","file write denied");throw a}return{success:!0}}async function q(a,b=t){let c,{cwd:d,filePath:f}=a;if(!d||"string"!=typeof d)throw new r("bad-request","cwd required");if(!f||"string"!=typeof f)throw new r("bad-request","filePath required");if(!(0,g.isAbsolute)(f))throw new r("bad-request","filePath must be absolute");if(!m(d))throw new r("bad-request","cwd must be an existing directory");let{skills:h}=await b.loadSkills(d),i=h.find(a=>(0,g.resolve)(a.filePath)===(0,g.resolve)(f));if(!i)throw new r("not-found","skill not in loader list for cwd");let j=i.baseDir;if(!j||!(0,g.isAbsolute)(j))throw new r("bad-request","skill baseDir invalid");try{c=(0,e.realpathSync)(j)}catch{throw new r("not-found","skill directory not found")}let k=n((0,g.join)(j,"SKILL.md"),(0,g.join)(c,"SKILL.md"),d,b);if("denied"===k)throw new r("forbidden","skill source is not removable");let l=o(d,b).map(a=>{try{return(0,e.realpathSync)(a)}catch{return(0,g.resolve)(a)}});if(!l.some(a=>c===a||c.startsWith(a+g.sep)))throw new r("forbidden","skill directory outside allowed roots");if(l.some(a=>c===a))throw new r("forbidden","cannot remove skill root");try{(0,e.rmSync)(c,{recursive:!0,force:!1})}catch(a){if(a?.code==="ENOENT")throw new r("not-found","skill directory not found");if(a?.code==="EACCES"||a?.code==="EPERM")throw new r("forbidden","directory remove denied");throw a}return{success:!0}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},25252:(a,b,c)=>{c.d(b,{HM:()=>e,wz:()=>f});var d=c(50593);function e(){return globalThis.__piAdditionalAllowedRoots||(globalThis.__piAdditionalAllowedRoots=new Set),globalThis.__piAdditionalAllowedRoots}function f(a){if(!a)return;let b=(0,d.Nw)(a);e().add(b),globalThis.__piAllowedRootsCache?.roots.add(b)}},27910:a=>{a.exports=require("stream")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},34556:(a,b,c)=>{c.d(b,{y:()=>p});var d=c(60396),e=c(89477),f=c(62228),g=c(86697);function h(a,b){let c=[];try{var d;let f=(0,e.readFileSync)(a,"utf8"),h=function(a){let b={},c=a.split(/\r?\n/);if(!c[0]||"---"!==c[0].replace(/\r$/,""))return b;for(let a=1;a<c.length;a++){let d=c[a].replace(/\r$/,"");if("---"===d)break;let e=/^([A-Za-z0-9_-]+):\s*(.*)$/.exec(d);e&&(b[e[1]]=e[2].trim())}return b}(f),i=(0,g.dirname)(a);return{skill:{name:h.name||function(a){if("skill.md"===(0,g.basename)(a).toLowerCase())return(0,g.basename)((0,g.dirname)(a));let b=(0,g.basename)(a);return b.endsWith(".md")?b.slice(0,-3):b}(a),description:h.description??"",filePath:a,baseDir:i,disableModelInvocation:(d=h["disable-model-invocation"],void 0!==d&&"true"===d.trim().toLowerCase()),sourceInfo:{source:"local",scope:b}},diagnostics:c}}catch(d){let b=d instanceof Error?d.message:"failed to parse skill file";return c.push({type:"warning",message:b,path:a}),{skill:null,diagnostics:c}}}function i(a,b,c,d=0){let f,j=c??new Set;if(d>16)return{skills:[],diagnostics:[]};try{let b=(0,e.realpathSync)(a);if(j.has(b))return{skills:[],diagnostics:[]};j.add(b)}catch{}let k=[],l=[];try{f=(0,e.readdirSync)(a,{withFileTypes:!0})}catch{return{skills:k,diagnostics:l}}let m=f.find(a=>"SKILL.md"===a.name);if(m){let c=(0,g.join)(a,"SKILL.md");if(function(a,b){if(a.isFile())return!0;if(a.isSymbolicLink())try{return(0,e.statSync)(b).isFile()}catch{}return!1}(m,c)){let a=h(c,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}return{skills:k,diagnostics:l}}for(let c of f){if(c.name.startsWith(".")||"node_modules"===c.name)continue;let f=(0,g.join)(a,c.name),m=c.isDirectory(),n=c.isFile();if(c.isSymbolicLink())try{let a=(0,e.statSync)(f);m=a.isDirectory(),n=a.isFile()}catch{continue}if(m){let a=i(f,b,j,d+1);k.push(...a.skills),l.push(...a.diagnostics)}else if(n&&c.name.endsWith(".md")){let a=h(f,b);a.skill&&k.push(a.skill),l.push(...a.diagnostics)}}return{skills:k,diagnostics:l}}var j=c(29021),k=c(21820),l=c(33873);function m(a){try{let b=JSON.parse((0,j.readFileSync)(a,"utf8"));return b.skills&&"object"==typeof b.skills?b.skills:{}}catch{return{}}}function n(a,b){let c=(0,l.relative)((0,l.resolve)(b),(0,l.resolve)(a));return""!==c&&".."!==c&&!c.startsWith(`..${l.sep}`)&&!(0,l.isAbsolute)(c)}function o(a,b,c){var d;let e=function(a,b){if(a[b])return a[b];let c=b.toLowerCase(),d=Object.keys(a).find(a=>a.toLowerCase()===c);return d?a[d]:void 0}(a,b);if(!e||"string"!=typeof e.source||!e.source.trim())return;let f="string"==typeof e.sourceType?e.sourceType:void 0,g=(d=e.source.trim(),"github"!==f?d.replace(/\/$/,""):d.replace(/^git\+/,"").replace(/^https?:\/\/github\.com\//,"").replace(/^git@github\.com:/,"").replace(/\.git$/,"").replace(/\/$/,""));if(!g)return;let h="string"==typeof e.skillPath?e.skillPath:void 0,i="string"==typeof e.ref?e.ref:void 0,j="global"===c?e.skillFolderHash:e.computedHash,k="string"==typeof j&&j?j:void 0,l="github"===f&&/^[\w.-]+\/[\w.-]+$/.test(g);return{package:`${g}@${b}`,scope:c,source:g,sourceType:f,skillsShUrl:"local"===f?void 0:function(a,b){if(!a||a.includes("://")||a.startsWith("git@"))return;let c=a.split("/").filter(Boolean).map(encodeURIComponent).join("/");if(c)return`https://skills.sh/${c}/${encodeURIComponent(b)}`}(g,b),...h&&{skillPath:h},...i&&{ref:i},...k&&{versionHash:k},canCheckForUpdates:!!(l&&h&&k&&("global"===c||!i))}}async function p(a){let b=(0,d.$M)(),{skills:c,diagnostics:p}=function(a){let{cwd:b,agentDir:c}=a,d=a.homeDir??(0,f.homedir)(),j=[(0,g.join)(c,"skills"),(0,g.join)(d,".agents","skills")],k=[(0,g.join)(b,".pi","skills"),(0,g.join)(b,".agents","skills"),...function(a,b){let c=[],d=(0,g.resolve)((0,g.join)(b,".agents","skills")),f=(0,g.resolve)(a),h=function(a){let b=(0,g.resolve)(a);for(;;){if((0,e.existsSync)((0,g.join)(b,".git")))return b;let a=(0,g.dirname)(b);if(a===b)return null;b=a}}(f);for(;;){let a=(0,g.join)(f,".agents","skills");if((0,g.resolve)(a)!==d&&c.push(a),h&&f===h)break;let b=(0,g.dirname)(f);if(b===f)break;f=b}return c}(b,d)],l=new Map,m=new Set,n=[],o=a=>{for(let b of(n.push(...a.diagnostics),a.skills)){let a;try{a=(0,e.realpathSync)(b.filePath)}catch{a=(0,g.resolve)(b.filePath)}if(!m.has(a)){if(l.get(b.name)){n.push({type:"collision",message:`name "${b.name}" collision`,path:b.filePath});continue}l.set(b.name,b),m.add(a)}}};for(let a of[...j,...k]){let b=j.some(b=>(0,g.resolve)(b)===(0,g.resolve)(a))?"user":"project";o(i(a,b))}for(let a of function(a){try{let b=JSON.parse((0,e.readFileSync)(a,"utf8")).skills;if(Array.isArray(b))return b.filter(a=>"string"==typeof a);if(b&&"object"==typeof b&&!Array.isArray(b)){let a=b.customDirectories;if(Array.isArray(a))return a.filter(a=>"string"==typeof a)}}catch{}return[]}((0,g.join)(c,"settings.json"))){let c=(0,g.resolve)(b,a);if(!(0,e.existsSync)(c)){n.push({type:"warning",message:"skill path does not exist",path:c});continue}try{let a=(0,e.statSync)(c),b=j.some(a=>(function(a,b){let c=(0,g.resolve)(b);if(a===c)return!0;let d=c.endsWith(g.sep)?c:`${c}${g.sep}`;return a.startsWith(d)})(c,a))?"user":"project";if(a.isDirectory())o(i(c,b));else if(a.isFile()&&c.endsWith(".md")){let a=h(c,b);o({skills:a.skill?[a.skill]:[],diagnostics:a.diagnostics})}else n.push({type:"warning",message:"skill path is not a markdown file",path:c})}catch(b){let a=b instanceof Error?b.message:"failed to read skill path";n.push({type:"warning",message:a,path:c})}}return{skills:Array.from(l.values()),diagnostics:n}}({cwd:a,agentDir:b});return{skills:function(a,{cwd:b,agentDir:c,globalLockPath:d=function({homeDir:a=(0,k.homedir)(),xdgStateHome:b=process.env.XDG_STATE_HOME}={}){return b?(0,l.join)(b,"skills",".skill-lock.json"):(0,l.join)(a,".agents",".skill-lock.json")}(),projectLockPath:e=(0,l.join)(b,"skills-lock.json")}){let f=m(d),g=m(e),h=(0,l.join)(c,"skills"),i=(0,l.join)(b,".pi","skills");return a.map(a=>{if(!(0,j.existsSync)(a.filePath))return a;let b=n(a.filePath,h)?o(f,a.name,"global"):n(a.filePath,i)?o(g,a.name,"project"):void 0;return b?{...a,install:b}:a})}(c,{cwd:a,agentDir:b}),diagnostics:p}}},37939:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/route.ts",nextConfigOutput:"",userland:()=>c(45403),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45403:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,PATCH:()=>j,dynamic:()=>l});var e=c(23211),f=c(34556),g=c(10210),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a){let{searchParams:b}=new URL(a.url),c=b.get("cwd");if(!c)return e.NextResponse.json({error:"cwd required"},{status:400});try{return e.NextResponse.json(await (0,f.y)(c))}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function j(a){try{let b=await a.json();return e.NextResponse.json(await (0,g.$v)({cwd:b.cwd??"",filePath:b.filePath??"",disableModelInvocation:b.disableModelInvocation??!1}))}catch(a){if(a instanceof g.fN){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return e.NextResponse.json({error:a.message},{status:b})}return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a){try{let b=await a.json();return e.NextResponse.json(await (0,g.uX)({cwd:b.cwd??"",filePath:b.filePath??""}))}catch(a){if(a instanceof g.fN){let b="forbidden"===a.code?403:"not-found"===a.code?404:400;return e.NextResponse.json({error:a.message},{status:b})}return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{a.exports=require("crypto")},60601:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{fu:()=>p,hI:()=>o,iM:()=>m});var e=c(89477),f=c.n(e),g=c(86697),h=c.n(g),i=c(400),j=c(80547),k=a([j]);function l(a){let b=a?.code;return"ENOENT"===b||"ENOTDIR"===b}function m(a,b){let c,d;try{c=f().realpathSync(a)}catch(a){if(l(a))return{kind:"not-found"};return{kind:"denied"}}try{d=f().statSync(c)}catch(a){if(l(a))return{kind:"not-found"};return{kind:"denied"}}if((0,j.bk)())return{kind:"ok",realPath:c,stat:d};let e=!1;for(let a of b){let b;try{b=f().realpathSync(a)}catch{continue}if(e=!0,c===b||(0,i.j0)(c,b))return{kind:"ok",realPath:c,stat:d}}return e?{kind:"outside-roots",realPath:c,stat:d}:{kind:"denied"}}function n(a){return"win32"===process.platform?a.toLowerCase():a}function o(a,b){try{return n(h().resolve(a))===n(b)}catch{return!1}}function p(a){let b="number"==typeof f().constants.O_NOFOLLOW?f().constants.O_NOFOLLOW:0,c=f().openSync(a,f().constants.O_RDONLY|b);try{if(!f().fstatSync(c).isFile())throw Error("Read path is not a regular file");return c}catch(a){try{f().closeSync(c)}catch{}throw a}}j=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69835:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$t:()=>w,Gt:()=>z,Lj:()=>y,Md:()=>x,eq:()=>n,fb:()=>u,fm:()=>v,ki:()=>r,qo:()=>m,uF:()=>o,vy:()=>t,xd:()=>q});var e=c(29021),f=c(33873),g=c(55511),h=c(27910),i=c(77725),j=c(60396),k=c(80547),l=a([k]);k=(l.then?(await l)():l)[0];let x=0x1900000,y=0x6400000,z=0x20000000;function m(a=(0,j.$M)()){return(0,k.Nw)((0,f.join)(a,"pidance-attachments"))}function n(a=(0,j.$M)()){let b=m(a);return(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0,mode:448}),(0,k.wz)(b),b}function o(a){let b=(a.replace(/\\/g,"/").split("/").pop()??"file").replace(/\0/g,"").replace(/^\.+/,"").trim()||"file";if(b.length<=180)return b;let c=b.lastIndexOf(".");if(c>0&&b.length-c<=20){let a=b.slice(c);return b.slice(0,180-a.length)+a}return b.slice(0,180)}function p(a,b=Date.now()){let c=o(a),d=new Date(b).toISOString().replace(/[:.]/g,"-"),e=(0,g.randomUUID)().slice(0,8);return`${d}_${e}_${c}`}async function q(a,b,c=(0,j.$M)(),d=z){let l=n(c),m=p(a),r=(0,f.join)(l,m),s=(0,f.join)(l,`.${m}.${(0,g.randomUUID)()}.tmp`),t=0,u=new h.Transform({transform(a,b,c){let e=Buffer.isBuffer(a)?a:Buffer.from(a);(t+=e.length)>d?c(Error(`message media exceeds ${d} bytes`)):c(null,e)}});try{await (0,i.pipeline)(h.Readable.fromWeb(b),u,(0,e.createWriteStream)(s,{flags:"wx",mode:384})),(0,e.renameSync)(s,r)}catch(a){try{(0,e.unlinkSync)(s)}catch{}throw a}return{path:(0,k.Nw)(r),name:o(a),storedName:m,size:t}}function r(a,b,c=(0,j.$M)()){let d=n(c),g=p(a),h=(0,f.join)(d,g);return(0,e.writeFileSync)(h,b,{flag:"wx",mode:384}),{path:(0,k.Nw)(h),name:o(a),storedName:g,size:b.length}}function s(a,b,c){let d=a.trim();if(!d)return null;try{let a=(0,k.Nw)((0,e.realpathSync)(n(b))),f=(0,k.Nw)((0,e.realpathSync)(d));if(f!==a&&!f.startsWith(`${a}/`)||!(0,e.statSync)(f).isFile())return null;return c(f)}catch{return null}}function t(a,b=(0,j.$M)()){return s(a,b,a=>(0,e.statSync)(a).size)}function u(a,b=(0,j.$M)(),c=0x1900000){return s(a,b,a=>(0,e.statSync)(a).size>c?null:(0,e.readFileSync)(a).toString("base64"))}function v(a,b=(0,j.$M)()){return s(a,b,a=>{try{return(0,e.unlinkSync)(a),!0}catch{return!1}})??!1}function w(a=(0,j.$M)()){let b=[];return function a(b,c){for(let d of(()=>{try{return(0,e.readdirSync)(b,{withFileTypes:!0})}catch{return[]}})()){let g=(0,f.join)(b,d.name);if(d.isDirectory()){a(g,c);continue}if(d.isFile())try{let a=(0,e.statSync)(g);c.push({path:(0,k.Nw)(g),size:a.size,mtimeMs:a.mtimeMs})}catch{}}}(m(a),b),b}d()}catch(a){d(a)}})},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},77725:a=>{a.exports=require("stream/promises")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>r,Nw:()=>j.Nw,bk:()=>q,mc:()=>p,uK:()=>o,wz:()=>k.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(60396),j=c(50593),k=c(25252),l=c(69835),m=c(40402),n=a([l,m]);[l,m]=n.then?(await n)():n;let s=/^[a-zA-Z]:[\\/]/;function o(a){return s.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function p(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,m.dQ)(),d=function(a){let b=new Set;for(let c of a)!0!==c.readOnly&&c.cwd&&b.add((0,j.Nw)(c.cwd)),!0!==c.readOnly&&c.projectRoot&&b.add((0,j.Nw)(c.projectRoot));return b}(c);try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&d.add((0,j.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,k.HM)())d.add(a);try{d.add((0,l.qo)((0,i.$M)()))}catch{}return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function q(){return!0}function r(a,b){return!0}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5726],()=>b(b.s=37939));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3955,a.ids=[3955],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},72488:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{POST:()=>D,dynamic:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(84107);let x="force-dynamic",y=/\x1B\[[0-9;]*m/g,z=process.env.SKILLS_API_URL||"https://skills.sh";function A(a){let b=a.replace(y,""),c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a].trim().match(/^([\w.\-]+\/[\w.\-@:]+)\s+([\d.,]+[KMB]?\s+installs)$/);if(b){let e=d[a+1]?.trim().replace(/^└\s*/,"");c.push({package:b[1],installs:b[2],url:e?.startsWith("https://")?e:""})}}return c}async function B(a,b){let c=`${z}/api/search?q=${encodeURIComponent(a)}&limit=${b}`,d=await fetch(c,{cache:"no-store"});if(!d.ok)throw Error(`skills.sh search failed: HTTP ${d.status}`);return((await d.json()).skills??[]).map(a=>{var b;let c=a.name?.trim(),d=a.source?.trim(),e=a.id?.trim();return c&&(d||e)?{package:`${d||e}@${c}`,installs:(b=a.installs)&&!(b<=0)?b>=1e6?`${(b/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:b>=1e3?`${(b/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${b} install${1===b?"":"s"}`:"",url:e?`${z}/${e}`:""}:null}).filter(a=>null!==a).sort((a,b)=>C(b.installs)-C(a.installs))}function C(a){let b=a.match(/^([\d.]+)([KMB])?\s+installs?$/);if(!b)return 0;let c=Number(b[1]);return Number.isFinite(c)?c*("B"===b[2]?1e9:"M"===b[2]?1e6:"K"===b[2]?1e3:1):0}async function D(a){try{let b,{query:c,limit:d}=await a.json();if(!c?.trim())return v.NextResponse.json({error:"query required"},{status:400});let e=(b="number"==typeof d?d:Number(d),Number.isFinite(b)?Math.min(50,Math.max(1,Math.floor(b))):50);try{let a=await B(c.trim(),e);return v.NextResponse.json({results:a})}catch{let{stdout:a,stderr:b}=await (0,w.a)(["skills","find",c.trim()],{timeout:2e4,env:{...process.env,FORCE_COLOR:"0"}}),d=A(a+b).slice(0,e);return v.NextResponse.json({results:d})}}catch(c){let a=(c.stdout??"")+(c.stderr??""),b=a?A(a):[];if(b.length>0)return v.NextResponse.json({results:b});return v.NextResponse.json({error:c.message??String(c)},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/search/route",pathname:"/api/skills/search",filename:"route",bundlePath:"app/api/skills/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/search/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let e=await E.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(A.dynamicRoutes[I]||A.routes[F]),K=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!A.routes[F],b=A.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||E.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===E.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await E.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>E.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>E.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:C})},!1,B),b}},k=await E.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await E.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:C})},!1,B),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},84107:(a,b,c)=>{"use strict";c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=72488));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=3955,a.ids=[3955],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},37917:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/search/route",pathname:"/api/skills/search",filename:"route",bundlePath:"app/api/skills/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/search/route.ts",nextConfigOutput:"",userland:()=>c(78638),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},78638:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>l,dynamic:()=>f});var d=c(23211),e=c(84107);let f="force-dynamic",g=/\x1B\[[0-9;]*m/g,h=process.env.SKILLS_API_URL||"https://skills.sh";function i(a){let b=a.replace(g,""),c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a].trim().match(/^([\w.\-]+\/[\w.\-@:]+)\s+([\d.,]+[KMB]?\s+installs)$/);if(b){let e=d[a+1]?.trim().replace(/^└\s*/,"");c.push({package:b[1],installs:b[2],url:e?.startsWith("https://")?e:""})}}return c}async function j(a,b){let c=`${h}/api/search?q=${encodeURIComponent(a)}&limit=${b}`,d=await fetch(c,{cache:"no-store"});if(!d.ok)throw Error(`skills.sh search failed: HTTP ${d.status}`);return((await d.json()).skills??[]).map(a=>{var b;let c=a.name?.trim(),d=a.source?.trim(),e=a.id?.trim();return c&&(d||e)?{package:`${d||e}@${c}`,installs:(b=a.installs)&&!(b<=0)?b>=1e6?`${(b/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:b>=1e3?`${(b/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${b} install${1===b?"":"s"}`:"",url:e?`${h}/${e}`:""}:null}).filter(a=>null!==a).sort((a,b)=>k(b.installs)-k(a.installs))}function k(a){let b=a.match(/^([\d.]+)([KMB])?\s+installs?$/);if(!b)return 0;let c=Number(b[1]);return Number.isFinite(c)?c*("B"===b[2]?1e9:"M"===b[2]?1e6:"K"===b[2]?1e3:1):0}async function l(a){try{let b,{query:c,limit:f}=await a.json();if(!c?.trim())return d.NextResponse.json({error:"query required"},{status:400});let g=(b="number"==typeof f?f:Number(f),Number.isFinite(b)?Math.min(50,Math.max(1,Math.floor(b))):50);try{let a=await j(c.trim(),g);return d.NextResponse.json({results:a})}catch{let{stdout:a,stderr:b}=await (0,e.a)(["skills","find",c.trim()],{timeout:2e4,env:{...process.env,FORCE_COLOR:"0"}}),f=i(a+b).slice(0,g);return d.NextResponse.json({results:f})}}catch(c){let a=(c.stdout??"")+(c.stderr??""),b=a?i(a):[];if(b.length>0)return d.NextResponse.json({results:b});return d.NextResponse.json({error:c.message??String(c)},{status:500})}}},79646:a=>{"use strict";a.exports=require("child_process")},84107:(a,b,c)=>{"use strict";c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=37917));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=9156,a.ids=[9156],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=9156,a.ids=[9156],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},56679:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>h});var d=c(23211),e=c(84107),f=c(19038),g=c(34556);let h="force-dynamic";async function i(a){try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd:"",h="string"==typeof b.package?b.package:"",i="global"===b.scope||"project"===b.scope?b.scope:void 0;if(!c||!h||!i)return d.NextResponse.json({error:"cwd, package, and scope are required"},{status:400});let{skills:j}=await (0,g.y)(c),k=j.find(a=>a.install?.package===h&&a.install.scope===i);if(!k?.install)return d.NextResponse.json({error:"Installed skill not found"},{status:404});if(!k.install.canCheckForUpdates)return d.NextResponse.json({error:"This skill cannot be updated automatically"},{status:400});let{stdout:l,stderr:m}=await (0,e.a)((0,f.CU)(k.install),{timeout:6e4,cwd:"project"===i?c:void 0,env:{...process.env,FORCE_COLOR:"0"}}),n=(await (0,g.y)(c)).skills.find(a=>a.install?.package===h&&a.install.scope===i);return d.NextResponse.json({success:!0,skill:n,output:`${l}${m}`.slice(-500)})}catch(b){let a=`${b.stdout??""}${b.stderr??""}`;return d.NextResponse.json({error:a||b.message||String(b)},{status:500})}}},59693:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/update/route",pathname:"/api/skills/update",filename:"route",bundlePath:"app/api/skills/update/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/tmp/pidance-release-build/app/api/skills/update/route.ts",nextConfigOutput:"",userland:()=>c(56679),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/update/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},62228:a=>{a.exports=require("node:os")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},84107:(a,b,c)=>{c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86697:a=>{a.exports=require("node:path")},89477:a=>{a.exports=require("node:fs")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5319],()=>b(b.s=59693));module.exports=c})();
|