@iloom/cli 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/dist/{BranchNamingService-ECJHBB67.js → BranchNamingService-25KSZAEM.js} +2 -2
  4. package/dist/ClaudeContextManager-66GR4BGM.js +14 -0
  5. package/dist/ClaudeService-7KM5NA5Z.js +13 -0
  6. package/dist/{LoomLauncher-L64HHS3T.js → LoomLauncher-TDLZSYG2.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-4E7LCFUG.js +24 -0
  12. package/dist/chunk-4E7LCFUG.js.map +1 -0
  13. package/dist/{chunk-MNHZB4Z2.js → chunk-4FGEGQW4.js} +3 -3
  14. package/dist/{chunk-LXLMMXXY.js → chunk-5FJWO4IT.js} +17 -12
  15. package/dist/chunk-5FJWO4IT.js.map +1 -0
  16. package/dist/{chunk-ZHPNZC75.js → chunk-5RPBYK5Q.js} +26 -21
  17. package/dist/chunk-5RPBYK5Q.js.map +1 -0
  18. package/dist/{chunk-WY4QBK43.js → chunk-63QWFWH3.js} +2 -2
  19. package/dist/{chunk-YYAKPQBT.js → chunk-7VHJNVLF.js} +19 -9
  20. package/dist/chunk-7VHJNVLF.js.map +1 -0
  21. package/dist/{chunk-SF2P22EE.js → chunk-C6HNNJIV.js} +2 -2
  22. package/dist/{chunk-5MWV33NN.js → chunk-CVCTIDDK.js} +2 -2
  23. package/dist/{chunk-RYWFS37M.js → chunk-E6KOWMKA.js} +2 -2
  24. package/dist/{chunk-6EU6TCF6.js → chunk-EVPZFV3K.js} +5 -5
  25. package/dist/{chunk-ZEWU5PZK.js → chunk-G5V75JD5.js} +2 -2
  26. package/dist/chunk-GRISNU6G.js +651 -0
  27. package/dist/chunk-GRISNU6G.js.map +1 -0
  28. package/dist/{chunk-VGGST52X.js → chunk-I5T677EA.js} +2 -2
  29. package/dist/{chunk-VECNX6VX.js → chunk-KIK2ZFAL.js} +2 -2
  30. package/dist/{chunk-FB47TIJG.js → chunk-KKV5WH5M.js} +4 -23
  31. package/dist/chunk-KKV5WH5M.js.map +1 -0
  32. package/dist/{chunk-ZW2LKWWE.js → chunk-KVHIAWVT.js} +3 -3
  33. package/dist/{chunk-3D7WQM7I.js → chunk-LLHXQS3C.js} +2 -2
  34. package/dist/{chunk-Y4YZTHZE.js → chunk-LUKXJSRI.js} +2 -2
  35. package/dist/{ignite-CGOV3TD4.js → chunk-OTGH2HRS.js} +105 -71
  36. package/dist/chunk-OTGH2HRS.js.map +1 -0
  37. package/dist/{chunk-J5S7DFYC.js → chunk-QVLPWNE3.js} +2 -2
  38. package/dist/chunk-RJ3VBUFK.js +781 -0
  39. package/dist/chunk-RJ3VBUFK.js.map +1 -0
  40. package/dist/{chunk-SN3SQCFK.js → chunk-S7PZA6IV.js} +4 -4
  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-ONQYPICO.js → chunk-UR5DGNUO.js} +60 -6
  45. package/dist/chunk-UR5DGNUO.js.map +1 -0
  46. package/dist/{chunk-4WJNIR5O.js → chunk-UUEW5KWB.js} +1 -1
  47. package/dist/chunk-UUEW5KWB.js.map +1 -0
  48. package/dist/{chunk-NRSWLOAZ.js → chunk-WXIM2WS7.js} +4 -4
  49. package/dist/{chunk-UD3WJDIV.js → chunk-ZNMPGMHY.js} +11 -774
  50. package/dist/chunk-ZNMPGMHY.js.map +1 -0
  51. package/dist/{claude-P3NQR6IJ.js → claude-7GGEWVEM.js} +2 -2
  52. package/dist/{cleanup-6UCPVMFG.js → cleanup-6PVAC4NI.js} +19 -17
  53. package/dist/{cleanup-6UCPVMFG.js.map → cleanup-6PVAC4NI.js.map} +1 -1
  54. package/dist/cli.js +154 -614
  55. package/dist/cli.js.map +1 -1
  56. package/dist/{commit-L3EPY5QG.js → commit-FZR5XDQG.js} +12 -10
  57. package/dist/commit-FZR5XDQG.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-G2GJFN2F.js} +10 -8
  62. package/dist/{feedback-TMBXSCM5.js.map → feedback-G2GJFN2F.js.map} +1 -1
  63. package/dist/{git-ET64COO3.js → git-GTLKAZRJ.js} +3 -3
  64. package/dist/ignite-H2O5Y5A2.js +34 -0
  65. package/dist/ignite-H2O5Y5A2.js.map +1 -0
  66. package/dist/index.d.ts +113 -18
  67. package/dist/index.js +177 -12
  68. package/dist/index.js.map +1 -1
  69. package/dist/{init-GFQ5W7GK.js → init-32YOKXRL.js} +8 -8
  70. package/dist/{issues-T4ZZSPEG.js → issues-4UUAQ5K6.js} +3 -3
  71. package/dist/{lint-6TQXDZ3T.js → lint-AAN2NZWG.js} +6 -6
  72. package/dist/mcp/harness-server.js +140 -0
  73. package/dist/mcp/harness-server.js.map +1 -0
  74. package/dist/mcp/issue-management-server.js +140 -18
  75. package/dist/mcp/issue-management-server.js.map +1 -1
  76. package/dist/{open-5QZGXQRF.js → open-FXWW3VI4.js} +8 -8
  77. package/dist/{plan-U7ZQWLFY.js → plan-RQ5FPIGF.js} +338 -36
  78. package/dist/plan-RQ5FPIGF.js.map +1 -0
  79. package/dist/prompts/CLAUDE.md +2 -2
  80. package/dist/prompts/init-prompt.txt +102 -27
  81. package/dist/prompts/issue-prompt.txt +46 -0
  82. package/dist/prompts/plan-prompt.txt +59 -19
  83. package/dist/prompts/swarm-orchestrator-prompt.txt +107 -80
  84. package/dist/{rebase-DWIB77KV.js → rebase-6NVLX5V7.js} +17 -8
  85. package/dist/rebase-6NVLX5V7.js.map +1 -0
  86. package/dist/{recap-MX63HAKV.js → recap-OMBOKJST.js} +6 -6
  87. package/dist/{run-O3TFNQFC.js → run-BBXLRIZB.js} +8 -8
  88. package/dist/schema/settings.schema.json +36 -2
  89. package/dist/{shell-G6VC2CYR.js → shell-RF7LTND5.js} +5 -5
  90. package/dist/{summary-FWHAX55O.js → summary-WTQZ7XG2.js} +9 -9
  91. package/dist/{test-F7JNJZYP.js → test-SGO6I5Z7.js} +6 -6
  92. package/dist/{test-git-BTAOIUE2.js → test-git-XM4TM65W.js} +3 -3
  93. package/dist/{test-jira-CHYNV33F.js → test-jira-LDTOYFSD.js} +3 -3
  94. package/dist/{test-prefix-Q6TFSU6F.js → test-prefix-GBO37XCN.js} +3 -3
  95. package/dist/{test-webserver-EONCG7E7.js → test-webserver-NZ3JTVLL.js} +5 -5
  96. package/dist/{vscode-VA5X4P25.js → vscode-6XUGHJKL.js} +5 -5
  97. package/package.json +1 -1
  98. package/dist/ClaudeContextManager-QXX6ZFST.js +0 -14
  99. package/dist/ClaudeService-NJNK2SUH.js +0 -13
  100. package/dist/chunk-4WJNIR5O.js.map +0 -1
  101. package/dist/chunk-FB47TIJG.js.map +0 -1
  102. package/dist/chunk-LXLMMXXY.js.map +0 -1
  103. package/dist/chunk-ONQYPICO.js.map +0 -1
  104. package/dist/chunk-UD3WJDIV.js.map +0 -1
  105. package/dist/chunk-UVD4CZKS.js +0 -101
  106. package/dist/chunk-UVD4CZKS.js.map +0 -1
  107. package/dist/chunk-UWGVCXRF.js.map +0 -1
  108. package/dist/chunk-YYAKPQBT.js.map +0 -1
  109. package/dist/chunk-ZHPNZC75.js.map +0 -1
  110. package/dist/commit-L3EPY5QG.js.map +0 -1
  111. package/dist/ignite-CGOV3TD4.js.map +0 -1
  112. package/dist/plan-U7ZQWLFY.js.map +0 -1
  113. package/dist/rebase-DWIB77KV.js.map +0 -1
  114. /package/dist/{BranchNamingService-ECJHBB67.js.map → BranchNamingService-25KSZAEM.js.map} +0 -0
  115. /package/dist/{ClaudeContextManager-QXX6ZFST.js.map → ClaudeContextManager-66GR4BGM.js.map} +0 -0
  116. /package/dist/{ClaudeService-NJNK2SUH.js.map → ClaudeService-7KM5NA5Z.js.map} +0 -0
  117. /package/dist/{LoomLauncher-L64HHS3T.js.map → LoomLauncher-TDLZSYG2.js.map} +0 -0
  118. /package/dist/{PromptTemplateManager-DULSVRRE.js.map → PromptTemplateManager-YOE2SIPG.js.map} +0 -0
  119. /package/dist/{SettingsManager-BQDQA3FK.js.map → SettingsManager-FNKCOZMQ.js.map} +0 -0
  120. /package/dist/{build-5GO3XW26.js.map → build-VHGEMXBA.js.map} +0 -0
  121. /package/dist/{chunk-MNHZB4Z2.js.map → chunk-4FGEGQW4.js.map} +0 -0
  122. /package/dist/{chunk-WY4QBK43.js.map → chunk-63QWFWH3.js.map} +0 -0
  123. /package/dist/{chunk-SF2P22EE.js.map → chunk-C6HNNJIV.js.map} +0 -0
  124. /package/dist/{chunk-5MWV33NN.js.map → chunk-CVCTIDDK.js.map} +0 -0
  125. /package/dist/{chunk-RYWFS37M.js.map → chunk-E6KOWMKA.js.map} +0 -0
  126. /package/dist/{chunk-6EU6TCF6.js.map → chunk-EVPZFV3K.js.map} +0 -0
  127. /package/dist/{chunk-ZEWU5PZK.js.map → chunk-G5V75JD5.js.map} +0 -0
  128. /package/dist/{chunk-VGGST52X.js.map → chunk-I5T677EA.js.map} +0 -0
  129. /package/dist/{chunk-VECNX6VX.js.map → chunk-KIK2ZFAL.js.map} +0 -0
  130. /package/dist/{chunk-ZW2LKWWE.js.map → chunk-KVHIAWVT.js.map} +0 -0
  131. /package/dist/{chunk-3D7WQM7I.js.map → chunk-LLHXQS3C.js.map} +0 -0
  132. /package/dist/{chunk-Y4YZTHZE.js.map → chunk-LUKXJSRI.js.map} +0 -0
  133. /package/dist/{chunk-J5S7DFYC.js.map → chunk-QVLPWNE3.js.map} +0 -0
  134. /package/dist/{chunk-SN3SQCFK.js.map → chunk-S7PZA6IV.js.map} +0 -0
  135. /package/dist/{chunk-JO2LZ6EQ.js.map → chunk-SWSJWA2S.js.map} +0 -0
  136. /package/dist/{chunk-NRSWLOAZ.js.map → chunk-WXIM2WS7.js.map} +0 -0
  137. /package/dist/{claude-P3NQR6IJ.js.map → claude-7GGEWVEM.js.map} +0 -0
  138. /package/dist/{compile-ZS4HYRX5.js.map → compile-7ALJHZ4N.js.map} +0 -0
  139. /package/dist/{contribute-ORDDQGSL.js.map → contribute-5GKLK3BQ.js.map} +0 -0
  140. /package/dist/{dev-server-FYZ2AQIH.js.map → dev-server-7SMIB7OF.js.map} +0 -0
  141. /package/dist/{git-ET64COO3.js.map → git-GTLKAZRJ.js.map} +0 -0
  142. /package/dist/{init-GFQ5W7GK.js.map → init-32YOKXRL.js.map} +0 -0
  143. /package/dist/{issues-T4ZZSPEG.js.map → issues-4UUAQ5K6.js.map} +0 -0
  144. /package/dist/{lint-6TQXDZ3T.js.map → lint-AAN2NZWG.js.map} +0 -0
  145. /package/dist/{open-5QZGXQRF.js.map → open-FXWW3VI4.js.map} +0 -0
  146. /package/dist/{recap-MX63HAKV.js.map → recap-OMBOKJST.js.map} +0 -0
  147. /package/dist/{run-O3TFNQFC.js.map → run-BBXLRIZB.js.map} +0 -0
  148. /package/dist/{shell-G6VC2CYR.js.map → shell-RF7LTND5.js.map} +0 -0
  149. /package/dist/{summary-FWHAX55O.js.map → summary-WTQZ7XG2.js.map} +0 -0
  150. /package/dist/{test-F7JNJZYP.js.map → test-SGO6I5Z7.js.map} +0 -0
  151. /package/dist/{test-git-BTAOIUE2.js.map → test-git-XM4TM65W.js.map} +0 -0
  152. /package/dist/{test-jira-CHYNV33F.js.map → test-jira-LDTOYFSD.js.map} +0 -0
  153. /package/dist/{test-prefix-Q6TFSU6F.js.map → test-prefix-GBO37XCN.js.map} +0 -0
  154. /package/dist/{test-webserver-EONCG7E7.js.map → test-webserver-NZ3JTVLL.js.map} +0 -0
  155. /package/dist/{vscode-VA5X4P25.js.map → vscode-6XUGHJKL.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -1,72 +1,73 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  SessionSummaryService
4
- } from "./chunk-6EU6TCF6.js";
4
+ } from "./chunk-EVPZFV3K.js";
5
5
  import "./chunk-NXMDEL3F.js";
