@akiojin/gwt 4.12.2 → 5.1.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 (859) hide show
  1. package/README.ja.md +173 -203
  2. package/README.md +170 -212
  3. package/bin/gwt.js +42 -33
  4. package/package.json +20 -107
  5. package/scripts/postinstall.js +152 -0
  6. package/dist/claude-history.d.ts +0 -60
  7. package/dist/claude-history.d.ts.map +0 -1
  8. package/dist/claude-history.js +0 -606
  9. package/dist/claude-history.js.map +0 -1
  10. package/dist/claude.d.ts +0 -42
  11. package/dist/claude.d.ts.map +0 -1
  12. package/dist/claude.js +0 -451
  13. package/dist/claude.js.map +0 -1
  14. package/dist/cli/ui/App.solid.d.ts +0 -29
  15. package/dist/cli/ui/App.solid.d.ts.map +0 -1
  16. package/dist/cli/ui/App.solid.js +0 -1427
  17. package/dist/cli/ui/App.solid.js.map +0 -1
  18. package/dist/cli/ui/components/solid/Footer.d.ts +0 -10
  19. package/dist/cli/ui/components/solid/Footer.d.ts.map +0 -1
  20. package/dist/cli/ui/components/solid/Footer.js +0 -10
  21. package/dist/cli/ui/components/solid/Footer.js.map +0 -1
  22. package/dist/cli/ui/components/solid/Header.d.ts +0 -32
  23. package/dist/cli/ui/components/solid/Header.d.ts.map +0 -1
  24. package/dist/cli/ui/components/solid/Header.js +0 -13
  25. package/dist/cli/ui/components/solid/Header.js.map +0 -1
  26. package/dist/cli/ui/components/solid/HelpOverlay.d.ts +0 -8
  27. package/dist/cli/ui/components/solid/HelpOverlay.d.ts.map +0 -1
  28. package/dist/cli/ui/components/solid/HelpOverlay.js +0 -118
  29. package/dist/cli/ui/components/solid/HelpOverlay.js.map +0 -1
  30. package/dist/cli/ui/components/solid/QuickStartStep.d.ts +0 -17
  31. package/dist/cli/ui/components/solid/QuickStartStep.d.ts.map +0 -1
  32. package/dist/cli/ui/components/solid/QuickStartStep.js +0 -152
  33. package/dist/cli/ui/components/solid/QuickStartStep.js.map +0 -1
  34. package/dist/cli/ui/components/solid/SelectInput.d.ts +0 -22
  35. package/dist/cli/ui/components/solid/SelectInput.d.ts.map +0 -1
  36. package/dist/cli/ui/components/solid/SelectInput.js +0 -45
  37. package/dist/cli/ui/components/solid/SelectInput.js.map +0 -1
  38. package/dist/cli/ui/components/solid/TextInput.d.ts +0 -12
  39. package/dist/cli/ui/components/solid/TextInput.d.ts.map +0 -1
  40. package/dist/cli/ui/components/solid/TextInput.js +0 -9
  41. package/dist/cli/ui/components/solid/TextInput.js.map +0 -1
  42. package/dist/cli/ui/components/solid/WizardController.d.ts +0 -34
  43. package/dist/cli/ui/components/solid/WizardController.d.ts.map +0 -1
  44. package/dist/cli/ui/components/solid/WizardController.js +0 -269
  45. package/dist/cli/ui/components/solid/WizardController.js.map +0 -1
  46. package/dist/cli/ui/components/solid/WizardPopup.d.ts +0 -26
  47. package/dist/cli/ui/components/solid/WizardPopup.d.ts.map +0 -1
  48. package/dist/cli/ui/components/solid/WizardPopup.js +0 -68
  49. package/dist/cli/ui/components/solid/WizardPopup.js.map +0 -1
  50. package/dist/cli/ui/components/solid/WizardSteps.d.ts +0 -57
  51. package/dist/cli/ui/components/solid/WizardSteps.d.ts.map +0 -1
  52. package/dist/cli/ui/components/solid/WizardSteps.js +0 -442
  53. package/dist/cli/ui/components/solid/WizardSteps.js.map +0 -1
  54. package/dist/cli/ui/core/index.d.ts +0 -12
  55. package/dist/cli/ui/core/index.d.ts.map +0 -1
  56. package/dist/cli/ui/core/index.js +0 -15
  57. package/dist/cli/ui/core/index.js.map +0 -1
  58. package/dist/cli/ui/core/keybindings.d.ts +0 -106
  59. package/dist/cli/ui/core/keybindings.d.ts.map +0 -1
  60. package/dist/cli/ui/core/keybindings.js +0 -270
  61. package/dist/cli/ui/core/keybindings.js.map +0 -1
  62. package/dist/cli/ui/core/theme.d.ts +0 -123
  63. package/dist/cli/ui/core/theme.d.ts.map +0 -1
  64. package/dist/cli/ui/core/theme.js +0 -191
  65. package/dist/cli/ui/core/theme.js.map +0 -1
  66. package/dist/cli/ui/core/types.d.ts +0 -156
  67. package/dist/cli/ui/core/types.d.ts.map +0 -1
  68. package/dist/cli/ui/core/types.js +0 -10
  69. package/dist/cli/ui/core/types.js.map +0 -1
  70. package/dist/cli/ui/hooks/solid/useScrollableList.d.ts +0 -26
  71. package/dist/cli/ui/hooks/solid/useScrollableList.d.ts.map +0 -1
  72. package/dist/cli/ui/hooks/solid/useScrollableList.js +0 -89
  73. package/dist/cli/ui/hooks/solid/useScrollableList.js.map +0 -1
  74. package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts +0 -10
  75. package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts.map +0 -1
  76. package/dist/cli/ui/hooks/solid/useTerminalSize.js +0 -16
  77. package/dist/cli/ui/hooks/solid/useTerminalSize.js.map +0 -1
  78. package/dist/cli/ui/index.solid.d.ts +0 -5
  79. package/dist/cli/ui/index.solid.d.ts.map +0 -1
  80. package/dist/cli/ui/index.solid.js +0 -21
  81. package/dist/cli/ui/index.solid.js.map +0 -1
  82. package/dist/cli/ui/screens/solid/BranchListScreen.d.ts +0 -53
  83. package/dist/cli/ui/screens/solid/BranchListScreen.d.ts.map +0 -1
  84. package/dist/cli/ui/screens/solid/BranchListScreen.js +0 -829
  85. package/dist/cli/ui/screens/solid/BranchListScreen.js.map +0 -1
  86. package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts +0 -11
  87. package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts.map +0 -1
  88. package/dist/cli/ui/screens/solid/ConfirmScreen.js +0 -45
  89. package/dist/cli/ui/screens/solid/ConfirmScreen.js.map +0 -1
  90. package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts +0 -14
  91. package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts.map +0 -1
  92. package/dist/cli/ui/screens/solid/EnvironmentScreen.js +0 -90
  93. package/dist/cli/ui/screens/solid/EnvironmentScreen.js.map +0 -1
  94. package/dist/cli/ui/screens/solid/ErrorScreen.d.ts +0 -8
  95. package/dist/cli/ui/screens/solid/ErrorScreen.d.ts.map +0 -1
  96. package/dist/cli/ui/screens/solid/ErrorScreen.js +0 -18
  97. package/dist/cli/ui/screens/solid/ErrorScreen.js.map +0 -1
  98. package/dist/cli/ui/screens/solid/InputScreen.d.ts +0 -13
  99. package/dist/cli/ui/screens/solid/InputScreen.d.ts.map +0 -1
  100. package/dist/cli/ui/screens/solid/InputScreen.js +0 -17
  101. package/dist/cli/ui/screens/solid/InputScreen.js.map +0 -1
  102. package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts +0 -9
  103. package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts.map +0 -1
  104. package/dist/cli/ui/screens/solid/LoadingIndicator.js +0 -43
  105. package/dist/cli/ui/screens/solid/LoadingIndicator.js.map +0 -1
  106. package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts +0 -14
  107. package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts.map +0 -1
  108. package/dist/cli/ui/screens/solid/LogDetailScreen.js +0 -34
  109. package/dist/cli/ui/screens/solid/LogDetailScreen.js.map +0 -1
  110. package/dist/cli/ui/screens/solid/LogScreen.d.ts +0 -25
  111. package/dist/cli/ui/screens/solid/LogScreen.d.ts.map +0 -1
  112. package/dist/cli/ui/screens/solid/LogScreen.js +0 -333
  113. package/dist/cli/ui/screens/solid/LogScreen.js.map +0 -1
  114. package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts +0 -17
  115. package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts.map +0 -1
  116. package/dist/cli/ui/screens/solid/ProfileEnvScreen.js +0 -115
  117. package/dist/cli/ui/screens/solid/ProfileEnvScreen.js.map +0 -1
  118. package/dist/cli/ui/screens/solid/ProfileScreen.d.ts +0 -17
  119. package/dist/cli/ui/screens/solid/ProfileScreen.d.ts.map +0 -1
  120. package/dist/cli/ui/screens/solid/ProfileScreen.js +0 -50
  121. package/dist/cli/ui/screens/solid/ProfileScreen.js.map +0 -1
  122. package/dist/cli/ui/screens/solid/SelectorScreen.d.ts +0 -20
  123. package/dist/cli/ui/screens/solid/SelectorScreen.d.ts.map +0 -1
  124. package/dist/cli/ui/screens/solid/SelectorScreen.js +0 -98
  125. package/dist/cli/ui/screens/solid/SelectorScreen.js.map +0 -1
  126. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts +0 -13
  127. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts.map +0 -1
  128. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js +0 -59
  129. package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js.map +0 -1
  130. package/dist/cli/ui/stores/appStore.d.ts +0 -143
  131. package/dist/cli/ui/stores/appStore.d.ts.map +0 -1
  132. package/dist/cli/ui/stores/appStore.js +0 -158
  133. package/dist/cli/ui/stores/appStore.js.map +0 -1
  134. package/dist/cli/ui/stores/branchStore.d.ts +0 -159
  135. package/dist/cli/ui/stores/branchStore.d.ts.map +0 -1
  136. package/dist/cli/ui/stores/branchStore.js +0 -275
  137. package/dist/cli/ui/stores/branchStore.js.map +0 -1
  138. package/dist/cli/ui/stores/index.d.ts +0 -11
  139. package/dist/cli/ui/stores/index.d.ts.map +0 -1
  140. package/dist/cli/ui/stores/index.js +0 -14
  141. package/dist/cli/ui/stores/index.js.map +0 -1
  142. package/dist/cli/ui/stores/uiStore.d.ts +0 -146
  143. package/dist/cli/ui/stores/uiStore.d.ts.map +0 -1
  144. package/dist/cli/ui/stores/uiStore.js +0 -166
  145. package/dist/cli/ui/stores/uiStore.js.map +0 -1
  146. package/dist/cli/ui/types.d.ts +0 -293
  147. package/dist/cli/ui/types.d.ts.map +0 -1
  148. package/dist/cli/ui/types.js +0 -2
  149. package/dist/cli/ui/types.js.map +0 -1
  150. package/dist/cli/ui/utils/baseBranch.d.ts +0 -4
  151. package/dist/cli/ui/utils/baseBranch.d.ts.map +0 -1
  152. package/dist/cli/ui/utils/baseBranch.js +0 -17
  153. package/dist/cli/ui/utils/baseBranch.js.map +0 -1
  154. package/dist/cli/ui/utils/branchFormatter.d.ts +0 -19
  155. package/dist/cli/ui/utils/branchFormatter.d.ts.map +0 -1
  156. package/dist/cli/ui/utils/branchFormatter.js +0 -199
  157. package/dist/cli/ui/utils/branchFormatter.js.map +0 -1
  158. package/dist/cli/ui/utils/clipboard.d.ts +0 -7
  159. package/dist/cli/ui/utils/clipboard.d.ts.map +0 -1
  160. package/dist/cli/ui/utils/clipboard.js +0 -21
  161. package/dist/cli/ui/utils/clipboard.js.map +0 -1
  162. package/dist/cli/ui/utils/continueSession.d.ts +0 -36
  163. package/dist/cli/ui/utils/continueSession.d.ts.map +0 -1
  164. package/dist/cli/ui/utils/continueSession.js +0 -155
  165. package/dist/cli/ui/utils/continueSession.js.map +0 -1
  166. package/dist/cli/ui/utils/installedVersionCache.d.ts +0 -33
  167. package/dist/cli/ui/utils/installedVersionCache.d.ts.map +0 -1
  168. package/dist/cli/ui/utils/installedVersionCache.js +0 -59
  169. package/dist/cli/ui/utils/installedVersionCache.js.map +0 -1
  170. package/dist/cli/ui/utils/modelOptions.d.ts +0 -10
  171. package/dist/cli/ui/utils/modelOptions.d.ts.map +0 -1
  172. package/dist/cli/ui/utils/modelOptions.js +0 -155
  173. package/dist/cli/ui/utils/modelOptions.js.map +0 -1
  174. package/dist/cli/ui/utils/statisticsCalculator.d.ts +0 -9
  175. package/dist/cli/ui/utils/statisticsCalculator.d.ts.map +0 -1
  176. package/dist/cli/ui/utils/statisticsCalculator.js +0 -37
  177. package/dist/cli/ui/utils/statisticsCalculator.js.map +0 -1
  178. package/dist/cli/ui/utils/versionCache.d.ts +0 -37
  179. package/dist/cli/ui/utils/versionCache.d.ts.map +0 -1
  180. package/dist/cli/ui/utils/versionCache.js +0 -70
  181. package/dist/cli/ui/utils/versionCache.js.map +0 -1
  182. package/dist/cli/ui/utils/versionFetcher.d.ts +0 -41
  183. package/dist/cli/ui/utils/versionFetcher.d.ts.map +0 -1
  184. package/dist/cli/ui/utils/versionFetcher.js +0 -89
  185. package/dist/cli/ui/utils/versionFetcher.js.map +0 -1
  186. package/dist/client/assets/index-BbfV7Wuj.css +0 -1
  187. package/dist/client/assets/index-CoAyq5x1.js +0 -78
  188. package/dist/client/index.html +0 -13
  189. package/dist/codex.d.ts +0 -55
  190. package/dist/codex.d.ts.map +0 -1
  191. package/dist/codex.js +0 -329
  192. package/dist/codex.js.map +0 -1
  193. package/dist/config/builtin-coding-agents.d.ts +0 -27
  194. package/dist/config/builtin-coding-agents.d.ts.map +0 -1
  195. package/dist/config/builtin-coding-agents.js +0 -78
  196. package/dist/config/builtin-coding-agents.js.map +0 -1
  197. package/dist/config/constants.d.ts +0 -76
  198. package/dist/config/constants.d.ts.map +0 -1
  199. package/dist/config/constants.js +0 -92
  200. package/dist/config/constants.js.map +0 -1
  201. package/dist/config/env-history.d.ts +0 -4
  202. package/dist/config/env-history.d.ts.map +0 -1
  203. package/dist/config/env-history.js +0 -34
  204. package/dist/config/env-history.js.map +0 -1
  205. package/dist/config/index.d.ts +0 -51
  206. package/dist/config/index.d.ts.map +0 -1
  207. package/dist/config/index.js +0 -225
  208. package/dist/config/index.js.map +0 -1
  209. package/dist/config/profiles.d.ts +0 -94
  210. package/dist/config/profiles.d.ts.map +0 -1
  211. package/dist/config/profiles.js +0 -284
  212. package/dist/config/profiles.js.map +0 -1
  213. package/dist/config/shared-env.d.ts +0 -41
  214. package/dist/config/shared-env.d.ts.map +0 -1
  215. package/dist/config/shared-env.js +0 -114
  216. package/dist/config/shared-env.js.map +0 -1
  217. package/dist/config/tools.d.ts +0 -50
  218. package/dist/config/tools.d.ts.map +0 -1
  219. package/dist/config/tools.js +0 -239
  220. package/dist/config/tools.js.map +0 -1
  221. package/dist/gemini.d.ts +0 -35
  222. package/dist/gemini.d.ts.map +0 -1
  223. package/dist/gemini.js +0 -299
  224. package/dist/gemini.js.map +0 -1
  225. package/dist/git.d.ts +0 -154
  226. package/dist/git.d.ts.map +0 -1
  227. package/dist/git.js +0 -1012
  228. package/dist/git.js.map +0 -1
  229. package/dist/github.d.ts +0 -14
  230. package/dist/github.d.ts.map +0 -1
  231. package/dist/github.js +0 -123
  232. package/dist/github.js.map +0 -1
  233. package/dist/index.d.ts +0 -16
  234. package/dist/index.d.ts.map +0 -1
  235. package/dist/index.js +0 -784
  236. package/dist/index.js.map +0 -1
  237. package/dist/launcher.d.ts +0 -30
  238. package/dist/launcher.d.ts.map +0 -1
  239. package/dist/launcher.js +0 -185
  240. package/dist/launcher.js.map +0 -1
  241. package/dist/logging/agentOutput.d.ts +0 -21
  242. package/dist/logging/agentOutput.d.ts.map +0 -1
  243. package/dist/logging/agentOutput.js +0 -164
  244. package/dist/logging/agentOutput.js.map +0 -1
  245. package/dist/logging/formatter.d.ts +0 -15
  246. package/dist/logging/formatter.d.ts.map +0 -1
  247. package/dist/logging/formatter.js +0 -95
  248. package/dist/logging/formatter.js.map +0 -1
  249. package/dist/logging/logger.d.ts +0 -24
  250. package/dist/logging/logger.d.ts.map +0 -1
  251. package/dist/logging/logger.js +0 -79
  252. package/dist/logging/logger.js.map +0 -1
  253. package/dist/logging/reader.d.ts +0 -34
  254. package/dist/logging/reader.d.ts.map +0 -1
  255. package/dist/logging/reader.js +0 -178
  256. package/dist/logging/reader.js.map +0 -1
  257. package/dist/logging/rotation.d.ts +0 -6
  258. package/dist/logging/rotation.d.ts.map +0 -1
  259. package/dist/logging/rotation.js +0 -26
  260. package/dist/logging/rotation.js.map +0 -1
  261. package/dist/opentui/highlights-eq9cgrbb.scm +0 -604
  262. package/dist/opentui/highlights-ghv9g403.scm +0 -205
  263. package/dist/opentui/highlights-hk7bwhj4.scm +0 -284
  264. package/dist/opentui/highlights-r812a2qc.scm +0 -150
  265. package/dist/opentui/highlights-x6tmsnaa.scm +0 -115
  266. package/dist/opentui/index.solid.d.ts +0 -2
  267. package/dist/opentui/index.solid.d.ts.map +0 -1
  268. package/dist/opentui/index.solid.js +0 -53721
  269. package/dist/opentui/index.solid.js.map +0 -1
  270. package/dist/opentui/injections-73j83es3.scm +0 -27
  271. package/dist/opentui/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  272. package/dist/opentui/tree-sitter-markdown-411r6y9b.wasm +0 -0
  273. package/dist/opentui/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  274. package/dist/opentui/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  275. package/dist/opentui/tree-sitter-zig-e78zbjpm.wasm +0 -0
  276. package/dist/repositories/git.repository.d.ts +0 -38
  277. package/dist/repositories/git.repository.d.ts.map +0 -1
  278. package/dist/repositories/git.repository.js +0 -117
  279. package/dist/repositories/git.repository.js.map +0 -1
  280. package/dist/repositories/github.repository.d.ts +0 -16
  281. package/dist/repositories/github.repository.d.ts.map +0 -1
  282. package/dist/repositories/github.repository.js +0 -61
  283. package/dist/repositories/github.repository.js.map +0 -1
  284. package/dist/repositories/worktree.repository.d.ts +0 -19
  285. package/dist/repositories/worktree.repository.d.ts.map +0 -1
  286. package/dist/repositories/worktree.repository.js +0 -64
  287. package/dist/repositories/worktree.repository.js.map +0 -1
  288. package/dist/services/BatchMergeService.d.ts +0 -45
  289. package/dist/services/BatchMergeService.d.ts.map +0 -1
  290. package/dist/services/BatchMergeService.js +0 -197
  291. package/dist/services/BatchMergeService.js.map +0 -1
  292. package/dist/services/WorktreeOrchestrator.d.ts +0 -37
  293. package/dist/services/WorktreeOrchestrator.d.ts.map +0 -1
  294. package/dist/services/WorktreeOrchestrator.js +0 -74
  295. package/dist/services/WorktreeOrchestrator.js.map +0 -1
  296. package/dist/services/codingAgentCommandResolver.d.ts +0 -10
  297. package/dist/services/codingAgentCommandResolver.d.ts.map +0 -1
  298. package/dist/services/codingAgentCommandResolver.js +0 -81
  299. package/dist/services/codingAgentCommandResolver.js.map +0 -1
  300. package/dist/services/codingAgentResolver.d.ts +0 -43
  301. package/dist/services/codingAgentResolver.d.ts.map +0 -1
  302. package/dist/services/codingAgentResolver.js +0 -269
  303. package/dist/services/codingAgentResolver.js.map +0 -1
  304. package/dist/services/dependency-installer.d.ts +0 -26
  305. package/dist/services/dependency-installer.d.ts.map +0 -1
  306. package/dist/services/dependency-installer.js +0 -134
  307. package/dist/services/dependency-installer.js.map +0 -1
  308. package/dist/services/git.service.d.ts +0 -27
  309. package/dist/services/git.service.d.ts.map +0 -1
  310. package/dist/services/git.service.js +0 -97
  311. package/dist/services/git.service.js.map +0 -1
  312. package/dist/services/github.service.d.ts +0 -14
  313. package/dist/services/github.service.d.ts.map +0 -1
  314. package/dist/services/github.service.js +0 -52
  315. package/dist/services/github.service.js.map +0 -1
  316. package/dist/services/worktree.service.d.ts +0 -20
  317. package/dist/services/worktree.service.d.ts.map +0 -1
  318. package/dist/services/worktree.service.js +0 -52
  319. package/dist/services/worktree.service.js.map +0 -1
  320. package/dist/shared/codingAgentConstants.d.ts +0 -12
  321. package/dist/shared/codingAgentConstants.d.ts.map +0 -1
  322. package/dist/shared/codingAgentConstants.js +0 -95
  323. package/dist/shared/codingAgentConstants.js.map +0 -1
  324. package/dist/types/api.d.ts +0 -225
  325. package/dist/types/api.d.ts.map +0 -1
  326. package/dist/types/api.js +0 -8
  327. package/dist/types/api.js.map +0 -1
  328. package/dist/types/coding-agent.d.ts +0 -62
  329. package/dist/types/coding-agent.d.ts.map +0 -1
  330. package/dist/types/coding-agent.js +0 -29
  331. package/dist/types/coding-agent.js.map +0 -1
  332. package/dist/types/profiles.d.ts +0 -54
  333. package/dist/types/profiles.d.ts.map +0 -1
  334. package/dist/types/profiles.js +0 -33
  335. package/dist/types/profiles.js.map +0 -1
  336. package/dist/types/tools.d.ts +0 -230
  337. package/dist/types/tools.d.ts.map +0 -1
  338. package/dist/types/tools.js +0 -8
  339. package/dist/types/tools.js.map +0 -1
  340. package/dist/utils/bun-runtime.d.ts +0 -12
  341. package/dist/utils/bun-runtime.d.ts.map +0 -1
  342. package/dist/utils/bun-runtime.js +0 -13
  343. package/dist/utils/bun-runtime.js.map +0 -1
  344. package/dist/utils/coding-agent-colors.d.ts +0 -88
  345. package/dist/utils/coding-agent-colors.d.ts.map +0 -1
  346. package/dist/utils/coding-agent-colors.js +0 -137
  347. package/dist/utils/coding-agent-colors.js.map +0 -1
  348. package/dist/utils/command.d.ts +0 -62
  349. package/dist/utils/command.d.ts.map +0 -1
  350. package/dist/utils/command.js +0 -186
  351. package/dist/utils/command.js.map +0 -1
  352. package/dist/utils/error-utils.d.ts +0 -27
  353. package/dist/utils/error-utils.d.ts.map +0 -1
  354. package/dist/utils/error-utils.js +0 -98
  355. package/dist/utils/error-utils.js.map +0 -1
  356. package/dist/utils/npmRegistry.d.ts +0 -61
  357. package/dist/utils/npmRegistry.d.ts.map +0 -1
  358. package/dist/utils/npmRegistry.js +0 -180
  359. package/dist/utils/npmRegistry.js.map +0 -1
  360. package/dist/utils/prompt.d.ts +0 -18
  361. package/dist/utils/prompt.d.ts.map +0 -1
  362. package/dist/utils/prompt.js +0 -107
  363. package/dist/utils/prompt.js.map +0 -1
  364. package/dist/utils/session/common.d.ts +0 -108
  365. package/dist/utils/session/common.d.ts.map +0 -1
  366. package/dist/utils/session/common.js +0 -439
  367. package/dist/utils/session/common.js.map +0 -1
  368. package/dist/utils/session/index.d.ts +0 -16
  369. package/dist/utils/session/index.d.ts.map +0 -1
  370. package/dist/utils/session/index.js +0 -20
  371. package/dist/utils/session/index.js.map +0 -1
  372. package/dist/utils/session/parsers/claude.d.ts +0 -62
  373. package/dist/utils/session/parsers/claude.d.ts.map +0 -1
  374. package/dist/utils/session/parsers/claude.js +0 -224
  375. package/dist/utils/session/parsers/claude.js.map +0 -1
  376. package/dist/utils/session/parsers/codex.d.ts +0 -37
  377. package/dist/utils/session/parsers/codex.d.ts.map +0 -1
  378. package/dist/utils/session/parsers/codex.js +0 -139
  379. package/dist/utils/session/parsers/codex.js.map +0 -1
  380. package/dist/utils/session/parsers/gemini.d.ts +0 -22
  381. package/dist/utils/session/parsers/gemini.d.ts.map +0 -1
  382. package/dist/utils/session/parsers/gemini.js +0 -118
  383. package/dist/utils/session/parsers/gemini.js.map +0 -1
  384. package/dist/utils/session/parsers/index.d.ts +0 -8
  385. package/dist/utils/session/parsers/index.d.ts.map +0 -1
  386. package/dist/utils/session/parsers/index.js +0 -12
  387. package/dist/utils/session/parsers/index.js.map +0 -1
  388. package/dist/utils/session/parsers/opencode.d.ts +0 -23
  389. package/dist/utils/session/parsers/opencode.d.ts.map +0 -1
  390. package/dist/utils/session/parsers/opencode.js +0 -126
  391. package/dist/utils/session/parsers/opencode.js.map +0 -1
  392. package/dist/utils/session/types.d.ts +0 -49
  393. package/dist/utils/session/types.d.ts.map +0 -1
  394. package/dist/utils/session/types.js +0 -5
  395. package/dist/utils/session/types.js.map +0 -1
  396. package/dist/utils/session.d.ts +0 -16
  397. package/dist/utils/session.d.ts.map +0 -1
  398. package/dist/utils/session.js +0 -16
  399. package/dist/utils/session.js.map +0 -1
  400. package/dist/utils/spinner.d.ts +0 -6
  401. package/dist/utils/spinner.d.ts.map +0 -1
  402. package/dist/utils/spinner.js +0 -47
  403. package/dist/utils/spinner.js.map +0 -1
  404. package/dist/utils/terminal.d.ts +0 -64
  405. package/dist/utils/terminal.d.ts.map +0 -1
  406. package/dist/utils/terminal.js +0 -270
  407. package/dist/utils/terminal.js.map +0 -1
  408. package/dist/utils/webui.d.ts +0 -8
  409. package/dist/utils/webui.d.ts.map +0 -1
  410. package/dist/utils/webui.js +0 -35
  411. package/dist/utils/webui.js.map +0 -1
  412. package/dist/utils.d.ts +0 -18
  413. package/dist/utils.d.ts.map +0 -1
  414. package/dist/utils.js +0 -79
  415. package/dist/utils.js.map +0 -1
  416. package/dist/web/client/src/components/BranchGraph.d.ts +0 -13
  417. package/dist/web/client/src/components/BranchGraph.d.ts.map +0 -1
  418. package/dist/web/client/src/components/BranchGraph.js +0 -49
  419. package/dist/web/client/src/components/BranchGraph.js.map +0 -1
  420. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts +0 -9
  421. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +0 -1
  422. package/dist/web/client/src/components/CodingAgentLaunchModal.js +0 -354
  423. package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +0 -1
  424. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts +0 -23
  425. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts.map +0 -1
  426. package/dist/web/client/src/components/CustomCodingAgentForm.js +0 -209
  427. package/dist/web/client/src/components/CustomCodingAgentForm.js.map +0 -1
  428. package/dist/web/client/src/components/CustomCodingAgentList.d.ts +0 -10
  429. package/dist/web/client/src/components/CustomCodingAgentList.d.ts.map +0 -1
  430. package/dist/web/client/src/components/CustomCodingAgentList.js +0 -57
  431. package/dist/web/client/src/components/CustomCodingAgentList.js.map +0 -1
  432. package/dist/web/client/src/components/EnvEditor.d.ts +0 -20
  433. package/dist/web/client/src/components/EnvEditor.d.ts.map +0 -1
  434. package/dist/web/client/src/components/EnvEditor.js +0 -75
  435. package/dist/web/client/src/components/EnvEditor.js.map +0 -1
  436. package/dist/web/client/src/components/EnvironmentEditor.d.ts +0 -17
  437. package/dist/web/client/src/components/EnvironmentEditor.d.ts.map +0 -1
  438. package/dist/web/client/src/components/EnvironmentEditor.js +0 -22
  439. package/dist/web/client/src/components/EnvironmentEditor.js.map +0 -1
  440. package/dist/web/client/src/components/Terminal.d.ts +0 -15
  441. package/dist/web/client/src/components/Terminal.d.ts.map +0 -1
  442. package/dist/web/client/src/components/Terminal.js +0 -119
  443. package/dist/web/client/src/components/Terminal.js.map +0 -1
  444. package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts +0 -10
  445. package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +0 -1
  446. package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +0 -107
  447. package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +0 -1
  448. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts +0 -22
  449. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +0 -1
  450. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +0 -80
  451. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +0 -1
  452. package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts +0 -11
  453. package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts.map +0 -1
  454. package/dist/web/client/src/components/branch-detail/TerminalPanel.js +0 -32
  455. package/dist/web/client/src/components/branch-detail/TerminalPanel.js.map +0 -1
  456. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +0 -40
  457. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +0 -1
  458. package/dist/web/client/src/components/branch-detail/ToolLauncher.js +0 -147
  459. package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +0 -1
  460. package/dist/web/client/src/components/branch-detail/index.d.ts +0 -5
  461. package/dist/web/client/src/components/branch-detail/index.d.ts.map +0 -1
  462. package/dist/web/client/src/components/branch-detail/index.js +0 -5
  463. package/dist/web/client/src/components/branch-detail/index.js.map +0 -1
  464. package/dist/web/client/src/components/common/BranchCard.d.ts +0 -17
  465. package/dist/web/client/src/components/common/BranchCard.d.ts.map +0 -1
  466. package/dist/web/client/src/components/common/BranchCard.js +0 -36
  467. package/dist/web/client/src/components/common/BranchCard.js.map +0 -1
  468. package/dist/web/client/src/components/common/MetricCard.d.ts +0 -10
  469. package/dist/web/client/src/components/common/MetricCard.d.ts.map +0 -1
  470. package/dist/web/client/src/components/common/MetricCard.js +0 -10
  471. package/dist/web/client/src/components/common/MetricCard.js.map +0 -1
  472. package/dist/web/client/src/components/common/PageHeader.d.ts +0 -12
  473. package/dist/web/client/src/components/common/PageHeader.d.ts.map +0 -1
  474. package/dist/web/client/src/components/common/PageHeader.js +0 -14
  475. package/dist/web/client/src/components/common/PageHeader.js.map +0 -1
  476. package/dist/web/client/src/components/common/SearchInput.d.ts +0 -14
  477. package/dist/web/client/src/components/common/SearchInput.d.ts.map +0 -1
  478. package/dist/web/client/src/components/common/SearchInput.js +0 -15
  479. package/dist/web/client/src/components/common/SearchInput.js.map +0 -1
  480. package/dist/web/client/src/components/common/StatusBadge.d.ts +0 -10
  481. package/dist/web/client/src/components/common/StatusBadge.d.ts.map +0 -1
  482. package/dist/web/client/src/components/common/StatusBadge.js +0 -15
  483. package/dist/web/client/src/components/common/StatusBadge.js.map +0 -1
  484. package/dist/web/client/src/components/common/index.d.ts +0 -6
  485. package/dist/web/client/src/components/common/index.d.ts.map +0 -1
  486. package/dist/web/client/src/components/common/index.js +0 -6
  487. package/dist/web/client/src/components/common/index.js.map +0 -1
  488. package/dist/web/client/src/components/graph/BranchDetailPanel.d.ts +0 -15
  489. package/dist/web/client/src/components/graph/BranchDetailPanel.d.ts.map +0 -1
  490. package/dist/web/client/src/components/graph/BranchDetailPanel.js +0 -57
  491. package/dist/web/client/src/components/graph/BranchDetailPanel.js.map +0 -1
  492. package/dist/web/client/src/components/graph/BranchNode.d.ts +0 -13
  493. package/dist/web/client/src/components/graph/BranchNode.d.ts.map +0 -1
  494. package/dist/web/client/src/components/graph/BranchNode.js +0 -103
  495. package/dist/web/client/src/components/graph/BranchNode.js.map +0 -1
  496. package/dist/web/client/src/components/graph/ClusterNode.d.ts +0 -13
  497. package/dist/web/client/src/components/graph/ClusterNode.d.ts.map +0 -1
  498. package/dist/web/client/src/components/graph/ClusterNode.js +0 -109
  499. package/dist/web/client/src/components/graph/ClusterNode.js.map +0 -1
  500. package/dist/web/client/src/components/graph/SynapticCanvas.d.ts +0 -17
  501. package/dist/web/client/src/components/graph/SynapticCanvas.d.ts.map +0 -1
  502. package/dist/web/client/src/components/graph/SynapticCanvas.js +0 -94
  503. package/dist/web/client/src/components/graph/SynapticCanvas.js.map +0 -1
  504. package/dist/web/client/src/components/graph/SynapticEdge.d.ts +0 -13
  505. package/dist/web/client/src/components/graph/SynapticEdge.d.ts.map +0 -1
  506. package/dist/web/client/src/components/graph/SynapticEdge.js +0 -113
  507. package/dist/web/client/src/components/graph/SynapticEdge.js.map +0 -1
  508. package/dist/web/client/src/components/graph/graphUtils.d.ts +0 -67
  509. package/dist/web/client/src/components/graph/graphUtils.d.ts.map +0 -1
  510. package/dist/web/client/src/components/graph/graphUtils.js +0 -175
  511. package/dist/web/client/src/components/graph/graphUtils.js.map +0 -1
  512. package/dist/web/client/src/components/graph/index.d.ts +0 -10
  513. package/dist/web/client/src/components/graph/index.d.ts.map +0 -1
  514. package/dist/web/client/src/components/graph/index.js +0 -10
  515. package/dist/web/client/src/components/graph/index.js.map +0 -1
  516. package/dist/web/client/src/components/ui/alert.d.ts +0 -9
  517. package/dist/web/client/src/components/ui/alert.d.ts.map +0 -1
  518. package/dist/web/client/src/components/ui/alert.js +0 -25
  519. package/dist/web/client/src/components/ui/alert.js.map +0 -1
  520. package/dist/web/client/src/components/ui/badge.d.ts +0 -10
  521. package/dist/web/client/src/components/ui/badge.d.ts.map +0 -1
  522. package/dist/web/client/src/components/ui/badge.js +0 -25
  523. package/dist/web/client/src/components/ui/badge.js.map +0 -1
  524. package/dist/web/client/src/components/ui/button.d.ts +0 -12
  525. package/dist/web/client/src/components/ui/button.d.ts.map +0 -1
  526. package/dist/web/client/src/components/ui/button.js +0 -33
  527. package/dist/web/client/src/components/ui/button.js.map +0 -1
  528. package/dist/web/client/src/components/ui/card.d.ts +0 -9
  529. package/dist/web/client/src/components/ui/card.d.ts.map +0 -1
  530. package/dist/web/client/src/components/ui/card.js +0 -16
  531. package/dist/web/client/src/components/ui/card.js.map +0 -1
  532. package/dist/web/client/src/components/ui/index.d.ts +0 -8
  533. package/dist/web/client/src/components/ui/index.d.ts.map +0 -1
  534. package/dist/web/client/src/components/ui/index.js +0 -8
  535. package/dist/web/client/src/components/ui/index.js.map +0 -1
  536. package/dist/web/client/src/components/ui/input.d.ts +0 -4
  537. package/dist/web/client/src/components/ui/input.d.ts.map +0 -1
  538. package/dist/web/client/src/components/ui/input.js +0 -8
  539. package/dist/web/client/src/components/ui/input.js.map +0 -1
  540. package/dist/web/client/src/components/ui/select.d.ts +0 -14
  541. package/dist/web/client/src/components/ui/select.d.ts.map +0 -1
  542. package/dist/web/client/src/components/ui/select.js +0 -39
  543. package/dist/web/client/src/components/ui/select.js.map +0 -1
  544. package/dist/web/client/src/components/ui/table.d.ts +0 -11
  545. package/dist/web/client/src/components/ui/table.d.ts.map +0 -1
  546. package/dist/web/client/src/components/ui/table.js +0 -21
  547. package/dist/web/client/src/components/ui/table.js.map +0 -1
  548. package/dist/web/client/src/hooks/useBranches.d.ts +0 -16
  549. package/dist/web/client/src/hooks/useBranches.d.ts.map +0 -1
  550. package/dist/web/client/src/hooks/useBranches.js +0 -35
  551. package/dist/web/client/src/hooks/useBranches.js.map +0 -1
  552. package/dist/web/client/src/hooks/useConfig.d.ts +0 -13
  553. package/dist/web/client/src/hooks/useConfig.d.ts.map +0 -1
  554. package/dist/web/client/src/hooks/useConfig.js +0 -27
  555. package/dist/web/client/src/hooks/useConfig.js.map +0 -1
  556. package/dist/web/client/src/hooks/useSessions.d.ts +0 -21
  557. package/dist/web/client/src/hooks/useSessions.d.ts.map +0 -1
  558. package/dist/web/client/src/hooks/useSessions.js +0 -54
  559. package/dist/web/client/src/hooks/useSessions.js.map +0 -1
  560. package/dist/web/client/src/hooks/useWorktrees.d.ts +0 -17
  561. package/dist/web/client/src/hooks/useWorktrees.d.ts.map +0 -1
  562. package/dist/web/client/src/hooks/useWorktrees.js +0 -41
  563. package/dist/web/client/src/hooks/useWorktrees.js.map +0 -1
  564. package/dist/web/client/src/lib/api.d.ts +0 -82
  565. package/dist/web/client/src/lib/api.d.ts.map +0 -1
  566. package/dist/web/client/src/lib/api.js +0 -147
  567. package/dist/web/client/src/lib/api.js.map +0 -1
  568. package/dist/web/client/src/lib/coding-agent-colors.d.ts +0 -86
  569. package/dist/web/client/src/lib/coding-agent-colors.d.ts.map +0 -1
  570. package/dist/web/client/src/lib/coding-agent-colors.js +0 -135
  571. package/dist/web/client/src/lib/coding-agent-colors.js.map +0 -1
  572. package/dist/web/client/src/lib/utils.d.ts +0 -7
  573. package/dist/web/client/src/lib/utils.d.ts.map +0 -1
  574. package/dist/web/client/src/lib/utils.js +0 -10
  575. package/dist/web/client/src/lib/utils.js.map +0 -1
  576. package/dist/web/client/src/lib/websocket.d.ts +0 -59
  577. package/dist/web/client/src/lib/websocket.d.ts.map +0 -1
  578. package/dist/web/client/src/lib/websocket.js +0 -182
  579. package/dist/web/client/src/lib/websocket.js.map +0 -1
  580. package/dist/web/client/src/main.d.ts +0 -2
  581. package/dist/web/client/src/main.d.ts.map +0 -1
  582. package/dist/web/client/src/main.js +0 -23
  583. package/dist/web/client/src/main.js.map +0 -1
  584. package/dist/web/client/src/pages/BranchDetailPage.d.ts +0 -3
  585. package/dist/web/client/src/pages/BranchDetailPage.d.ts.map +0 -1
  586. package/dist/web/client/src/pages/BranchDetailPage.js +0 -365
  587. package/dist/web/client/src/pages/BranchDetailPage.js.map +0 -1
  588. package/dist/web/client/src/pages/BranchListPage.d.ts +0 -3
  589. package/dist/web/client/src/pages/BranchListPage.d.ts.map +0 -1
  590. package/dist/web/client/src/pages/BranchListPage.js +0 -118
  591. package/dist/web/client/src/pages/BranchListPage.js.map +0 -1
  592. package/dist/web/client/src/pages/ConfigManagementPage.d.ts +0 -3
  593. package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +0 -1
  594. package/dist/web/client/src/pages/ConfigManagementPage.js +0 -132
  595. package/dist/web/client/src/pages/ConfigManagementPage.js.map +0 -1
  596. package/dist/web/client/src/pages/ConfigPage.d.ts +0 -3
  597. package/dist/web/client/src/pages/ConfigPage.d.ts.map +0 -1
  598. package/dist/web/client/src/pages/ConfigPage.js +0 -220
  599. package/dist/web/client/src/pages/ConfigPage.js.map +0 -1
  600. package/dist/web/client/src/router.d.ts +0 -9
  601. package/dist/web/client/src/router.d.ts.map +0 -1
  602. package/dist/web/client/src/router.js +0 -27
  603. package/dist/web/client/src/router.js.map +0 -1
  604. package/dist/web/client/vite.config.d.ts +0 -3
  605. package/dist/web/client/vite.config.d.ts.map +0 -1
  606. package/dist/web/client/vite.config.js +0 -28
  607. package/dist/web/client/vite.config.js.map +0 -1
  608. package/dist/web/server/env/importer.d.ts +0 -3
  609. package/dist/web/server/env/importer.d.ts.map +0 -1
  610. package/dist/web/server/env/importer.js +0 -51
  611. package/dist/web/server/env/importer.js.map +0 -1
  612. package/dist/web/server/index.d.ts +0 -33
  613. package/dist/web/server/index.d.ts.map +0 -1
  614. package/dist/web/server/index.js +0 -102
  615. package/dist/web/server/index.js.map +0 -1
  616. package/dist/web/server/pty/manager.d.ts +0 -54
  617. package/dist/web/server/pty/manager.d.ts.map +0 -1
  618. package/dist/web/server/pty/manager.js +0 -303
  619. package/dist/web/server/pty/manager.js.map +0 -1
  620. package/dist/web/server/routes/branches.d.ts +0 -11
  621. package/dist/web/server/routes/branches.d.ts.map +0 -1
  622. package/dist/web/server/routes/branches.js +0 -97
  623. package/dist/web/server/routes/branches.js.map +0 -1
  624. package/dist/web/server/routes/config.d.ts +0 -6
  625. package/dist/web/server/routes/config.d.ts.map +0 -1
  626. package/dist/web/server/routes/config.js +0 -162
  627. package/dist/web/server/routes/config.js.map +0 -1
  628. package/dist/web/server/routes/index.d.ts +0 -13
  629. package/dist/web/server/routes/index.d.ts.map +0 -1
  630. package/dist/web/server/routes/index.js +0 -29
  631. package/dist/web/server/routes/index.js.map +0 -1
  632. package/dist/web/server/routes/sessions.d.ts +0 -12
  633. package/dist/web/server/routes/sessions.d.ts.map +0 -1
  634. package/dist/web/server/routes/sessions.js +0 -176
  635. package/dist/web/server/routes/sessions.js.map +0 -1
  636. package/dist/web/server/routes/worktrees.d.ts +0 -11
  637. package/dist/web/server/routes/worktrees.d.ts.map +0 -1
  638. package/dist/web/server/routes/worktrees.js +0 -80
  639. package/dist/web/server/routes/worktrees.js.map +0 -1
  640. package/dist/web/server/services/branches.d.ts +0 -17
  641. package/dist/web/server/services/branches.d.ts.map +0 -1
  642. package/dist/web/server/services/branches.js +0 -275
  643. package/dist/web/server/services/branches.js.map +0 -1
  644. package/dist/web/server/services/worktrees.d.ts +0 -24
  645. package/dist/web/server/services/worktrees.d.ts.map +0 -1
  646. package/dist/web/server/services/worktrees.js +0 -66
  647. package/dist/web/server/services/worktrees.js.map +0 -1
  648. package/dist/web/server/tray.d.ts +0 -25
  649. package/dist/web/server/tray.d.ts.map +0 -1
  650. package/dist/web/server/tray.js +0 -116
  651. package/dist/web/server/tray.js.map +0 -1
  652. package/dist/web/server/types.d.ts +0 -4
  653. package/dist/web/server/types.d.ts.map +0 -1
  654. package/dist/web/server/types.js +0 -2
  655. package/dist/web/server/types.js.map +0 -1
  656. package/dist/web/server/websocket/handler.d.ts +0 -57
  657. package/dist/web/server/websocket/handler.d.ts.map +0 -1
  658. package/dist/web/server/websocket/handler.js +0 -220
  659. package/dist/web/server/websocket/handler.js.map +0 -1
  660. package/dist/worktree.d.ts +0 -117
  661. package/dist/worktree.d.ts.map +0 -1
  662. package/dist/worktree.js +0 -788
  663. package/dist/worktree.js.map +0 -1
  664. package/src/claude-history.ts +0 -717
  665. package/src/claude.ts +0 -586
  666. package/src/cli/ui/App.solid.tsx +0 -2145
  667. package/src/cli/ui/__tests__/solid/AppSolid.cleanup.test.tsx +0 -1175
  668. package/src/cli/ui/__tests__/solid/BranchListScreen.test.tsx +0 -343
  669. package/src/cli/ui/__tests__/solid/ConfirmScreen.test.tsx +0 -77
  670. package/src/cli/ui/__tests__/solid/LogScreen.test.tsx +0 -351
  671. package/src/cli/ui/__tests__/solid/components/QuickStartStep.test.tsx +0 -308
  672. package/src/cli/ui/__tests__/solid/components/WizardController.test.tsx +0 -63
  673. package/src/cli/ui/__tests__/solid/components/WizardPopup.test.tsx +0 -231
  674. package/src/cli/ui/__tests__/solid/components/WizardSteps.test.tsx +0 -331
  675. package/src/cli/ui/__tests__/utils/branchFormatter.test.ts +0 -702
  676. package/src/cli/ui/__tests__/utils/clipboard.test.ts +0 -65
  677. package/src/cli/ui/__tests__/utils/statisticsCalculator.test.ts +0 -243
  678. package/src/cli/ui/components/solid/Footer.tsx +0 -36
  679. package/src/cli/ui/components/solid/Header.tsx +0 -67
  680. package/src/cli/ui/components/solid/HelpOverlay.tsx +0 -194
  681. package/src/cli/ui/components/solid/QuickStartStep.tsx +0 -209
  682. package/src/cli/ui/components/solid/ScrollableList.tsx +0 -23
  683. package/src/cli/ui/components/solid/SearchInput.tsx +0 -42
  684. package/src/cli/ui/components/solid/SelectInput.tsx +0 -88
  685. package/src/cli/ui/components/solid/Stats.tsx +0 -92
  686. package/src/cli/ui/components/solid/TextInput.tsx +0 -49
  687. package/src/cli/ui/components/solid/WizardController.tsx +0 -457
  688. package/src/cli/ui/components/solid/WizardPopup.tsx +0 -135
  689. package/src/cli/ui/components/solid/WizardSteps.tsx +0 -781
  690. package/src/cli/ui/core/index.ts +0 -17
  691. package/src/cli/ui/core/keybindings.ts +0 -367
  692. package/src/cli/ui/core/theme.ts +0 -266
  693. package/src/cli/ui/core/types.ts +0 -235
  694. package/src/cli/ui/hooks/solid/useAsyncOperation.ts +0 -78
  695. package/src/cli/ui/hooks/solid/useFilter.ts +0 -86
  696. package/src/cli/ui/hooks/solid/useGitOperations.ts +0 -81
  697. package/src/cli/ui/hooks/solid/useKeyHandler.ts +0 -103
  698. package/src/cli/ui/hooks/solid/useScrollableList.ts +0 -149
  699. package/src/cli/ui/hooks/solid/useSelection.ts +0 -77
  700. package/src/cli/ui/hooks/solid/useTerminalSize.ts +0 -22
  701. package/src/cli/ui/index.solid.ts +0 -28
  702. package/src/cli/ui/screens/solid/BranchListScreen.tsx +0 -1153
  703. package/src/cli/ui/screens/solid/ConfirmScreen.tsx +0 -86
  704. package/src/cli/ui/screens/solid/EnvironmentScreen.tsx +0 -161
  705. package/src/cli/ui/screens/solid/ErrorScreen.tsx +0 -42
  706. package/src/cli/ui/screens/solid/InputScreen.tsx +0 -55
  707. package/src/cli/ui/screens/solid/LoadingIndicator.tsx +0 -77
  708. package/src/cli/ui/screens/solid/LogDetailScreen.tsx +0 -75
  709. package/src/cli/ui/screens/solid/LogScreen.tsx +0 -504
  710. package/src/cli/ui/screens/solid/ProfileEnvScreen.tsx +0 -196
  711. package/src/cli/ui/screens/solid/ProfileScreen.tsx +0 -98
  712. package/src/cli/ui/screens/solid/SelectorScreen.tsx +0 -181
  713. package/src/cli/ui/screens/solid/SettingsScreen.tsx +0 -52
  714. package/src/cli/ui/screens/solid/WorktreeCreateScreen.tsx +0 -136
  715. package/src/cli/ui/screens/solid/WorktreeDeleteScreen.tsx +0 -40
  716. package/src/cli/ui/stores/appStore.ts +0 -208
  717. package/src/cli/ui/stores/branchStore.ts +0 -357
  718. package/src/cli/ui/stores/index.ts +0 -31
  719. package/src/cli/ui/stores/uiStore.ts +0 -226
  720. package/src/cli/ui/types.ts +0 -371
  721. package/src/cli/ui/utils/__tests__/branchFormatter.test.ts +0 -227
  722. package/src/cli/ui/utils/__tests__/installedVersionCache.test.ts +0 -46
  723. package/src/cli/ui/utils/baseBranch.ts +0 -34
  724. package/src/cli/ui/utils/branchFormatter.ts +0 -222
  725. package/src/cli/ui/utils/clipboard.ts +0 -31
  726. package/src/cli/ui/utils/continueSession.ts +0 -231
  727. package/src/cli/ui/utils/installedVersionCache.ts +0 -84
  728. package/src/cli/ui/utils/modelOptions.test.ts +0 -98
  729. package/src/cli/ui/utils/modelOptions.ts +0 -169
  730. package/src/cli/ui/utils/statisticsCalculator.ts +0 -44
  731. package/src/cli/ui/utils/versionCache.ts +0 -93
  732. package/src/cli/ui/utils/versionFetcher.ts +0 -120
  733. package/src/codex.ts +0 -445
  734. package/src/config/__tests__/saveSession.test.ts +0 -143
  735. package/src/config/builtin-coding-agents.ts +0 -87
  736. package/src/config/constants.ts +0 -102
  737. package/src/config/env-history.ts +0 -45
  738. package/src/config/index.ts +0 -311
  739. package/src/config/profiles.ts +0 -359
  740. package/src/config/shared-env.ts +0 -139
  741. package/src/config/tools.ts +0 -319
  742. package/src/gemini.ts +0 -405
  743. package/src/git.ts +0 -1263
  744. package/src/github.ts +0 -158
  745. package/src/index.test.ts +0 -93
  746. package/src/index.ts +0 -1026
  747. package/src/launcher.ts +0 -235
  748. package/src/logging/agentOutput.ts +0 -216
  749. package/src/logging/formatter.ts +0 -125
  750. package/src/logging/logger.ts +0 -106
  751. package/src/logging/reader.ts +0 -240
  752. package/src/logging/rotation.ts +0 -25
  753. package/src/opentui/index.solid.ts +0 -1
  754. package/src/repositories/git.repository.ts +0 -129
  755. package/src/repositories/github.repository.ts +0 -83
  756. package/src/repositories/worktree.repository.ts +0 -77
  757. package/src/services/BatchMergeService.ts +0 -251
  758. package/src/services/WorktreeOrchestrator.ts +0 -115
  759. package/src/services/__tests__/BatchMergeService.test.ts +0 -534
  760. package/src/services/__tests__/WorktreeOrchestrator.test.ts +0 -259
  761. package/src/services/codingAgentCommandResolver.ts +0 -118
  762. package/src/services/codingAgentResolver.ts +0 -375
  763. package/src/services/dependency-installer.ts +0 -192
  764. package/src/services/git.service.ts +0 -115
  765. package/src/services/github.service.ts +0 -61
  766. package/src/services/worktree.service.ts +0 -66
  767. package/src/shared/codingAgentConstants.ts +0 -103
  768. package/src/trayicon.d.ts +0 -30
  769. package/src/types/api.ts +0 -256
  770. package/src/types/coding-agent.ts +0 -85
  771. package/src/types/profiles.ts +0 -64
  772. package/src/types/tools.ts +0 -269
  773. package/src/utils/__tests__/npmRegistry.test.ts +0 -250
  774. package/src/utils/__tests__/prompt.test.ts +0 -125
  775. package/src/utils/bun-runtime.ts +0 -29
  776. package/src/utils/coding-agent-colors.ts +0 -165
  777. package/src/utils/command.ts +0 -234
  778. package/src/utils/error-utils.ts +0 -133
  779. package/src/utils/npmRegistry.ts +0 -249
  780. package/src/utils/prompt.ts +0 -149
  781. package/src/utils/session/common.ts +0 -474
  782. package/src/utils/session/index.ts +0 -50
  783. package/src/utils/session/parsers/claude.ts +0 -283
  784. package/src/utils/session/parsers/codex.ts +0 -166
  785. package/src/utils/session/parsers/gemini.ts +0 -135
  786. package/src/utils/session/parsers/index.ts +0 -31
  787. package/src/utils/session/parsers/opencode.ts +0 -151
  788. package/src/utils/session/types.ts +0 -51
  789. package/src/utils/session.ts +0 -16
  790. package/src/utils/spinner.ts +0 -54
  791. package/src/utils/terminal.ts +0 -327
  792. package/src/utils/webui.ts +0 -43
  793. package/src/utils.test.ts +0 -43
  794. package/src/utils.ts +0 -93
  795. package/src/web/client/components.json +0 -21
  796. package/src/web/client/index.html +0 -12
  797. package/src/web/client/src/components/BranchGraph.tsx +0 -95
  798. package/src/web/client/src/components/CodingAgentLaunchModal.tsx +0 -570
  799. package/src/web/client/src/components/CustomCodingAgentForm.tsx +0 -386
  800. package/src/web/client/src/components/CustomCodingAgentList.tsx +0 -119
  801. package/src/web/client/src/components/EnvEditor.tsx +0 -188
  802. package/src/web/client/src/components/EnvironmentEditor.tsx +0 -97
  803. package/src/web/client/src/components/Terminal.tsx +0 -145
  804. package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +0 -193
  805. package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +0 -187
  806. package/src/web/client/src/components/branch-detail/TerminalPanel.tsx +0 -92
  807. package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +0 -332
  808. package/src/web/client/src/components/branch-detail/index.ts +0 -4
  809. package/src/web/client/src/components/common/BranchCard.tsx +0 -117
  810. package/src/web/client/src/components/common/MetricCard.tsx +0 -22
  811. package/src/web/client/src/components/common/PageHeader.tsx +0 -44
  812. package/src/web/client/src/components/common/SearchInput.tsx +0 -40
  813. package/src/web/client/src/components/common/StatusBadge.tsx +0 -37
  814. package/src/web/client/src/components/common/index.ts +0 -5
  815. package/src/web/client/src/components/graph/BranchDetailPanel.tsx +0 -152
  816. package/src/web/client/src/components/graph/BranchNode.tsx +0 -200
  817. package/src/web/client/src/components/graph/ClusterNode.tsx +0 -211
  818. package/src/web/client/src/components/graph/SynapticCanvas.tsx +0 -171
  819. package/src/web/client/src/components/graph/SynapticEdge.tsx +0 -311
  820. package/src/web/client/src/components/graph/graphUtils.ts +0 -265
  821. package/src/web/client/src/components/graph/index.ts +0 -10
  822. package/src/web/client/src/components/ui/alert.tsx +0 -63
  823. package/src/web/client/src/components/ui/badge.tsx +0 -44
  824. package/src/web/client/src/components/ui/button.tsx +0 -57
  825. package/src/web/client/src/components/ui/card.tsx +0 -82
  826. package/src/web/client/src/components/ui/index.ts +0 -32
  827. package/src/web/client/src/components/ui/input.tsx +0 -21
  828. package/src/web/client/src/components/ui/select.tsx +0 -156
  829. package/src/web/client/src/components/ui/table.tsx +0 -119
  830. package/src/web/client/src/hooks/useBranches.ts +0 -41
  831. package/src/web/client/src/hooks/useConfig.ts +0 -31
  832. package/src/web/client/src/hooks/useSessions.ts +0 -68
  833. package/src/web/client/src/hooks/useWorktrees.ts +0 -47
  834. package/src/web/client/src/index.css +0 -349
  835. package/src/web/client/src/lib/api.ts +0 -184
  836. package/src/web/client/src/lib/coding-agent-colors.ts +0 -149
  837. package/src/web/client/src/lib/utils.ts +0 -10
  838. package/src/web/client/src/lib/websocket.ts +0 -222
  839. package/src/web/client/src/main.tsx +0 -29
  840. package/src/web/client/src/pages/BranchDetailPage.tsx +0 -555
  841. package/src/web/client/src/pages/BranchListPage.tsx +0 -242
  842. package/src/web/client/src/pages/ConfigManagementPage.tsx +0 -248
  843. package/src/web/client/src/pages/ConfigPage.tsx +0 -368
  844. package/src/web/client/src/router.tsx +0 -27
  845. package/src/web/client/vite.config.ts +0 -28
  846. package/src/web/server/env/importer.ts +0 -62
  847. package/src/web/server/index.ts +0 -143
  848. package/src/web/server/pty/manager.ts +0 -443
  849. package/src/web/server/routes/branches.ts +0 -126
  850. package/src/web/server/routes/config.ts +0 -226
  851. package/src/web/server/routes/index.ts +0 -37
  852. package/src/web/server/routes/sessions.ts +0 -252
  853. package/src/web/server/routes/worktrees.ts +0 -108
  854. package/src/web/server/services/branches.ts +0 -387
  855. package/src/web/server/services/worktrees.ts +0 -93
  856. package/src/web/server/tray.ts +0 -136
  857. package/src/web/server/types.ts +0 -14
  858. package/src/web/server/websocket/handler.ts +0 -299
  859. package/src/worktree.ts +0 -1109
