@iloom/cli 0.10.0 → 0.10.2

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 (157) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/dist/{BranchNamingService-ECJHBB67.js → BranchNamingService-4OP6LOH6.js} +2 -2
  4. package/dist/ClaudeContextManager-ZKTUVQB2.js +14 -0
  5. package/dist/ClaudeService-TRWOYQ6O.js +13 -0
  6. package/dist/{LoomLauncher-L64HHS3T.js → LoomLauncher-FRECYMXS.js} +6 -6
  7. package/dist/{PromptTemplateManager-DULSVRRE.js → PromptTemplateManager-YOE2SIPG.js} +2 -2
  8. package/dist/README.md +2 -2
  9. package/dist/{SettingsManager-BQDQA3FK.js → SettingsManager-FNKCOZMQ.js} +2 -2
  10. package/dist/{build-5GO3XW26.js → build-VHGEMXBA.js} +6 -6
  11. package/dist/{chunk-ZW2LKWWE.js → chunk-2VEWSM34.js} +3 -3
  12. package/dist/{chunk-LXLMMXXY.js → chunk-2YZCWAVZ.js} +17 -12
  13. package/dist/chunk-2YZCWAVZ.js.map +1 -0
  14. package/dist/{chunk-UD3WJDIV.js → chunk-3F27M7ZD.js} +11 -774
  15. package/dist/chunk-3F27M7ZD.js.map +1 -0
  16. package/dist/chunk-4E7LCFUG.js +24 -0
  17. package/dist/chunk-4E7LCFUG.js.map +1 -0
  18. package/dist/{chunk-MNHZB4Z2.js → chunk-4FGEGQW4.js} +3 -3
  19. package/dist/{chunk-WY4QBK43.js → chunk-63QWFWH3.js} +2 -2
  20. package/dist/{chunk-YYAKPQBT.js → chunk-7VHJNVLF.js} +19 -9
  21. package/dist/chunk-7VHJNVLF.js.map +1 -0
  22. package/dist/chunk-BFHDVFSK.js +651 -0
  23. package/dist/chunk-BFHDVFSK.js.map +1 -0
  24. package/dist/{chunk-FB47TIJG.js → chunk-BFLMCE2U.js} +4 -23
  25. package/dist/chunk-BFLMCE2U.js.map +1 -0
  26. package/dist/{chunk-SN3SQCFK.js → chunk-BU53XIGY.js} +4 -4
  27. package/dist/{chunk-SF2P22EE.js → chunk-C6HNNJIV.js} +2 -2
  28. package/dist/{chunk-5MWV33NN.js → chunk-CVCTIDDK.js} +2 -2
  29. package/dist/{chunk-ZEWU5PZK.js → chunk-G5V75JD5.js} +2 -2
  30. package/dist/{chunk-ZHPNZC75.js → chunk-HYGUPUV5.js} +26 -21
  31. package/dist/chunk-HYGUPUV5.js.map +1 -0
  32. package/dist/{chunk-VGGST52X.js → chunk-I5T677EA.js} +2 -2
  33. package/dist/{chunk-VECNX6VX.js → chunk-KIK2ZFAL.js} +2 -2
  34. package/dist/{chunk-3D7WQM7I.js → chunk-LLHXQS3C.js} +2 -2
  35. package/dist/{chunk-Y4YZTHZE.js → chunk-LUKXJSRI.js} +2 -2
  36. package/dist/{chunk-ONQYPICO.js → chunk-PZ5WSR5Z.js} +63 -9
  37. package/dist/chunk-PZ5WSR5Z.js.map +1 -0
  38. package/dist/{chunk-J5S7DFYC.js → chunk-QFTDZ5E3.js} +2 -2
  39. package/dist/chunk-RJ3VBUFK.js +781 -0
  40. package/dist/chunk-RJ3VBUFK.js.map +1 -0
  41. package/dist/{chunk-UWGVCXRF.js → chunk-SKSYYBCU.js} +23 -1
  42. package/dist/chunk-SKSYYBCU.js.map +1 -0
  43. package/dist/{chunk-JO2LZ6EQ.js → chunk-SWSJWA2S.js} +2 -2
  44. package/dist/{chunk-4WJNIR5O.js → chunk-UUEW5KWB.js} +1 -1
  45. package/dist/chunk-UUEW5KWB.js.map +1 -0
  46. package/dist/{chunk-6EU6TCF6.js → chunk-V3SVMFDQ.js} +5 -5
  47. package/dist/{chunk-NRSWLOAZ.js → chunk-WXIM2WS7.js} +4 -4
  48. package/dist/{chunk-RYWFS37M.js → chunk-XE4BDRZD.js} +2 -2
  49. package/dist/{ignite-CGOV3TD4.js → chunk-ZGM2FE2R.js} +105 -73
  50. package/dist/chunk-ZGM2FE2R.js.map +1 -0
  51. package/dist/{claude-P3NQR6IJ.js → claude-LN7OWVNI.js} +2 -2
  52. package/dist/{cleanup-6UCPVMFG.js → cleanup-4ZM2AJDC.js} +19 -17
  53. package/dist/{cleanup-6UCPVMFG.js.map → cleanup-4ZM2AJDC.js.map} +1 -1
  54. package/dist/cli.js +167 -614
  55. package/dist/cli.js.map +1 -1
  56. package/dist/{commit-L3EPY5QG.js → commit-4CFLXRZ3.js} +12 -10
  57. package/dist/commit-4CFLXRZ3.js.map +1 -0
  58. package/dist/{compile-ZS4HYRX5.js → compile-7ALJHZ4N.js} +6 -6
  59. package/dist/{contribute-ORDDQGSL.js → contribute-5GKLK3BQ.js} +3 -3
  60. package/dist/{dev-server-FYZ2AQIH.js → dev-server-7SMIB7OF.js} +8 -8
  61. package/dist/{feedback-TMBXSCM5.js → feedback-EZWF5CAL.js} +10 -8
  62. package/dist/{feedback-TMBXSCM5.js.map → feedback-EZWF5CAL.js.map} +1 -1
  63. package/dist/{git-ET64COO3.js → git-GTLKAZRJ.js} +3 -3
  64. package/dist/ignite-MQETGFNA.js +34 -0
  65. package/dist/ignite-MQETGFNA.js.map +1 -0
  66. package/dist/index.d.ts +113 -18
  67. package/dist/index.js +180 -15
  68. package/dist/index.js.map +1 -1
  69. package/dist/{init-GFQ5W7GK.js → init-ZB2RITW6.js} +8 -8
  70. package/dist/install-deps-RLSGSHH7.js +43 -0
  71. package/dist/install-deps-RLSGSHH7.js.map +1 -0
  72. package/dist/{issues-T4ZZSPEG.js → issues-4UUAQ5K6.js} +3 -3
  73. package/dist/{lint-6TQXDZ3T.js → lint-AAN2NZWG.js} +6 -6
  74. package/dist/mcp/harness-server.js +140 -0
  75. package/dist/mcp/harness-server.js.map +1 -0
  76. package/dist/mcp/issue-management-server.js +140 -18
  77. package/dist/mcp/issue-management-server.js.map +1 -1
  78. package/dist/{open-5QZGXQRF.js → open-FXWW3VI4.js} +8 -8
  79. package/dist/{plan-U7ZQWLFY.js → plan-D3KSN5MU.js} +338 -36
  80. package/dist/plan-D3KSN5MU.js.map +1 -0
  81. package/dist/prompts/CLAUDE.md +2 -2
  82. package/dist/prompts/init-prompt.txt +102 -27
  83. package/dist/prompts/issue-prompt.txt +46 -0
  84. package/dist/prompts/plan-prompt.txt +59 -19
  85. package/dist/prompts/swarm-orchestrator-prompt.txt +121 -80
  86. package/dist/{rebase-DWIB77KV.js → rebase-62FDLIH4.js} +17 -8
  87. package/dist/rebase-62FDLIH4.js.map +1 -0
  88. package/dist/{recap-MX63HAKV.js → recap-OMBOKJST.js} +6 -6
  89. package/dist/{run-O3TFNQFC.js → run-BBXLRIZB.js} +8 -8
  90. package/dist/schema/settings.schema.json +36 -2
  91. package/dist/{shell-G6VC2CYR.js → shell-RF7LTND5.js} +5 -5
  92. package/dist/{summary-FWHAX55O.js → summary-YZI25KW4.js} +9 -9
  93. package/dist/{test-F7JNJZYP.js → test-SGO6I5Z7.js} +6 -6
  94. package/dist/{test-git-BTAOIUE2.js → test-git-XM4TM65W.js} +3 -3
  95. package/dist/{test-jira-CHYNV33F.js → test-jira-LDTOYFSD.js} +3 -3
  96. package/dist/{test-prefix-Q6TFSU6F.js → test-prefix-GBO37XCN.js} +3 -3
  97. package/dist/{test-webserver-EONCG7E7.js → test-webserver-NZ3JTVLL.js} +5 -5
  98. package/dist/{vscode-VA5X4P25.js → vscode-6XUGHJKL.js} +5 -5
  99. package/package.json +1 -1
  100. package/dist/ClaudeContextManager-QXX6ZFST.js +0 -14
  101. package/dist/ClaudeService-NJNK2SUH.js +0 -13
  102. package/dist/chunk-4WJNIR5O.js.map +0 -1
  103. package/dist/chunk-FB47TIJG.js.map +0 -1
  104. package/dist/chunk-LXLMMXXY.js.map +0 -1
  105. package/dist/chunk-ONQYPICO.js.map +0 -1
  106. package/dist/chunk-UD3WJDIV.js.map +0 -1
  107. package/dist/chunk-UVD4CZKS.js +0 -101
  108. package/dist/chunk-UVD4CZKS.js.map +0 -1
  109. package/dist/chunk-UWGVCXRF.js.map +0 -1
  110. package/dist/chunk-YYAKPQBT.js.map +0 -1
  111. package/dist/chunk-ZHPNZC75.js.map +0 -1
  112. package/dist/commit-L3EPY5QG.js.map +0 -1
  113. package/dist/ignite-CGOV3TD4.js.map +0 -1
  114. package/dist/plan-U7ZQWLFY.js.map +0 -1
  115. package/dist/rebase-DWIB77KV.js.map +0 -1
  116. /package/dist/{BranchNamingService-ECJHBB67.js.map → BranchNamingService-4OP6LOH6.js.map} +0 -0
  117. /package/dist/{ClaudeContextManager-QXX6ZFST.js.map → ClaudeContextManager-ZKTUVQB2.js.map} +0 -0
  118. /package/dist/{ClaudeService-NJNK2SUH.js.map → ClaudeService-TRWOYQ6O.js.map} +0 -0
  119. /package/dist/{LoomLauncher-L64HHS3T.js.map → LoomLauncher-FRECYMXS.js.map} +0 -0
  120. /package/dist/{PromptTemplateManager-DULSVRRE.js.map → PromptTemplateManager-YOE2SIPG.js.map} +0 -0
  121. /package/dist/{SettingsManager-BQDQA3FK.js.map → SettingsManager-FNKCOZMQ.js.map} +0 -0
  122. /package/dist/{build-5GO3XW26.js.map → build-VHGEMXBA.js.map} +0 -0
  123. /package/dist/{chunk-ZW2LKWWE.js.map → chunk-2VEWSM34.js.map} +0 -0
  124. /package/dist/{chunk-MNHZB4Z2.js.map → chunk-4FGEGQW4.js.map} +0 -0
  125. /package/dist/{chunk-WY4QBK43.js.map → chunk-63QWFWH3.js.map} +0 -0
  126. /package/dist/{chunk-SN3SQCFK.js.map → chunk-BU53XIGY.js.map} +0 -0
  127. /package/dist/{chunk-SF2P22EE.js.map → chunk-C6HNNJIV.js.map} +0 -0
  128. /package/dist/{chunk-5MWV33NN.js.map → chunk-CVCTIDDK.js.map} +0 -0
  129. /package/dist/{chunk-ZEWU5PZK.js.map → chunk-G5V75JD5.js.map} +0 -0
  130. /package/dist/{chunk-VGGST52X.js.map → chunk-I5T677EA.js.map} +0 -0
  131. /package/dist/{chunk-VECNX6VX.js.map → chunk-KIK2ZFAL.js.map} +0 -0
  132. /package/dist/{chunk-3D7WQM7I.js.map → chunk-LLHXQS3C.js.map} +0 -0
  133. /package/dist/{chunk-Y4YZTHZE.js.map → chunk-LUKXJSRI.js.map} +0 -0
  134. /package/dist/{chunk-J5S7DFYC.js.map → chunk-QFTDZ5E3.js.map} +0 -0
  135. /package/dist/{chunk-JO2LZ6EQ.js.map → chunk-SWSJWA2S.js.map} +0 -0
  136. /package/dist/{chunk-6EU6TCF6.js.map → chunk-V3SVMFDQ.js.map} +0 -0
  137. /package/dist/{chunk-NRSWLOAZ.js.map → chunk-WXIM2WS7.js.map} +0 -0
  138. /package/dist/{chunk-RYWFS37M.js.map → chunk-XE4BDRZD.js.map} +0 -0
  139. /package/dist/{claude-P3NQR6IJ.js.map → claude-LN7OWVNI.js.map} +0 -0
  140. /package/dist/{compile-ZS4HYRX5.js.map → compile-7ALJHZ4N.js.map} +0 -0
  141. /package/dist/{contribute-ORDDQGSL.js.map → contribute-5GKLK3BQ.js.map} +0 -0
  142. /package/dist/{dev-server-FYZ2AQIH.js.map → dev-server-7SMIB7OF.js.map} +0 -0
  143. /package/dist/{git-ET64COO3.js.map → git-GTLKAZRJ.js.map} +0 -0
  144. /package/dist/{init-GFQ5W7GK.js.map → init-ZB2RITW6.js.map} +0 -0
  145. /package/dist/{issues-T4ZZSPEG.js.map → issues-4UUAQ5K6.js.map} +0 -0
  146. /package/dist/{lint-6TQXDZ3T.js.map → lint-AAN2NZWG.js.map} +0 -0
  147. /package/dist/{open-5QZGXQRF.js.map → open-FXWW3VI4.js.map} +0 -0
  148. /package/dist/{recap-MX63HAKV.js.map → recap-OMBOKJST.js.map} +0 -0
  149. /package/dist/{run-O3TFNQFC.js.map → run-BBXLRIZB.js.map} +0 -0
  150. /package/dist/{shell-G6VC2CYR.js.map → shell-RF7LTND5.js.map} +0 -0
  151. /package/dist/{summary-FWHAX55O.js.map → summary-YZI25KW4.js.map} +0 -0
  152. /package/dist/{test-F7JNJZYP.js.map → test-SGO6I5Z7.js.map} +0 -0
  153. /package/dist/{test-git-BTAOIUE2.js.map → test-git-XM4TM65W.js.map} +0 -0
  154. /package/dist/{test-jira-CHYNV33F.js.map → test-jira-LDTOYFSD.js.map} +0 -0
  155. /package/dist/{test-prefix-Q6TFSU6F.js.map → test-prefix-GBO37XCN.js.map} +0 -0
  156. /package/dist/{test-webserver-EONCG7E7.js.map → test-webserver-NZ3JTVLL.js.map} +0 -0
  157. /package/dist/{vscode-VA5X4P25.js.map → vscode-6XUGHJKL.js.map} +0 -0
