commandmate 0.28.0 → 0.29.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 (516) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +411 -404
  3. package/.next/app-path-routes-manifest.json +24 -23
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/react-loadable-manifest.json +0 -6
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update-check/route.js +1 -1
  11. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/auth/login/route.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.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.js +1 -1
  24. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/capabilities/route.js +1 -1
  26. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +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/agent-event/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/remote/pair/route.js +2 -0
  43. package/.next/server/app/api/remote/pair/route.js.nft.json +1 -0
  44. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -0
  45. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/route.js +1 -1
  149. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  151. package/.next/server/app/login/page.js +2 -2
  152. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  153. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  155. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  156. package/.next/server/app/page_client-reference-manifest.js +1 -1
  157. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  159. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  160. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  161. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  162. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  163. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  164. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  165. package/.next/server/app/worktrees/[id]/page.js +1 -1
  166. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  167. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  168. package/.next/server/app-paths-manifest.json +24 -23
  169. package/.next/server/chunks/1162.js +1 -1
  170. package/.next/server/chunks/2759.js +1 -1
  171. package/.next/server/chunks/3440.js +1 -1
  172. package/.next/server/chunks/3543.js +1 -1
  173. package/.next/server/chunks/3945.js +1 -1
  174. package/.next/server/chunks/4393.js +1 -1
  175. package/.next/server/chunks/6130.js +1 -1
  176. package/.next/server/chunks/880.js +6 -6
  177. package/.next/server/chunks/9123.js +2 -2
  178. package/.next/server/chunks/9938.js +1 -1
  179. package/.next/server/functions-config-manifest.json +3 -1
  180. package/.next/server/middleware-build-manifest.js +1 -1
  181. package/.next/server/middleware-manifest.json +5 -5
  182. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  183. package/.next/server/pages/500.html +1 -1
  184. package/.next/server/server-reference-manifest.json +1 -1
  185. package/.next/server/src/middleware.js +1 -1
  186. package/.next/server/src/middleware.js.map +1 -1
  187. package/.next/static/chunks/5229-580b581fce5aeb52.js +1 -0
  188. package/.next/static/chunks/6381-c8d93ec301dbc380.js +1 -0
  189. package/.next/static/chunks/app/api/app/update/route-e3626364434d521b.js +1 -0
  190. package/.next/static/chunks/app/api/app/update-check/route-e3626364434d521b.js +1 -0
  191. package/.next/static/chunks/app/api/assistant/conversation/route-e3626364434d521b.js +1 -0
  192. package/.next/static/chunks/app/api/assistant/current-output/route-e3626364434d521b.js +1 -0
  193. package/.next/static/chunks/app/api/assistant/messages/route-e3626364434d521b.js +1 -0
  194. package/.next/static/chunks/app/api/assistant/session/route-e3626364434d521b.js +1 -0
  195. package/.next/static/chunks/app/api/assistant/start/route-e3626364434d521b.js +1 -0
  196. package/.next/static/chunks/app/api/assistant/terminal/route-e3626364434d521b.js +1 -0
  197. package/.next/static/chunks/app/api/assistant/tools/route-e3626364434d521b.js +1 -0
  198. package/.next/static/chunks/app/api/auth/login/route-e3626364434d521b.js +1 -0
  199. package/.next/static/chunks/app/api/auth/logout/route-e3626364434d521b.js +1 -0
  200. package/.next/static/chunks/app/api/auth/status/route-e3626364434d521b.js +1 -0
  201. package/.next/static/chunks/app/api/capabilities/route-e3626364434d521b.js +1 -0
  202. package/.next/static/chunks/app/api/daily-summary/route-e3626364434d521b.js +1 -0
  203. package/.next/static/chunks/app/api/daily-summary/status/route-e3626364434d521b.js +1 -0
  204. package/.next/static/chunks/app/api/external-apps/[id]/health/route-e3626364434d521b.js +1 -0
  205. package/.next/static/chunks/app/api/external-apps/[id]/route-e3626364434d521b.js +1 -0
  206. package/.next/static/chunks/app/api/external-apps/route-e3626364434d521b.js +1 -0
  207. package/.next/static/chunks/app/api/fs/browse/route-e3626364434d521b.js +1 -0
  208. package/.next/static/chunks/app/api/fs/recent-paths/route-e3626364434d521b.js +1 -0
  209. package/.next/static/chunks/app/api/hooks/agent-event/route-e3626364434d521b.js +1 -0
  210. package/.next/static/chunks/app/api/hooks/claude-done/route-e3626364434d521b.js +1 -0
  211. package/.next/static/chunks/app/api/hooks/permission-request/route-e3626364434d521b.js +1 -0
  212. package/.next/static/chunks/app/api/metrics/vibe/route-e3626364434d521b.js +1 -0
  213. package/.next/static/chunks/app/api/ollama/models/route-e3626364434d521b.js +1 -0
  214. package/.next/static/chunks/app/api/push/escalation/route-e3626364434d521b.js +1 -0
  215. package/.next/static/chunks/app/api/push/subscriptions/route-e3626364434d521b.js +1 -0
  216. package/.next/static/chunks/app/api/push/vapid/route-e3626364434d521b.js +1 -0
  217. package/.next/static/chunks/app/api/remote/pair/route-e3626364434d521b.js +1 -0
  218. package/.next/static/chunks/app/api/repositories/[id]/route-e3626364434d521b.js +1 -0
  219. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-e3626364434d521b.js +1 -0
  220. package/.next/static/chunks/app/api/repositories/[id]/todos/route-e3626364434d521b.js +1 -0
  221. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-e3626364434d521b.js +1 -0
  222. package/.next/static/chunks/app/api/repositories/clone/route-e3626364434d521b.js +1 -0
  223. package/.next/static/chunks/app/api/repositories/excluded/route-e3626364434d521b.js +1 -0
  224. package/.next/static/chunks/app/api/repositories/restore/route-e3626364434d521b.js +1 -0
  225. package/.next/static/chunks/app/api/repositories/route-e3626364434d521b.js +1 -0
  226. package/.next/static/chunks/app/api/repositories/scan/route-e3626364434d521b.js +1 -0
  227. package/.next/static/chunks/app/api/repositories/sync/route-e3626364434d521b.js +1 -0
  228. package/.next/static/chunks/app/api/repositories/validate-path/route-e3626364434d521b.js +1 -0
  229. package/.next/static/chunks/app/api/sidebar/group-order/route-e3626364434d521b.js +1 -0
  230. package/.next/static/chunks/app/api/skills/[id]/route-e3626364434d521b.js +1 -0
  231. package/.next/static/chunks/app/api/skills/installations/route-e3626364434d521b.js +1 -0
  232. package/.next/static/chunks/app/api/skills/operations/route-e3626364434d521b.js +1 -0
  233. package/.next/static/chunks/app/api/skills/reindex/route-e3626364434d521b.js +1 -0
  234. package/.next/static/chunks/app/api/skills/route-e3626364434d521b.js +1 -0
  235. package/.next/static/chunks/app/api/slash-commands/route-e3626364434d521b.js +1 -0
  236. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-e3626364434d521b.js +1 -0
  237. package/.next/static/chunks/app/api/tasks/[taskId]/route-e3626364434d521b.js +1 -0
  238. package/.next/static/chunks/app/api/templates/[id]/route-e3626364434d521b.js +1 -0
  239. package/.next/static/chunks/app/api/templates/route-e3626364434d521b.js +1 -0
  240. package/.next/static/chunks/app/api/todos/route-e3626364434d521b.js +1 -0
  241. package/.next/static/chunks/app/api/verification/runs/[runId]/route-e3626364434d521b.js +1 -0
  242. package/.next/static/chunks/app/api/verification/runs/route-e3626364434d521b.js +1 -0
  243. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-e3626364434d521b.js +1 -0
  244. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-e3626364434d521b.js +1 -0
  245. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-e3626364434d521b.js +1 -0
  246. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-e3626364434d521b.js +1 -0
  247. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-e3626364434d521b.js +1 -0
  248. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-e3626364434d521b.js +1 -0
  249. package/.next/static/chunks/app/api/worktrees/[id]/env/route-e3626364434d521b.js +1 -0
  250. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-e3626364434d521b.js +1 -0
  251. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-e3626364434d521b.js +1 -0
  252. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-e3626364434d521b.js +1 -0
  253. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-e3626364434d521b.js +1 -0
  254. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-e3626364434d521b.js +1 -0
  255. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-e3626364434d521b.js +1 -0
  256. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-e3626364434d521b.js +1 -0
  257. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-e3626364434d521b.js +1 -0
  258. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-e3626364434d521b.js +1 -0
  259. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-e3626364434d521b.js +1 -0
  260. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-e3626364434d521b.js +1 -0
  261. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-e3626364434d521b.js +1 -0
  262. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-e3626364434d521b.js +1 -0
  263. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-e3626364434d521b.js +1 -0
  264. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-e3626364434d521b.js +1 -0
  265. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-e3626364434d521b.js +1 -0
  266. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-e3626364434d521b.js +1 -0
  267. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-e3626364434d521b.js +1 -0
  268. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-e3626364434d521b.js +1 -0
  269. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-e3626364434d521b.js +1 -0
  270. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-e3626364434d521b.js +1 -0
  271. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-e3626364434d521b.js +1 -0
  272. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-e3626364434d521b.js +1 -0
  273. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-e3626364434d521b.js +1 -0
  274. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-e3626364434d521b.js +1 -0
  275. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-e3626364434d521b.js +1 -0
  276. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-e3626364434d521b.js +1 -0
  277. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-e3626364434d521b.js +1 -0
  278. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-e3626364434d521b.js +1 -0
  279. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-e3626364434d521b.js +1 -0
  280. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-e3626364434d521b.js +1 -0
  281. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-e3626364434d521b.js +1 -0
  282. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-e3626364434d521b.js +1 -0
  283. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-e3626364434d521b.js +1 -0
  284. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-e3626364434d521b.js +1 -0
  285. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-e3626364434d521b.js +1 -0
  286. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-e3626364434d521b.js +1 -0
  287. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-e3626364434d521b.js +1 -0
  288. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-e3626364434d521b.js +1 -0
  289. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-e3626364434d521b.js +1 -0
  290. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-e3626364434d521b.js +1 -0
  291. package/.next/static/chunks/app/api/worktrees/[id]/route-e3626364434d521b.js +1 -0
  292. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-e3626364434d521b.js +1 -0
  293. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-e3626364434d521b.js +1 -0
  294. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-e3626364434d521b.js +1 -0
  295. package/.next/static/chunks/app/api/worktrees/[id]/search/route-e3626364434d521b.js +1 -0
  296. package/.next/static/chunks/app/api/worktrees/[id]/send/route-e3626364434d521b.js +1 -0
  297. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-e3626364434d521b.js +1 -0
  298. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-e3626364434d521b.js +1 -0
  299. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-e3626364434d521b.js +1 -0
  300. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-e3626364434d521b.js +1 -0
  301. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-e3626364434d521b.js +1 -0
  302. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-e3626364434d521b.js +1 -0
  303. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-e3626364434d521b.js +1 -0
  304. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-e3626364434d521b.js +1 -0
  305. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-e3626364434d521b.js +1 -0
  306. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-e3626364434d521b.js +1 -0
  307. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-e3626364434d521b.js +1 -0
  308. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-e3626364434d521b.js +1 -0
  309. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-e3626364434d521b.js +1 -0
  310. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-e3626364434d521b.js +1 -0
  311. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-e3626364434d521b.js +1 -0
  312. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-e3626364434d521b.js +1 -0
  313. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-e3626364434d521b.js +1 -0
  314. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-e3626364434d521b.js +1 -0
  315. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-e3626364434d521b.js +1 -0
  316. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-e3626364434d521b.js +1 -0
  317. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-e3626364434d521b.js +1 -0
  318. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-e3626364434d521b.js +1 -0
  319. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-e3626364434d521b.js +1 -0
  320. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-e3626364434d521b.js +1 -0
  321. package/.next/static/chunks/app/api/worktrees/route-e3626364434d521b.js +1 -0
  322. package/.next/static/chunks/app/login/page-03659dded846ef1d.js +1 -0
  323. package/.next/static/chunks/app/manifest.webmanifest/route-e3626364434d521b.js +1 -0
  324. package/.next/static/chunks/app/proxy/[...path]/route-e3626364434d521b.js +1 -0
  325. package/.next/static/chunks/app/worktrees/[id]/layout-e3626364434d521b.js +1 -0
  326. package/.next/static/chunks/app/worktrees/[id]/{page-27b7cb2e77099eec.js → page-c07b23b6ca58091c.js} +1 -1
  327. package/.next/static/chunks/webpack-7e79064bfce988d7.js +1 -0
  328. package/.next/static/css/b6990f889f4f9515.css +1 -0
  329. package/.next/static/uulKcSOgyxChTo4SipUSF/_buildManifest.js +1 -0
  330. package/.next/trace +13 -13
  331. package/.next/types/app/api/remote/pair/route.ts +347 -0
  332. package/.next/types/routes.d.ts +2 -1
  333. package/.next/types/validator.ts +9 -0
  334. package/README.md +15 -3
  335. package/dist/cli/commands/remote.d.ts +248 -0
  336. package/dist/cli/commands/remote.d.ts.map +1 -0
  337. package/dist/cli/commands/remote.js +849 -0
  338. package/dist/cli/config/security-messages.d.ts +25 -0
  339. package/dist/cli/config/security-messages.d.ts.map +1 -1
  340. package/dist/cli/config/security-messages.js +43 -1
  341. package/dist/cli/program.d.ts.map +1 -1
  342. package/dist/cli/program.js +6 -0
  343. package/dist/cli/types/index.d.ts +20 -0
  344. package/dist/cli/types/index.d.ts.map +1 -1
  345. package/dist/cli/utils/qr-terminal.d.ts +54 -0
  346. package/dist/cli/utils/qr-terminal.d.ts.map +1 -0
  347. package/dist/cli/utils/qr-terminal.js +181 -0
  348. package/dist/cli/utils/remote-state.d.ts +123 -0
  349. package/dist/cli/utils/remote-state.d.ts.map +1 -0
  350. package/dist/cli/utils/remote-state.js +193 -0
  351. package/dist/config/auth-config.d.ts +1 -1
  352. package/dist/config/auth-config.d.ts.map +1 -1
  353. package/dist/config/auth-config.js +5 -0
  354. package/dist/lib/remote/cloudflare.d.ts +285 -0
  355. package/dist/lib/remote/cloudflare.d.ts.map +1 -0
  356. package/dist/lib/remote/cloudflare.js +619 -0
  357. package/dist/lib/remote/index.d.ts +17 -0
  358. package/dist/lib/remote/index.d.ts.map +1 -0
  359. package/dist/lib/remote/index.js +64 -0
  360. package/dist/lib/remote/provider-registry.d.ts +29 -0
  361. package/dist/lib/remote/provider-registry.d.ts.map +1 -0
  362. package/dist/lib/remote/provider-registry.js +73 -0
  363. package/dist/lib/remote/tailscale.d.ts +268 -0
  364. package/dist/lib/remote/tailscale.d.ts.map +1 -0
  365. package/dist/lib/remote/tailscale.js +546 -0
  366. package/dist/lib/remote/types.d.ts +127 -0
  367. package/dist/lib/remote/types.d.ts.map +1 -0
  368. package/dist/lib/remote/types.js +53 -0
  369. package/dist/lib/security/pairing-code.d.ts +182 -0
  370. package/dist/lib/security/pairing-code.d.ts.map +1 -0
  371. package/dist/lib/security/pairing-code.js +265 -0
  372. package/dist/server/src/config/auth-config.js +5 -0
  373. package/package.json +2 -1
  374. package/.next/static/0GHE2JGlFzqvSBZAcBFSt/_buildManifest.js +0 -1
  375. package/.next/static/chunks/5229-1f5f19740a8d6c11.js +0 -1
  376. package/.next/static/chunks/6271.295ced91b6335f18.js +0 -1
  377. package/.next/static/chunks/6381-d921ab728eda1191.js +0 -1
  378. package/.next/static/chunks/app/api/app/update/route-9247d6b9d647f750.js +0 -1
  379. package/.next/static/chunks/app/api/app/update-check/route-9247d6b9d647f750.js +0 -1
  380. package/.next/static/chunks/app/api/assistant/conversation/route-9247d6b9d647f750.js +0 -1
  381. package/.next/static/chunks/app/api/assistant/current-output/route-9247d6b9d647f750.js +0 -1
  382. package/.next/static/chunks/app/api/assistant/messages/route-9247d6b9d647f750.js +0 -1
  383. package/.next/static/chunks/app/api/assistant/session/route-9247d6b9d647f750.js +0 -1
  384. package/.next/static/chunks/app/api/assistant/start/route-9247d6b9d647f750.js +0 -1
  385. package/.next/static/chunks/app/api/assistant/terminal/route-9247d6b9d647f750.js +0 -1
  386. package/.next/static/chunks/app/api/assistant/tools/route-9247d6b9d647f750.js +0 -1
  387. package/.next/static/chunks/app/api/auth/login/route-9247d6b9d647f750.js +0 -1
  388. package/.next/static/chunks/app/api/auth/logout/route-9247d6b9d647f750.js +0 -1
  389. package/.next/static/chunks/app/api/auth/status/route-9247d6b9d647f750.js +0 -1
  390. package/.next/static/chunks/app/api/capabilities/route-9247d6b9d647f750.js +0 -1
  391. package/.next/static/chunks/app/api/daily-summary/route-9247d6b9d647f750.js +0 -1
  392. package/.next/static/chunks/app/api/daily-summary/status/route-9247d6b9d647f750.js +0 -1
  393. package/.next/static/chunks/app/api/external-apps/[id]/health/route-9247d6b9d647f750.js +0 -1
  394. package/.next/static/chunks/app/api/external-apps/[id]/route-9247d6b9d647f750.js +0 -1
  395. package/.next/static/chunks/app/api/external-apps/route-9247d6b9d647f750.js +0 -1
  396. package/.next/static/chunks/app/api/fs/browse/route-9247d6b9d647f750.js +0 -1
  397. package/.next/static/chunks/app/api/fs/recent-paths/route-9247d6b9d647f750.js +0 -1
  398. package/.next/static/chunks/app/api/hooks/agent-event/route-9247d6b9d647f750.js +0 -1
  399. package/.next/static/chunks/app/api/hooks/claude-done/route-9247d6b9d647f750.js +0 -1
  400. package/.next/static/chunks/app/api/hooks/permission-request/route-9247d6b9d647f750.js +0 -1
  401. package/.next/static/chunks/app/api/metrics/vibe/route-9247d6b9d647f750.js +0 -1
  402. package/.next/static/chunks/app/api/ollama/models/route-9247d6b9d647f750.js +0 -1
  403. package/.next/static/chunks/app/api/push/escalation/route-9247d6b9d647f750.js +0 -1
  404. package/.next/static/chunks/app/api/push/subscriptions/route-9247d6b9d647f750.js +0 -1
  405. package/.next/static/chunks/app/api/push/vapid/route-9247d6b9d647f750.js +0 -1
  406. package/.next/static/chunks/app/api/repositories/[id]/route-9247d6b9d647f750.js +0 -1
  407. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-9247d6b9d647f750.js +0 -1
  408. package/.next/static/chunks/app/api/repositories/[id]/todos/route-9247d6b9d647f750.js +0 -1
  409. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-9247d6b9d647f750.js +0 -1
  410. package/.next/static/chunks/app/api/repositories/clone/route-9247d6b9d647f750.js +0 -1
  411. package/.next/static/chunks/app/api/repositories/excluded/route-9247d6b9d647f750.js +0 -1
  412. package/.next/static/chunks/app/api/repositories/restore/route-9247d6b9d647f750.js +0 -1
  413. package/.next/static/chunks/app/api/repositories/route-9247d6b9d647f750.js +0 -1
  414. package/.next/static/chunks/app/api/repositories/scan/route-9247d6b9d647f750.js +0 -1
  415. package/.next/static/chunks/app/api/repositories/sync/route-9247d6b9d647f750.js +0 -1
  416. package/.next/static/chunks/app/api/repositories/validate-path/route-9247d6b9d647f750.js +0 -1
  417. package/.next/static/chunks/app/api/sidebar/group-order/route-9247d6b9d647f750.js +0 -1
  418. package/.next/static/chunks/app/api/skills/[id]/route-9247d6b9d647f750.js +0 -1
  419. package/.next/static/chunks/app/api/skills/installations/route-9247d6b9d647f750.js +0 -1
  420. package/.next/static/chunks/app/api/skills/operations/route-9247d6b9d647f750.js +0 -1
  421. package/.next/static/chunks/app/api/skills/reindex/route-9247d6b9d647f750.js +0 -1
  422. package/.next/static/chunks/app/api/skills/route-9247d6b9d647f750.js +0 -1
  423. package/.next/static/chunks/app/api/slash-commands/route-9247d6b9d647f750.js +0 -1
  424. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-9247d6b9d647f750.js +0 -1
  425. package/.next/static/chunks/app/api/tasks/[taskId]/route-9247d6b9d647f750.js +0 -1
  426. package/.next/static/chunks/app/api/templates/[id]/route-9247d6b9d647f750.js +0 -1
  427. package/.next/static/chunks/app/api/templates/route-9247d6b9d647f750.js +0 -1
  428. package/.next/static/chunks/app/api/todos/route-9247d6b9d647f750.js +0 -1
  429. package/.next/static/chunks/app/api/verification/runs/[runId]/route-9247d6b9d647f750.js +0 -1
  430. package/.next/static/chunks/app/api/verification/runs/route-9247d6b9d647f750.js +0 -1
  431. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-9247d6b9d647f750.js +0 -1
  432. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-9247d6b9d647f750.js +0 -1
  433. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-9247d6b9d647f750.js +0 -1
  434. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-9247d6b9d647f750.js +0 -1
  435. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-9247d6b9d647f750.js +0 -1
  436. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-9247d6b9d647f750.js +0 -1
  437. package/.next/static/chunks/app/api/worktrees/[id]/env/route-9247d6b9d647f750.js +0 -1
  438. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-9247d6b9d647f750.js +0 -1
  439. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-9247d6b9d647f750.js +0 -1
  440. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-9247d6b9d647f750.js +0 -1
  441. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-9247d6b9d647f750.js +0 -1
  442. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-9247d6b9d647f750.js +0 -1
  443. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-9247d6b9d647f750.js +0 -1
  444. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-9247d6b9d647f750.js +0 -1
  445. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-9247d6b9d647f750.js +0 -1
  446. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-9247d6b9d647f750.js +0 -1
  447. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-9247d6b9d647f750.js +0 -1
  448. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-9247d6b9d647f750.js +0 -1
  449. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-9247d6b9d647f750.js +0 -1
  450. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-9247d6b9d647f750.js +0 -1
  451. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-9247d6b9d647f750.js +0 -1
  452. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-9247d6b9d647f750.js +0 -1
  453. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-9247d6b9d647f750.js +0 -1
  454. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-9247d6b9d647f750.js +0 -1
  455. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-9247d6b9d647f750.js +0 -1
  456. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-9247d6b9d647f750.js +0 -1
  457. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-9247d6b9d647f750.js +0 -1
  458. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-9247d6b9d647f750.js +0 -1
  459. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-9247d6b9d647f750.js +0 -1
  460. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-9247d6b9d647f750.js +0 -1
  461. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-9247d6b9d647f750.js +0 -1
  462. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-9247d6b9d647f750.js +0 -1
  463. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-9247d6b9d647f750.js +0 -1
  464. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-9247d6b9d647f750.js +0 -1
  465. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-9247d6b9d647f750.js +0 -1
  466. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-9247d6b9d647f750.js +0 -1
  467. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-9247d6b9d647f750.js +0 -1
  468. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-9247d6b9d647f750.js +0 -1
  469. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-9247d6b9d647f750.js +0 -1
  470. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-9247d6b9d647f750.js +0 -1
  471. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-9247d6b9d647f750.js +0 -1
  472. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-9247d6b9d647f750.js +0 -1
  473. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-9247d6b9d647f750.js +0 -1
  474. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-9247d6b9d647f750.js +0 -1
  475. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-9247d6b9d647f750.js +0 -1
  476. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-9247d6b9d647f750.js +0 -1
  477. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-9247d6b9d647f750.js +0 -1
  478. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-9247d6b9d647f750.js +0 -1
  479. package/.next/static/chunks/app/api/worktrees/[id]/route-9247d6b9d647f750.js +0 -1
  480. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-9247d6b9d647f750.js +0 -1
  481. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-9247d6b9d647f750.js +0 -1
  482. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-9247d6b9d647f750.js +0 -1
  483. package/.next/static/chunks/app/api/worktrees/[id]/search/route-9247d6b9d647f750.js +0 -1
  484. package/.next/static/chunks/app/api/worktrees/[id]/send/route-9247d6b9d647f750.js +0 -1
  485. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-9247d6b9d647f750.js +0 -1
  486. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-9247d6b9d647f750.js +0 -1
  487. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-9247d6b9d647f750.js +0 -1
  488. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-9247d6b9d647f750.js +0 -1
  489. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-9247d6b9d647f750.js +0 -1
  490. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-9247d6b9d647f750.js +0 -1
  491. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-9247d6b9d647f750.js +0 -1
  492. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-9247d6b9d647f750.js +0 -1
  493. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-9247d6b9d647f750.js +0 -1
  494. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-9247d6b9d647f750.js +0 -1
  495. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-9247d6b9d647f750.js +0 -1
  496. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-9247d6b9d647f750.js +0 -1
  497. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-9247d6b9d647f750.js +0 -1
  498. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-9247d6b9d647f750.js +0 -1
  499. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-9247d6b9d647f750.js +0 -1
  500. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-9247d6b9d647f750.js +0 -1
  501. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-9247d6b9d647f750.js +0 -1
  502. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-9247d6b9d647f750.js +0 -1
  503. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-9247d6b9d647f750.js +0 -1
  504. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-9247d6b9d647f750.js +0 -1
  505. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-9247d6b9d647f750.js +0 -1
  506. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-9247d6b9d647f750.js +0 -1
  507. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-9247d6b9d647f750.js +0 -1
  508. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-9247d6b9d647f750.js +0 -1
  509. package/.next/static/chunks/app/api/worktrees/route-9247d6b9d647f750.js +0 -1
  510. package/.next/static/chunks/app/login/page-adc51f0f7cbb7ac6.js +0 -1
  511. package/.next/static/chunks/app/manifest.webmanifest/route-9247d6b9d647f750.js +0 -1
  512. package/.next/static/chunks/app/proxy/[...path]/route-9247d6b9d647f750.js +0 -1
  513. package/.next/static/chunks/app/worktrees/[id]/layout-9247d6b9d647f750.js +0 -1
  514. package/.next/static/chunks/webpack-6a9668cf54a26eba.js +0 -1
  515. package/.next/static/css/98722bc4152cedcc.css +0 -1
  516. /package/.next/static/{0GHE2JGlFzqvSBZAcBFSt → uulKcSOgyxChTo4SipUSF}/_ssgManifest.js +0 -0
