commandmate 0.11.4 → 0.12.1

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 (602) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +406 -314
  3. package/.next/app-path-routes-manifest.json +35 -26
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +15 -15
  6. package/.next/react-loadable-manifest.json +8 -6
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/routes-manifest.json +66 -0
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update-check/route.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/daily-summary/route.js +1 -1
  25. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  26. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  28. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  29. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  36. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  40. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  42. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/skills/[id]/route.js +1 -0
  52. package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -0
  53. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -0
  54. package/.next/server/app/api/skills/route.js +1 -0
  55. package/.next/server/app/api/skills/route.js.nft.json +1 -0
  56. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  57. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/todos/route.js +1 -1
  61. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  65. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  67. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  70. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  72. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js.nft.json +1 -1
  76. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js.nft.json +1 -1
  79. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +1 -1
  82. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js.nft.json +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/commit/route.js.nft.json +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js.nft.json +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +1 -1
  97. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/git/pull/route.js.nft.json +1 -1
  100. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/git/push/route.js.nft.json +1 -1
  103. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/git/reset/route.js.nft.json +1 -1
  106. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/git/revert/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/stage/route.js.nft.json +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js.nft.json +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js.nft.json +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js.nft.json +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  161. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  171. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -0
  173. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -0
  174. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -0
  175. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -0
  176. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -0
  177. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -0
  178. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -0
  179. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -0
  180. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -0
  181. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -0
  182. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -0
  183. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -0
  184. package/.next/server/app/api/worktrees/[id]/skills/route.js +23 -0
  185. package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +1 -0
  186. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -0
  187. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/chat/page.js +2 -2
  209. package/.next/server/app/chat/page.js.nft.json +1 -1
  210. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  211. package/.next/server/app/login/page.js.nft.json +1 -1
  212. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  213. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/more/page.js +2 -2
  215. package/.next/server/app/more/page.js.nft.json +1 -1
  216. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  217. package/.next/server/app/offline/page.js.nft.json +1 -1
  218. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  219. package/.next/server/app/page.js +1 -1
  220. package/.next/server/app/page.js.nft.json +1 -1
  221. package/.next/server/app/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/repositories/page.js +1 -1
  224. package/.next/server/app/repositories/page.js.nft.json +1 -1
  225. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/review/page.js +1 -1
  227. package/.next/server/app/review/page.js.nft.json +1 -1
  228. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  229. package/.next/server/app/sessions/page.js +1 -1
  230. package/.next/server/app/sessions/page.js.nft.json +1 -1
  231. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  232. package/.next/server/app/skills/[skillId]/page.js +2 -0
  233. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -0
  234. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -0
  235. package/.next/server/app/skills/page.js +2 -0
  236. package/.next/server/app/skills/page.js.nft.json +1 -0
  237. package/.next/server/app/skills/page_client-reference-manifest.js +1 -0
  238. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
  239. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +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 +9 -9
  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.js +3 -3
  245. package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
  246. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  247. package/.next/server/app-paths-manifest.json +35 -26
  248. package/.next/server/chunks/1117.js +1 -1
  249. package/.next/server/chunks/120.js +1 -0
  250. package/.next/server/chunks/1808.js +1 -0
  251. package/.next/server/chunks/186.js +1 -0
  252. package/.next/server/chunks/2119.js +1 -1
  253. package/.next/server/chunks/22.js +1 -0
  254. package/.next/server/chunks/2328.js +1 -0
  255. package/.next/server/chunks/2445.js +1 -1
  256. package/.next/server/chunks/3042.js +2 -0
  257. package/.next/server/chunks/3543.js +1 -1
  258. package/.next/server/chunks/3708.js +1 -0
  259. package/.next/server/chunks/3945.js +1 -1
  260. package/.next/server/chunks/5064.js +1 -0
  261. package/.next/server/chunks/5226.js +28 -0
  262. package/.next/server/chunks/5306.js +2 -0
  263. package/.next/server/chunks/5312.js +1 -0
  264. package/.next/server/chunks/5326.js +1 -0
  265. package/.next/server/chunks/5381.js +1 -1
  266. package/.next/server/chunks/5456.js +1 -0
  267. package/.next/server/chunks/5571.js +1 -1
  268. package/.next/server/chunks/5959.js +3 -3
  269. package/.next/server/chunks/6065.js +1 -0
  270. package/.next/server/chunks/6130.js +1 -0
  271. package/.next/server/chunks/6283.js +1 -1
  272. package/.next/server/chunks/6285.js +1 -1
  273. package/.next/server/chunks/646.js +6 -6
  274. package/.next/server/chunks/{9968.js → 7587.js} +1 -1
  275. package/.next/server/chunks/8584.js +1 -0
  276. package/.next/server/chunks/8681.js +1 -1
  277. package/.next/server/chunks/8807.js +950 -804
  278. package/.next/server/chunks/9123.js +1 -1
  279. package/.next/server/middleware-build-manifest.js +1 -1
  280. package/.next/server/middleware-manifest.json +5 -5
  281. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  282. package/.next/server/pages/500.html +1 -1
  283. package/.next/server/server-reference-manifest.json +1 -1
  284. package/.next/static/ZYti9g9gICKnjtmkfvvB2/_buildManifest.js +1 -0
  285. package/.next/static/chunks/1668-7484081c45a44f89.js +1 -0
  286. package/.next/static/chunks/3418-7e47651340d940b0.js +1 -0
  287. package/.next/static/chunks/4027-0c529b322be7d4d8.js +1 -0
  288. package/.next/static/chunks/{4560-64b1461fd996127a.js → 4560-04e5aebcab96bfa1.js} +1 -1
  289. package/.next/static/chunks/6007-de36119357dcd418.js +1 -0
  290. package/.next/static/chunks/{6488-76295bf0184b101f.js → 6488-624d4b6d2d4cc236.js} +1 -1
  291. package/.next/static/chunks/{8965-872d8de254196cec.js → 6497-dc26c6c6b0b15adf.js} +1 -1
  292. package/.next/static/chunks/790-d8e6acd26e03679c.js +1 -0
  293. package/.next/static/chunks/8361.4bf062be2d2962f4.js +1 -0
  294. package/.next/static/chunks/app/api/app/update/route-56dad0523d3c4a92.js +1 -0
  295. package/.next/static/chunks/app/api/app/update-check/route-56dad0523d3c4a92.js +1 -0
  296. package/.next/static/chunks/app/api/assistant/conversation/route-56dad0523d3c4a92.js +1 -0
  297. package/.next/static/chunks/app/api/assistant/current-output/route-56dad0523d3c4a92.js +1 -0
  298. package/.next/static/chunks/app/api/assistant/messages/route-56dad0523d3c4a92.js +1 -0
  299. package/.next/static/chunks/app/api/assistant/session/route-56dad0523d3c4a92.js +1 -0
  300. package/.next/static/chunks/app/api/assistant/start/route-56dad0523d3c4a92.js +1 -0
  301. package/.next/static/chunks/app/api/assistant/terminal/route-56dad0523d3c4a92.js +1 -0
  302. package/.next/static/chunks/app/api/assistant/tools/route-56dad0523d3c4a92.js +1 -0
  303. package/.next/static/chunks/app/api/auth/login/route-56dad0523d3c4a92.js +1 -0
  304. package/.next/static/chunks/app/api/auth/logout/route-56dad0523d3c4a92.js +1 -0
  305. package/.next/static/chunks/app/api/auth/status/route-56dad0523d3c4a92.js +1 -0
  306. package/.next/static/chunks/app/api/daily-summary/route-56dad0523d3c4a92.js +1 -0
  307. package/.next/static/chunks/app/api/daily-summary/status/route-56dad0523d3c4a92.js +1 -0
  308. package/.next/static/chunks/app/api/external-apps/[id]/health/route-56dad0523d3c4a92.js +1 -0
  309. package/.next/static/chunks/app/api/external-apps/[id]/route-56dad0523d3c4a92.js +1 -0
  310. package/.next/static/chunks/app/api/external-apps/route-56dad0523d3c4a92.js +1 -0
  311. package/.next/static/chunks/app/api/hooks/claude-done/route-56dad0523d3c4a92.js +1 -0
  312. package/.next/static/chunks/app/api/ollama/models/route-56dad0523d3c4a92.js +1 -0
  313. package/.next/static/chunks/app/api/push/subscriptions/route-56dad0523d3c4a92.js +1 -0
  314. package/.next/static/chunks/app/api/push/vapid/route-56dad0523d3c4a92.js +1 -0
  315. package/.next/static/chunks/app/api/repositories/[id]/route-56dad0523d3c4a92.js +1 -0
  316. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
  317. package/.next/static/chunks/app/api/repositories/[id]/todos/route-56dad0523d3c4a92.js +1 -0
  318. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-56dad0523d3c4a92.js +1 -0
  319. package/.next/static/chunks/app/api/repositories/clone/route-56dad0523d3c4a92.js +1 -0
  320. package/.next/static/chunks/app/api/repositories/excluded/route-56dad0523d3c4a92.js +1 -0
  321. package/.next/static/chunks/app/api/repositories/restore/route-56dad0523d3c4a92.js +1 -0
  322. package/.next/static/chunks/app/api/repositories/route-56dad0523d3c4a92.js +1 -0
  323. package/.next/static/chunks/app/api/repositories/scan/route-56dad0523d3c4a92.js +1 -0
  324. package/.next/static/chunks/app/api/repositories/sync/route-56dad0523d3c4a92.js +1 -0
  325. package/.next/static/chunks/app/api/sidebar/group-order/route-56dad0523d3c4a92.js +1 -0
  326. package/.next/static/chunks/app/api/skills/[id]/route-56dad0523d3c4a92.js +1 -0
  327. package/.next/static/chunks/app/api/skills/route-56dad0523d3c4a92.js +1 -0
  328. package/.next/static/chunks/app/api/slash-commands/route-56dad0523d3c4a92.js +1 -0
  329. package/.next/static/chunks/app/api/templates/[id]/route-56dad0523d3c4a92.js +1 -0
  330. package/.next/static/chunks/app/api/templates/route-56dad0523d3c4a92.js +1 -0
  331. package/.next/static/chunks/app/api/todos/route-56dad0523d3c4a92.js +1 -0
  332. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-56dad0523d3c4a92.js +1 -0
  333. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-56dad0523d3c4a92.js +1 -0
  334. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-56dad0523d3c4a92.js +1 -0
  335. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-56dad0523d3c4a92.js +1 -0
  336. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-56dad0523d3c4a92.js +1 -0
  337. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-56dad0523d3c4a92.js +1 -0
  338. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-56dad0523d3c4a92.js +1 -0
  339. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-56dad0523d3c4a92.js +1 -0
  340. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-56dad0523d3c4a92.js +1 -0
  341. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-56dad0523d3c4a92.js +1 -0
  342. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-56dad0523d3c4a92.js +1 -0
  343. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-56dad0523d3c4a92.js +1 -0
  344. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-56dad0523d3c4a92.js +1 -0
  345. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-56dad0523d3c4a92.js +1 -0
  346. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-56dad0523d3c4a92.js +1 -0
  347. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-56dad0523d3c4a92.js +1 -0
  348. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-56dad0523d3c4a92.js +1 -0
  349. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-56dad0523d3c4a92.js +1 -0
  350. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-56dad0523d3c4a92.js +1 -0
  351. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-56dad0523d3c4a92.js +1 -0
  352. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-56dad0523d3c4a92.js +1 -0
  353. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-56dad0523d3c4a92.js +1 -0
  354. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-56dad0523d3c4a92.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-56dad0523d3c4a92.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-56dad0523d3c4a92.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-56dad0523d3c4a92.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-56dad0523d3c4a92.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-56dad0523d3c4a92.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-56dad0523d3c4a92.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-56dad0523d3c4a92.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-56dad0523d3c4a92.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-56dad0523d3c4a92.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-56dad0523d3c4a92.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-56dad0523d3c4a92.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-56dad0523d3c4a92.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-56dad0523d3c4a92.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-56dad0523d3c4a92.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-56dad0523d3c4a92.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-56dad0523d3c4a92.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-56dad0523d3c4a92.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-56dad0523d3c4a92.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/route-56dad0523d3c4a92.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-56dad0523d3c4a92.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-56dad0523d3c4a92.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-56dad0523d3c4a92.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/search/route-56dad0523d3c4a92.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/send/route-56dad0523d3c4a92.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-56dad0523d3c4a92.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-56dad0523d3c4a92.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-56dad0523d3c4a92.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-56dad0523d3c4a92.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-56dad0523d3c4a92.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-56dad0523d3c4a92.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-56dad0523d3c4a92.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-56dad0523d3c4a92.js +1 -0
  387. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-56dad0523d3c4a92.js +1 -0
  388. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-56dad0523d3c4a92.js +1 -0
  389. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-56dad0523d3c4a92.js +1 -0
  390. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
  391. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-56dad0523d3c4a92.js +1 -0
  392. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-56dad0523d3c4a92.js +1 -0
  393. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-56dad0523d3c4a92.js +1 -0
  394. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-56dad0523d3c4a92.js +1 -0
  395. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-56dad0523d3c4a92.js +1 -0
  396. package/.next/static/chunks/app/api/worktrees/route-56dad0523d3c4a92.js +1 -0
  397. package/.next/static/chunks/app/chat/{page-9ed2ffd98eb4ae18.js → page-9cf4ba62e21d9074.js} +1 -1
  398. package/.next/static/chunks/app/manifest.webmanifest/route-56dad0523d3c4a92.js +1 -0
  399. package/.next/static/chunks/app/more/{page-a496425bba427b48.js → page-082d4ae496f9a36e.js} +1 -1
  400. package/.next/static/chunks/app/{page-15bfd76bcf65842d.js → page-af457ca5876ed616.js} +1 -1
  401. package/.next/static/chunks/app/proxy/[...path]/route-56dad0523d3c4a92.js +1 -0
  402. package/.next/static/chunks/app/repositories/{page-d214522ab8792ce7.js → page-75f0d70452c6b6c0.js} +1 -1
  403. package/.next/static/chunks/app/review/{page-1dadf0b5d7129598.js → page-f431d630097c2e85.js} +1 -1
  404. package/.next/static/chunks/app/sessions/{page-96f007d986c5f327.js → page-20f07a99db64d2ca.js} +1 -1
  405. package/.next/static/chunks/app/skills/[skillId]/page-68ed5e9186efe56d.js +1 -0
  406. package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +1 -0
  407. package/.next/static/chunks/app/worktrees/[id]/page-7dd929bfc978742e.js +1 -0
  408. package/.next/static/chunks/app/worktrees/[id]/terminal/page-a75fe180a7233b2b.js +1 -0
  409. package/.next/static/chunks/webpack-0f9275e279c058eb.js +1 -0
  410. package/.next/static/css/b4bdb1f3457fe9a7.css +1 -0
  411. package/.next/trace +11 -10
  412. package/.next/types/app/api/skills/[id]/route.ts +347 -0
  413. package/.next/types/app/api/skills/route.ts +347 -0
  414. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/install/route.ts +347 -0
  415. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/plan/route.ts +347 -0
  416. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.ts +347 -0
  417. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.ts +347 -0
  418. package/.next/types/app/api/worktrees/[id]/skills/route.ts +347 -0
  419. package/.next/types/app/skills/[skillId]/page.ts +84 -0
  420. package/.next/types/app/skills/page.ts +84 -0
  421. package/.next/types/routes.d.ts +11 -2
  422. package/.next/types/validator.ts +81 -0
  423. package/dist/cli/commands/skill-format.d.ts +28 -0
  424. package/dist/cli/commands/skill-format.d.ts.map +1 -0
  425. package/dist/cli/commands/skill-format.js +163 -0
  426. package/dist/cli/commands/skill-guards.d.ts +53 -0
  427. package/dist/cli/commands/skill-guards.d.ts.map +1 -0
  428. package/dist/cli/commands/skill-guards.js +188 -0
  429. package/dist/cli/commands/skill.d.ts +24 -0
  430. package/dist/cli/commands/skill.d.ts.map +1 -0
  431. package/dist/cli/commands/skill.js +365 -0
  432. package/dist/cli/docs/agent-operations.d.ts +1 -1
  433. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  434. package/dist/cli/docs/agent-operations.js +36 -0
  435. package/dist/cli/program.d.ts.map +1 -1
  436. package/dist/cli/program.js +11 -0
  437. package/dist/cli/types/api-responses.d.ts +215 -0
  438. package/dist/cli/types/api-responses.d.ts.map +1 -1
  439. package/dist/cli/types/index.d.ts +60 -0
  440. package/dist/cli/types/index.d.ts.map +1 -1
  441. package/dist/cli/types/index.js +23 -1
  442. package/dist/cli/utils/api-client.d.ts +19 -1
  443. package/dist/cli/utils/api-client.d.ts.map +1 -1
  444. package/dist/cli/utils/api-client.js +41 -4
  445. package/dist/server/server.js +57 -0
  446. package/dist/server/src/config/activity-bar-config.js +2 -0
  447. package/dist/server/src/config/git-status-config.js +83 -0
  448. package/dist/server/src/config/skill-security-config.js +139 -0
  449. package/dist/server/src/lib/cli-tools/antigravity.js +8 -13
  450. package/dist/server/src/lib/cli-tools/codex.js +8 -14
  451. package/dist/server/src/lib/cli-tools/copilot.js +12 -13
  452. package/dist/server/src/lib/cli-tools/gemini.js +8 -13
  453. package/dist/server/src/lib/cli-tools/opencode.js +8 -13
  454. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +174 -0
  455. package/dist/server/src/lib/cli-tools/vibe-local.js +12 -17
  456. package/dist/server/src/lib/db/migrations/index.js +8 -0
  457. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  458. package/dist/server/src/lib/db/migrations/v44-skill-operations.js +81 -0
  459. package/dist/server/src/lib/db/migrations/v45-skill-installations.js +59 -0
  460. package/dist/server/src/lib/db/migrations/v46-skill-installations-cascade.js +107 -0
  461. package/dist/server/src/lib/db/migrations/v47-skill-installations-roots.js +70 -0
  462. package/dist/server/src/lib/db/worktree-db.js +9 -4
  463. package/dist/server/src/lib/git/git-errors.js +336 -0
  464. package/dist/server/src/lib/git/git-exec.js +285 -0
  465. package/dist/server/src/lib/session-key-sender.js +11 -9
  466. package/dist/server/src/lib/skills/compatibility.js +194 -0
  467. package/dist/server/src/lib/skills/constants.js +252 -0
  468. package/dist/server/src/lib/skills/errors.js +82 -0
  469. package/dist/server/src/lib/skills/index.js +91 -0
  470. package/dist/server/src/lib/skills/install-apply.js +670 -0
  471. package/dist/server/src/lib/skills/install-plan.js +582 -0
  472. package/dist/server/src/lib/skills/installed-state.js +127 -0
  473. package/dist/server/src/lib/skills/integrity.js +225 -0
  474. package/dist/server/src/lib/skills/json-schema.js +365 -0
  475. package/dist/server/src/lib/skills/operation-audit.js +120 -0
  476. package/dist/server/src/lib/skills/operation-journal.js +286 -0
  477. package/dist/server/src/lib/skills/operation-lock.js +339 -0
  478. package/dist/server/src/lib/skills/operation-reconciler.js +107 -0
  479. package/dist/server/src/lib/skills/operation-store.js +153 -0
  480. package/dist/server/src/lib/skills/package-reader.js +495 -0
  481. package/dist/server/src/lib/skills/package-validator.js +451 -0
  482. package/dist/server/src/lib/skills/preview-diff.js +627 -0
  483. package/dist/server/src/lib/skills/safe-yaml.js +593 -0
  484. package/dist/server/src/lib/skills/schema.js +1248 -0
  485. package/dist/server/src/lib/skills/semver.js +193 -0
  486. package/dist/server/src/lib/skills/snapshot-store.js +334 -0
  487. package/dist/server/src/lib/skills/startup-reconcile.js +138 -0
  488. package/dist/server/src/lib/skills/uninstall-apply.js +495 -0
  489. package/dist/server/src/lib/skills/uninstall-plan.js +479 -0
  490. package/dist/server/src/types/skills.js +17 -0
  491. package/package.json +1 -1
  492. package/.next/server/chunks/129.js +0 -1
  493. package/.next/server/chunks/2478.js +0 -1
  494. package/.next/server/chunks/9886.js +0 -1
  495. package/.next/static/0_lnKsT0DH-MnHhnV5n-l/_buildManifest.js +0 -1
  496. package/.next/static/chunks/3165-87bf884f7f3d15cf.js +0 -1
  497. package/.next/static/chunks/6416.6756b7ad06dd96f7.js +0 -1
  498. package/.next/static/chunks/8676.57260a06f6554e7e.js +0 -1
  499. package/.next/static/chunks/app/api/app/update/route-7536041a7a89616d.js +0 -1
  500. package/.next/static/chunks/app/api/app/update-check/route-7536041a7a89616d.js +0 -1
  501. package/.next/static/chunks/app/api/assistant/conversation/route-7536041a7a89616d.js +0 -1
  502. package/.next/static/chunks/app/api/assistant/current-output/route-7536041a7a89616d.js +0 -1
  503. package/.next/static/chunks/app/api/assistant/messages/route-7536041a7a89616d.js +0 -1
  504. package/.next/static/chunks/app/api/assistant/session/route-7536041a7a89616d.js +0 -1
  505. package/.next/static/chunks/app/api/assistant/start/route-7536041a7a89616d.js +0 -1
  506. package/.next/static/chunks/app/api/assistant/terminal/route-7536041a7a89616d.js +0 -1
  507. package/.next/static/chunks/app/api/assistant/tools/route-7536041a7a89616d.js +0 -1
  508. package/.next/static/chunks/app/api/auth/login/route-7536041a7a89616d.js +0 -1
  509. package/.next/static/chunks/app/api/auth/logout/route-7536041a7a89616d.js +0 -1
  510. package/.next/static/chunks/app/api/auth/status/route-7536041a7a89616d.js +0 -1
  511. package/.next/static/chunks/app/api/daily-summary/route-7536041a7a89616d.js +0 -1
  512. package/.next/static/chunks/app/api/daily-summary/status/route-7536041a7a89616d.js +0 -1
  513. package/.next/static/chunks/app/api/external-apps/[id]/health/route-7536041a7a89616d.js +0 -1
  514. package/.next/static/chunks/app/api/external-apps/[id]/route-7536041a7a89616d.js +0 -1
  515. package/.next/static/chunks/app/api/external-apps/route-7536041a7a89616d.js +0 -1
  516. package/.next/static/chunks/app/api/hooks/claude-done/route-7536041a7a89616d.js +0 -1
  517. package/.next/static/chunks/app/api/ollama/models/route-7536041a7a89616d.js +0 -1
  518. package/.next/static/chunks/app/api/push/subscriptions/route-7536041a7a89616d.js +0 -1
  519. package/.next/static/chunks/app/api/push/vapid/route-7536041a7a89616d.js +0 -1
  520. package/.next/static/chunks/app/api/repositories/[id]/route-7536041a7a89616d.js +0 -1
  521. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
  522. package/.next/static/chunks/app/api/repositories/[id]/todos/route-7536041a7a89616d.js +0 -1
  523. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-7536041a7a89616d.js +0 -1
  524. package/.next/static/chunks/app/api/repositories/clone/route-7536041a7a89616d.js +0 -1
  525. package/.next/static/chunks/app/api/repositories/excluded/route-7536041a7a89616d.js +0 -1
  526. package/.next/static/chunks/app/api/repositories/restore/route-7536041a7a89616d.js +0 -1
  527. package/.next/static/chunks/app/api/repositories/route-7536041a7a89616d.js +0 -1
  528. package/.next/static/chunks/app/api/repositories/scan/route-7536041a7a89616d.js +0 -1
  529. package/.next/static/chunks/app/api/repositories/sync/route-7536041a7a89616d.js +0 -1
  530. package/.next/static/chunks/app/api/sidebar/group-order/route-7536041a7a89616d.js +0 -1
  531. package/.next/static/chunks/app/api/slash-commands/route-7536041a7a89616d.js +0 -1
  532. package/.next/static/chunks/app/api/templates/[id]/route-7536041a7a89616d.js +0 -1
  533. package/.next/static/chunks/app/api/templates/route-7536041a7a89616d.js +0 -1
  534. package/.next/static/chunks/app/api/todos/route-7536041a7a89616d.js +0 -1
  535. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-7536041a7a89616d.js +0 -1
  536. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-7536041a7a89616d.js +0 -1
  537. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-7536041a7a89616d.js +0 -1
  538. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-7536041a7a89616d.js +0 -1
  539. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-7536041a7a89616d.js +0 -1
  540. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-7536041a7a89616d.js +0 -1
  541. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-7536041a7a89616d.js +0 -1
  542. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-7536041a7a89616d.js +0 -1
  543. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-7536041a7a89616d.js +0 -1
  544. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-7536041a7a89616d.js +0 -1
  545. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-7536041a7a89616d.js +0 -1
  546. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-7536041a7a89616d.js +0 -1
  547. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-7536041a7a89616d.js +0 -1
  548. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-7536041a7a89616d.js +0 -1
  549. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-7536041a7a89616d.js +0 -1
  550. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-7536041a7a89616d.js +0 -1
  551. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-7536041a7a89616d.js +0 -1
  552. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-7536041a7a89616d.js +0 -1
  553. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-7536041a7a89616d.js +0 -1
  554. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-7536041a7a89616d.js +0 -1
  555. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-7536041a7a89616d.js +0 -1
  556. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-7536041a7a89616d.js +0 -1
  557. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-7536041a7a89616d.js +0 -1
  558. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-7536041a7a89616d.js +0 -1
  559. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-7536041a7a89616d.js +0 -1
  560. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-7536041a7a89616d.js +0 -1
  561. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-7536041a7a89616d.js +0 -1
  562. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-7536041a7a89616d.js +0 -1
  563. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-7536041a7a89616d.js +0 -1
  564. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-7536041a7a89616d.js +0 -1
  565. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-7536041a7a89616d.js +0 -1
  566. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-7536041a7a89616d.js +0 -1
  567. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-7536041a7a89616d.js +0 -1
  568. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-7536041a7a89616d.js +0 -1
  569. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-7536041a7a89616d.js +0 -1
  570. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-7536041a7a89616d.js +0 -1
  571. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-7536041a7a89616d.js +0 -1
  572. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-7536041a7a89616d.js +0 -1
  573. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-7536041a7a89616d.js +0 -1
  574. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-7536041a7a89616d.js +0 -1
  575. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-7536041a7a89616d.js +0 -1
  576. package/.next/static/chunks/app/api/worktrees/[id]/route-7536041a7a89616d.js +0 -1
  577. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-7536041a7a89616d.js +0 -1
  578. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-7536041a7a89616d.js +0 -1
  579. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-7536041a7a89616d.js +0 -1
  580. package/.next/static/chunks/app/api/worktrees/[id]/search/route-7536041a7a89616d.js +0 -1
  581. package/.next/static/chunks/app/api/worktrees/[id]/send/route-7536041a7a89616d.js +0 -1
  582. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-7536041a7a89616d.js +0 -1
  583. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-7536041a7a89616d.js +0 -1
  584. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-7536041a7a89616d.js +0 -1
  585. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-7536041a7a89616d.js +0 -1
  586. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-7536041a7a89616d.js +0 -1
  587. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-7536041a7a89616d.js +0 -1
  588. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
  589. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-7536041a7a89616d.js +0 -1
  590. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-7536041a7a89616d.js +0 -1
  591. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-7536041a7a89616d.js +0 -1
  592. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-7536041a7a89616d.js +0 -1
  593. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-7536041a7a89616d.js +0 -1
  594. package/.next/static/chunks/app/api/worktrees/route-7536041a7a89616d.js +0 -1
  595. package/.next/static/chunks/app/manifest.webmanifest/route-7536041a7a89616d.js +0 -1
  596. package/.next/static/chunks/app/proxy/[...path]/route-7536041a7a89616d.js +0 -1
  597. package/.next/static/chunks/app/worktrees/[id]/page-9a4ce51e697baac6.js +0 -1
  598. package/.next/static/chunks/app/worktrees/[id]/terminal/page-ed4590b024edd8d6.js +0 -1
  599. package/.next/static/chunks/webpack-2e3739a831868daa.js +0 -1
  600. package/.next/static/css/d7e2e8d1b8d69d36.css +0 -1
  601. package/dist/server/src/lib/pasted-text-helper.js +0 -58
  602. /package/.next/static/{0_lnKsT0DH-MnHhnV5n-l → ZYti9g9gICKnjtmkfvvB2}/_ssgManifest.js +0 -0