package/LICENSE CHANGED
@@ -20,7 +20,7 @@ it within your organization. What is prohibited is redistributing or offering
20
20
  access to this software (in original or modified form) as part of something
21
21
  you sell or provide to others.
22
22
 
23
- Change Date: 2030-02-23
23
+ Change Date: 2030-02-25
24
24
  Change License: Apache License 2.0
25
25
 
26
26
  For clarity, on or after the Change Date, the Licensed Work will
package/README.md CHANGED
@@ -12,7 +12,7 @@ iloom
12
12
  > **[VS Code extension](https://marketplace.visualstudio.com/items?itemName=iloom-ai.iloom-vscode) now available!** Run `il vscode` to install. Get the recap panel to see AI decisions, risks, and assumptions in real-time, plus the loom explorer to manage and switch between active projects and tasks.
13
13
 
14
14
  <div align="center">
15
- <img width="600" alt="iloom-ai-screenshot" src="https://raw.githubusercontent.com/iloom-ai/iloom-cli/main/assets/iloom-screenshot.png" />
15
+ <img width="600" alt="iloom-ai-screenshot" src="https://raw.githubusercontent.com/iloom-ai/iloom-cli/main/assets/iloom_dag.png" />
16
16
  <div>iloom in action: Scale understanding, not just output.</div>
17
17
  </div>
18
18
 
@@ -738,7 +738,7 @@ License & Name
738
738
 
739
739
  * ❌ You cannot resell iloom itself as a product or SaaS.
740
740
 
741
- * Converts to Apache 2.0 on 2030-02-23.
741
+ * Converts to Apache 2.0 on 2030-02-25.
742
742
 
743
743
 
744
744
  See [LICENSE](https://raw.githubusercontent.com/iloom-ai/iloom-cli/main/LICENSE) for complete terms.
@@ -3,7 +3,7 @@ import {
3
3
  ClaudeBranchNameStrategy,
4
4
  DefaultBranchNamingService,
5
5
  SimpleBranchNameStrategy
6
- } from "./chunk-J5S7DFYC.js";
6
+ } from "./chunk-QFTDZ5E3.js";
7
7
  import "./chunk-6MLEBAYZ.js";
8
8
  import "./chunk-VT4PDUYT.js";
9
9
  export {
@@ -11,4 +11,4 @@ export {
11
11
  DefaultBranchNamingService,
12
12
  SimpleBranchNameStrategy
13
13
  };
14
- //# sourceMappingURL=BranchNamingService-ECJHBB67.js.map
14
+ //# sourceMappingURL=BranchNamingService-4OP6LOH6.js.map
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ClaudeContextManager
4
+ } from "./chunk-XE4BDRZD.js";
5
+ import "./chunk-BU53XIGY.js";
6
+ import "./chunk-PZ5WSR5Z.js";
7
+ import "./chunk-UUEW5KWB.js";
8
+ import "./chunk-7VHJNVLF.js";
9
+ import "./chunk-6MLEBAYZ.js";
10
+ import "./chunk-VT4PDUYT.js";
11
+ export {
12
+ ClaudeContextManager
13
+ };
14
+ //# sourceMappingURL=ClaudeContextManager-ZKTUVQB2.js.map
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ClaudeService
4
+ } from "./chunk-BU53XIGY.js";
5
+ import "./chunk-PZ5WSR5Z.js";
6
+ import "./chunk-UUEW5KWB.js";
7
+ import "./chunk-7VHJNVLF.js";
8
+ import "./chunk-6MLEBAYZ.js";
9
+ import "./chunk-VT4PDUYT.js";
10
+ export {
11
+ ClaudeService
12
+ };
13
+ //# sourceMappingURL=ClaudeService-TRWOYQ6O.js.map
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-O7VL5N6S.js";
5
5
  import {
6
6
  ClaudeContextManager
7
- } from "./chunk-RYWFS37M.js";
8
- import "./chunk-SN3SQCFK.js";
9
- import "./chunk-ONQYPICO.js";
10
- import "./chunk-4WJNIR5O.js";
7
+ } from "./chunk-XE4BDRZD.js";
8
+ import "./chunk-BU53XIGY.js";
9
+ import "./chunk-PZ5WSR5Z.js";
10
+ import "./chunk-UUEW5KWB.js";
11
11
  import {
12
12
  getExecutablePath
13
13
  } from "./chunk-GYCR2LOU.js";