6
+ import {
7
+ ResourceCleanup
8
+ } from "./chunk-RJ3VBUFK.js";
9
+ import "./chunk-LUKXJSRI.js";
10
+ import {
11
+ StartCommand,
12
+ launchFirstRunSetup,
13
+ needsFirstRunSetup
14
+ } from "./chunk-GRISNU6G.js";
6
15
  import {
7
16
  CLIIsolationManager,
8
17
  DatabaseManager,
9
18
  EnvironmentManager,
10
- LoomManager,
11
- ResourceCleanup
12
- } from "./chunk-UD3WJDIV.js";
19
+ LoomManager
20
+ } from "./chunk-ZNMPGMHY.js";
13
21
  import {
14
22
  PRManager
15
- } from "./chunk-ZW2LKWWE.js";
16
- import "./chunk-Y4YZTHZE.js";
17
- import {
18
- launchFirstRunSetup,
19
- needsFirstRunSetup
20
- } from "./chunk-UVD4CZKS.js";
23
+ } from "./chunk-KVHIAWVT.js";
21
24
  import {
22
25
  CommitManager,
23
26
  UserAbortedCommitError,
24
27
  ValidationRunner
25
- } from "./chunk-ZHPNZC75.js";
28
+ } from "./chunk-5RPBYK5Q.js";
26
29
  import {
27
30
  BuildRunner,
28
31
  MergeManager
29
- } from "./chunk-LXLMMXXY.js";
32
+ } from "./chunk-5FJWO4IT.js";
30
33
  import {
31
- assembleChildrenData,
32
- buildDependencyMap,
33
- fetchChildIssueDetails,
34
- fetchChildIssues
34
+ assembleChildrenData
35
35
  } from "./chunk-QZWEJVWV.js";
36
36
  import {
37
37
  IssueManagementProviderFactory
38
- } from "./chunk-JO2LZ6EQ.js";
38
+ } from "./chunk-SWSJWA2S.js";
39
39
  import "./chunk-4232AHNQ.js";
40
40
  import {
41
41
  ProcessManager
42
- } from "./chunk-ZEWU5PZK.js";
43
- import "./chunk-3D7WQM7I.js";
42
+ } from "./chunk-G5V75JD5.js";
43
+ import "./chunk-LLHXQS3C.js";
44
44
  import {
45
45
  installDependencies
46
46
  } from "./chunk-WWKOVDWC.js";
47
47
  import {
48
- IdentifierParser,
49
- matchIssueIdentifier
50
- } from "./chunk-WY4QBK43.js";
48
+ IdentifierParser
49
+ } from "./chunk-63QWFWH3.js";
51
50
  import {
52
51
  createNeonProviderFromSettings
53
52
  } from "./chunk-P4O6EH46.js";
54
53
  import {
55
54
  ShellCompletion
56
- } from "./chunk-VECNX6VX.js";
55
+ } from "./chunk-KIK2ZFAL.js";
57
56
  import {
58
57
  TelemetryManager,
59
58
  TelemetryService
60
59
  } from "./chunk-RSYT7MVI.js";
61
60
  import {
62
61
  GitWorktreeManager
63
- } from "./chunk-VGGST52X.js";
62
+ } from "./chunk-I5T677EA.js";
64
63
  import "./chunk-Q7POFB5Q.js";
65
64
  import {
66
- IssueEnhancementService,
65
+ IssueEnhancementService
66
+ } from "./chunk-KKV5WH5M.js";
67
+ import {
67
68
  capitalizeFirstLetter
68
- } from "./chunk-FB47TIJG.js";
69
- import "./chunk-UWGVCXRF.js";
69
+ } from "./chunk-4E7LCFUG.js";
70
+ import "./chunk-SKSYYBCU.js";
70
71
  import {
71
72
  openBrowser
72
73
  } from "./chunk-YETJNRQM.js";
@@ -76,7 +77,7 @@ import {
76
77
  import "./chunk-YQ57ORTV.js";
77
78
  import {
78
79
  AgentManager
79
- } from "./chunk-SF2P22EE.js";
80
+ } from "./chunk-C6HNNJIV.js";
80
81
  import {
81
82
  getConfiguredRepoFromSettings,
82
83
  hasMultipleRemotes
@@ -88,16 +89,12 @@ import {
88
89
  } from "./chunk-O7VL5N6S.js";
89
90
  import {
90
91
  ClaudeContextManager
91
- } from "./chunk-RYWFS37M.js";
92
- import "./chunk-SN3SQCFK.js";
93
- import "./chunk-ONQYPICO.js";
94
- import "./chunk-4WJNIR5O.js";
95
- import {
96
- extractSettingsOverrides
97
- } from "./chunk-GYCR2LOU.js";
98
- import {
99
- DefaultBranchNamingService
100
- } from "./chunk-J5S7DFYC.js";
92
+ } from "./chunk-E6KOWMKA.js";
93
+ import "./chunk-S7PZA6IV.js";
94
+ import "./chunk-UR5DGNUO.js";
95
+ import "./chunk-UUEW5KWB.js";
96
+ import "./chunk-GYCR2LOU.js";
97
+ import "./chunk-QVLPWNE3.js";
101
98
  import {
102
99
  GitCommandError,
103
100
  executeGitCommand,
@@ -110,10 +107,10 @@ import {
110
107
  pushBranchToRemote,
111
108
  removePlaceholderCommitFromHead,
112
109
  removePlaceholderCommitFromHistory
113
- } from "./chunk-MNHZB4Z2.js";
110
+ } from "./chunk-4FGEGQW4.js";
114
111
  import {
115
112
  SettingsManager
116
- } from "./chunk-YYAKPQBT.js";
113
+ } from "./chunk-7VHJNVLF.js";
117
114
  import {
118
115
  MetadataManager
119
116
  } from "./chunk-KB64WNBZ.js";
@@ -130,7 +127,6 @@ import {
130
127
  withLogger
131
128
  } from "./chunk-6MLEBAYZ.js";
132
129
  import {
133
- isInteractiveEnvironment,
134
130
  promptConfirmation,
135
131
  waitForKeypress
136
132
  } from "./chunk-7JDMYTFZ.js";