package/dist/worktree.js DELETED
@@ -1,788 +0,0 @@
1
- import { execa } from "execa";
2
- import { lstat, mkdir, readFile, rm } from "node:fs/promises";
3
- import path from "node:path";
4
- import chalk from "chalk";
5
- import { createLogger } from "./logging/logger.js";
6
- const logger = createLogger({ category: "worktree" });
7
- import { getPullRequestByBranch } from "./github.js";
8
- import { hasUncommittedChanges, hasUnpushedCommits, hasUnpushedCommitsInRepo, getLocalBranches, checkRemoteBranchExists, branchHasUniqueCommitsComparedToBase, getRepositoryRoot, getWorktreeRoot, ensureGitignoreEntry, branchExists, getCurrentBranch, getCurrentBranchName, } from "./git.js";
9
- import { getConfig } from "./config/index.js";
10
- import { GIT_CONFIG } from "./config/constants.js";
11
- import { startSpinner } from "./utils/spinner.js";
12
- async function getUpstreamBranch(branch) {
13
- try {
14
- const result = await execa("git", [
15
- "rev-parse",
16
- "--abbrev-ref",
17
- `${branch}@{upstream}`,
18
- ]);
19
- const stdout = typeof result?.stdout === "string"
20
- ? result.stdout.trim()
21
- : "";
22
- return stdout.length ? stdout : null;
23
- }
24
- catch {
25
- return null;
26
- }
27
- }
28
- const parseRemoteRef = (ref) => {
29
- const segments = ref.split("/");
30
- if (segments.length < 2) {
31
- return null;
32
- }
33
- const [remote, ...rest] = segments;
34
- const branch = rest.join("/");
35
- if (!remote || !branch) {
36
- return null;
37
- }
38
- return { remote, branch };
39
- };
40
- async function resolveUpstreamStatus(branch, repoRoot) {
41
- const upstream = await getUpstreamBranch(branch);
42
- if (!upstream) {
43
- return { upstream: null, hasUpstream: false };
44
- }
45
- const parsed = parseRemoteRef(upstream);
46
- if (!parsed) {
47
- return { upstream, hasUpstream: false };
48
- }
49
- if (parsed.branch !== branch) {
50
- return { upstream, hasUpstream: false };
51
- }
52
- const exists = await checkRemoteBranchExists(parsed.branch, parsed.remote, {
53
- cwd: repoRoot,
54
- });
55
- return { upstream, hasUpstream: exists };
56
- }
57
- const buildCleanupReasons = ({ hasUniqueCommits, hasUncommitted, hasUnpushed, hasUpstream, }) => {
58
- if (!hasUpstream) {
59
- return [];
60
- }
61
- if (!hasUniqueCommits && !hasUncommitted && !hasUnpushed) {
62
- return ["no-diff-with-base"];
63
- }
64
- if (hasUniqueCommits && !hasUncommitted && !hasUnpushed) {
65
- return ["remote-synced"];
66
- }
67
- return [];
68
- };
69
- // 保護対象のブランチ(クリーンアップから除外)
70
- export const PROTECTED_BRANCHES = ["main", "master", "develop"];
71
- export function isProtectedBranchName(branchName) {
72
- const normalized = branchName
73
- .replace(/^refs\/heads\//, "")
74
- .replace(/^origin\//, "");
75
- return PROTECTED_BRANCHES.includes(normalized);
76
- }
77
- export async function switchToProtectedBranch({ branchName, repoRoot, remoteRef, }) {
78
- const currentBranch = await getCurrentBranch();
79
- if (currentBranch === branchName) {
80
- return "none";
81
- }
82
- const runGit = async (args) => {
83
- try {
84
- await execa("git", args, { cwd: repoRoot });
85
- }
86
- catch (error) {
87
- throw new WorktreeError(`Failed to execute git ${args.join(" ")} for protected branch ${branchName}`, error);
88
- }
89
- };
90
- if (await branchExists(branchName)) {
91
- await runGit(["checkout", branchName]);
92
- return "local";
93
- }
94
- const targetRemote = remoteRef ?? `origin/${branchName}`;
95
- const fetchRef = targetRemote.replace(/^origin\//, "");
96
- await runGit(["fetch", "origin", fetchRef]);
97
- await runGit(["checkout", "-b", branchName, targetRemote]);
98
- return "remote";
99
- }
100
- export class WorktreeError extends Error {
101
- cause;
102
- constructor(message, cause) {
103
- super(message);
104
- this.cause = cause;
105
- this.name = "WorktreeError";
106
- }
107
- }
108
- async function listWorktrees() {
109
- try {
110
- const { getRepositoryRoot } = await import("./git.js");
111
- const repoRoot = await getRepositoryRoot();
112
- const { stdout } = await execa("git", ["worktree", "list", "--porcelain"], {
113
- cwd: repoRoot,
114
- });
115
- const worktrees = [];
116
- const lines = stdout.split("\n");
117
- let currentWorktree = {};
118
- for (const line of lines) {
119
- if (line.startsWith("worktree ")) {
120
- if (currentWorktree.path) {
121
- worktrees.push(currentWorktree);
122
- }
123
- currentWorktree = {
124
- path: line.substring(9),
125
- locked: false,
126
- prunable: false,
127
- isLocked: false,
128
- isPrunable: false,
129
- };
130
- }
131
- else if (line.startsWith("HEAD ")) {
132
- currentWorktree.head = line.substring(5);
133
- }
134
- else if (line.startsWith("branch ")) {
135
- currentWorktree.branch = line.substring(7).replace("refs/heads/", "");
136
- }
137
- else if (line === "locked" || line.startsWith("locked ")) {
138
- currentWorktree.locked = true;
139
- currentWorktree.isLocked = true;
140
- if (line.startsWith("locked ")) {
141
- const reason = line.substring(7).trim();
142
- if (reason) {
143
- currentWorktree.invalidReason ??= reason;
144
- }
145
- }
146
- }
147
- else if (line === "prunable" || line.startsWith("prunable ")) {
148
- currentWorktree.prunable = true;
149
- currentWorktree.isPrunable = true;
150
- if (line.startsWith("prunable ")) {
151
- const reason = line.substring(9).trim();
152
- if (reason) {
153
- currentWorktree.invalidReason ??= reason;
154
- }
155
- }
156
- }
157
- else if (line.startsWith("reason ")) {
158
- currentWorktree.invalidReason = line.substring(7);
159
- }
160
- else if (line === "") {
161
- if (currentWorktree.path) {
162
- worktrees.push(currentWorktree);
163
- currentWorktree = {};
164
- }
165
- }
166
- }
167
- if (currentWorktree.path) {
168
- worktrees.push(currentWorktree);
169
- }
170
- return worktrees;
171
- }
172
- catch (error) {
173
- throw new WorktreeError("Failed to list worktrees", error);
174
- }
175
- }
176
- export async function listAllWorktrees() {
177
- return listWorktrees();
178
- }
179
- /**
180
- * 追加のworktree(メインworktreeを除く)の一覧を取得
181
- * @returns {Promise<WorktreeInfo[]>} worktree情報の配列
182
- * @throws {WorktreeError} worktree一覧の取得に失敗した場合
183
- */
184
- export async function listAdditionalWorktrees() {
185
- try {
186
- const [allWorktrees, repoRoot] = await Promise.all([
187
- listWorktrees(),
188
- import("./git.js").then((m) => m.getRepositoryRoot()),
189
- ]);
190
- const fs = await import("node:fs");
191
- // Filter out the main worktree (repository root) and add accessibility info
192
- const additionalWorktrees = allWorktrees
193
- .filter((worktree) => worktree.path !== repoRoot)
194
- .map((worktree) => {
195
- // パスの存在を確認
196
- const exists = fs.existsSync(worktree.path);
197
- const isAccessible = exists && !worktree.prunable;
198
- const result = {
199
- ...worktree,
200
- isAccessible,
201
- };
202
- if (!isAccessible) {
203
- if (!exists) {
204
- result.invalidReason = "Path not accessible in current environment";
205
- }
206
- else if (worktree.prunable && !result.invalidReason) {
207
- result.invalidReason = "Worktree is marked prunable";
208
- }
209
- }
210
- return result;
211
- });
212
- return additionalWorktrees;
213
- }
214
- catch (error) {
215
- throw new WorktreeError("Failed to list additional worktrees", error);
216
- }
217
- }
218
- export async function worktreeExists(branchName) {
219
- const resolution = await resolveWorktreePathForBranch(branchName);
220
- return resolution.path;
221
- }
222
- /**
223
- * Resolve a worktree path for the selected branch and verify the actual checkout.
224
- */
225
- export async function resolveWorktreePathForBranch(branchName) {
226
- const worktrees = await listWorktrees();
227
- const worktree = worktrees.find((w) => w.branch === branchName);
228
- if (!worktree) {
229
- return { path: null };
230
- }
231
- try {
232
- const actualBranch = (await getCurrentBranchName(worktree.path)).trim();
233
- if (!actualBranch || actualBranch !== branchName) {
234
- return {
235
- path: null,
236
- mismatch: {
237
- path: worktree.path,
238
- actualBranch: actualBranch || null,
239
- },
240
- };
241
- }
242
- }
243
- catch {
244
- return {
245
- path: null,
246
- mismatch: {
247
- path: worktree.path,
248
- actualBranch: null,
249
- },
250
- };
251
- }
252
- return { path: worktree.path };
253
- }
254
- export async function generateWorktreePath(repoRoot, branchName) {
255
- const sanitizedBranchName = branchName.replace(/[/\\:*?"<>|]/g, "-");
256
- const worktreeDir = path.join(repoRoot, ".worktrees");
257
- return path.join(worktreeDir, sanitizedBranchName);
258
- }
259
- /**
260
- * 指定されたパスに既存のworktreeが存在するか確認
261
- * @param {string} targetPath - 確認するパス
262
- * @returns {Promise<WorktreeInfo | null>} 既存のworktree情報、または存在しない場合はnull
263
- */
264
- export async function checkWorktreePathConflict(targetPath) {
265
- const worktrees = await listWorktrees();
266
- const existingWorktree = worktrees.find((w) => w.path === targetPath);
267
- return existingWorktree || null;
268
- }
269
- /**
270
- * 衝突を避けるため、代替のworktreeパスを生成
271
- * @param {string} basePath - 元のパス
272
- * @returns {Promise<string>} 利用可能な代替パス
273
- */
274
- export async function generateAlternativeWorktreePath(basePath) {
275
- let counter = 2;
276
- let alternativePath = `${basePath}-${counter}`;
277
- // 衝突しないパスが見つかるまで試行
278
- while (await checkWorktreePathConflict(alternativePath)) {
279
- counter++;
280
- alternativePath = `${basePath}-${counter}`;
281
- }
282
- return alternativePath;
283
- }
284
- async function assessStaleWorktreeDirectory(targetPath) {
285
- const fsSync = await import("node:fs");
286
- if (!fsSync.existsSync(targetPath)) {
287
- return { status: "absent" };
288
- }
289
- const registered = await checkWorktreePathConflict(targetPath);
290
- if (registered) {
291
- return { status: "registered" };
292
- }
293
- const gitMetaPath = path.join(targetPath, ".git");
294
- if (!fsSync.existsSync(gitMetaPath)) {
295
- return { status: "stale", reason: "missing .git" };
296
- }
297
- let gitMetaStat;
298
- try {
299
- gitMetaStat = await lstat(gitMetaPath);
300
- }
301
- catch {
302
- return { status: "unknown", reason: "unable to stat .git" };
303
- }
304
- if (gitMetaStat.isDirectory()) {
305
- return { status: "unknown", reason: ".git is a directory" };
306
- }
307
- if (!gitMetaStat.isFile()) {
308
- return { status: "unknown", reason: ".git is not a file" };
309
- }
310
- let gitMetaContents = "";
311
- try {
312
- gitMetaContents = await readFile(gitMetaPath, "utf8");
313
- }
314
- catch {
315
- return { status: "unknown", reason: "unable to read .git" };
316
- }
317
- const gitdirMatch = gitMetaContents.match(/^\s*gitdir:\s*(.+)\s*$/m);
318
- if (!gitdirMatch) {
319
- return { status: "unknown", reason: "missing gitdir entry" };
320
- }
321
- const rawGitdir = gitdirMatch[1]?.trim();
322
- if (!rawGitdir) {
323
- return { status: "unknown", reason: "empty gitdir entry" };
324
- }
325
- const gitdirPath = path.isAbsolute(rawGitdir)
326
- ? rawGitdir
327
- : path.resolve(targetPath, rawGitdir);
328
- if (!fsSync.existsSync(gitdirPath)) {
329
- return { status: "stale", reason: "missing gitdir path" };
330
- }
331
- return { status: "unknown", reason: "gitdir exists" };
332
- }
333
- /**
334
- * 新しいworktreeを作成
335
- * @param {WorktreeConfig} config - worktreeの設定
336
- * @throws {WorktreeError} worktreeの作成に失敗した場合
337
- */
338
- export async function createWorktree(config) {
339
- if (isProtectedBranchName(config.branchName)) {
340
- throw new WorktreeError(`Branch "${config.branchName}" is protected and cannot be used to create a worktree`);
341
- }
342
- try {
343
- const staleness = await assessStaleWorktreeDirectory(config.worktreePath);
344
- if (staleness.status === "stale") {
345
- await rm(config.worktreePath, { recursive: true, force: true });
346
- }
347
- else if (staleness.status === "unknown") {
348
- const reason = staleness.reason ? ` (${staleness.reason})` : "";
349
- throw new WorktreeError(`Worktree path already exists but is not registered as a git worktree, and stale status could not be confirmed${reason}. Remove the directory manually and retry: ${config.worktreePath}`);
350
- }
351
- const worktreeParentDir = path.dirname(config.worktreePath);
352
- try {
353
- await mkdir(worktreeParentDir, { recursive: true });
354
- }
355
- catch (error) {
356
- const errorWithCode = error;
357
- const code = errorWithCode && typeof errorWithCode.code === "string"
358
- ? errorWithCode.code
359
- : undefined;
360
- const message = error instanceof Error
361
- ? error.message
362
- : typeof errorWithCode?.message === "string"
363
- ? errorWithCode.message
364
- : String(error);
365
- const reason = code === "EEXIST"
366
- ? `${worktreeParentDir} already exists and is not a directory`
367
- : message;
368
- throw new WorktreeError(`Failed to prepare worktree directory for ${config.branchName}: ${reason}`, error);
369
- }
370
- const args = ["worktree", "add"];
371
- if (config.isNewBranch) {
372
- args.push("-b", config.branchName);
373
- }
374
- args.push(config.worktreePath);
375
- if (config.isNewBranch) {
376
- args.push(config.baseBranch);
377
- }
378
- else {
379
- args.push(config.branchName);
380
- }
381
- const spinnerMessage = `Creating worktree for ${config.branchName}`;
382
- let stopSpinner;
383
- try {
384
- stopSpinner = startSpinner(spinnerMessage);
385
- }
386
- catch {
387
- stopSpinner = undefined;
388
- }
389
- const stopActiveSpinner = () => {
390
- if (stopSpinner) {
391
- stopSpinner();
392
- stopSpinner = undefined;
393
- }
394
- };
395
- const gitProcess = execa("git", args);
396
- // パイプでリアルタイムに進捗を表示する
397
- const childProcess = gitProcess;
398
- const attachStream = (stream, pipeTarget) => {
399
- if (!stream)
400
- return;
401
- if (typeof stream.once === "function") {
402
- stream.once("data", stopActiveSpinner);
403
- }
404
- if (typeof stream.pipe === "function") {
405
- stream.pipe(pipeTarget);
406
- }
407
- };
408
- attachStream(childProcess.stdout, process.stdout);
409
- attachStream(childProcess.stderr, process.stderr);
410
- try {
411
- await gitProcess;
412
- }
413
- finally {
414
- stopActiveSpinner();
415
- }
416
- // 新規ブランチの場合、ベースブランチを追跡ブランチとして設定
417
- if (config.isNewBranch && config.baseBranch) {
418
- try {
419
- await execa("git", ["branch", "--set-upstream-to", config.baseBranch, config.branchName], { cwd: config.worktreePath });
420
- }
421
- catch (error) {
422
- const message = error instanceof Error ? error.message : String(error);
423
- console.warn(`Warning: Failed to set upstream branch: ${message}`);
424
- }
425
- }
426
- // .gitignoreに.worktrees/を追加(エラーは警告として扱う)
427
- try {
428
- let gitignoreRoot = config.repoRoot;
429
- try {
430
- gitignoreRoot = await getWorktreeRoot();
431
- }
432
- catch (resolveError) {
433
- if (process.env.DEBUG) {
434
- const reason = resolveError instanceof Error
435
- ? resolveError.message
436
- : String(resolveError);
437
- console.warn(`Debug: Failed to resolve current worktree root for .gitignore update. Falling back to ${gitignoreRoot}. Reason: ${reason}`);
438
- }
439
- }
440
- await ensureGitignoreEntry(gitignoreRoot, ".worktrees/");
441
- }
442
- catch (error) {
443
- const message = error instanceof Error ? error.message : String(error);
444
- // .gitignoreの更新失敗は警告としてログに出すが、worktree作成は成功とする
445
- console.warn(`Warning: Failed to update .gitignore: ${message}`);
446
- }
447
- }
448
- catch (error) {
449
- // Extract more detailed error information from git command
450
- const errorOutput = (value) => typeof value === "string" && value.trim().length > 0 ? value : null;
451
- const gitError = errorOutput(error?.stderr) ??
452
- errorOutput(error?.stdout) ??
453
- (error instanceof Error ? error.message : String(error));
454
- const errorMessage = `Failed to create worktree for ${config.branchName}\nGit error: ${gitError}`;
455
- throw new WorktreeError(errorMessage, error);
456
- }
457
- }
458
- export async function removeWorktree(worktreePath, force = false) {
459
- try {
460
- const args = ["worktree", "remove"];
461
- if (force) {
462
- args.push("--force");
463
- }
464
- args.push(worktreePath);
465
- await execa("git", args);
466
- }
467
- catch (error) {
468
- throw new WorktreeError(`Failed to remove worktree at ${worktreePath}`, error);
469
- }
470
- }
471
- /**
472
- * 単一のworktreeパスを修復する共通関数
473
- *
474
- * パターンA: 期待されるパスにディレクトリが存在する
475
- * → git worktree repair <expectedPath> で修復
476
- *
477
- * パターンB: ディレクトリが存在しない(リモート環境で作成されたメタデータのみ残っている)
478
- * → git worktree remove --force <currentPath> でメタデータを削除
479
- *
480
- * @param branch ブランチ名
481
- * @param currentPath 現在gitメタデータに記録されているパス
482
- * @param repoRoot リポジトリルートパス
483
- * @returns 修復結果
484
- */
485
- export async function repairWorktreePath(branch, currentPath, repoRoot) {
486
- const expectedPath = await generateWorktreePath(repoRoot, branch);
487
- const fsSync = await import("node:fs");
488
- if (fsSync.existsSync(expectedPath)) {
489
- // パターンA: ディレクトリが存在する → repair
490
- logger.info({ branch, expectedPath, currentPath }, "repairWorktreePath: directory exists, attempting repair");
491
- try {
492
- await execa("git", ["worktree", "repair", expectedPath], {
493
- cwd: repoRoot,
494
- });
495
- return { repaired: true, removed: false, newPath: expectedPath };
496
- }
497
- catch (error) {
498
- logger.warn({ branch, expectedPath, error }, "repairWorktreePath: repair failed");
499
- return { repaired: false, removed: false };
500
- }
501
- }
502
- else {
503
- // パターンB: ディレクトリが存在しない → 古いメタデータを削除
504
- logger.info({ branch, currentPath, expectedPath }, "repairWorktreePath: directory not found, removing stale metadata");
505
- try {
506
- await execa("git", ["worktree", "remove", "--force", currentPath], {
507
- cwd: repoRoot,
508
- });
509
- return { repaired: false, removed: true };
510
- }
511
- catch (error) {
512
- logger.warn({ branch, currentPath, error }, "repairWorktreePath: remove failed");
513
- return { repaired: false, removed: false };
514
- }
515
- }
516
- }
517
- /**
518
- * Worktreeのパス不整合を修復
519
- * 共通関数repairWorktreePathを使用して各ブランチを修復
520
- * @param targetBranches 修復対象のブランチ名配列
521
- * @returns 修復結果(成功数、失敗数、失敗詳細)
522
- */
523
- export async function repairWorktrees(targetBranches) {
524
- const result = {
525
- repairedCount: 0,
526
- failedCount: 0,
527
- failures: [],
528
- };
529
- if (targetBranches.length === 0) {
530
- return result;
531
- }
532
- // 修復前のworktree一覧を取得(現在のパスを知るため)
533
- const beforeWorktrees = await listAdditionalWorktrees();
534
- const worktreePathMap = new Map(beforeWorktrees.map((w) => [w.branch, w.path]));
535
- // デバッグログ: worktreeリストのブランチ名を出力
536
- logger.info({
537
- targetBranches,
538
- worktreeBranches: beforeWorktrees.map((w) => ({
539
- branch: w.branch,
540
- path: w.path,
541
- isAccessible: w.isAccessible,
542
- })),
543
- }, "repairWorktrees: before state");
544
- const repoRoot = await getRepositoryRoot();
545
- // 対象ブランチごとに共通関数を使用して修復
546
- for (const branch of targetBranches) {
547
- const currentPath = worktreePathMap.get(branch);
548
- if (!currentPath) {
549
- logger.warn({ branch }, "repairWorktrees: branch not found in worktrees");
550
- result.failedCount++;
551
- result.failures.push({
552
- path: branch,
553
- error: "Branch not found in worktrees",
554
- });
555
- continue;
556
- }
557
- const repairResult = await repairWorktreePath(branch, currentPath, repoRoot);
558
- if (repairResult.repaired) {
559
- result.repairedCount++;
560
- }
561
- else if (repairResult.removed) {
562
- // メタデータ削除は「修復」としてカウント(新規作成が可能になるため)
563
- result.repairedCount++;
564
- }
565
- else {
566
- result.failedCount++;
567
- result.failures.push({
568
- path: branch,
569
- error: "Worktree repair failed",
570
- });
571
- }
572
- }
573
- // 修復後のアクセス可能性を確認(デバッグログ用)
574
- const afterWorktrees = await listAdditionalWorktrees();
575
- logger.info({
576
- afterWorktrees: afterWorktrees.map((w) => ({
577
- branch: w.branch,
578
- path: w.path,
579
- isAccessible: w.isAccessible,
580
- })),
581
- }, "repairWorktrees: after state");
582
- return result;
583
- }
584
- async function getWorktreesWithPRStatus() {
585
- const worktrees = await listAdditionalWorktrees();
586
- const worktreesWithPR = [];
587
- for (const worktree of worktrees) {
588
- if (worktree.branch) {
589
- const pullRequest = await getPullRequestByBranch(worktree.branch);
590
- worktreesWithPR.push({
591
- worktreePath: worktree.path,
592
- branch: worktree.branch,
593
- pullRequest,
594
- });
595
- }
596
- }
597
- return worktreesWithPR;
598
- }
599
- /**
600
- * worktreeに存在しないローカルブランチのクリーンアップ候補を取得
601
- * @returns {Promise<CleanupTarget[]>} クリーンアップ候補の配列
602
- */
603
- async function getOrphanedLocalBranchStatuses({ baseBranch, repoRoot, onProgress, }) {
604
- try {
605
- // 並列実行で高速化
606
- const [localBranches, worktrees] = await Promise.all([
607
- getLocalBranches(),
608
- listAdditionalWorktrees(),
609
- ]);
610
- const statuses = [];
611
- const worktreeBranches = new Set(worktrees.map((w) => w.branch).filter(Boolean));
612
- if (process.env.DEBUG_CLEANUP) {
613
- console.log(chalk.cyan("Debug: Orphaned branch scan - Available local branches:"));
614
- localBranches.forEach((b) => console.log(` ${b.name} (type: ${b.type})`));
615
- console.log(chalk.cyan(`Debug: Worktree branches: ${Array.from(worktreeBranches).join(", ")}`));
616
- }
617
- for (const localBranch of localBranches) {
618
- // 保護対象ブランチはスキップ
619
- if (isProtectedBranchName(localBranch.name)) {
620
- if (process.env.DEBUG_CLEANUP) {
621
- console.log(chalk.yellow(`Debug: Skipping protected branch ${localBranch.name}`));
622
- }
623
- continue;
624
- }
625
- // worktreeに存在しないローカルブランチのみ対象
626
- if (!worktreeBranches.has(localBranch.name)) {
627
- let hasUnpushed = false;
628
- try {
629
- hasUnpushed = await hasUnpushedCommitsInRepo(localBranch.name, repoRoot);
630
- }
631
- catch {
632
- hasUnpushed = true;
633
- }
634
- const { upstream, hasUpstream } = await resolveUpstreamStatus(localBranch.name, repoRoot);
635
- const hasUniqueCommits = await branchHasUniqueCommitsComparedToBase(localBranch.name, baseBranch, repoRoot);
636
- const reasons = buildCleanupReasons({
637
- hasUniqueCommits,
638
- hasUncommitted: false,
639
- hasUnpushed,
640
- hasUpstream,
641
- });
642
- if (process.env.DEBUG_CLEANUP) {
643
- console.log(chalk.gray(`Debug: Checking orphaned branch ${localBranch.name} -> reasons: ${reasons.join(", ")}`));
644
- }
645
- const status = {
646
- worktreePath: null, // worktreeは存在しない
647
- branch: localBranch.name,
648
- hasUncommittedChanges: false, // worktreeが存在しないため常にfalse
649
- hasUnpushedCommits: hasUnpushed,
650
- cleanupType: "branch-only",
651
- hasRemoteBranch: hasUpstream,
652
- hasUniqueCommits,
653
- hasUpstream,
654
- upstream,
655
- reasons,
656
- };
657
- statuses.push(status);
658
- onProgress?.(status);
659
- }
660
- }
661
- if (process.env.DEBUG_CLEANUP) {
662
- console.log(chalk.cyan(`Debug: Found ${statuses.length} orphaned branch statuses`));
663
- }
664
- return statuses;
665
- }
666
- catch (error) {
667
- console.error(chalk.red("Error: Failed to get orphaned local branches"));
668
- if (process.env.DEBUG_CLEANUP) {
669
- console.error(chalk.red("Debug: Full error details:"), error);
670
- }
671
- return [];
672
- }
673
- }
674
- export async function getCleanupStatus({ onProgress, } = {}) {
675
- const [config, repoRoot, worktreesWithPR] = await Promise.all([
676
- getConfig(),
677
- getRepositoryRoot(),
678
- getWorktreesWithPRStatus(),
679
- ]);
680
- const baseBranch = config.defaultBaseBranch || GIT_CONFIG.DEFAULT_BASE_BRANCH;
681
- const orphanedStatuses = await getOrphanedLocalBranchStatuses({
682
- baseBranch,
683
- repoRoot,
684
- ...(onProgress ? { onProgress } : {}),
685
- });
686
- const statuses = [];
687
- if (process.env.DEBUG_CLEANUP) {
688
- console.log(chalk.cyan("Debug: Available worktrees:"));
689
- worktreesWithPR.forEach((w) => console.log(` ${w.branch} -> ${w.worktreePath}`));
690
- }
691
- for (const worktree of worktreesWithPR) {
692
- if (process.env.DEBUG_CLEANUP) {
693
- console.log(chalk.gray(`Debug: Checking worktree ${worktree.branch}`));
694
- }
695
- // worktreeパスの存在を確認
696
- const fsSync = await import("node:fs");
697
- const existsSync = typeof fsSync.existsSync === "function"
698
- ? fsSync.existsSync
699
- : typeof fsSync.default
700
- ?.existsSync === "function"
701
- ? fsSync
702
- .default.existsSync
703
- : null;
704
- const isAccessible = existsSync ? existsSync(worktree.worktreePath) : false;
705
- let hasUncommitted = false;
706
- let hasUnpushed = false;
707
- if (isAccessible) {
708
- try {
709
- [hasUncommitted, hasUnpushed] = await Promise.all([
710
- hasUncommittedChanges(worktree.worktreePath),
711
- hasUnpushedCommits(worktree.worktreePath, worktree.branch),
712
- ]);
713
- }
714
- catch (error) {
715
- if (process.env.DEBUG_CLEANUP) {
716
- console.log(chalk.yellow(`Debug: Failed to check status for worktree ${worktree.worktreePath}: ${error instanceof Error ? error.message : String(error)}`));
717
- }
718
- }
719
- }
720
- const { upstream, hasUpstream } = await resolveUpstreamStatus(worktree.branch, repoRoot);
721
- const hasUniqueCommits = await branchHasUniqueCommitsComparedToBase(worktree.branch, baseBranch, repoRoot);
722
- const reasons = buildCleanupReasons({
723
- hasUniqueCommits,
724
- hasUncommitted,
725
- hasUnpushed,
726
- hasUpstream,
727
- });
728
- if (process.env.DEBUG_CLEANUP) {
729
- console.log(chalk.gray(`Debug: Cleanup reasons for ${worktree.branch}: ${reasons.length > 0 ? reasons.join(", ") : "none"}`));
730
- }
731
- const status = {
732
- worktreePath: worktree.worktreePath,
733
- branch: worktree.branch,
734
- hasUncommittedChanges: hasUncommitted,
735
- hasUnpushedCommits: hasUnpushed,
736
- cleanupType: "worktree-and-branch",
737
- hasRemoteBranch: hasUpstream,
738
- hasUniqueCommits,
739
- hasUpstream,
740
- upstream,
741
- isAccessible,
742
- reasons,
743
- ...(isAccessible
744
- ? {}
745
- : { invalidReason: "Path not accessible in current environment" }),
746
- };
747
- statuses.push(status);
748
- onProgress?.(status);
749
- }
750
- statuses.push(...orphanedStatuses);
751
- if (process.env.DEBUG_CLEANUP) {
752
- const worktreeTargets = statuses.filter((t) => t.cleanupType === "worktree-and-branch" && t.reasons.length > 0).length;
753
- const branchOnlyTargets = statuses.filter((t) => t.cleanupType === "branch-only" && t.reasons.length > 0).length;
754
- console.log(chalk.cyan(`Debug: Found ${worktreeTargets + branchOnlyTargets} cleanup targets (${worktreeTargets} worktree+branch, ${branchOnlyTargets} branch-only)`));
755
- }
756
- return statuses;
757
- }
758
- /**
759
- * マージ済みPRに関連するworktreeおよびローカルブランチのクリーンアップ候補を取得
760
- * @returns {Promise<CleanupTarget[]>} クリーンアップ候補の配列
761
- */
762
- export async function getMergedPRWorktrees() {
763
- const statuses = await getCleanupStatus();
764
- const cleanupTargets = statuses
765
- .filter((status) => status.reasons.length > 0)
766
- .filter((status) => !isProtectedBranchName(status.branch))
767
- .map((status) => {
768
- const target = {
769
- worktreePath: status.worktreePath,
770
- branch: status.branch,
771
- pullRequest: null,
772
- hasUncommittedChanges: status.hasUncommittedChanges,
773
- hasUnpushedCommits: status.hasUnpushedCommits,
774
- cleanupType: status.cleanupType,
775
- hasRemoteBranch: status.hasRemoteBranch,
776
- reasons: status.reasons,
777
- };
778
- if (status.isAccessible !== undefined) {
779
- target.isAccessible = status.isAccessible;
780
- }
781
- if (status.invalidReason) {
782
- target.invalidReason = status.invalidReason;
783
- }
784
- return target;
785
- });
786
- return cleanupTargets;
787
- }
788
- //# sourceMappingURL=worktree.js.map