14
- import "./chunk-YYAKPQBT.js";
14
+ import "./chunk-7VHJNVLF.js";
15
15
  import {
16
16
  getLogger
17
17
  } from "./chunk-6MLEBAYZ.js";
@@ -252,4 +252,4 @@ var LoomLauncher = class {
252
252
  export {
253
253
  LoomLauncher
254
254
  };
255
- //# sourceMappingURL=LoomLauncher-L64HHS3T.js.map
255
+ //# sourceMappingURL=LoomLauncher-FRECYMXS.js.map
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  PromptTemplateManager,
4
4
  buildReviewTemplateVariables
5
- } from "./chunk-4WJNIR5O.js";
5
+ } from "./chunk-UUEW5KWB.js";
6
6
  import "./chunk-VT4PDUYT.js";
7
7
  export {
8
8
  PromptTemplateManager,
9
9
  buildReviewTemplateVariables
10
10
  };
11
- //# sourceMappingURL=PromptTemplateManager-DULSVRRE.js.map
11
+ //# sourceMappingURL=PromptTemplateManager-YOE2SIPG.js.map
package/dist/README.md CHANGED
@@ -12,7 +12,7 @@ iloom
12
12
  > **[VS Code extension](https://marketplace.visualstudio.com/items?itemName=iloom-ai.iloom-vscode) now available!** Run `il vscode` to install. Get the recap panel to see AI decisions, risks, and assumptions in real-time, plus the loom explorer to manage and switch between active projects and tasks.
13
13
 
14
14
  <div align="center">
15
- <img width="600" alt="iloom-ai-screenshot" src="https://raw.githubusercontent.com/iloom-ai/iloom-cli/main/assets/iloom-screenshot.png" />
15
+ <img width="600" alt="iloom-ai-screenshot" src="https://raw.githubusercontent.com/iloom-ai/iloom-cli/main/assets/iloom_dag.png" />
16
16
  <div>iloom in action: Scale understanding, not just output.</div>
17
17
  </div>
18
18
 
@@ -738,7 +738,7 @@ License & Name
738
738
 
739
739
  * ❌ You cannot resell iloom itself as a product or SaaS.
740
740
 
741
- * Converts to Apache 2.0 on 2030-02-23.
741
+ * Converts to Apache 2.0 on 2030-02-25.
742
742
 
743
743
 
744
744
  See [LICENSE](https://raw.githubusercontent.com/iloom-ai/iloom-cli/main/LICENSE) for complete terms.
@@ -16,7 +16,7 @@ import {
16
16
  WorkflowPermissionSchemaNoDefaults,
17
17
  WorkflowsSettingsSchema,
18
18
  WorkflowsSettingsSchemaNoDefaults
19
- } from "./chunk-YYAKPQBT.js";
19
+ } from "./chunk-7VHJNVLF.js";
20
20
  import "./chunk-VT4PDUYT.js";
21
21
  export {
22
22
  AgentSettingsSchema,
@@ -36,4 +36,4 @@ export {
36
36
  WorkflowsSettingsSchema,
37
37
  WorkflowsSettingsSchemaNoDefaults
38
38
  };
39
- //# sourceMappingURL=SettingsManager-BQDQA3FK.js.map
39
+ //# sourceMappingURL=SettingsManager-FNKCOZMQ.js.map
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ScriptCommandBase
4
- } from "./chunk-NRSWLOAZ.js";
4
+ } from "./chunk-WXIM2WS7.js";
5
5
  import "./chunk-WWKOVDWC.js";
6
- import "./chunk-WY4QBK43.js";
7
- import "./chunk-VGGST52X.js";
6
+ import "./chunk-63QWFWH3.js";
7
+ import "./chunk-I5T677EA.js";
8
8
  import "./chunk-YQ57ORTV.js";
9
- import "./chunk-MNHZB4Z2.js";
10
- import "./chunk-YYAKPQBT.js";
9
+ import "./chunk-4FGEGQW4.js";
10
+ import "./chunk-7VHJNVLF.js";
11
11
  import "./chunk-KB64WNBZ.js";
12
12
  import "./chunk-6MLEBAYZ.js";
13
13
  import "./chunk-VT4PDUYT.js";
@@ -24,4 +24,4 @@ var BuildCommand = class extends ScriptCommandBase {
24
24
  export {
25
25
  BuildCommand
26
26
  };
27
- //# sourceMappingURL=build-5GO3XW26.js.map
27
+ //# sourceMappingURL=build-VHGEMXBA.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  IssueManagementProviderFactory
4
- } from "./chunk-JO2LZ6EQ.js";
4
+ } from "./chunk-SWSJWA2S.js";
5
5
  import {
6
6
  openBrowser
7
7
  } from "./chunk-YETJNRQM.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  detectClaudeCli,
15
15
  launchClaude