@@ -0,0 +1,619 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cloudflareProvider = exports.defaultCloudflareDeps = exports.STDERR_CAPTURE_LIMIT = exports.METRICS_REQUEST_TIMEOUT_MS = exports.DEFAULT_QUICK_TUNNEL_TIMING = exports.DETECT_TIMEOUT_MS = exports.CLOUDFLARED_LOG_NAME = exports.CLOUDFLARED_PIDFILE_NAME = exports.QUICK_TUNNEL_SUFFIX = exports.LOOPBACK_HOST = exports.CLOUDFLARED_VERSION_ARG = exports.CLOUDFLARED_BIN = void 0;
4
+ exports.buildQuickTunnelArgs = buildQuickTunnelArgs;
5
+ exports.buildQuickTunnelSpawnOptions = buildQuickTunnelSpawnOptions;
6
+ exports.openStderrLog = openStderrLog;
7
+ exports.isQuickTunnelHostname = isQuickTunnelHostname;
8
+ exports.parseQuickTunnelHostname = parseQuickTunnelHostname;
9
+ exports.parseBannerUrl = parseBannerUrl;
10
+ exports.findFreeLoopbackPort = findFreeLoopbackPort;
11
+ exports.fetchQuickTunnelHostname = fetchQuickTunnelHostname;
12
+ exports.resolveCloudflareStateDir = resolveCloudflareStateDir;
13
+ exports.createCloudflareProvider = createCloudflareProvider;
14
+ /**
15
+ * Cloudflare Quick Tunnel Provider (Issue #1937, R2).
16
+ *
17
+ * Implements §6.4 of `docs/design/remote-qr-pairing-1937.md`. Everything below
18
+ * that says "measured" was measured on 2026-08-29 against cloudflared 2025.4.0;
19
+ * the raw capture is in `dev-reports/issue/1937/u3-quicktunnel-url.md`.
20
+ *
21
+ * ## Three properties this file is responsible for
22
+ *
23
+ * 1. **Nothing but loopback is ever exposed.** `LOOPBACK_HOST` is a constant and
24
+ * is never derived from an argument, so neither the upstream nor the metrics
25
+ * listener can be pointed anywhere else. That matters twice over for
26
+ * `--metrics`: `cloudflared tunnel --help` says its default address "binds to
27
+ * all interfaces" under a virtual environment. CommandMate defaults `CM_BIND`
28
+ * to 127.0.0.1, and opening a hole in the Provider's own diagnostics port
29
+ * would give that back.
30
+ *
31
+ * 2. **`stop()` only signals the process this module started.** A Quick Tunnel
32
+ * writes no persistent Provider configuration, so `preexisting` is `null` and
33
+ * `owned.revert` is `null`; the whole teardown is one SIGTERM to `owned.pid`.
34
+ * Measured: the process is gone in about a second and the public URL then
35
+ * answers HTTP 530. There is no reason to reach for any command that acts on
36
+ * "every tunnel this machine knows about", and
37
+ * `tests/unit/config/remote-destructive-command-guard.test.ts` forbids it.
38
+ * This is not hypothetical — the machine this was measured on had a named
39
+ * tunnel of the user's own running for nine days at the time.
40
+ *
41
+ * 3. **The URL comes from the metrics API first.** Measured order: the stderr
42
+ * banner appears at t+3s, the metrics server only at t+4s. So a loop that
43
+ * tried both every round would find the banner first every single time and
44
+ * `/quicktunnel` would be dead code. `METRICS_PREFERENCE_WINDOW_MS` is what
45
+ * keeps the first candidate actually first: for that long, only the metrics
46
+ * route is consulted.
47
+ *
48
+ * 4. **The tunnel outlives the CLI that started it.** `commandmate remote up`
49
+ * exits as soon as it has a URL — measured at about 6.5 seconds, taken from
50
+ * the metrics API. cloudflared has to still be there afterwards, because the
51
+ * whole point is a QR code someone reads with a phone a minute later. Two
52
+ * things make that true, and Issue #2146 is what happens without them:
53
+ * cloudflared's stderr goes to a **file descriptor, never a pipe**, and the
54
+ * child is spawned `detached` and `unref`ed.
55
+ *
56
+ * Measured (Issue #2146, `docs/qa/1937-remote-uat-record.md` D-1): with
57
+ * `stdio: ['ignore', 'ignore', 'pipe']` the child was dead within two
58
+ * seconds of the parent exiting, and the public URL answered HTTP 530 before
59
+ * the QR code could be read. The parent's exit closes the read end of that
60
+ * pipe; cloudflared is Go, does not ignore SIGPIPE, and dies on its next
61
+ * write to fd 2 — which, at t+6.5s, is still mid log-burst. The same argv
62
+ * with a parent kept alive for 70 seconds gave a child that lived 70
63
+ * seconds, so this is the plumbing and not cloudflared giving up.
64
+ *
65
+ * `'ignore'` would also have fixed it and is the wrong fix: it takes fd 2
66
+ * away entirely, and fd 2 is where both the **second URL candidate**
67
+ * (`parseBannerUrl`) and every failure diagnostic (`stderrTail`) come from.
68
+ * A file keeps both — nothing closes when the CLI exits, and the parser and
69
+ * the diagnostic read it back by path. `--logfile` was the other candidate:
70
+ * it covers cloudflared's own log lines but not anything the Go runtime or
71
+ * the loader writes straight to fd 2, so fd 2 would still have been a pipe.
72
+ * `'ignore'` for fd 2 is what this falls back to only when the log file
73
+ * cannot be opened at all: a diagnostic is worth less than a working tunnel.
74
+ *
75
+ * Deliberately absent: the approval prompt. Creating a public URL is an
76
+ * irreversible, user-facing decision, and §6.2 puts it in the orchestrator that
77
+ * owns `src/cli/commands/remote.ts` — the same code that knows whether the
78
+ * session is interactive and whether `--yes` was passed.
79
+ *
80
+ * This module imports Node builtins and `./types` only. No `@/` alias, so the
81
+ * orchestrator can pull it into the `tsconfig.cli.json` build (which sets
82
+ * `paths: {}`) without the import failing to resolve.
83
+ */
84
+ const child_process_1 = require("child_process");
85
+ const fs_1 = require("fs");
86
+ const net_1 = require("net");
87
+ const http_1 = require("http");
88
+ const os_1 = require("os");
89
+ const path_1 = require("path");
90
+ const types_1 = require("./types");
91
+ /** The executable. Looked up on PATH by `spawn`, never through a shell. */
92
+ exports.CLOUDFLARED_BIN = 'cloudflared';
93
+ /** Mirrors `PreflightChecker.checkDependency()`: one flag, passed as an array. */
94
+ exports.CLOUDFLARED_VERSION_ARG = '--version';
95
+ /**
96
+ * The only host this Provider ever names.
97
+ *
98
+ * A constant rather than a parameter on purpose: "the upstream is always
99
+ * loopback" is then a property of the code, not of every call site. §9.2 pins it
100
+ * from the outside as well, by asserting the argv `start()` builds.
101
+ */
102
+ exports.LOOPBACK_HOST = '127.0.0.1';
103
+ /** Quick Tunnel hostnames live under this suffix, and nothing else does. */
104
+ exports.QUICK_TUNNEL_SUFFIX = 'trycloudflare.com';
105
+ /** Written next to the rest of CommandMate's state, for humans and for `ps`. */
106
+ exports.CLOUDFLARED_PIDFILE_NAME = 'cloudflared.pid';
107
+ /**
108
+ * Where cloudflared's stderr goes. Beside the pidfile, and for the same reason:
109
+ * a human who wants to know what the tunnel is doing should be able to find it.
110
+ *
111
+ * A fixed name, like the pidfile, so one `remote` session at a time is the
112
+ * assumption in both places rather than in one of them.
113
+ */
114
+ exports.CLOUDFLARED_LOG_NAME = 'cloudflared.log';
115
+ /** Same 5s budget `PreflightChecker` gives every other dependency probe. */
116
+ exports.DETECT_TIMEOUT_MS = 5_000;
117
+ exports.DEFAULT_QUICK_TUNNEL_TIMING = {
118
+ urlWaitMs: 30_000,
119
+ metricsPreferenceMs: 5_000,
120
+ pollIntervalMs: 250,
121
+ };
122
+ /** Per-request budget for the loopback metrics call. */
123
+ exports.METRICS_REQUEST_TIMEOUT_MS = 1_000;
124
+ /**
125
+ * How much of the stderr log is read back, so a chatty reconnect loop cannot
126
+ * make either consumer grow unbounded.
127
+ *
128
+ * The **tail**, not the head: `parseBannerUrl` takes the last match on purpose
129
+ * (a reconnect banner should win), and `stderrTail` wants the last few lines.
130
+ */
131
+ exports.STDERR_CAPTURE_LIMIT = 64 * 1024;
132
+ /**
133
+ * The argv for one Quick Tunnel.
134
+ *
135
+ * `LOOPBACK_HOST` appears twice and is a constant both times. `port` is the only
136
+ * caller-supplied value that reaches the command line, and it is validated as a
137
+ * port number before it gets here.
138
+ */
139
+ function buildQuickTunnelArgs(opts) {
140
+ return [
141
+ 'tunnel',
142
+ '--url',
143
+ `http://${exports.LOOPBACK_HOST}:${opts.port}`,
144
+ '--no-autoupdate',
145
+ '--metrics',
146
+ `${exports.LOOPBACK_HOST}:${opts.metricsPort}`,
147
+ '--pidfile',
148
+ opts.pidfile,
149
+ ];
150
+ }
151
+ /**
152
+ * The spawn options for one Quick Tunnel. Issue #2146 is entirely about these.
153
+ *
154
+ * `stderr` is a **file descriptor**, or `'ignore'` when the log file could not
155
+ * be opened. It is never `'pipe'`: a pipe's read end belongs to `commandmate
156
+ * remote`, which exits as soon as it has the URL, and cloudflared then dies of
157
+ * SIGPIPE on its next write to fd 2. See the file header for the measurement.
158
+ *
159
+ * `detached: true` puts the child in its own session. Without it, a Ctrl-C in
160
+ * the terminal that launched the CLI reaches cloudflared too — the tunnel is
161
+ * supposed to outlive the command, so it must not share its process group.
162
+ * `stop()` is unaffected: it signals a **positive** pid, which is one process,
163
+ * not a group, so detaching changes nothing about teardown.
164
+ */
165
+ function buildQuickTunnelSpawnOptions(stderr) {
166
+ const stdio = ['ignore', 'ignore', stderr];
167
+ return { detached: true, stdio };
168
+ }
169
+ /** What `openStderrLog()` falls back to: no log, and still a working tunnel. */
170
+ const SILENT_STDERR_LOG = {
171
+ stdio: 'ignore',
172
+ path: null,
173
+ read: () => '',
174
+ close: () => {
175
+ // Nothing was opened, so there is nothing to close.
176
+ },
177
+ };
178
+ /**
179
+ * Reads the last `limit` bytes of a log file.
180
+ *
181
+ * The tail rather than the head, because both consumers want the end: the
182
+ * banner parser takes the last match so a reconnect wins, and the diagnostic
183
+ * wants the last few lines. Never throws — a log that cannot be read is a
184
+ * missing diagnostic, not a failed tunnel.
185
+ */
186
+ function readLogTail(logPath, limit) {
187
+ let fd = null;
188
+ try {
189
+ fd = (0, fs_1.openSync)(logPath, 'r');
190
+ const { size } = (0, fs_1.fstatSync)(fd);
191
+ const start = size > limit ? size - limit : 0;
192
+ const length = size - start;
193
+ if (length <= 0)
194
+ return '';
195
+ const buffer = Buffer.alloc(length);
196
+ const bytes = (0, fs_1.readSync)(fd, buffer, 0, length, start);
197
+ // A tail can start mid-codepoint. cloudflared logs ASCII, and at worst one
198
+ // leading character is mangled; neither consumer anchors on the first byte.
199
+ return buffer.subarray(0, bytes).toString('utf-8');
200
+ }
201
+ catch {
202
+ return '';
203
+ }
204
+ finally {
205
+ if (fd !== null) {
206
+ try {
207
+ (0, fs_1.closeSync)(fd);
208
+ }
209
+ catch {
210
+ // Already closed.
211
+ }
212
+ }
213
+ }
214
+ }
215
+ /**
216
+ * Opens the file cloudflared's stderr is redirected into.
217
+ *
218
+ * Truncating (`'w'`) rather than appending, because `parseBannerUrl()` takes the
219
+ * last URL in the buffer and a previous session's banner names a tunnel that no
220
+ * longer exists. Starting from empty means the only banner that can be read is
221
+ * this session's.
222
+ *
223
+ * Returns `SILENT_STDERR_LOG` rather than throwing when the file cannot be
224
+ * opened: `start()` still has `/quicktunnel` — the *first* URL candidate — and
225
+ * a tunnel with no diagnostics beats no tunnel.
226
+ */
227
+ function openStderrLog(logPath) {
228
+ let fd;
229
+ try {
230
+ fd = (0, fs_1.openSync)(logPath, 'w', 0o600);
231
+ }
232
+ catch {
233
+ return SILENT_STDERR_LOG;
234
+ }
235
+ let open = true;
236
+ return {
237
+ stdio: fd,
238
+ path: logPath,
239
+ read: () => readLogTail(logPath, exports.STDERR_CAPTURE_LIMIT),
240
+ close: () => {
241
+ if (!open)
242
+ return;
243
+ open = false;
244
+ try {
245
+ (0, fs_1.closeSync)(fd);
246
+ }
247
+ catch {
248
+ // The child holds its own duplicate either way.
249
+ }
250
+ },
251
+ };
252
+ }
253
+ /** `QUICK_TUNNEL_SUFFIX` as a regex fragment, so the suffix has one definition. */
254
+ const SUFFIX_PATTERN = exports.QUICK_TUNNEL_SUFFIX.replace(/\./g, '\\.');
255
+ /** One DNS label, the shape cloudflared hands out (`four-random-words`). */
256
+ const LABEL_PATTERN = '[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?';
257
+ /** A single-label Quick Tunnel hostname, e.g. `four-random-words.<suffix>`. */
258
+ const QUICK_TUNNEL_HOSTNAME = new RegExp(`^${LABEL_PATTERN}\\.${SUFFIX_PATTERN}$`);
259
+ /** True for a hostname cloudflared could actually have handed out. */
260
+ function isQuickTunnelHostname(value) {
261
+ return QUICK_TUNNEL_HOSTNAME.test(value);
262
+ }
263
+ /**
264
+ * Reads the hostname out of a `/quicktunnel` response body.
265
+ *
266
+ * Measured body: `{"hostname":"villas-activists-hey-barbie.trycloudflare.com"}`
267
+ * — served as `text/plain`, and **without a scheme**, so the `https://` is ours
268
+ * to add. The shape is checked before it is used because this string becomes the
269
+ * QR code a phone is asked to open; a value that is not a Quick Tunnel hostname
270
+ * is treated as no answer rather than as a destination.
271
+ */
272
+ function parseQuickTunnelHostname(body) {
273
+ let parsed;
274
+ try {
275
+ parsed = JSON.parse(body);
276
+ }
277
+ catch {
278
+ return null;
279
+ }
280
+ if (typeof parsed !== 'object' || parsed === null)
281
+ return null;
282
+ const hostname = parsed.hostname;
283
+ if (typeof hostname !== 'string')
284
+ return null;
285
+ const trimmed = hostname.trim();
286
+ return isQuickTunnelHostname(trimmed) ? trimmed : null;
287
+ }
288
+ /**
289
+ * Second candidate: the URL cloudflared prints on stderr.
290
+ *
291
+ * Anchored on the **shape of the URL**, not on the surrounding words. Two
292
+ * measured facts drive that. The banner text and the URL are on *different*
293
+ * lines — the URL sits alone inside a box-drawn frame — so "read what follows
294
+ * `Visit it at`" does not work against the real output. And the wording is
295
+ * exactly the part Cloudflare is free to reword, while the hostname suffix is
296
+ * the service's identity.
297
+ *
298
+ * The same stderr also carries `https://www.cloudflare.com/website-terms/` and
299
+ * `https://developers.cloudflare.com/...`; neither ends in the Quick Tunnel
300
+ * suffix, and the `Requesting new quick Tunnel on trycloudflare.com...` line has
301
+ * no scheme. All three are negative controls in the unit test.
302
+ *
303
+ * The last match wins, so a reconnect that prints a fresher banner is preferred.
304
+ */
305
+ function parseBannerUrl(stderr) {
306
+ const pattern = new RegExp(`https://${LABEL_PATTERN}\\.${SUFFIX_PATTERN}`, 'g');
307
+ const matches = stderr.match(pattern);
308
+ if (matches === null || matches.length === 0)
309
+ return null;
310
+ return matches[matches.length - 1];
311
+ }
312
+ /** Rejects anything that could not be a TCP port before it reaches argv. */
313
+ function assertUpstreamPort(port) {
314
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
315
+ throw new Error(`cloudflare-quick: upstream port must be 1-65535, got ${String(port)}`);
316
+ }
317
+ }
318
+ /**
319
+ * Asks the OS for a free port on loopback and hands it back unheld.
320
+ *
321
+ * Binding the probe to `LOOPBACK_HOST` rather than to every interface is part of
322
+ * the same guarantee as the `--metrics` argument: the port this returns is one
323
+ * that is free *on loopback*, which is the only place it will be used.
324
+ */
325
+ function findFreeLoopbackPort() {
326
+ return new Promise((resolve, reject) => {
327
+ const server = (0, net_1.createServer)();
328
+ server.unref();
329
+ server.once('error', reject);
330
+ server.listen(0, exports.LOOPBACK_HOST, () => {
331
+ const address = server.address();
332
+ if (address === null || typeof address === 'string') {
333
+ server.close(() => reject(new Error('cloudflare-quick: could not read a free port')));
334
+ return;
335
+ }
336
+ const { port } = address;
337
+ server.close(() => resolve(port));
338
+ });
339
+ });
340
+ }
341
+ /**
342
+ * `GET http://127.0.0.1:<metricsPort>/quicktunnel`.
343
+ *
344
+ * Never rejects: "no answer yet" and "no such route" are both normal during the
345
+ * poll, and neither should look different from a slow start.
346
+ */
347
+ function fetchQuickTunnelHostname(metricsPort, timeoutMs = exports.METRICS_REQUEST_TIMEOUT_MS) {
348
+ return new Promise((resolve) => {
349
+ let settled = false;
350
+ const settle = (value) => {
351
+ if (settled)
352
+ return;
353
+ settled = true;
354
+ resolve(value);
355
+ };
356
+ const request = (0, http_1.get)({ host: exports.LOOPBACK_HOST, port: metricsPort, path: '/quicktunnel', timeout: timeoutMs }, (response) => {
357
+ if (response.statusCode !== 200) {
358
+ response.resume();
359
+ settle(null);
360
+ return;
361
+ }
362
+ response.setEncoding('utf-8');
363
+ let body = '';
364
+ response.on('data', (chunk) => {
365
+ if (body.length < 4096)
366
+ body += chunk;
367
+ });
368
+ response.on('end', () => settle(parseQuickTunnelHostname(body)));
369
+ response.on('error', () => settle(null));
370
+ });
371
+ request.on('timeout', () => request.destroy(new Error('metrics request timed out')));
372
+ request.on('error', () => settle(null));
373
+ request.on('close', () => settle(null));
374
+ });
375
+ }
376
+ /**
377
+ * Where the pidfile goes: the same `~/.commandmate` the rest of CommandMate
378
+ * uses.
379
+ *
380
+ * Not read from the environment. §6.2 keeps state-file locations out of
381
+ * Providers, and an env-supplied directory would also have to defend against the
382
+ * `/proc` recursive-mkdir hang that `resolveSafeDirectory()` exists for. Tests
383
+ * override it through `CloudflareProviderDeps` instead.
384
+ */
385
+ function resolveCloudflareStateDir() {
386
+ return (0, path_1.join)((0, os_1.homedir)(), '.commandmate');
387
+ }
388
+ function sleep(ms) {
389
+ return new Promise((resolve) => {
390
+ setTimeout(resolve, ms);
391
+ });
392
+ }
393
+ function describeExit(exit) {
394
+ if (exit.signal !== null)
395
+ return `killed by ${exit.signal}`;
396
+ return `exit code ${exit.code === null ? 'unknown' : String(exit.code)}`;
397
+ }
398
+ /** Last few stderr lines, capped, so a failure says something useful. */
399
+ function stderrTail(stderr) {
400
+ const lines = stderr
401
+ .split('\n')
402
+ .map((line) => line.trim())
403
+ .filter((line) => line.length > 0)
404
+ .slice(-5);
405
+ if (lines.length === 0)
406
+ return '';
407
+ return `; last output: ${lines.join(' | ').slice(0, 400)}`;
408
+ }
409
+ exports.defaultCloudflareDeps = {
410
+ spawn: child_process_1.spawn,
411
+ spawnSync: child_process_1.spawnSync,
412
+ kill: (pid, signal) => {
413
+ process.kill(pid, signal);
414
+ },
415
+ findFreePort: findFreeLoopbackPort,
416
+ fetchHostname: (metricsPort) => fetchQuickTunnelHostname(metricsPort),
417
+ resolveStateDir: resolveCloudflareStateDir,
418
+ timing: exports.DEFAULT_QUICK_TUNNEL_TIMING,
419
+ };
420
+ /**
421
+ * Builds the Provider.
422
+ *
423
+ * The returned object has exactly the four members `RemoteProvider` declares —
424
+ * the seams stay closed over in here rather than becoming a fifth key, because
425
+ * the contract test pins that list and §6.3-1 is the reason it does.
426
+ */
427
+ function createCloudflareProvider(overrides = {}) {
428
+ const deps = { ...exports.defaultCloudflareDeps, ...overrides };
429
+ return {
430
+ id: 'cloudflare-quick',
431
+ async detect() {
432
+ let result;
433
+ try {
434
+ // Array args, no `shell`. MF-SEC-1, and the same call shape as
435
+ // `PreflightChecker.checkDependency()`.
436
+ result = deps.spawnSync(exports.CLOUDFLARED_BIN, [exports.CLOUDFLARED_VERSION_ARG], {
437
+ encoding: 'utf-8',
438
+ timeout: exports.DETECT_TIMEOUT_MS,
439
+ });
440
+ }
441
+ catch (error) {
442
+ return {
443
+ available: false,
444
+ ready: false,
445
+ reason: `cloudflared probe failed: ${messageOf(error)}`,
446
+ };
447
+ }
448
+ if (result.error) {
449
+ const code = result.error.code;
450
+ if (code === 'ENOENT') {
451
+ return { available: false, ready: false, reason: 'cloudflared is not installed' };
452
+ }
453
+ return {
454
+ available: false,
455
+ ready: false,
456
+ reason: `cloudflared probe failed: ${messageOf(result.error)}`,
457
+ };
458
+ }
459
+ if (result.status !== 0) {
460
+ return {
461
+ available: false,
462
+ ready: false,
463
+ reason: `cloudflared ${exports.CLOUDFLARED_VERSION_ARG} exited with ${String(result.status)}`,
464
+ };
465
+ }
466
+ const output = (result.stdout || result.stderr || '').trim();
467
+ const version = /(\d+\.\d+\.\d+)/.exec(output)?.[1];
468
+ // A Quick Tunnel needs no account, no login and no prior configuration, so
469
+ // "installed" and "usable right now" are the same question here. Tailscale
470
+ // is the Provider that has to answer them separately.
471
+ return version === undefined
472
+ ? { available: true, ready: true }
473
+ : { available: true, version, ready: true };
474
+ },
475
+ async start({ port, signal }) {
476
+ assertUpstreamPort(port);
477
+ if (signal.aborted) {
478
+ throw new Error('cloudflare-quick: aborted before cloudflared was started');
479
+ }
480
+ const metricsPort = await deps.findFreePort();
481
+ const stateDir = deps.resolveStateDir();
482
+ const pidfile = (0, path_1.join)(stateDir, exports.CLOUDFLARED_PIDFILE_NAME);
483
+ try {
484
+ (0, fs_1.mkdirSync)(stateDir, { recursive: true, mode: 0o700 });
485
+ }
486
+ catch {
487
+ // The pidfile is a convenience for humans and `ps`; `owned.pid` is what
488
+ // `stop()` actually uses. Not being able to create the directory is not
489
+ // a reason to refuse to go remote.
490
+ }
491
+ const args = buildQuickTunnelArgs({ port, metricsPort, pidfile });
492
+ const stderrLog = openStderrLog((0, path_1.join)(stateDir, exports.CLOUDFLARED_LOG_NAME));
493
+ let child;
494
+ try {
495
+ child = deps.spawn(exports.CLOUDFLARED_BIN, args, buildQuickTunnelSpawnOptions(stderrLog.stdio));
496
+ }
497
+ finally {
498
+ // `spawn` duplicates the descriptor into the child before it returns, so
499
+ // this copy has no remaining job. Keeping it would tie fd 2's lifetime
500
+ // to the CLI's, which is the mistake Issue #2146 is about.
501
+ stderrLog.close();
502
+ }
503
+ // The tunnel has to outlive `commandmate remote`, which exits as soon as
504
+ // it has a URL. `unref()` means the CLI's event loop is not held open by a
505
+ // child it never intends to wait for.
506
+ child.unref();
507
+ const state = { exit: null };
508
+ child.once('exit', (code, exitSignal) => {
509
+ state.exit = { code, signal: exitSignal };
510
+ });
511
+ const pid = child.pid;
512
+ if (pid === undefined) {
513
+ child.kill('SIGTERM');
514
+ throw new Error('cloudflare-quick: cloudflared could not be started (no pid)');
515
+ }
516
+ let url;
517
+ try {
518
+ url = await waitForQuickTunnelUrl({
519
+ metricsPort,
520
+ signal,
521
+ timing: deps.timing,
522
+ fetchHostname: deps.fetchHostname,
523
+ readStderr: () => stderrLog.read(),
524
+ readExit: () => state.exit,
525
+ });
526
+ }
527
+ catch (error) {
528
+ // Nothing usable came back, so the child is ours to clean up and no
529
+ // handle ever reaches the caller that could have done it for us.
530
+ child.kill('SIGTERM');
531
+ throw error;
532
+ }
533
+ return {
534
+ provider: 'cloudflare-quick',
535
+ url,
536
+ // `revert: null` is the honest answer, not a placeholder: a Quick Tunnel
537
+ // leaves nothing behind to undo. The process is the whole of it.
538
+ owned: { pid, revert: null },
539
+ // No persistent Provider configuration exists, so there is nothing for
540
+ // §6.3-2 to protect. `planStop()` reads this as "protects nothing",
541
+ // which is right here and wrong for Tailscale — which is why the two
542
+ // Providers answer it differently instead of sharing a default.
543
+ preexisting: null,
544
+ };
545
+ },
546
+ async stop(handle) {
547
+ // Routed through the shared rule even though this Provider never has
548
+ // revert entries, so the two Providers cannot drift apart on §6.3-2.
549
+ const plan = (0, types_1.planStop)(handle);
550
+ const warnings = [];
551
+ for (const key of Object.keys(plan.revert)) {
552
+ // Unreachable for a handle this Provider produced. If it ever fires,
553
+ // something built a handle by hand — say it out loud rather than
554
+ // inventing an undo step for a key with no defined meaning.
555
+ warnings.push(`cloudflare-quick: no revert step for "${key}"; left in place`);
556
+ }
557
+ const pid = handle.owned.pid;
558
+ if (pid !== null) {
559
+ try {
560
+ // The entire teardown. Measured: cloudflared exits in about a second
561
+ // and the public URL immediately starts answering HTTP 530.
562
+ deps.kill(pid, 'SIGTERM');
563
+ }
564
+ catch (error) {
565
+ if (error.code === 'ESRCH') {
566
+ // Already gone. That is the goal state, so it is a success, not a
567
+ // warning — the same posture `stop.ts` takes toward a stale PID.
568
+ }
569
+ else {
570
+ warnings.push(`cloudflare-quick: could not signal pid ${String(pid)}: ${messageOf(error)}`);
571
+ }
572
+ }
573
+ }
574
+ return { reverted: warnings.length === 0, skipped: plan.skipped, warnings };
575
+ },
576
+ };
577
+ }
578
+ async function waitForQuickTunnelUrl(params) {
579
+ const { metricsPort, signal, timing, fetchHostname, readStderr, readExit } = params;
580
+ const startedAt = Date.now();
581
+ const deadline = startedAt + timing.urlWaitMs;
582
+ const bannerAllowedAt = startedAt + timing.metricsPreferenceMs;
583
+ for (;;) {
584
+ if (signal.aborted) {
585
+ throw new Error('cloudflare-quick: aborted while waiting for the public URL');
586
+ }
587
+ const hostname = await fetchHostname(metricsPort);
588
+ let candidate = hostname === null ? null : `https://${hostname}`;
589
+ // The banner is only consulted once the metrics route has had its window.
590
+ // Measured: cloudflared prints the banner about a second *before* it starts
591
+ // the metrics server, so without the window the second candidate would win
592
+ // every race and the first would never run.
593
+ if (candidate === null && Date.now() >= bannerAllowedAt) {
594
+ candidate = parseBannerUrl(readStderr());
595
+ }
596
+ // Re-read the exit state before handing a URL back. The `await` above spans
597
+ // real time, and a URL scraped from a process that has since exited names a
598
+ // tunnel nobody is serving — a QR code for a dead endpoint is worse than an
599
+ // error. Checked after the candidate rather than before it so a child that
600
+ // dies mid-poll cannot slip a stale URL through.
601
+ const exit = readExit();
602
+ if (exit !== null) {
603
+ throw new Error(`cloudflare-quick: cloudflared ${describeExit(exit)} before a public URL appeared` +
604
+ stderrTail(readStderr()));
605
+ }
606
+ if (candidate !== null)
607
+ return candidate;
608
+ if (Date.now() >= deadline) {
609
+ throw new Error(`cloudflare-quick: no public URL after ${String(timing.urlWaitMs)}ms` +
610
+ stderrTail(readStderr()));
611
+ }
612
+ await sleep(timing.pollIntervalMs);
613
+ }
614
+ }
615
+ function messageOf(error) {
616
+ return error instanceof Error ? error.message : String(error);
617
+ }
618
+ /** The shipped Provider, wired to the real `cloudflared`. */
619
+ exports.cloudflareProvider = createCloudflareProvider();
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Public surface of the remote Provider layer (Issue #1937, R1/R2/R3).
3
+ *
4
+ * Note what is not re-exported: there is no selection helper. The orchestrator
5
+ * that owns `src/cli/commands/remote.ts` (R9) applies the selection rule
6
+ * itself — see the header of `./provider-registry`.
7
+ *
8
+ * Both `CLOUDFLARE_NOT_IMPLEMENTED_REASON` (removed in R2) and
9
+ * `TAILSCALE_NOT_IMPLEMENTED_REASON` (removed here in R3) are gone for the same
10
+ * reason: both Providers are implemented, so a constant saying otherwise would
11
+ * be a lie a caller could still read and act on.
12
+ */
13
+ export { isPreexistingSnapshot, planStop, type PreexistingSnapshot, type ProviderDetection, type RemoteHandle, type RemoteProvider, type RemoteProviderId, type StopOutcome, type StopPlan, } from './types';
14
+ export { createRemoteProviders, detectRemoteProviders, REMOTE_PROVIDER_ORDER, type ProviderCandidate, } from './provider-registry';
15
+ export { buildQuickTunnelArgs, buildQuickTunnelSpawnOptions, CLOUDFLARED_BIN, CLOUDFLARED_LOG_NAME, CLOUDFLARED_PIDFILE_NAME, CLOUDFLARED_VERSION_ARG, cloudflareProvider, createCloudflareProvider, DEFAULT_QUICK_TUNNEL_TIMING, DETECT_TIMEOUT_MS, fetchQuickTunnelHostname, findFreeLoopbackPort, isQuickTunnelHostname, LOOPBACK_HOST, openStderrLog, parseBannerUrl, parseQuickTunnelHostname, QUICK_TUNNEL_SUFFIX, resolveCloudflareStateDir, STDERR_CAPTURE_LIMIT, type CloudflareProviderDeps, type QuickTunnelProcess, type QuickTunnelTiming, type StderrLog, } from './cloudflare';
16
+ export { BACKEND_STATE_RUNNING, buildServeArgs, buildServeOffArgs, buildServeUrl, createTailscaleProvider, DETECT_TIMEOUT_MS as TAILSCALE_DETECT_TIMEOUT_MS, LOOPBACK_HOST as TAILSCALE_LOOPBACK_HOST, normalizeDnsName, parseServeConfig, parseServeHandlerKey, readServeReadiness, SERVE_HTTPS_PORT, SERVE_PATH, SERVE_TIMEOUT_MS, serveHandlerKey, serveHandlerKeys, snapshotServeConfig, TAILSCALE_BIN, TAILSCALE_VERSION_ARG, tailscaleProvider, type ParsedServeHandlerKey, type ServeConfig, type ServeReadiness, type ServeTcpEntry, type ServeWebEntry, type TailscaleProviderDeps, type TailscaleStatus, } from './tailscale';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/remote/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,qBAAqB,EACrB,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,QAAQ,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,EAC3B,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,SAAS,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,uBAAuB,EACvB,iBAAiB,IAAI,2BAA2B,EAChD,aAAa,IAAI,uBAAuB,EACxC,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,aAAa,CAAC"}