pi-yun 0.2.8 → 0.3.0

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.
Files changed (306) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +21 -19
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +4 -4
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +12 -0
  8. package/.next/server/app/_global-error/page.js +2 -2
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page.js +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +5 -4
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +5 -4
  20. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -4
  21. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -3
  22. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  23. package/.next/server/app/api/agent/[id]/events/route.js +1 -1
  24. package/.next/server/app/api/agent/[id]/lease/route.js +1 -1
  25. package/.next/server/app/api/agent/[id]/route.js +1 -1
  26. package/.next/server/app/api/agent/debug/route.js +1 -1
  27. package/.next/server/app/api/agent/new/route.js +1 -1
  28. package/.next/server/app/api/agent/running/route.js +1 -1
  29. package/.next/server/app/api/app-update/route.js +1 -1
  30. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  31. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  32. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  33. package/.next/server/app/api/auth/providers/route.js +1 -1
  34. package/.next/server/app/api/cache-miss-notices/route.js +1 -1
  35. package/.next/server/app/api/cwd/browse/route.js +1 -1
  36. package/.next/server/app/api/cwd/browse/route.js.nft.json +2 -2
  37. package/.next/server/app/api/cwd/validate/route.js +1 -1
  38. package/.next/server/app/api/cwd/validate/route.js.nft.json +2 -2
  39. package/.next/server/app/api/default-cwd/route.js +1 -1
  40. package/.next/server/app/api/file-index/route.js +1 -1
  41. package/.next/server/app/api/files/[...path]/route.js +1 -1
  42. package/.next/server/app/api/git/diff/route.js +1 -1
  43. package/.next/server/app/api/git/status/route.js +1 -1
  44. package/.next/server/app/api/home/route.js +1 -1
  45. package/.next/server/app/api/mcp/route.js +2 -2
  46. package/.next/server/app/api/mcp/sign-in/[flowId]/route.js +1 -1
  47. package/.next/server/app/api/mcp/sign-in/route.js +1 -1
  48. package/.next/server/app/api/mcp/test/route.js +1 -1
  49. package/.next/server/app/api/models/default/route.js +1 -1
  50. package/.next/server/app/api/models/default/route.js.nft.json +2 -2
  51. package/.next/server/app/api/models/enabled/route.js +1 -1
  52. package/.next/server/app/api/models/enabled/route.js.nft.json +2 -2
  53. package/.next/server/app/api/models/refresh/route.js +1 -1
  54. package/.next/server/app/api/models/route.js +1 -1
  55. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  56. package/.next/server/app/api/models-config/discover/route.js +1 -1
  57. package/.next/server/app/api/models-config/route.js +1 -1
  58. package/.next/server/app/api/models-config/test/route.js +1 -1
  59. package/.next/server/app/api/open-in-explorer/route.js +1 -1
  60. package/.next/server/app/api/plugins/check/route.js +1 -1
  61. package/.next/server/app/api/plugins/route.js +1 -1
  62. package/.next/server/app/api/project-trust/route.js +1 -1
  63. package/.next/server/app/api/provider-usage/query/route.js +1 -1
  64. package/.next/server/app/api/push/config/route.js +1 -1
  65. package/.next/server/app/api/push/subscribe/route.js +1 -1
  66. package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
  67. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  68. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  69. package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -1
  70. package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
  71. package/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
  72. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  73. package/.next/server/app/api/sessions/[id]/sources/route.js +1 -1
  74. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  75. package/.next/server/app/api/sessions/delete/route.js +1 -1
  76. package/.next/server/app/api/sessions/route.js +1 -1
  77. package/.next/server/app/api/sessions/search/route.js +1 -1
  78. package/.next/server/app/api/sessions/stats/route.js +1 -1
  79. package/.next/server/app/api/sessions/ui-state/route.js +1 -1
  80. package/.next/server/app/api/skills/check/route.js +1 -1
  81. package/.next/server/app/api/skills/content/route.js +1 -1
  82. package/.next/server/app/api/skills/install/route.js +1 -1
  83. package/.next/server/app/api/skills/remove/route.js +2 -0
  84. package/.next/server/app/api/skills/remove/route.js.nft.json +1 -0
  85. package/.next/server/app/api/skills/remove/route_client-reference-manifest.js +1 -0
  86. package/.next/server/app/api/skills/route.js +1 -1
  87. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  88. package/.next/server/app/api/skills/search/route.js +1 -1
  89. package/.next/server/app/api/skills/transfer/route.js +2 -0
  90. package/.next/server/app/api/skills/transfer/route.js.nft.json +1 -0
  91. package/.next/server/app/api/skills/transfer/route_client-reference-manifest.js +1 -0
  92. package/.next/server/app/api/skills/update/route.js +1 -1
  93. package/.next/server/app/api/subagents/[id]/route.js +1 -1
  94. package/.next/server/app/api/subagents/profiles/route.js +1 -1
  95. package/.next/server/app/api/subagents/settings/route.js +1 -1
  96. package/.next/server/app/api/terminal/[id]/events/route.js +2 -2
  97. package/.next/server/app/api/terminal/[id]/route.js +1 -1
  98. package/.next/server/app/api/terminal/route.js +1 -1
  99. package/.next/server/app/api/tools/settings/route.js +1 -1
  100. package/.next/server/app/api/web-auth/route.js +1 -1
  101. package/.next/server/app/api/worktrees/route.js +1 -1
  102. package/.next/server/app/favicon.ico/route.js +1 -1
  103. package/.next/server/app/index.html +1 -1
  104. package/.next/server/app/index.rsc +10 -9
  105. package/.next/server/app/index.segments/__PAGE__.segment.rsc +16 -14
  106. package/.next/server/app/index.segments/_full.segment.rsc +10 -9
  107. package/.next/server/app/index.segments/_tree.segment.rsc +5 -4
  108. package/.next/server/app/login/page.js +2 -2
  109. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/login.html +1 -1
  111. package/.next/server/app/login.rsc +6 -5
  112. package/.next/server/app/login.segments/_full.segment.rsc +6 -5
  113. package/.next/server/app/login.segments/_tree.segment.rsc +4 -3
  114. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +12 -10
  115. package/.next/server/app/manifest.webmanifest/route.js +1 -1
  116. package/.next/server/app/page.js +5 -5
  117. package/.next/server/app/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/pet-preview/page.js +1 -1
  119. package/.next/server/app/pet-preview/page_client-reference-manifest.js +1 -1
  120. package/.next/server/app/pet-preview.html +1 -1
  121. package/.next/server/app/pet-preview.rsc +6 -5
  122. package/.next/server/app/pet-preview.segments/_full.segment.rsc +6 -5
  123. package/.next/server/app/pet-preview.segments/_tree.segment.rsc +4 -3
  124. package/.next/server/app/pet-preview.segments/pet-preview/__PAGE__.segment.rsc +12 -10
  125. package/.next/server/app-paths-manifest.json +21 -19
  126. package/.next/server/chunks/1249.js +1 -0
  127. package/.next/server/chunks/2243.js +1 -1
  128. package/.next/server/chunks/4733.js +1 -1
  129. package/.next/server/chunks/7365.js +1 -1
  130. package/.next/server/middleware-build-manifest.js +1 -1
  131. package/.next/server/pages/404.html +1 -1
  132. package/.next/server/pages/500.html +1 -1
  133. package/.next/static/chunks/1278-a342d5434023eb38.js +1 -0
  134. package/.next/static/chunks/app/_global-error/page-eea87d7c4840e5e7.js +1 -0
  135. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-eea87d7c4840e5e7.js +1 -0
  136. package/.next/static/chunks/app/api/agent/[id]/events/route-eea87d7c4840e5e7.js +1 -0
  137. package/.next/static/chunks/app/api/agent/[id]/lease/route-eea87d7c4840e5e7.js +1 -0
  138. package/.next/static/chunks/app/api/agent/[id]/route-eea87d7c4840e5e7.js +1 -0
  139. package/.next/static/chunks/app/api/agent/debug/route-eea87d7c4840e5e7.js +1 -0
  140. package/.next/static/chunks/app/api/agent/new/route-eea87d7c4840e5e7.js +1 -0
  141. package/.next/static/chunks/app/api/agent/running/route-eea87d7c4840e5e7.js +1 -0
  142. package/.next/static/chunks/app/api/app-update/route-eea87d7c4840e5e7.js +1 -0
  143. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-eea87d7c4840e5e7.js +1 -0
  144. package/.next/static/chunks/app/api/auth/login/[provider]/route-eea87d7c4840e5e7.js +1 -0
  145. package/.next/static/chunks/app/api/auth/logout/[provider]/route-eea87d7c4840e5e7.js +1 -0
  146. package/.next/static/chunks/app/api/auth/providers/route-eea87d7c4840e5e7.js +1 -0
  147. package/.next/static/chunks/app/api/cache-miss-notices/route-eea87d7c4840e5e7.js +1 -0
  148. package/.next/static/chunks/app/api/cwd/browse/route-eea87d7c4840e5e7.js +1 -0
  149. package/.next/static/chunks/app/api/cwd/validate/route-eea87d7c4840e5e7.js +1 -0
  150. package/.next/static/chunks/app/api/default-cwd/route-eea87d7c4840e5e7.js +1 -0
  151. package/.next/static/chunks/app/api/file-index/route-eea87d7c4840e5e7.js +1 -0
  152. package/.next/static/chunks/app/api/files/[...path]/route-eea87d7c4840e5e7.js +1 -0
  153. package/.next/static/chunks/app/api/git/diff/route-eea87d7c4840e5e7.js +1 -0
  154. package/.next/static/chunks/app/api/git/status/route-eea87d7c4840e5e7.js +1 -0
  155. package/.next/static/chunks/app/api/home/route-eea87d7c4840e5e7.js +1 -0
  156. package/.next/static/chunks/app/api/mcp/route-eea87d7c4840e5e7.js +1 -0
  157. package/.next/static/chunks/app/api/mcp/sign-in/[flowId]/route-eea87d7c4840e5e7.js +1 -0
  158. package/.next/static/chunks/app/api/mcp/sign-in/route-eea87d7c4840e5e7.js +1 -0
  159. package/.next/static/chunks/app/api/mcp/test/route-eea87d7c4840e5e7.js +1 -0
  160. package/.next/static/chunks/app/api/models/default/route-eea87d7c4840e5e7.js +1 -0
  161. package/.next/static/chunks/app/api/models/enabled/route-eea87d7c4840e5e7.js +1 -0
  162. package/.next/static/chunks/app/api/models/refresh/route-eea87d7c4840e5e7.js +1 -0
  163. package/.next/static/chunks/app/api/models/route-eea87d7c4840e5e7.js +1 -0
  164. package/.next/static/chunks/app/api/models-config/catalog/route-eea87d7c4840e5e7.js +1 -0
  165. package/.next/static/chunks/app/api/models-config/discover/route-eea87d7c4840e5e7.js +1 -0
  166. package/.next/static/chunks/app/api/models-config/route-eea87d7c4840e5e7.js +1 -0
  167. package/.next/static/chunks/app/api/models-config/test/route-eea87d7c4840e5e7.js +1 -0
  168. package/.next/static/chunks/app/api/open-in-explorer/route-eea87d7c4840e5e7.js +1 -0
  169. package/.next/static/chunks/app/api/plugins/check/route-eea87d7c4840e5e7.js +1 -0
  170. package/.next/static/chunks/app/api/plugins/route-eea87d7c4840e5e7.js +1 -0
  171. package/.next/static/chunks/app/api/project-trust/route-eea87d7c4840e5e7.js +1 -0
  172. package/.next/static/chunks/app/api/provider-usage/query/route-eea87d7c4840e5e7.js +1 -0
  173. package/.next/static/chunks/app/api/push/config/route-eea87d7c4840e5e7.js +1 -0
  174. package/.next/static/chunks/app/api/push/subscribe/route-eea87d7c4840e5e7.js +1 -0
  175. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-eea87d7c4840e5e7.js +1 -0
  176. package/.next/static/chunks/app/api/sessions/[id]/context/route-eea87d7c4840e5e7.js +1 -0
  177. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-eea87d7c4840e5e7.js +1 -0
  178. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-eea87d7c4840e5e7.js +1 -0
  179. package/.next/static/chunks/app/api/sessions/[id]/export/route-eea87d7c4840e5e7.js +1 -0
  180. package/.next/static/chunks/app/api/sessions/[id]/fork/route-eea87d7c4840e5e7.js +1 -0
  181. package/.next/static/chunks/app/api/sessions/[id]/route-eea87d7c4840e5e7.js +1 -0
  182. package/.next/static/chunks/app/api/sessions/[id]/sources/route-eea87d7c4840e5e7.js +1 -0
  183. package/.next/static/chunks/app/api/sessions/[id]/state/route-eea87d7c4840e5e7.js +1 -0
  184. package/.next/static/chunks/app/api/sessions/delete/route-eea87d7c4840e5e7.js +1 -0
  185. package/.next/static/chunks/app/api/sessions/route-eea87d7c4840e5e7.js +1 -0
  186. package/.next/static/chunks/app/api/sessions/search/route-eea87d7c4840e5e7.js +1 -0
  187. package/.next/static/chunks/app/api/sessions/stats/route-eea87d7c4840e5e7.js +1 -0
  188. package/.next/static/chunks/app/api/sessions/ui-state/route-eea87d7c4840e5e7.js +1 -0
  189. package/.next/static/chunks/app/api/skills/check/route-eea87d7c4840e5e7.js +1 -0
  190. package/.next/static/chunks/app/api/skills/content/route-eea87d7c4840e5e7.js +1 -0
  191. package/.next/static/chunks/app/api/skills/install/route-eea87d7c4840e5e7.js +1 -0
  192. package/.next/static/chunks/app/api/skills/remove/route-eea87d7c4840e5e7.js +1 -0
  193. package/.next/static/chunks/app/api/skills/route-eea87d7c4840e5e7.js +1 -0
  194. package/.next/static/chunks/app/api/skills/search/route-eea87d7c4840e5e7.js +1 -0
  195. package/.next/static/chunks/app/api/skills/transfer/route-eea87d7c4840e5e7.js +1 -0
  196. package/.next/static/chunks/app/api/skills/update/route-eea87d7c4840e5e7.js +1 -0
  197. package/.next/static/chunks/app/api/subagents/[id]/route-eea87d7c4840e5e7.js +1 -0
  198. package/.next/static/chunks/app/api/subagents/profiles/route-eea87d7c4840e5e7.js +1 -0
  199. package/.next/static/chunks/app/api/subagents/settings/route-eea87d7c4840e5e7.js +1 -0
  200. package/.next/static/chunks/app/api/terminal/[id]/events/route-eea87d7c4840e5e7.js +1 -0
  201. package/.next/static/chunks/app/api/terminal/[id]/route-eea87d7c4840e5e7.js +1 -0
  202. package/.next/static/chunks/app/api/terminal/route-eea87d7c4840e5e7.js +1 -0
  203. package/.next/static/chunks/app/api/tools/settings/route-eea87d7c4840e5e7.js +1 -0
  204. package/.next/static/chunks/app/api/web-auth/route-eea87d7c4840e5e7.js +1 -0
  205. package/.next/static/chunks/app/api/worktrees/route-eea87d7c4840e5e7.js +1 -0
  206. package/.next/static/chunks/app/{layout-6b3ff415d8618d1f.js → layout-56c76258dbb5abec.js} +1 -1
  207. package/.next/static/chunks/app/manifest.webmanifest/route-eea87d7c4840e5e7.js +1 -0
  208. package/.next/static/chunks/app/{page-4706951bbcbab958.js → page-cbfac13bc0fa885f.js} +15 -15
  209. package/.next/static/chunks/next/dist/client/components/builtin/app-error-eea87d7c4840e5e7.js +1 -0
  210. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-eea87d7c4840e5e7.js +1 -0
  211. package/.next/static/chunks/next/dist/client/components/builtin/not-found-eea87d7c4840e5e7.js +1 -0
  212. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-eea87d7c4840e5e7.js +1 -0
  213. package/.next/static/chunks/{webpack-be764c3bb9e86b23.js → webpack-31a07b7e5ebb23e2.js} +1 -1
  214. package/.next/static/css/77332ff608093895.css +1 -0
  215. package/.next/static/css/a08edf57b19c703e.css +1 -0
  216. package/.next/static/css/{457a30692658ff3c.css → e2c959349a8fa15a.css} +1 -1
  217. package/.next/static/css/e757e30e68c10f13.css +1 -0
  218. package/.next/static/d8Nx7OPkoC7ZQGKA1PfDp/_buildManifest.js +1 -0
  219. package/.next/trace +61 -61
  220. package/.next/trace-build +1 -1
  221. package/.next/types/app/api/skills/remove/route.ts +355 -0
  222. package/.next/types/app/api/skills/transfer/route.ts +355 -0
  223. package/.next/types/routes.d.ts +3 -1
  224. package/.next/types/validator.ts +20 -0
  225. package/README.md +66 -103
  226. package/package.json +1 -1
  227. package/.next/static/chunks/1278-5aee13ed41013fe6.js +0 -1
  228. package/.next/static/chunks/app/_global-error/page-147c253c096ab7d7.js +0 -1
  229. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-147c253c096ab7d7.js +0 -1
  230. package/.next/static/chunks/app/api/agent/[id]/events/route-147c253c096ab7d7.js +0 -1
  231. package/.next/static/chunks/app/api/agent/[id]/lease/route-147c253c096ab7d7.js +0 -1
  232. package/.next/static/chunks/app/api/agent/[id]/route-147c253c096ab7d7.js +0 -1
  233. package/.next/static/chunks/app/api/agent/debug/route-147c253c096ab7d7.js +0 -1
  234. package/.next/static/chunks/app/api/agent/new/route-147c253c096ab7d7.js +0 -1
  235. package/.next/static/chunks/app/api/agent/running/route-147c253c096ab7d7.js +0 -1
  236. package/.next/static/chunks/app/api/app-update/route-147c253c096ab7d7.js +0 -1
  237. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-147c253c096ab7d7.js +0 -1
  238. package/.next/static/chunks/app/api/auth/login/[provider]/route-147c253c096ab7d7.js +0 -1
  239. package/.next/static/chunks/app/api/auth/logout/[provider]/route-147c253c096ab7d7.js +0 -1
  240. package/.next/static/chunks/app/api/auth/providers/route-147c253c096ab7d7.js +0 -1
  241. package/.next/static/chunks/app/api/cache-miss-notices/route-147c253c096ab7d7.js +0 -1
  242. package/.next/static/chunks/app/api/cwd/browse/route-147c253c096ab7d7.js +0 -1
  243. package/.next/static/chunks/app/api/cwd/validate/route-147c253c096ab7d7.js +0 -1
  244. package/.next/static/chunks/app/api/default-cwd/route-147c253c096ab7d7.js +0 -1
  245. package/.next/static/chunks/app/api/file-index/route-147c253c096ab7d7.js +0 -1
  246. package/.next/static/chunks/app/api/files/[...path]/route-147c253c096ab7d7.js +0 -1
  247. package/.next/static/chunks/app/api/git/diff/route-147c253c096ab7d7.js +0 -1
  248. package/.next/static/chunks/app/api/git/status/route-147c253c096ab7d7.js +0 -1
  249. package/.next/static/chunks/app/api/home/route-147c253c096ab7d7.js +0 -1
  250. package/.next/static/chunks/app/api/mcp/route-147c253c096ab7d7.js +0 -1
  251. package/.next/static/chunks/app/api/mcp/sign-in/[flowId]/route-147c253c096ab7d7.js +0 -1
  252. package/.next/static/chunks/app/api/mcp/sign-in/route-147c253c096ab7d7.js +0 -1
  253. package/.next/static/chunks/app/api/mcp/test/route-147c253c096ab7d7.js +0 -1
  254. package/.next/static/chunks/app/api/models/default/route-147c253c096ab7d7.js +0 -1
  255. package/.next/static/chunks/app/api/models/enabled/route-147c253c096ab7d7.js +0 -1
  256. package/.next/static/chunks/app/api/models/refresh/route-147c253c096ab7d7.js +0 -1
  257. package/.next/static/chunks/app/api/models/route-147c253c096ab7d7.js +0 -1
  258. package/.next/static/chunks/app/api/models-config/catalog/route-147c253c096ab7d7.js +0 -1
  259. package/.next/static/chunks/app/api/models-config/discover/route-147c253c096ab7d7.js +0 -1
  260. package/.next/static/chunks/app/api/models-config/route-147c253c096ab7d7.js +0 -1
  261. package/.next/static/chunks/app/api/models-config/test/route-147c253c096ab7d7.js +0 -1
  262. package/.next/static/chunks/app/api/open-in-explorer/route-147c253c096ab7d7.js +0 -1
  263. package/.next/static/chunks/app/api/plugins/check/route-147c253c096ab7d7.js +0 -1
  264. package/.next/static/chunks/app/api/plugins/route-147c253c096ab7d7.js +0 -1
  265. package/.next/static/chunks/app/api/project-trust/route-147c253c096ab7d7.js +0 -1
  266. package/.next/static/chunks/app/api/provider-usage/query/route-147c253c096ab7d7.js +0 -1
  267. package/.next/static/chunks/app/api/push/config/route-147c253c096ab7d7.js +0 -1
  268. package/.next/static/chunks/app/api/push/subscribe/route-147c253c096ab7d7.js +0 -1
  269. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-147c253c096ab7d7.js +0 -1
  270. package/.next/static/chunks/app/api/sessions/[id]/context/route-147c253c096ab7d7.js +0 -1
  271. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-147c253c096ab7d7.js +0 -1
  272. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-147c253c096ab7d7.js +0 -1
  273. package/.next/static/chunks/app/api/sessions/[id]/export/route-147c253c096ab7d7.js +0 -1
  274. package/.next/static/chunks/app/api/sessions/[id]/fork/route-147c253c096ab7d7.js +0 -1
  275. package/.next/static/chunks/app/api/sessions/[id]/route-147c253c096ab7d7.js +0 -1
  276. package/.next/static/chunks/app/api/sessions/[id]/sources/route-147c253c096ab7d7.js +0 -1
  277. package/.next/static/chunks/app/api/sessions/[id]/state/route-147c253c096ab7d7.js +0 -1
  278. package/.next/static/chunks/app/api/sessions/delete/route-147c253c096ab7d7.js +0 -1
  279. package/.next/static/chunks/app/api/sessions/route-147c253c096ab7d7.js +0 -1
  280. package/.next/static/chunks/app/api/sessions/search/route-147c253c096ab7d7.js +0 -1
  281. package/.next/static/chunks/app/api/sessions/stats/route-147c253c096ab7d7.js +0 -1
  282. package/.next/static/chunks/app/api/sessions/ui-state/route-147c253c096ab7d7.js +0 -1
  283. package/.next/static/chunks/app/api/skills/check/route-147c253c096ab7d7.js +0 -1
  284. package/.next/static/chunks/app/api/skills/content/route-147c253c096ab7d7.js +0 -1
  285. package/.next/static/chunks/app/api/skills/install/route-147c253c096ab7d7.js +0 -1
  286. package/.next/static/chunks/app/api/skills/route-147c253c096ab7d7.js +0 -1
  287. package/.next/static/chunks/app/api/skills/search/route-147c253c096ab7d7.js +0 -1
  288. package/.next/static/chunks/app/api/skills/update/route-147c253c096ab7d7.js +0 -1
  289. package/.next/static/chunks/app/api/subagents/[id]/route-147c253c096ab7d7.js +0 -1
  290. package/.next/static/chunks/app/api/subagents/profiles/route-147c253c096ab7d7.js +0 -1
  291. package/.next/static/chunks/app/api/subagents/settings/route-147c253c096ab7d7.js +0 -1
  292. package/.next/static/chunks/app/api/terminal/[id]/events/route-147c253c096ab7d7.js +0 -1
  293. package/.next/static/chunks/app/api/terminal/[id]/route-147c253c096ab7d7.js +0 -1
  294. package/.next/static/chunks/app/api/terminal/route-147c253c096ab7d7.js +0 -1
  295. package/.next/static/chunks/app/api/tools/settings/route-147c253c096ab7d7.js +0 -1
  296. package/.next/static/chunks/app/api/web-auth/route-147c253c096ab7d7.js +0 -1
  297. package/.next/static/chunks/app/api/worktrees/route-147c253c096ab7d7.js +0 -1
  298. package/.next/static/chunks/app/manifest.webmanifest/route-147c253c096ab7d7.js +0 -1
  299. package/.next/static/chunks/next/dist/client/components/builtin/app-error-147c253c096ab7d7.js +0 -1
  300. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-147c253c096ab7d7.js +0 -1
  301. package/.next/static/chunks/next/dist/client/components/builtin/not-found-147c253c096ab7d7.js +0 -1
  302. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-147c253c096ab7d7.js +0 -1
  303. package/.next/static/css/432038f9c1c9373f.css +0 -1
  304. package/.next/static/css/8f3e29456db308b5.css +0 -1
  305. package/.next/static/pOQINtVxWAHtlQLmrw2Dg/_buildManifest.js +0 -1
  306. /package/.next/static/{pOQINtVxWAHtlQLmrw2Dg → d8Nx7OPkoC7ZQGKA1PfDp}/_ssgManifest.js +0 -0