@@ -0,0 +1,627 @@
1
+ "use strict";
2
+ /**
3
+ * Virtual install diff between a verified Skill package and a live worktree (Issue #1233)
4
+ *
5
+ * Answers one question before anything is written: if this exact package landed
6
+ * in `.agents/skills/<skill-id>` right now, which files would appear, which
7
+ * would change, and which already-present file would be overwritten.
8
+ *
9
+ * Three properties the rest of the install flow depends on:
10
+ * - Nothing here writes. Every path is derived from a server-resolved worktree
11
+ * path plus a validated Skill ID; no caller-supplied path reaches the disk.
12
+ * - A state that could mislead is named rather than smoothed over: a detached or
13
+ * unborn HEAD, a binary or truncated body, a CRLF payload and a git-ignored
14
+ * destination each get an explicit field, because silently rendering them as
15
+ * an ordinary diff is how a user approves something they did not see.
16
+ * - An existing file is never classified as a clean overwrite. It is either
17
+ * provably the same managed content (`unchanged`/`modify`) or it is a
18
+ * conflict, and conflicts make the plan non-installable.
19
+ *
20
+ * @module lib/skills/preview-diff
21
+ */
22
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SkillPreviewWarning = exports.SkillDiffReason = exports.SKILL_TREE_SCAN_MAX_DEPTH = exports.SKILL_TREE_SCAN_MAX_ENTRIES = exports.SKILL_DIFF_CONTEXT_LINES = exports.SKILL_DIFF_MAX_LINES = exports.SKILL_DIFF_MAX_TOTAL_BYTES = exports.SKILL_DIFF_MAX_FILE_BYTES = void 0;
27
+ exports.skillInstallRootFor = skillInstallRootFor;
28
+ exports.skillInstallRoot = skillInstallRoot;
29
+ exports.resolveSkillInstallRootFor = resolveSkillInstallRootFor;
30
+ exports.resolveSkillInstallRoot = resolveSkillInstallRoot;
31
+ exports.resolveSkillInstallRoots = resolveSkillInstallRoots;
32
+ exports.isBinaryContent = isBinaryContent;
33
+ exports.detectLineEnding = detectLineEnding;
34
+ exports.computeSkillTreeHash = computeSkillTreeHash;
35
+ exports.readExistingSkillTree = readExistingSkillTree;
36
+ exports.readSkillGitTargetState = readSkillGitTargetState;
37
+ exports.findGitIgnoredPaths = findGitIgnoredPaths;
38
+ exports.buildUnifiedDiff = buildUnifiedDiff;
39
+ exports.buildSkillPreviewDiff = buildSkillPreviewDiff;
40
+ const crypto_1 = require("crypto");
41
+ const fs_1 = require("fs");
42
+ const path_1 = __importDefault(require("path"));
43
+ const git_exec_1 = require("../../lib/git/git-exec");
44
+ const constants_1 = require("../../lib/skills/constants");
45
+ const integrity_1 = require("../../lib/skills/integrity");
46
+ const operation_store_1 = require("../../lib/skills/operation-store");
47
+ // =============================================================================
48
+ // Limits
49
+ // =============================================================================
50
+ /** Maximum bytes of diff text kept for a single file. */
51
+ exports.SKILL_DIFF_MAX_FILE_BYTES = 64 * 1024;
52
+ /** Maximum bytes of diff text kept across a whole plan. */
53
+ exports.SKILL_DIFF_MAX_TOTAL_BYTES = 512 * 1024;
54
+ /** Maximum diff lines emitted for a single file. */
55
+ exports.SKILL_DIFF_MAX_LINES = 400;
56
+ /** Context lines around the changed region of a modified file. */
57
+ exports.SKILL_DIFF_CONTEXT_LINES = 3;
58
+ /** Maximum entries walked when scanning the existing target directory. */
59
+ exports.SKILL_TREE_SCAN_MAX_ENTRIES = 2000;
60
+ /** Maximum directory depth walked under the target root. */
61
+ exports.SKILL_TREE_SCAN_MAX_DEPTH = 16;
62
+ /** Bytes inspected when deciding whether content is binary. */
63
+ const BINARY_SNIFF_BYTES = 8000;
64
+ /** Why an entry was classified the way it was. Stable machine codes. */
65
+ exports.SkillDiffReason = {
66
+ /** Path does not exist in the worktree. */
67
+ NEW_FILE: 'SKILL_DIFF_NEW_FILE',
68
+ /** Present, recorded by the install receipt, and byte-identical to the package. */
69
+ CONTENT_IDENTICAL: 'SKILL_DIFF_CONTENT_IDENTICAL',
70
+ /** Present, matches what the receipt recorded, and the package supersedes it. */
71
+ MANAGED_UPDATE: 'SKILL_DIFF_MANAGED_UPDATE',
72
+ /** Present and recorded, but its bytes no longer match the receipt. */
73
+ LOCAL_MODIFICATION: 'SKILL_DIFF_LOCAL_MODIFICATION',
74
+ /** Present under the install root with no receipt recording it. */
75
+ UNMANAGED_SKILL: 'SKILL_DIFF_UNMANAGED_SKILL',
76
+ /** Recorded by the receipt but absent from the package being installed. */
77
+ RECEIPT_ORPHAN: 'SKILL_DIFF_RECEIPT_ORPHAN',
78
+ /** Present as a symlink, a directory or another non-regular entry. */
79
+ NOT_A_REGULAR_FILE: 'SKILL_DIFF_NOT_A_REGULAR_FILE',
80
+ };
81
+ /** Plan-level conditions a user must be told about before approving. */
82
+ exports.SkillPreviewWarning = {
83
+ /** HEAD is not on a branch; the install would land on a detached checkout. */
84
+ DETACHED_HEAD: 'SKILL_PREVIEW_DETACHED_HEAD',
85
+ /** The repository has no commit yet, so there is no HEAD to pin the plan to. */
86
+ UNBORN_HEAD: 'SKILL_PREVIEW_UNBORN_HEAD',
87
+ /** HEAD could not be resolved at all. */
88
+ HEAD_UNRESOLVED: 'SKILL_PREVIEW_HEAD_UNRESOLVED',
89
+ /** The worktree has uncommitted changes. */
90
+ WORKING_TREE_DIRTY: 'SKILL_PREVIEW_WORKING_TREE_DIRTY',
91
+ /** At least one destination path is ignored or excluded by git. */
92
+ PATH_GIT_IGNORED: 'SKILL_PREVIEW_PATH_GIT_IGNORED',
93
+ /** At least one diff body was cut short. */
94
+ DIFF_TRUNCATED: 'SKILL_PREVIEW_DIFF_TRUNCATED',
95
+ /** At least one file has no textual diff because its content is binary. */
96
+ BINARY_CONTENT: 'SKILL_PREVIEW_BINARY_CONTENT',
97
+ /** At least one payload file uses CRLF or mixed terminators. */
98
+ LINE_ENDING_CRLF: 'SKILL_PREVIEW_LINE_ENDING_CRLF',
99
+ /** The existing target directory could not be scanned completely. */
100
+ TREE_SCAN_TRUNCATED: 'SKILL_PREVIEW_TREE_SCAN_TRUNCATED',
101
+ };
102
+ // =============================================================================
103
+ // Paths
104
+ // =============================================================================
105
+ /** Repository-relative install root for a validated Skill ID under one root prefix (#1460). */
106
+ function skillInstallRootFor(rootPrefix, skillId) {
107
+ return `${rootPrefix}/${skillId}`;
108
+ }
109
+ /** Repository-relative install root under the primary `.agents/skills` prefix. */
110
+ function skillInstallRoot(skillId) {
111
+ return skillInstallRootFor(constants_1.SKILL_INSTALL_ROOT_PREFIX, skillId);
112
+ }
113
+ /**
114
+ * Absolute install root for a Skill ID under one root prefix (#1460).
115
+ *
116
+ * The ID is re-checked against the slug grammar rather than only comparing the
117
+ * joined result: `path.join` normalizes `..` away, so `<prefix>/../x` and the
118
+ * sibling `x` compare equal and a containment check alone would accept an ID
119
+ * that walked out of the Skills directory. Rejecting the grammar first makes
120
+ * traversal unrepresentable; the containment check then covers the rest. The
121
+ * containment check is applied per root prefix, so the `.claude/skills` root
122
+ * gets exactly the escape rejection the `.agents/skills` root always had.
123
+ */
124
+ function resolveSkillInstallRootFor(worktreePath, rootPrefix, skillId) {
125
+ if (!constants_1.SKILL_ID_PATTERN.test(skillId) || skillId.length > constants_1.SKILL_ID_MAX_LENGTH) {
126
+ throw new Error('Skill ID is not a valid install root segment');
127
+ }
128
+ const root = path_1.default.resolve(worktreePath);
129
+ const target = path_1.default.resolve(root, rootPrefix, skillId);
130
+ const relative = path_1.default.relative(root, target);
131
+ if (relative !== path_1.default.join(rootPrefix, skillId) ||
132
+ relative.startsWith('..') ||
133
+ path_1.default.isAbsolute(relative)) {
134
+ throw new Error('Skill install root escapes the worktree');
135
+ }
136
+ return target;
137
+ }
138
+ /** Absolute install root under the primary `.agents/skills` prefix. */
139
+ function resolveSkillInstallRoot(worktreePath, skillId) {
140
+ return resolveSkillInstallRootFor(worktreePath, constants_1.SKILL_INSTALL_ROOT_PREFIX, skillId);
141
+ }
142
+ /**
143
+ * Resolve every root a Skill would be placed into, primary first (#1460).
144
+ *
145
+ * Each root is containment-checked independently, so a malformed prefix or ID is
146
+ * rejected before any of them is used. The default is the full product set
147
+ * ({@link SKILL_INSTALL_ROOT_PREFIXES}); callers migrating from the single-root
148
+ * API pass a narrower set.
149
+ */
150
+ function resolveSkillInstallRoots(worktreePath, skillId, rootPrefixes = constants_1.SKILL_INSTALL_ROOT_PREFIXES) {
151
+ return rootPrefixes.map((prefix) => ({
152
+ prefix,
153
+ rel: skillInstallRootFor(prefix, skillId),
154
+ abs: resolveSkillInstallRootFor(worktreePath, prefix, skillId),
155
+ }));
156
+ }
157
+ // =============================================================================
158
+ // Content classification
159
+ // =============================================================================
160
+ /** Content is treated as binary when a NUL byte appears near the start. */
161
+ function isBinaryContent(bytes) {
162
+ const limit = Math.min(bytes.length, BINARY_SNIFF_BYTES);
163
+ for (let i = 0; i < limit; i += 1) {
164
+ if (bytes[i] === 0)
165
+ return true;
166
+ }
167
+ return false;
168
+ }
169
+ /** Terminator style of a payload, so a CRLF file is not silently normalized. */
170
+ function detectLineEnding(bytes) {
171
+ let crlf = 0;
172
+ let lf = 0;
173
+ for (let i = 0; i < bytes.length; i += 1) {
174
+ if (bytes[i] !== 0x0a)
175
+ continue;
176
+ if (i > 0 && bytes[i - 1] === 0x0d)
177
+ crlf += 1;
178
+ else
179
+ lf += 1;
180
+ }
181
+ if (crlf > 0 && lf > 0)
182
+ return 'mixed';
183
+ if (crlf > 0)
184
+ return 'crlf';
185
+ if (lf > 0)
186
+ return 'lf';
187
+ return 'none';
188
+ }
189
+ /**
190
+ * Split into lines without normalizing terminators.
191
+ *
192
+ * A trailing `\r` is kept on the line, so a CRLF file diffs as CRLF rather than
193
+ * appearing identical to its LF twin.
194
+ */
195
+ function splitLines(bytes) {
196
+ const text = Buffer.from(bytes).toString('utf-8');
197
+ if (text.length === 0)
198
+ return [];
199
+ const lines = text.split('\n');
200
+ if (lines[lines.length - 1] === '')
201
+ lines.pop();
202
+ return lines;
203
+ }
204
+ /**
205
+ * Order-independent digest of a file set.
206
+ *
207
+ * Apply re-computes this over the live directory and refuses when it differs,
208
+ * so the mode bit is part of the input: a payload that gained an execute bit
209
+ * between plan and apply is drift, not a detail.
210
+ */
211
+ function computeSkillTreeHash(files) {
212
+ const canonical = [...files]
213
+ .sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0))
214
+ .map((file) => `${file.path}\x00${file.sha256}\x00${file.executable ? '1' : '0'}`)
215
+ .join('\n');
216
+ return (0, crypto_1.createHash)('sha256').update(`skill-tree-v1\n${canonical}`).digest('hex');
217
+ }
218
+ // =============================================================================
219
+ // Existing tree
220
+ // =============================================================================
221
+ function isExecutableMode(mode) {
222
+ return (mode & 0o111) !== 0;
223
+ }
224
+ /**
225
+ * List the install root as it is right now.
226
+ *
227
+ * `lstat` rather than `stat` throughout: a symlink under the install root is
228
+ * reported as an irregular path instead of being followed, so a planted link
229
+ * cannot make the preview describe a file outside the worktree.
230
+ */
231
+ function readExistingSkillTree(installRootAbs) {
232
+ let rootStats;
233
+ try {
234
+ rootStats = (0, fs_1.lstatSync)(installRootAbs);
235
+ }
236
+ catch {
237
+ return { present: false, files: [], irregularPaths: [], truncated: false };
238
+ }
239
+ if (!rootStats.isDirectory()) {
240
+ return { present: true, files: [], irregularPaths: [''], truncated: false };
241
+ }
242
+ const files = [];
243
+ const irregularPaths = [];
244
+ let truncated = false;
245
+ let scanned = 0;
246
+ const walk = (dirAbs, relPrefix, depth) => {
247
+ if (truncated)
248
+ return;
249
+ if (depth > exports.SKILL_TREE_SCAN_MAX_DEPTH) {
250
+ truncated = true;
251
+ return;
252
+ }
253
+ let entries;
254
+ try {
255
+ entries = (0, fs_1.readdirSync)(dirAbs, { withFileTypes: true });
256
+ }
257
+ catch {
258
+ truncated = true;
259
+ return;
260
+ }
261
+ for (const entry of entries.sort((a, b) => (a.name < b.name ? -1 : 1))) {
262
+ if (truncated)
263
+ return;
264
+ scanned += 1;
265
+ if (scanned > exports.SKILL_TREE_SCAN_MAX_ENTRIES) {
266
+ truncated = true;
267
+ return;
268
+ }
269
+ const relative = relPrefix ? `${relPrefix}/${entry.name}` : entry.name;
270
+ const absolute = path_1.default.join(dirAbs, entry.name);
271
+ if (entry.isDirectory()) {
272
+ walk(absolute, relative, depth + 1);
273
+ continue;
274
+ }
275
+ if (!entry.isFile()) {
276
+ irregularPaths.push(relative);
277
+ continue;
278
+ }
279
+ let stats;
280
+ try {
281
+ stats = (0, fs_1.lstatSync)(absolute);
282
+ }
283
+ catch {
284
+ irregularPaths.push(relative);
285
+ continue;
286
+ }
287
+ if (!stats.isFile() || stats.size > constants_1.SKILL_FILE_MAX_SIZE) {
288
+ irregularPaths.push(relative);
289
+ continue;
290
+ }
291
+ let bytes;
292
+ try {
293
+ bytes = (0, fs_1.readFileSync)(absolute);
294
+ }
295
+ catch {
296
+ irregularPaths.push(relative);
297
+ continue;
298
+ }
299
+ files.push({
300
+ path: relative,
301
+ sha256: (0, integrity_1.computeSha256Hex)(bytes),
302
+ size: bytes.byteLength,
303
+ executable: isExecutableMode(stats.mode),
304
+ bytes,
305
+ });
306
+ }
307
+ };
308
+ walk(installRootAbs, '', 0);
309
+ return { present: true, files, irregularPaths, truncated };
310
+ }
311
+ // =============================================================================
312
+ // Git state
313
+ // =============================================================================
314
+ /**
315
+ * Resolve branch, HEAD and dirtiness of a server-resolved worktree.
316
+ *
317
+ * The two failure modes are deliberately distinguished rather than collapsed
318
+ * into "no branch": a detached HEAD has a commit to pin the plan to, an unborn
319
+ * HEAD has none, and apply must be able to tell those apart.
320
+ */
321
+ async function readSkillGitTargetState(worktreePath) {
322
+ const [branch, headCommit, status] = await Promise.all([
323
+ (0, git_exec_1.execGitCommand)(['symbolic-ref', '--quiet', '--short', 'HEAD'], worktreePath),
324
+ (0, git_exec_1.execGitCommand)(['rev-parse', 'HEAD'], worktreePath),
325
+ (0, git_exec_1.execGitCommand)(['status', '--porcelain'], worktreePath),
326
+ ]);
327
+ const commit = headCommit && /^[0-9a-f]{40}$/.test(headCommit) ? headCommit : null;
328
+ let headState;
329
+ if (branch && commit)
330
+ headState = 'attached';
331
+ else if (!branch && commit)
332
+ headState = 'detached';
333
+ else if (branch && !commit)
334
+ headState = 'unborn';
335
+ else
336
+ headState = 'unknown';
337
+ return {
338
+ headState,
339
+ branch: branch && branch.length > 0 ? branch : null,
340
+ headCommit: commit,
341
+ dirty: status !== null && status.length > 0,
342
+ };
343
+ }
344
+ /**
345
+ * Which destination paths git would ignore.
346
+ *
347
+ * `check-ignore` exits 1 when nothing matched, which `execFile` surfaces as a
348
+ * rejection, so the non-zero exit is read for stdout rather than treated as a
349
+ * failure. Paths already in the index are not reported, which is the answer we
350
+ * want: a tracked file stays visible to git regardless of ignore rules.
351
+ */
352
+ async function findGitIgnoredPaths(worktreePath, relativePaths) {
353
+ if (relativePaths.length === 0)
354
+ return new Set();
355
+ try {
356
+ const { stdout } = await (0, git_exec_1.execFileAsync)('git', ['check-ignore', '-z', '--', ...relativePaths], { cwd: worktreePath, timeout: 3000 });
357
+ return parseNulSeparated(stdout);
358
+ }
359
+ catch (error) {
360
+ const stdout = error.stdout;
361
+ return typeof stdout === 'string' ? parseNulSeparated(stdout) : new Set();
362
+ }
363
+ }
364
+ function parseNulSeparated(stdout) {
365
+ return new Set(stdout.split('\0').filter((value) => value.length > 0));
366
+ }
367
+ function emptyBody() {
368
+ return { text: null, truncated: false, additions: 0, deletions: 0 };
369
+ }
370
+ /**
371
+ * Build a single-hunk unified diff.
372
+ *
373
+ * The changed region is found by trimming the common prefix and suffix rather
374
+ * than by running an LCS: the result is a correct, honest diff at linear cost,
375
+ * and a preview does not gain anything from splitting one edit into several
376
+ * hunks it would render adjacently anyway.
377
+ */
378
+ function buildUnifiedDiff(before, after, budget) {
379
+ if (before === null && after === null)
380
+ return emptyBody();
381
+ const beforeLines = before ? splitLines(before) : [];
382
+ const afterLines = after ? splitLines(after) : [];
383
+ let prefix = 0;
384
+ const maxPrefix = Math.min(beforeLines.length, afterLines.length);
385
+ while (prefix < maxPrefix && beforeLines[prefix] === afterLines[prefix])
386
+ prefix += 1;
387
+ let suffix = 0;
388
+ while (suffix < maxPrefix - prefix &&
389
+ beforeLines[beforeLines.length - 1 - suffix] === afterLines[afterLines.length - 1 - suffix]) {
390
+ suffix += 1;
391
+ }
392
+ const removed = beforeLines.slice(prefix, beforeLines.length - suffix);
393
+ const added = afterLines.slice(prefix, afterLines.length - suffix);
394
+ if (removed.length === 0 && added.length === 0)
395
+ return emptyBody();
396
+ const contextStart = Math.max(0, prefix - exports.SKILL_DIFF_CONTEXT_LINES);
397
+ const leadingContext = beforeLines.slice(contextStart, prefix);
398
+ const trailingContext = beforeLines.slice(beforeLines.length - suffix, Math.min(beforeLines.length, beforeLines.length - suffix + exports.SKILL_DIFF_CONTEXT_LINES));
399
+ const beforeCount = leadingContext.length + removed.length + trailingContext.length;
400
+ const afterCount = leadingContext.length + added.length + trailingContext.length;
401
+ const beforeStart = beforeCount === 0 ? 0 : contextStart + 1;
402
+ const afterStart = afterCount === 0 ? 0 : contextStart + 1;
403
+ const lines = [`@@ -${beforeStart},${beforeCount} +${afterStart},${afterCount} @@`];
404
+ let truncated = false;
405
+ let bytes = lines[0].length + 1;
406
+ const push = (prefixChar, value) => {
407
+ if (lines.length >= exports.SKILL_DIFF_MAX_LINES + 1)
408
+ return false;
409
+ const line = `${prefixChar}${value}`;
410
+ const cost = line.length + 1;
411
+ if (bytes + cost > exports.SKILL_DIFF_MAX_FILE_BYTES || cost > budget.remainingBytes - bytes) {
412
+ return false;
413
+ }
414
+ lines.push(line);
415
+ bytes += cost;
416
+ return true;
417
+ };
418
+ for (const value of leadingContext) {
419
+ if (!push(' ', value)) {
420
+ truncated = true;
421
+ break;
422
+ }
423
+ }
424
+ if (!truncated) {
425
+ for (const value of removed) {
426
+ if (!push('-', value)) {
427
+ truncated = true;
428
+ break;
429
+ }
430
+ }
431
+ }
432
+ if (!truncated) {
433
+ for (const value of added) {
434
+ if (!push('+', value)) {
435
+ truncated = true;
436
+ break;
437
+ }
438
+ }
439
+ }
440
+ if (!truncated) {
441
+ for (const value of trailingContext) {
442
+ if (!push(' ', value)) {
443
+ truncated = true;
444
+ break;
445
+ }
446
+ }
447
+ }
448
+ if (truncated)
449
+ lines.push('… diff truncated');
450
+ const text = lines.join('\n');
451
+ budget.remainingBytes = Math.max(0, budget.remainingBytes - text.length);
452
+ return { text, truncated, additions: added.length, deletions: removed.length };
453
+ }
454
+ function classify(planned, existing, recorded) {
455
+ if (!existing) {
456
+ return planned
457
+ ? { change: 'add', reason: exports.SkillDiffReason.NEW_FILE }
458
+ : { change: 'unchanged', reason: exports.SkillDiffReason.RECEIPT_ORPHAN };
459
+ }
460
+ if (!recorded) {
461
+ return { change: 'unmanaged', reason: exports.SkillDiffReason.UNMANAGED_SKILL };
462
+ }
463
+ if (existing.sha256 !== recorded.sha256 || existing.executable !== recorded.executable) {
464
+ return { change: 'conflict', reason: exports.SkillDiffReason.LOCAL_MODIFICATION };
465
+ }
466
+ if (!planned) {
467
+ return { change: 'unmanaged', reason: exports.SkillDiffReason.RECEIPT_ORPHAN };
468
+ }
469
+ if (planned.sha256 === existing.sha256 && planned.executable === existing.executable) {
470
+ return { change: 'unchanged', reason: exports.SkillDiffReason.CONTENT_IDENTICAL };
471
+ }
472
+ return { change: 'modify', reason: exports.SkillDiffReason.MANAGED_UPDATE };
473
+ }
474
+ /**
475
+ * Assemble the virtual diff.
476
+ *
477
+ * Every planned write appears, including the generated receipt, and every file
478
+ * already under the install root appears even when the package does not mention
479
+ * it — an existing Skill the user installed by hand must be visible as
480
+ * something the install would collide with, not omitted because the package is
481
+ * unaware of it.
482
+ */
483
+ function buildSkillPreviewDiff(input) {
484
+ const installRoot = skillInstallRootFor(input.installRootPrefix ?? constants_1.SKILL_INSTALL_ROOT_PREFIX, input.skillId);
485
+ const plannedByPath = new Map(input.plannedFiles.map((file) => [file.relativePath, file]));
486
+ const existingByPath = new Map(input.existing.files.map((file) => [file.path, file]));
487
+ const allPaths = [
488
+ ...new Set([
489
+ ...plannedByPath.keys(),
490
+ ...existingByPath.keys(),
491
+ ...(input.receiptFiles ? [...input.receiptFiles.keys()] : []),
492
+ ]),
493
+ ]
494
+ .filter((relative) => !(0, operation_store_1.isSkillInstallStagingPath)(`${installRoot}/${relative}`))
495
+ .sort();
496
+ const budget = { remainingBytes: exports.SKILL_DIFF_MAX_TOTAL_BYTES };
497
+ const entries = [];
498
+ const stats = {
499
+ added: 0,
500
+ modified: 0,
501
+ unchanged: 0,
502
+ conflicted: 0,
503
+ unmanaged: 0,
504
+ binaryFiles: 0,
505
+ truncatedFiles: 0,
506
+ diffBytes: 0,
507
+ };
508
+ let anyCrlf = false;
509
+ for (const relative of allPaths) {
510
+ const planned = plannedByPath.get(relative) ?? null;
511
+ const existing = existingByPath.get(relative) ?? null;
512
+ const recorded = input.receiptFiles?.get(relative) ?? null;
513
+ const { change, reason } = classify(planned, existing, recorded);
514
+ const repoPath = `${installRoot}/${relative}`;
515
+ const source = planned?.bytes ?? existing?.bytes ?? null;
516
+ const binary = (planned ? isBinaryContent(planned.bytes) : false) ||
517
+ (existing ? isBinaryContent(existing.bytes) : false);
518
+ const lineEnding = source ? detectLineEnding(source) : 'none';
519
+ if (planned && (lineEnding === 'crlf' || lineEnding === 'mixed'))
520
+ anyCrlf = true;
521
+ const body = binary || change === 'unchanged'
522
+ ? emptyBody()
523
+ : buildUnifiedDiff(existing?.bytes ?? null, planned?.bytes ?? null, budget);
524
+ entries.push({
525
+ path: repoPath,
526
+ change,
527
+ reason,
528
+ generated: planned?.generated ?? false,
529
+ sha256: planned?.sha256 ?? null,
530
+ size: planned?.size ?? null,
531
+ executable: planned?.executable ?? existing?.executable ?? false,
532
+ currentSha256: existing?.sha256 ?? null,
533
+ currentSize: existing?.size ?? null,
534
+ binary,
535
+ lineEnding,
536
+ gitIgnored: input.gitIgnoredPaths.has(repoPath),
537
+ diff: body.text,
538
+ diffTruncated: body.truncated,
539
+ additions: body.additions,
540
+ deletions: body.deletions,
541
+ });
542
+ if (change === 'add')
543
+ stats.added += 1;
544
+ else if (change === 'modify')
545
+ stats.modified += 1;
546
+ else if (change === 'unchanged')
547
+ stats.unchanged += 1;
548
+ else if (change === 'conflict')
549
+ stats.conflicted += 1;
550
+ else
551
+ stats.unmanaged += 1;
552
+ if (binary)
553
+ stats.binaryFiles += 1;
554
+ if (body.truncated)
555
+ stats.truncatedFiles += 1;
556
+ stats.diffBytes += body.text?.length ?? 0;
557
+ }
558
+ for (const irregular of input.existing.irregularPaths) {
559
+ const repoPath = irregular ? `${installRoot}/${irregular}` : installRoot;
560
+ entries.push({
561
+ path: repoPath,
562
+ change: 'conflict',
563
+ reason: exports.SkillDiffReason.NOT_A_REGULAR_FILE,
564
+ generated: false,
565
+ sha256: null,
566
+ size: null,
567
+ executable: false,
568
+ currentSha256: null,
569
+ currentSize: null,
570
+ binary: false,
571
+ lineEnding: 'none',
572
+ gitIgnored: input.gitIgnoredPaths.has(repoPath),
573
+ diff: null,
574
+ diffTruncated: false,
575
+ additions: 0,
576
+ deletions: 0,
577
+ });
578
+ stats.conflicted += 1;
579
+ }
580
+ const warnings = collectWarnings(input, entries, stats, anyCrlf);
581
+ // The planned tree keeps every file the install would not remove, so the hash
582
+ // describes the directory apply must produce — not just the package.
583
+ const plannedTree = input.plannedFiles.map((file) => ({
584
+ path: file.relativePath,
585
+ sha256: file.sha256,
586
+ executable: file.executable,
587
+ }));
588
+ for (const existing of input.existing.files) {
589
+ if (!plannedByPath.has(existing.path)) {
590
+ plannedTree.push({
591
+ path: existing.path,
592
+ sha256: existing.sha256,
593
+ executable: existing.executable,
594
+ });
595
+ }
596
+ }
597
+ return {
598
+ installRoot,
599
+ entries: entries.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)),
600
+ stats,
601
+ warnings,
602
+ currentTreeHash: computeSkillTreeHash(input.existing.files),
603
+ plannedTreeHash: computeSkillTreeHash(plannedTree),
604
+ };
605
+ }
606
+ function collectWarnings(input, entries, stats, anyCrlf) {
607
+ const warnings = [];
608
+ if (input.git.headState === 'detached')
609
+ warnings.push(exports.SkillPreviewWarning.DETACHED_HEAD);
610
+ if (input.git.headState === 'unborn')
611
+ warnings.push(exports.SkillPreviewWarning.UNBORN_HEAD);
612
+ if (input.git.headState === 'unknown')
613
+ warnings.push(exports.SkillPreviewWarning.HEAD_UNRESOLVED);
614
+ if (input.git.dirty)
615
+ warnings.push(exports.SkillPreviewWarning.WORKING_TREE_DIRTY);
616
+ if (entries.some((entry) => entry.gitIgnored))
617
+ warnings.push(exports.SkillPreviewWarning.PATH_GIT_IGNORED);
618
+ if (stats.truncatedFiles > 0)
619
+ warnings.push(exports.SkillPreviewWarning.DIFF_TRUNCATED);
620
+ if (stats.binaryFiles > 0)
621
+ warnings.push(exports.SkillPreviewWarning.BINARY_CONTENT);
622
+ if (anyCrlf)
623
+ warnings.push(exports.SkillPreviewWarning.LINE_ENDING_CRLF);
624
+ if (input.existing.truncated)
625
+ warnings.push(exports.SkillPreviewWarning.TREE_SCAN_TRUNCATED);
626
+ return warnings;
627
+ }