commandmate 0.15.0 → 0.16.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 (537) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +366 -321
  3. package/.next/app-path-routes-manifest.json +31 -26
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/react-loadable-manifest.json +11 -11
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/routes-manifest.json +15 -0
  9. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update-check/route.js +1 -1
  12. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/daily-summary/route.js +1 -1
  24. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  25. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  27. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  28. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  37. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  41. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  43. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  45. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/clone/route.js +1 -1
  47. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/skills/[id]/route.js +1 -1
  56. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/skills/installations/route.js +23 -0
  58. package/.next/server/app/api/skills/installations/route.js.nft.json +1 -0
  59. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -0
  60. package/.next/server/app/api/skills/operations/route.js +13 -0
  61. package/.next/server/app/api/skills/operations/route.js.nft.json +1 -0
  62. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -0
  63. package/.next/server/app/api/skills/reindex/route.js +23 -0
  64. package/.next/server/app/api/skills/reindex/route.js.nft.json +1 -0
  65. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -0
  66. package/.next/server/app/api/skills/route.js +1 -1
  67. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/todos/route.js +1 -1
  72. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  76. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  83. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js.nft.json +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js.nft.json +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js.nft.json +1 -1
  96. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/git/commit/route.js.nft.json +1 -1
  99. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +1 -1
  102. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js.nft.json +1 -1
  105. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +1 -1
  108. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/pull/route.js.nft.json +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/push/route.js.nft.json +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/reset/route.js.nft.json +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/revert/route.js.nft.json +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/stage/route.js.nft.json +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js.nft.json +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js.nft.json +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js.nft.json +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js.nft.json +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  172. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  182. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +18 -0
  184. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -0
  185. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -0
  186. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
  191. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -1
  194. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -1
  197. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/more/page.js +1 -1
  224. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  225. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/page_client-reference-manifest.js +1 -1
  227. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  229. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  230. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  231. package/.next/server/app/skills/[skillId]/page.js +1 -1
  232. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  233. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  234. package/.next/server/app/skills/installed/page.js +2 -0
  235. package/.next/server/app/skills/installed/page.js.nft.json +1 -0
  236. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -0
  237. package/.next/server/app/skills/page.js +2 -2
  238. package/.next/server/app/skills/page.js.nft.json +1 -1
  239. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  240. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  241. package/.next/server/app/worktrees/[id]/page.js +3 -3
  242. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  243. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  244. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app-paths-manifest.json +31 -26
  246. package/.next/server/chunks/1117.js +1 -1
  247. package/.next/server/chunks/1185.js +1 -0
  248. package/.next/server/chunks/1239.js +1 -0
  249. package/.next/server/chunks/22.js +1 -1
  250. package/.next/server/chunks/2328.js +1 -1
  251. package/.next/server/chunks/2710.js +2 -0
  252. package/.next/server/chunks/28.js +35 -0
  253. package/.next/server/chunks/3042.js +1 -2
  254. package/.next/server/chunks/4440.js +2 -0
  255. package/.next/server/chunks/4548.js +1 -0
  256. package/.next/server/chunks/5064.js +1 -1
  257. package/.next/server/chunks/5381.js +1 -1
  258. package/.next/server/chunks/5456.js +1 -1
  259. package/.next/server/chunks/5737.js +1 -0
  260. package/.next/server/chunks/5793.js +1 -0
  261. package/.next/server/chunks/5959.js +2 -2
  262. package/.next/server/chunks/6130.js +1 -1
  263. package/.next/server/chunks/8681.js +1 -1
  264. package/.next/server/chunks/8807.js +66 -3
  265. package/.next/server/chunks/9051.js +1 -0
  266. package/.next/server/middleware-build-manifest.js +1 -1
  267. package/.next/server/middleware-manifest.json +5 -5
  268. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  269. package/.next/server/pages/500.html +1 -1
  270. package/.next/server/server-reference-manifest.json +1 -1
  271. package/.next/static/AKqbAyuzbFfg05qpbCI_K/_buildManifest.js +1 -0
  272. package/.next/static/chunks/2751-7fabd91275b14ca3.js +1 -0
  273. package/.next/static/chunks/{4459.03172449db395039.js → 4459.a94b52985a76509a.js} +1 -1
  274. package/.next/static/chunks/{6488-93870a55f4a3e3cd.js → 6488-c2a968ec806975c2.js} +1 -1
  275. package/.next/static/chunks/{7485.43871aedf3dbb980.js → 7485.442b21101fca7257.js} +1 -1
  276. package/.next/static/chunks/8562-6e2ab32452f4fa5b.js +1 -0
  277. package/.next/static/chunks/app/api/app/update/route-55e398bd20e2d7a9.js +1 -0
  278. package/.next/static/chunks/app/api/app/update-check/route-55e398bd20e2d7a9.js +1 -0
  279. package/.next/static/chunks/app/api/assistant/conversation/route-55e398bd20e2d7a9.js +1 -0
  280. package/.next/static/chunks/app/api/assistant/current-output/route-55e398bd20e2d7a9.js +1 -0
  281. package/.next/static/chunks/app/api/assistant/messages/route-55e398bd20e2d7a9.js +1 -0
  282. package/.next/static/chunks/app/api/assistant/session/route-55e398bd20e2d7a9.js +1 -0
  283. package/.next/static/chunks/app/api/assistant/start/route-55e398bd20e2d7a9.js +1 -0
  284. package/.next/static/chunks/app/api/assistant/terminal/route-55e398bd20e2d7a9.js +1 -0
  285. package/.next/static/chunks/app/api/assistant/tools/route-55e398bd20e2d7a9.js +1 -0
  286. package/.next/static/chunks/app/api/auth/login/route-55e398bd20e2d7a9.js +1 -0
  287. package/.next/static/chunks/app/api/auth/logout/route-55e398bd20e2d7a9.js +1 -0
  288. package/.next/static/chunks/app/api/auth/status/route-55e398bd20e2d7a9.js +1 -0
  289. package/.next/static/chunks/app/api/daily-summary/route-55e398bd20e2d7a9.js +1 -0
  290. package/.next/static/chunks/app/api/daily-summary/status/route-55e398bd20e2d7a9.js +1 -0
  291. package/.next/static/chunks/app/api/external-apps/[id]/health/route-55e398bd20e2d7a9.js +1 -0
  292. package/.next/static/chunks/app/api/external-apps/[id]/route-55e398bd20e2d7a9.js +1 -0
  293. package/.next/static/chunks/app/api/external-apps/route-55e398bd20e2d7a9.js +1 -0
  294. package/.next/static/chunks/app/api/fs/browse/route-55e398bd20e2d7a9.js +1 -0
  295. package/.next/static/chunks/app/api/fs/recent-paths/route-55e398bd20e2d7a9.js +1 -0
  296. package/.next/static/chunks/app/api/hooks/claude-done/route-55e398bd20e2d7a9.js +1 -0
  297. package/.next/static/chunks/app/api/ollama/models/route-55e398bd20e2d7a9.js +1 -0
  298. package/.next/static/chunks/app/api/push/subscriptions/route-55e398bd20e2d7a9.js +1 -0
  299. package/.next/static/chunks/app/api/push/vapid/route-55e398bd20e2d7a9.js +1 -0
  300. package/.next/static/chunks/app/api/repositories/[id]/route-55e398bd20e2d7a9.js +1 -0
  301. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +1 -0
  302. package/.next/static/chunks/app/api/repositories/[id]/todos/route-55e398bd20e2d7a9.js +1 -0
  303. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-55e398bd20e2d7a9.js +1 -0
  304. package/.next/static/chunks/app/api/repositories/clone/route-55e398bd20e2d7a9.js +1 -0
  305. package/.next/static/chunks/app/api/repositories/excluded/route-55e398bd20e2d7a9.js +1 -0
  306. package/.next/static/chunks/app/api/repositories/restore/route-55e398bd20e2d7a9.js +1 -0
  307. package/.next/static/chunks/app/api/repositories/route-55e398bd20e2d7a9.js +1 -0
  308. package/.next/static/chunks/app/api/repositories/scan/route-55e398bd20e2d7a9.js +1 -0
  309. package/.next/static/chunks/app/api/repositories/sync/route-55e398bd20e2d7a9.js +1 -0
  310. package/.next/static/chunks/app/api/repositories/validate-path/route-55e398bd20e2d7a9.js +1 -0
  311. package/.next/static/chunks/app/api/sidebar/group-order/route-55e398bd20e2d7a9.js +1 -0
  312. package/.next/static/chunks/app/api/skills/[id]/route-55e398bd20e2d7a9.js +1 -0
  313. package/.next/static/chunks/app/api/skills/installations/route-55e398bd20e2d7a9.js +1 -0
  314. package/.next/static/chunks/app/api/skills/operations/route-55e398bd20e2d7a9.js +1 -0
  315. package/.next/static/chunks/app/api/skills/reindex/route-55e398bd20e2d7a9.js +1 -0
  316. package/.next/static/chunks/app/api/skills/route-55e398bd20e2d7a9.js +1 -0
  317. package/.next/static/chunks/app/api/slash-commands/route-55e398bd20e2d7a9.js +1 -0
  318. package/.next/static/chunks/app/api/templates/[id]/route-55e398bd20e2d7a9.js +1 -0
  319. package/.next/static/chunks/app/api/templates/route-55e398bd20e2d7a9.js +1 -0
  320. package/.next/static/chunks/app/api/todos/route-55e398bd20e2d7a9.js +1 -0
  321. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-55e398bd20e2d7a9.js +1 -0
  322. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-55e398bd20e2d7a9.js +1 -0
  323. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-55e398bd20e2d7a9.js +1 -0
  324. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-55e398bd20e2d7a9.js +1 -0
  325. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-55e398bd20e2d7a9.js +1 -0
  326. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-55e398bd20e2d7a9.js +1 -0
  327. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-55e398bd20e2d7a9.js +1 -0
  328. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-55e398bd20e2d7a9.js +1 -0
  329. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-55e398bd20e2d7a9.js +1 -0
  330. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-55e398bd20e2d7a9.js +1 -0
  331. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-55e398bd20e2d7a9.js +1 -0
  332. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-55e398bd20e2d7a9.js +1 -0
  333. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-55e398bd20e2d7a9.js +1 -0
  334. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-55e398bd20e2d7a9.js +1 -0
  335. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-55e398bd20e2d7a9.js +1 -0
  336. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-55e398bd20e2d7a9.js +1 -0
  337. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-55e398bd20e2d7a9.js +1 -0
  338. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-55e398bd20e2d7a9.js +1 -0
  339. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-55e398bd20e2d7a9.js +1 -0
  340. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-55e398bd20e2d7a9.js +1 -0
  341. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-55e398bd20e2d7a9.js +1 -0
  342. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-55e398bd20e2d7a9.js +1 -0
  343. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-55e398bd20e2d7a9.js +1 -0
  344. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-55e398bd20e2d7a9.js +1 -0
  345. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-55e398bd20e2d7a9.js +1 -0
  346. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-55e398bd20e2d7a9.js +1 -0
  347. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-55e398bd20e2d7a9.js +1 -0
  348. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-55e398bd20e2d7a9.js +1 -0
  349. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-55e398bd20e2d7a9.js +1 -0
  350. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-55e398bd20e2d7a9.js +1 -0
  351. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-55e398bd20e2d7a9.js +1 -0
  352. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-55e398bd20e2d7a9.js +1 -0
  353. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-55e398bd20e2d7a9.js +1 -0
  354. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-55e398bd20e2d7a9.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-55e398bd20e2d7a9.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-55e398bd20e2d7a9.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-55e398bd20e2d7a9.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-55e398bd20e2d7a9.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-55e398bd20e2d7a9.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-55e398bd20e2d7a9.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-55e398bd20e2d7a9.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/route-55e398bd20e2d7a9.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-55e398bd20e2d7a9.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-55e398bd20e2d7a9.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-55e398bd20e2d7a9.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/search/route-55e398bd20e2d7a9.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/send/route-55e398bd20e2d7a9.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-55e398bd20e2d7a9.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-55e398bd20e2d7a9.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-55e398bd20e2d7a9.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-55e398bd20e2d7a9.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-55e398bd20e2d7a9.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-55e398bd20e2d7a9.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-55e398bd20e2d7a9.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-55e398bd20e2d7a9.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-55e398bd20e2d7a9.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-55e398bd20e2d7a9.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-55e398bd20e2d7a9.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-55e398bd20e2d7a9.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-55e398bd20e2d7a9.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-55e398bd20e2d7a9.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-55e398bd20e2d7a9.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-55e398bd20e2d7a9.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-55e398bd20e2d7a9.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/route-55e398bd20e2d7a9.js +1 -0
  387. package/.next/static/chunks/app/manifest.webmanifest/route-55e398bd20e2d7a9.js +1 -0
  388. package/.next/static/chunks/app/more/{page-082d4ae496f9a36e.js → page-1619018cac999bbc.js} +1 -1
  389. package/.next/static/chunks/app/proxy/[...path]/route-55e398bd20e2d7a9.js +1 -0
  390. package/.next/static/chunks/app/skills/[skillId]/page-6008b904225ebb25.js +1 -0
  391. package/.next/static/chunks/app/skills/installed/page-6641f95e6a6e5f9d.js +1 -0
  392. package/.next/static/chunks/app/skills/page-184f8e23e31a3667.js +1 -0
  393. package/.next/static/chunks/app/worktrees/[id]/{page-6da38f0a06dfd9db.js → page-59a63a2c013ec1eb.js} +1 -1
  394. package/.next/static/chunks/{webpack-6b35d37d50302d27.js → webpack-180bebdee221b6f4.js} +1 -1
  395. package/.next/static/css/{5127edd9aa8f3b49.css → d3453a6876553d32.css} +1 -1
  396. package/.next/trace +11 -11
  397. package/.next/types/app/api/skills/installations/route.ts +347 -0
  398. package/.next/types/app/api/skills/operations/route.ts +347 -0
  399. package/.next/types/app/api/skills/reindex/route.ts +347 -0
  400. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.ts +347 -0
  401. package/.next/types/app/skills/installed/page.ts +84 -0
  402. package/.next/types/routes.d.ts +7 -2
  403. package/.next/types/validator.ts +45 -0
  404. package/dist/cli/commands/skill.d.ts +2 -1
  405. package/dist/cli/commands/skill.d.ts.map +1 -1
  406. package/dist/cli/commands/skill.js +136 -2
  407. package/dist/cli/types/api-responses.d.ts +40 -0
  408. package/dist/cli/types/api-responses.d.ts.map +1 -1
  409. package/dist/cli/types/index.d.ts +6 -0
  410. package/dist/cli/types/index.d.ts.map +1 -1
  411. package/dist/server/src/lib/db/migrations/index.js +2 -0
  412. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  413. package/dist/server/src/lib/db/migrations/v48-skill-operations-audit-index.js +117 -0
  414. package/dist/server/src/lib/skills/compatibility-matrix.js +256 -0
  415. package/dist/server/src/lib/skills/compatibility.js +132 -11
  416. package/dist/server/src/lib/skills/operation-audit.js +85 -15
  417. package/dist/server/src/lib/skills/operation-journal.js +14 -1
  418. package/package.json +1 -1
  419. package/.next/server/chunks/1808.js +0 -1
  420. package/.next/server/chunks/5226.js +0 -28
  421. package/.next/server/chunks/5306.js +0 -2
  422. package/.next/server/chunks/593.js +0 -1
  423. package/.next/server/chunks/9192.js +0 -1
  424. package/.next/static/MqlW91_Se_kEW6mtm-1x0/_buildManifest.js +0 -1
  425. package/.next/static/chunks/3418-7e47651340d940b0.js +0 -1
  426. package/.next/static/chunks/9142-41b13a2f278529cc.js +0 -1
  427. package/.next/static/chunks/app/api/app/update/route-8c8bebe20cebf964.js +0 -1
  428. package/.next/static/chunks/app/api/app/update-check/route-8c8bebe20cebf964.js +0 -1
  429. package/.next/static/chunks/app/api/assistant/conversation/route-8c8bebe20cebf964.js +0 -1
  430. package/.next/static/chunks/app/api/assistant/current-output/route-8c8bebe20cebf964.js +0 -1
  431. package/.next/static/chunks/app/api/assistant/messages/route-8c8bebe20cebf964.js +0 -1
  432. package/.next/static/chunks/app/api/assistant/session/route-8c8bebe20cebf964.js +0 -1
  433. package/.next/static/chunks/app/api/assistant/start/route-8c8bebe20cebf964.js +0 -1
  434. package/.next/static/chunks/app/api/assistant/terminal/route-8c8bebe20cebf964.js +0 -1
  435. package/.next/static/chunks/app/api/assistant/tools/route-8c8bebe20cebf964.js +0 -1
  436. package/.next/static/chunks/app/api/auth/login/route-8c8bebe20cebf964.js +0 -1
  437. package/.next/static/chunks/app/api/auth/logout/route-8c8bebe20cebf964.js +0 -1
  438. package/.next/static/chunks/app/api/auth/status/route-8c8bebe20cebf964.js +0 -1
  439. package/.next/static/chunks/app/api/daily-summary/route-8c8bebe20cebf964.js +0 -1
  440. package/.next/static/chunks/app/api/daily-summary/status/route-8c8bebe20cebf964.js +0 -1
  441. package/.next/static/chunks/app/api/external-apps/[id]/health/route-8c8bebe20cebf964.js +0 -1
  442. package/.next/static/chunks/app/api/external-apps/[id]/route-8c8bebe20cebf964.js +0 -1
  443. package/.next/static/chunks/app/api/external-apps/route-8c8bebe20cebf964.js +0 -1
  444. package/.next/static/chunks/app/api/fs/browse/route-8c8bebe20cebf964.js +0 -1
  445. package/.next/static/chunks/app/api/fs/recent-paths/route-8c8bebe20cebf964.js +0 -1
  446. package/.next/static/chunks/app/api/hooks/claude-done/route-8c8bebe20cebf964.js +0 -1
  447. package/.next/static/chunks/app/api/ollama/models/route-8c8bebe20cebf964.js +0 -1
  448. package/.next/static/chunks/app/api/push/subscriptions/route-8c8bebe20cebf964.js +0 -1
  449. package/.next/static/chunks/app/api/push/vapid/route-8c8bebe20cebf964.js +0 -1
  450. package/.next/static/chunks/app/api/repositories/[id]/route-8c8bebe20cebf964.js +0 -1
  451. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8c8bebe20cebf964.js +0 -1
  452. package/.next/static/chunks/app/api/repositories/[id]/todos/route-8c8bebe20cebf964.js +0 -1
  453. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8c8bebe20cebf964.js +0 -1
  454. package/.next/static/chunks/app/api/repositories/clone/route-8c8bebe20cebf964.js +0 -1
  455. package/.next/static/chunks/app/api/repositories/excluded/route-8c8bebe20cebf964.js +0 -1
  456. package/.next/static/chunks/app/api/repositories/restore/route-8c8bebe20cebf964.js +0 -1
  457. package/.next/static/chunks/app/api/repositories/route-8c8bebe20cebf964.js +0 -1
  458. package/.next/static/chunks/app/api/repositories/scan/route-8c8bebe20cebf964.js +0 -1
  459. package/.next/static/chunks/app/api/repositories/sync/route-8c8bebe20cebf964.js +0 -1
  460. package/.next/static/chunks/app/api/repositories/validate-path/route-8c8bebe20cebf964.js +0 -1
  461. package/.next/static/chunks/app/api/sidebar/group-order/route-8c8bebe20cebf964.js +0 -1
  462. package/.next/static/chunks/app/api/skills/[id]/route-8c8bebe20cebf964.js +0 -1
  463. package/.next/static/chunks/app/api/skills/route-8c8bebe20cebf964.js +0 -1
  464. package/.next/static/chunks/app/api/slash-commands/route-8c8bebe20cebf964.js +0 -1
  465. package/.next/static/chunks/app/api/templates/[id]/route-8c8bebe20cebf964.js +0 -1
  466. package/.next/static/chunks/app/api/templates/route-8c8bebe20cebf964.js +0 -1
  467. package/.next/static/chunks/app/api/todos/route-8c8bebe20cebf964.js +0 -1
  468. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8c8bebe20cebf964.js +0 -1
  469. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8c8bebe20cebf964.js +0 -1
  470. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8c8bebe20cebf964.js +0 -1
  471. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8c8bebe20cebf964.js +0 -1
  472. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8c8bebe20cebf964.js +0 -1
  473. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8c8bebe20cebf964.js +0 -1
  474. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8c8bebe20cebf964.js +0 -1
  475. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8c8bebe20cebf964.js +0 -1
  476. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8c8bebe20cebf964.js +0 -1
  477. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8c8bebe20cebf964.js +0 -1
  478. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8c8bebe20cebf964.js +0 -1
  479. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8c8bebe20cebf964.js +0 -1
  480. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8c8bebe20cebf964.js +0 -1
  481. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8c8bebe20cebf964.js +0 -1
  482. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8c8bebe20cebf964.js +0 -1
  483. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8c8bebe20cebf964.js +0 -1
  484. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8c8bebe20cebf964.js +0 -1
  485. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8c8bebe20cebf964.js +0 -1
  486. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8c8bebe20cebf964.js +0 -1
  487. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8c8bebe20cebf964.js +0 -1
  488. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8c8bebe20cebf964.js +0 -1
  489. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8c8bebe20cebf964.js +0 -1
  490. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8c8bebe20cebf964.js +0 -1
  491. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8c8bebe20cebf964.js +0 -1
  492. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8c8bebe20cebf964.js +0 -1
  493. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8c8bebe20cebf964.js +0 -1
  494. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8c8bebe20cebf964.js +0 -1
  495. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8c8bebe20cebf964.js +0 -1
  496. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8c8bebe20cebf964.js +0 -1
  497. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8c8bebe20cebf964.js +0 -1
  498. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8c8bebe20cebf964.js +0 -1
  499. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8c8bebe20cebf964.js +0 -1
  500. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8c8bebe20cebf964.js +0 -1
  501. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8c8bebe20cebf964.js +0 -1
  502. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8c8bebe20cebf964.js +0 -1
  503. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8c8bebe20cebf964.js +0 -1
  504. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8c8bebe20cebf964.js +0 -1
  505. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8c8bebe20cebf964.js +0 -1
  506. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8c8bebe20cebf964.js +0 -1
  507. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8c8bebe20cebf964.js +0 -1
  508. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8c8bebe20cebf964.js +0 -1
  509. package/.next/static/chunks/app/api/worktrees/[id]/route-8c8bebe20cebf964.js +0 -1
  510. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8c8bebe20cebf964.js +0 -1
  511. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8c8bebe20cebf964.js +0 -1
  512. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8c8bebe20cebf964.js +0 -1
  513. package/.next/static/chunks/app/api/worktrees/[id]/search/route-8c8bebe20cebf964.js +0 -1
  514. package/.next/static/chunks/app/api/worktrees/[id]/send/route-8c8bebe20cebf964.js +0 -1
  515. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8c8bebe20cebf964.js +0 -1
  516. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8c8bebe20cebf964.js +0 -1
  517. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8c8bebe20cebf964.js +0 -1
  518. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8c8bebe20cebf964.js +0 -1
  519. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8c8bebe20cebf964.js +0 -1
  520. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8c8bebe20cebf964.js +0 -1
  521. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8c8bebe20cebf964.js +0 -1
  522. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8c8bebe20cebf964.js +0 -1
  523. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8c8bebe20cebf964.js +0 -1
  524. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8c8bebe20cebf964.js +0 -1
  525. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8c8bebe20cebf964.js +0 -1
  526. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8c8bebe20cebf964.js +0 -1
  527. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8c8bebe20cebf964.js +0 -1
  528. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8c8bebe20cebf964.js +0 -1
  529. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8c8bebe20cebf964.js +0 -1
  530. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8c8bebe20cebf964.js +0 -1
  531. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8c8bebe20cebf964.js +0 -1
  532. package/.next/static/chunks/app/api/worktrees/route-8c8bebe20cebf964.js +0 -1
  533. package/.next/static/chunks/app/manifest.webmanifest/route-8c8bebe20cebf964.js +0 -1
  534. package/.next/static/chunks/app/proxy/[...path]/route-8c8bebe20cebf964.js +0 -1
  535. package/.next/static/chunks/app/skills/[skillId]/page-8c40c9683f242207.js +0 -1
  536. package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +0 -1
  537. /package/.next/static/{MqlW91_Se_kEW6mtm-1x0 → AKqbAyuzbFfg05qpbCI_K}/_ssgManifest.js +0 -0