16
- } from "./chunk-ONQYPICO.js";
16
+ } from "./chunk-PZ5WSR5Z.js";
17
17
  import {
18
18
  executeGhCommand
19
19
  } from "./chunk-VG45TUYK.js";
@@ -359,4 +359,4 @@ Then retry: il start`
359
359
  export {
360
360
  PRManager
361
361
  };
362
- //# sourceMappingURL=chunk-ZW2LKWWE.js.map
362
+ //# sourceMappingURL=chunk-2VEWSM34.js.map
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  detectClaudeCli,
15
15
  launchClaude
16
- } from "./chunk-ONQYPICO.js";
16
+ } from "./chunk-PZ5WSR5Z.js";
17
17
  import {
18
18
  GitCommandError,
19
19
  executeGitCommand,
@@ -21,10 +21,10 @@ import {
21
21
  findMainWorktreePathWithSettings,
22
22
  findWorktreeForBranch,
23
23
  getMergeTargetBranch
24
- } from "./chunk-MNHZB4Z2.js";
24
+ } from "./chunk-4FGEGQW4.js";
25
25
  import {
26
26
  SettingsManager
27
- } from "./chunk-YYAKPQBT.js";
27
+ } from "./chunk-7VHJNVLF.js";
28
28
  import {
29
29
  MetadataManager
30
30
  } from "./chunk-KB64WNBZ.js";
@@ -60,7 +60,7 @@ var MergeManager = class {
60
60
  */
61
61
  async rebaseOnMain(worktreePath, options = {}) {
62
62
  var _a;
63
- const { dryRun = false, force = false } = options;
63
+ const { dryRun = false, force = false, jsonStream = false } = options;
64
64
  await this.abortInProgressRebase(worktreePath);
65
65
  const mainBranch = await this.getMainBranch(worktreePath);
66
66
  const metadata = await this.metadataManager.readMetadata(worktreePath);
@@ -119,7 +119,7 @@ Ensure the branch exists locally.`
119
119
  if (wipCommitHash) {
120
120
  await this.restoreWipCommit(worktreePath, wipCommitHash);
121
121
  }
122
- return;
122
+ return { conflictsDetected: false, claudeLaunched: false, conflictsResolved: false };
123
123
  }