@@ -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")},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")},19771:a=>{"use strict";a.exports=require("process")},21361:(a,b,c)=>{"use strict";c.d(b,{f:()=>g});var d=c(29021),e=c(33873),f=c(19771);function g(a,b,c={}){let h=function(a,b={}){let c=b.nodeDir??(0,e.dirname)(f.execPath),g=b.fileExists??d.existsSync;for(let b of[(0,e.join)(c,"node_modules","npm","bin",`${a}-cli.js`),(0,e.join)(c,"..","lib","node_modules","npm","bin",`${a}-cli.js`)])try{if(g(b))return b}catch{}return null}(a,c);return h?{command:f.execPath,args:[h,...b]}:{command:a,args:b}}},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")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69906:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\skills\\search\\route.ts",nextConfigOutput:"",userland:()=>c(78638),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let{instrumentation:e}=await v.ensureInstrumentation(a,{deferSpans:!0});return v.traceRequest(a,{tracer:(0,h.getTracer)(),spanName:`${a.method||"GET"} ${d}`,httpTarget:a.url,instrumentation:e},(e,f)=>B(a,b,c,d,!1,e,f))}async function B(a,b,c,d,f,w,x){let y=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:f});if(!y)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:z,deploymentId:A,params:B,nextConfig:C,parsedUrl:D,isDraftMode:E,prerenderManifest:F,routerServerContext:G,isOnDemandRevalidate:H,revalidateOnlyGenerated:I,resolvedPathname:J,clientReferenceManifest:K,serverActionsManifest:L,previewProps:M}=y,N=(0,j.normalizeAppPath)(d),O=!!F.routes[J]&&(v.isDev||(0,t.isRouteCacheOwner)(J,v.cacheOwner,F.routes[J])),P=!!(F.dynamicRoutes[N]||O),Q=async()=>((null==G?void 0:G.render404)?await G.render404(a,b,D,!1):b.end("This page could not be found"),null);if(P&&!E){let a=F.dynamicRoutes[N];if(a&&!1===a.fallback&&!O){if(C.adapterPath)return await Q();throw new s.NoFallbackError}}let R=null;!P||v.isDev||E||(R="/index"===(R=J)?"/":R),L&&K&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:K,serverActionsManifest:L});let S=a.method||"GET",T=(0,h.getTracer)(),U=!!(null==G?void 0:G.isWrappedByNextServer),V=!!(0,g.getRequestMeta)(a,"minimalMode"),W=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,C,M,F,V);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let X={params:B,previewProps:M,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts,useCacheTimeout:C.experimental.useCacheTimeout,durableUseCacheEntries:!!C.experimental.durableUseCacheEntries},cacheComponents:!!C.cacheComponents,validationLevel:C.experimental.instantInsights.validationLevel,isDraftMode:E,incrementalCache:W,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:C.cacheLife,staticPageGenerationTimeout:C.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0},sharedContext:{buildId:z,deploymentId:A}},Y=new k.NodeNextRequest(a),Z=new k.NodeNextResponse(b),$=l.NextRequestAdapter.fromNodeNextRequest(Y,(0,l.signalFromNodeResponse)(b)),_=async({previousCacheEntry:e})=>{try{if(!V&&H&&I&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=null===R?await v.handle($,X):await v.prerender($,X);a.fetchMetrics=X.renderOpts.fetchMetrics;let f=X.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=X.renderOpts.collectedTags;if(!P)return await (0,o.I)(Y,Z,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!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,e=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?C.expireTime:void 0:X.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==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:null!==R,isOnDemandRevalidate:H})},!1,G),b}},aa=async d=>{try{var f,g;let d=await v.handleResponse({req:a,nextConfig:C,cacheKey:R,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,previewProps:M,prerenderManifest:F,isRoutePPREnabled:!1,isOnDemandRevalidate:H,revalidateOnlyGenerated:I,responseGenerator:_,waitUntil:c.waitUntil,isMinimalMode:V});if(null!==d&&"error"in d)throw d.error;if(!P)return;if((null==d||null==(f=d.value)?void 0:f.kind)!==u.CachedRouteKind.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==d||null==(g=d.value)?void 0:g.kind}`);V||b.setHeader("x-nextjs-cache",H?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),E&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);V&&P||h.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(Y,Z,new Response(d.value.body,{headers:h,status:d.value.status||200}));return}catch(c){if(c instanceof s.NoFallbackError||await v.onRequestError(a,c,{routerKind:"App Router",routePath:N,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:null!==R,isOnDemandRevalidate:H})},!1,G),P)throw c;if(b.headersSent){if(d){let a=c instanceof Error?c:Error("Unknown app route error");d.recordException(a),d.setStatus({code:h.SpanStatusCode.ERROR,message:a.message}),d.setAttribute("error.type",a.name)}b.writableEnded||b.destroyed||b.end()}else await (0,o.I)(Y,Z,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=T.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")||N,f=`${S} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":f}),d.updateName(f),x&&x!==d&&(x.setAttribute("http.route",e),x.updateName(f))})()}};U||void 0===a.url||null==w||w.setAttribute("http.target",a.url),await aa(w)}},78335:()=>{},78638:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>l,dynamic:()=>f});var d=c(23211),e=c(97990);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")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},97990:(a,b,c)=>{"use strict";c.d(b,{a:()=>h});var d=c(79646),e=c(28354),f=c(21361);let g=(0,e.promisify)(d.execFile);async function h(a,b={}){let{command:c,args:d}=(0,f.f)("npx",a);return g(c,d,{timeout:b.timeout,cwd:b.cwd,env:b.env})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813],()=>b(b.s=69906));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")},9095:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\skills\\search\\route.ts",nextConfigOutput:"",userland:()=>c(78638),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let{instrumentation:e}=await v.ensureInstrumentation(a,{deferSpans:!0});return v.traceRequest(a,{tracer:(0,h.getTracer)(),spanName:`${a.method||"GET"} ${d}`,httpTarget:a.url,instrumentation:e},(e,f)=>B(a,b,c,d,!1,e,f))}async function B(a,b,c,d,f,w,x){let y=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:f});if(!y)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:z,deploymentId:A,params:B,nextConfig:C,parsedUrl:D,isDraftMode:E,prerenderManifest:F,routerServerContext:G,isOnDemandRevalidate:H,revalidateOnlyGenerated:I,resolvedPathname:J,clientReferenceManifest:K,serverActionsManifest:L,previewProps:M}=y,N=(0,j.normalizeAppPath)(d),O=!!F.routes[J]&&(v.isDev||(0,t.isRouteCacheOwner)(J,v.cacheOwner,F.routes[J])),P=!!(F.dynamicRoutes[N]||O),Q=async()=>((null==G?void 0:G.render404)?await G.render404(a,b,D,!1):b.end("This page could not be found"),null);if(P&&!E){let a=F.dynamicRoutes[N];if(a&&!1===a.fallback&&!O){if(C.adapterPath)return await Q();throw new s.NoFallbackError}}let R=null;!P||v.isDev||E||(R="/index"===(R=J)?"/":R),L&&K&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:K,serverActionsManifest:L});let S=a.method||"GET",T=(0,h.getTracer)(),U=!!(null==G?void 0:G.isWrappedByNextServer),V=!!(0,g.getRequestMeta)(a,"minimalMode"),W=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,C,M,F,V);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let X={params:B,previewProps:M,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts,useCacheTimeout:C.experimental.useCacheTimeout,durableUseCacheEntries:!!C.experimental.durableUseCacheEntries},cacheComponents:!!C.cacheComponents,validationLevel:C.experimental.instantInsights.validationLevel,isDraftMode:E,incrementalCache:W,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:C.cacheLife,staticPageGenerationTimeout:C.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0},sharedContext:{buildId:z,deploymentId:A}},Y=new k.NodeNextRequest(a),Z=new k.NodeNextResponse(b),$=l.NextRequestAdapter.fromNodeNextRequest(Y,(0,l.signalFromNodeResponse)(b)),_=async({previousCacheEntry:e})=>{try{if(!V&&H&&I&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=null===R?await v.handle($,X):await v.prerender($,X);a.fetchMetrics=X.renderOpts.fetchMetrics;let f=X.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=X.renderOpts.collectedTags;if(!P)return await (0,o.I)(Y,Z,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!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,e=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?C.expireTime:void 0:X.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==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:null!==R,isOnDemandRevalidate:H})},!1,G),b}},aa=async d=>{try{var f,g;let d=await v.handleResponse({req:a,nextConfig:C,cacheKey:R,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,previewProps:M,prerenderManifest:F,isRoutePPREnabled:!1,isOnDemandRevalidate:H,revalidateOnlyGenerated:I,responseGenerator:_,waitUntil:c.waitUntil,isMinimalMode:V});if(null!==d&&"error"in d)throw d.error;if(!P)return;if((null==d||null==(f=d.value)?void 0:f.kind)!==u.CachedRouteKind.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==d||null==(g=d.value)?void 0:g.kind}`);V||b.setHeader("x-nextjs-cache",H?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),E&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);V&&P||h.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(Y,Z,new Response(d.value.body,{headers:h,status:d.value.status||200}));return}catch(c){if(c instanceof s.NoFallbackError||await v.onRequestError(a,c,{routerKind:"App Router",routePath:N,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:null!==R,isOnDemandRevalidate:H})},!1,G),P)throw c;if(b.headersSent){if(d){let a=c instanceof Error?c:Error("Unknown app route error");d.recordException(a),d.setStatus({code:h.SpanStatusCode.ERROR,message:a.message}),d.setAttribute("error.type",a.name)}b.writableEnded||b.destroyed||b.end()}else await (0,o.I)(Y,Z,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=T.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")||N,f=`${S} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":f}),d.updateName(f),x&&x!==d&&(x.setAttribute("http.route",e),x.updateName(f))})()}};U||void 0===a.url||null==w||w.setAttribute("http.target",a.url),await aa(w)}},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")},19771:a=>{"use strict";a.exports=require("process")},21361:(a,b,c)=>{"use strict";c.d(b,{f:()=>g});var d=c(29021),e=c(33873),f=c(19771);function g(a,b,c={}){let h=function(a,b={}){let c=b.nodeDir??(0,e.dirname)(f.execPath),g=b.fileExists??d.existsSync;for(let b of[(0,e.join)(c,"node_modules","npm","bin",`${a}-cli.js`),(0,e.join)(c,"..","lib","node_modules","npm","bin",`${a}-cli.js`)])try{if(g(b))return b}catch{}return null}(a,c);return h?{command:f.execPath,args:[h,...b]}:{command:a,args:b}}},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")},55511:a=>{"use strict";a.exports=require("crypto")},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(97990);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")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},97990:(a,b,c)=>{"use strict";c.d(b,{a:()=>h});var d=c(79646),e=c(28354),f=c(21361);let g=(0,e.promisify)(d.execFile);async function h(a,b={}){let{command:c,args:d}=(0,f.f)("npx",a);return g(c,d,{timeout:b.timeout,cwd:b.cwd,env:b.env})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813],()=>b(b.s=9095));module.exports=c})();
@@ -0,0 +1,2 @@
1
+ "use strict";(()=>{var a={};a.id=4762,a.ids=[4762],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},861:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/transfer/route",pathname:"/api/skills/transfer",filename:"route",bundlePath:"app/api/skills/transfer/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\skills\\transfer\\route.ts",nextConfigOutput:"",userland:()=>c(6193),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/transfer/route";"/index"===d&&(d="/");let{instrumentation:e}=await v.ensureInstrumentation(a,{deferSpans:!0});return v.traceRequest(a,{tracer:(0,h.getTracer)(),spanName:`${a.method||"GET"} ${d}`,httpTarget:a.url,instrumentation:e},(e,f)=>B(a,b,c,d,!1,e,f))}async function B(a,b,c,d,f,w,x){let y=await v.prepare(a,b,{srcPage:d,multiZoneDraftMode:f});if(!y)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:z,deploymentId:A,params:B,nextConfig:C,parsedUrl:D,isDraftMode:E,prerenderManifest:F,routerServerContext:G,isOnDemandRevalidate:H,revalidateOnlyGenerated:I,resolvedPathname:J,clientReferenceManifest:K,serverActionsManifest:L,previewProps:M}=y,N=(0,j.normalizeAppPath)(d),O=!!F.routes[J]&&(v.isDev||(0,t.isRouteCacheOwner)(J,v.cacheOwner,F.routes[J])),P=!!(F.dynamicRoutes[N]||O),Q=async()=>((null==G?void 0:G.render404)?await G.render404(a,b,D,!1):b.end("This page could not be found"),null);if(P&&!E){let a=F.dynamicRoutes[N];if(a&&!1===a.fallback&&!O){if(C.adapterPath)return await Q();throw new s.NoFallbackError}}let R=null;!P||v.isDev||E||(R="/index"===(R=J)?"/":R),L&&K&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:K,serverActionsManifest:L});let S=a.method||"GET",T=(0,h.getTracer)(),U=!!(null==G?void 0:G.isWrappedByNextServer),V=!!(0,g.getRequestMeta)(a,"minimalMode"),W=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,C,M,F,V);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let X={params:B,previewProps:M,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts,useCacheTimeout:C.experimental.useCacheTimeout,durableUseCacheEntries:!!C.experimental.durableUseCacheEntries},cacheComponents:!!C.cacheComponents,validationLevel:C.experimental.instantInsights.validationLevel,isDraftMode:E,incrementalCache:W,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:C.cacheLife,staticPageGenerationTimeout:C.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0},sharedContext:{buildId:z,deploymentId:A}},Y=new k.NodeNextRequest(a),Z=new k.NodeNextResponse(b),$=l.NextRequestAdapter.fromNodeNextRequest(Y,(0,l.signalFromNodeResponse)(b)),_=async({previousCacheEntry:e})=>{try{if(!V&&H&&I&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=null===R?await v.handle($,X):await v.prerender($,X);a.fetchMetrics=X.renderOpts.fetchMetrics;let f=X.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=X.renderOpts.collectedTags;if(!P)return await (0,o.I)(Y,Z,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!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,e=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?C.expireTime:void 0:X.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==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:null!==R,isOnDemandRevalidate:H})},!1,G),b}},aa=async d=>{try{var f,g;let d=await v.handleResponse({req:a,nextConfig:C,cacheKey:R,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,previewProps:M,prerenderManifest:F,isRoutePPREnabled:!1,isOnDemandRevalidate:H,revalidateOnlyGenerated:I,responseGenerator:_,waitUntil:c.waitUntil,isMinimalMode:V});if(null!==d&&"error"in d)throw d.error;if(!P)return;if((null==d||null==(f=d.value)?void 0:f.kind)!==u.CachedRouteKind.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==d||null==(g=d.value)?void 0:g.kind}`);V||b.setHeader("x-nextjs-cache",H?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),E&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);V&&P||h.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(Y,Z,new Response(d.value.body,{headers:h,status:d.value.status||200}));return}catch(c){if(c instanceof s.NoFallbackError||await v.onRequestError(a,c,{routerKind:"App Router",routePath:N,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:null!==R,isOnDemandRevalidate:H})},!1,G),P)throw c;if(b.headersSent){if(d){let a=c instanceof Error?c:Error("Unknown app route error");d.recordException(a),d.setStatus({code:h.SpanStatusCode.ERROR,message:a.message}),d.setAttribute("error.type",a.name)}b.writableEnded||b.destroyed||b.end()}else await (0,o.I)(Y,Z,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=T.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")||N,f=`${S} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":f}),d.updateName(f),x&&x!==d&&(x.setAttribute("http.route",e),x.updateName(f))})()}};U||void 0===a.url||null==w||w.setAttribute("http.target",a.url),await aa(w)}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6193:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>m,dynamic:()=>n});var e=c(23211),f=c(75430),g=c(80547),h=c(72498),i=c(66544),j=c(21278),k=c(67649),l=a([f,g,h,j]);[f,g,h,j]=l.then?(await l)():l;let n="force-dynamic";async function m(a){if(!(0,i.EN)(a))return e.NextResponse.json({code:"access-denied"},{status:403});if(!(0,i.E2)(a))return e.NextResponse.json({code:"invalid-request"},{status:415});try{let b=await a.json();if("string"!=typeof b.cwd||!["preview","apply","undo"].includes(String(b.action)))return e.NextResponse.json({code:"invalid-request"},{status:400});let c=b.cwd;if(!(0,g.B7)(c,await (0,g.mc)()))return e.NextResponse.json({code:"access-denied"},{status:403});let d=(0,f.getAgentDir)();if(!(0,h.Y1)(c,d).trusted)return e.NextResponse.json({code:"project-untrusted"},{status:403});if("undo"===b.action){if("string"!=typeof b.undoToken)return e.NextResponse.json({code:"invalid-request"},{status:400});return e.NextResponse.json(await (0,k.bg)(b.undoToken,c))}if("string"!=typeof b.filePath||"string"!=typeof b.package)return e.NextResponse.json({code:"invalid-request"},{status:400});let{skills:i}=await (0,j.y)(c,{includeShadowed:!0}),l=i.find(a=>a.filePath===b.filePath&&a.install?.package===b.package);if(!l?.install)return e.NextResponse.json({code:"source-changed"},{status:409});if("preview"===b.action)return e.NextResponse.json(await (0,k.hr)(l,c,d));if("move"!==b.mode&&"copy"!==b.mode||!0!==b.sharedAcknowledged)return e.NextResponse.json({code:"invalid-request"},{status:400});return e.NextResponse.json(await (0,k.$z)(l,b.mode,c,d))}catch(a){if(a instanceof k.b3)return e.NextResponse.json({code:a.code,targetPath:a.targetPath},{status:409});if(a instanceof Error&&a.message.startsWith("Linked skill roots"))return e.NextResponse.json({code:"linked-files"},{status:409});return e.NextResponse.json({code:"failed",details:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},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")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},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")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67649:(a,b,c)=>{c.d(b,{$z:()=>z,b3:()=>m,bg:()=>A,hr:()=>y});var d=c(51455),e=c(76760),f=c.n(e),g=c(48161),h=c(77598),i=c(80974),j=c.n(i),k=c(75805),l=c(89469);class m extends Error{constructor(a,b){super(a),this.code=a,this.targetPath=b}}let n=Symbol.for("pi-web.skill-transfer-undo"),o=globalThis,p=o[n]??=new Map;async function q(a,b=!1){let c=await (0,l.Nn)(a);if(!c&&b)return{version:1,skills:{}};if(!c?.isFile()||c.isSymbolicLink())throw new m("invalid-lock");let e=JSON.parse(await (0,d.readFile)(a,"utf8"));if(!e||"object"!=typeof e||!e.skills||"object"!=typeof e.skills||Array.isArray(e.skills))throw new m("invalid-lock");return e}function r(a){return a.trim().replace(/^git\+/,"").replace(/^https?:\/\/github\.com\//,"").replace(/^git@github\.com:/,"").replace(/\.git$/,"").replace(/\/$/,"")}function s(a,b,c,d){if(!a.install||!/^[a-z0-9][a-z0-9_-]*$/.test(a.name))throw new m("unsupported");let e=f().join(d,".agents","skills"),g=f().join(b,".agents","skills");if((0,l.Eb)(e,g))throw new m("overlap");let h=(0,k.i)({homeDir:d}),i=f().join(b,"skills-lock.json"),j=a.install.scope,n=f().dirname(a.filePath);if(!("global"===j?[e,f().join(c,"skills")]:[g,f().join(b,".pi","skills")]).some(b=>(0,l.Eb)(f().join(b,a.name,"SKILL.md"),a.filePath)))throw new m("unsupported");return{sourceDir:n,targetDir:f().join("global"===j?g:e,a.name),sourceLock:"global"===j?h:i,targetLock:"global"===j?i:h,targetScope:"global"===j?"project":"global"}}async function t(a,b,c,e,g){if(await (0,l.R4)(b.sourceDir),!(await (0,d.lstat)(f().join(b.sourceDir,"SKILL.md"))).isFile())throw new m("source-changed");let h=await q(b.sourceLock),i=h.skills[a.name];if(!i||"string"!=typeof i.source||r(i.source)!==r(a.install.source))throw new m("source-changed");for(let d of"project"===a.install.scope?[f().join(c,".pi","skills",a.name),f().join(c,".agents","skills",a.name)]:[f().join(e,"skills",a.name),f().join(g,".agents","skills",a.name)])if(!(0,l.Eb)(d,b.sourceDir)&&await (0,l.Nn)(d))throw new m("conflict",d);let j=await q(b.targetLock,!0),k="project"===b.targetScope?[f().join(c,".pi","skills",a.name)]:[f().join(e,"skills",a.name)];for(let a of[b.targetDir,...k])if(await (0,l.Nn)(a))throw new m("conflict",a);if(Object.keys(j.skills).some(b=>b.toLowerCase()===a.name.toLowerCase()))throw new m("conflict",b.targetDir);return{source:h,target:j,entry:i}}async function u(a){let b=(0,h.createHash)("sha256"),c=0,e=0;async function g(a,h){let i=await (0,d.lstat)(a);if(i.isSymbolicLink())throw new m("linked-files");if(b.update(h+"\0"),i.isDirectory())for(let c of(b.update("dir\0"),(await (0,d.readdir)(a)).sort()))await g(f().join(a,c),`${h}/${c}`);else if(i.isFile()){if(++c>2e4||(e+=i.size)>0xc800000)throw new m("too-large");b.update("file\0").update(await (0,d.readFile)(a)).update("\0")}else throw new m("unsupported")}return await g(a,""),b.digest("hex")}async function v(a){let b=a;for(;!await (0,l.Nn)(b);)b=f().dirname(b);await (0,l.R4)(b),await (0,d.mkdir)(a,{recursive:!0}),await (0,l.R4)(a)}async function w(a,b){let c=`${a}.${(0,h.randomUUID)()}.tmp`;try{let e=await (0,d.lstat)(a);await (0,d.writeFile)(c,"string"==typeof b?b:`${JSON.stringify(b,null,2)}
2
+ `,{flag:"wx",mode:511&e.mode}),await (0,d.rename)(c,a)}finally{await (0,d.unlink)(c).catch(()=>void 0)}}async function x(a,b,c){let e=[];try{for(let b of[...new Set(a)].sort()){if(await v(f().dirname(b)),b===c)try{await (0,d.writeFile)(b,JSON.stringify({version:".skill-lock.json"===f().basename(b)?3:1,skills:{}})+"\n",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}await q(b),e.push(await j().lock(b,{realpath:!1,retries:{retries:10,minTimeout:50,maxTimeout:200}}))}return await b()}finally{for(let a of e.reverse())await a()}}async function y(a,b,c,d=(0,g.homedir)()){let e=s(a,b,c,d);return await t(a,e,b,c,d),await u(e.sourceDir),{targetPath:f().join(e.targetDir,"SKILL.md"),targetScope:e.targetScope}}async function z(a,b,c,e,i=(0,g.homedir)()){let j=s(a,c,e,i);return await t(a,j,c,e,i),x([j.sourceLock,j.targetLock],async()=>{let{source:g,target:k,entry:n}=await t(a,j,c,e,i),o=await (0,d.readFile)(j.sourceLock,"utf8"),q=await (0,d.readFile)(j.targetLock,"utf8"),r=await u(j.sourceDir),s=f().join(f().dirname(f().dirname(j.sourceDir)),".pi-web-skill-transfers");await v(s);let x=await (0,d.mkdtemp)(f().join(s,`${a.name}-`)),y=f().join(f().dirname(f().dirname(j.targetDir)),".pi-web-skill-transfers");await v(y);let z=await (0,d.mkdtemp)(f().join(y,`${a.name}-`)),A=f().join(z,"target");if(await (0,d.cp)(j.sourceDir,A,{recursive:!0,errorOnExist:!0,force:!1,preserveTimestamps:!0}),await u(A)!==r||await u(j.sourceDir)!==r)throw new m("source-changed");let B={...n,piWebVersionHash:a.install?.versionHash};delete B.skillFolderHash,delete B.computedHash,k.skills[a.name]=B,"move"===b&&delete g.skills[a.name],await (0,d.writeFile)(f().join(x,"manifest.json"),JSON.stringify({...j,mode:b,name:a.name,sourceEntry:n,targetEntry:B,stagingPath:z},null,2),{mode:384}),await (0,d.writeFile)(f().join(x,"source-lock.json"),o,{mode:384}),await (0,d.writeFile)(f().join(x,"target-lock.json"),q,{mode:384}),await v(f().dirname(j.targetDir));let C=!1,D=!1,E=!1,F=!1;try{if(await (0,l.Nn)(j.targetDir))throw new m("conflict",j.targetDir);if(await (0,d.readFile)(j.sourceLock,"utf8")!==o||await (0,d.readFile)(j.targetLock,"utf8")!==q)throw new m("source-changed");await (0,d.rename)(A,j.targetDir),C=!0,"move"===b&&(await (0,d.rename)(j.sourceDir,f().join(x,"source")),D=!0),await w(j.targetLock,k),E=!0,"move"===b&&(await w(j.sourceLock,g),F=!0)}catch(a){try{F&&await w(j.sourceLock,o),E&&await w(j.targetLock,q),D&&await (0,d.rename)(f().join(x,"source"),j.sourceDir),C&&await (0,d.rename)(j.targetDir,A)}catch{throw new m("recover",x)}throw a}for(let[a,b]of p)b.expires<Date.now()&&p.delete(a);p.size>=100&&p.delete(p.keys().next().value);let G=(0,h.randomUUID)();return p.set(G,{...j,cwd:c,name:a.name,mode:b,sourceEntry:n,targetEntry:B,backupPath:x,stagingPath:z,targetHash:r,expires:Date.now()+3e5}),{...j,targetPath:f().join(j.targetDir,"SKILL.md"),undoToken:G}},j.targetLock)}async function A(a,b){let c=p.get(a);if(!c||c.expires<Date.now()||!(0,l.Eb)(c.cwd,b))throw new m("undo-expired");return x([c.sourceLock,c.targetLock],async()=>{if(p.get(a)!==c)throw new m("undo-expired");let b=await q(c.sourceLock),e=await q(c.targetLock);if(JSON.stringify(e.skills[c.name])!==JSON.stringify(c.targetEntry)||(await (0,l.R4)(c.targetDir),await u(c.targetDir)!==c.targetHash))throw new m("undo-changed");if("move"===c.mode){if(b.skills[c.name]||await (0,l.Nn)(c.sourceDir))throw new m("conflict",c.sourceDir);if(await u(f().join(c.backupPath,"source"))!==c.targetHash)throw new m("undo-changed")}await (0,l.R4)(f().dirname(c.sourceDir)),await (0,l.R4)(c.backupPath),await (0,l.R4)(c.stagingPath);let g=await (0,d.readFile)(c.targetLock,"utf8"),h=!1,i=!1,j=!1;try{await (0,d.rename)(c.targetDir,f().join(c.stagingPath,"undone-target")),h=!0,"move"===c.mode&&(await (0,d.rename)(f().join(c.backupPath,"source"),c.sourceDir),i=!0,b.skills[c.name]=c.sourceEntry),delete e.skills[c.name],await w(c.targetLock,e),j=!0,"move"===c.mode&&await w(c.sourceLock,b)}catch(a){try{j&&await w(c.targetLock,g),i&&await (0,d.rename)(c.sourceDir,f().join(c.backupPath,"source")),h&&await (0,d.rename)(f().join(c.stagingPath,"undone-target"),c.targetDir)}catch{throw new m("recover",c.backupPath)}throw a}return p.delete(a),{targetPath:f().join(c.sourceDir,"SKILL.md")}})}},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,974,5582,5e3,2498,1249],()=>b(b.s=861));module.exports=c})();