@@ -144,498 +140,6 @@ import {
144
140
  // src/cli.ts
145
141
  import { program, Option } from "commander";
146
142
 
147
- // src/commands/start.ts
148
- import path from "path";
149
- var StartCommand = class {
150
- constructor(issueTracker, loomManager, _agentManager, settingsManager) {
151
- this.loomManager = null;
152
- this.githubService = null;
153
- this.issueTracker = issueTracker;
154
- this.settingsManager = settingsManager ?? new SettingsManager();
155
- this.providedLoomManager = loomManager;
156
- const envResult = loadEnvIntoProcess();
157
- if (envResult.error) {
158
- getLogger().debug(`Environment loading warning: ${envResult.error.message}`);
159
- }
160
- if (envResult.parsed) {
161
- getLogger().debug(`Loaded ${Object.keys(envResult.parsed).length} environment variables`);
162
- }
163
- }
164
- /**
165
- * Get or create a GitHubService instance for PR operations
166
- * Used when the configured issue tracker doesn't support PRs (e.g., Linear)
167
- */
168
- getGitHubService() {
169
- this.githubService ??= new GitHubService();
170
- return this.githubService;
171
- }
172
- /**
173
- * Initialize LoomManager with the main worktree path
174
- * Uses lazy initialization to ensure we have the correct path
175
- */
176
- async initializeLoomManager() {
177
- var _a2, _b;
178
- if (this.loomManager) {
179
- return this.loomManager;
180
- }
181
- if (this.providedLoomManager) {
182
- this.loomManager = this.providedLoomManager;
183
- return this.loomManager;
184
- }
185
- const mainWorktreePath = await findMainWorktreePathWithSettings();
186
- const settings = await this.settingsManager.loadSettings();
187
- const environmentManager = new EnvironmentManager();
188
- const neonProvider = createNeonProviderFromSettings(settings);
189
- const databaseUrlEnvVarName = ((_b = (_a2 = settings.capabilities) == null ? void 0 : _a2.database) == null ? void 0 : _b.databaseUrlEnvVarName) ?? "DATABASE_URL";
190
- const databaseManager = new DatabaseManager(neonProvider, environmentManager, databaseUrlEnvVarName);
191
- const branchNaming = new DefaultBranchNamingService({ useClaude: true });
192
- this.loomManager = new LoomManager(
193
- new GitWorktreeManager(mainWorktreePath),
194
- this.issueTracker,
195
- branchNaming,
196
- // Add branch naming service
197
- environmentManager,
198
- // Reuse same instance
199
- new ClaudeContextManager(),
200
- new ProjectCapabilityDetector(),
201
- new CLIIsolationManager(),
202
- this.settingsManager,
203
- // Use same instance with CLI overrides
204
- databaseManager
205
- // Add database manager
206
- );
207
- return this.loomManager;
208
- }
209
- /**
210
- * Main entry point for the start command
211
- */
212
- async execute(input) {
213
- var _a2, _b, _c, _d, _e;
214
- const isJsonMode = input.options.json === true;
215
- try {
216
- const initialSettings = await this.settingsManager.loadSettings();
217
- if (!isJsonMode && (process.env.FORCE_FIRST_TIME_SETUP === "true" || await needsFirstRunSetup())) {
218
- await launchFirstRunSetup();
219
- const newSettings = await this.settingsManager.loadSettings();
220
- const newProvider = ((_a2 = newSettings.issueManagement) == null ? void 0 : _a2.provider) ?? "github";
221
- if (newProvider !== this.issueTracker.providerName) {
222
- getLogger().debug(`Reinitializing issue tracker: provider changed to "${newProvider}"`);
223
- this.issueTracker = IssueTrackerFactory.create(newSettings);
224
- }
225
- }
226
- let repo;
227
- if (this.issueTracker.providerName === "github" && await hasMultipleRemotes()) {
228
- repo = await getConfiguredRepoFromSettings(initialSettings);
229
- getLogger().info(`Using GitHub repository: ${repo}`);
230
- }
231
- const loomManager = await this.initializeLoomManager();
232
- let parentLoom = await this.detectParentLoom(loomManager);
233
- const parsed = await this.parseInput(input.identifier, repo);
234
- await this.validateInput(parsed, repo);
235
- if (parentLoom) {
236
- const parentDisplay = parentLoom.type === "issue" ? `issue #${parentLoom.identifier}` : parentLoom.type === "pr" ? `PR #${parentLoom.identifier}` : `branch ${parentLoom.identifier}`;
237
- if (input.options.childLoom === true) {
238
- getLogger().info(`Creating as child loom of ${parentDisplay} (--child-loom flag)`);
239
- } else if (input.options.childLoom === false) {
240
- parentLoom = null;
241
- getLogger().info("Creating as independent loom (--no-child-loom flag)");
242
- } else {
243
- if (isJsonMode) {
244
- throw new Error("JSON mode requires explicit --child-loom or --no-child-loom flag when running from inside a loom");
245
- }
246
- let createAsChild = true;
247
- if (isInteractiveEnvironment()) {
248
- createAsChild = await promptConfirmation(
249
- `You are not in your main worktree. Create as a child loom of ${parentDisplay}?`,
250
- true
251
- // Default yes
252
- );
253
- } else {
254
- throw new Error("Non-interactive environment detected, use either --child-loom or --no-child-loom to specify behavior");
255
- }
256
- if (!createAsChild) {
257
- parentLoom = null;
258
- getLogger().info("Creating as independent loom");
259
- }
260
- }
261
- } else if (input.options.childLoom === true) {
262
- getLogger().debug("--child-loom flag provided but not running from inside an existing loom (ignored)");
263
- }
264
- if (parsed.type === "description") {
265
- getLogger().info("Creating issue from description...");
266
- const title = capitalizeFirstLetter(parsed.originalInput);
267
- const body = input.options.body ? capitalizeFirstLetter(input.options.body) : "";
268
- const result = await this.issueTracker.createIssue(
269
- title,
270
- // Use capitalized description as title
271
- body
272
- // Use capitalized body or empty
273
- );
274
- getLogger().success(`Created issue #${result.number}: ${result.url}`);
275
- parsed.type = "issue";
276
- parsed.number = result.number;
277
- }
278
- let childIssueNumbers = [];
279
- let childIssues = [];
280
- let dependencyMap = {};
281
- if (parsed.type === "issue" && parsed.number) {
282
- const settings2 = await this.settingsManager.loadSettings();
283
- const epicIssueTracker = IssueTrackerFactory.create(settings2);
284
- let children = [];
285
- try {
286
- children = await fetchChildIssues(String(parsed.number), epicIssueTracker, repo);
287
- } catch (error) {
288
- getLogger().warn(`Failed to check for child issues: ${error instanceof Error ? error.message : "Unknown error"}. Proceeding as normal loom.`);
289
- }
290
- if (children.length > 0) {
291
- childIssueNumbers = children.map((c) => c.id);
292
- let createAsEpic = false;
293
- if (input.options.epic === true) {
294
- createAsEpic = true;
295
- getLogger().info(`Creating as epic loom with ${children.length} child issue(s) (--epic flag)`);
296
- } else if (input.options.epic === false) {
297
- createAsEpic = false;
298
- getLogger().info("Creating as normal loom (--no-epic flag)");
299
- } else {
300
- if (isJsonMode) {
301
- throw new Error("JSON mode requires explicit --epic or --no-epic flag when issue has child issues");
302
- }
303
- if (isInteractiveEnvironment()) {
304
- createAsEpic = await promptConfirmation(
305
- `This issue has ${children.length} child issue(s). Create as epic loom?`,
306
- true
307
- // Default yes
308
- );
309
- } else {
310
- throw new Error("Non-interactive environment detected, use either --epic or --no-epic to specify behavior");
311
- }
312
- }
313
- if (createAsEpic) {
314
- parsed.type = "epic";
315
- try {
316
- const [details, depMap] = await Promise.all([
317
- fetchChildIssueDetails(String(parsed.number), epicIssueTracker, repo),
318
- buildDependencyMap(childIssueNumbers, settings2, repo)
319
- ]);
320
- childIssues = details ?? [];
321
- dependencyMap = depMap ?? {};
322
- getLogger().info(`Fetched ${childIssues.length} child issue details and dependency map`);
323
- } catch (error) {
324
- parsed.type = "issue";
325
- childIssueNumbers = [];
326
- getLogger().warn(`Failed to fetch epic child data, reverting to normal loom: ${error instanceof Error ? error.message : String(error)}`);
327
- }
328
- } else {
329
- childIssueNumbers = [];
330
- }
331
- }
332
- }
333
- if (input.options.oneShot === "bypassPermissions" && input.options.claude !== false && !isJsonMode) {
334
- const confirmed = await promptConfirmation(
335
- "WARNING: bypassPermissions mode will allow Claude to execute all tool calls without confirmation. This can be dangerous. Do you want to proceed?"
336
- );
337
- if (!confirmed) {
338
- getLogger().info("Operation cancelled by user");
339
- process.exit(0);
340
- }
341
- }
342
- const cliOverrides = extractSettingsOverrides();
343
- const settings = await this.settingsManager.loadSettings(void 0, cliOverrides);
344
- const workflowType = parsed.type === "branch" ? "regular" : parsed.type === "epic" ? "issue" : parsed.type;
345
- const workflowConfig = (_b = settings.workflows) == null ? void 0 : _b[workflowType];
346
- const { extractRawSetArguments, getExecutablePath } = await import("./cli-overrides-XFZWY7CM.js");
347
- const setArguments = extractRawSetArguments();
348
- const executablePath = getExecutablePath();
349
- getLogger().info(`Validated input: ${this.formatParsedInput(parsed)}`);
350
- const identifier = parsed.type === "branch" ? parsed.branchName ?? "" : parsed.number ?? 0;
351
- const enableClaude = input.options.claude ?? (workflowConfig == null ? void 0 : workflowConfig.startAiAgent) ?? true;
352
- const enableCode = input.options.code ?? (workflowConfig == null ? void 0 : workflowConfig.startIde) ?? true;
353
- const enableDevServer = input.options.devServer ?? (workflowConfig == null ? void 0 : workflowConfig.startDevServer) ?? true;
354
- const enableTerminal = input.options.terminal ?? (workflowConfig == null ? void 0 : workflowConfig.startTerminal) ?? false;
355
- getLogger().debug("Final workflow config values:", {
356
- enableClaude,
357
- enableCode,
358
- enableDevServer,
359
- enableTerminal
360
- });
361
- const loom = await loomManager.createIloom({
362
- type: parsed.type,
363
- identifier,
364
- originalInput: parsed.originalInput,
365
- ...parentLoom && { parentLoom },
366
- options: {
367
- enableClaude,
368
- enableCode,
369
- enableDevServer,
370
- enableTerminal,
371
- ...input.options.oneShot && { oneShot: input.options.oneShot },
372
- ...setArguments.length > 0 && { setArguments },
373
- ...executablePath && { executablePath },
374
- ...childIssueNumbers.length > 0 && { childIssueNumbers },
375
- ...childIssues.length > 0 && { childIssues },
376
- ...Object.keys(dependencyMap).length > 0 && { dependencyMap }
377
- }
378
- });
379
- getLogger().success(`Created loom: ${loom.id} at ${loom.path}`);
380
- try {
381
- const oneShotMap = {
382
- noReview: "skip-reviews",
383
- bypassPermissions: "yolo"
384
- };
385
- TelemetryService.getInstance().track("loom.created", {
386
- source_type: parsed.type === "epic" ? "issue" : parsed.type,
387
- tracker: this.issueTracker.providerName,
388
- is_child_loom: !!parentLoom,
389
- one_shot_mode: oneShotMap[input.options.oneShot ?? ""] ?? "default"
390
- });
391
- } catch (error) {
392
- getLogger().debug(`Failed to track loom.created telemetry: ${error instanceof Error ? error.message : String(error)}`);
393
- }
394
- getLogger().info(` Branch: ${loom.branch}`);
395
- if ((_c = loom.capabilities) == null ? void 0 : _c.includes("web")) {
396
- getLogger().info(` Port: ${loom.port}`);
397
- }
398
- if ((_d = loom.issueData) == null ? void 0 : _d.title) {
399
- getLogger().info(` Title: ${loom.issueData.title}`);
400
- }
401
- if (parsed.type === "epic") {
402
- getLogger().info(` Epic: yes (${childIssueNumbers.length} child issue(s))`);
403
- }
404
- if (isJsonMode) {
405
- return {
406
- id: loom.id,
407
- path: loom.path,
408
- branch: loom.branch,
409
- type: parsed.type,
410
- identifier: loom.identifier,
411
- ...loom.port !== void 0 && { port: loom.port },
412
- ...((_e = loom.issueData) == null ? void 0 : _e.title) && { title: loom.issueData.title },
413
- ...loom.capabilities && { capabilities: loom.capabilities },
414
- ...childIssueNumbers.length > 0 && { childIssueNumbers }
415
- };
416
- }
417
- } catch (error) {
418
- if (error instanceof Error) {
419
- getLogger().error(`${error.message}`);
420
- } else {
421
- getLogger().error("An unknown error occurred");
422
- }
423
- throw error;
424
- }
425
- }
426
- /**
427
- * Parse input to determine type and extract relevant data
428
- */
429
- async parseInput(identifier, repo) {
430
- const hasLeadingSpace = identifier.startsWith(" ");
431
- const trimmedIdentifier = identifier.trim();
432
- if (!trimmedIdentifier) {
433
- throw new Error("Missing required argument: identifier");
434
- }
435
- const spaceCount = (trimmedIdentifier.match(/ /g) ?? []).length;
436
- if (trimmedIdentifier.length > 15 && spaceCount >= 1) {
437
- return {
438
- type: "description",
439
- originalInput: hasLeadingSpace ? " " + trimmedIdentifier : trimmedIdentifier
440
- };
441
- }
442
- const prPattern = /^pr[/-](\d+)$/i;
443
- const prMatch = trimmedIdentifier.match(prPattern);
444
- if (prMatch == null ? void 0 : prMatch[1]) {
445
- return {
446
- type: "pr",
447
- number: parseInt(prMatch[1], 10),
448
- originalInput: trimmedIdentifier
449
- };
450
- }
451
- const identifierMatch = matchIssueIdentifier(trimmedIdentifier);
452
- if (identifierMatch.type === "project-key" && identifierMatch.identifier) {
453
- const detection = await this.issueTracker.detectInputType(
454
- trimmedIdentifier,
455
- repo
456
- );
457
- if (detection.type === "issue" && detection.identifier) {
458
- return {
459
- type: "issue",
460
- number: detection.identifier,
461
- // Keep as string for project key identifiers
462
- originalInput: trimmedIdentifier
463
- };
464
- }
465
- throw new Error(
466
- `Could not find issue matching identifier ${identifierMatch.identifier}`
467
- );
468
- }
469
- if (identifierMatch.type === "numeric" && identifierMatch.identifier) {
470
- const number = parseInt(identifierMatch.identifier, 10);
471
- if (this.issueTracker.supportsPullRequests) {
472
- const detection = await this.issueTracker.detectInputType(
473
- trimmedIdentifier,
474
- repo
475
- );
476
- if (detection.type === "pr") {
477
- return {
478
- type: "pr",
479
- number: detection.identifier ? parseInt(detection.identifier, 10) : number,
480
- originalInput: trimmedIdentifier
481
- };
482
- } else if (detection.type === "issue") {
483
- return {
484
- type: "issue",
485
- number: detection.identifier ? parseInt(detection.identifier, 10) : number,
486
- originalInput: trimmedIdentifier
487
- };
488
- } else {
489
- throw new Error(`Could not find issue or PR #${number}`);
490
- }
491
- } else {
492
- const githubService = this.getGitHubService();
493
- const detection = await githubService.detectInputType(trimmedIdentifier, repo);
494
- if (detection.type === "pr") {
495
- return {
496
- type: "pr",
497
- number: detection.identifier ? parseInt(detection.identifier, 10) : number,
498
- originalInput: trimmedIdentifier
499
- };
500
- } else {
501
- return {
502
- type: "issue",
503
- number,
504
- originalInput: trimmedIdentifier
505
- };
506
- }
507
- }
508
- }
509
- return {
510
- type: "branch",
511
- branchName: trimmedIdentifier,
512
- originalInput: trimmedIdentifier
513
- };
514
- }
515
- /**
516
- * Validate the parsed input based on its type
517
- */
518
- async validateInput(parsed, repo) {
519
- switch (parsed.type) {
520
- case "pr": {
521
- if (!parsed.number) {
522
- throw new Error("Invalid PR number");
523
- }
524
- if (this.issueTracker.supportsPullRequests && this.issueTracker.fetchPR && this.issueTracker.validatePRState) {
525
- const pr = await this.issueTracker.fetchPR(parsed.number, repo);
526
- await this.issueTracker.validatePRState(pr);
527
- } else {
528
- const githubService = this.getGitHubService();
529
- const pr = await githubService.fetchPR(parsed.number, repo);
530
- await githubService.validatePRState(pr);
531
- }
532
- getLogger().debug(`Validated PR #${parsed.number}`);
533
- break;
534
- }
535
- case "issue": {
536
- if (!parsed.number) {
537
- throw new Error("Invalid issue number");
538
- }
539
- const issue = await this.issueTracker.fetchIssue(parsed.number, repo);
540
- await this.issueTracker.validateIssueState(issue);
541
- getLogger().debug(`Validated issue #${parsed.number}`);
542
- break;
543
- }
544
- case "branch": {
545
- if (!parsed.branchName) {
546
- throw new Error("Invalid branch name");
547
- }
548
- if (!this.isValidBranchName(parsed.branchName)) {
549
- throw new Error(
550
- "Invalid branch name. Use only letters, numbers, hyphens, underscores, and slashes"
551
- );
552
- }
553
- getLogger().debug(`Validated branch name: ${parsed.branchName}`);
554
- break;
555
- }
556
- case "description": {
557
- getLogger().debug("Detected description input", {
558
- length: parsed.originalInput.length
559
- });
560
- break;
561
- }
562
- default: {
563
- const unknownType = parsed;
564
- throw new Error(`Unknown input type: ${unknownType.type}`);
565
- }
566
- }
567
- }
568
- /**
569
- * Validate branch name format
570
- */
571
- isValidBranchName(branch) {
572
- return /^[a-zA-Z0-9/_-]+$/.test(branch);
573
- }
574
- /**
575
- * Format parsed input for display
576
- */
577
- formatParsedInput(parsed) {
578
- switch (parsed.type) {
579
- case "pr":
580
- return `PR #${parsed.number}`;
581
- case "issue":
582
- return `Issue #${parsed.number}`;
583
- case "epic":
584
- return `Epic #${parsed.number}`;
585
- case "branch":
586
- return `Branch '${parsed.branchName}'`;
587
- case "description":
588
- return `Description: ${parsed.originalInput.slice(0, 50)}...`;
589
- default:
590
- return "Unknown input";
591
- }
592
- }
593
- /**
594
- * Detect if running from inside an existing loom worktree
595
- * Returns parent loom info if detected, null otherwise
596
- */
597
- async detectParentLoom(loomManager) {
598
- try {
599
- const cwd = process.cwd();
600
- const looms = await loomManager.listLooms();
601
- if (!looms) {
602
- return null;
603
- }
604
- const mainWorktreePath = await findMainWorktreePathWithSettings();
605
- const parentLoom = looms.find((loom) => {
606
- if (loom.path === mainWorktreePath) {
607
- return false;
608
- }
609
- return cwd === loom.path || cwd.startsWith(loom.path + path.sep);
610
- });
611
- if (!parentLoom) {
612
- return null;
613
- }
614
- getLogger().debug(`Detected parent loom: ${parentLoom.type} ${parentLoom.identifier} at ${parentLoom.path}`);
615
- const result = {
616
- type: parentLoom.type,
617
- identifier: parentLoom.identifier,
618
- branchName: parentLoom.branch,
619
- worktreePath: parentLoom.path
620
- };
621
- if (parentLoom.databaseBranch) {
622
- result.databaseBranch = parentLoom.databaseBranch;
623
- }
624
- if (!result.databaseBranch) {
625
- const databaseBranch = await loomManager.getDatabaseBranchForLoom(parentLoom.path);
626
- if (databaseBranch) {
627
- result.databaseBranch = databaseBranch;
628
- getLogger().debug(`Detected parent database branch: ${databaseBranch}`);
629
- }
630
- }
631
- return result;
632
- } catch (error) {
633
- getLogger().debug(`Failed to detect parent loom: ${error instanceof Error ? error.message : "Unknown error"}`);
634
- return null;
635
- }
636
- }
637
- };
638
-
639
143
  // src/commands/add-issue.ts
640
144
  var AddIssueCommand = class {
641
145
  constructor(enhancementService, settingsManager) {
@@ -805,7 +309,7 @@ var EnhanceCommand = class {
805
309
  };
806
310
 
807
311
  // src/commands/finish.ts
808
- import path2 from "path";
312
+ import path from "path";
809
313
  var FinishCommand = class {
810
314
  constructor(issueTracker, gitWorktreeManager, validationRunner, commitManager, mergeManager, identifierParser, resourceCleanup, buildRunner, settingsManager, loomManager) {
811
315
  const envResult = loadEnvIntoProcess();
@@ -844,11 +348,11 @@ var FinishCommand = class {
844
348
  const neonProvider = createNeonProviderFromSettings(settings);
845
349
  const databaseManager = new DatabaseManager(neonProvider, environmentManager, databaseUrlEnvVarName);
846
350
  const cliIsolationManager = new CLIIsolationManager();
847
- const { DefaultBranchNamingService: DefaultBranchNamingService2 } = await import("./BranchNamingService-ECJHBB67.js");
351
+ const { DefaultBranchNamingService } = await import("./BranchNamingService-25KSZAEM.js");
848
352
  this.loomManager ??= new LoomManager(
849
353
  this.gitWorktreeManager,
850
354
  this.issueTracker,
851
- new DefaultBranchNamingService2({ useClaude: true }),
355
+ new DefaultBranchNamingService({ useClaude: true }),
852
356
  environmentManager,
853
357
  new ClaudeContextManager(),
854
358
  new ProjectCapabilityDetector(),
@@ -904,7 +408,7 @@ var FinishCommand = class {
904
408
  async execute(input) {
905
409
  var _a2, _b, _c, _d, _e;
906
410
  process.env.ILOOM = "1";
907
- const isJsonMode = input.options.json === true;
411
+ const isJsonMode = input.options.json === true || input.options.jsonStream === true;
908
412
  const result = {
909
413
  success: false,
910
414
  type: "issue",
@@ -1038,7 +542,7 @@ var FinishCommand = class {
1038
542
  */
1039
543
  async autoDetectFromCurrentDirectory() {
1040
544
  var _a2, _b;
1041
- const currentDir = path2.basename(process.cwd());
545
+ const currentDir = path.basename(process.cwd());
1042
546
  const prPattern = /_pr_(\d+)$/;
1043
547
  const prMatch = currentDir.match(prPattern);
1044
548
  if (prMatch == null ? void 0 : prMatch[1]) {
@@ -1224,7 +728,8 @@ var FinishCommand = class {
1224
728
  var _a2, _b, _c, _d, _e, _f;
1225
729
  const mergeOptions = {
1226
730
  dryRun: options.dryRun ?? false,
1227
- force: options.force ?? false
731
+ force: options.force ?? false,
732
+ jsonStream: options.jsonStream ?? false
1228
733
  };
1229
734
  if (options.skipToPr) {
1230
735
  getLogger().info("Skipping rebase/validation/commit (--skip-to-pr flag)");
@@ -1252,7 +757,8 @@ var FinishCommand = class {
1252
757
  if (!options.dryRun) {
1253
758
  getLogger().info("Running pre-merge validations...");
1254
759
  await this.validationRunner.runValidations(worktree.path, {
1255
- dryRun: options.dryRun ?? false
760
+ dryRun: options.dryRun ?? false,
761
+ jsonStream: options.jsonStream ?? false
1256
762
  });
1257
763
  getLogger().success("All validations passed");
1258
764
  result.operations.push({
@@ -1942,8 +1448,8 @@ var FinishCommand = class {
1942
1448
  * Check if current working directory is within the target worktree
1943
1449
  */
1944
1450
  isRunningFromWithinWorktree(worktreePath) {
1945
- const normalizedCwd = path2.normalize(process.cwd());
1946
- const normalizedWorktree = path2.normalize(worktreePath);
1451
+ const normalizedCwd = path.normalize(process.cwd());
1452
+ const normalizedWorktree = path.normalize(worktreePath);
1947
1453
  return normalizedCwd.startsWith(normalizedWorktree);
1948
1454
  }
1949
1455
  /**
@@ -2006,12 +1512,12 @@ function determineLoomType(worktree) {
2006
1512
  }
2007
1513
  return "branch";
2008
1514
  }
2009
- function extractPRNumbers(path5) {
2010
- if (!path5) {
1515
+ function extractPRNumbers(path4) {
1516
+ if (!path4) {
2011
1517
  return [];
2012
1518
  }
2013
1519
  const prPathPattern = /_pr_(\d+)$/;
2014
- const match = path5.match(prPathPattern);
1520
+ const match = path4.match(prPathPattern);
2015
1521
  if (match == null ? void 0 : match[1]) {
2016
1522
  return [match[1]];
2017
1523
  }
@@ -2143,12 +1649,12 @@ import fs3 from "fs-extra";
2143
1649
 
2144
1650
  // src/lib/VersionMigrationManager.ts
2145
1651
  import fs2 from "fs-extra";
2146
- import path4 from "path";
1652
+ import path3 from "path";
2147
1653
  import os2 from "os";
2148
1654
 
2149
1655
  // src/migrations/index.ts
2150
1656
  import fs from "fs-extra";
2151
- import path3 from "path";
1657
+ import path2 from "path";
2152
1658
  import os from "os";
2153
1659
  var migrations = [
2154
1660
  // v0.6.0 is the baseline - no migrations needed
@@ -2156,9 +1662,9 @@ var migrations = [
2156
1662
  version: "0.6.1",
2157
1663
  description: "Add global gitignore for .iloom/settings.local.json",
2158
1664
  migrate: async () => {
2159
- const globalIgnorePath = path3.join(os.homedir(), ".config", "git", "ignore");
1665
+ const globalIgnorePath = path2.join(os.homedir(), ".config", "git", "ignore");
2160
1666
  const pattern = "**/.iloom/settings.local.json";
2161
- await fs.ensureDir(path3.dirname(globalIgnorePath));
1667
+ await fs.ensureDir(path2.dirname(globalIgnorePath));
2162
1668
  let content = "";
2163
1669
  try {
2164
1670
  content = await fs.readFile(globalIgnorePath, "utf-8");
@@ -2176,9 +1682,9 @@ var migrations = [
2176
1682
  version: "0.7.1",
2177
1683
  description: "Add global gitignore for .iloom/package.iloom.local.json",
2178
1684
  migrate: async () => {
2179
- const globalIgnorePath = path3.join(os.homedir(), ".config", "git", "ignore");
1685
+ const globalIgnorePath = path2.join(os.homedir(), ".config", "git", "ignore");
2180
1686
  const pattern = "**/.iloom/package.iloom.local.json";
2181
- await fs.ensureDir(path3.dirname(globalIgnorePath));
1687
+ await fs.ensureDir(path2.dirname(globalIgnorePath));
2182
1688
  let content = "";
2183
1689
  try {
2184
1690
  content = await fs.readFile(globalIgnorePath, "utf-8");
@@ -2196,11 +1702,11 @@ var migrations = [
2196
1702
  version: "0.9.3",
2197
1703
  description: "Add global gitignore for swarm mode agent and skill files",
2198
1704
  migrate: async () => {
2199
- const globalIgnorePath = path3.join(os.homedir(), ".config", "git", "ignore");
1705
+ const globalIgnorePath = path2.join(os.homedir(), ".config", "git", "ignore");
2200
1706
  const agentPattern = "**/.claude/agents/iloom-*";
2201
1707
  const skillPattern = "**/.claude/skills/iloom-*";
2202
1708
  const mcpConfigPathPattern = "**/.claude/iloom-swarm-mcp-config-path";
2203
- await fs.ensureDir(path3.dirname(globalIgnorePath));
1709
+ await fs.ensureDir(path2.dirname(globalIgnorePath));
2204
1710
  let content = "";
2205
1711
  try {
2206
1712
  content = await fs.readFile(globalIgnorePath, "utf-8");
@@ -2224,7 +1730,7 @@ var VersionMigrationManager = class {
2224
1730
  }
2225
1731
  // Return path to migration state file
2226
1732
  getMigrationStatePath() {
2227
- return path4.join(os2.homedir(), ".config", "iloom-ai", "migration-state.json");
1733
+ return path3.join(os2.homedir(), ".config", "iloom-ai", "migration-state.json");
2228
1734
  }
2229
1735
  // Get effective version, respecting ILOOM_VERSION_OVERRIDE env var
2230
1736
  // packageVersion is the version from package.json passed by caller
@@ -2264,7 +1770,7 @@ var VersionMigrationManager = class {
2264
1770
  async saveMigrationState(version, newFailures = []) {
2265
1771
  const statePath = this.getMigrationStatePath();
2266
1772
  try {
2267
- await fs2.ensureDir(path4.dirname(statePath));
1773
+ await fs2.ensureDir(path3.dirname(statePath));
2268
1774
  const existingState = await this.loadFullMigrationState();
2269
1775
  const existingFailures = existingState.failedMigrations ?? [];
2270
1776
  const allFailures = [...existingFailures];
@@ -2553,14 +2059,14 @@ async function autoLaunchInitForMultipleRemotes() {
2553
2059
  await waitForKeypress2("Press any key to start configuration...");
2554
2060
  logger.info("");
2555
2061
  try {
2556
- const { InitCommand } = await import("./init-GFQ5W7GK.js");
2062
+ const { InitCommand } = await import("./init-32YOKXRL.js");
2557
2063
  const initCommand = new InitCommand();
2558
2064
  const customInitialMessage = "Help me configure which git remote iloom should use for GitHub operations. I have multiple remotes and need to select the correct one.";
2559
2065
  await initCommand.execute(customInitialMessage);
2560
2066
  logger.info("");
2561
2067
  logger.info("Configuration complete! Continuing with your original command...");
2562
2068
  logger.info("");
2563
- const { SettingsManager: SettingsManager2 } = await import("./SettingsManager-BQDQA3FK.js");
2069
+ const { SettingsManager: SettingsManager2 } = await import("./SettingsManager-FNKCOZMQ.js");
2564
2070
  const settingsManager = new SettingsManager2();
2565
2071
  const settings = await settingsManager.loadSettings();
2566
2072
  const { hasMultipleRemotes: hasMultipleRemotes2 } = await import("./remote-IJAMOEAP.js");
@@ -2657,7 +2163,7 @@ program.command("add-issue").alias("a").description("Create and enhance GitHub i
2657
2163
  });
2658
2164
  program.command("feedback").alias("f").description("Submit feedback/bug report to iloom-cli repository").argument("<description>", "Feedback title (>30 chars, >2 spaces; or any non-empty text when --body provided)").option("--body <text>", "Body text for feedback (added after diagnostics)").action(async (description, options) => {
2659
2165
  try {
2660
- const { FeedbackCommand } = await import("./feedback-TMBXSCM5.js");
2166
+ const { FeedbackCommand } = await import("./feedback-G2GJFN2F.js");
2661
2167
  const command = new FeedbackCommand();
2662
2168
  const feedbackOptions = {};
2663
2169
  if (options.body !== void 0) {
@@ -2708,10 +2214,15 @@ program.command("enhance").description("Apply enhancement agent to existing GitH
2708
2214
  await executeAction();
2709
2215
  }
2710
2216
  });
2711
- program.command("finish").alias("dn").description("Merge work and cleanup workspace").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").option("-f, --force", "Skip confirmation prompts").option("-n, --dry-run", "Preview actions without executing").option("--pr <number>", "Treat input as PR number", parseFloat).option("--skip-build", "Skip post-merge build verification").option("--no-browser", "Skip opening PR in browser (github-pr and github-draft-pr modes)").option("--cleanup", "Clean up worktree after finishing (default in local mode)").option("--no-cleanup", "Keep worktree after finishing").option("--review", "Review commit message before committing (default: auto-commit without review)").option("--json", "Output result as JSON").action(async (identifier, options) => {
2217
+ program.command("finish").alias("dn").description("Merge work and cleanup workspace").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").option("-f, --force", "Skip confirmation prompts").option("-n, --dry-run", "Preview actions without executing").option("--pr <number>", "Treat input as PR number", parseFloat).option("--skip-build", "Skip post-merge build verification").option("--no-browser", "Skip opening PR in browser (github-pr and github-draft-pr modes)").option("--cleanup", "Clean up worktree after finishing (default in local mode)").option("--no-cleanup", "Keep worktree after finishing").option("--review", "Review commit message before committing (default: auto-commit without review)").option("--json", "Output result as JSON").option("--json-stream", "Stream JSONL output; runs Claude headless for conflict resolution").action(async (identifier, options) => {
2712
2218
  if (options.browser === false) {
2713
2219
  options.noBrowser = true;
2714
2220
  }
2221
+ if (options.json && options.jsonStream) {
2222
+ logger.error("--json and --json-stream are mutually exclusive");
2223
+ process.exit(1);
2224
+ }
2225
+ const isAnyJsonMode = options.json ?? options.jsonStream;
2715
2226
  const executeAction = async () => {
2716
2227
  try {
2717
2228
  const settingsManager = new SettingsManager();
@@ -2719,13 +2230,14 @@ program.command("finish").alias("dn").description("Merge work and cleanup worksp
2719
2230
  const issueTracker = IssueTrackerFactory.create(settings);
2720
2231
  const command = new FinishCommand(issueTracker);
2721
2232
  const result = await command.execute({ identifier, options });
2722
- if (options.json && result) {
2723
- console.log(JSON.stringify(result, null, 2));
2233
+ if (isAnyJsonMode && result) {
2234
+ console.log(options.jsonStream ? JSON.stringify(result) : JSON.stringify(result, null, 2));
2724
2235
  }
2725
2236
  process.exit(0);
2726
2237
  } catch (error) {
2727
- if (options.json) {
2728
- console.log(JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error" }, null, 2));
2238
+ if (isAnyJsonMode) {
2239
+ const errorJson = { success: false, error: error instanceof Error ? error.message : "Unknown error" };
2240
+ console.log(options.jsonStream ? JSON.stringify(errorJson) : JSON.stringify(errorJson, null, 2));
2729
2241
  } else {
2730
2242
  logger.error(`Failed to finish workspace: ${error instanceof Error ? error.message : "Unknown error"}`);
2731
2243
  }
@@ -2735,57 +2247,85 @@ program.command("finish").alias("dn").description("Merge work and cleanup worksp
2735
2247
  process.exit(1);
2736
2248
  }
2737
2249
  };
2738
- if (options.json) {
2250
+ if (isAnyJsonMode) {
2739
2251
  const jsonLogger = createStderrLogger();
2740
2252
  await withLogger(jsonLogger, executeAction);
2741
2253
  } else {
2742
2254
  await executeAction();
2743
2255
  }
2744
2256
  });
2745
- program.command("commit").alias("c").description("Commit all uncommitted files with issue reference").option("-m, --message <text>", "Custom commit message (skip Claude generation)").option("--fixes", 'Use "Fixes #N" trailer instead of "Refs #N" (closes issue)').option("--no-review", "Skip commit message review prompt").option("--json", "Output result as JSON (implies --no-review)").option("--wip-commit", "Quick WIP commit: skip validations and pre-commit hooks").action(async (options) => {
2257
+ program.command("commit").alias("c").description("Commit all uncommitted files with issue reference").option("-m, --message <text>", "Custom commit message (skip Claude generation)").option("--fixes", 'Use "Fixes #N" trailer instead of "Refs #N" (closes issue)').option("--no-review", "Skip commit message review prompt").option("--json", "Output result as JSON (implies --no-review)").option("--json-stream", "Stream JSONL output; runs Claude headless for validation fixes").option("--wip-commit", "Quick WIP commit: skip validations and pre-commit hooks").action(async (options) => {
2258
+ if (options.json && options.jsonStream) {
2259
+ logger.error("--json and --json-stream are mutually exclusive");
2260
+ process.exit(1);
2261
+ }
2262
+ const isAnyJsonMode = options.json ?? options.jsonStream;
2746
2263
  const executeAction = async () => {
2747
2264
  try {
2748
- const { CommitCommand } = await import("./commit-L3EPY5QG.js");
2265
+ const { CommitCommand } = await import("./commit-FZR5XDQG.js");
2749
2266
  const command = new CommitCommand();
2750
- const noReview = options.review === false || options.json === true;
2267
+ const noReview = options.review === false || options.json === true || options.jsonStream === true;
2751
2268
  const result = await command.execute({
2752
2269
  message: options.message,
2753
2270
  fixes: options.fixes ?? false,
2754
2271
  noReview,
2755
2272
  json: options.json ?? false,
2273
+ jsonStream: options.jsonStream ?? false,
2756
2274
  wipCommit: options.wipCommit ?? false
2757
2275
  });
2758
- if (options.json && result) {
2759
- console.log(JSON.stringify(result, null, 2));
2276
+ if (isAnyJsonMode && result) {
2277
+ console.log(options.jsonStream ? JSON.stringify(result) : JSON.stringify(result, null, 2));
2760
2278
  }
2761
2279
  process.exit(0);
2762
2280
  } catch (error) {
2763
2281
  if (error instanceof UserAbortedCommitError) {
2764
2282
  process.exit(130);
2765
2283
  }
2766
- if (options.json) {
2767
- console.log(JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error" }, null, 2));
2284
+ if (isAnyJsonMode) {
2285
+ const errorJson = { success: false, error: error instanceof Error ? error.message : "Unknown error" };
2286
+ console.log(options.jsonStream ? JSON.stringify(errorJson) : JSON.stringify(errorJson, null, 2));
2768
2287
  } else {
2769
2288
  logger.error(`Commit failed: ${error instanceof Error ? error.message : "Unknown error"}`);
2770
2289
  }
2771
2290
  process.exit(1);
2772
2291
  }
2773
2292
  };
2774
- if (options.json) {
2293
+ if (isAnyJsonMode) {
2775
2294
  const jsonLogger = createStderrLogger();
2776
2295
  await withLogger(jsonLogger, executeAction);
2777
2296
  } else {
2778
2297
  await executeAction();
2779
2298
  }
2780
2299
  });
2781
- program.command("rebase").description("Rebase current branch on main with Claude-assisted conflict resolution").option("-f, --force", "Skip confirmation prompts").option("-n, --dry-run", "Preview actions without executing").action(async (options) => {
2782
- try {
2783
- const { RebaseCommand } = await import("./rebase-DWIB77KV.js");
2784
- const command = new RebaseCommand();
2785
- await command.execute(options);
2786
- } catch (error) {
2787
- logger.error(`Failed to rebase: ${error instanceof Error ? error.message : "Unknown error"}`);
2788
- process.exit(1);
2300
+ program.command("rebase").description("Rebase current branch on main with Claude-assisted conflict resolution").option("-f, --force", "Skip confirmation prompts").option("-n, --dry-run", "Preview actions without executing").option("--json-stream", "Stream JSONL output; runs Claude headless for conflict resolution").action(async (options) => {
2301
+ const executeAction = async () => {
2302
+ try {
2303
+ const { RebaseCommand } = await import("./rebase-6NVLX5V7.js");
2304
+ const command = new RebaseCommand();
2305
+ const result = await command.execute(options);
2306
+ if (options.jsonStream && result) {
2307
+ console.log(JSON.stringify(result));
2308
+ }
2309
+ process.exit(0);
2310
+ } catch (error) {
2311
+ if (options.jsonStream) {
2312
+ console.log(JSON.stringify({
2313
+ success: false,
2314
+ conflictsDetected: false,
2315
+ claudeLaunched: false,
2316
+ error: error instanceof Error ? error.message : "Unknown error"
2317
+ }));
2318
+ } else {
2319
+ logger.error(`Failed to rebase: ${error instanceof Error ? error.message : "Unknown error"}`);
2320
+ }
2321
+ process.exit(1);
2322
+ }
2323
+ };
2324
+ if (options.jsonStream) {
2325
+ const jsonLogger = createStderrLogger();
2326
+ await withLogger(jsonLogger, executeAction);
2327
+ } else {
2328
+ await executeAction();
2789
2329
  }
2790
2330
  });
2791
2331
  program.command("spin").alias("ignite").description("Launch Claude with auto-detected workspace context").addOption(
@@ -2797,7 +2337,7 @@ program.command("spin").alias("ignite").description("Launch Claude with auto-det
2797
2337
  options.oneShot = "bypassPermissions";
2798
2338
  }
2799
2339
  try {
2800
- const { IgniteCommand } = await import("./ignite-CGOV3TD4.js");
2340
+ const { IgniteCommand } = await import("./ignite-H2O5Y5A2.js");
2801
2341
  const command = new IgniteCommand();
2802
2342
  if (options.json && options.jsonStream) {
2803
2343
  logger.error("--json and --json-stream are mutually exclusive");
@@ -2825,7 +2365,7 @@ program.command("spin").alias("ignite").description("Launch Claude with auto-det
2825
2365
  program.command("open").description("Open workspace in browser or run CLI tool").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").allowUnknownOption().action(async (identifier, _options, command) => {
2826
2366
  try {
2827
2367
  const args = (command == null ? void 0 : command.args) ? command.args.slice(identifier ? 1 : 0) : [];
2828
- const { OpenCommand } = await import("./open-5QZGXQRF.js");
2368
+ const { OpenCommand } = await import("./open-FXWW3VI4.js");
2829
2369
  const cmd = new OpenCommand();
2830
2370
  const input = identifier ? { identifier, args } : { args };
2831
2371
  await cmd.execute(input);
@@ -2837,7 +2377,7 @@ program.command("open").description("Open workspace in browser or run CLI tool")
2837
2377
  program.command("run").description("Run CLI tool or open workspace in browser").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").allowUnknownOption().action(async (identifier, _options, command) => {
2838
2378
  try {
2839
2379
  const args = (command == null ? void 0 : command.args) ? command.args.slice(identifier ? 1 : 0) : [];
2840
- const { RunCommand } = await import("./run-O3TFNQFC.js");
2380
+ const { RunCommand } = await import("./run-BBXLRIZB.js");
2841
2381
  const cmd = new RunCommand();
2842
2382
  const input = identifier ? { identifier, args } : { args };
2843
2383
  await cmd.execute(input);
@@ -2848,7 +2388,7 @@ program.command("run").description("Run CLI tool or open workspace in browser").
2848
2388
  });
2849
2389
  program.command("vscode").description("Install iloom VS Code extension and open workspace in VS Code").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").option("--no-wait", "Skip keypress prompt and open immediately").action(async (identifier, options) => {
2850
2390
  try {
2851
- const { VSCodeCommand } = await import("./vscode-VA5X4P25.js");
2391
+ const { VSCodeCommand } = await import("./vscode-6XUGHJKL.js");
2852
2392
  const cmd = new VSCodeCommand();
2853
2393
  await cmd.execute({ identifier, wait: options == null ? void 0 : options.wait });
2854
2394
  } catch (error) {
@@ -2857,7 +2397,7 @@ program.command("vscode").description("Install iloom VS Code extension and open
2857
2397
  });
2858
2398
  program.command("dev-server").alias("dev").description("Start dev server for workspace (foreground)").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").option("--json", "Output as JSON").action(async (identifier, options) => {
2859
2399
  try {
2860
- const { DevServerCommand } = await import("./dev-server-FYZ2AQIH.js");
2400
+ const { DevServerCommand } = await import("./dev-server-7SMIB7OF.js");
2861
2401
  const cmd = new DevServerCommand();
2862
2402
  await cmd.execute({ identifier, json: options == null ? void 0 : options.json });
2863
2403
  } catch (error) {
@@ -2867,7 +2407,7 @@ program.command("dev-server").alias("dev").description("Start dev server for wor
2867
2407
  });
2868
2408
  program.command("shell").alias("terminal").description("Open interactive shell with workspace environment").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").action(async (identifier) => {
2869
2409
  try {
2870
- const { ShellCommand } = await import("./shell-G6VC2CYR.js");
2410
+ const { ShellCommand } = await import("./shell-RF7LTND5.js");
2871
2411
  const cmd = new ShellCommand();
2872
2412
  await cmd.execute({ identifier });
2873
2413
  } catch (error) {
@@ -2877,7 +2417,7 @@ program.command("shell").alias("terminal").description("Open interactive shell w
2877
2417
  });
2878
2418
  program.command("build").description("Run the build script").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").action(async (identifier) => {
2879
2419
  try {
2880
- const { BuildCommand } = await import("./build-5GO3XW26.js");
2420
+ const { BuildCommand } = await import("./build-VHGEMXBA.js");
2881
2421
  const cmd = new BuildCommand();
2882
2422
  await cmd.execute(identifier ? { identifier } : {});
2883
2423
  } catch (error) {
@@ -2887,7 +2427,7 @@ program.command("build").description("Run the build script").argument("[identifi
2887
2427
  });
2888
2428
  program.command("lint").description("Run the lint script").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").action(async (identifier) => {
2889
2429
  try {
2890
- const { LintCommand } = await import("./lint-6TQXDZ3T.js");
2430
+ const { LintCommand } = await import("./lint-AAN2NZWG.js");
2891
2431
  const cmd = new LintCommand();
2892
2432
  await cmd.execute(identifier ? { identifier } : {});
2893
2433
  } catch (error) {
@@ -2897,7 +2437,7 @@ program.command("lint").description("Run the lint script").argument("[identifier
2897
2437
  });
2898
2438
  program.command("test").description("Run the test script").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").action(async (identifier) => {
2899
2439
  try {
2900
- const { TestCommand } = await import("./test-F7JNJZYP.js");
2440
+ const { TestCommand } = await import("./test-SGO6I5Z7.js");
2901
2441
  const cmd = new TestCommand();
2902
2442
  await cmd.execute(identifier ? { identifier } : {});
2903
2443
  } catch (error) {
@@ -2907,7 +2447,7 @@ program.command("test").description("Run the test script").argument("[identifier
2907
2447
  });
2908
2448
  program.command("compile").alias("typecheck").description("Run the compile or typecheck script (prefers compile if both exist)").argument("[identifier]", "Issue number, PR number, or branch name (auto-detected if omitted)").action(async (identifier) => {
2909
2449
  try {
2910
- const { CompileCommand } = await import("./compile-ZS4HYRX5.js");
2450
+ const { CompileCommand } = await import("./compile-7ALJHZ4N.js");
2911
2451
  const cmd = new CompileCommand();
2912
2452
  await cmd.execute(identifier ? { identifier } : {});
2913
2453
  } catch (error) {
@@ -2918,7 +2458,7 @@ program.command("compile").alias("typecheck").description("Run the compile or ty
2918
2458
  program.command("cleanup").alias("remove").alias("clean").description("Remove workspaces").argument("[identifier]", "Branch name or issue number to cleanup (auto-detected)").option("-l, --list", "List all worktrees").option("-a, --all", "Remove all worktrees (interactive confirmation)").option("-i, --issue <number>", "Cleanup by issue number", parseInt).option("-f, --force", "Skip confirmations and force removal").option("--dry-run", "Show what would be done without doing it").option("--json", "Output result as JSON").option("--archive", "Archive metadata instead of deleting (preserves loom in il list --finished)").option("--defer <ms>", "Wait specified milliseconds before cleanup", parseInt).action(async (identifier, options) => {
2919
2459
  const executeAction = async () => {
2920
2460
  try {
2921
- const { CleanupCommand } = await import("./cleanup-6UCPVMFG.js");
2461
+ const { CleanupCommand } = await import("./cleanup-6PVAC4NI.js");
2922
2462
  const command = new CleanupCommand();
2923
2463
  const input = {
2924
2464
  options: options ?? {}
@@ -3278,7 +2818,7 @@ program.command("projects").description("List configured iloom projects").option
3278
2818
  });
3279
2819
  program.command("issues").description("List project issues from configured issue tracker").argument("[project-path]", "Path to project root (auto-detected if omitted)").option("--json", "Output as JSON (default behavior)").option("--limit <n>", "Max issues to return", "100").option("--sprint <name>", 'Jira only: filter by sprint name (e.g., "Sprint 17") or "current" for active sprint').option("--mine", "Show only issues and PRs assigned to me").action(async (projectPath, options) => {
3280
2820
  try {
3281
- const { IssuesCommand } = await import("./issues-T4ZZSPEG.js");
2821
+ const { IssuesCommand } = await import("./issues-4UUAQ5K6.js");
3282
2822
  const command = new IssuesCommand();
3283
2823
  const parsedLimit = parseInt((options == null ? void 0 : options.limit) ?? "100", 10);
3284
2824
  const limit = Number.isNaN(parsedLimit) || parsedLimit <= 0 ? 100 : parsedLimit;
@@ -3296,7 +2836,7 @@ program.command("issues").description("List project issues from configured issue
3296
2836
  });
3297
2837
  program.command("init").alias("config").description("Initialize iloom configuration").argument("[prompt]", 'Custom initial message to send to Claude (defaults to "Help me configure iloom settings.")').addOption(new Option("--accept-defaults").hideHelp()).action(async (prompt, options) => {
3298
2838
  try {
3299
- const { InitCommand } = await import("./init-GFQ5W7GK.js");
2839
+ const { InitCommand } = await import("./init-32YOKXRL.js");
3300
2840
  const command = new InitCommand();
3301
2841
  const trimmedPrompt = prompt == null ? void 0 : prompt.trim();
3302
2842
  const customPrompt = trimmedPrompt && trimmedPrompt.length > 0 ? trimmedPrompt : void 0;
@@ -3308,9 +2848,9 @@ program.command("init").alias("config").description("Initialize iloom configurat
3308
2848
  });
3309
2849
  program.command("plan").description("Launch interactive planning session with Architect persona").argument("[prompt]", "Initial planning prompt or topic").option("--model <model>", "Model to use (default: opus)").option("--yolo", "Enable autonomous mode - Claude proceeds without user interaction").option("--planner <provider>", "AI provider for planning: claude, gemini, codex (default: claude)").option("--reviewer <provider>", "AI provider for review: claude, gemini, codex, none (default: none)").option("-p, --print", "Enable print/headless mode for CI/CD (uses bypassPermissions)").addOption(
3310
2850
  new Option("--output-format <format>", "Output format for Claude CLI (requires --print)").choices(["json", "stream-json", "text"])
3311
- ).option("--verbose", "Enable verbose output (requires --print)").option("--json", "Output final result as JSON object (requires --print)").option("--json-stream", "Stream JSONL output to stdout in real-time (requires --print)").action(async (prompt, options) => {
2851
+ ).option("--verbose", "Enable verbose output (requires --print)").option("--json", "Output final result as JSON object (requires --print)").option("--json-stream", "Stream JSONL output to stdout in real-time (requires --print)").option("--auto-swarm", "Enable auto-swarm: plan, start epic, and spin automatically").action(async (prompt, options) => {
3312
2852
  try {
3313
- const { PlanCommand } = await import("./plan-U7ZQWLFY.js");
2853
+ const { PlanCommand } = await import("./plan-RQ5FPIGF.js");
3314
2854
  const command = new PlanCommand();
3315
2855
  if ((options == null ? void 0 : options.json) && (options == null ? void 0 : options.jsonStream)) {
3316
2856
  logger.error("--json and --json-stream are mutually exclusive");
@@ -3329,7 +2869,7 @@ program.command("plan").description("Launch interactive planning session with Ar
3329
2869
  ...(options == null ? void 0 : options.json) && { json: true },
3330
2870
  ...(options == null ? void 0 : options.jsonStream) && { jsonStream: true }
3331
2871
  } : void 0;
3332
- await command.execute(prompt, options == null ? void 0 : options.model, options == null ? void 0 : options.yolo, options == null ? void 0 : options.planner, options == null ? void 0 : options.reviewer, printOptions);
2872
+ await command.execute(prompt, options == null ? void 0 : options.model, options == null ? void 0 : options.yolo, options == null ? void 0 : options.planner, options == null ? void 0 : options.reviewer, printOptions, options == null ? void 0 : options.autoSwarm);
3333
2873
  } catch (error) {
3334
2874
  logger.error(`Planning session failed: ${error instanceof Error ? error.message : "Unknown error"}`);
3335
2875
  process.exit(1);
@@ -3337,7 +2877,7 @@ program.command("plan").description("Launch interactive planning session with Ar
3337
2877
  });
3338
2878
  program.command("contribute").description("Set up local development environment for contributing to a GitHub project").argument("[repository]", "GitHub repository (owner/repo, github.com/owner/repo, or full URL). Defaults to iloom-ai/iloom-cli").action(async (repository) => {
3339
2879
  try {
3340
- const { ContributeCommand } = await import("./contribute-ORDDQGSL.js");
2880
+ const { ContributeCommand } = await import("./contribute-5GKLK3BQ.js");
3341
2881
  const command = new ContributeCommand();
3342
2882
  await command.execute(repository);
3343
2883
  } catch (error) {
@@ -3358,10 +2898,10 @@ program.command("update").description("Update iloom-cli to the latest version").
3358
2898
  program.command("test-github").description("Test GitHub integration (Issue #3)").argument("<identifier>", "Issue number or PR number").option("--no-claude", "Skip Claude for branch name generation").action(async (identifier, options) => {
3359
2899
  try {
3360
2900
  const { GitHubService: GitHubService2 } = await import("./GitHubService-MEHKHUQP.js");
3361
- const { DefaultBranchNamingService: DefaultBranchNamingService2 } = await import("./BranchNamingService-ECJHBB67.js");
2901
+ const { DefaultBranchNamingService } = await import("./BranchNamingService-25KSZAEM.js");
3362
2902
  logger.info("Testing GitHub Integration\n");
3363
2903
  const service = new GitHubService2();
3364
- const branchNaming = new DefaultBranchNamingService2({ useClaude: options.claude !== false });
2904
+ const branchNaming = new DefaultBranchNamingService({ useClaude: options.claude !== false });
3365
2905
  logger.info("Detecting input type...");
3366
2906
  const detection = await service.detectInputType(identifier);
3367
2907
  logger.info(` Type: ${detection.type}`);
@@ -3416,10 +2956,10 @@ program.command("test-github").description("Test GitHub integration (Issue #3)")
3416
2956
  });
3417
2957
  program.command("test-claude").description("Test Claude integration (Issue #10)").option("--detect", "Test Claude CLI detection").option("--version", "Get Claude CLI version").option("--branch <title>", "Test branch name generation with given title").option("--issue <number>", "Issue number for branch generation", "123").option("--launch <prompt>", "Launch Claude with a prompt (headless)").option("--interactive", "Launch Claude interactively (requires --launch)").option("--template <name>", "Test template loading").action(async (options) => {
3418
2958
  try {
3419
- const { detectClaudeCli, getClaudeVersion, generateBranchName, launchClaude } = await import("./claude-P3NQR6IJ.js");
3420
- const { PromptTemplateManager } = await import("./PromptTemplateManager-DULSVRRE.js");
3421
- const { ClaudeService } = await import("./ClaudeService-NJNK2SUH.js");
3422
- const { ClaudeContextManager: ClaudeContextManager2 } = await import("./ClaudeContextManager-QXX6ZFST.js");
2959
+ const { detectClaudeCli, getClaudeVersion, generateBranchName, launchClaude } = await import("./claude-7GGEWVEM.js");
2960
+ const { PromptTemplateManager } = await import("./PromptTemplateManager-YOE2SIPG.js");
2961
+ const { ClaudeService } = await import("./ClaudeService-7KM5NA5Z.js");
2962
+ const { ClaudeContextManager: ClaudeContextManager2 } = await import("./ClaudeContextManager-66GR4BGM.js");
3423
2963
  logger.info("Testing Claude Integration\n");
3424
2964
  if (options.detect) {
3425
2965
  logger.info("Detecting Claude CLI...");
@@ -3554,7 +3094,7 @@ program.command("test-claude").description("Test Claude integration (Issue #10)"
3554
3094
  });
3555
3095
  program.command("test-webserver").description("Test if a web server is running on a workspace port").argument("<issue-number>", "Issue number (port will be calculated as 3000 + issue number)", parseInt).option("--kill", "Kill the web server if detected").action(async (issueNumber, options) => {
3556
3096
  try {
3557
- const { TestWebserverCommand } = await import("./test-webserver-EONCG7E7.js");
3097
+ const { TestWebserverCommand } = await import("./test-webserver-NZ3JTVLL.js");
3558
3098
  const command = new TestWebserverCommand();
3559
3099
  await command.execute({ issueNumber, options });
3560
3100
  } catch (error) {
@@ -3567,7 +3107,7 @@ program.command("test-webserver").description("Test if a web server is running o
3567
3107
  });
3568
3108
  program.command("test-git").description("Test Git integration - findMainWorktreePath() function (reads .iloom/settings.json)").action(async () => {
3569
3109
  try {
3570
- const { TestGitCommand } = await import("./test-git-BTAOIUE2.js");
3110
+ const { TestGitCommand } = await import("./test-git-XM4TM65W.js");
3571
3111
  const command = new TestGitCommand();
3572
3112
  await command.execute();
3573
3113
  } catch (error) {
@@ -3593,7 +3133,7 @@ program.command("test-tabs").description("Test iTerm2 dual tab functionality - o
3593
3133
  });
3594
3134
  program.command("test-prefix").description("Test worktree prefix configuration - preview worktree paths (reads .iloom/settings.json)").action(async () => {
3595
3135
  try {
3596
- const { TestPrefixCommand } = await import("./test-prefix-Q6TFSU6F.js");
3136
+ const { TestPrefixCommand } = await import("./test-prefix-GBO37XCN.js");
3597
3137
  const command = new TestPrefixCommand();
3598
3138
  await command.execute();
3599
3139
  } catch (error) {
@@ -3607,7 +3147,7 @@ program.command("test-prefix").description("Test worktree prefix configuration -
3607
3147
  program.command("summary").description("Generate Claude session summary for a loom").argument("[identifier]", "Issue number, PR number (pr/123), or branch name (auto-detected if omitted)").option("--with-comment", "Post summary as a comment to the issue/PR").option("--json", "Output result as JSON").action(async (identifier, options) => {
3608
3148
  const executeAction = async () => {
3609
3149
  try {
3610
- const { SummaryCommand } = await import("./summary-FWHAX55O.js");
3150
+ const { SummaryCommand } = await import("./summary-WTQZ7XG2.js");
3611
3151
  const command = new SummaryCommand();
3612
3152
  const result = await command.execute({ identifier, options });
3613
3153
  if (options.json && result) {
@@ -3636,7 +3176,7 @@ program.command("summary").description("Generate Claude session summary for a lo
3636
3176
  program.command("recap").description("Get recap for a loom (defaults to current directory)").argument("[identifier]", "Issue number, PR number (pr/123), or branch name (auto-detected if omitted)").option("--json", "Output as JSON with filePath for file watching").action(async (identifier, options) => {
3637
3177
  const executeAction = async () => {
3638
3178
  try {
3639
- const { RecapCommand } = await import("./recap-MX63HAKV.js");
3179
+ const { RecapCommand } = await import("./recap-OMBOKJST.js");
3640
3180
  const command = new RecapCommand();
3641
3181
  const result = await command.execute({ identifier, json: options.json });
3642
3182
  if (options.json && result) {
@@ -3665,7 +3205,7 @@ program.command("recap").description("Get recap for a loom (defaults to current
3665
3205
  var testJiraCommand = program.command("test-jira").description("Test Jira integration methods against a real Jira instance");
3666
3206
  testJiraCommand.command("child-issue").description("Create a test child issue under a parent").argument("<parentKey>", "Parent issue key (e.g., PROJ-123)").action(async (parentKey) => {
3667
3207
  try {
3668
- const { TestJiraCommand } = await import("./test-jira-CHYNV33F.js");
3208
+ const { TestJiraCommand } = await import("./test-jira-LDTOYFSD.js");
3669
3209
  await new TestJiraCommand().createChildIssue(parentKey);
3670
3210
  } catch (error) {
3671
3211
  logger.error(`Failed: ${error instanceof Error ? error.message : "Unknown error"}`);
@@ -3674,7 +3214,7 @@ testJiraCommand.command("child-issue").description("Create a test child issue un
3674
3214
  });
3675
3215
  testJiraCommand.command("create-dep").description('Create a "Blocks" dependency between two issues').argument("<blockingKey>", "Issue key that blocks (e.g., PROJ-100)").argument("<blockedKey>", "Issue key being blocked (e.g., PROJ-200)").action(async (blockingKey, blockedKey) => {
3676
3216
  try {
3677
- const { TestJiraCommand } = await import("./test-jira-CHYNV33F.js");
3217
+ const { TestJiraCommand } = await import("./test-jira-LDTOYFSD.js");
3678
3218
  await new TestJiraCommand().createDependency(blockingKey, blockedKey);
3679
3219
  } catch (error) {
3680
3220
  logger.error(`Failed: ${error instanceof Error ? error.message : "Unknown error"}`);
@@ -3683,7 +3223,7 @@ testJiraCommand.command("create-dep").description('Create a "Blocks" dependency
3683
3223
  });
3684
3224
  testJiraCommand.command("get-deps").description("Fetch and print dependencies for an issue").argument("<issueKey>", "Issue key (e.g., PROJ-123)").action(async (issueKey) => {
3685
3225
  try {
3686
- const { TestJiraCommand } = await import("./test-jira-CHYNV33F.js");
3226
+ const { TestJiraCommand } = await import("./test-jira-LDTOYFSD.js");
3687
3227
  await new TestJiraCommand().getDependencies(issueKey);
3688
3228
  } catch (error) {
3689
3229
  logger.error(`Failed: ${error instanceof Error ? error.message : "Unknown error"}`);
@@ -3692,7 +3232,7 @@ testJiraCommand.command("get-deps").description("Fetch and print dependencies fo
3692
3232
  });
3693
3233
  testJiraCommand.command("remove-dep").description('Remove a "Blocks" dependency between two issues').argument("<blockingKey>", "Issue key that blocks (e.g., PROJ-100)").argument("<blockedKey>", "Issue key being blocked (e.g., PROJ-200)").action(async (blockingKey, blockedKey) => {
3694
3234
  try {
3695
- const { TestJiraCommand } = await import("./test-jira-CHYNV33F.js");
3235
+ const { TestJiraCommand } = await import("./test-jira-LDTOYFSD.js");
3696
3236
  await new TestJiraCommand().removeDependency(blockingKey, blockedKey);
3697
3237
  } catch (error) {
3698
3238
  logger.error(`Failed: ${error instanceof Error ? error.message : "Unknown error"}`);
@@ -3701,7 +3241,7 @@ testJiraCommand.command("remove-dep").description('Remove a "Blocks" dependency
3701
3241
  });
3702
3242
  testJiraCommand.command("get-children").description("List child issues of a parent").argument("<issueKey>", "Parent issue key (e.g., PROJ-123)").action(async (issueKey) => {
3703
3243
  try {
3704
- const { TestJiraCommand } = await import("./test-jira-CHYNV33F.js");
3244
+ const { TestJiraCommand } = await import("./test-jira-LDTOYFSD.js");
3705
3245
  await new TestJiraCommand().getChildIssues(issueKey);
3706
3246
  } catch (error) {
3707
3247
  logger.error(`Failed: ${error instanceof Error ? error.message : "Unknown error"}`);
@@ -3711,7 +3251,7 @@ testJiraCommand.command("get-children").description("List child issues of a pare
3711
3251
  program.command("test-neon").description("Test Neon integration and debug configuration").action(async () => {
3712
3252
  var _a2;
3713
3253
  try {
3714
- const { SettingsManager: SettingsManager2 } = await import("./SettingsManager-BQDQA3FK.js");
3254
+ const { SettingsManager: SettingsManager2 } = await import("./SettingsManager-FNKCOZMQ.js");
3715
3255
  const { createNeonProviderFromSettings: createNeonProviderFromSettings2 } = await import("./neon-helpers-CQN2PB4S.js");
3716
3256
  logger.info("Testing Neon Integration\n");
3717
3257
  logger.info("1. Settings Configuration:");