124
124
  const commitsOutput = await executeGitCommand(["log", "--oneline", `${targetBranch}..HEAD`], {
125
125
  cwd: worktreePath
@@ -140,7 +140,7 @@ Ensure the branch exists locally.`
140
140
  if (commitLines.length > 0) {
141
141
  getLogger().info(`[DRY RUN] This would rebase ${commitLines.length} commit(s)`);
142
142
  }
143
- return;
143
+ return { conflictsDetected: false, claudeLaunched: false, conflictsResolved: false };
144
144
  }
145
145
  try {
146
146
  await executeGitCommand(["-c", "core.hooksPath=/dev/null", "rebase", targetBranch], { cwd: worktreePath });
@@ -148,20 +148,22 @@ Ensure the branch exists locally.`
148
148
  if (wipCommitHash) {
149
149
  await this.restoreWipCommit(worktreePath, wipCommitHash);
150
150
  }
151
+ return { conflictsDetected: false, claudeLaunched: false, conflictsResolved: false };
151
152
  } catch (error) {
152
153
  const conflictedFiles = await this.detectConflictedFiles(worktreePath);
153
154
  if (conflictedFiles.length > 0) {
154
155
  getLogger().info("Merge conflicts detected, attempting Claude-assisted resolution...");
155
156
  const resolved = await this.attemptClaudeConflictResolution(
156
157
  worktreePath,
157
- conflictedFiles
158
+ conflictedFiles,
159
+ { jsonStream }
158
160
  );
159
161
  if (resolved) {
160
162
  getLogger().success("Conflicts resolved with Claude assistance, rebase completed");
161
163
  if (wipCommitHash) {
162
164
  await this.restoreWipCommit(worktreePath, wipCommitHash);
163
165
  }
164
- return;
166
+ return { conflictsDetected: true, claudeLaunched: true, conflictsResolved: true };
165
167
  }
166
168
  const conflictError = this.formatConflictError(conflictedFiles);
167
169
  throw new Error(conflictError);
@@ -340,7 +342,7 @@ To recover:
340
342
  * @returns true if conflicts resolved, false otherwise
341
343
  * @private
342
344
  */
343
- async attemptClaudeConflictResolution(worktreePath, conflictedFiles) {
345
+ async attemptClaudeConflictResolution(worktreePath, conflictedFiles, options = {}) {
344
346
  const isClaudeAvailable = await detectClaudeCli();
345
347
  if (!isClaudeAvailable) {
346
348
  getLogger().debug("Claude CLI not available, skipping conflict resolution");
@@ -361,8 +363,11 @@ To recover:
361
363
  await launchClaude(prompt, {
362
364
  appendSystemPrompt: systemPrompt,
363
365
  addDir: worktreePath,
364
- headless: false,
365
- // Interactive - runs in current terminal with stdio: inherit
366
+ headless: options.jsonStream ? true : false,
367
+ ...options.jsonStream && {
368
+ permissionMode: "bypassPermissions",
369
+ passthroughStdout: true
370
+ },
366
371
  allowedTools: rebaseAllowedTools,
367
372
  noSessionPersistence: true
368
373
  // Utility operation - no session persistence needed
@@ -534,4 +539,4 @@ export {
534
539
  MergeManager,
535
540
  BuildRunner
536
541
  };
537
- //# sourceMappingURL=chunk-LXLMMXXY.js.map
542
+ //# sourceMappingURL=chunk-2YZCWAVZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/MergeManager.ts","../src/lib/BuildRunner.ts"],"sourcesContent":["import { executeGitCommand, fetchOrigin, findMainWorktreePathWithSettings, findWorktreeForBranch, getMergeTargetBranch, GitCommandError } from '../utils/git.js'\nimport { getLogger } from '../utils/logger-context.js'\nimport { detectClaudeCli, launchClaude } from '../utils/claude.js'\nimport { SettingsManager } from './SettingsManager.js'\nimport { MetadataManager } from './MetadataManager.js'\nimport type { MergeOptions, RebaseOutcome } from '../types/index.js'\n\n/**\n * MergeManager handles Git rebase and fast-forward merge operations\n * Implements fail-fast behavior for conflicts (Phase 1 - no Claude assistance)\n *\n * Ports bash/merge-and-clean.sh lines 781-1090\n */\nexport class MergeManager {\n\tprivate settingsManager: SettingsManager\n\tprivate metadataManager: MetadataManager\n\n\tconstructor(settingsManager?: SettingsManager, metadataManager?: MetadataManager) {\n\t\tthis.settingsManager = settingsManager ?? new SettingsManager()\n\t\tthis.metadataManager = metadataManager ?? new MetadataManager()\n\t}\n\n\t/**\n\t * Get the merge target branch for a loom\n\t * Priority: parent loom metadata > configured main branch > 'main'\n\t * @param worktreePath - Optional path to load settings/metadata from (defaults to process.cwd())\n\t * @private\n\t */\n\tprivate async getMainBranch(worktreePath?: string): Promise<string> {\n\t\t// Delegate to shared utility function\n\t\treturn getMergeTargetBranch(worktreePath ?? process.cwd(), {\n\t\t\tsettingsManager: this.settingsManager,\n\t\t\tmetadataManager: this.metadataManager,\n\t\t})\n\t}\n\n\t/**\n\t * Rebase current branch on main with fail-fast on conflicts\n\t * Ports bash/merge-and-clean.sh lines 781-913\n\t *\n\t * @param worktreePath - Path to the worktree\n\t * @param options - Merge options (dryRun, force)\n\t * @throws Error if main branch doesn't exist, uncommitted changes exist, or conflicts occur\n\t */\n\tasync rebaseOnMain(worktreePath: string, options: MergeOptions = {}): Promise<RebaseOutcome> {\n\t\tconst { dryRun = false, force = false, jsonStream = false } = options\n\n\t\t// Pre-check: abort any in-progress rebase before starting a new one\n\t\tawait this.abortInProgressRebase(worktreePath)\n\n\t\tconst mainBranch = await this.getMainBranch(worktreePath)\n\n\t\t// Determine whether to use remote (origin/) or local branch reference\n\t\t// - Child looms: always use local parent branch (parent may not be pushed)\n\t\t// - PR modes (github-pr, github-draft-pr) for non-child: fetch and use origin/{branch}\n\t\t// - Local mode: use local branch (no fetch)\n\t\tconst metadata = await this.metadataManager.readMetadata(worktreePath)\n\t\tconst isChildLoom = !!metadata?.parentLoom\n\t\tconst settings = await this.settingsManager.loadSettings(worktreePath)\n\t\tconst mergeBehaviorMode = settings.mergeBehavior?.mode ?? 'local'\n\t\tconst isPRMode = mergeBehaviorMode === 'github-pr' || mergeBehaviorMode === 'github-draft-pr'\n\t\tconst useRemote = isPRMode && !isChildLoom\n\n\t\tlet targetBranch: string\n\t\tif (useRemote) {\n\t\t\t// PR modes (non-child): fetch and use origin/{branch}\n\t\t\tgetLogger().info('Fetching from origin...')\n\t\t\tawait fetchOrigin(worktreePath)\n\t\t\ttargetBranch = `origin/${mainBranch}`\n\t\t} else {\n\t\t\t// Local mode or child loom: use local branch\n\t\t\tgetLogger().info(`Using local branch ${mainBranch} for rebase...`)\n\t\t\ttargetBranch = mainBranch\n\t\t}\n\n\t\tgetLogger().info(`Starting rebase on ${targetBranch}...`)\n\n\t\t// Step 1: Check if branch exists (remote ref for origin/, local ref otherwise)\n\t\tconst refPath = useRemote ? `refs/remotes/${targetBranch}` : `refs/heads/${targetBranch}`\n\t\ttry {\n\t\t\tawait executeGitCommand(['show-ref', '--verify', '--quiet', refPath], {\n\t\t\t\tcwd: worktreePath,\n\t\t\t})\n\t\t} catch {\n\t\t\tif (useRemote) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Remote branch \"${targetBranch}\" does not exist. Cannot rebase.\\n` +\n\t\t\t\t\t\t`Ensure the repository has a \"${mainBranch}\" branch on origin.`\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Local branch \"${targetBranch}\" does not exist. Cannot rebase.\\n` +\n\t\t\t\t\t\t`Ensure the branch exists locally.`\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\t// Step 2: Check for uncommitted changes and create WIP commit if needed\n\t\tconst statusOutput = await executeGitCommand(['status', '--porcelain'], {\n\t\t\tcwd: worktreePath,\n\t\t})\n\n\t\tlet wipCommitHash: string | null = null\n\t\tif (statusOutput.trim()) {\n\t\t\tgetLogger().info('Uncommitted changes detected, creating temporary WIP commit...')\n\t\t\twipCommitHash = await this.createWipCommit(worktreePath)\n\t\t\tgetLogger().debug(`Created WIP commit: ${wipCommitHash}`)\n\t\t}\n\n\t\t// Step 3: Check if rebase is needed by comparing merge-base with target HEAD\n\t\tconst mergeBase = await executeGitCommand(['merge-base', targetBranch, 'HEAD'], {\n\t\t\tcwd: worktreePath,\n\t\t})\n\n\t\tconst targetHead = await executeGitCommand(['rev-parse', targetBranch], {\n\t\t\tcwd: worktreePath,\n\t\t})\n\n\t\tconst mergeBaseTrimmed = mergeBase.trim()\n\t\tconst targetHeadTrimmed = targetHead.trim()\n\n\t\t// If merge-base matches target HEAD, branch is already up to date\n\t\tif (mergeBaseTrimmed === targetHeadTrimmed) {\n\t\t\tgetLogger().success(`Branch is already up to date with ${targetBranch}. No rebase needed.`)\n\t\t\t// Restore WIP commit if created (soft reset to remove temporary commit)\n\t\t\tif (wipCommitHash) {\n\t\t\t\tawait this.restoreWipCommit(worktreePath, wipCommitHash)\n\t\t\t}\n\t\t\treturn { conflictsDetected: false, claudeLaunched: false, conflictsResolved: false }\n\t\t}\n\n\t\t// Step 4: Show commits to be rebased (for informational purposes)\n\t\tconst commitsOutput = await executeGitCommand(['log', '--oneline', `${targetBranch}..HEAD`], {\n\t\t\tcwd: worktreePath,\n\t\t})\n\n\t\tconst commits = commitsOutput.trim()\n\t\tconst commitLines = commits ? commits.split('\\n') : []\n\n\t\tif (commits) {\n\t\t\t// Show commits that will be rebased\n\t\t\tgetLogger().info(`Found ${commitLines.length} commit(s) to rebase:`)\n\t\t\tcommitLines.forEach((commit) => getLogger().info(` ${commit}`))\n\t\t} else {\n\t\t\t// Target has moved forward but branch has no new commits\n\t\t\tgetLogger().info(`${targetBranch} has moved forward. Rebasing to update branch...`)\n\t\t}\n\n\t\t// Step 5: User confirmation (unless force mode or dry-run)\n\t\tif (!force && !dryRun) {\n\t\t\t// TODO: Implement interactive prompt for confirmation\n\t\t\t// For now, proceeding automatically (use --force to skip this message)\n\t\t\tgetLogger().info('Proceeding with rebase... (use --force to skip confirmations)')\n\t\t}\n\n\t\t// Step 6: Execute rebase (unless dry-run)\n\t\tif (dryRun) {\n\t\t\tgetLogger().info(`[DRY RUN] Would execute: git rebase ${targetBranch}`)\n\t\t\tif (commitLines.length > 0) {\n\t\t\t\tgetLogger().info(`[DRY RUN] This would rebase ${commitLines.length} commit(s)`)\n\t\t\t}\n\t\t\treturn { conflictsDetected: false, claudeLaunched: false, conflictsResolved: false }\n\t\t}\n\n\t\t// Execute rebase\n\t\t// Use -c core.hooksPath=/dev/null to disable hooks during rebase\n\t\t// This prevents pre-commit hooks from running when commits are re-applied\n\t\ttry {\n\t\t\tawait executeGitCommand(['-c', 'core.hooksPath=/dev/null', 'rebase', targetBranch], { cwd: worktreePath })\n\t\t\tgetLogger().success('Rebase completed successfully!')\n\n\t\t\t// Restore WIP commit if created\n\t\t\tif (wipCommitHash) {\n\t\t\t\tawait this.restoreWipCommit(worktreePath, wipCommitHash)\n\t\t\t}\n\t\t\treturn { conflictsDetected: false, claudeLaunched: false, conflictsResolved: false }\n\t\t} catch (error) {\n\t\t\t// Detect conflicts\n\t\t\tconst conflictedFiles = await this.detectConflictedFiles(worktreePath)\n\n\t\t\tif (conflictedFiles.length > 0) {\n\t\t\t\t// Try Claude-assisted resolution first\n\t\t\t\tgetLogger().info('Merge conflicts detected, attempting Claude-assisted resolution...')\n\n\t\t\t\tconst resolved = await this.attemptClaudeConflictResolution(\n\t\t\t\t\tworktreePath,\n\t\t\t\t\tconflictedFiles,\n\t\t\t\t\t{ jsonStream }\n\t\t\t\t)\n\n\t\t\t\tif (resolved) {\n\t\t\t\t\tgetLogger().success('Conflicts resolved with Claude assistance, rebase completed')\n\n\t\t\t\t\t// Restore WIP commit if created\n\t\t\t\t\tif (wipCommitHash) {\n\t\t\t\t\t\tawait this.restoreWipCommit(worktreePath, wipCommitHash)\n\t\t\t\t\t}\n\t\t\t\t\treturn { conflictsDetected: true, claudeLaunched: true, conflictsResolved: true }\n\t\t\t\t}\n\n\t\t\t\t// Claude couldn't resolve or not available - fail fast\n\t\t\t\tconst conflictError = this.formatConflictError(conflictedFiles)\n\t\t\t\tthrow new Error(conflictError)\n\t\t\t}\n\n\t\t\t// If not a conflict, re-throw the original error\n\t\t\tthrow new Error(\n\t\t\t\t`Rebase failed: ${error instanceof Error ? error.message : String(error)}\\n` +\n\t\t\t\t\t'Run: git status for more details\\n' +\n\t\t\t\t\t'Or: git rebase --abort to cancel the rebase'\n\t\t\t)\n\t\t}\n\t}\n\n\t/**\n\t * Validate that fast-forward merge is possible\n\t * Ports bash/merge-and-clean.sh lines 957-968\n\t *\n\t * @param branchName - Name of the branch to merge\n\t * @param mainWorktreePath - Path where main branch is checked out\n\t * @throws Error if fast-forward is not possible\n\t */\n\tasync validateFastForwardPossible(mainBranch: string, branchName: string, mainWorktreePath: string): Promise<void> {\n\n\t\t// Step 1: Get merge-base between main and branch\n\t\tconst mergeBase = await executeGitCommand(['merge-base', mainBranch, branchName], {\n\t\t\tcwd: mainWorktreePath,\n\t\t})\n\n\t\t// Step 2: Get current HEAD of main\n\t\tconst mainHead = await executeGitCommand(['rev-parse', mainBranch], {\n\t\t\tcwd: mainWorktreePath,\n\t\t})\n\n\t\t// Step 3: Compare - they must match for fast-forward\n\t\tconst mergeBaseTrimmed = mergeBase.trim()\n\t\tconst mainHeadTrimmed = mainHead.trim()\n\n\t\tif (mergeBaseTrimmed !== mainHeadTrimmed) {\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot perform fast-forward merge.\\n' +\n\t\t\t\t\t`The ${mainBranch} branch has moved forward since this branch was created.\\n` +\n\t\t\t\t\t`Merge base: ${mergeBaseTrimmed}\\n` +\n\t\t\t\t\t`Main HEAD: ${mainHeadTrimmed}\\n\\n` +\n\t\t\t\t\t'To fix this:\\n' +\n\t\t\t\t\t` 1. Rebase the branch on ${mainBranch}: git rebase ${mainBranch}\\n` +\n\t\t\t\t\t` 2. Or use: il finish to automatically rebase and merge\\n`\n\t\t\t)\n\t\t}\n\t}\n\n\t/**\n\t * Perform fast-forward only merge\n\t * Ports bash/merge-and-clean.sh lines 938-994\n\t *\n\t * @param branchName - Name of the branch to merge\n\t * @param worktreePath - Path to the worktree\n\t * @param options - Merge options (dryRun, force)\n\t * @throws Error if checkout, validation, or merge fails\n\t */\n\tasync performFastForwardMerge(\n\t\tbranchName: string,\n\t\tworktreePath: string,\n\t\toptions: MergeOptions = {}\n\t): Promise<void> {\n\t\tconst { dryRun = false, force = false } = options\n\n\t\tgetLogger().info('Starting fast-forward merge...')\n\n\t\t// Step 1: Get the merge target branch FIRST\n\t\t// For child looms, this will be the parent branch from metadata\n\t\t// For regular looms, this falls back to settings.mainBranch or 'main'\n\t\tconst mainBranch = await this.getMainBranch(worktreePath)\n\n\t\t// Step 2: Find where the merge target branch is checked out\n\t\t// CRITICAL: We must find the worktree for the MERGE TARGET, not settings.mainBranch\n\t\t// This fixes the child loom bug where we'd find the 'main' worktree instead of the parent branch worktree\n\t\tlet mainWorktreePath: string\n\t\tif (options.repoRoot) {\n\t\t\tmainWorktreePath = options.repoRoot\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t// First try to find worktree with the exact merge target branch checked out\n\t\t\t\tmainWorktreePath = await findWorktreeForBranch(mainBranch, worktreePath)\n\t\t\t} catch {\n\t\t\t\t// Fallback: if no worktree has the branch checked out, use settings-based lookup\n\t\t\t\t// This handles edge cases like bare repos or detached HEAD states\n\t\t\t\tgetLogger().debug(`No worktree found for branch '${mainBranch}', falling back to settings-based lookup`)\n\t\t\t\tmainWorktreePath = await findMainWorktreePathWithSettings(worktreePath, this.settingsManager)\n\t\t\t}\n\t\t}\n\n\t\t// Step 3: No need to checkout - the merge target branch is already checked out in mainWorktreePath\n\t\tgetLogger().debug(`Using ${mainBranch} branch location: ${mainWorktreePath}`)\n\n\t\t// Step 4: Verify we're on the correct branch\n\t\tconst currentBranch = await executeGitCommand(['branch', '--show-current'], {\n\t\t\tcwd: mainWorktreePath,\n\t\t})\n\n\t\tif (currentBranch.trim() !== mainBranch) {\n\t\t\tthrow new Error(\n\t\t\t\t`Expected ${mainBranch} branch but found: ${currentBranch.trim()}\\n` +\n\t\t\t\t\t`At location: ${mainWorktreePath}\\n` +\n\t\t\t\t\t'This indicates the main worktree detection failed.'\n\t\t\t)\n\t\t}\n\n\t\t// Step 5: Validate fast-forward is possible\n\t\tawait this.validateFastForwardPossible(mainBranch, branchName, mainWorktreePath)\n\n\t\t// Step 6: Show commits to be merged\n\t\tconst commitsOutput = await executeGitCommand(['log', '--oneline', `${mainBranch}..${branchName}`], {\n\t\t\tcwd: mainWorktreePath,\n\t\t})\n\n\t\tconst commits = commitsOutput.trim()\n\n\t\t// If no commits, branch has no changes ahead of main\n\t\tif (!commits) {\n\t\t\tgetLogger().success(`Branch has no commits ahead of ${mainBranch}. No merge needed.`)\n\t\t\treturn\n\t\t}\n\n\t\t// Show commits that will be merged\n\t\tconst commitLines = commits.split('\\n')\n\t\tgetLogger().info(`Found ${commitLines.length} commit(s) to merge:`)\n\t\tcommitLines.forEach((commit) => getLogger().info(` ${commit}`))\n\n\t\t// Step 7: User confirmation (unless force mode or dry-run)\n\t\tif (!force && !dryRun) {\n\t\t\t// TODO: Implement interactive prompt for confirmation\n\t\t\t// For now, proceeding automatically (use --force to skip this message)\n\t\t\tgetLogger().info('Proceeding with fast-forward merge... (use --force to skip confirmations)')\n\t\t}\n\n\t\t// Step 8: Execute merge (unless dry-run)\n\t\tif (dryRun) {\n\t\t\tgetLogger().info(`[DRY RUN] Would execute: git merge --ff-only ${branchName}`)\n\t\t\tgetLogger().info(`[DRY RUN] This would merge ${commitLines.length} commit(s)`)\n\t\t\treturn\n\t\t}\n\n\t\t// Execute fast-forward merge\n\t\ttry {\n\t\t\tgetLogger().debug(`Executing fast-forward merge of ${branchName} into ${mainBranch} using cwd: ${mainWorktreePath}...`)\n\t\t\tawait executeGitCommand(['merge', '--ff-only', branchName], { cwd: mainWorktreePath })\n\t\t\tgetLogger().success(`Fast-forward merge completed! Merged ${commitLines.length} commit(s).`)\n\t\t} catch (error) {\n\t\t\tthrow new Error(\n\t\t\t\t`Fast-forward merge failed: ${error instanceof Error ? error.message : String(error)}\\n\\n` +\n\t\t\t\t\t'To recover:\\n' +\n\t\t\t\t\t' 1. Check merge status: git status\\n' +\n\t\t\t\t\t' 2. Abort merge if needed: git merge --abort\\n' +\n\t\t\t\t\t' 3. Verify branch is rebased: git rebase main\\n' +\n\t\t\t\t\t' 4. Try merge again: il finish'\n\t\t\t)\n\t\t}\n\t}\n\n\t/**\n\t * Helper: Detect conflicted files after failed rebase\n\t * @private\n\t */\n\tprivate async detectConflictedFiles(worktreePath: string): Promise<string[]> {\n\t\ttry {\n\t\t\tconst output = await executeGitCommand(['diff', '--name-only', '--diff-filter=U'], {\n\t\t\t\tcwd: worktreePath,\n\t\t\t})\n\n\t\t\treturn output\n\t\t\t\t.trim()\n\t\t\t\t.split('\\n')\n\t\t\t\t.filter((file) => file.length > 0)\n\t\t} catch {\n\t\t\t// If command fails, return empty array (might not be a conflict)\n\t\t\treturn []\n\t\t}\n\t}\n\n\t/**\n\t * Create a temporary WIP commit to preserve uncommitted changes during rebase\n\t * Stages all changes (tracked, untracked) using git add -A\n\t * Uses --no-verify to skip pre-commit hooks since this is a temporary internal commit\n\t * @param worktreePath - Path to the worktree\n\t * @returns The commit hash of the WIP commit\n\t * @private\n\t */\n\tprivate async createWipCommit(worktreePath: string): Promise<string> {\n\t\t// Stage all changes including untracked files\n\t\tawait executeGitCommand(['add', '-A'], { cwd: worktreePath })\n\n\t\t// Create WIP commit with distinctive message\n\t\t// Use --no-verify to skip pre-commit hooks - this is a temporary internal commit\n\t\tawait executeGitCommand(['commit', '--no-verify', '-m', 'WIP: Auto-stash for rebase'], { cwd: worktreePath })\n\n\t\t// Get and return the commit hash\n\t\tconst hash = await executeGitCommand(['rev-parse', 'HEAD'], { cwd: worktreePath })\n\t\treturn hash.trim()\n\t}\n\n\t/**\n\t * Restore uncommitted changes from WIP commit via soft reset\n\t * Logs warning but does not fail if soft reset fails (changes are safe in commit history)\n\t * @param worktreePath - Path to the worktree\n\t * @param wipCommitHash - Original WIP commit hash for verification logging\n\t * @private\n\t */\n\tprivate async restoreWipCommit(worktreePath: string, wipCommitHash: string): Promise<void> {\n\t\tgetLogger().info('Restoring uncommitted changes from WIP commit...')\n\n\t\ttry {\n\t\t\t// Soft reset to parent - changes become staged\n\t\t\tawait executeGitCommand(['reset', '--soft', 'HEAD~1'], { cwd: worktreePath })\n\n\t\t\t// Unstage files to restore to original working directory state\n\t\t\tawait executeGitCommand(['reset', 'HEAD'], { cwd: worktreePath })\n\n\t\t\tgetLogger().success('Restored uncommitted changes from WIP commit')\n\t\t} catch (error) {\n\t\t\t// Log warning but consider rebase successful - work is not lost\n\t\t\tgetLogger().warn(\n\t\t\t\t`Failed to restore WIP commit (${wipCommitHash}). ` +\n\t\t\t\t\t`Your changes are safe in the commit history. ` +\n\t\t\t\t\t`Manual recovery: git reset --soft HEAD~1`,\n\t\t\t\t{ error: error instanceof Error ? error.message : String(error) }\n\t\t\t)\n\t\t}\n\t}\n\n\t/**\n\t * Helper: Format conflict error message with manual resolution steps\n\t * @private\n\t */\n\tprivate formatConflictError(conflictedFiles: string[]): string {\n\t\tconst fileList = conflictedFiles.map((file) => ` • ${file}`).join('\\n')\n\n\t\treturn (\n\t\t\t'Rebase failed - merge conflicts detected in:\\n' +\n\t\t\tfileList +\n\t\t\t'\\n\\n' +\n\t\t\t'To resolve manually:\\n' +\n\t\t\t' 1. Fix conflicts in the files above\\n' +\n\t\t\t' 2. Stage resolved files: git add <files>\\n' +\n\t\t\t' 3. Continue rebase: git rebase --continue\\n' +\n\t\t\t' 4. Or abort rebase: git rebase --abort\\n' +\n\t\t\t' 5. Then re-run: il finish <issue-number>'\n\t\t)\n\t}\n\n\t/**\n\t * Attempt to resolve conflicts using Claude\n\t * Ports bash/merge-and-clean.sh lines 839-894\n\t *\n\t * @param worktreePath - Path to the worktree\n\t * @param conflictedFiles - List of files with conflicts\n\t * @returns true if conflicts resolved, false otherwise\n\t * @private\n\t */\n\tprivate async attemptClaudeConflictResolution(\n\t\tworktreePath: string,\n\t\tconflictedFiles: string[],\n\t\toptions: { jsonStream?: boolean } = {}\n\t): Promise<boolean> {\n\t\t// Check if Claude CLI is available\n\t\tconst isClaudeAvailable = await detectClaudeCli()\n\t\tif (!isClaudeAvailable) {\n\t\t\tgetLogger().debug('Claude CLI not available, skipping conflict resolution')\n\t\t\treturn false\n\t\t}\n\n\t\tgetLogger().info(`Launching Claude to resolve conflicts in ${conflictedFiles.length} file(s)...`)\n\n\t\t// Hard-coded prompt matching bash script line 844\n\t\t// No templates, no complexity - just the essential instruction\n\t\tconst systemPrompt =\n\t\t\t`Please help resolve the git rebase conflicts in this repository. ` +\n\t\t\t`Analyze the conflicted files, understand the changes from both branches, ` +\n\t\t\t`fix the conflicts, then run 'git add .' to stage the resolved files, ` +\n\t\t\t`and finally run 'git rebase --continue' to continue the rebase process. ` +\n\t\t\t`Once the issue is resolved, tell the user they can use /exit to continue with the process.`\n\n\t\tconst prompt =\n\t\t\t`Help me with this rebase please.`\n\n\t\t// Git commands to auto-approve during rebase conflict resolution\n\t\t// These are the essential commands Claude needs to analyze and resolve conflicts\n\t\t// Note: git reset and git checkout are intentionally excluded as they can be destructive\n\t\tconst rebaseAllowedTools = [\n\t\t\t'Bash(git status:*)',\n\t\t\t'Bash(git diff:*)',\n\t\t\t'Bash(git log:*)',\n\t\t\t'Bash(git add:*)',\n\t\t\t'Bash(git rebase:*)',\n\t\t\t'Bash(GIT_EDITOR=true git rebase:*)',\n\t\t]\n\n\t\ttry {\n\t\t\t// Launch Claude interactively in current terminal\n\t\t\t// User will interact directly with Claude to resolve conflicts\n\t\t\t// When jsonStream is true, run headless with stdout passthrough for JSONL streaming\n\t\t\tawait launchClaude(prompt, {\n\t\t\t\tappendSystemPrompt: systemPrompt,\n\t\t\t\taddDir: worktreePath,\n\t\t\t\theadless: options.jsonStream ? true : false,\n\t\t\t\t...(options.jsonStream && {\n\t\t\t\t\tpermissionMode: 'bypassPermissions' as const,\n\t\t\t\t\tpassthroughStdout: true,\n\t\t\t\t}),\n\t\t\t\tallowedTools: rebaseAllowedTools,\n\t\t\t\tnoSessionPersistence: true, // Utility operation - no session persistence needed\n\t\t\t})\n\n\t\t\t// After Claude interaction completes, check if conflicts resolved\n\t\t\tconst remainingConflicts = await this.detectConflictedFiles(worktreePath)\n\n\t\t\tif (remainingConflicts.length > 0) {\n\t\t\t\tgetLogger().warn(\n\t\t\t\t\t`Conflicts still exist in ${remainingConflicts.length} file(s) after Claude assistance`\n\t\t\t\t)\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\t// Check if rebase completed or still in progress\n\t\t\tconst rebaseInProgress = await this.isRebaseInProgress(worktreePath)\n\n\t\t\tif (rebaseInProgress) {\n\t\t\t\tgetLogger().warn('Rebase still in progress after Claude assistance')\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\treturn true\n\t\t} catch (error) {\n\t\t\tgetLogger().warn('Claude conflict resolution failed', {\n\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t})\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Check if a git rebase is currently in progress\n\t * Checks for .git/rebase-merge or .git/rebase-apply directories\n\t * Ports bash script logic from lines 853-856\n\t *\n\t * @param worktreePath - Path to the worktree\n\t * @returns true if rebase in progress, false otherwise\n\t * @private\n\t */\n\tprivate async isRebaseInProgress(worktreePath: string): Promise<boolean> {\n\t\tconst fs = await import('node:fs/promises')\n\t\tconst path = await import('node:path')\n\n\t\t// In git worktrees, .git is a file pointing to the actual git dir.\n\t\t// Use git rev-parse to resolve the real git directory.\n\t\tconst gitDir = (await executeGitCommand(\n\t\t\t['rev-parse', '--absolute-git-dir'],\n\t\t\t{ cwd: worktreePath }\n\t\t)).trim()\n\n\t\tconst rebaseMergePath = path.join(gitDir, 'rebase-merge')\n\t\tconst rebaseApplyPath = path.join(gitDir, 'rebase-apply')\n\n\t\t// Check for rebase-merge directory\n\t\ttry {\n\t\t\tawait fs.access(rebaseMergePath)\n\t\t\treturn true\n\t\t} catch {\n\t\t\t// Directory doesn't exist, continue checking\n\t\t}\n\n\t\t// Check for rebase-apply directory\n\t\ttry {\n\t\t\tawait fs.access(rebaseApplyPath)\n\t\t\treturn true\n\t\t} catch {\n\t\t\t// Directory doesn't exist\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Abort an in-progress rebase if one is detected\n\t * This handles cases where a previous rebase was interrupted (e.g., terminal closed,\n\t * Claude session ended, user manually stopped) and the worktree is left in a dirty state.\n\t * Since we're about to start a new rebase, the stale rebase state is irrelevant and safe to abort.\n\t *\n\t * @param worktreePath - Path to the worktree\n\t * @private\n\t */\n\tprivate async abortInProgressRebase(worktreePath: string): Promise<void> {\n\t\tconst rebaseInProgress = await this.isRebaseInProgress(worktreePath)\n\n\t\tif (!rebaseInProgress) {\n\t\t\treturn\n\t\t}\n\n\t\tgetLogger().warn('A rebase is already in progress. Aborting the stale rebase before proceeding...')\n\n\t\ttry {\n\t\t\tawait executeGitCommand(['rebase', '--abort'], { cwd: worktreePath })\n\t\t\tgetLogger().info('Stale rebase aborted successfully.')\n\t\t} catch (error) {\n\t\t\t// Handle race condition: rebase may have been resolved between check and abort\n\t\t\tconst errorMsg = error instanceof Error ? error.message : String(error)\n\t\t\tif (errorMsg.includes('No rebase in progress')) {\n\t\t\t\tgetLogger().info('Rebase was already resolved by another process.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (error instanceof GitCommandError) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Failed to abort in-progress rebase: ${error.message}\\n` +\n\t\t\t\t\t\t'Manual recovery: run \"git rebase --abort\" in the worktree directory.'\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow error\n\t\t}\n\t}\n}\n","import { getLogger } from '../utils/logger-context.js'\nimport { detectPackageManager, runScript } from '../utils/package-manager.js'\nimport { getPackageConfig, hasScript } from '../utils/package-json.js'\nimport { ProjectCapabilityDetector } from './ProjectCapabilityDetector.js'\n\nexport interface BuildOptions {\n\tdryRun?: boolean\n}\n\nexport interface BuildResult {\n\tsuccess: boolean\n\tskipped: boolean\n\treason?: string\n\tduration: number\n}\n\n/**\n * BuildRunner handles post-merge build verification for CLI projects\n * Only runs build when project has CLI capabilities (bin field in package.json)\n */\nexport class BuildRunner {\n\tprivate capabilityDetector: ProjectCapabilityDetector\n\n\tconstructor(capabilityDetector?: ProjectCapabilityDetector) {\n\t\tthis.capabilityDetector = capabilityDetector ?? new ProjectCapabilityDetector()\n\t}\n\n\t/**\n\t * Run build verification in the specified directory\n\t * @param buildPath - Path where build should run (typically main worktree path)\n\t * @param options - Build options\n\t */\n\tasync runBuild(buildPath: string, options: BuildOptions = {}): Promise<BuildResult> {\n\t\tconst startTime = Date.now()\n\n\t\ttry {\n\t\t\t// Step 1: Check if build script exists (checks .iloom/package.iloom.json first, then package.json)\n\t\t\tconst pkgJson = await getPackageConfig(buildPath)\n\t\t\tconst hasBuildScript = hasScript(pkgJson, 'build')\n\n\t\t\tif (!hasBuildScript) {\n\t\t\tgetLogger().debug('Skipping build - no build script found')\n\t\t\t\treturn {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\tskipped: true,\n\t\t\t\t\treason: 'No build script found in package configuration',\n\t\t\t\t\tduration: Date.now() - startTime,\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Handle missing package.json - skip build for non-Node.js projects without package.iloom.json\n\t\t\tif (error instanceof Error && error.message.includes('package.json not found')) {\n\t\t\tgetLogger().debug('Skipping build - no package configuration found')\n\t\t\t\treturn {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\tskipped: true,\n\t\t\t\t\treason: 'No package configuration found in project',\n\t\t\t\t\tduration: Date.now() - startTime,\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Re-throw other errors\n\t\t\tthrow error\n\t\t}\n\n\t\t// Step 2: Check if project has CLI capability (bin field)\n\t\tconst capabilities = await this.capabilityDetector.detectCapabilities(buildPath)\n\t\tconst isCLIProject = capabilities.capabilities.includes('cli')\n\n\t\tif (!isCLIProject) {\n\t\tgetLogger().debug('Skipping build - not a CLI project (no bin field)')\n\t\t\treturn {\n\t\t\t\tsuccess: true,\n\t\t\t\tskipped: true,\n\t\t\t\treason: 'Project is not a CLI project (no bin field in package.json)',\n\t\t\t\tduration: Date.now() - startTime,\n\t\t\t}\n\t\t}\n\n\t\t// Step 3: Detect package manager\n\t\tconst packageManager = await detectPackageManager(buildPath)\n\n\t\t// Step 4: Handle dry-run mode\n\t\tif (options.dryRun) {\n\t\t\tconst command =\n\t\t\t\tpackageManager === 'npm' ? 'npm run build' : `${packageManager} build`\n\t\tgetLogger().info(`[DRY RUN] Would run: ${command}`)\n\t\t\treturn {\n\t\t\t\tsuccess: true,\n\t\t\t\tskipped: false,\n\t\t\t\tduration: Date.now() - startTime,\n\t\t\t}\n\t\t}\n\n\t\t// Step 5: Execute build\n\tgetLogger().info('Running build...')\n\n\t\ttry {\n\t\t\tawait runScript('build', buildPath, [], { quiet: true })\n\t\tgetLogger().success('Build completed successfully')\n\n\t\t\treturn {\n\t\t\t\tsuccess: true,\n\t\t\t\tskipped: false,\n\t\t\t\tduration: Date.now() - startTime,\n\t\t\t}\n\t\t} catch {\n\t\t\t// Step 6: Throw detailed error on failure\n\t\t\tconst runCommand =\n\t\t\t\tpackageManager === 'npm' ? 'npm run build' : `${packageManager} build`\n\n\t\t\tthrow new Error(\n\t\t\t\t`Error: Build failed.\\n` +\n\t\t\t\t\t`Fix build errors before proceeding.\\n\\n` +\n\t\t\t\t\t`Run '${runCommand}' to see detailed errors.`\n\t\t\t)\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaO,IAAM,eAAN,MAAmB;AAAA,EAIzB,YAAY,iBAAmC,iBAAmC;AACjF,SAAK,kBAAkB,mBAAmB,IAAI,gBAAgB;AAC9D,SAAK,kBAAkB,mBAAmB,IAAI,gBAAgB;AAAA,EAC/D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAc,cAAc,cAAwC;AAEnE,WAAO,qBAAqB,gBAAgB,QAAQ,IAAI,GAAG;AAAA,MAC1D,iBAAiB,KAAK;AAAA,MACtB,iBAAiB,KAAK;AAAA,IACvB,CAAC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,aAAa,cAAsB,UAAwB,CAAC,GAA2B;AA5C9F;AA6CE,UAAM,EAAE,SAAS,OAAO,QAAQ,OAAO,aAAa,MAAM,IAAI;AAG9D,UAAM,KAAK,sBAAsB,YAAY;AAE7C,UAAM,aAAa,MAAM,KAAK,cAAc,YAAY;AAMxD,UAAM,WAAW,MAAM,KAAK,gBAAgB,aAAa,YAAY;AACrE,UAAM,cAAc,C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