@@ -16,9 +16,11 @@
16
16
  * @module lib/skills/operation-audit
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.SKILL_AUDIT_MAX_LIMIT = exports.SKILL_AUDIT_DEFAULT_LIMIT = void 0;
19
20
  exports.buildSkillOperationAuditInput = buildSkillOperationAuditInput;
20
21
  exports.recordSkillOperationAudit = recordSkillOperationAudit;
21
22
  exports.getSkillOperationAuditByOperationId = getSkillOperationAuditByOperationId;
23
+ exports.querySkillOperationAudit = querySkillOperationAudit;
22
24
  exports.listSkillOperationAudit = listSkillOperationAudit;
23
25
  const crypto_1 = require("crypto");
24
26
  const operation_store_1 = require("../../lib/skills/operation-store");
@@ -36,6 +38,8 @@ function mapRow(row) {
36
38
  worktreeId: row.worktree_id,
37
39
  skillId: row.skill_id,
38
40
  skillVersion: row.skill_version,
41
+ fromVersion: row.from_version,
42
+ toVersion: row.to_version,
39
43
  sourceOrigin: row.source_origin,
40
44
  sourceRepository: row.source_repository,
41
45
  sourceRef: row.source_ref,
@@ -48,15 +52,23 @@ function mapRow(row) {
48
52
  }
49
53
  const SELECT_COLUMNS = `
50
54
  id, operation_id, idempotency_key, binding_hash, operation, state, result,
51
- actor_type, actor_id, worktree_id, skill_id, skill_version,
55
+ actor_type, actor_id, worktree_id, skill_id, skill_version, from_version, to_version,
52
56
  source_origin, source_repository, source_ref, source_commit, artifact_sha256,
53
57
  error_code, error_message, recorded_at
54
58
  `;
55
59
  /**
56
60
  * Build an audit input from a journal entry, so the two records cannot drift.
57
61
  * The journal already holds the actor, target, source and typed error.
62
+ *
63
+ * The version transition (#1248) is derived from the journal rather than passed
64
+ * in, because for the two operations that exist today the journal fully
65
+ * determines it: an install ends at its target version and starts nowhere, an
66
+ * uninstall starts at the version it removes and ends nowhere. An `update` is
67
+ * the one case where `fromVersion` is not derivable — it has no writer yet
68
+ * (#1243/#1244), and whoever adds one has to supply the replaced version here.
58
69
  */
59
70
  function buildSkillOperationAuditInput(entry, result, recordedAt) {
71
+ const isUninstall = entry.operation === 'uninstall';
60
72
  return {
61
73
  operationId: entry.operationId,
62
74
  idempotencyKey: entry.idempotencyKey,
@@ -69,6 +81,8 @@ function buildSkillOperationAuditInput(entry, result, recordedAt) {
69
81
  worktreeId: entry.target.worktreeId,
70
82
  skillId: entry.target.skillId,
71
83
  skillVersion: entry.target.version,
84
+ fromVersion: isUninstall ? entry.target.version : null,
85
+ toVersion: isUninstall ? null : entry.target.version,
72
86
  sourceOrigin: entry.source?.origin ?? null,
73
87
  sourceRepository: entry.source?.repository ?? null,
74
88
  sourceRef: entry.source?.ref ?? null,
@@ -89,10 +103,10 @@ function recordSkillOperationAudit(db, input) {
89
103
  };
90
104
  db.prepare(`INSERT INTO skill_operations (
91
105
  id, operation_id, idempotency_key, binding_hash, operation, state, result,
92
- actor_type, actor_id, worktree_id, skill_id, skill_version,
106
+ actor_type, actor_id, worktree_id, skill_id, skill_version, from_version, to_version,
93
107
  source_origin, source_repository, source_ref, source_commit, artifact_sha256,
94
108
  error_code, error_message, recorded_at
95
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(record.id, record.operationId, record.idempotencyKey, record.bindingHash, record.operation, record.state, record.result, record.actorType, record.actorId, record.worktreeId, record.skillId, record.skillVersion, record.sourceOrigin, record.sourceRepository, record.sourceRef, record.sourceCommit, record.artifactSha256, record.errorCode, record.errorMessage, record.recordedAt);
109
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(record.id, record.operationId, record.idempotencyKey, record.bindingHash, record.operation, record.state, record.result, record.actorType, record.actorId, record.worktreeId, record.skillId, record.skillVersion, record.fromVersion, record.toVersion, record.sourceOrigin, record.sourceRepository, record.sourceRef, record.sourceCommit, record.artifactSha256, record.errorCode, record.errorMessage, record.recordedAt);
96
110
  return record;
97
111
  }
98
112
  /** Audit trail of one operation, oldest first. */
@@ -103,18 +117,74 @@ function getSkillOperationAuditByOperationId(db, operationId) {
103
117
  .all(operationId);
104
118
  return rows.map(mapRow);
105
119
  }
120
+ /** Default page size for an audit query. */
121
+ exports.SKILL_AUDIT_DEFAULT_LIMIT = 50;
122
+ /** Hard ceiling on one audit page, so a client cannot ask for the whole log. */
123
+ exports.SKILL_AUDIT_MAX_LIMIT = 200;
124
+ function buildAuditWhere(query) {
125
+ const conditions = [];
126
+ const params = [];
127
+ if (query.worktreeId !== undefined) {
128
+ conditions.push('worktree_id = ?');
129
+ params.push(query.worktreeId);
130
+ }
131
+ if (query.skillId !== undefined) {
132
+ conditions.push('skill_id = ?');
133
+ params.push(query.skillId);
134
+ }
135
+ if (query.operation !== undefined) {
136
+ conditions.push('operation = ?');
137
+ params.push(query.operation);
138
+ }
139
+ if (query.result !== undefined) {
140
+ conditions.push('result = ?');
141
+ params.push(query.result);
142
+ }
143
+ if (query.since !== undefined) {
144
+ conditions.push('recorded_at >= ?');
145
+ params.push(query.since);
146
+ }
147
+ if (query.until !== undefined) {
148
+ conditions.push('recorded_at < ?');
149
+ params.push(query.until);
150
+ }
151
+ if (query.after !== undefined) {
152
+ conditions.push('(recorded_at < ? OR (recorded_at = ? AND id < ?))');
153
+ params.push(query.after.recordedAt, query.after.recordedAt, query.after.id);
154
+ }
155
+ return {
156
+ clause: conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : '',
157
+ params,
158
+ };
159
+ }
160
+ /**
161
+ * One page of the audit feed, newest first.
162
+ *
163
+ * Fetches one row beyond the page to decide `hasMore` without a second COUNT
164
+ * over a table that only ever grows.
165
+ */
166
+ function querySkillOperationAudit(db, query = {}) {
167
+ const limit = Math.min(Math.max(1, Math.trunc(query.limit ?? exports.SKILL_AUDIT_DEFAULT_LIMIT)), exports.SKILL_AUDIT_MAX_LIMIT);
168
+ const { clause, params } = buildAuditWhere(query);
169
+ const rows = db
170
+ .prepare(`SELECT ${SELECT_COLUMNS} FROM skill_operations
171
+ ${clause}
172
+ ORDER BY recorded_at DESC, id DESC LIMIT ?`)
173
+ .all(...params, limit + 1);
174
+ const hasMore = rows.length > limit;
175
+ const records = (hasMore ? rows.slice(0, limit) : rows).map(mapRow);
176
+ const last = records[records.length - 1];
177
+ return {
178
+ records,
179
+ hasMore,
180
+ nextCursor: hasMore && last ? { recordedAt: last.recordedAt, id: last.id } : null,
181
+ };
182
+ }
106
183
  /** Audit trail for one Skill in one worktree, newest first. */
107
184
  function listSkillOperationAudit(db, filter) {
108
- const limit = filter.limit ?? 100;
109
- const rows = (filter.skillId === undefined
110
- ? db
111
- .prepare(`SELECT ${SELECT_COLUMNS} FROM skill_operations
112
- WHERE worktree_id = ? ORDER BY recorded_at DESC, id DESC LIMIT ?`)
113
- .all(filter.worktreeId, limit)
114
- : db
115
- .prepare(`SELECT ${SELECT_COLUMNS} FROM skill_operations
116
- WHERE worktree_id = ? AND skill_id = ?
117
- ORDER BY recorded_at DESC, id DESC LIMIT ?`)
118
- .all(filter.worktreeId, filter.skillId, limit));
119
- return rows.map(mapRow);
185
+ return querySkillOperationAudit(db, {
186
+ worktreeId: filter.worktreeId,
187
+ skillId: filter.skillId,
188
+ limit: filter.limit ?? 100,
189
+ }).records;
120
190
  }
@@ -207,6 +207,15 @@ function pruneExpiredSkillOperationJournal(options = {}) {
207
207
  *
208
208
  * A replay hands back the recorded entry so the caller can answer with the
209
209
  * original outcome instead of writing the payload a second time.
210
+ *
211
+ * `isReplayable` is how the caller says the recorded outcome is no longer true
212
+ * of the world (Issue #1552). A derived key is a function of the binding alone,
213
+ * so a genuinely new request — the install that follows an uninstall — arrives
214
+ * under the key of the old one; without this it would be answered from an entry
215
+ * describing a payload that is no longer there. An entry rejected this way is
216
+ * superseded: it is dropped and a fresh operation is opened, because the request
217
+ * really is new work. A PREPARING entry is never superseded, whatever the
218
+ * predicate says: the operation that owns it may still be running.
210
219
  */
211
220
  function beginSkillOperation(input, options = {}) {
212
221
  const bindingHash = computeSkillOperationBindingHash(input.binding);
@@ -216,7 +225,11 @@ function beginSkillOperation(input, options = {}) {
216
225
  if (existing.bindingHash !== bindingHash) {
217
226
  return { ok: false, reason: 'IDEMPOTENCY_KEY_CONFLICT', entry: existing };
218
227
  }
219
- return { ok: true, entry: existing, replayed: true };
228
+ const supersede = existing.state !== 'PREPARING' && input.isReplayable?.(existing) === false;
229
+ if (!supersede) {
230
+ return { ok: true, entry: existing, replayed: true };
231
+ }
232
+ deleteSkillOperationJournal(idempotencyKey, options);
220
233
  }
221
234
  const now = options.now ?? Date.now();
222
235
  const entry = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "A local control plane for agent CLIs — orchestration and visibility for Claude Code, Codex, Gemini CLI, and more across Git worktrees",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1 +0,0 @@
1
- "use strict";exports.id=1808,exports.ids=[1808],exports.modules={3805:(a,b,c)=>{c.d(b,{u:()=>k});var d=c(21124);c(38301);var e=c(71117),f=c(16945),g=c(93983),h=c(35595);let i={info:"bg-info-subtle border-info-border text-info-foreground",warning:"bg-warning-subtle border-warning-border text-warning-foreground",danger:"bg-danger-subtle border-danger-border text-danger-foreground",neutral:"bg-muted border-border text-muted-foreground"},j={info:e.A,warning:f.A,danger:g.A,neutral:e.A};function k({tone:a="neutral",children:b,className:c,"data-testid":e}){let f=j[a];return(0,d.jsxs)("div",{"data-testid":e,className:(0,h.cn)("flex items-start gap-2 rounded-md border px-3 py-2 text-xs leading-relaxed",i[a],c),children:[(0,d.jsx)(f,{size:14,"aria-hidden":"true",className:"mt-0.5 shrink-0"}),(0,d.jsx)("div",{className:"min-w-0",children:b})]})}},27884:(a,b,c)=>{c.d(b,{$d:()=>C,AJ:()=>D,AS:()=>k,Et:()=>h,FW:()=>s,H$:()=>d,IV:()=>z,KL:()=>l,Mj:()=>o,OV:()=>e,RG:()=>y,RO:()=>q,TE:()=>i,e5:()=>v,eK:()=>f,gh:()=>A,hJ:()=>p,kF:()=>n,pP:()=>g,pk:()=>u,r0:()=>B,tC:()=>j,z2:()=>m});let d={compatible:"success",incompatible:"error",unknown:"warning"},e={compatible:"compatibility.status.compatible",incompatible:"compatibility.status.incompatible",unknown:"compatibility.status.unknown"},f={low:"gray",moderate:"warning",high:"error"},g={low:"risk.level.low",moderate:"risk.level.moderate",high:"risk.level.high"},h={native:"success",commandmate_runtime:"info",unsupported:"error",unknown:"warning"},i={SKILL_RECOMMEND_HIGHEST_COMPATIBLE:"detail.recommendation.highestCompatible",SKILL_RECOMMEND_LATEST_UNVERIFIED:"detail.recommendation.latestUnverified",SKILL_RECOMMEND_NONE_COMPATIBLE:"detail.recommendation.noneCompatible",SKILL_RECOMMEND_NO_VERSIONS:"detail.recommendation.noVersions"},j={add:"info",modify:"warning",unchanged:"gray",conflict:"error",unmanaged:"error"},k={add:"plan.change.add",modify:"plan.change.modify",unchanged:"plan.change.unchanged",conflict:"plan.change.conflict",unmanaged:"plan.change.unmanaged"},l={SKILL_DIFF_NEW_FILE:"plan.diffReason.newFile",SKILL_DIFF_CONTENT_IDENTICAL:"plan.diffReason.contentIdentical",SKILL_DIFF_MANAGED_UPDATE:"plan.diffReason.managedUpdate",SKILL_DIFF_LOCAL_MODIFICATION:"plan.diffReason.localModification",SKILL_DIFF_UNMANAGED_SKILL:"plan.diffReason.unmanagedSkill",SKILL_DIFF_RECEIPT_ORPHAN:"plan.diffReason.receiptOrphan",SKILL_DIFF_NOT_A_REGULAR_FILE:"plan.diffReason.notARegularFile"},m={filesystem_read:"plan.permission.filesystemRead",filesystem_write:"plan.permission.filesystemWrite",network_access:"plan.permission.networkAccess",process_execution:"plan.permission.processExecution",environment_read:"plan.permission.environmentRead",credential_access:"plan.permission.credentialAccess"},n={attached:"plan.headState.attached",detached:"plan.headState.detached",unborn:"plan.headState.unborn",unknown:"plan.headState.unknown"},o={remove:"uninstall.disposition.remove",modified:"uninstall.disposition.modified",missing:"uninstall.disposition.missing",unknown:"uninstall.disposition.unknown",irregular:"uninstall.disposition.irregular"},p={SKILL_UNINSTALL_MANAGED_UNCHANGED:"uninstall.reason.managedUnchanged",SKILL_UNINSTALL_LOCAL_MODIFICATION:"uninstall.reason.localModification",SKILL_UNINSTALL_RECEIPT_ORPHAN:"uninstall.reason.receiptOrphan",SKILL_UNINSTALL_UNMANAGED_FILE:"uninstall.reason.unmanagedFile",SKILL_UNINSTALL_NOT_A_REGULAR_FILE:"uninstall.reason.notARegularFile",SKILL_UNINSTALL_NOT_INSTALLED:"uninstall.reason.notInstalled",SKILL_UNINSTALL_RECEIPT_MISSING:"uninstall.reason.receiptMissing",SKILL_UNINSTALL_RECEIPT_UNREADABLE:"uninstall.reason.receiptUnreadable",SKILL_UNINSTALL_RECEIPT_FOREIGN:"uninstall.reason.receiptForeign",SKILL_UNINSTALL_TREE_SCAN_TRUNCATED:"uninstall.reason.treeScanTruncated"},q={SKILL_PREVIEW_DETACHED_HEAD:"plan.warning.detachedHead",SKILL_PREVIEW_UNBORN_HEAD:"plan.warning.unbornHead",SKILL_PREVIEW_HEAD_UNRESOLVED:"plan.warning.headUnresolved",SKILL_PREVIEW_WORKING_TREE_DIRTY:"plan.warning.workingTreeDirty",SKILL_PREVIEW_PATH_GIT_IGNORED:"plan.warning.pathGitIgnored",SKILL_PREVIEW_DIFF_TRUNCATED:"plan.warning.diffTruncated",SKILL_PREVIEW_BINARY_CONTENT:"plan.warning.binaryContent",SKILL_PREVIEW_LINE_ENDING_CRLF:"plan.warning.lineEndingCrlf",SKILL_PREVIEW_TREE_SCAN_TRUNCATED:"plan.warning.treeScanTruncated"},r={SKILL_PLAN_STALE:"operation.error.planStale",SKILL_PLAN_EXPIRED:"operation.error.planExpired",SKILL_PLAN_CONSUMED:"operation.error.planConsumed",SKILL_PLAN_NOT_FOUND:"operation.error.planNotFound",SKILL_PLAN_BINDING_MISMATCH:"operation.error.planBindingMismatch",SKILL_PLAN_NOT_INSTALLABLE:"operation.error.planNotInstallable",SKILL_PLAN_RISK_NOT_ACKNOWLEDGED:"operation.error.planRiskNotAcknowledged",SKILL_INSTALL_LOCKED:"operation.error.installLocked",SKILL_INSTALL_IN_PROGRESS:"operation.error.installInProgress",SKILL_INSTALL_DESTINATION_EXISTS:"operation.error.installDestinationExists",SKILL_INSTALL_DESTINATION_UNMANAGED:"operation.error.installDestinationUnmanaged",SKILL_INSTALL_IDEMPOTENCY_CONFLICT:"operation.error.installIdempotencyConflict",SKILL_INSTALL_FAILED:"operation.error.installFailed",SKILL_UNINSTALL_LOCKED:"operation.error.uninstallLocked",SKILL_UNINSTALL_IN_PROGRESS:"operation.error.uninstallInProgress",SKILL_UNINSTALL_IDEMPOTENCY_CONFLICT:"operation.error.uninstallIdempotencyConflict",SKILL_UNINSTALL_NOT_INSTALLED:"operation.error.uninstallNotInstalled",SKILL_UNINSTALL_BLOCKED:"operation.error.uninstallBlocked",SKILL_UNINSTALL_DRIFT:"operation.error.uninstallDrift",SKILL_UNINSTALL_FILE_CHANGED:"operation.error.uninstallFileChanged",SKILL_UNINSTALL_FAILED:"operation.error.uninstallFailed",SKILL_REQUEST_FAILED:"operation.error.requestFailed"};function s(a){return r[a]??"operation.error.unexpected"}let t={SKILL_CATALOG_FETCH_FAILED:"catalog.reason.fetchFailed",SKILL_CATALOG_RATE_LIMITED:"catalog.reason.rateLimited",SKILL_CATALOG_OVERSIZED:"catalog.reason.oversized",SKILL_CATALOG_MALFORMED:"catalog.reason.malformed",SKILL_CATALOG_INVALID_SCHEMA:"catalog.reason.invalidSchema"};function u(a){return a&&t[a]||"catalog.reason.unknown"}function v(a){return a.startsWith("skills.")?a.slice(7):a}let w=/!\[([^\]]*)\]\([^)]*\)/g,x=/<\/?(?:img|picture|source|video|audio|iframe|embed|object|track)\b[^>]*>/gi;function y(a){return a.replace(w,"$1").replace(x,"")}let z={query:"",compatibility:"all",risk:"all",agent:"all"};function A(a){let b=a.versions.find(b=>b.version===a.recommendedVersion);return(b??a.versions[0])?.declaredRisk??null}function B(a){let b=new Set;for(let c of a.versions)for(let a of c.compatibility.agents)("native"===a.support||"commandmate_runtime"===a.support)&&b.add(a.agent);return[...b].sort()}function C(a,b){return a.filter(a=>!!function(a,b){let c=b.trim().toLowerCase();return 0===c.length||[a.name,a.summary,a.id,a.provider.name,...a.keywords].some(a=>a.toLowerCase().includes(c))}(a,b.query)&&("all"===b.compatibility||a.compatibility?.status===b.compatibility)&&("all"===b.risk||A(a)===b.risk)&&("all"===b.agent||!!B(a).includes(b.agent)))}function D(a){let b=new Set;for(let c of a)for(let a of c.versions)for(let c of a.compatibility.agents)b.add(c.agent);return[...b].sort()}},28593:(a,b,c)=>{c.d(b,{Xz:()=>j,qW:()=>k,uE:()=>l});var d=c(21124);c(38301);var e=c(20481),f=c(93983),g=c(73451),h=c(17252),i=c(27884);function j({status:a,className:b}){let c=(0,e.c)("skills");return(0,d.jsx)(g.Ex,{variant:i.H$[a],className:b,"data-testid":`skill-compatibility-${a}`,children:c(i.OV[a])})}function k({risk:a,className:b}){let c=(0,e.c)("skills");return(0,d.jsxs)(g.Ex,{variant:i.eK[a],className:b,"data-testid":`skill-declared-risk-${a}`,children:["high"===a&&(0,d.jsx)(f.A,{size:12,"aria-hidden":"true",className:"mr-1 shrink-0"}),c("risk.declaredLabel",{level:c(i.pP[a])})]})}function l({agent:a}){let b=(0,e.c)("skills");return(0,d.jsxs)(g.Ex,{variant:i.Et[a.support],"data-testid":`skill-agent-${a.agent}-${a.support}`,children:[(0,h.f_)(a.agent),": ",b((0,i.e5)(a.labelKey))]})}},30156:(a,b,c)=>{c.d(b,{Db:()=>k,E:()=>q,Gj:()=>l,Q6:()=>n,Xi:()=>o,hN:()=>p,s5:()=>j});let d="SKILL_CATALOG_UNREACHABLE",e="SKILL_REQUEST_FAILED";function f(a,b,c){let d=a&&"object"==typeof a?a:{},e={code:!function(a){if(!a||"object"!=typeof a)return!1;let{error:b,code:c}=a;return"string"==typeof b&&"string"==typeof c}(a)?c:a.code,message:"string"==typeof d.error?d.error:"",status:b};return Array.isArray(d.blockers)&&(e.blockers=d.blockers),"string"==typeof d.nextActionKey&&(e.nextActionKey=d.nextActionKey),e}async function g(a,b){let c=await fetch(a,{signal:b,headers:{Accept:"application/json"}}),e=await c.json().catch(()=>null);return c.ok?{ok:!0,data:e}:{ok:!1,failure:f(e,c.status,d)}}async function h(a,b,c){let d=await fetch(a,{method:"POST",signal:c,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(b)}),g=await d.json().catch(()=>null);return d.ok?{ok:!0,data:g}:{ok:!1,failure:f(g,d.status,e)}}async function i(a,b,c){try{return await a()}catch(a){if(c?.aborted)throw a;return{ok:!1,failure:{code:b,message:a instanceof Error?a.message:"",status:null}}}}function j(a){return i(()=>g("/api/skills",a),d,a)}function k(a,b){return i(()=>g(`/api/skills/${encodeURIComponent(a)}`,b),d,b)}function l(a,b){return i(()=>g(`/api/worktrees/${encodeURIComponent(a)}/skills`,b),e,b)}function m(a,b,c){return`/api/worktrees/${encodeURIComponent(a)}/skills/${encodeURIComponent(b)}/${c}`}function n(a,b,c={},d){let f={};return c.version&&(f.version=c.version),c.acknowledgeRisk&&(f.acknowledgeRisk=!0),i(()=>h(m(a,b,"plan"),f,d),e,d)}function o(a,b,c,d){let f={planToken:c.planToken,version:c.version};return c.acknowledgeRisk&&(f.acknowledgeRisk=!0),c.idempotencyKey&&(f.idempotencyKey=c.idempotencyKey),i(()=>h(m(a,b,"install"),f,d),e,d)}function p(a,b,c){return i(()=>h(m(a,b,"uninstall-plan"),{},c),e,c)}function q(a,b,c,d){let f={planToken:c.planToken};return c.idempotencyKey&&(f.idempotencyKey=c.idempotencyKey),i(()=>h(m(a,b,"uninstall"),f,d),e,d)}}};
@@ -1,28 +0,0 @@
1
- "use strict";exports.id=5226,exports.ids=[5226],exports.modules={50300:(a,b,c)=>{c.d(b,{IF:()=>p,Pg:()=>o,Y9:()=>q,iZ:()=>r,mZ:()=>m});var d=c(29021),e=c(33873),f=c(55511),g=c(55926);let h=["PREPARING","FS_COMMITTED","INDEXED","SUCCEEDED","FAILED_RECONCILABLE"],i={PREPARING:["FS_COMMITTED","FAILED_RECONCILABLE"],FS_COMMITTED:["INDEXED","FAILED_RECONCILABLE"],INDEXED:["SUCCEEDED","FAILED_RECONCILABLE"],FAILED_RECONCILABLE:["INDEXED","SUCCEEDED","FAILED_RECONCILABLE"],SUCCEEDED:[]};class j extends Error{constructor(a,b,c){super(`Illegal Skill operation transition ${a} -> ${b}: ${c}`),this.from=a,this.to=b,this.name="SkillOperationTransitionError"}}function k(a){return(0,f.createHash)("sha256").update(function a(b){if(null===b||"object"!=typeof b)return JSON.stringify(b)??"null";if(Array.isArray(b))return`[${b.map(a).join(",")}]`;let c=Object.entries(b).filter(([,a])=>void 0!==a).sort(([a],[b])=>a<b?-1:+(a>b));return`{${c.map(([b,c])=>`${JSON.stringify(b)}:${a(c)}`).join(",")}}`}({actor:a.actor,operation:a.operation,target:a.target,planHash:a.planHash})).digest("hex")}function l(a,b){let c=(0,f.createHash)("sha256").update(a).digest("hex");return(0,e.join)((0,g.m_)(g.V8,b),`${c}.json`)}function m(a,b={}){let c=(0,g.dI)(l(a,b));return"object"==typeof c&&null!==c&&"string"==typeof c.operationId&&"string"==typeof c.idempotencyKey&&"string"==typeof c.bindingHash&&"string"==typeof c.state&&h.includes(c.state)?c:null}function n(a,b={}){(0,g.of)(l(a.idempotencyKey,b),a)}function o(a,b={}){try{(0,d.unlinkSync)(l(a,b))}catch{}}function p(a,b={}){let c=k(a.binding),d=a.idempotencyKey??k(a.binding),e=m(d,b);if(null!==e)return e.bindingHash!==c?{ok:!1,reason:"IDEMPOTENCY_KEY_CONFLICT",entry:e}:{ok:!0,entry:e,replayed:!0};let g=b.now??Date.now(),h={schemaVersion:1,operationId:(0,f.randomUUID)(),idempotencyKey:d,bindingHash:c,operation:a.binding.operation,state:"PREPARING",actor:a.binding.actor,target:a.binding.target,source:a.source??null,lockKey:a.lockKey,createdAt:g,updatedAt:g,fsCommittedAt:null,receiptDigest:null,error:null,history:[{state:"PREPARING",at:g}]};return n(h,b),{ok:!0,entry:h,replayed:!1}}function q(a,b,c={},d={}){if(!i[a.state].includes(b))throw new j(a.state,b,"edge is not defined");let e=d.now??Date.now(),f="FS_COMMITTED"===b?a.fsCommittedAt??e:a.fsCommittedAt;if(("INDEXED"===b||"SUCCEEDED"===b)&&null===f)throw new j(a.state,b,"no filesystem commit point was recorded");let h={...a,state:b,updatedAt:e,fsCommittedAt:f,source:void 0!==c.source?c.source:a.source,receiptDigest:void 0!==c.receiptDigest?c.receiptDigest:a.receiptDigest,error:void 0!==c.error?null===c.error?null:{code:c.error.code,message:(0,g.f$)(c.error.message)}:a.error,history:[...a.history,{state:b,at:e}]};return n(h,d),h}function r(a){return null!==a.fsCommittedAt}},55317:(a,b,c)=>{c.d(b,{Bv:()=>i,Tk:()=>g,c7:()=>h,fk:()=>j});var d=c(55511);let e=`
2
- id, worktree_id, skill_id, version, install_root, install_roots, receipt_sha256,
3
- source_repository, source_ref, source_commit, artifact_sha256,
4
- effective_risk, operation_id, installed_at, updated_at
5
- `;function f(a){return{id:a.id,worktreeId:a.worktree_id,skillId:a.skill_id,version:a.version,installRoot:a.install_root,installRoots:function(a,b){if(null===a)return[b];try{let b=JSON.parse(a);if(Array.isArray(b)&&b.length>0&&b.every(a=>"string"==typeof a))return b}catch{}return[b]}(a.install_roots,a.install_root),receiptSha256:a.receipt_sha256,sourceRepository:a.source_repository,sourceRef:a.source_ref,sourceCommit:a.source_commit,artifactSha256:a.artifact_sha256,effectiveRisk:a.effective_risk,operationId:a.operation_id,installedAt:a.installed_at,updatedAt:a.updated_at}}function g(a,b){let{receipt:c}=b,e=c.install_roots&&c.install_roots.length>0?c.install_roots:[c.install_root];a.prepare(`INSERT INTO skill_installations (
6
- id, worktree_id, skill_id, version, install_root, install_roots, receipt_sha256,
7
- source_repository, source_ref, source_commit, artifact_sha256,
8
- effective_risk, operation_id, installed_at, updated_at
9
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
10
- ON CONFLICT (worktree_id, skill_id) DO UPDATE SET
11
- version = excluded.version,
12
- install_root = excluded.install_root,
13
- install_roots = excluded.install_roots,
14
- receipt_sha256 = excluded.receipt_sha256,
15
- source_repository = excluded.source_repository,
16
- source_ref = excluded.source_ref,
17
- source_commit = excluded.source_commit,
18
- artifact_sha256 = excluded.artifact_sha256,
19
- effective_risk = excluded.effective_risk,
20
- operation_id = excluded.operation_id,
21
- updated_at = excluded.updated_at`).run((0,d.randomUUID)(),b.worktreeId,c.skill_id,c.version,c.install_root,JSON.stringify(e),b.receiptSha256,c.source.repository,c.source.ref,c.source.commit,c.artifact.sha256,c.effective_risk,b.operationId,b.installedAt,b.installedAt);let f=h(a,b.worktreeId,c.skill_id);if(null===f)throw Error("Skill installation row disappeared immediately after being written");return f}function h(a,b,c){let d=a.prepare(`SELECT ${e} FROM skill_installations
22
- WHERE worktree_id = ? AND skill_id = ?`).get(b,c);return d?f(d):null}function i(a,b){return a.prepare(`SELECT ${e} FROM skill_installations
23
- WHERE worktree_id = ? ORDER BY skill_id ASC`).all(b).map(f)}function j(a,b,c){return a.prepare("DELETE FROM skill_installations WHERE worktree_id = ? AND skill_id = ?").run(b,c).changes>0}},74516:(a,b,c)=>{c.d(b,{JM:()=>g,ek:()=>f});var d=c(55511),e=c(55926);function f(a,b,c){return{operationId:a.operationId,idempotencyKey:a.idempotencyKey,bindingHash:a.bindingHash,operation:a.operation,state:a.state,result:b,actorType:a.actor.type,actorId:a.actor.id,worktreeId:a.target.worktreeId,skillId:a.target.skillId,skillVersion:a.target.version,sourceOrigin:a.source?.origin??null,sourceRepository:a.source?.repository??null,sourceRef:a.source?.ref??null,sourceCommit:a.source?.commit??null,artifactSha256:a.source?.artifactSha256??null,errorCode:a.error?.code??null,errorMessage:a.error?.message??null,recordedAt:c}}function g(a,b){let c={...b,id:(0,d.randomUUID)(),errorMessage:null===b.errorMessage?null:(0,e.f$)(b.errorMessage),recordedAt:b.recordedAt??Date.now()};return a.prepare(`INSERT INTO skill_operations (
24
- id, operation_id, idempotency_key, binding_hash, operation, state, result,
25
- actor_type, actor_id, worktree_id, skill_id, skill_version,
26
- source_origin, source_repository, source_ref, source_commit, artifact_sha256,
27
- error_code, error_message, recorded_at
28
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(c.id,c.operationId,c.idempotencyKey,c.bindingHash,c.operation,c.state,c.result,c.actorType,c.actorId,c.worktreeId,c.skillId,c.skillVersion,c.sourceOrigin,c.sourceRepository,c.sourceRef,c.sourceCommit,c.artifactSha256,c.errorCode,c.errorMessage,c.recordedAt),c}},89476:(a,b,c)=>{c.d(b,{k8:()=>q,p8:()=>k,x3:()=>r});var d=c(29021),e=c(21820),f=c(33873),g=c(55511),h=c(55926);let i=(0,g.randomUUID)();function j(a){if(!Number.isInteger(a)||a<=0)return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code}}function k(a,b){return(0,g.createHash)("sha256").update(`${a}\0${b}`).digest("hex")}function l(a,b){return(0,f.join)((0,h.m_)(h.vg,b),`${a}.lock`)}function m(a){if("object"!=typeof a||null===a)return!1;let b=a.owner;return"string"==typeof a.key&&"string"==typeof a.operationId&&"number"==typeof a.leaseExpiresAt&&Number.isFinite(a.leaseExpiresAt)&&"object"==typeof b&&null!==b&&"string"==typeof b.nonce&&"number"==typeof b.pid&&"string"==typeof b.host}function n(a,b={}){let c=(0,h.dI)(l(a,b));return m(c)?c:null}function o(a,b={}){if(null===a)return"FREE";let c=b.now??Date.now();if(c<a.leaseExpiresAt)return"HELD";let d=b.isProcessAlive??j;return a.owner.host!==(0,e.hostname)()?c-a.leaseExpiresAt>6e5?"RECLAIMABLE":"HELD_UNVERIFIABLE_OWNER":d(a.owner.pid)?"HELD_BY_LIVE_OWNER":"RECLAIMABLE"}function p(a,b){let c;try{c=(0,d.openSync)(a,d.constants.O_CREAT|d.constants.O_EXCL|d.constants.O_WRONLY,h.Pq)}catch{return!1}try{return(0,d.writeSync)(c,JSON.stringify(b)),!0}finally{(0,d.closeSync)(c)}}function q(a,b={}){var c,f;let j=b.now??Date.now(),k=a.leaseMs??3e4,r=l(a.key,b),s=(c=a.key,f=a.operationId,{schemaVersion:1,key:c,operationId:f,owner:{nonce:(0,g.randomBytes)(24).toString("hex"),pid:process.pid,host:(0,e.hostname)(),processGeneration:i},acquiredAt:j,renewedAt:j,leaseExpiresAt:j+k});if(p(r,s))return{ok:!0,lock:s,reclaimed:!1};let t=n(a.key,b),u=null===t?(0,d.existsSync)(r)?"RECLAIMABLE":"FREE":o(t,b),v=t?{operationId:t.operationId,acquiredAt:t.acquiredAt,leaseExpiresAt:t.leaseExpiresAt}:null;if("HELD"===u||"HELD_BY_LIVE_OWNER"===u)return{ok:!1,reason:u,heldBy:v};if("HELD_UNVERIFIABLE_OWNER"===u)return{ok:!1,reason:"HELD_UNVERIFIABLE_OWNER",heldBy:v};if("FREE"===u)return p(r,s)?{ok:!0,lock:s,reclaimed:!1}:{ok:!1,reason:"RACE_LOST",heldBy:null};let w=function(a,b,c){let e=`${a}.reclaim-${(0,g.randomBytes)(8).toString("hex")}`;try{(0,d.renameSync)(a,e)}catch{return{ok:!1,reason:"RACE_LOST"}}let f=(0,h.dI)(e),i=m(f)?f:null;if(!(null===b?null===i:null===i||i.owner.nonce===b.owner.nonce&&"RECLAIMABLE"===o(i,c))){try{(0,d.renameSync)(e,a)}catch{}return{ok:!1,reason:"RACE_LOST"}}try{(0,d.unlinkSync)(e)}catch{}return{ok:!0}}(r,t,b);return w.ok?p(r,s)?{ok:!0,lock:s,reclaimed:!0}:{ok:!1,reason:"RACE_LOST",heldBy:null}:{ok:!1,reason:w.reason,heldBy:v}}function r(a,b={}){let c=n(a.key,b);if(null===c||c.owner.nonce!==a.owner.nonce)return!1;try{return(0,d.unlinkSync)(l(a.key,b)),!0}catch{return!1}}}};
@@ -1,2 +0,0 @@
1
- "use strict";exports.id=5306,exports.ids=[5306],exports.modules={55306:(a,b,c)=>{c.d(b,{uu:()=>v}),c(55511);var d=c(29021);c(33873),c(7956);var e=c(75359),f=c(93356),g=c(55927);let h={BYTES_LIMIT:"SKILL_YAML_BYTES_LIMIT",DEPTH_LIMIT:"SKILL_YAML_DEPTH_LIMIT",NODE_LIMIT:"SKILL_YAML_NODE_LIMIT",SCALAR_LIMIT:"SKILL_YAML_SCALAR_LIMIT",ALIAS_FORBIDDEN:"SKILL_YAML_ALIAS_FORBIDDEN",MERGE_KEY_FORBIDDEN:"SKILL_YAML_MERGE_KEY_FORBIDDEN",TAG_FORBIDDEN:"SKILL_YAML_TAG_FORBIDDEN",DUPLICATE_KEY:"SKILL_YAML_DUPLICATE_KEY",FORBIDDEN_KEY:"SKILL_YAML_FORBIDDEN_KEY",MULTIPLE_DOCUMENTS:"SKILL_YAML_MULTIPLE_DOCUMENTS",ENCODING:"SKILL_YAML_ENCODING",UNSUPPORTED:"SKILL_YAML_UNSUPPORTED",SYNTAX:"SKILL_YAML_SYNTAX"},i={[h.BYTES_LIMIT]:"YAML document exceeds the size limit",[h.DEPTH_LIMIT]:"YAML document is nested too deeply",[h.NODE_LIMIT]:"YAML document has too many nodes",[h.SCALAR_LIMIT]:"YAML scalar exceeds the length limit",[h.ALIAS_FORBIDDEN]:"YAML anchors and aliases are not accepted",[h.MERGE_KEY_FORBIDDEN]:"YAML merge keys are not accepted",[h.TAG_FORBIDDEN]:"YAML tags are not accepted",[h.DUPLICATE_KEY]:"YAML mapping declares the same key twice",[h.FORBIDDEN_KEY]:"YAML mapping uses a forbidden key",[h.MULTIPLE_DOCUMENTS]:"YAML stream carries more than one document",[h.ENCODING]:"YAML document is not valid UTF-8 text",[h.UNSUPPORTED]:"YAML document uses an unsupported construct",[h.SYNTAX]:"YAML document could not be parsed"};class j extends Error{constructor(a,b){super(i[a]),this.name="SkillYamlError",this.code=a,void 0!==b&&(this.line=b)}}function k(a){return a instanceof j}let l=/^(?:"(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_.-]*)[ \t]*:(?:[ \t]|$)/;function m(a){let b=null;for(let c=0;c<a.length;c++){let d=a[c];if('"'===b)"\\"===d?c++:'"'===d&&(b=null);else if("'"===b)"'"===d&&(b=null);else if('"'===d||"'"===d)b=d;else if("#"===d&&(0===c||" "===a[c-1]||" "===a[c-1]))return a.slice(0,c)}return a}class n{constructor(a,b){this.cursor=0,this.nodes=0,this.documentEnded=!1,this.documentStarted=!1,this.lines=a,this.profile=b}parseDocument(){let a=this.peek();if(!a)return null;if(0!==a.indent)throw new j(h.SYNTAX,a.number);let b=this.parseNode(0,1);this.skipToSignificant();let c=this.peek();if(c)throw new j(h.SYNTAX,c.number);return b}skipToSignificant(){for(;this.cursor<this.lines.length;){let a=this.lines[this.cursor];if(!a.significant){this.cursor++;continue}let b=a.content.trim();if("..."===b){this.documentEnded=!0,this.cursor++;continue}if("---"===b){if(this.documentStarted)throw new j(h.MULTIPLE_DOCUMENTS,a.number);this.documentStarted=!0,this.cursor++;continue}if(this.documentEnded)throw new j(h.MULTIPLE_DOCUMENTS,a.number);this.documentStarted=!0;return}}peek(){return this.skipToSignificant(),this.cursor<this.lines.length?this.lines[this.cursor]:null}countNode(a){if(this.nodes++,this.nodes>this.profile.maxNodes)throw new j(h.NODE_LIMIT,a.number)}checkDepth(a,b){if(a>this.profile.maxDepth)throw new j(h.DEPTH_LIMIT,b.number)}parseNode(a,b){let c=this.peek();return c?(this.checkDepth(b,c),this.isSequenceEntry(c.content)?this.parseSequence(a,b):this.parseMapping(a,b)):null}isSequenceEntry(a){return"-"===a||a.startsWith("- ")}parseMapping(a,b){let c=Object.create(null),d=new Set;for(;;){let e=this.peek();if(!e||e.indent<a)break;if(e.indent>a||this.isSequenceEntry(e.content))throw new j(h.SYNTAX,e.number);this.countNode(e);let f=this.readKey(e);if(d.has(f)&&!this.profile.allowDuplicateKeys)throw new j(h.DUPLICATE_KEY,e.number);d.add(f);let g=e.content.indexOf(":",this.keyTokenLength(e.content)),i=m(e.content.slice(g+1)).trim();this.cursor++,c[f]=this.parseValue(i,a,b,e)}return c}parseSequence(a,b){let c=[];for(;;){let d=this.peek();if(!d||d.indent<a)break;if(d.indent>a)throw new j(h.SYNTAX,d.number);if(!this.isSequenceEntry(d.content))break;this.countNode(d);let e="-"===d.content?"":d.content.slice(2),f=d.content.length-e.length,g=m(e).trim();if(""===g){this.cursor++,c.push(this.parseIndentedValue(a,b+1,d));continue}if(this.isSequenceEntry(g))throw new j(h.UNSUPPORTED,d.number);if(l.test(e.trimStart())){let g=a+f+(e.length-e.trimStart().length);d.indent=g,d.content=e.trimStart(),this.checkDepth(b+1,d),c.push(this.parseMapping(g,b+1));continue}this.cursor++,this.countNode(d),c.push(this.parseScalar(g,d))}return c}keyTokenLength(a){if(a.startsWith('"')||a.startsWith("'")){let b=a[0];for(let c=1;c<a.length;c++){if('"'===b&&"\\"===a[c]){c++;continue}if(a[c]===b)return c+1}}return 0}readKey(a){let b=a.content;if(b.startsWith("<<"))throw new j(h.MERGE_KEY_FORBIDDEN,a.number);if(b.startsWith("&")||b.startsWith("*"))throw new j(h.ALIAS_FORBIDDEN,a.number);if(b.startsWith("!"))throw new j(h.TAG_FORBIDDEN,a.number);if(b.startsWith("?")||b.startsWith("[")||b.startsWith("{"))throw new j(h.UNSUPPORTED,a.number);if(!l.test(b))throw new j(h.SYNTAX,a.number);let c=this.keyTokenLength(b),d=b.indexOf(":",c),e=b.slice(0,d).trim(),f=e.startsWith('"')||e.startsWith("'")?this.parseQuoted(e,a):e;if(f.length>this.profile.maxScalarLength)throw new j(h.SCALAR_LIMIT,a.number);if(this.profile.forbiddenKeys.includes(f))throw new j(h.FORBIDDEN_KEY,a.number);return f}parseValue(a,b,c,d){if(""===a){let a=this.peek();return a&&a.indent===b&&this.isSequenceEntry(a.content)?(this.checkDepth(c+1,a),this.parseSequence(b,c+1)):this.parseIndentedValue(b,c+1,d)}return"|"===a[0]||">"===a[0]?this.parseBlockScalar(a,b,d):(this.countNode(d),this.parseScalar(a,d))}parseIndentedValue(a,b,c){let d=this.peek();return!d||d.indent<=a?(this.countNode(c),null):(this.checkDepth(b,d),this.parseNode(d.indent,b))}parseScalar(a,b){if(a.startsWith("&")||a.startsWith("*"))throw new j(h.ALIAS_FORBIDDEN,b.number);if(a.startsWith("!"))throw new j(h.TAG_FORBIDDEN,b.number);if("[]"===a)return this.countNode(b),[];if("{}"===a)return this.countNode(b),Object.create(null);if(a.startsWith("[")||a.startsWith("{")||a.startsWith("%")||a.startsWith("`"))throw new j(h.UNSUPPORTED,b.number);if(a.startsWith('"')||a.startsWith("'")){let c=this.parseQuoted(a,b);return this.checkScalarLength(c,b),c}return this.checkScalarLength(a,b),this.resolvePlain(a)}checkScalarLength(a,b){if(a.length>this.profile.maxScalarLength)throw new j(h.SCALAR_LIMIT,b.number)}resolvePlain(a){if("~"===a||"null"===a||"Null"===a||"NULL"===a)return null;if("true"===a||"True"===a||"TRUE"===a)return!0;if("false"===a||"False"===a||"FALSE"===a)return!1;if(/^-?(?:0|[1-9][0-9]*)$/.test(a)){let b=Number(a);return Number.isSafeInteger(b)?b:a}return/^-?(?:0|[1-9][0-9]*)\.[0-9]+$/.test(a)?Number(a):a}parseQuoted(a,b){let c=a[0];if(a.length<2||!a.endsWith(c))throw new j(h.SYNTAX,b.number);let d=a.slice(1,-1);if("'"===c){let a="";for(let c=0;c<d.length;c++){if("'"===d[c]){if("'"!==d[c+1])throw new j(h.SYNTAX,b.number);c++}a+=d[c]}return a}let e="";for(let a=0;a<d.length;a++){let c=d[a];if("\\"!==c){if('"'===c)throw new j(h.SYNTAX,b.number);e+=c;continue}let f=d[++a];switch(f){case'"':case"\\":case"/":e+=f;break;case"n":e+="\n";break;case"t":e+=" ";break;case"r":e+="\r";break;case"u":{let c=d.slice(a+1,a+5);if(!/^[0-9a-fA-F]{4}$/.test(c))throw new j(h.SYNTAX,b.number);e+=String.fromCharCode(parseInt(c,16)),a+=4;break}default:throw new j(h.UNSUPPORTED,b.number)}}return e}parseBlockScalar(a,b,c){let d,e=/^([|>])([-+]?)$/.exec(a.trim());if(!e)throw new j(h.UNSUPPORTED,c.number);let[,f,g]=e,i=[],k=-1;for(;this.cursor<this.lines.length;){let a=this.lines[this.cursor],c=""===a.raw.trim();if(!c&&a.indent<=b)break;c||-1!==k||(k=a.indent),i.push(c?"":a.raw.slice(k)),this.cursor++}for(;i.length>0&&""===i[i.length-1];)i.pop();return this.countNode(c),d="|"===f?i.join("\n"):i.reduce((a,b,c)=>{if(0===c)return b;let d=i[c-1];return""===b||""===d?`${a}
2
- ${b}`:`${a} ${b}`},""),"-"!==g&&i.length>0&&(d+="\n"),this.checkScalarLength(d,c),d}}function o(a,b=e.WL){if(b.allowAliases||b.allowCustomTags)throw new j(h.UNSUPPORTED);return new n(function(a){if(a.includes("\uFEFF"))throw new j(h.ENCODING);let b=a.replace(/\r\n/g,"\n");if(b.includes("\r"))throw new j(h.ENCODING);let c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a],e=a+1;for(let a=0;a<b.length;a++){let c=b.charCodeAt(a);if(c<32&&9!==c||127===c)throw new j(h.ENCODING,e)}let f=0;for(;f<b.length&&" "===b[f];)f++;if(" "===b[f])throw new j(h.SYNTAX,e);let g=b.slice(f);c.push({number:e,raw:b,indent:f,content:g,significant:g.length>0&&!g.startsWith("#")})}return c}(function(a,b){if(("string"==typeof a?Buffer.byteLength(a,"utf8"):a.byteLength)>b)throw new j(h.BYTES_LIMIT);if("string"==typeof a)return a;try{return new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!1}).decode(a)}catch{throw new j(h.ENCODING)}}(a,b.maxBytes)),b).parseDocument()}d.constants.O_NOFOLLOW;let p=[".bash",".bat",".cjs",".cmd",".fish",".js",".lua",".mjs",".php",".pl",".ps1",".py",".rb",".sh",".ts",".zsh"],q=[".md",".markdown",".rst",".txt"];function r(a){let b=a.slice(a.lastIndexOf("/")+1),c=b.lastIndexOf(".");return c<=0?"":b.slice(c).toLowerCase()}function s(a,b){return!!p.includes(r(a))||b.length>=2&&35===b[0]&&33===b[1]}function t(a,b){throw new g.Om(a,b)}function u(a,b){return a.files.find(a=>a.path===b)}function v(a,b){return function(a,b){let c;for(let b of e.wD)u(a,b)||t(g.xC.LAYOUT_INVALID,{reason:"missing-required-entry",entry:b});let d=function(a){let b,c=u(a,e.KH);for(let b of(c||t(g.xC.MANIFEST_MISSING,{reason:"absent"}),a.files))b.path!==e.KH&&b.path.endsWith(`/${e.KH}`)&&t(g.xC.LAYOUT_INVALID,{reason:"nested-manifest",entry:(0,g.FC)(b.path)});try{b=o(c.bytes)}catch(a){throw k(a)&&t(g.xC.MANIFEST_INVALID,{reason:a.code}),a}let d=(0,e.bX)(b);if(!d.ok){let a=d.errors[0];t(g.xC.MANIFEST_INVALID,{reason:a.code,field:a.path})}return d.value}(a);d.id!==b.skillId&&t(g.xC.MANIFEST_MISMATCH,{reason:"id"}),d.version!==b.version&&t(g.xC.MANIFEST_MISMATCH,{reason:"version"});let h=u(a,e.Wr);h||t(g.xC.SKILL_MD_INVALID,{reason:"absent"});try{c=function(a,b=e.WL){let c=a.replace(/\r\n/g,"\n");if(!c.startsWith("---\n"))return null;let d=c.indexOf("\n---",3);return -1===d?null:o(c.slice(4,d+1),b)}(Buffer.from(h.bytes).toString("utf8"))}catch(a){throw k(a)&&t(g.xC.SKILL_MD_INVALID,{reason:a.code}),a}(null===c||"object"!=typeof c||Array.isArray(c))&&t(g.xC.SKILL_MD_INVALID,{reason:"frontmatter-missing"});let i=c.name;"string"!=typeof i&&t(g.xC.SKILL_MD_INVALID,{reason:"frontmatter-name-missing"});let j=(0,e.EU)({directoryName:d.id,skillMdName:i,manifestId:d.id,manifestName:d.name});j.ok||t(g.xC.SKILL_MD_INVALID,{reason:j.errors[0].code});let l=(0,e.Yz)(d,a.files.map(a=>a.path));if(!l.ok){let a=l.errors[0];t(g.xC.MANIFEST_MISMATCH,{reason:a.message,entry:(0,g.FC)(String(a.detail?.path??""))})}for(let b of a.files)b.path!==e.KH&&function(a,b){var c,d;let h=b.files.find(b=>b.path===a.path);h||t(g.xC.MANIFEST_MISMATCH,{reason:"undeclared-file",entry:(0,g.FC)(a.path)});let i={entry:(0,g.FC)(a.path)};h.size!==a.size&&t(g.xC.SIZE_MISMATCH,i),(0,f.U2)(h.sha256,a.sha256)||t(g.xC.DIGEST_MISMATCH,i);let j=(c=a.path,d=a.bytes,c===e.Wr?"skill_md":s(c,d)?"script":q.includes(r(c))?"instruction":"asset");s(a.path,a.bytes)&&(!h.script||"script"!==h.kind)&&t(g.xC.UNDECLARED_SCRIPT,i),"script"!==h.kind||h.script||t(g.xC.MANIFEST_MISMATCH,{...i,reason:"kind-script-not-declared"}),"skill_md"===j!=("skill_md"===h.kind)&&t(g.xC.MANIFEST_MISMATCH,{...i,reason:"kind-mismatch"}),a.executable&&!h.executable&&t(g.xC.UNDECLARED_EXECUTABLE,i),!a.executable&&h.executable&&t(g.xC.MANIFEST_MISMATCH,{...i,reason:"executable-not-present"})}(b,d);let m={executable_paths:d.files.filter(a=>a.executable).map(a=>a.path).sort(),script_paths:d.files.filter(a=>a.script).map(a=>a.path).sort(),network_hosts:[...d.requirements.network_hosts],declared_permissions:[...d.declared_permissions]},n=(0,e.MD)(m),p=new Map(a.files.map(a=>[a.path,a.bytes])),v=a.files.map(a=>({path:a.path,sha256:a.sha256,size:a.size,executable:a.executable})).sort((a,b)=>a.path<b.path?-1:+(a.path>b.path));return Object.freeze({skillId:b.skillId,version:b.version,manifest:d,files:Object.freeze(v),directories:Object.freeze([...a.directories].sort()),inspection:Object.freeze(m),declaredRisk:d.declared_risk,computedRisk:n,effectiveRisk:(0,e.qZ)(d.declared_risk,n),readFile(a){let b=p.get(a);return b||t(g.xC.MANIFEST_MISMATCH,{reason:"unknown-file",entry:(0,g.FC)(a)}),new Uint8Array(b)}})}((0,g.qt)(a,b),b)}},55927:(a,b,c)=>{c.d(b,{FC:()=>l,Om:()=>j,qt:()=>q,uI:()=>k,xC:()=>g});var d=c(74075),e=c(75359),f=c(93356);let g={ARCHIVE_FORMAT:"SKILL_PACKAGE_ARCHIVE_FORMAT",ARCHIVE_TRUNCATED:"SKILL_PACKAGE_ARCHIVE_TRUNCATED",ENTRY_TYPE_FORBIDDEN:"SKILL_PACKAGE_ENTRY_TYPE_FORBIDDEN",ENTRY_PATH_UNSAFE:"SKILL_PACKAGE_ENTRY_PATH_UNSAFE",ENTRY_DUPLICATE:"SKILL_PACKAGE_ENTRY_DUPLICATE",ENTRY_COLLISION:"SKILL_PACKAGE_ENTRY_COLLISION",ENTRY_MODE_FORBIDDEN:"SKILL_PACKAGE_ENTRY_MODE_FORBIDDEN",ENTRY_LIMIT_EXCEEDED:"SKILL_PACKAGE_ENTRY_LIMIT_EXCEEDED",SIZE_LIMIT_EXCEEDED:"SKILL_PACKAGE_SIZE_LIMIT_EXCEEDED",COMPRESSION_RATIO_EXCEEDED:"SKILL_PACKAGE_COMPRESSION_RATIO_EXCEEDED",LAYOUT_INVALID:"SKILL_PACKAGE_LAYOUT_INVALID",MANIFEST_MISSING:"SKILL_PACKAGE_MANIFEST_MISSING",MANIFEST_INVALID:"SKILL_PACKAGE_MANIFEST_INVALID",MANIFEST_MISMATCH:"SKILL_PACKAGE_MANIFEST_MISMATCH",UNDECLARED_EXECUTABLE:"SKILL_PACKAGE_UNDECLARED_EXECUTABLE",UNDECLARED_SCRIPT:"SKILL_PACKAGE_UNDECLARED_SCRIPT",DIGEST_MISMATCH:"SKILL_PACKAGE_DIGEST_MISMATCH",SIZE_MISMATCH:"SKILL_PACKAGE_SIZE_MISMATCH",SKILL_MD_INVALID:"SKILL_PACKAGE_SKILL_MD_INVALID",STAGING_IO:"SKILL_PACKAGE_STAGING_IO",ABORTED:"SKILL_PACKAGE_ABORTED"},h={[g.ARCHIVE_FORMAT]:"archive",[g.ARCHIVE_TRUNCATED]:"archive",[g.ENTRY_TYPE_FORBIDDEN]:"path",[g.ENTRY_PATH_UNSAFE]:"path",[g.ENTRY_DUPLICATE]:"path",[g.ENTRY_COLLISION]:"path",[g.ENTRY_MODE_FORBIDDEN]:"path",[g.ENTRY_LIMIT_EXCEEDED]:"limit",[g.SIZE_LIMIT_EXCEEDED]:"limit",[g.COMPRESSION_RATIO_EXCEEDED]:"limit",[g.LAYOUT_INVALID]:"manifest",[g.MANIFEST_MISSING]:"manifest",[g.MANIFEST_INVALID]:"manifest",[g.MANIFEST_MISMATCH]:"manifest",[g.UNDECLARED_EXECUTABLE]:"manifest",[g.UNDECLARED_SCRIPT]:"manifest",[g.DIGEST_MISMATCH]:"integrity",[g.SIZE_MISMATCH]:"integrity",[g.SKILL_MD_INVALID]:"manifest",[g.STAGING_IO]:"staging",[g.ABORTED]:"staging"},i={[g.ARCHIVE_FORMAT]:"Skill package is not a readable tar.gz archive",[g.ARCHIVE_TRUNCATED]:"Skill package archive is truncated",[g.ENTRY_TYPE_FORBIDDEN]:"Skill package contains a forbidden entry type",[g.ENTRY_PATH_UNSAFE]:"Skill package contains an unsafe entry path",[g.ENTRY_DUPLICATE]:"Skill package declares the same entry twice",[g.ENTRY_COLLISION]:"Skill package contains colliding entry paths",[g.ENTRY_MODE_FORBIDDEN]:"Skill package entry carries forbidden mode bits",[g.ENTRY_LIMIT_EXCEEDED]:"Skill package contains too many entries",[g.SIZE_LIMIT_EXCEEDED]:"Skill package exceeds a size limit",[g.COMPRESSION_RATIO_EXCEEDED]:"Skill package decompression ratio exceeds the limit",[g.LAYOUT_INVALID]:"Skill package layout does not match the contract",[g.MANIFEST_MISSING]:"Skill package manifest is missing or misplaced",[g.MANIFEST_INVALID]:"Skill package manifest is not valid",[g.MANIFEST_MISMATCH]:"Skill package manifest does not match the package",[g.UNDECLARED_EXECUTABLE]:"Skill package contains an undeclared executable",[g.UNDECLARED_SCRIPT]:"Skill package contains an undeclared script",[g.DIGEST_MISMATCH]:"Skill package file digest does not match the manifest",[g.SIZE_MISMATCH]:"Skill package file size does not match the manifest",[g.SKILL_MD_INVALID]:"Skill package SKILL.md is missing or inconsistent",[g.STAGING_IO]:"Skill package staging could not be prepared",[g.ABORTED]:"Skill package processing was aborted"};class j extends Error{constructor(a,b){super(i[a]),this.name="SkillPackageError",this.code=a,this.category=h[a],b&&(this.detail=b)}}function k(a){return a instanceof j}function l(a){let b=a.replace(/[^A-Za-z0-9._/-]/g,a=>[...a].map(a=>`%${a.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`).join(""));return b.length>120?`${b.slice(0,120)}…`:b}function m(a,b){throw new j(a,b)}let n=new Set(["0","\0"]);function o(a,b,c){let d=a.subarray(b,b+c),e=d.indexOf(0);-1===e&&(e=d.length);for(let a=e;a<d.length;a++)0!==d[a]&&m(g.ARCHIVE_FORMAT,{field:"padding"});let f=Buffer.from(d.subarray(0,e)),h=f.toString("utf8");return Buffer.from(h,"utf8").equals(f)||m(g.ARCHIVE_FORMAT,{field:"encoding"}),h}function p(a,b,c){(128&a[b])!=0&&m(g.ARCHIVE_FORMAT,{field:"numeric-encoding"});let d="";for(let e=b;e<b+c;e++){let b=a[e];0!==b&&32!==b&&((b<48||b>55)&&m(g.ARCHIVE_FORMAT,{field:"numeric"}),d+=String.fromCharCode(b))}if(""===d)return 0;let e=parseInt(d,8);return Number.isSafeInteger(e)||m(g.ARCHIVE_FORMAT,{field:"numeric-range"}),e}function q(a,b){let c;(a.byteLength<2||31!==a[0]||139!==a[1])&&m(g.ARCHIVE_FORMAT,{field:"gzip-magic"});try{c=(0,d.gunzipSync)(a,{maxOutputLength:0x4000000})}catch(a){"ERR_BUFFER_TOO_LARGE"===a?.code&&m(g.SIZE_LIMIT_EXCEEDED,{limit:0x4000000}),m(g.ARCHIVE_FORMAT,{field:"gzip"})}c.byteLength>1048576&&c.byteLength/a.byteLength>200&&m(g.COMPRESSION_RATIO_EXCEEDED,{limit:200});let h=(function(a){(0===a.byteLength||a.byteLength%512!=0)&&m(g.ARCHIVE_TRUNCATED,{field:"alignment"});let b=[],c=0;for(;c+512<=a.byteLength;){let d=a.subarray(c,c+512);if(function(a){for(let b=0;b<a.length;b++)if(0!==a[b])return!1;return!0}(d)){for(let b=c;b<a.byteLength;b++)0!==a[b]&&m(g.ARCHIVE_FORMAT,{field:"trailer"});return b}!function(a,b){let c=0,d=0;for(let b=0;b<512;b++){let e=b>=148&&b<156?32:a[b];c+=e,d+=e>127?e-256:e}b!==c&&b!==d&&m(g.ARCHIVE_FORMAT,{field:"checksum"})}(d,p(d,148,8)),"ustar"!==o(d,257,6).trim()&&m(g.ARCHIVE_FORMAT,{field:"magic"});let f=o(d,156,1)||"\0",h="5"===f;h||n.has(f)||m(g.ENTRY_TYPE_FORBIDDEN,{typeflag:l(f)}),""!==o(d,157,100)&&m(g.ENTRY_TYPE_FORBIDDEN,{typeflag:"link"});let i=p(d,100,8);(3584&i)!=0&&m(g.ENTRY_MODE_FORBIDDEN,{bits:(3584&i).toString(8)});let j=o(d,345,155),k=o(d,0,100),q=""===j?k:`${j}/${k}`,r=p(d,124,12);h&&0!==r&&m(g.ARCHIVE_FORMAT,{field:"directory-size"}),r>e.em&&m(g.SIZE_LIMIT_EXCEEDED,{limit:e.em});let s=c+512,t=s+r;t>a.byteLength&&m(g.ARCHIVE_TRUNCATED),b.push({name:q,isDirectory:h,mode:i,size:r,bytes:h?new Uint8Array(0):a.subarray(s,t)}),b.length>1e3&&m(g.ENTRY_LIMIT_EXCEEDED,{limit:1e3}),c=s+512*Math.ceil(r/512)}return m(g.ARCHIVE_TRUNCATED,{field:"trailer"})})(c).map(a=>({entry:a,...function(a){let b=a;b.startsWith("./")&&(b=b.slice(2));let c=b.endsWith("/");return c&&(b=b.slice(0,-1)),""===b&&m(g.ENTRY_PATH_UNSAFE,{reason:"empty"}),{path:b,trailingSlash:c}}(a.name)})),i=function(a,b){let c=[b.skillId,`${b.skillId}-${b.version}`],d=new Set(a.map(a=>a.split("/")[0]));if(1!==d.size)return null;let e=[...d][0];return a.some(a=>a.startsWith(`${e}/`))?(c.includes(e)||m(g.LAYOUT_INVALID,{reason:"root-directory",entry:l(e)}),e):null}(h.map(a=>a.path),b),j=[],k=[],q=new Map,r=new Map,s=0;for(let a of h){let b=a.path;if(null!==i){if(b===i)continue;b=b.slice(i.length+1)}let c=a.entry.isDirectory||a.trailingSlash,d=(0,e.r5)(b,"/entry");d.ok||m(g.ENTRY_PATH_UNSAFE,{entry:l(b),reason:d.errors[0].message}),q.has(b)&&m(g.ENTRY_DUPLICATE,{entry:l(b)});let h=b.split("/").map(a=>(0,e.vy)(a)).join("/");if(void 0!==r.get(h)&&m(g.ENTRY_COLLISION,{entry:l(b)}),q.set(b,c),r.set(h,b),c){k.push(b);continue}(s+=a.entry.size)>0x4000000&&m(g.SIZE_LIMIT_EXCEEDED,{limit:0x4000000});let n=new Uint8Array(a.entry.bytes);j.push({path:b,size:a.entry.size,sha256:(0,f.Q_)(n),executable:(73&a.entry.mode)!=0,bytes:n})}for(let a of(j.filter(a=>a.path!==e.KH).length>e.xP&&m(g.ENTRY_LIMIT_EXCEEDED,{limit:e.xP}),k))j.some(b=>b.path===a)&&m(g.ENTRY_DUPLICATE,{entry:l(a)});for(let a of j){let b=a.path.split("/").slice(0,-1),c="";for(let d of b)c=""===c?d:`${c}/${d}`,j.some(a=>a.path===c)&&m(g.ENTRY_PATH_UNSAFE,{entry:l(a.path),reason:"parent-is-file"})}return{rootName:i,files:j,directories:k,compressedSize:a.byteLength,decompressedSize:c.byteLength}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=593,exports.ids=[593],exports.modules={9758:(a,b,c)=>{c.d(b,{Ck:()=>h});var d=c(21124),e=c(38301),f=c.n(e),g=c(62484);function h({children:a,as:b="div",className:c=""}){let e=function a(b){return null==b||"boolean"==typeof b?"":"string"==typeof b?b:"number"==typeof b?String(b):Array.isArray(b)?b.map(a).join(""):f().isValidElement(b)?a(b.props.children):""}(a);if(!e||0===e.trim().length)return(0,d.jsx)(b,{className:c||void 0,children:a});let h=`relative group ${"span"===b?"block ":""}${c}`.trim();return(0,d.jsxs)(b,{className:h,"data-testid":"code-block-with-copy",children:[a,(0,d.jsx)(g.i,{text:e,className:"absolute right-2 top-2 z-10 opacity-100 md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100 focus:opacity-100"})]})}},9815:(a,b,c)=>{c.d(b,{B:()=>A});var d=c(21124),e=c(38301),f=c(20481),g=c(73451),h=c(17252),i=c(90349),j=c(3805);let k={status:"loading",options:[]};function l({selectedWorktreeId:a,onSelect:b,disabled:c=!1}){let h=(0,f.c)("skills"),[i,l]=(0,e.useState)(k),[n,o]=(0,e.useState)(0),p=(0,e.useCallback)(()=>o(a=>a+1),[]);return"loading"===i.status?(0,d.jsxs)("div",{className:"space-y-2","data-testid":"skill-target-loading",children:[(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:h("target.loading")}),(0,d.jsx)(g.EA,{className:"h-24 w-full rounded-lg"})]}):"error"===i.status?(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-target-error",children:[(0,d.jsx)(j.u,{tone:"danger",children:h("target.errorNotice")}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:p,"data-testid":"skill-target-retry",children:h("target.retry")})]}):0===i.options.length?(0,d.jsx)(g.Zp,{"data-testid":"skill-target-empty",children:(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:h("target.empty")})}):(0,d.jsxs)("div",{className:"space-y-3","data-testid":"skill-target-selector",children:[(0,d.jsx)("div",{role:"radiogroup","aria-label":h("target.heading"),className:"space-y-2",children:i.options.map(e=>(0,d.jsx)(m,{option:e,selected:e.id===a,disabled:c,onSelect:b},e.id))}),(0,d.jsx)(j.u,{tone:"neutral","data-testid":"skill-target-branch-notice",children:h("target.branchFreshnessNotice")})]})}function m({option:a,selected:b,disabled:c,onSelect:e}){let h=(0,f.c)("skills"),i=a.liveBranch??a.syncedBranch;return(0,d.jsxs)("button",{type:"button",role:"radio","aria-checked":b,disabled:c,onClick:()=>e(a.id),"data-testid":`skill-target-option-${a.id}`,className:`w-full rounded-lg border px-3 py-2.5 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${b?"border-accent-500 bg-accent-50 dark:bg-accent-950/40":"border-border bg-card hover:bg-muted"}`,children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-sm font-semibold text-foreground break-all",children:a.name}),b&&(0,d.jsx)(g.Ex,{variant:"info",children:h("target.selected")})]}),(0,d.jsxs)("dl",{className:"mt-1.5 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2",children:[(0,d.jsx)(n,{label:h("target.repository"),children:a.repositoryName}),(0,d.jsx)(n,{label:h("target.branch"),children:i??h("target.branchUnknown")}),(0,d.jsx)(n,{label:h("target.agents"),children:a.agents.length>0?a.agents.join(", "):h("target.agentsNone")}),(0,d.jsx)(n,{label:h("target.workingTree"),children:h(null===a.dirty?"target.workingTreeUnknown":a.dirty?"target.workingTreeDirty":"target.workingTreeClean")})]}),a.sessionRunning&&(0,d.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground","data-testid":`skill-target-session-${a.id}`,children:h("target.sessionRunning")})]})}function n({label:a,children:b}){return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:a}),(0,d.jsx)("dd",{className:"text-xs text-foreground break-words",children:b})]})}var o=c(27884);function p({label:a,children:b}){return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:a}),(0,d.jsx)("dd",{className:"mt-0.5 break-words text-sm text-foreground",children:b})]})}function q({level:a,kind:b,label:c}){let e=(0,f.c)("skills");return(0,d.jsxs)(g.Ex,{variant:o.eK[a],"data-testid":`skill-plan-risk-${b}-${a}`,children:[c,": ",e(o.pP[a])]})}function r({entry:a}){let b=(0,f.c)("skills"),c=o.KL[a.reason];return(0,d.jsxs)("li",{className:"space-y-1.5 rounded-md border border-border px-3 py-2","data-testid":`skill-plan-file-${a.path}`,children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)(g.Ex,{variant:o.tC[a.change],children:b(o.AS[a.change])}),(0,d.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:a.path}),a.generated&&(0,d.jsx)(g.Ex,{variant:"gray",children:b("plan.fileGenerated")})]}),c&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b(c)}),a.gitIgnored&&(0,d.jsx)("p",{className:"text-xs text-warning-foreground",children:b("plan.gitIgnored")}),a.binary?(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("plan.diffBinary")}):a.diff?(0,d.jsxs)("details",{children:[(0,d.jsx)("summary",{className:"cursor-pointer text-xs text-accent-600 dark:text-accent-400",children:b("plan.diffToggle",{additions:a.additions,deletions:a.deletions})}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-muted p-2 font-mono text-[11px] leading-snug text-foreground",children:a.diff}),a.diffTruncated&&(0,d.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:b("plan.diffTruncated")})]}):null]})}function s({plan:a}){let b=(0,f.c)("skills"),{target:c,skill:e}=a,h=e.compatibility.commandmate;return(0,d.jsxs)(g.Zp,{className:"space-y-4","data-testid":"skill-install-plan",children:[(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:b("plan.heading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("plan.expiresAt",{timestamp:a.expiresAt})})]}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.targetHeading")}),(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsx)(p,{label:b("target.repository"),children:c.repositoryName}),(0,d.jsx)(p,{label:b("target.heading"),children:c.worktreeName}),(0,d.jsx)(p,{label:b("target.branch"),children:c.branch??b("target.branchUnknown")}),(0,d.jsx)(p,{label:b("plan.headStateLabel"),children:b(o.kF[c.headState]??"plan.headState.unknown")}),(0,d.jsx)(p,{label:b("target.workingTree"),children:c.workingTreeDirty?b("target.workingTreeDirty"):b("target.workingTreeClean")}),(0,d.jsx)(p,{label:b("plan.installRoot"),children:(0,d.jsx)("span",{className:"break-all font-mono text-xs",children:(c.installRoots&&c.installRoots.length>0?c.installRoots:[c.installRoot]).map(a=>(0,d.jsx)("span",{className:"block",children:a},a))})}),(0,d.jsx)(p,{label:b("plan.existingInstall"),children:c.existingInstall?b("plan.existingInstallVersion",{version:c.existingInstall.version}):b("plan.existingInstallNone")}),(0,d.jsx)(p,{label:b("detail.recommendedVersion"),children:(0,d.jsx)("span",{className:"font-mono text-xs",children:e.version})})]})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-risk-section",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.riskHeading")}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,d.jsx)(q,{level:e.declaredRisk,kind:"declared",label:b("plan.riskDeclared")}),(0,d.jsx)(q,{level:e.computedRisk,kind:"computed",label:b("plan.riskComputed")}),(0,d.jsx)(q,{level:e.effectiveRisk,kind:"effective",label:b("plan.riskEffective")})]}),(0,d.jsx)("p",{className:"break-words text-sm text-foreground",children:e.riskRationale}),(0,d.jsx)(j.u,{tone:"neutral",children:b("plan.riskNotice")})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-permissions",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("permissions.heading")}),e.declaredPermissions.length>0?(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.declaredPermissions.map(a=>(0,d.jsx)(g.Ex,{variant:"warning",children:o.z2[a]?b(o.z2[a]):a},a))}):(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.permissionsNone")}),(0,d.jsx)(j.u,{tone:"warning",children:b("permissions.declarationOnlyNotice")})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-requirements",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("requirements.heading")}),0===e.requirements.commands.length&&0===e.requirements.networkHosts.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.requirementsNone")}):(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[e.requirements.commands.length>0&&(0,d.jsx)(p,{label:b("plan.requirementsCommands"),children:e.requirements.commands.map(a=>`${a.name} ${a.versionRange??b("plan.commandAnyVersion")}`).join(", ")}),e.requirements.networkHosts.length>0&&(0,d.jsx)(p,{label:b("plan.requirementsHosts"),children:e.requirements.networkHosts.join(", ")})]})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-scripts",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.scriptsHeading")}),0===e.executablePaths.length&&0===e.scriptPaths.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.scriptsNone")}):(0,d.jsx)("ul",{className:"space-y-1",children:[...new Set([...e.scriptPaths,...e.executablePaths])].map(a=>(0,d.jsx)("li",{className:"break-all font-mono text-xs text-foreground",children:a},a))})]}),"compatible"!==h.status&&(0,d.jsx)(j.u,{tone:"warning","data-testid":"skill-plan-compatibility-notice",children:b((0,o.e5)(h.messageKey),{range:h.requiredRange,currentVersion:h.currentVersion??""})}),a.warnings.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-warnings",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.warningsHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.warnings.map(a=>(0,d.jsx)("li",{className:"text-xs text-warning-foreground",children:o.RO[a]?b(o.RO[a]):a},a))})]}),(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-files",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("plan.filesHeading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-plan-stats",children:b("plan.stats",{added:a.stats.added,modified:a.stats.modified,unchanged:a.stats.unchanged,conflicted:a.stats.conflicted,unmanaged:a.stats.unmanaged})}),0===a.files.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("plan.filesEmpty")}):(0,d.jsx)("ul",{className:"space-y-2",children:a.files.map(a=>(0,d.jsx)(r,{entry:a},a.path))})]}),a.blockers.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-install-blockers",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:b("plan.blockersHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),a.code.startsWith("skills.")?b((0,o.e5)(a.code),{range:h.requiredRange,currentVersion:h.currentVersion??""}):o.KL[a.code]?b(o.KL[a.code]):a.code]},`${a.code}:${a.path??""}`))}),(0,d.jsx)(j.u,{tone:"danger",children:b("plan.blockedNotice")})]})]})}function t({entry:a}){let b=(0,f.c)("skills"),c=o.Mj[a.disposition],e=o.hJ[a.reason];return(0,d.jsxs)("li",{className:"flex flex-wrap items-center gap-2","data-testid":`skill-uninstall-file-${a.path}`,children:[(0,d.jsx)(g.Ex,{variant:"remove"===a.disposition?"info":"warning",children:c?b(c):a.disposition}),(0,d.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:a.path}),e&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:b(e)})]})}function u({plan:a}){let b=(0,f.c)("skills"),{target:c,skill:e}=a;return(0,d.jsxs)(g.Zp,{className:"space-y-4","data-testid":"skill-uninstall-plan",children:[(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:b("uninstall.heading")}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b("uninstall.expiresAt",{timestamp:a.expiresAt})})]}),(0,d.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,d.jsx)(p,{label:b("target.repository"),children:c.repositoryName}),(0,d.jsx)(p,{label:b("target.heading"),children:c.worktreeName}),(0,d.jsx)(p,{label:b("target.branch"),children:c.branch??b("target.branchUnknown")}),(0,d.jsx)(p,{label:b("uninstall.installedVersion"),children:(0,d.jsx)("span",{className:"font-mono text-xs",children:e.version||b("uninstall.versionUnknown")})}),(0,d.jsx)(p,{label:b("plan.installRoot"),children:(0,d.jsx)("span",{className:"break-all font-mono text-xs",children:c.installRoot})}),(0,d.jsx)(p,{label:b("target.workingTree"),children:c.workingTreeDirty?b("target.workingTreeDirty"):b("target.workingTreeClean")})]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-uninstall-stats",children:b("uninstall.stats",{removable:a.stats.removable,modified:a.stats.modified,missing:a.stats.missing,unknown:a.stats.unknown,irregular:a.stats.irregular})}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("uninstall.removalsHeading")}),0===a.removals.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("uninstall.removalsEmpty")}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.removals.map(a=>(0,d.jsx)(t,{entry:a},a.path))})]}),(0,d.jsxs)("section",{className:"space-y-2",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:b("uninstall.retainedHeading")}),0===a.retained.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:b("uninstall.retainedEmpty")}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.retained.map(a=>(0,d.jsx)(t,{entry:a},a.path))})]}),(0,d.jsxs)("div",{className:"space-y-2",children:[a.skill.agents.length>0&&(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5","data-testid":"skill-uninstall-agents",children:a.skill.agents.map(a=>(0,d.jsx)(g.Ex,{variant:"gray",children:(0,h.f_)(a.agent)},a.agent))}),(0,d.jsx)(j.u,{tone:"neutral",children:b((0,o.e5)(a.nextActionKey))})]}),a.blockers.length>0&&(0,d.jsxs)("section",{className:"space-y-2","data-testid":"skill-uninstall-blockers",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:b("uninstall.blockersHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),b((0,o.e5)(a.messageKey))]},`${a.code}:${a.path??""}`))})]})]})}var v=c(30156);let w={worktreeId:null,busy:null,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null};function x(a){return{...a,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null}}function y({failure:a}){let b=(0,f.c)("skills");return(0,d.jsxs)("div",{className:"space-y-2","data-testid":"skill-operation-error",children:[(0,d.jsxs)(j.u,{tone:"danger",children:[(0,d.jsx)("p",{className:"font-medium",children:b("operation.errorHeading")}),(0,d.jsx)("p",{className:"mt-1",children:b((0,o.FW)(a.code))}),(0,d.jsx)("p",{className:"mt-1 break-words",children:b("state.errorCode",{code:a.code})})]}),a.nextActionKey&&(0,d.jsx)(j.u,{tone:"warning",children:b((0,o.e5)(a.nextActionKey))}),a.blockers&&a.blockers.length>0&&(0,d.jsx)("ul",{className:"space-y-1","data-testid":"skill-operation-error-blockers",children:a.blockers.map(a=>(0,d.jsxs)("li",{className:"text-xs text-danger-foreground",children:[a.path&&(0,d.jsx)("span",{className:"mr-1 break-all font-mono",children:a.path}),b((0,o.e5)(a.messageKey))]},`${a.code}:${a.path??""}`))})]})}function z({agents:a,skillId:b,version:c}){let e=(0,f.c)("skills");return 0===a.length?null:(0,d.jsxs)("div",{className:"space-y-1","data-testid":"skill-operation-reload",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e("operation.reloadHeading")}),(0,d.jsx)("ul",{className:"space-y-1",children:a.map(a=>(0,d.jsx)("li",{className:"text-xs text-muted-foreground",children:e((0,o.e5)(a.messageKey),{agent:(0,h.f_)(a.agent),skillId:b,version:c})},a.agent))})]})}function A({skillId:a,version:b,blockedReason:c,worktreeId:h}){let k=(0,f.c)("skills"),[m,n]=(0,e.useState)(()=>h?{...w,worktreeId:h}:w),p=(0,e.useCallback)(a=>{n(b=>b.worktreeId===a?b:x({...b,worktreeId:a,busy:null}))},[]),q=(0,e.useCallback)(async()=>{let c=m.worktreeId;if(!c)return;n(a=>({...x(a),busy:"install-plan"}));let d=await (0,v.Q6)(c,a,{version:b??void 0});n(a=>({...a,busy:null,installPlan:d.ok?d.data.plan:null,failure:d.ok?null:d.failure}))},[a,m.worktreeId,b]),r=(0,e.useCallback)(async()=>{var b;let c=m.worktreeId,d=m.installPlan;if(!c||!d||d.requiresRiskAcknowledgement&&!m.riskAcknowledged)return;n(a=>({...a,busy:"install-apply",failure:null}));let e=await (0,v.Xi)(c,a,{planToken:d.token,version:d.skill.version,acknowledgeRisk:!!d.requiresRiskAcknowledgement||void 0,idempotencyKey:(b=d.token,`skill-install-${b}`)});e.ok&&(0,i.k)(c),n(a=>({...a,busy:null,installPlan:e.ok?null:a.installPlan,installResult:e.ok?e.data:null,failure:e.ok?null:e.failure}))},[a,m.installPlan,m.riskAcknowledged,m.worktreeId]),t=(0,e.useCallback)(async()=>{let b=m.worktreeId;if(!b)return;n(a=>({...x(a),busy:"uninstall-plan"}));let c=await (0,v.hN)(b,a);n(a=>({...a,busy:null,uninstallPlan:c.ok?c.data.plan:null,failure:c.ok?null:c.failure}))},[a,m.worktreeId]),A=(0,e.useCallback)(async()=>{var b;let c=m.worktreeId,d=m.uninstallPlan;if(!c||!d)return;n(a=>({...a,busy:"uninstall-apply",failure:null}));let e=await (0,v.E)(c,a,{planToken:d.token,idempotencyKey:(b=d.token,`skill-uninstall-${b}`)});n(a=>({...a,busy:null,uninstallPlan:e.ok?null:a.uninstallPlan,uninstallResult:e.ok?e.data:null,failure:e.ok?null:e.failure}))},[a,m.uninstallPlan,m.worktreeId]),B=(0,e.useCallback)(()=>{n(a=>x(a))},[]),C=null!==m.busy,D=m.installPlan,E=m.uninstallPlan,F=c??k(m.worktreeId?"plan.ready":"plan.chooseTarget"),G=null!==D&&D.requiresRiskAcknowledgement&&!m.riskAcknowledged;return(0,d.jsxs)("div",{className:"space-y-3","data-testid":"skill-install-panel",children:[!h&&(0,d.jsx)(l,{selectedWorktreeId:m.worktreeId,onSelect:p,disabled:C}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:"primary",disabled:C||null!==c||!m.worktreeId,onClick:q,"data-testid":"skill-install-action","aria-describedby":"skill-install-reason",children:k("install-plan"===m.busy?"plan.building":"plan.build")}),(0,d.jsx)(g.$n,{variant:"secondary",disabled:C||!m.worktreeId,onClick:t,"data-testid":"skill-uninstall-action",children:k("uninstall-plan"===m.busy?"uninstall.building":"uninstall.build")})]}),(0,d.jsx)("p",{id:"skill-install-reason",className:"text-sm text-muted-foreground","data-testid":"skill-install-reason",children:F}),m.failure&&(0,d.jsx)(y,{failure:m.failure}),D&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)(s,{plan:D}),D.requiresRiskAcknowledgement&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-install-risk-acknowledgement",children:[(0,d.jsx)(j.u,{tone:"danger",children:k((0,o.e5)(D.riskAcknowledgementMessageKey??"skills.plan.highRiskAcknowledgement"))}),(0,d.jsxs)("label",{className:"flex items-start gap-2 text-sm text-foreground",children:[(0,d.jsx)(g.Sc,{checked:m.riskAcknowledged,onCheckedChange:a=>n(b=>({...b,riskAcknowledged:!0===a})),disabled:C,"data-testid":"skill-install-risk-checkbox",className:"mt-0.5"}),(0,d.jsx)("span",{children:k("plan.acknowledgeLabel")})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:D.requiresRiskAcknowledgement?"danger":"primary",disabled:C||!D.installable||G,onClick:r,"data-testid":"skill-install-confirm",children:k("install-apply"===m.busy?"plan.confirming":"plan.confirm")}),(0,d.jsx)(g.$n,{variant:"ghost",disabled:C,onClick:B,"data-testid":"skill-install-discard",children:k("plan.discard")})]})]}),E&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)(u,{plan:E}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(g.$n,{variant:"danger",disabled:C||!E.removable,onClick:A,"data-testid":"skill-uninstall-confirm",children:k("uninstall-apply"===m.busy?"uninstall.confirming":"uninstall.confirm")}),(0,d.jsx)(g.$n,{variant:"ghost",disabled:C,onClick:B,"data-testid":"skill-uninstall-discard",children:k("plan.discard")})]})]}),m.installResult&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-install-result",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:k("operation.installedHeading")}),(0,d.jsx)(j.u,{tone:"info",children:k((0,o.e5)(m.installResult.operation.nextActionKey))}),m.installResult.operation.replayed&&(0,d.jsx)(j.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:k("operation.replayNotice")}),m.installResult.install&&"files"in m.installResult.install&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:k("operation.filesWritten",{count:m.installResult.install.files.length})}),"reload"in m.installResult&&(0,d.jsx)(z,{agents:m.installResult.reload.agents,skillId:m.installResult.reload.skillId,version:m.installResult.reload.version}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:B,"data-testid":"skill-operation-reset",children:k("operation.startOver")})]}),m.uninstallResult&&(0,d.jsxs)(g.Zp,{className:"space-y-3","data-testid":"skill-uninstall-result",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:k("operation.uninstalledHeading")}),(0,d.jsx)(j.u,{tone:"info",children:k((0,o.e5)(m.uninstallResult.operation.nextActionKey))}),m.uninstallResult.operation.replayed&&(0,d.jsx)(j.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:k("operation.replayNotice")}),m.uninstallResult.uninstall&&"removedFiles"in m.uninstallResult.uninstall&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:k("operation.filesRemoved",{count:m.uninstallResult.uninstall.removedFiles.length})}),"reload"in m.uninstallResult&&(0,d.jsx)(z,{agents:m.uninstallResult.reload.agents,skillId:m.uninstallResult.reload.skillId,version:m.uninstallResult.reload.version}),(0,d.jsx)(g.$n,{variant:"secondary",size:"sm",onClick:B,"data-testid":"skill-operation-reset",children:k("operation.startOver")})]})]})}},12894:(a,b,c)=>{c.d(b,{o:()=>d});function d(a){return a?a.split("/").map(encodeURIComponent).join("/"):""}},62484:(a,b,c)=>{c.d(b,{i:()=>j});var d=c(21124),e=c(38301),f=c(63156),g=c(58970);function h(){return(0,d.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function i(){return(0,d.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function j({text:a,className:b="",label:c="Copy"}){let[j,k]=(0,e.useState)(!1),l=(0,e.useRef)(null),m=(0,e.useCallback)(async()=>{try{await (0,f.l)(a),k(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>k(!1),g.s7)}catch{}},[a]);return(0,d.jsxs)("button",{type:"button",onClick:m,className:`inline-flex items-center gap-1 rounded border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-foreground transition-colors hover:bg-muted ${b}`,"aria-label":j?"Copied":c,title:j?"Copied!":c,children:[j?(0,d.jsx)(i,{}):(0,d.jsx)(h,{}),(0,d.jsx)("span",{children:j?"Copied":c})]})}},63156:(a,b,c)=>{c.d(b,{l:()=>e});let d=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function e(a){if(!a||0===a.trim().length)return;let b=a.replace(d,"");if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(b);return}catch{}let c=document.createElement("textarea");c.value=b,c.style.position="fixed",c.style.left="-9999px",c.style.top="-9999px",c.style.opacity="0",document.body.appendChild(c),c.focus(),c.select();try{document.execCommand("copy")}finally{document.body.removeChild(c)}}},80855:(a,b,c)=>{c.d(b,{G8:()=>x});var d=c(21124),e=c(38301),f=c.n(e),g=c(20481),h=c(79206),i=c(18954),j=c(26295),k=c(29701),l=c(28752),m=c(37950);c(31230);var n=c(13973),o=c(17793);let p=(0,n.default)(async()=>{},{loadableGenerated:{modules:["components/worktree/MermaidCodeBlock.tsx -> ./MermaidDiagram"]},ssr:!1,loading:function(){let a=(0,g.c)("worktree");return(0,d.jsxs)("div",{className:"mermaid-loading flex items-center gap-2 text-muted-foreground p-4",children:[(0,d.jsx)(o.y,{size:"sm"}),(0,d.jsx)("span",{children:a("mermaid.loading")})]})}});function q({className:a,children:b}){if(a&&a.split(" ").includes("language-mermaid")){let a=null==b?"":"string"==typeof b?b:Array.isArray(b)?b.map(a=>"string"==typeof a?a:"").join(""):String(b);return(0,d.jsx)(p,{code:a})}return(0,d.jsx)("code",{className:a,children:b})}var r=c(9758),s=c(46831);function t(a,b){if(!b)return null;let c=a.substring(0,a.lastIndexOf("/")+1);try{let a=new URL(c,"file:///"),d=new URL(b,a),e=decodeURIComponent(d.pathname);if(e.startsWith("/")){let a=e.substring(1);if(a.length>0)return a}}catch{}return null}let u={...s.j,attributes:{...s.j.attributes,a:[...(s.j.attributes?.a??[]).filter(a=>"href"!==a),["href",/^(?:#|mailto:|tel:|https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/]],img:[...(s.j.attributes?.img??[]).filter(a=>"src"!==a),["src",/^(?:https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/],"alt","width","height"]}};var v=c(12894);function w({apiUrl:a,alt:b,width:c,height:f}){let h=(0,g.c)("worktree"),[i,j]=(0,e.useState)(null);return i?(0,d.jsx)("img",{src:i,alt:b,width:c,height:f,style:{maxWidth:c||"100%"}}):(0,d.jsx)("span",{style:{color:"#999"},children:h("markdownPreview.loadingImage")})}let x=(0,e.memo)(function({content:a,onOpenFile:b,currentFilePath:c,worktreeId:g}){let n=(0,e.useRef)(b);n.current=b;let o=(0,e.useRef)(c);o.current=c;let p=(0,e.useRef)(g);p.current=g;let s=(0,e.useCallback)((a,b)=>{let c=!b||0===b.length||b.length>2048||/[\x00-\x1f\x7f]/.test(b)?null:b;if(c)switch(c.startsWith("#")?"anchor":c.startsWith("http://")||c.startsWith("https://")||c.startsWith("mailto:")||c.startsWith("tel:")?"external":"relative"){case"anchor":break;case"external":a.preventDefault(),window.open(c,"_blank","noopener,noreferrer");break;case"relative":{a.preventDefault();let b=o.current,d=n.current;if(b&&d){let a=t(b,c);a&&d(a)}}}},[]),x=(0,e.useMemo)(()=>({code:q,pre:({children:a})=>!function(a){let b=f().Children.toArray(a)[0];if(!f().isValidElement(b))return!1;let c=b.props.className;return"string"==typeof c&&c.split(" ").includes("language-mermaid")}(a)?(0,d.jsx)(r.Ck,{children:(0,d.jsx)("pre",{className:"overflow-x-auto",children:a})}):(0,d.jsx)("pre",{children:a}),img:({src:a,alt:b,width:c,height:e,...f})=>{let g=c??f.node?.properties?.width,h=e??f.node?.properties?.height;if("string"==typeof a&&!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("data:")){let c=o.current,e=p.current;if(c&&e){let f=t(c,a);if(f){let a=`/api/worktrees/${e}/files/${(0,v.o)(f)}`;return(0,d.jsx)(w,{apiUrl:a,alt:b??"",width:g,height:h})}}}return(0,d.jsx)("img",{src:a,alt:b??"",width:g,height:h,style:{maxWidth:g||"100%"}})},a:({href:a,children:b,...c})=>a?(0,d.jsx)("a",{...c,href:a,onClick:b=>s(b,a),children:b}):(0,d.jsx)("a",{...c,children:b})}),[s]),y=(0,e.useMemo)(()=>[i.A],[]),z=(0,e.useMemo)(()=>[j.A,[k.A,u],l.A,m.A],[]);return(0,d.jsx)(h.oz,{remarkPlugins:y,rehypePlugins:z,components:x,children:a})})},90349:(a,b,c)=>{c.d(b,{I:()=>d,k:()=>e});let d="skill:installed";function e(a){}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=9192,exports.ids=[9192],exports.modules={2412:(a,b,c)=>{c.d(b,{Qb:()=>f,tR:()=>g});var d=c(46065);let e=Symbol("default-branch-unresolved");async function f(a){let b=await (0,d.Bc)(["symbolic-ref","refs/remotes/origin/HEAD","--short"],a);if(null===b)return e;let c=b.trim();return c.startsWith("origin/")?c.slice(7):null}async function g(a){let b=await f(a);return"string"==typeof b?b:null}},59082:(a,b,c)=>{c.d(b,{C4:()=>l,FW:()=>j,Iz:()=>k,Z3:()=>m});var d=c(65417),e=c(72626),f=c(46065),g=c(2412),h=c(63271);let i=(0,e.h)("git-remote");async function j(a,b){let{remote:c="origin",prune:e}=b,g=["fetch"];e&&g.push("--prune"),g.push(c,"--"),await (0,f.sl)(g,a,d.dw)}async function k(a,b,c){await (0,f.rS)(["remote","add",b,c],a,5e3)}async function l(a,b){let{remote:c="origin",branch:e,rebase:g,ffOnly:h}=b;return(0,f.dX)(a,async()=>{let b=["pull"];return g&&b.push("--rebase"),h&&b.push("--ff-only"),b.push(c),e&&b.push(e),b.push("--"),(0,f.mY)(b,a,d.A$,!0)})}async function m(a,b){let{remote:c="origin",branch:e,force:j,forceWithLease:k,setUpstream:l}=b;if(j||k){let b=await (0,g.tR)(a);if(null!==b&&b===e)throw new h.rm;i.warn("git:danger:force-push",{operation:"push",worktreePath:a,branch:e,forceWithLease:!0===k,timestamp:new Date().toISOString()})}await (0,f.dX)(a,async()=>{let b=["push"];k?b.push("--force-with-lease"):j&&b.push("--force"),l&&b.push("-u"),b.push(c,`${e}:refs/heads/${e}`,"--"),await (0,f.sl)(b,a,d.fL)})}},99192:(a,b,c)=>{c.d(b,{nX:()=>M,z0:()=>z,lY:()=>N,SN:()=>O,Pt:()=>B,ID:()=>n,Wz:()=>D,NM:()=>w,ac:()=>x,$G:()=>m,$Z:()=>o,t$:()=>s,mk:()=>R,Lz:()=>E,om:()=>H,FW:()=>$.FW,C4:()=>$.C4,Z3:()=>$.Z3,S7:()=>Y,lw:()=>Z,x7:()=>d.x7,jr:()=>J,pc:()=>F,Ey:()=>U,X_:()=>V,VM:()=>T,oC:()=>S,X0:()=>G});var d=c(63271),e=c(46065),f=c(2412),g=c(33873),h=c.n(g),i=c(79748),j=c(65417),k=c(72626);let l=(0,k.h)("git-status");async function m(a,b){let c,[d,f,g]=await Promise.all([(0,e.Bc)(["rev-parse","--abbrev-ref","HEAD"],a),(0,e.Bc)(["rev-parse","--short","HEAD"],a),(0,e.Bc)(["status","--porcelain"],a)]);return c=null===d?"(unknown)":"HEAD"===d?"(detached HEAD)":d,{currentBranch:c,initialBranch:b,isBranchMismatch:null!==b&&"(unknown)"!==c&&"(detached HEAD)"!==c&&c!==b,commitHash:f??"(unknown)",isDirty:null!==g&&g.length>0}}async function n(a){let b=await (0,e.TT)(["rev-list","--left-right","--count","@{upstream}...HEAD"],a);if(!b.ok){var c;let a=b.timedOut?"error":(c=b.stderr,/no upstream/i.test(c)?"no_upstream":/HEAD does not point to a branch|not point to a branch/i.test(c)?"detached":/unknown revision|ambiguous argument|bad revision/i.test(c)?"upstream_gone":"error");return l.debug("git:ahead-behind-unavailable",{reason:a}),{aheadBehind:null,reason:a}}let d=b.stdout.split(" ");if(2!==d.length)return{aheadBehind:null,reason:"error"};let f=parseInt(d[0],10),g=parseInt(d[1],10);return Number.isInteger(f)&&Number.isInteger(g)?{aheadBehind:{ahead:g,behind:f},reason:null}:{aheadBehind:null,reason:"error"}}async function o(a){let b=await (0,e.Bc)(["rev-parse","--git-path","FETCH_HEAD","--git-common-dir"],a);if(null===b)return null;let c=b.split("\n").map(a=>a.trim()).filter(a=>a.length>0);if(0===c.length)return null;let d=new Set([h().resolve(a,c[0])]);c[1]&&d.add(h().resolve(a,c[1],"FETCH_HEAD"));let f=null;for(let a of d)try{let{mtimeMs:b}=await (0,i.stat)(a);(null===f||b>f)&&(f=b)}catch{}return null===f?null:Math.round(f)}function p(a){switch(a){case"A":return"added";case"D":return"deleted";case"R":case"C":return"renamed";default:return"modified"}}let q=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function r(a){let b=a.indexOf(" -> ");return -1!==b?a.slice(b+4):a}async function s(a){return function(a){let b=[],c=[],d=[];if(!a)return{staged:b,unstaged:c,untracked:d};for(let e of a.split("\n")){if(e.length<4)continue;let a=e[0],f=e[1],g=e.slice(3);if(!g)continue;if("?"===a&&"?"===f){d.push({path:r(g),status:"untracked"});continue}let h=r(g);if("U"===a||"U"===f||q.has(`${a}${f}`)){c.push({path:h,status:"unmerged"});continue}" "!==a&&"?"!==a&&b.push({path:h,status:p(a)})," "!==f&&"?"!==f&&c.push({path:h,status:p(f)})}return{staged:b,unstaged:c,untracked:d}}(await (0,e.rS)(["status","--porcelain"],a,j.Ev))}var t=c(29021),u=c.n(t);let v=(0,k.h)("git-log");async function w(a,b=50,c=0){let d=(await (0,e.rS)(["log",`--max-count=${b}`,`--skip=${c}`,"--format=%H%n%h%n%s%n%an%n%aI","--"],a,e.t1)).trim();if(!d)return[];let f=d.split("\n"),g=[];for(let a=0;a+4<f.length;a+=5)g.push({hash:f[a],shortHash:f[a+1],message:f[a+2],author:f[a+3],date:f[a+4]});return g}async function x(a,b){try{let c=(await (0,e.rS)(["log","-1","--format=%H%n%h%n%s%n%an%n%aI",b,"--"],a,e.t1)).trim().split("\n");if(c.length<5)return null;let d={hash:c[0],shortHash:c[1],message:c[2],author:c[3],date:c[4]},f=await (0,e.rS)(["diff-tree","--no-commit-id","-r","--name-status",b,"--"],a,e.t1),g=function(a){let b=[];for(let c of a.trim().split("\n")){if(!c.trim())continue;let a=c.split(" ");if(a.length<2)continue;let d=a[0].trim(),e=a[a.length-1].trim();d.startsWith("R")?b.push({path:e,status:"renamed"}):"A"===d?b.push({path:e,status:"added"}):"D"===d?b.push({path:e,status:"deleted"}):b.push({path:e,status:"modified"})}return b}(f);return{commit:d,files:g}}catch(b){if(b instanceof d.y0||b instanceof d.wo)throw b;let a=b instanceof Error?b.message:"";if(a.includes("unknown revision")||a.includes("bad object"))return null;throw b}}async function y(a,b,c){if(!u().existsSync(a))return[];try{let{stdout:d}=await (0,e.mf)("git",["log","--all",`--since=${b}`,`--until=${c}`,`--format=%h\x1f%s\x1f%an`,"--"],{cwd:a,timeout:5e3}),f=d.trim();if(!f)return[];let g=[];for(let a of f.split("\n")){let b=a.split("\x1f");3===b.length&&g.push({shortHash:b[0],message:b[1],author:b[2]})}return g}catch(b){return v.error("git:commit-log-failed",{repoPath:a,error:b instanceof Error?b.message:"Unknown error"}),[]}}async function z(a,b,c){let d=await Promise.allSettled(a.map(async a=>({id:a.id,name:a.name,commits:await y(a.path,b,c)}))),e=new Map;for(let a of d)"fulfilled"===a.status&&a.value.commits.length>0&&e.set(a.value.id,{name:a.value.name,commits:a.value.commits});return e}let A=/(?:(?:closes|fixes|resolves)\s+)?#(\d+)/gi;function B(a){let b=new Set;for(let c of a){let a;for(A.lastIndex=0;null!==(a=A.exec(c));)b.add(parseInt(a[1],10))}return Array.from(b).sort((a,b)=>a-b)}let C=(0,k.h)("git-diff");async function D(a,b,c){try{return(await (0,e.rS)(["show",b,"--",c],a,e.t1)).trim()||null}catch(a){if(a instanceof d.y0||a instanceof d.wo)throw a;return null}}async function E(a,b,c){let f=function(a,b){switch(b){case"staged":return["diff","--cached","--",a];case"untracked":return["diff","--no-index","--","/dev/null",a];default:return["diff","--",a]}}(b,c);try{let{stdout:b}=await (0,e.mf)("git",f,{cwd:a,timeout:e.t1});return b.trim()||null}catch(a){if(a.killed||"ERR_CHILD_PROCESS_EXEC_TIMEOUT"===a.code||"ETIMEDOUT"===a.code)throw new d.y0(`Git command timed out after ${e.t1}ms`);if((a.stderr||a.message||"").includes("not a git repository"))throw new d.wo("Not a git repository");if("string"==typeof a.stdout)return a.stdout.trim()||null;throw C.error("git:working-diff-failed",{args:f.join(" "),error:a.message}),Error("Failed to execute git command")}}async function F(a,b){await (0,e.dX)(a,async()=>{await (0,e.rS)(["add","--",...b],a,j.Ev)})}async function G(a,b){await (0,e.dX)(a,async()=>{await (0,e.rS)(["restore","--staged","--",...b],a,j.Ev)})}async function H(a,b,c){await (0,e.dX)(a,async()=>{let f=["commit","-m",b];c&&f.push("--amend"),f.push("--");try{await (0,e.rS)(f,a,j.Ev)}catch(b){let a=b instanceof Error?b.message:"";if(/nothing to commit|no changes added to commit|nothing added to commit/i.test(a))throw new d.mZ("Nothing to commit");throw b}})}function I(a){let b=new Map;if(!a)return b;let c=null;for(let d of a.split("\n")){let a=d.trimEnd();if(a.startsWith("worktree "))c=a.slice(9).trim();else if(a.startsWith("branch ")&&c){let d=a.slice(7).trim(),e=d.startsWith("refs/heads/")?d.slice(11):d;e&&b.set(e,c)}else""===a&&(c=null)}return b}async function J(a,b="local"){let c="local"===b||"all"===b,d="remote"===b||"all"===b,[f,g,h,i,j]=await Promise.all([c?(0,e.Bc)(["branch","--list"],a):Promise.resolve(""),d?(0,e.Bc)(["branch","-r"],a):Promise.resolve(""),(0,e.Bc)(["symbolic-ref","refs/remotes/origin/HEAD","--short"],a),(0,e.Bc)(["worktree","list","--porcelain"],a),(0,e.Bc)(["for-each-ref","--format=%(refname:short)%09%(upstream:short)%09%(upstream:track)","refs/heads"],a)]),k=h?h.trim():null,l=I(i??""),m=function(a){let b=new Map;if(!a)return b;for(let c of a.split("\n")){if(!c.trim())continue;let[a,d="",e=""]=c.split(" ");if(!a)continue;let f=d.trim()||null,g=null;if(f){let a=e.match(/ahead (\d+)/),b=e.match(/behind (\d+)/);a||b?g={ahead:a?parseInt(a[1],10):0,behind:b?parseInt(b[1],10):0}:/gone/.test(e)||(g={ahead:0,behind:0})}b.set(a,{upstream:f,aheadBehind:g})}return b}(j??""),n=[];if(c)for(let{name:a,isCurrent:b}of function(a){let b=[];if(!a)return b;for(let c of a.split("\n")){let a=c.trimEnd();if(!a.trim())continue;let d=a.startsWith("* "),e=a.replace(/^[*+]?\s+/,"").trim();!e||e.startsWith("(")||b.push({name:e,isCurrent:d})}return b}(f??"")){let c=m.get(a);n.push({name:a,isCurrent:b,isRemote:!1,isDefault:null!==k&&k===`origin/${a}`,upstream:c?.upstream??null,aheadBehind:c?.aheadBehind??null,checkedOutWorktreePath:l.get(a)??null})}if(d)for(let a of function(a){let b=[];if(!a)return b;for(let c of a.split("\n")){let a=c.trim();a&&(a.includes("->")||b.push(a))}return b}(g??""))n.push({name:a,isCurrent:!1,isRemote:!0,isDefault:null!==k&&k===a,upstream:null,aheadBehind:null,checkedOutWorktreePath:null});return n}async function K(a,b){let c=await (0,e.Bc)(["worktree","list","--porcelain"],a);if(null===c)return null;let d=I(c).get(b);return d&&d!==a?d:null}function L(a){if(a instanceof d.y0||a instanceof d.wo||a instanceof d.rI)throw a;let b=a instanceof Error?a.message:String(a),c=a?.stderr??"",e=`${c} ${b}`;if(/did not match|not a valid ref|not found|unknown revision|invalid reference|couldn't find remote ref/i.test(e))throw new d.ur("Branch not found");throw a}async function M(a,b){let{branch:c,createIfMissing:f=!1,from:g,force:h=!1}=b,i=await K(a,c);if(i)throw new d.oK("Branch is checked out in another worktree",i);if(!h){let b=await (0,e.Bc)(["status","--porcelain"],a);if(null!==b&&b.length>0)throw new d.d_("Working tree has uncommitted changes")}await (0,e.dX)(a,async()=>{let b;f?(b=["switch","-c",c],g&&b.push(g),b.push("--")):b=c.startsWith("origin/")?["switch","-c",c.slice(7),"--track",c,"--"]:h?["checkout","-f",c,"--"]:["switch",c,"--"];try{await (0,e.rS)(b,a,j.Ev)}catch(a){L(a)}})}async function N(a,b){let{name:c,from:d}=b;await (0,e.dX)(a,async()=>{let b=["branch",c];d&&b.push(d),b.push("--");try{await (0,e.rS)(b,a,j.Ev)}catch(a){L(a)}})}async function O(a,b){let{name:c,force:g=!1}=b,h=await (0,e.Bc)(["rev-parse","--abbrev-ref","HEAD"],a);if(null!==h&&h.trim()===c)throw new d.MC("Cannot delete the current branch");let i=await (0,f.tR)(a);if(null!==i&&i===c)throw new d.qb("Cannot delete the default branch");await (0,e.dX)(a,async()=>{try{await (0,e.rS)(["branch",g?"-D":"-d",c,"--"],a,j.Ev)}catch(e){let a=e instanceof Error?e.message:String(e),b=e?.stderr??"",c=`${b} ${a}`;if(/not fully merged/i.test(c))throw new d.A6("Branch is not fully merged");L(e)}})}let P=(0,k.h)("git-stash"),Q=/^stash@\{(\d+)\}$/;async function R(a){let b=await (0,e.Bc)(["stash","list","--format=%gd%x09%s%x09%cI%x09%H"],a);if(null===b)return[];let c=[];if(!b||!b.trim())return c;for(let a of b.split("\n")){if(!a.trim())continue;let[b="",d="",e="",f=""]=a.split(" "),g=b.match(Q);g&&c.push({index:parseInt(g[1],10),message:d,branch:function(a){let b=a.match(/^WIP on ([^:]+):/);if(b)return b[1].trim()||null;let c=a.match(/^On ([^:]+):/);return c&&c[1].trim()||null}(d),date:e,sha:f})}return c}async function S(a,b){let{message:c,includeUntracked:f}=b;await (0,e.dX)(a,async()=>{let b=["stash","push"];f&&b.push("--include-untracked"),c&&b.push("-m",c),b.push("--");try{await (0,e.rS)(b,a,j.Ev)}catch(c){let a=c instanceof Error?c.message:"",b=c?.stderr??"";if(/No local changes to save|No stash entries|No local changes/i.test(`${b} ${a}`))throw new d.s$("No local changes to stash");throw c}})}async function T(a,b){return(0,e.dX)(a,async()=>{let c=await (0,e.mY)(["stash","pop","--",`stash@{${b}}`],a);return c.conflict?{...c,stashRetained:!0}:c})}async function U(a,b){return(0,e.dX)(a,async()=>(0,e.mY)(["stash","apply","--",`stash@{${b}}`],a))}async function V(a,b){P.warn("git:danger:stash-drop",{operation:"stash-drop",worktreePath:a,index:b,timestamp:new Date().toISOString()}),await (0,e.dX)(a,async()=>{await (0,e.rS)(["stash","drop","--",`stash@{${b}}`],a,j.Ev)})}let W=(0,k.h)("git-reset");async function X(a){let b=await (0,e.Bc)(["rev-parse","--abbrev-ref","HEAD"],a);if(null===b)return!1;let c=b.trim(),d=await (0,f.Qb)(a);return"string"==typeof d?d===c:null!==d&&("main"===c||"master"===c)}async function Y(a,b){let{target:c,mode:f}=b;if("hard"===f){if(await X(a))throw W.warn("git:danger:hard-reset-blocked",{operation:"reset",worktreePath:a,target:c,mode:f,timestamp:new Date().toISOString()}),new d.BN("Cannot hard-reset the default branch");W.warn("git:danger:hard-reset",{operation:"reset",worktreePath:a,target:c,mode:f,timestamp:new Date().toISOString()})}await (0,e.dX)(a,async()=>{await (0,e.rS)(["reset",`--${f}`,c,"--"],a,j.Ev)})}async function Z(a,b){let{commitHash:c,noCommit:d}=b;return W.warn("git:danger:revert",{operation:"revert",worktreePath:a,commitHash:c,noCommit:!0===d,timestamp:new Date().toISOString()}),(0,e.dX)(a,async()=>{let b=["revert"];return d&&b.push("--no-commit"),b.push(c,"--"),(0,e.mY)(b,a)})}var $=c(59082)}};
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(e,r,t,_){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:49,errorRate:1e-4,numBits:940,numHashes:14,bitArray:[0,1,1,0,e,r,r,e,r,r,r,r,r,e,r,e,e,e,r,r,r,r,e,r,r,r,e,e,e,e,r,e,r,r,e,e,e,e,e,r,e,r,r,e,e,e,e,r,e,e,e,e,r,r,e,e,e,e,e,e,r,e,e,e,r,r,r,r,e,r,r,r,e,r,e,e,r,r,r,r,r,e,r,r,r,e,r,r,r,r,r,r,e,r,e,e,e,e,r,r,r,r,r,r,e,r,e,e,e,r,r,r,r,e,r,e,e,r,e,r,r,e,r,r,e,r,r,r,r,r,r,r,r,e,r,e,r,r,e,e,r,r,r,r,e,e,e,e,r,r,e,r,e,e,r,e,r,e,e,r,e,r,r,r,r,e,e,r,r,e,e,e,r,r,e,e,e,e,r,r,e,e,r,r,r,r,e,e,r,e,r,e,r,r,r,e,e,e,r,e,e,r,e,r,r,e,e,e,r,e,r,e,r,e,r,e,r,r,e,r,e,r,r,r,e,r,r,r,r,e,e,r,r,r,e,e,r,r,r,r,r,r,r,e,e,e,r,e,r,e,e,r,e,r,r,r,e,e,r,e,e,e,e,e,e,r,e,r,r,r,e,e,r,r,r,e,r,r,r,e,e,r,r,r,e,e,e,r,e,e,e,r,e,e,e,r,e,e,r,e,e,e,r,r,e,e,r,e,r,e,e,e,e,e,r,r,e,r,r,r,e,e,e,r,r,r,r,r,e,r,e,r,e,r,e,e,r,r,r,r,r,e,e,e,e,e,e,e,r,r,e,e,e,r,e,r,e,r,r,e,e,r,e,e,r,r,r,r,r,e,r,e,e,r,e,r,r,r,e,e,e,r,e,e,e,e,e,r,e,e,r,e,e,e,e,r,e,e,e,r,e,e,e,r,r,r,r,e,e,e,r,e,r,r,e,e,r,r,e,r,e,r,r,r,e,r,e,r,e,r,r,r,e,e,r,e,e,e,e,e,e,e,r,r,r,e,r,e,e,r,r,e,e,e,e,e,e,r,e,e,e,r,e,r,e,e,e,r,r,e,r,e,e,r,r,r,r,r,r,r,r,r,e,r,e,e,e,r,r,r,r,e,e,r,r,r,e,r,e,r,e,r,r,e,e,e,r,e,r,r,r,e,e,r,e,e,r,e,r,e,r,r,e,r,e,e,r,r,e,e,r,e,e,e,e,e,r,r,e,r,e,r,e,e,e,r,e,r,r,e,r,r,e,r,e,r,r,e,r,e,e,e,e,e,r,r,r,r,e,r,e,e,e,r,r,r,r,r,e,r,e,r,r,r,r,e,r,r,e,r,e,e,e,e,r,e,e,r,e,e,e,e,r,r,r,e,r,e,r,r,r,e,r,r,e,e,r,e,e,e,e,e,e,e,e,e,e,e,e,r,r,r,r,e,r,r,r,r,e,r,e,e,e,r,e,r,r,e,e,e,e,e,r,r,r,r,r,e,e,e,r,e,e,r,r,r,e,e,r,r,r,e,r,r,e,r,e,e,e,e,e,e,e,e,r,e,r,e,e,r,r,r,r,r,r,e,e,r,e,e,r,e,e,r,e,e,e,e,e,r,r,e,e,r,e,e,r,e,r,r,e,e,e,e,e,e,r,e,e,e,r,e,r,r,r,r,r,e,r,r,r,e,e,r,r,e,r,e,r,e,e,e,e,e,r,e,e,r,e,e,e,e,e,r,r,e,r,r,e,r,e,e,e,e,r,r,r,e,e,e,r,r,e,e,e,r,r,r,r,e,r,e,r,e,r,r,r,e,r,e,e,e,r,e,e,e,r,r,r,r,r,r,r,r,e,e,r,r,r,r,e,r,r,r,r,e,r,e,r,e,e,r,r,r,e,r,e,e,r,e,r,r,e,r,r,r,e,r,r,r,r,r,e,r,e,e,r,e,e,r,e,e,r,r,e,r,e,r,e,e,r,r,r,r,r,r,e,e,e,e,e,e,r,e,r,r,r,r,e,e,r,e,r,e,e,r,e,e,e,e,r,r,e,e,e,r,r,e,e,r,r,r,r,r,r,e,r,e,e,e,e,e,r,e,r,r,r,r,e,e,r,e,e,e,e,e,r,e,e,e]},__routerFilterDynamic:{numItems:9,errorRate:1e-4,numBits:173,numHashes:14,bitArray:[e,r,e,e,r,r,e,e,e,r,r,e,e,e,e,r,e,e,e,e,e,r,e,r,r,e,r,e,e,e,r,e,e,e,r,e,e,e,r,r,r,e,e,e,e,r,e,e,e,e,e,e,e,r,r,e,r,r,r,r,e,r,e,r,e,e,r,r,e,e,r,e,e,e,r,e,r,r,r,r,r,e,r,r,r,e,e,e,e,r,e,e,r,e,r,r,e,e,e,r,e,r,r,e,e,r,e,r,e,r,r,r,r,r,r,e,r,r,e,r,e,e,e,e,r,r,e,r,r,r,r,r,r,e,r,r,r,r,r,e,r,e,r,e,e,e,e,r,e,r,e,e,r,r,e,e,e,e,e,e,e,r,r,e,r,e,e,r,r,e,r,e,e]},"/_error":["static/chunks/pages/_error-c970d8b55ace1b48.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4,14),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3418],{37381:(n,e,t)=>{t.d(e,{u:()=>c});var a=t(95155);t(12115);var r=t(23327),i=t(52056),o=t(77801),l=t(87531);let s={info:"bg-info-subtle border-info-border text-info-foreground",warning:"bg-warning-subtle border-warning-border text-warning-foreground",danger:"bg-danger-subtle border-danger-border text-danger-foreground",neutral:"bg-muted border-border text-muted-foreground"},L={info:r.A,warning:i.A,danger:o.A,neutral:r.A};function c(n){let{tone:e="neutral",children:t,className:r,"data-testid":i}=n,o=L[e];return(0,a.jsxs)("div",{"data-testid":i,className:(0,l.cn)("flex items-start gap-2 rounded-md border px-3 py-2 text-xs leading-relaxed",s[e],r),children:[(0,a.jsx)(o,{size:14,"aria-hidden":"true",className:"mt-0.5 shrink-0"}),(0,a.jsx)("div",{className:"min-w-0",children:t})]})}},75333:(n,e,t)=>{t.d(e,{Xz:()=>L,qW:()=>c,uE:()=>d});var a=t(95155);t(12115);var r=t(18955),i=t(77801),o=t(744),l=t(54014),s=t(95584);function L(n){let{status:e,className:t}=n,i=(0,r.c)("skills");return(0,a.jsx)(o.Ex,{variant:s.H$[e],className:t,"data-testid":"skill-compatibility-".concat(e),children:i(s.OV[e])})}function c(n){let{risk:e,className:t}=n,l=(0,r.c)("skills");return(0,a.jsxs)(o.Ex,{variant:s.eK[e],className:t,"data-testid":"skill-declared-risk-".concat(e),children:["high"===e&&(0,a.jsx)(i.A,{size:12,"aria-hidden":"true",className:"mr-1 shrink-0"}),l("risk.declaredLabel",{level:l(s.pP[e])})]})}function d(n){let{agent:e}=n,t=(0,r.c)("skills");return(0,a.jsxs)(o.Ex,{variant:s.Et[e.support],"data-testid":"skill-agent-".concat(e.agent,"-").concat(e.support),children:[(0,l.f_)(e.agent),": ",t((0,s.e5)(e.labelKey))]})}},80130:(n,e,t)=>{t.d(e,{Db:()=>c,E:()=>E,Gj:()=>d,Q6:()=>I,Xi:()=>u,hN:()=>p,s5:()=>L});let a="SKILL_CATALOG_UNREACHABLE",r="SKILL_REQUEST_FAILED";function i(n,e,t){let a=n&&"object"==typeof n?n:{},r={code:!function(n){if(!n||"object"!=typeof n)return!1;let{error:e,code:t}=n;return"string"==typeof e&&"string"==typeof t}(n)?t:n.code,message:"string"==typeof a.error?a.error:"",status:e};return Array.isArray(a.blockers)&&(r.blockers=a.blockers),"string"==typeof a.nextActionKey&&(r.nextActionKey=a.nextActionKey),r}async function o(n,e){let t=await fetch(n,{signal:e,headers:{Accept:"application/json"}}),r=await t.json().catch(()=>null);return t.ok?{ok:!0,data:r}:{ok:!1,failure:i(r,t.status,a)}}async function l(n,e,t){let a=await fetch(n,{method:"POST",signal:t,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}),o=await a.json().catch(()=>null);return a.ok?{ok:!0,data:o}:{ok:!1,failure:i(o,a.status,r)}}async function s(n,e,t){try{return await n()}catch(n){if(null==t?void 0:t.aborted)throw n;return{ok:!1,failure:{code:e,message:n instanceof Error?n.message:"",status:null}}}}function L(n){return s(()=>o("/api/skills",n),a,n)}function c(n,e){return s(()=>o("/api/skills/".concat(encodeURIComponent(n)),e),a,e)}function d(n,e){return s(()=>o("/api/worktrees/".concat(encodeURIComponent(n),"/skills"),e),r,e)}function _(n,e,t){return"/api/worktrees/".concat(encodeURIComponent(n),"/skills/").concat(encodeURIComponent(e),"/").concat(t)}function I(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i={};return t.version&&(i.version=t.version),t.acknowledgeRisk&&(i.acknowledgeRisk=!0),s(()=>l(_(n,e,"plan"),i,a),r,a)}function u(n,e,t,a){let i={planToken:t.planToken,version:t.version};return t.acknowledgeRisk&&(i.acknowledgeRisk=!0),t.idempotencyKey&&(i.idempotencyKey=t.idempotencyKey),s(()=>l(_(n,e,"install"),i,a),r,a)}function p(n,e,t){return s(()=>l(_(n,e,"uninstall-plan"),{},t),r,t)}function E(n,e,t,a){let i={planToken:t.planToken};return t.idempotencyKey&&(i.idempotencyKey=t.idempotencyKey),s(()=>l(_(n,e,"uninstall"),i,a),r,a)}},95584:(n,e,t)=>{t.d(e,{$d:()=>C,AJ:()=>h,AS:()=>c,Et:()=>l,FW:()=>S,H$:()=>a,IV:()=>R,KL:()=>d,Mj:()=>u,OV:()=>r,RG:()=>K,RO:()=>E,TE:()=>s,e5:()=>g,eK:()=>i,gh:()=>k,hJ:()=>p,kF:()=>I,pP:()=>o,pk:()=>m,r0:()=>D,tC:()=>L,z2:()=>_});let a={compatible:"success",incompatible:"error",unknown:"warning"},r={compatible:"compatibility.status.compatible",incompatible:"compatibility.status.incompatible",unknown:"compatibility.status.unknown"},i={low:"gray",moderate:"warning",high:"error"},o={low:"risk.level.low",moderate:"risk.level.moderate",high:"risk.level.high"},l={native:"success",commandmate_runtime:"info",unsupported:"error",unknown:"warning"},s={SKILL_RECOMMEND_HIGHEST_COMPATIBLE:"detail.recommendation.highestCompatible",SKILL_RECOMMEND_LATEST_UNVERIFIED:"detail.recommendation.latestUnverified",SKILL_RECOMMEND_NONE_COMPATIBLE:"detail.recommendation.noneCompatible",SKILL_RECOMMEND_NO_VERSIONS:"detail.recommendation.noVersions"},L={add:"info",modify:"warning",unchanged:"gray",conflict:"error",unmanaged:"error"},c={add:"plan.change.add",modify:"plan.change.modify",unchanged:"plan.change.unchanged",conflict:"plan.change.conflict",unmanaged:"plan.change.unmanaged"},d={SKILL_DIFF_NEW_FILE:"plan.diffReason.newFile",SKILL_DIFF_CONTENT_IDENTICAL:"plan.diffReason.contentIdentical",SKILL_DIFF_MANAGED_UPDATE:"plan.diffReason.managedUpdate",SKILL_DIFF_LOCAL_MODIFICATION:"plan.diffReason.localModification",SKILL_DIFF_UNMANAGED_SKILL:"plan.diffReason.unmanagedSkill",SKILL_DIFF_RECEIPT_ORPHAN:"plan.diffReason.receiptOrphan",SKILL_DIFF_NOT_A_REGULAR_FILE:"plan.diffReason.notARegularFile"},_={filesystem_read:"plan.permission.filesystemRead",filesystem_write:"plan.permission.filesystemWrite",network_access:"plan.permission.networkAccess",process_execution:"plan.permission.processExecution",environment_read:"plan.permission.environmentRead",credential_access:"plan.permission.credentialAccess"},I={attached:"plan.headState.attached",detached:"plan.headState.detached",unborn:"plan.headState.unborn",unknown:"plan.headState.unknown"},u={remove:"uninstall.disposition.remove",modified:"uninstall.disposition.modified",missing:"uninstall.disposition.missing",unknown:"uninstall.disposition.unknown",irregular:"uninstall.disposition.irregular"},p={SKILL_UNINSTALL_MANAGED_UNCHANGED:"uninstall.reason.managedUnchanged",SKILL_UNINSTALL_LOCAL_MODIFICATION:"uninstall.reason.localModification",SKILL_UNINSTALL_RECEIPT_ORPHAN:"uninstall.reason.receiptOrphan",SKILL_UNINSTALL_UNMANAGED_FILE:"uninstall.reason.unmanagedFile",SKILL_UNINSTALL_NOT_A_REGULAR_FILE:"uninstall.reason.notARegularFile",SKILL_UNINSTALL_NOT_INSTALLED:"uninstall.reason.notInstalled",SKILL_UNINSTALL_RECEIPT_MISSING:"uninstall.reason.receiptMissing",SKILL_UNINSTALL_RECEIPT_UNREADABLE:"uninstall.reason.receiptUnreadable",SKILL_UNINSTALL_RECEIPT_FOREIGN:"uninstall.reason.receiptForeign",SKILL_UNINSTALL_TREE_SCAN_TRUNCATED:"uninstall.reason.treeScanTruncated"},E={SKILL_PREVIEW_DETACHED_HEAD:"plan.warning.detachedHead",SKILL_PREVIEW_UNBORN_HEAD:"plan.warning.unbornHead",SKILL_PREVIEW_HEAD_UNRESOLVED:"plan.warning.headUnresolved",SKILL_PREVIEW_WORKING_TREE_DIRTY:"plan.warning.workingTreeDirty",SKILL_PREVIEW_PATH_GIT_IGNORED:"plan.warning.pathGitIgnored",SKILL_PREVIEW_DIFF_TRUNCATED:"plan.warning.diffTruncated",SKILL_PREVIEW_BINARY_CONTENT:"plan.warning.binaryContent",SKILL_PREVIEW_LINE_ENDING_CRLF:"plan.warning.lineEndingCrlf",SKILL_PREVIEW_TREE_SCAN_TRUNCATED:"plan.warning.treeScanTruncated"},N={SKILL_PLAN_STALE:"operation.error.planStale",SKILL_PLAN_EXPIRED:"operation.error.planExpired",SKILL_PLAN_CONSUMED:"operation.error.planConsumed",SKILL_PLAN_NOT_FOUND:"operation.error.planNotFound",SKILL_PLAN_BINDING_MISMATCH:"operation.error.planBindingMismatch",SKILL_PLAN_NOT_INSTALLABLE:"operation.error.planNotInstallable",SKILL_PLAN_RISK_NOT_ACKNOWLEDGED:"operation.error.planRiskNotAcknowledged",SKILL_INSTALL_LOCKED:"operation.error.installLocked",SKILL_INSTALL_IN_PROGRESS:"operation.error.installInProgress",SKILL_INSTALL_DESTINATION_EXISTS:"operation.error.installDestinationExists",SKILL_INSTALL_DESTINATION_UNMANAGED:"operation.error.installDestinationUnmanaged",SKILL_INSTALL_IDEMPOTENCY_CONFLICT:"operation.error.installIdempotencyConflict",SKILL_INSTALL_FAILED:"operation.error.installFailed",SKILL_UNINSTALL_LOCKED:"operation.error.uninstallLocked",SKILL_UNINSTALL_IN_PROGRESS:"operation.error.uninstallInProgress",SKILL_UNINSTALL_IDEMPOTENCY_CONFLICT:"operation.error.uninstallIdempotencyConflict",SKILL_UNINSTALL_NOT_INSTALLED:"operation.error.uninstallNotInstalled",SKILL_UNINSTALL_BLOCKED:"operation.error.uninstallBlocked",SKILL_UNINSTALL_DRIFT:"operation.error.uninstallDrift",SKILL_UNINSTALL_FILE_CHANGED:"operation.error.uninstallFileChanged",SKILL_UNINSTALL_FAILED:"operation.error.uninstallFailed",SKILL_REQUEST_FAILED:"operation.error.requestFailed"};function S(n){var e;return null!=(e=N[n])?e:"operation.error.unexpected"}let A={SKILL_CATALOG_FETCH_FAILED:"catalog.reason.fetchFailed",SKILL_CATALOG_RATE_LIMITED:"catalog.reason.rateLimited",SKILL_CATALOG_OVERSIZED:"catalog.reason.oversized",SKILL_CATALOG_MALFORMED:"catalog.reason.malformed",SKILL_CATALOG_INVALID_SCHEMA:"catalog.reason.invalidSchema"};function m(n){return n&&A[n]||"catalog.reason.unknown"}function g(n){return n.startsWith("skills.")?n.slice(7):n}let f=/!\[([^\]]*)\]\([^)]*\)/g,T=/<\/?(?:img|picture|source|video|audio|iframe|embed|object|track)\b[^>]*>/gi;function K(n){return n.replace(f,"$1").replace(T,"")}let R={query:"",compatibility:"all",risk:"all",agent:"all"};function k(n){var e,t;let a=n.versions.find(e=>e.version===n.recommendedVersion);return null!=(t=null==(e=null!=a?a:n.versions[0])?void 0:e.declaredRisk)?t:null}function D(n){let e=new Set;for(let t of n.versions)for(let n of t.compatibility.agents)("native"===n.support||"commandmate_runtime"===n.support)&&e.add(n.agent);return[...e].sort()}function C(n,e){return n.filter(n=>{var t;return!!function(n,e){let t=e.trim().toLowerCase();return 0===t.length||[n.name,n.summary,n.id,n.provider.name,...n.keywords].some(n=>n.toLowerCase().includes(t))}(n,e.query)&&("all"===e.compatibility||(null==(t=n.compatibility)?void 0:t.status)===e.compatibility)&&("all"===e.risk||k(n)===e.risk)&&("all"===e.agent||!!D(n).includes(e.agent))})}function h(n){let e=new Set;for(let t of n)for(let n of t.versions)for(let t of n.compatibility.agents)e.add(t.agent);return[...e].sort()}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9142],{24027:(e,t,l)=>{l.d(t,{Uc:()=>A,G8:()=>v,OJ:()=>C,RF:()=>R});var s=l(95155),n=l(12115),a=l(18955),r=l(51238),i=l(22133),o=l(89451),d=l(10934),c=l(92254),u=l(5225);l(1226);var x=l(89715),m=l(57828),p=l(52056),h=l(65229),g=l(67909),f=l(3005);let k=(0,g.default)(()=>Promise.all([l.e(221),l.e(7485),l.e(953)]).then(l.bind(l,90953)).then(e=>({default:e.MermaidDiagram})),{loadableGenerated:{webpack:()=>[90953]},ssr:!1,loading:function(){let e=(0,a.c)("worktree");return(0,s.jsxs)("div",{className:"mermaid-loading flex items-center gap-2 text-muted-foreground p-4",children:[(0,s.jsx)(f.y,{size:"sm"}),(0,s.jsx)("span",{children:e("mermaid.loading")})]})}});function j(e){let{className:t,children:l}=e;if(t&&t.split(" ").includes("language-mermaid")){let e=null==l?"":"string"==typeof l?l:Array.isArray(l)?l.map(e=>"string"==typeof e?e:"").join(""):String(l);return(0,s.jsx)(k,{code:e})}return(0,s.jsx)("code",{className:t,children:l})}var b=l(50666),y=l(69352),w=l(76246);function N(e){let{apiUrl:t,alt:l,width:r,height:i}=e,o=(0,a.c)("worktree"),[d,c]=(0,n.useState)(null);return((0,n.useEffect)(()=>{let e=!1;return fetch(t).then(e=>e.ok?e.json():null).then(t=>{!e&&(null==t?void 0:t.content)&&c(t.content)}).catch(()=>{}),()=>{e=!0}},[t]),d)?(0,s.jsx)("img",{src:d,alt:l,width:r,height:i,style:{maxWidth:r||"100%"}}):(0,s.jsx)("span",{style:{color:"#999"},children:o("markdownPreview.loadingImage")})}let v=(0,n.memo)(function(e){let{content:t,onOpenFile:l,currentFilePath:a,worktreeId:x}=e,m=(0,n.useRef)(l);m.current=l;let p=(0,n.useRef)(a);p.current=a;let h=(0,n.useRef)(x);h.current=x;let g=(0,n.useCallback)((e,t)=>{let l=(0,y.d3)(t);if(l)switch((0,y.dj)(l)){case"anchor":break;case"external":e.preventDefault(),window.open(l,"_blank","noopener,noreferrer");break;case"relative":{e.preventDefault();let t=p.current,s=m.current;if(t&&s){let e=(0,y.WU)(t,l);e&&s(e)}}}},[]),f=(0,n.useMemo)(()=>({code:j,pre:e=>{let{children:t}=e;return!function(e){let t=n.Children.toArray(e)[0];if(!n.isValidElement(t))return!1;let l=t.props.className;return"string"==typeof l&&l.split(" ").includes("language-mermaid")}(t)?(0,s.jsx)(b.Ck,{children:(0,s.jsx)("pre",{className:"overflow-x-auto",children:t})}):(0,s.jsx)("pre",{children:t})},img:e=>{var t,l,n,a;let{src:r,alt:i,width:o,height:d,...c}=e,u=null!=o?o:null==(l=c.node)||null==(t=l.properties)?void 0:t.width,x=null!=d?d:null==(a=c.node)||null==(n=a.properties)?void 0:n.height;if("string"==typeof r&&!r.startsWith("http://")&&!r.startsWith("https://")&&!r.startsWith("data:")){let e=p.current,t=h.current;if(e&&t){let l=(0,y.WU)(e,r);if(l){let e="/api/worktrees/".concat(t,"/files/").concat((0,w.o)(l));return(0,s.jsx)(N,{apiUrl:e,alt:null!=i?i:"",width:u,height:x})}}}return(0,s.jsx)("img",{src:r,alt:null!=i?i:"",width:u,height:x,style:{maxWidth:u||"100%"}})},a:e=>{let{href:t,children:l,...n}=e;return t?(0,s.jsx)("a",{...n,href:t,onClick:e=>g(e,t),children:l}):(0,s.jsx)("a",{...n,children:l})}}),[g]),k=(0,n.useMemo)(()=>[i.A],[]),v=(0,n.useMemo)(()=>[o.A,[d.A,y.uO],c.A,u.A],[]);return(0,s.jsx)(r.oz,{remarkPlugins:k,rehypePlugins:v,components:f,children:t})}),R=(0,n.memo)(function(e){let{mobileTab:t,onTabChange:l}=e,n=(0,a.c)("worktree");return(0,s.jsxs)("div",{className:"flex border-b border-border",children:[(0,s.jsxs)("button",{"data-testid":"mobile-tab-editor",onClick:()=>l("editor"),className:"flex-1 py-2 text-sm font-medium ".concat("editor"===t?"text-accent-600 dark:text-accent-400 border-b-2 border-accent-600 dark:border-accent-400":"text-muted-foreground"),children:[(0,s.jsx)(x.A,{className:"h-4 w-4 inline-block mr-1"}),n("markdownPreview.editor")]}),(0,s.jsxs)("button",{"data-testid":"mobile-tab-preview",onClick:()=>l("preview"),className:"flex-1 py-2 text-sm font-medium ".concat("preview"===t?"text-accent-600 dark:text-accent-400 border-b-2 border-accent-600 dark:border-accent-400":"text-muted-foreground"),children:[(0,s.jsx)(m.A,{className:"h-4 w-4 inline-block mr-1"}),n("markdownPreview.preview")]})]})}),C=(0,n.memo)(function(e){let{isMobile:t}=e,l=(0,a.c)("worktree");return(0,s.jsxs)("div",{"data-testid":"maximize-hint",className:"flex items-center justify-center px-4 py-1 bg-muted text-muted-foreground text-xs",children:[l("markdownPreview.exitFullscreenHint")," ",t&&l("markdownPreview.exitFullscreenHintSwipe")]})}),A=(0,n.memo)(function(e){let{onDismiss:t}=e,l=(0,a.c)("worktree");return(0,s.jsxs)("div",{"data-testid":"large-file-warning",className:"flex items-center gap-2 px-4 py-2 bg-warning-subtle border-b border-warning-border text-warning-foreground text-sm",children:[(0,s.jsx)(p.A,{className:"h-4 w-4"}),l("markdownPreview.largeFileWarning"),(0,s.jsx)("button",{onClick:t,className:"ml-auto text-warning hover:text-warning",children:(0,s.jsx)(h.A,{className:"h-4 w-4"})})]})})},34380:(e,t,l)=>{l.d(t,{B:()=>P});var s=l(95155),n=l(12115),a=l(18955),r=l(744),i=l(54014),o=l(74385),d=l(37381);function c(e){var t,l,s,n,a;let r=e.agentInstances&&e.agentInstances.length>0?e.agentInstances.map(e=>e.alias||e.cliTool):null!=(l=e.selectedAgents)?l:e.cliToolId?[e.cliToolId]:[];return{id:e.id,name:e.name,repositoryName:null!=(s=e.repositoryDisplayName)?s:e.repositoryName,syncedBranch:null!=(n=e.branch)?n:null,liveBranch:null!=(a=null==(t=e.gitStatus)?void 0:t.currentBranch)?a:null,dirty:e.gitStatus?e.gitStatus.isDirty:null,agents:[...new Set(r)],sessionRunning:!0===e.isSessionRunning}}let u={status:"loading",options:[]};async function x(e){let t=await fetch("/api/worktrees",{signal:e,headers:{Accept:"application/json"}});if(!t.ok)throw Error("HTTP ".concat(t.status));let l=await t.json(),s=null==l?void 0:l.worktrees;if(!Array.isArray(s))throw Error("Malformed worktree list");return s.map(c)}function m(e){let{selectedWorktreeId:t,onSelect:l,disabled:i=!1}=e,o=(0,a.c)("skills"),[c,m]=(0,n.useState)(u),[h,g]=(0,n.useState)(0);(0,n.useEffect)(()=>{let e=new AbortController;return m(u),x(e.signal).then(t=>{e.signal.aborted||m({status:"loaded",options:t})}).catch(()=>{e.signal.aborted||m({status:"error",options:[]})}),()=>e.abort()},[h]);let f=(0,n.useCallback)(()=>g(e=>e+1),[]);return"loading"===c.status?(0,s.jsxs)("div",{className:"space-y-2","data-testid":"skill-target-loading",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:o("target.loading")}),(0,s.jsx)(r.EA,{className:"h-24 w-full rounded-lg"})]}):"error"===c.status?(0,s.jsxs)(r.Zp,{className:"space-y-3","data-testid":"skill-target-error",children:[(0,s.jsx)(d.u,{tone:"danger",children:o("target.errorNotice")}),(0,s.jsx)(r.$n,{variant:"secondary",size:"sm",onClick:f,"data-testid":"skill-target-retry",children:o("target.retry")})]}):0===c.options.length?(0,s.jsx)(r.Zp,{"data-testid":"skill-target-empty",children:(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:o("target.empty")})}):(0,s.jsxs)("div",{className:"space-y-3","data-testid":"skill-target-selector",children:[(0,s.jsx)("div",{role:"radiogroup","aria-label":o("target.heading"),className:"space-y-2",children:c.options.map(e=>(0,s.jsx)(p,{option:e,selected:e.id===t,disabled:i,onSelect:l},e.id))}),(0,s.jsx)(d.u,{tone:"neutral","data-testid":"skill-target-branch-notice",children:o("target.branchFreshnessNotice")})]})}function p(e){var t;let{option:l,selected:n,disabled:i,onSelect:o}=e,d=(0,a.c)("skills"),c=null!=(t=l.liveBranch)?t:l.syncedBranch;return(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":n,disabled:i,onClick:()=>o(l.id),"data-testid":"skill-target-option-".concat(l.id),className:"w-full rounded-lg border px-3 py-2.5 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-60 ".concat(n?"border-accent-500 bg-accent-50 dark:bg-accent-950/40":"border-border bg-card hover:bg-muted"),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-foreground break-all",children:l.name}),n&&(0,s.jsx)(r.Ex,{variant:"info",children:d("target.selected")})]}),(0,s.jsxs)("dl",{className:"mt-1.5 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2",children:[(0,s.jsx)(h,{label:d("target.repository"),children:l.repositoryName}),(0,s.jsx)(h,{label:d("target.branch"),children:null!=c?c:d("target.branchUnknown")}),(0,s.jsx)(h,{label:d("target.agents"),children:l.agents.length>0?l.agents.join(", "):d("target.agentsNone")}),(0,s.jsx)(h,{label:d("target.workingTree"),children:d(null===l.dirty?"target.workingTreeUnknown":l.dirty?"target.workingTreeDirty":"target.workingTreeClean")})]}),l.sessionRunning&&(0,s.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground","data-testid":"skill-target-session-".concat(l.id),children:d("target.sessionRunning")})]})}function h(e){let{label:t,children:l}=e;return(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:t}),(0,s.jsx)("dd",{className:"text-xs text-foreground break-words",children:l})]})}var g=l(95584);function f(e){let{label:t,children:l}=e;return(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:t}),(0,s.jsx)("dd",{className:"mt-0.5 break-words text-sm text-foreground",children:l})]})}function k(e){let{level:t,kind:l,label:n}=e,i=(0,a.c)("skills");return(0,s.jsxs)(r.Ex,{variant:g.eK[t],"data-testid":"skill-plan-risk-".concat(l,"-").concat(t),children:[n,": ",i(g.pP[t])]})}function j(e){let{entry:t}=e,l=(0,a.c)("skills"),n=g.KL[t.reason];return(0,s.jsxs)("li",{className:"space-y-1.5 rounded-md border border-border px-3 py-2","data-testid":"skill-plan-file-".concat(t.path),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(r.Ex,{variant:g.tC[t.change],children:l(g.AS[t.change])}),(0,s.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:t.path}),t.generated&&(0,s.jsx)(r.Ex,{variant:"gray",children:l("plan.fileGenerated")})]}),n&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:l(n)}),t.gitIgnored&&(0,s.jsx)("p",{className:"text-xs text-warning-foreground",children:l("plan.gitIgnored")}),t.binary?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:l("plan.diffBinary")}):t.diff?(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{className:"cursor-pointer text-xs text-accent-600 dark:text-accent-400",children:l("plan.diffToggle",{additions:t.additions,deletions:t.deletions})}),(0,s.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-muted p-2 font-mono text-[11px] leading-snug text-foreground",children:t.diff}),t.diffTruncated&&(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l("plan.diffTruncated")})]}):null]})}function b(e){var t,l,n;let{plan:i}=e,o=(0,a.c)("skills"),{target:c,skill:u}=i,x=u.compatibility.commandmate;return(0,s.jsxs)(r.Zp,{className:"space-y-4","data-testid":"skill-install-plan",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:o("plan.heading")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:o("plan.expiresAt",{timestamp:i.expiresAt})})]}),(0,s.jsxs)("section",{className:"space-y-2",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o("plan.targetHeading")}),(0,s.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,s.jsx)(f,{label:o("target.repository"),children:c.repositoryName}),(0,s.jsx)(f,{label:o("target.heading"),children:c.worktreeName}),(0,s.jsx)(f,{label:o("target.branch"),children:null!=(t=c.branch)?t:o("target.branchUnknown")}),(0,s.jsx)(f,{label:o("plan.headStateLabel"),children:o(null!=(l=g.kF[c.headState])?l:"plan.headState.unknown")}),(0,s.jsx)(f,{label:o("target.workingTree"),children:c.workingTreeDirty?o("target.workingTreeDirty"):o("target.workingTreeClean")}),(0,s.jsx)(f,{label:o("plan.installRoot"),children:(0,s.jsx)("span",{className:"break-all font-mono text-xs",children:(c.installRoots&&c.installRoots.length>0?c.installRoots:[c.installRoot]).map(e=>(0,s.jsx)("span",{className:"block",children:e},e))})}),(0,s.jsx)(f,{label:o("plan.existingInstall"),children:c.existingInstall?o("plan.existingInstallVersion",{version:c.existingInstall.version}):o("plan.existingInstallNone")}),(0,s.jsx)(f,{label:o("detail.recommendedVersion"),children:(0,s.jsx)("span",{className:"font-mono text-xs",children:u.version})})]})]}),(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-risk-section",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o("plan.riskHeading")}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,s.jsx)(k,{level:u.declaredRisk,kind:"declared",label:o("plan.riskDeclared")}),(0,s.jsx)(k,{level:u.computedRisk,kind:"computed",label:o("plan.riskComputed")}),(0,s.jsx)(k,{level:u.effectiveRisk,kind:"effective",label:o("plan.riskEffective")})]}),(0,s.jsx)("p",{className:"break-words text-sm text-foreground",children:u.riskRationale}),(0,s.jsx)(d.u,{tone:"neutral",children:o("plan.riskNotice")})]}),(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-permissions",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o("permissions.heading")}),u.declaredPermissions.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:u.declaredPermissions.map(e=>(0,s.jsx)(r.Ex,{variant:"warning",children:g.z2[e]?o(g.z2[e]):e},e))}):(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:o("plan.permissionsNone")}),(0,s.jsx)(d.u,{tone:"warning",children:o("permissions.declarationOnlyNotice")})]}),(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-requirements",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o("requirements.heading")}),0===u.requirements.commands.length&&0===u.requirements.networkHosts.length?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:o("plan.requirementsNone")}):(0,s.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[u.requirements.commands.length>0&&(0,s.jsx)(f,{label:o("plan.requirementsCommands"),children:u.requirements.commands.map(e=>{var t;return"".concat(e.name," ").concat(null!=(t=e.versionRange)?t:o("plan.commandAnyVersion"))}).join(", ")}),u.requirements.networkHosts.length>0&&(0,s.jsx)(f,{label:o("plan.requirementsHosts"),children:u.requirements.networkHosts.join(", ")})]})]}),(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-scripts",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o("plan.scriptsHeading")}),0===u.executablePaths.length&&0===u.scriptPaths.length?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:o("plan.scriptsNone")}):(0,s.jsx)("ul",{className:"space-y-1",children:[...new Set([...u.scriptPaths,...u.executablePaths])].map(e=>(0,s.jsx)("li",{className:"break-all font-mono text-xs text-foreground",children:e},e))})]}),"compatible"!==x.status&&(0,s.jsx)(d.u,{tone:"warning","data-testid":"skill-plan-compatibility-notice",children:o((0,g.e5)(x.messageKey),{range:x.requiredRange,currentVersion:null!=(n=x.currentVersion)?n:""})}),i.warnings.length>0&&(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-warnings",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o("plan.warningsHeading")}),(0,s.jsx)("ul",{className:"space-y-1",children:i.warnings.map(e=>(0,s.jsx)("li",{className:"text-xs text-warning-foreground",children:g.RO[e]?o(g.RO[e]):e},e))})]}),(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-plan-files",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o("plan.filesHeading")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-plan-stats",children:o("plan.stats",{added:i.stats.added,modified:i.stats.modified,unchanged:i.stats.unchanged,conflicted:i.stats.conflicted,unmanaged:i.stats.unmanaged})}),0===i.files.length?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:o("plan.filesEmpty")}):(0,s.jsx)("ul",{className:"space-y-2",children:i.files.map(e=>(0,s.jsx)(j,{entry:e},e.path))})]}),i.blockers.length>0&&(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-install-blockers",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:o("plan.blockersHeading")}),(0,s.jsx)("ul",{className:"space-y-1",children:i.blockers.map(e=>{var t,l;return(0,s.jsxs)("li",{className:"text-xs text-danger-foreground",children:[e.path&&(0,s.jsx)("span",{className:"mr-1 break-all font-mono",children:e.path}),e.code.startsWith("skills.")?o((0,g.e5)(e.code),{range:x.requiredRange,currentVersion:null!=(t=x.currentVersion)?t:""}):g.KL[e.code]?o(g.KL[e.code]):e.code]},"".concat(e.code,":").concat(null!=(l=e.path)?l:""))})}),(0,s.jsx)(d.u,{tone:"danger",children:o("plan.blockedNotice")})]})]})}function y(e){let{entry:t}=e,l=(0,a.c)("skills"),n=g.Mj[t.disposition],i=g.hJ[t.reason];return(0,s.jsxs)("li",{className:"flex flex-wrap items-center gap-2","data-testid":"skill-uninstall-file-".concat(t.path),children:[(0,s.jsx)(r.Ex,{variant:"remove"===t.disposition?"info":"warning",children:n?l(n):t.disposition}),(0,s.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:t.path}),i&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:l(i)})]})}function w(e){var t;let{plan:l}=e,n=(0,a.c)("skills"),{target:o,skill:c}=l;return(0,s.jsxs)(r.Zp,{className:"space-y-4","data-testid":"skill-uninstall-plan",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:n("uninstall.heading")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:n("uninstall.expiresAt",{timestamp:l.expiresAt})})]}),(0,s.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,s.jsx)(f,{label:n("target.repository"),children:o.repositoryName}),(0,s.jsx)(f,{label:n("target.heading"),children:o.worktreeName}),(0,s.jsx)(f,{label:n("target.branch"),children:null!=(t=o.branch)?t:n("target.branchUnknown")}),(0,s.jsx)(f,{label:n("uninstall.installedVersion"),children:(0,s.jsx)("span",{className:"font-mono text-xs",children:c.version||n("uninstall.versionUnknown")})}),(0,s.jsx)(f,{label:n("plan.installRoot"),children:(0,s.jsx)("span",{className:"break-all font-mono text-xs",children:o.installRoot})}),(0,s.jsx)(f,{label:n("target.workingTree"),children:o.workingTreeDirty?n("target.workingTreeDirty"):n("target.workingTreeClean")})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-uninstall-stats",children:n("uninstall.stats",{removable:l.stats.removable,modified:l.stats.modified,missing:l.stats.missing,unknown:l.stats.unknown,irregular:l.stats.irregular})}),(0,s.jsxs)("section",{className:"space-y-2",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:n("uninstall.removalsHeading")}),0===l.removals.length?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:n("uninstall.removalsEmpty")}):(0,s.jsx)("ul",{className:"space-y-1.5",children:l.removals.map(e=>(0,s.jsx)(y,{entry:e},e.path))})]}),(0,s.jsxs)("section",{className:"space-y-2",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:n("uninstall.retainedHeading")}),0===l.retained.length?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:n("uninstall.retainedEmpty")}):(0,s.jsx)("ul",{className:"space-y-1.5",children:l.retained.map(e=>(0,s.jsx)(y,{entry:e},e.path))})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[l.skill.agents.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5","data-testid":"skill-uninstall-agents",children:l.skill.agents.map(e=>(0,s.jsx)(r.Ex,{variant:"gray",children:(0,i.f_)(e.agent)},e.agent))}),(0,s.jsx)(d.u,{tone:"neutral",children:n((0,g.e5)(l.nextActionKey))})]}),l.blockers.length>0&&(0,s.jsxs)("section",{className:"space-y-2","data-testid":"skill-uninstall-blockers",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-danger-foreground",children:n("uninstall.blockersHeading")}),(0,s.jsx)("ul",{className:"space-y-1",children:l.blockers.map(e=>{var t;return(0,s.jsxs)("li",{className:"text-xs text-danger-foreground",children:[e.path&&(0,s.jsx)("span",{className:"mr-1 break-all font-mono",children:e.path}),n((0,g.e5)(e.messageKey))]},"".concat(e.code,":").concat(null!=(t=e.path)?t:""))})})]})]})}var N=l(80130);let v={worktreeId:null,busy:null,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null};function R(e){return{...e,installPlan:null,uninstallPlan:null,installResult:null,uninstallResult:null,riskAcknowledged:!1,failure:null}}function C(e,t){return"".concat(e,"-").concat(t)}function A(e){let{failure:t}=e,l=(0,a.c)("skills");return(0,s.jsxs)("div",{className:"space-y-2","data-testid":"skill-operation-error",children:[(0,s.jsxs)(d.u,{tone:"danger",children:[(0,s.jsx)("p",{className:"font-medium",children:l("operation.errorHeading")}),(0,s.jsx)("p",{className:"mt-1",children:l((0,g.FW)(t.code))}),(0,s.jsx)("p",{className:"mt-1 break-words",children:l("state.errorCode",{code:t.code})})]}),t.nextActionKey&&(0,s.jsx)(d.u,{tone:"warning",children:l((0,g.e5)(t.nextActionKey))}),t.blockers&&t.blockers.length>0&&(0,s.jsx)("ul",{className:"space-y-1","data-testid":"skill-operation-error-blockers",children:t.blockers.map(e=>{var t;return(0,s.jsxs)("li",{className:"text-xs text-danger-foreground",children:[e.path&&(0,s.jsx)("span",{className:"mr-1 break-all font-mono",children:e.path}),l((0,g.e5)(e.messageKey))]},"".concat(e.code,":").concat(null!=(t=e.path)?t:""))})})]})}function I(e){let{agents:t,skillId:l,version:n}=e,r=(0,a.c)("skills");return 0===t.length?null:(0,s.jsxs)("div",{className:"space-y-1","data-testid":"skill-operation-reload",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:r("operation.reloadHeading")}),(0,s.jsx)("ul",{className:"space-y-1",children:t.map(e=>(0,s.jsx)("li",{className:"text-xs text-muted-foreground",children:r((0,g.e5)(e.messageKey),{agent:(0,i.f_)(e.agent),skillId:l,version:n})},e.agent))})]})}function P(e){var t;let{skillId:l,version:i,blockedReason:c,worktreeId:u}=e,x=(0,a.c)("skills"),[p,h]=(0,n.useState)(()=>u?{...v,worktreeId:u}:v),f=(0,n.useCallback)(e=>{h(t=>t.worktreeId===e?t:R({...t,worktreeId:e,busy:null}))},[]);(0,n.useEffect)(()=>{u&&f(u)},[u,f]);let k=(0,n.useCallback)(async()=>{let e=p.worktreeId;if(!e)return;h(e=>({...R(e),busy:"install-plan"}));let t=await (0,N.Q6)(e,l,{version:null!=i?i:void 0});h(e=>({...e,busy:null,installPlan:t.ok?t.data.plan:null,failure:t.ok?null:t.failure}))},[l,p.worktreeId,i]),j=(0,n.useCallback)(async()=>{let e=p.worktreeId,t=p.installPlan;if(!e||!t||t.requiresRiskAcknowledgement&&!p.riskAcknowledged)return;h(e=>({...e,busy:"install-apply",failure:null}));let s=await (0,N.Xi)(e,l,{planToken:t.token,version:t.skill.version,acknowledgeRisk:!!t.requiresRiskAcknowledgement||void 0,idempotencyKey:C("skill-install",t.token)});s.ok&&(0,o.k)(e),h(e=>({...e,busy:null,installPlan:s.ok?null:e.installPlan,installResult:s.ok?s.data:null,failure:s.ok?null:s.failure}))},[l,p.installPlan,p.riskAcknowledged,p.worktreeId]),y=(0,n.useCallback)(async()=>{let e=p.worktreeId;if(!e)return;h(e=>({...R(e),busy:"uninstall-plan"}));let t=await (0,N.hN)(e,l);h(e=>({...e,busy:null,uninstallPlan:t.ok?t.data.plan:null,failure:t.ok?null:t.failure}))},[l,p.worktreeId]),P=(0,n.useCallback)(async()=>{let e=p.worktreeId,t=p.uninstallPlan;if(!e||!t)return;h(e=>({...e,busy:"uninstall-apply",failure:null}));let s=await (0,N.E)(e,l,{planToken:t.token,idempotencyKey:C("skill-uninstall",t.token)});h(e=>({...e,busy:null,uninstallPlan:s.ok?null:e.uninstallPlan,uninstallResult:s.ok?s.data:null,failure:s.ok?null:s.failure}))},[l,p.uninstallPlan,p.worktreeId]),T=(0,n.useCallback)(()=>{h(e=>R(e))},[]),E=null!==p.busy,H=p.installPlan,S=p.uninstallPlan,W=null!=c?c:x(p.worktreeId?"plan.ready":"plan.chooseTarget"),q=null!==H&&H.requiresRiskAcknowledgement&&!p.riskAcknowledged;return(0,s.jsxs)("div",{className:"space-y-3","data-testid":"skill-install-panel",children:[!u&&(0,s.jsx)(m,{selectedWorktreeId:p.worktreeId,onSelect:f,disabled:E}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(r.$n,{variant:"primary",disabled:E||null!==c||!p.worktreeId,onClick:k,"data-testid":"skill-install-action","aria-describedby":"skill-install-reason",children:x("install-plan"===p.busy?"plan.building":"plan.build")}),(0,s.jsx)(r.$n,{variant:"secondary",disabled:E||!p.worktreeId,onClick:y,"data-testid":"skill-uninstall-action",children:x("uninstall-plan"===p.busy?"uninstall.building":"uninstall.build")})]}),(0,s.jsx)("p",{id:"skill-install-reason",className:"text-sm text-muted-foreground","data-testid":"skill-install-reason",children:W}),p.failure&&(0,s.jsx)(A,{failure:p.failure}),H&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(b,{plan:H}),H.requiresRiskAcknowledgement&&(0,s.jsxs)(r.Zp,{className:"space-y-3","data-testid":"skill-install-risk-acknowledgement",children:[(0,s.jsx)(d.u,{tone:"danger",children:x((0,g.e5)(null!=(t=H.riskAcknowledgementMessageKey)?t:"skills.plan.highRiskAcknowledgement"))}),(0,s.jsxs)("label",{className:"flex items-start gap-2 text-sm text-foreground",children:[(0,s.jsx)(r.Sc,{checked:p.riskAcknowledged,onCheckedChange:e=>h(t=>({...t,riskAcknowledged:!0===e})),disabled:E,"data-testid":"skill-install-risk-checkbox",className:"mt-0.5"}),(0,s.jsx)("span",{children:x("plan.acknowledgeLabel")})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(r.$n,{variant:H.requiresRiskAcknowledgement?"danger":"primary",disabled:E||!H.installable||q,onClick:j,"data-testid":"skill-install-confirm",children:x("install-apply"===p.busy?"plan.confirming":"plan.confirm")}),(0,s.jsx)(r.$n,{variant:"ghost",disabled:E,onClick:T,"data-testid":"skill-install-discard",children:x("plan.discard")})]})]}),S&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(w,{plan:S}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(r.$n,{variant:"danger",disabled:E||!S.removable,onClick:P,"data-testid":"skill-uninstall-confirm",children:x("uninstall-apply"===p.busy?"uninstall.confirming":"uninstall.confirm")}),(0,s.jsx)(r.$n,{variant:"ghost",disabled:E,onClick:T,"data-testid":"skill-uninstall-discard",children:x("plan.discard")})]})]}),p.installResult&&(0,s.jsxs)(r.Zp,{className:"space-y-3","data-testid":"skill-install-result",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:x("operation.installedHeading")}),(0,s.jsx)(d.u,{tone:"info",children:x((0,g.e5)(p.installResult.operation.nextActionKey))}),p.installResult.operation.replayed&&(0,s.jsx)(d.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:x("operation.replayNotice")}),p.installResult.install&&"files"in p.installResult.install&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:x("operation.filesWritten",{count:p.installResult.install.files.length})}),"reload"in p.installResult&&(0,s.jsx)(I,{agents:p.installResult.reload.agents,skillId:p.installResult.reload.skillId,version:p.installResult.reload.version}),(0,s.jsx)(r.$n,{variant:"secondary",size:"sm",onClick:T,"data-testid":"skill-operation-reset",children:x("operation.startOver")})]}),p.uninstallResult&&(0,s.jsxs)(r.Zp,{className:"space-y-3","data-testid":"skill-uninstall-result",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:x("operation.uninstalledHeading")}),(0,s.jsx)(d.u,{tone:"info",children:x((0,g.e5)(p.uninstallResult.operation.nextActionKey))}),p.uninstallResult.operation.replayed&&(0,s.jsx)(d.u,{tone:"neutral","data-testid":"skill-operation-replayed",children:x("operation.replayNotice")}),p.uninstallResult.uninstall&&"removedFiles"in p.uninstallResult.uninstall&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:x("operation.filesRemoved",{count:p.uninstallResult.uninstall.removedFiles.length})}),"reload"in p.uninstallResult&&(0,s.jsx)(I,{agents:p.uninstallResult.reload.agents,skillId:p.uninstallResult.reload.skillId,version:p.uninstallResult.reload.version}),(0,s.jsx)(r.$n,{variant:"secondary",size:"sm",onClick:T,"data-testid":"skill-operation-reset",children:x("operation.startOver")})]})]})}},50666:(e,t,l)=>{l.d(t,{Ck:()=>r});var s=l(95155),n=l(12115),a=l(53482);function r(e){let{children:t,as:l="div",className:r=""}=e,i=function e(t){return null==t||"boolean"==typeof t?"":"string"==typeof t?t:"number"==typeof t?String(t):Array.isArray(t)?t.map(e).join(""):n.isValidElement(t)?e(t.props.children):""}(t);if(!i||0===i.trim().length)return(0,s.jsx)(l,{className:r||void 0,children:t});let o="relative group ".concat("span"===l?"block ":"").concat(r).trim();return(0,s.jsxs)(l,{className:o,"data-testid":"code-block-with-copy",children:[t,(0,s.jsx)(a.i,{text:i,className:"absolute right-2 top-2 z-10 opacity-100 md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100 focus:opacity-100"})]})}},53482:(e,t,l)=>{l.d(t,{i:()=>d});var s=l(95155),n=l(12115),a=l(60322),r=l(9900);function i(){return(0,s.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function o(){return(0,s.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function d(e){let{text:t,className:l="",label:d="Copy"}=e,[c,u]=(0,n.useState)(!1),x=(0,n.useRef)(null);(0,n.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let m=(0,n.useCallback)(async()=>{try{await (0,a.l)(t),u(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>u(!1),r.s7)}catch(e){}},[t]);return(0,s.jsxs)("button",{type:"button",onClick:m,className:"inline-flex items-center gap-1 rounded border border-border bg-surface px-2 py-0.5 text-[11px] font-medium text-foreground transition-colors hover:bg-muted ".concat(l),"aria-label":c?"Copied":d,title:c?"Copied!":d,children:[c?(0,s.jsx)(o,{}):(0,s.jsx)(i,{}),(0,s.jsx)("span",{children:c?"Copied":d})]})}},60322:(e,t,l)=>{l.d(t,{l:()=>n});let s=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function n(e){var t;if(!e||0===e.trim().length)return;let l=e.replace(s,"");if(null==(t=navigator.clipboard)?void 0:t.writeText)try{await navigator.clipboard.writeText(l);return}catch(e){}let n=document.createElement("textarea");n.value=l,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}finally{document.body.removeChild(n)}}},69352:(e,t,l)=>{l.d(t,{WU:()=>d,d3:()=>c,dj:()=>o,uO:()=>u});var s,n,a,r,i=l(9567);function o(e){return e.startsWith("#")?"anchor":e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:")?"external":"relative"}function d(e,t){if(!t)return null;let l=e.substring(0,e.lastIndexOf("/")+1);try{let e=new URL(l,"file:///"),s=new URL(t,e),n=decodeURIComponent(s.pathname);if(n.startsWith("/")){let e=n.substring(1);if(e.length>0)return e}}catch(e){}return null}function c(e){return!e||0===e.length||e.length>2048||/[\x00-\x1f\x7f]/.test(e)?null:e}let u={...i.j,attributes:{...i.j.attributes,a:[...(null!=(a=null==(s=i.j.attributes)?void 0:s.a)?a:[]).filter(e=>"href"!==e),["href",/^(?:#|mailto:|tel:|https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/]],img:[...(null!=(r=null==(n=i.j.attributes)?void 0:n.img)?r:[]).filter(e=>"src"!==e),["src",/^(?:https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/],"alt","width","height"]}}},74385:(e,t,l)=>{l.d(t,{I:()=>s,k:()=>n});let s="skill:installed";function n(e){window.dispatchEvent(new CustomEvent(s,{detail:{worktreeId:e}}))}},76246:(e,t,l)=>{l.d(t,{o:()=>s});function s(e){return e?e.split("/").map(encodeURIComponent).join("/"):""}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,890,960,1099,1123,1164,1274,1295,1310,1317,1337,1360,1421,1437,1490,1517,1523,1652,1745,2046,2117,2149,2360,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4476,4594,4614,4748,4767,4779,4907,4961,4985,5286,5580,5683,6140,6194,6248,6393,6680,6734,6824,6839,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,890,960,1099,1123,1164,1274,1295,1310,1317,1337,1360,1421,1437,1490,1517,1523,1652,1745,2046,2117,2149,2360,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4476,4594,4614,4748,4767,4779,4907,4961,4985,5286,5580,5683,6140,6194,6248,6393,6680,6734,6824,6839,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,890,960,1099,1123,1164,1274,1295,1310,1317,1337,1360,1421,1437,1490,1517,1523,1652,1745,2046,2117,2149,2360,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4476,4594,4614,4748,4767,4779,4907,4961,4985,5286,5580,5683,6140,6194,6248,6393,6680,6734,6824,6839,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,219,263,341,532,890,960,1099,1123,1164,1274,1295,1310,1317,1337,1360,1421,1437,1490,1517,1523,1652,1745,2046,2117,2149,2360,2852,2893,3002,3175,3298,3350,3657,3685,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4260,4476,4594,4614,4748,4767,4779,4907,4961,4985,5286,5580,5683,6140,6194,6248,6393,6680,6734,6824,6839,7345,7435,7473,7509,7560,7670,7758,7760,7870,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9457,9549,9792,9932,9946,9968,9996],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);