@iloom/cli 0.3.4 → 0.4.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 (181) hide show
  1. package/README.md +13 -3
  2. package/dist/{BranchNamingService-A77VI6AI.js → BranchNamingService-GCCWB3LK.js} +4 -3
  3. package/dist/ClaudeContextManager-DK77227F.js +16 -0
  4. package/dist/ClaudeService-W3SA7HVG.js +15 -0
  5. package/dist/GitHubService-RPM27GWD.js +12 -0
  6. package/dist/{LoomLauncher-ZV3ZZIBA.js → LoomLauncher-S3YGJRJQ.js} +43 -27
  7. package/dist/LoomLauncher-S3YGJRJQ.js.map +1 -0
  8. package/dist/PromptTemplateManager-2TDZAUC6.js +9 -0
  9. package/dist/README.md +13 -3
  10. package/dist/{SettingsManager-I2LRCW2A.js → SettingsManager-FJFU6JJD.js} +7 -3
  11. package/dist/SettingsMigrationManager-EH3J2TCN.js +10 -0
  12. package/dist/{chunk-5Q3NDNNV.js → chunk-2W2FBL5G.js} +153 -6
  13. package/dist/chunk-2W2FBL5G.js.map +1 -0
  14. package/dist/{chunk-OXAM2WVC.js → chunk-55TB3FSG.js} +21 -1
  15. package/dist/chunk-55TB3FSG.js.map +1 -0
  16. package/dist/chunk-6UIGZD2N.js +20 -0
  17. package/dist/chunk-6UIGZD2N.js.map +1 -0
  18. package/dist/{chunk-RIEO2WML.js → chunk-74VMN2KC.js} +26 -2
  19. package/dist/chunk-74VMN2KC.js.map +1 -0
  20. package/dist/{chunk-2MAIX45J.js → chunk-BIIQHEXJ.js} +104 -43
  21. package/dist/chunk-BIIQHEXJ.js.map +1 -0
  22. package/dist/{chunk-UAN4A3YU.js → chunk-G6CIIJLT.js} +11 -11
  23. package/dist/{chunk-DLHA5VQ3.js → chunk-HD5SUKI2.js} +36 -179
  24. package/dist/chunk-HD5SUKI2.js.map +1 -0
  25. package/dist/{chunk-2IJEMXOB.js → chunk-IARWMDAX.js} +427 -428
  26. package/dist/chunk-IARWMDAX.js.map +1 -0
  27. package/dist/chunk-IJ7IGJT3.js +192 -0
  28. package/dist/chunk-IJ7IGJT3.js.map +1 -0
  29. package/dist/{chunk-2CXREBLZ.js → chunk-JC5HXN75.js} +8 -6
  30. package/dist/chunk-JC5HXN75.js.map +1 -0
  31. package/dist/{chunk-3RUPPQRG.js → chunk-KO2FOMHL.js} +43 -2
  32. package/dist/{chunk-3RUPPQRG.js.map → chunk-KO2FOMHL.js.map} +1 -1
  33. package/dist/{chunk-4XIDC3NF.js → chunk-MD6HA5IK.js} +2 -2
  34. package/dist/{chunk-OC4H6HJD.js → chunk-O7WHXLCB.js} +2 -2
  35. package/dist/{chunk-M7JJCX53.js → chunk-OEGECBFS.js} +20 -20
  36. package/dist/chunk-OEGECBFS.js.map +1 -0
  37. package/dist/{chunk-MKWYLDFK.js → chunk-OF7BNW4D.js} +43 -3
  38. package/dist/chunk-OF7BNW4D.js.map +1 -0
  39. package/dist/{chunk-PGPI5LR4.js → chunk-POI7KLBH.js} +7 -21
  40. package/dist/chunk-POI7KLBH.js.map +1 -0
  41. package/dist/{chunk-PA6Q6AWM.js → chunk-PSFVTBM7.js} +2 -2
  42. package/dist/chunk-QHA67Q7A.js +281 -0
  43. package/dist/chunk-QHA67Q7A.js.map +1 -0
  44. package/dist/{chunk-SUOXY5WJ.js → chunk-QIUJPPJQ.js} +5 -5
  45. package/dist/chunk-QIUJPPJQ.js.map +1 -0
  46. package/dist/{chunk-ZM3CFL5L.js → chunk-QRBOPFAA.js} +3 -3
  47. package/dist/{chunk-OYF4VIFI.js → chunk-RUC7OULH.js} +147 -22
  48. package/dist/chunk-RUC7OULH.js.map +1 -0
  49. package/dist/{chunk-CE26YH2U.js → chunk-SJ2GZ6RF.js} +48 -50
  50. package/dist/chunk-SJ2GZ6RF.js.map +1 -0
  51. package/dist/{chunk-SSCQCCJ7.js → chunk-THF25ICZ.js} +2 -2
  52. package/dist/chunk-TMZAVPGF.js +667 -0
  53. package/dist/chunk-TMZAVPGF.js.map +1 -0
  54. package/dist/{chunk-5VK4NRSF.js → chunk-UNXRACJ7.js} +35 -36
  55. package/dist/chunk-UNXRACJ7.js.map +1 -0
  56. package/dist/{chunk-AKUJXDNW.js → chunk-UPUAQYAW.js} +3 -3
  57. package/dist/{chunk-GEHQXLEI.js → chunk-UYVWLISQ.js} +18 -35
  58. package/dist/chunk-UYVWLISQ.js.map +1 -0
  59. package/dist/{chunk-OSCLCMDG.js → chunk-UYWAESOT.js} +3 -3
  60. package/dist/{chunk-RW54ZMBM.js → chunk-VAYGNQTE.js} +2 -2
  61. package/dist/{chunk-ZT3YZB4K.js → chunk-VBFDVGAE.js} +12 -12
  62. package/dist/chunk-VBFDVGAE.js.map +1 -0
  63. package/dist/{chunk-IFB4Z76W.js → chunk-VTXCGKV5.js} +13 -12
  64. package/dist/chunk-VTXCGKV5.js.map +1 -0
  65. package/dist/{chunk-CDZERT7Z.js → chunk-VWNS6DH5.js} +48 -4
  66. package/dist/chunk-VWNS6DH5.js.map +1 -0
  67. package/dist/{chunk-CFFQ2Z7A.js → chunk-WUQQNE63.js} +2 -2
  68. package/dist/{chunk-UJL4HI2R.js → chunk-Z5NXYJIG.js} +20 -2
  69. package/dist/chunk-Z5NXYJIG.js.map +1 -0
  70. package/dist/{claude-W52VKI6L.js → claude-ACVXNB6N.js} +8 -5
  71. package/dist/{cleanup-H4VXU3C3.js → cleanup-KDLVTT7M.js} +133 -122
  72. package/dist/cleanup-KDLVTT7M.js.map +1 -0
  73. package/dist/cli.js +953 -430
  74. package/dist/cli.js.map +1 -1
  75. package/dist/{color-F7RU6B6Z.js → color-ZPIIUADB.js} +3 -3
  76. package/dist/{contribute-Y7IQV5QY.js → contribute-HY372S6F.js} +8 -6
  77. package/dist/{contribute-Y7IQV5QY.js.map → contribute-HY372S6F.js.map} +1 -1
  78. package/dist/dev-server-JCJGQ3PV.js +298 -0
  79. package/dist/dev-server-JCJGQ3PV.js.map +1 -0
  80. package/dist/{feedback-XTUCKJNT.js → feedback-7PVBQNLJ.js} +13 -12
  81. package/dist/{feedback-XTUCKJNT.js.map → feedback-7PVBQNLJ.js.map} +1 -1
  82. package/dist/{git-IYA53VIC.js → git-4BVOOOOV.js} +16 -4
  83. package/dist/hooks/iloom-hook.js +258 -0
  84. package/dist/{ignite-T74RYXCA.js → ignite-3B264M7K.js} +245 -39
  85. package/dist/ignite-3B264M7K.js.map +1 -0
  86. package/dist/index.d.ts +461 -124
  87. package/dist/index.js +743 -210
  88. package/dist/index.js.map +1 -1
  89. package/dist/init-LBA6NUK2.js +21 -0
  90. package/dist/{installation-detector-VARGFFRZ.js → installation-detector-6R6YOFVZ.js} +3 -3
  91. package/dist/mcp/issue-management-server.js +2 -1
  92. package/dist/mcp/issue-management-server.js.map +1 -1
  93. package/dist/neon-helpers-L5CXQ5CT.js +11 -0
  94. package/dist/{open-UMXANW5S.js → open-OGCV32Z4.js} +15 -13
  95. package/dist/{open-UMXANW5S.js.map → open-OGCV32Z4.js.map} +1 -1
  96. package/dist/projects-P55273AB.js +73 -0
  97. package/dist/projects-P55273AB.js.map +1 -0
  98. package/dist/{prompt-QALMYTVC.js → prompt-A7GGRHSY.js} +3 -3
  99. package/dist/prompts/init-prompt.txt +49 -0
  100. package/dist/prompts/issue-prompt.txt +110 -8
  101. package/dist/prompts/regular-prompt.txt +90 -0
  102. package/dist/prompts/session-summary-prompt.txt +82 -0
  103. package/dist/{rebase-VJ2VKR6R.js → rebase-4T5FQHNH.js} +11 -9
  104. package/dist/{rebase-VJ2VKR6R.js.map → rebase-4T5FQHNH.js.map} +1 -1
  105. package/dist/{remote-VUNCQZ6J.js → remote-73TZ2ADI.js} +3 -3
  106. package/dist/{run-MJYY4PUT.js → run-HNOP6WE2.js} +15 -13
  107. package/dist/{run-MJYY4PUT.js.map → run-HNOP6WE2.js.map} +1 -1
  108. package/dist/schema/settings.schema.json +49 -0
  109. package/dist/shell-DE3HKJSM.js +240 -0
  110. package/dist/shell-DE3HKJSM.js.map +1 -0
  111. package/dist/summary-GDT7DTRI.js +244 -0
  112. package/dist/summary-GDT7DTRI.js.map +1 -0
  113. package/dist/{test-git-IT5EWQ5C.js → test-git-YMAE57UP.js} +6 -4
  114. package/dist/{test-git-IT5EWQ5C.js.map → test-git-YMAE57UP.js.map} +1 -1
  115. package/dist/{test-prefix-NPWDPUUH.js → test-prefix-YCKL6CMT.js} +6 -4
  116. package/dist/{test-prefix-NPWDPUUH.js.map → test-prefix-YCKL6CMT.js.map} +1 -1
  117. package/dist/{test-tabs-PRMRSHKI.js → test-tabs-3SCJWRKT.js} +4 -4
  118. package/dist/{test-webserver-DAHONWCS.js → test-webserver-VPNLAFZ3.js} +2 -2
  119. package/dist/{update-4TDDUR5K.js → update-LETF5ASC.js} +4 -4
  120. package/dist/{update-notifier-QEX3CJHA.js → update-notifier-H55ZK7NU.js} +3 -3
  121. package/package.json +6 -6
  122. package/dist/ClaudeContextManager-BN7RE5ZQ.js +0 -15
  123. package/dist/ClaudeService-DLYLJUPA.js +0 -14
  124. package/dist/GitHubService-FZHHBOFG.js +0 -11
  125. package/dist/LoomLauncher-ZV3ZZIBA.js.map +0 -1
  126. package/dist/PromptTemplateManager-6HH3PVXV.js +0 -9
  127. package/dist/SettingsMigrationManager-TJ7UWZG5.js +0 -10
  128. package/dist/chunk-2CXREBLZ.js.map +0 -1
  129. package/dist/chunk-2IJEMXOB.js.map +0 -1
  130. package/dist/chunk-2MAIX45J.js.map +0 -1
  131. package/dist/chunk-5Q3NDNNV.js.map +0 -1
  132. package/dist/chunk-5VK4NRSF.js.map +0 -1
  133. package/dist/chunk-CDZERT7Z.js.map +0 -1
  134. package/dist/chunk-CE26YH2U.js.map +0 -1
  135. package/dist/chunk-DLHA5VQ3.js.map +0 -1
  136. package/dist/chunk-GEHQXLEI.js.map +0 -1
  137. package/dist/chunk-IFB4Z76W.js.map +0 -1
  138. package/dist/chunk-M7JJCX53.js.map +0 -1
  139. package/dist/chunk-MKWYLDFK.js.map +0 -1
  140. package/dist/chunk-OXAM2WVC.js.map +0 -1
  141. package/dist/chunk-OYF4VIFI.js.map +0 -1
  142. package/dist/chunk-PGPI5LR4.js.map +0 -1
  143. package/dist/chunk-RIEO2WML.js.map +0 -1
  144. package/dist/chunk-SUOXY5WJ.js.map +0 -1
  145. package/dist/chunk-UJL4HI2R.js.map +0 -1
  146. package/dist/chunk-ZT3YZB4K.js.map +0 -1
  147. package/dist/cleanup-H4VXU3C3.js.map +0 -1
  148. package/dist/ignite-T74RYXCA.js.map +0 -1
  149. package/dist/init-4FHTAM3F.js +0 -19
  150. package/dist/logger-MKYH4UDV.js +0 -12
  151. package/dist/neon-helpers-77PBPGJ5.js +0 -10
  152. package/dist/update-notifier-QEX3CJHA.js.map +0 -1
  153. /package/dist/{BranchNamingService-A77VI6AI.js.map → BranchNamingService-GCCWB3LK.js.map} +0 -0
  154. /package/dist/{ClaudeContextManager-BN7RE5ZQ.js.map → ClaudeContextManager-DK77227F.js.map} +0 -0
  155. /package/dist/{ClaudeService-DLYLJUPA.js.map → ClaudeService-W3SA7HVG.js.map} +0 -0
  156. /package/dist/{GitHubService-FZHHBOFG.js.map → GitHubService-RPM27GWD.js.map} +0 -0
  157. /package/dist/{PromptTemplateManager-6HH3PVXV.js.map → PromptTemplateManager-2TDZAUC6.js.map} +0 -0
  158. /package/dist/{SettingsManager-I2LRCW2A.js.map → SettingsManager-FJFU6JJD.js.map} +0 -0
  159. /package/dist/{SettingsMigrationManager-TJ7UWZG5.js.map → SettingsMigrationManager-EH3J2TCN.js.map} +0 -0
  160. /package/dist/{chunk-UAN4A3YU.js.map → chunk-G6CIIJLT.js.map} +0 -0
  161. /package/dist/{chunk-4XIDC3NF.js.map → chunk-MD6HA5IK.js.map} +0 -0
  162. /package/dist/{chunk-OC4H6HJD.js.map → chunk-O7WHXLCB.js.map} +0 -0
  163. /package/dist/{chunk-PA6Q6AWM.js.map → chunk-PSFVTBM7.js.map} +0 -0
  164. /package/dist/{chunk-ZM3CFL5L.js.map → chunk-QRBOPFAA.js.map} +0 -0
  165. /package/dist/{chunk-SSCQCCJ7.js.map → chunk-THF25ICZ.js.map} +0 -0
  166. /package/dist/{chunk-AKUJXDNW.js.map → chunk-UPUAQYAW.js.map} +0 -0
  167. /package/dist/{chunk-OSCLCMDG.js.map → chunk-UYWAESOT.js.map} +0 -0
  168. /package/dist/{chunk-RW54ZMBM.js.map → chunk-VAYGNQTE.js.map} +0 -0
  169. /package/dist/{chunk-CFFQ2Z7A.js.map → chunk-WUQQNE63.js.map} +0 -0
  170. /package/dist/{claude-W52VKI6L.js.map → claude-ACVXNB6N.js.map} +0 -0
  171. /package/dist/{color-F7RU6B6Z.js.map → color-ZPIIUADB.js.map} +0 -0
  172. /package/dist/{git-IYA53VIC.js.map → git-4BVOOOOV.js.map} +0 -0
  173. /package/dist/{init-4FHTAM3F.js.map → init-LBA6NUK2.js.map} +0 -0
  174. /package/dist/{installation-detector-VARGFFRZ.js.map → installation-detector-6R6YOFVZ.js.map} +0 -0
  175. /package/dist/{logger-MKYH4UDV.js.map → neon-helpers-L5CXQ5CT.js.map} +0 -0
  176. /package/dist/{neon-helpers-77PBPGJ5.js.map → prompt-A7GGRHSY.js.map} +0 -0
  177. /package/dist/{prompt-QALMYTVC.js.map → remote-73TZ2ADI.js.map} +0 -0
  178. /package/dist/{test-tabs-PRMRSHKI.js.map → test-tabs-3SCJWRKT.js.map} +0 -0
  179. /package/dist/{test-webserver-DAHONWCS.js.map → test-webserver-VPNLAFZ3.js.map} +0 -0
  180. /package/dist/{update-4TDDUR5K.js.map → update-LETF5ASC.js.map} +0 -0
  181. /package/dist/{remote-VUNCQZ6J.js.map → update-notifier-H55ZK7NU.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -139,20 +139,23 @@ declare const IloomSettingsSchema: z.ZodObject<{
139
139
  startDevServer: z.ZodDefault<z.ZodBoolean>;
140
140
  startAiAgent: z.ZodDefault<z.ZodBoolean>;
141
141
  startTerminal: z.ZodDefault<z.ZodBoolean>;
142
+ generateSummary: z.ZodDefault<z.ZodBoolean>;
142
143
  }, "strip", z.ZodTypeAny, {
143
144
  startIde: boolean;
144
145
  startDevServer: boolean;
145
146
  startAiAgent: boolean;
146
147
  startTerminal: boolean;
147
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
148
+ generateSummary: boolean;
149
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
148
150
  noVerify?: boolean | undefined;
149
151
  }, {
150
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
152
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
151
153
  noVerify?: boolean | undefined;
152
154
  startIde?: boolean | undefined;
153
155
  startDevServer?: boolean | undefined;
154
156
  startAiAgent?: boolean | undefined;
155
157
  startTerminal?: boolean | undefined;
158
+ generateSummary?: boolean | undefined;
156
159
  }>>;
157
160
  pr: z.ZodOptional<z.ZodObject<{
158
161
  permissionMode: z.ZodOptional<z.ZodEnum<["plan", "acceptEdits", "bypassPermissions", "default"]>>;
@@ -161,20 +164,23 @@ declare const IloomSettingsSchema: z.ZodObject<{
161
164
  startDevServer: z.ZodDefault<z.ZodBoolean>;
162
165
  startAiAgent: z.ZodDefault<z.ZodBoolean>;
163
166
  startTerminal: z.ZodDefault<z.ZodBoolean>;
167
+ generateSummary: z.ZodDefault<z.ZodBoolean>;
164
168
  }, "strip", z.ZodTypeAny, {
165
169
  startIde: boolean;
166
170
  startDevServer: boolean;
167
171
  startAiAgent: boolean;
168
172
  startTerminal: boolean;
169
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
173
+ generateSummary: boolean;
174
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
170
175
  noVerify?: boolean | undefined;
171
176
  }, {
172
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
177
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
173
178
  noVerify?: boolean | undefined;
174
179
  startIde?: boolean | undefined;
175
180
  startDevServer?: boolean | undefined;
176
181
  startAiAgent?: boolean | undefined;
177
182
  startTerminal?: boolean | undefined;
183
+ generateSummary?: boolean | undefined;
178
184
  }>>;
179
185
  regular: z.ZodOptional<z.ZodObject<{
180
186
  permissionMode: z.ZodOptional<z.ZodEnum<["plan", "acceptEdits", "bypassPermissions", "default"]>>;
@@ -183,20 +189,23 @@ declare const IloomSettingsSchema: z.ZodObject<{
183
189
  startDevServer: z.ZodDefault<z.ZodBoolean>;
184
190
  startAiAgent: z.ZodDefault<z.ZodBoolean>;
185
191
  startTerminal: z.ZodDefault<z.ZodBoolean>;
192
+ generateSummary: z.ZodDefault<z.ZodBoolean>;
186
193
  }, "strip", z.ZodTypeAny, {
187
194
  startIde: boolean;
188
195
  startDevServer: boolean;
189
196
  startAiAgent: boolean;
190
197
  startTerminal: boolean;
191
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
198
+ generateSummary: boolean;
199
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
192
200
  noVerify?: boolean | undefined;
193
201
  }, {
194
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
202
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
195
203
  noVerify?: boolean | undefined;
196
204
  startIde?: boolean | undefined;
197
205
  startDevServer?: boolean | undefined;
198
206
  startAiAgent?: boolean | undefined;
199
207
  startTerminal?: boolean | undefined;
208
+ generateSummary?: boolean | undefined;
200
209
  }>>;
201
210
  }, "strip", z.ZodTypeAny, {
202
211
  issue?: {
@@ -204,7 +213,8 @@ declare const IloomSettingsSchema: z.ZodObject<{
204
213
  startDevServer: boolean;
205
214
  startAiAgent: boolean;
206
215
  startTerminal: boolean;
207
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
216
+ generateSummary: boolean;
217
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
208
218
  noVerify?: boolean | undefined;
209
219
  } | undefined;
210
220
  pr?: {
@@ -212,7 +222,8 @@ declare const IloomSettingsSchema: z.ZodObject<{
212
222
  startDevServer: boolean;
213
223
  startAiAgent: boolean;
214
224
  startTerminal: boolean;
215
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
225
+ generateSummary: boolean;
226
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
216
227
  noVerify?: boolean | undefined;
217
228
  } | undefined;
218
229
  regular?: {
@@ -220,33 +231,37 @@ declare const IloomSettingsSchema: z.ZodObject<{
220
231
  startDevServer: boolean;
221
232
  startAiAgent: boolean;
222
233
  startTerminal: boolean;
223
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
234
+ generateSummary: boolean;
235
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
224
236
  noVerify?: boolean | undefined;
225
237
  } | undefined;
226
238
  }, {
227
239
  issue?: {
228
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
240
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
229
241
  noVerify?: boolean | undefined;
230
242
  startIde?: boolean | undefined;
231
243
  startDevServer?: boolean | undefined;
232
244
  startAiAgent?: boolean | undefined;
233
245
  startTerminal?: boolean | undefined;
246
+ generateSummary?: boolean | undefined;
234
247
  } | undefined;
235
248
  pr?: {
236
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
249
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
237
250
  noVerify?: boolean | undefined;
238
251
  startIde?: boolean | undefined;
239
252
  startDevServer?: boolean | undefined;
240
253
  startAiAgent?: boolean | undefined;
241
254
  startTerminal?: boolean | undefined;
255
+ generateSummary?: boolean | undefined;
242
256
  } | undefined;
243
257
  regular?: {
244
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
258
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
245
259
  noVerify?: boolean | undefined;
246
260
  startIde?: boolean | undefined;
247
261
  startDevServer?: boolean | undefined;
248
262
  startAiAgent?: boolean | undefined;
249
263
  startTerminal?: boolean | undefined;
264
+ generateSummary?: boolean | undefined;
250
265
  } | undefined;
251
266
  }>>;
252
267
  agents: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -256,6 +271,20 @@ declare const IloomSettingsSchema: z.ZodObject<{
256
271
  }, {
257
272
  model?: "sonnet" | "opus" | "haiku" | undefined;
258
273
  }>>>>;
274
+ spin: z.ZodOptional<z.ZodObject<{
275
+ model: z.ZodDefault<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ model: "sonnet" | "opus" | "haiku";
278
+ }, {
279
+ model?: "sonnet" | "opus" | "haiku" | undefined;
280
+ }>>;
281
+ summary: z.ZodOptional<z.ZodObject<{
282
+ model: z.ZodDefault<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ model: "sonnet" | "opus" | "haiku";
285
+ }, {
286
+ model?: "sonnet" | "opus" | "haiku" | undefined;
287
+ }>>;
259
288
  capabilities: z.ZodOptional<z.ZodObject<{
260
289
  web: z.ZodOptional<z.ZodObject<{
261
290
  basePort: z.ZodOptional<z.ZodNumber>;
@@ -389,7 +418,8 @@ declare const IloomSettingsSchema: z.ZodObject<{
389
418
  startDevServer: boolean;
390
419
  startAiAgent: boolean;
391
420
  startTerminal: boolean;
392
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
421
+ generateSummary: boolean;
422
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
393
423
  noVerify?: boolean | undefined;
394
424
  } | undefined;
395
425
  pr?: {
@@ -397,7 +427,8 @@ declare const IloomSettingsSchema: z.ZodObject<{
397
427
  startDevServer: boolean;
398
428
  startAiAgent: boolean;
399
429
  startTerminal: boolean;
400
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
430
+ generateSummary: boolean;
431
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
401
432
  noVerify?: boolean | undefined;
402
433
  } | undefined;
403
434
  regular?: {
@@ -405,13 +436,20 @@ declare const IloomSettingsSchema: z.ZodObject<{
405
436
  startDevServer: boolean;
406
437
  startAiAgent: boolean;
407
438
  startTerminal: boolean;
408
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
439
+ generateSummary: boolean;
440
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
409
441
  noVerify?: boolean | undefined;
410
442
  } | undefined;
411
443
  } | undefined;
412
444
  agents?: Record<string, {
413
445
  model?: "sonnet" | "opus" | "haiku" | undefined;
414
446
  }> | null | undefined;
447
+ spin?: {
448
+ model: "sonnet" | "opus" | "haiku";
449
+ } | undefined;
450
+ summary?: {
451
+ model: "sonnet" | "opus" | "haiku";
452
+ } | undefined;
415
453
  capabilities?: {
416
454
  web?: {
417
455
  basePort?: number | undefined;
@@ -455,33 +493,42 @@ declare const IloomSettingsSchema: z.ZodObject<{
455
493
  protectedBranches?: string[] | undefined;
456
494
  workflows?: {
457
495
  issue?: {
458
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
496
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
459
497
  noVerify?: boolean | undefined;
460
498
  startIde?: boolean | undefined;
461
499
  startDevServer?: boolean | undefined;
462
500
  startAiAgent?: boolean | undefined;
463
501
  startTerminal?: boolean | undefined;
502
+ generateSummary?: boolean | undefined;
464
503
  } | undefined;
465
504
  pr?: {
466
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
505
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
467
506
  noVerify?: boolean | undefined;
468
507
  startIde?: boolean | undefined;
469
508
  startDevServer?: boolean | undefined;
470
509
  startAiAgent?: boolean | undefined;
471
510
  startTerminal?: boolean | undefined;
511
+ generateSummary?: boolean | undefined;
472
512
  } | undefined;
473
513
  regular?: {
474
- permissionMode?: "plan" | "acceptEdits" | "bypassPermissions" | "default" | undefined;
514
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions" | undefined;
475
515
  noVerify?: boolean | undefined;
476
516
  startIde?: boolean | undefined;
477
517
  startDevServer?: boolean | undefined;
478
518
  startAiAgent?: boolean | undefined;
479
519
  startTerminal?: boolean | undefined;
520
+ generateSummary?: boolean | undefined;
480
521
  } | undefined;
481
522
  } | undefined;
482
523
  agents?: Record<string, {
483
524
  model?: "sonnet" | "opus" | "haiku" | undefined;
484
525
  }> | null | undefined;
526
+ spin?: {
527
+ model?: "sonnet" | "opus" | "haiku" | undefined;
528
+ } | undefined;
529
+ summary?: {
530
+ model?: "sonnet" | "opus" | "haiku" | undefined;
531
+ } | undefined;
485
532
  capabilities?: {
486
533
  web?: {
487
534
  basePort?: number | undefined;
@@ -592,6 +639,22 @@ declare class SettingsManager {
592
639
  * @returns Array of protected branch names with mainBranch guaranteed to be included
593
640
  */
594
641
  getProtectedBranches(projectRoot?: string): Promise<string[]>;
642
+ /**
643
+ * Get the spin orchestrator model with default applied
644
+ * Default is defined in SpinAgentSettingsSchema
645
+ *
646
+ * @param settings - Pre-loaded settings object
647
+ * @returns Model shorthand ('opus', 'sonnet', or 'haiku')
648
+ */
649
+ getSpinModel(settings?: IloomSettings): 'sonnet' | 'opus' | 'haiku';
650
+ /**
651
+ * Get the session summary model with default applied
652
+ * Default is defined in SummarySettingsSchema
653
+ *
654
+ * @param settings - Pre-loaded settings object
655
+ * @returns Model shorthand ('opus', 'sonnet', or 'haiku')
656
+ */
657
+ getSummaryModel(settings?: IloomSettings): 'sonnet' | 'opus' | 'haiku';
595
658
  }
596
659
 
597
660
  /**
@@ -742,6 +805,115 @@ declare class GitWorktreeManager {
742
805
  };
743
806
  }
744
807
 
808
+ /**
809
+ * Options for ResourceCleanup operations
810
+ */
811
+ interface ResourceCleanupOptions {
812
+ /** Preview operations without executing */
813
+ dryRun?: boolean;
814
+ /** Skip confirmations and safety checks */
815
+ force?: boolean;
816
+ /** Delete the associated branch */
817
+ deleteBranch?: boolean;
818
+ /** Keep database branch instead of deleting */
819
+ keepDatabase?: boolean;
820
+ /** Prompt for confirmation before operations */
821
+ interactive?: boolean;
822
+ /** Check if branch is merged before allowing cleanup (defaults to true when deleteBranch is true) */
823
+ checkMergeSafety?: boolean;
824
+ /** Check if branch exists on remote before allowing cleanup (useful for GitHub-PR mode) */
825
+ checkRemoteBranch?: boolean;
826
+ }
827
+ /**
828
+ * Result of a cleanup operation
829
+ */
830
+ interface CleanupResult {
831
+ /** Identifier that was cleaned up */
832
+ identifier: string;
833
+ /** Actual branch name that was found (will differ from identifier) */
834
+ branchName?: string;
835
+ /** Overall success status */
836
+ success: boolean;
837
+ /** Whether this was a dry-run operation */
838
+ dryRun?: boolean;
839
+ /** Individual operation results */
840
+ operations: OperationResult[];
841
+ /** Errors encountered during cleanup */
842
+ errors: Error[];
843
+ /** Whether rollback is required */
844
+ rollbackRequired?: boolean;
845
+ }
846
+ /**
847
+ * Result of an individual cleanup operation
848
+ */
849
+ interface OperationResult {
850
+ /** Type of operation performed */
851
+ type: 'dev-server' | 'worktree' | 'branch' | 'database' | 'cli-symlinks';
852
+ /** Whether operation succeeded */
853
+ success: boolean;
854
+ /** Human-readable message */
855
+ message: string;
856
+ /** Error message if operation failed */
857
+ error?: string;
858
+ /** For database operations: whether branch was actually deleted (vs not found) */
859
+ deleted?: boolean;
860
+ }
861
+ /**
862
+ * Safety check result
863
+ */
864
+ interface SafetyCheck {
865
+ /** Whether cleanup is safe to proceed */
866
+ isSafe: boolean;
867
+ /** Non-blocking warnings */
868
+ warnings: string[];
869
+ /** Blocking issues that prevent cleanup */
870
+ blockers: string[];
871
+ }
872
+ /**
873
+ * Options for branch deletion
874
+ */
875
+ interface BranchDeleteOptions {
876
+ /** Force delete unmerged branch */
877
+ force?: boolean;
878
+ /** Also delete remote branch */
879
+ remote?: boolean;
880
+ /** Preview without executing */
881
+ dryRun?: boolean;
882
+ /** Path to the worktree being cleaned up (for merge target resolution) - DEPRECATED: use mergeTargetBranch instead */
883
+ worktreePath?: string;
884
+ /** Pre-fetched merge target branch (parent branch for child looms, main branch for others).
885
+ * This must be fetched BEFORE worktree deletion since metadata won't be readable after deletion. */
886
+ mergeTargetBranch?: string;
887
+ }
888
+ /**
889
+ * Target for batch cleanup - represents a branch that may or may not have a worktree
890
+ */
891
+ interface BranchCleanupTarget {
892
+ /** Branch name */
893
+ branchName: string;
894
+ /** Whether this branch has an associated worktree */
895
+ hasWorktree: boolean;
896
+ /** Path to worktree if it exists */
897
+ worktreePath?: string;
898
+ }
899
+ /**
900
+ * Result of batch cleanup operation for an issue
901
+ */
902
+ interface BatchCleanupResult {
903
+ /** Issue number that was cleaned up */
904
+ issueNumber: string | number;
905
+ /** Number of branches found matching the issue */
906
+ targetsFound: number;
907
+ /** Number of worktrees successfully removed */
908
+ worktreesRemoved: number;
909
+ /** Number of branches successfully deleted */
910
+ branchesDeleted: number;
911
+ /** Number of failed operations */
912
+ failed: number;
913
+ /** Individual cleanup results for each branch */
914
+ results: CleanupResult[];
915
+ }
916
+
745
917
  /**
746
918
  * Strategy interface for generating branch names from issue information
747
919
  */
@@ -843,104 +1015,6 @@ interface LoomSummary {
843
1015
  lastAccessed: string;
844
1016
  }
845
1017
 
846
- /**
847
- * Options for ResourceCleanup operations
848
- */
849
- interface ResourceCleanupOptions {
850
- /** Preview operations without executing */
851
- dryRun?: boolean;
852
- /** Skip confirmations and safety checks */
853
- force?: boolean;
854
- /** Delete the associated branch */
855
- deleteBranch?: boolean;
856
- /** Keep database branch instead of deleting */
857
- keepDatabase?: boolean;
858
- /** Prompt for confirmation before operations */
859
- interactive?: boolean;
860
- }
861
- /**
862
- * Result of a cleanup operation
863
- */
864
- interface CleanupResult {
865
- /** Identifier that was cleaned up */
866
- identifier: string;
867
- /** Actual branch name that was found (will differ from identifier) */
868
- branchName?: string;
869
- /** Overall success status */
870
- success: boolean;
871
- /** Individual operation results */
872
- operations: OperationResult[];
873
- /** Errors encountered during cleanup */
874
- errors: Error[];
875
- /** Whether rollback is required */
876
- rollbackRequired?: boolean;
877
- }
878
- /**
879
- * Result of an individual cleanup operation
880
- */
881
- interface OperationResult {
882
- /** Type of operation performed */
883
- type: 'dev-server' | 'worktree' | 'branch' | 'database' | 'cli-symlinks';
884
- /** Whether operation succeeded */
885
- success: boolean;
886
- /** Human-readable message */
887
- message: string;
888
- /** Error message if operation failed */
889
- error?: string;
890
- /** For database operations: whether branch was actually deleted (vs not found) */
891
- deleted?: boolean;
892
- }
893
- /**
894
- * Safety check result
895
- */
896
- interface SafetyCheck {
897
- /** Whether cleanup is safe to proceed */
898
- isSafe: boolean;
899
- /** Non-blocking warnings */
900
- warnings: string[];
901
- /** Blocking issues that prevent cleanup */
902
- blockers: string[];
903
- }
904
- /**
905
- * Options for branch deletion
906
- */
907
- interface BranchDeleteOptions {
908
- /** Force delete unmerged branch */
909
- force?: boolean;
910
- /** Also delete remote branch */
911
- remote?: boolean;
912
- /** Preview without executing */
913
- dryRun?: boolean;
914
- }
915
- /**
916
- * Target for batch cleanup - represents a branch that may or may not have a worktree
917
- */
918
- interface BranchCleanupTarget {
919
- /** Branch name */
920
- branchName: string;
921
- /** Whether this branch has an associated worktree */
922
- hasWorktree: boolean;
923
- /** Path to worktree if it exists */
924
- worktreePath?: string;
925
- }
926
- /**
927
- * Result of batch cleanup operation for an issue
928
- */
929
- interface BatchCleanupResult {
930
- /** Issue number that was cleaned up */
931
- issueNumber: string | number;
932
- /** Number of branches found matching the issue */
933
- targetsFound: number;
934
- /** Number of worktrees successfully removed */
935
- worktreesRemoved: number;
936
- /** Number of branches successfully deleted */
937
- branchesDeleted: number;
938
- /** Number of failed operations */
939
- failed: number;
940
- /** Individual cleanup results for each branch */
941
- results: CleanupResult[];
942
- }
943
-
944
1018
  /**
945
1019
  * Information about a running process
946
1020
  */
@@ -1076,15 +1150,18 @@ interface StartOptions {
1076
1150
  childLoom?: boolean;
1077
1151
  oneShot?: OneShotMode;
1078
1152
  body?: string;
1153
+ json?: boolean;
1079
1154
  }
1080
1155
  interface AddIssueOptions {
1081
1156
  body?: string;
1157
+ json?: boolean;
1082
1158
  }
1083
1159
  interface FeedbackOptions {
1084
1160
  body?: string;
1085
1161
  }
1086
1162
  interface EnhanceOptions {
1087
1163
  noBrowser?: boolean;
1164
+ json?: boolean;
1088
1165
  }
1089
1166
  interface FinishOptions {
1090
1167
  force?: boolean;
@@ -1093,6 +1170,7 @@ interface FinishOptions {
1093
1170
  skipBuild?: boolean;
1094
1171
  noBrowser?: boolean;
1095
1172
  cleanup?: boolean;
1173
+ json?: boolean;
1096
1174
  }
1097
1175
  /**
1098
1176
  * Options for the cleanup command
@@ -1109,10 +1187,57 @@ interface CleanupOptions {
1109
1187
  force?: boolean;
1110
1188
  /** Show what would be done without actually doing it */
1111
1189
  dryRun?: boolean;
1190
+ /** Output result as JSON */
1191
+ json?: boolean;
1112
1192
  }
1113
1193
  interface ListOptions {
1114
1194
  json?: boolean;
1115
1195
  }
1196
+ interface AddIssueResult {
1197
+ url: string;
1198
+ id: number;
1199
+ title: string;
1200
+ created_at: string;
1201
+ }
1202
+ interface EnhanceResult {
1203
+ url: string;
1204
+ id: number;
1205
+ title: string;
1206
+ created_at: string;
1207
+ enhanced: boolean;
1208
+ }
1209
+ interface StartResult {
1210
+ id: string;
1211
+ path: string;
1212
+ branch: string;
1213
+ port?: number;
1214
+ type: 'issue' | 'pr' | 'branch';
1215
+ identifier: string | number;
1216
+ title?: string;
1217
+ capabilities?: string[];
1218
+ }
1219
+ interface FinishResult {
1220
+ success: boolean;
1221
+ type: 'issue' | 'pr' | 'branch';
1222
+ identifier: string | number;
1223
+ /** Whether this was a dry-run operation */
1224
+ dryRun?: boolean;
1225
+ operations: Array<{
1226
+ type: 'validation' | 'commit' | 'rebase' | 'merge' | 'cleanup' | 'pr-creation' | 'build';
1227
+ message: string;
1228
+ success: boolean;
1229
+ error?: string;
1230
+ }>;
1231
+ prUrl?: string;
1232
+ cleanupResult?: CleanupResult;
1233
+ }
1234
+ interface SummaryResult {
1235
+ summary: string;
1236
+ sessionId: string;
1237
+ issueNumber?: string | number;
1238
+ branchName: string;
1239
+ loomType: 'issue' | 'pr' | 'branch';
1240
+ }
1116
1241
  interface MockOptions {
1117
1242
  scenario: 'empty' | 'existing' | 'conflicts' | 'error';
1118
1243
  data?: unknown;
@@ -1136,7 +1261,7 @@ interface ValidationOptions {
1136
1261
  skipTests?: boolean;
1137
1262
  }
1138
1263
  interface ValidationStepResult {
1139
- step: 'typecheck' | 'lint' | 'test';
1264
+ step: 'typecheck' | 'compile' | 'lint' | 'test';
1140
1265
  passed: boolean;
1141
1266
  skipped: boolean;
1142
1267
  output?: string;
@@ -1279,6 +1404,7 @@ declare class IssueTrackerFactory {
1279
1404
 
1280
1405
  declare class EnvironmentManager {
1281
1406
  private readonly backupSuffix;
1407
+ constructor();
1282
1408
  /**
1283
1409
  * Set or update an environment variable in a .env file
1284
1410
  * Ports functionality from bash/utils/env-utils.sh:setEnvVar()
@@ -1392,6 +1518,7 @@ interface TemplateVariables {
1392
1518
  WORKSPACE_PATH?: string;
1393
1519
  PORT?: number;
1394
1520
  ONE_SHOT_MODE?: boolean;
1521
+ INTERACTIVE_MODE?: boolean;
1395
1522
  SETTINGS_SCHEMA?: string;
1396
1523
  SETTINGS_GLOBAL_JSON?: string;
1397
1524
  SETTINGS_JSON?: string;
@@ -1409,6 +1536,10 @@ interface TemplateVariables {
1409
1536
  SETTINGS_SCHEMA_CONTENT?: string;
1410
1537
  FIRST_TIME_USER?: boolean;
1411
1538
  VSCODE_SETTINGS_GITIGNORED?: string;
1539
+ SESSION_CONTEXT?: string;
1540
+ BRANCH_NAME?: string;
1541
+ LOOM_TYPE?: string;
1542
+ COMPACT_SUMMARIES?: string;
1412
1543
  }
1413
1544
  declare class PromptTemplateManager {
1414
1545
  private templateDir;
@@ -1416,7 +1547,7 @@ declare class PromptTemplateManager {
1416
1547
  /**
1417
1548
  * Load a template file by name
1418
1549
  */
1419
- loadTemplate(templateName: 'issue' | 'pr' | 'regular' | 'init'): Promise<string>;
1550
+ loadTemplate(templateName: 'issue' | 'pr' | 'regular' | 'init' | 'session-summary'): Promise<string>;
1420
1551
  /**
1421
1552
  * Substitute variables in a template string
1422
1553
  */
@@ -1431,7 +1562,7 @@ declare class PromptTemplateManager {
1431
1562
  /**
1432
1563
  * Get a fully processed prompt for a workflow type
1433
1564
  */
1434
- getPrompt(type: 'issue' | 'pr' | 'regular' | 'init', variables: TemplateVariables): Promise<string>;
1565
+ getPrompt(type: 'issue' | 'pr' | 'regular' | 'init' | 'session-summary', variables: TemplateVariables): Promise<string>;
1435
1566
  }
1436
1567
 
1437
1568
  interface ClaudeWorkflowOptions {
@@ -1456,10 +1587,6 @@ declare class ClaudeService {
1456
1587
  * Check if Claude CLI is available
1457
1588
  */
1458
1589
  isAvailable(): Promise<boolean>;
1459
- /**
1460
- * Get the appropriate model for a workflow type
1461
- */
1462
- private getModelForWorkflow;
1463
1590
  /**
1464
1591
  * Get the appropriate permission mode for a workflow type
1465
1592
  */
@@ -1495,6 +1622,119 @@ declare class ClaudeContextManager {
1495
1622
  launchWithContext(context: ClaudeContext, headless?: boolean): Promise<string | void>;
1496
1623
  }
1497
1624
 
1625
+ /**
1626
+ * Input for writing metadata (all fields except version and created_at)
1627
+ * Note: issueTracker is required because every loom should have an associated
1628
+ * issue tracker provider (defaults to 'github' via IssueTrackerFactory)
1629
+ */
1630
+ interface WriteMetadataInput {
1631
+ description: string;
1632
+ branchName: string;
1633
+ worktreePath: string;
1634
+ issueType: 'branch' | 'issue' | 'pr';
1635
+ issue_numbers: string[];
1636
+ pr_numbers: string[];
1637
+ issueTracker: string;
1638
+ colorHex: string;
1639
+ sessionId: string;
1640
+ projectPath: string;
1641
+ parentLoom?: {
1642
+ type: 'issue' | 'pr' | 'branch';
1643
+ identifier: string | number;
1644
+ branchName: string;
1645
+ worktreePath: string;
1646
+ databaseBranch?: string;
1647
+ };
1648
+ }
1649
+ /**
1650
+ * Result of reading metadata for a worktree
1651
+ */
1652
+ interface LoomMetadata {
1653
+ description: string;
1654
+ created_at: string | null;
1655
+ branchName: string | null;
1656
+ worktreePath: string | null;
1657
+ issueType: 'branch' | 'issue' | 'pr' | null;
1658
+ issue_numbers: string[];
1659
+ pr_numbers: string[];
1660
+ issueTracker: string | null;
1661
+ colorHex: string | null;
1662
+ sessionId: string | null;
1663
+ projectPath: string | null;
1664
+ parentLoom: {
1665
+ type: 'issue' | 'pr' | 'branch';
1666
+ identifier: string | number;
1667
+ branchName: string;
1668
+ worktreePath: string;
1669
+ databaseBranch?: string;
1670
+ } | null;
1671
+ }
1672
+ /**
1673
+ * MetadataManager: Manage loom metadata persistence
1674
+ *
1675
+ * Stores loom metadata in ~/.config/iloom-ai/looms/ directory.
1676
+ * Each worktree gets a JSON file named by slugifying its absolute path.
1677
+ *
1678
+ * Per spec section 2.2:
1679
+ * - Filename derived from worktree absolute path
1680
+ * - Path separators replaced with double underscores
1681
+ * - Non-alphanumeric chars (except _ and -) replaced with hyphens
1682
+ */
1683
+ declare class MetadataManager {
1684
+ private readonly loomsDir;
1685
+ constructor();
1686
+ /**
1687
+ * Convert worktree path to filename slug per spec section 2.2
1688
+ *
1689
+ * Algorithm:
1690
+ * 1. Trim trailing slashes
1691
+ * 2. Replace all path separators (/ or \) with __ (double underscore)
1692
+ * 3. Replace any other non-alphanumeric characters (except _ and -) with -
1693
+ * 4. Append .json
1694
+ *
1695
+ * Example:
1696
+ * - Worktree: /Users/jane/dev/repo
1697
+ * - Filename: _Users__jane__dev__repo.json
1698
+ */
1699
+ slugifyPath(worktreePath: string): string;
1700
+ /**
1701
+ * Get the full path to the metadata file for a worktree
1702
+ */
1703
+ private getFilePath;
1704
+ /**
1705
+ * Write metadata for a worktree (spec section 3.1)
1706
+ *
1707
+ * @param worktreePath - Absolute path to the worktree (used for file naming)
1708
+ * @param input - Metadata to write (description plus additional fields)
1709
+ */
1710
+ writeMetadata(worktreePath: string, input: WriteMetadataInput): Promise<void>;
1711
+ /**
1712
+ * Read metadata for a worktree (spec section 3.2)
1713
+ *
1714
+ * @param worktreePath - Absolute path to the worktree
1715
+ * @returns The metadata object with all fields, or null if not found/invalid
1716
+ */
1717
+ readMetadata(worktreePath: string): Promise<LoomMetadata | null>;
1718
+ /**
1719
+ * List all stored loom metadata files
1720
+ *
1721
+ * Returns an array of LoomMetadata objects for all valid metadata files
1722
+ * in the looms directory. Invalid or unreadable files are skipped.
1723
+ *
1724
+ * @returns Array of LoomMetadata objects from all stored files
1725
+ */
1726
+ listAllMetadata(): Promise<LoomMetadata[]>;
1727
+ /**
1728
+ * Delete metadata for a worktree (spec section 3.3)
1729
+ *
1730
+ * Idempotent: silently succeeds if file doesn't exist
1731
+ * Non-fatal: logs warning on permission errors but doesn't throw
1732
+ *
1733
+ * @param worktreePath - Absolute path to the worktree
1734
+ */
1735
+ deleteMetadata(worktreePath: string): Promise<void>;
1736
+ }
1737
+
1498
1738
  /**
1499
1739
  * Execute a Git command and return the stdout result
1500
1740
  * Throws an error if the command fails
@@ -1503,6 +1743,7 @@ declare function executeGitCommand(args: string[], options?: {
1503
1743
  cwd?: string;
1504
1744
  timeout?: number;
1505
1745
  stdio?: 'inherit' | 'pipe';
1746
+ env?: NodeJS.ProcessEnv;
1506
1747
  }): Promise<string>;
1507
1748
  /**
1508
1749
  * Parse git worktree list output into structured data
@@ -1580,6 +1821,19 @@ declare function findMainWorktreePath(path?: string, options?: {
1580
1821
  * @throws Error if main worktree cannot be found
1581
1822
  */
1582
1823
  declare function findMainWorktreePathWithSettings(path?: string, settingsManager?: SettingsManager): Promise<string>;
1824
+ /**
1825
+ * Find the worktree path where a specific branch is checked out
1826
+ *
1827
+ * Used by MergeManager to find the correct worktree for child loom merges.
1828
+ * When finishing a child loom, we need to find where the PARENT branch is
1829
+ * checked out (the merge target), not where settings.mainBranch is checked out.
1830
+ *
1831
+ * @param branchName - The branch name to find
1832
+ * @param path - Path to search from (defaults to process.cwd())
1833
+ * @returns Path to worktree where the branch is checked out
1834
+ * @throws Error if no worktree has the specified branch checked out
1835
+ */
1836
+ declare function findWorktreeForBranch(branchName: string, path?: string): Promise<string>;
1583
1837
  /**
1584
1838
  * Check if there are uncommitted changes in a repository
1585
1839
  */
@@ -1642,6 +1896,82 @@ declare function isFileTrackedByGit(filePath: string, cwd?: string): Promise<boo
1642
1896
  * @returns true if file IS ignored, false if NOT ignored or on error
1643
1897
  */
1644
1898
  declare function isFileGitignored(filePath: string, cwd?: string): Promise<boolean>;
1899
+ /**
1900
+ * Check if a branch is merged into the main branch
1901
+ *
1902
+ * Uses `git merge-base --is-ancestor` which is more reliable than `git branch -d`'s check.
1903
+ * The `-d` flag checks against current HEAD, which can give false positives when:
1904
+ * - Running from a worktree where main isn't checked out
1905
+ * - Squash or rebase merges were used
1906
+ *
1907
+ * This function explicitly checks if the branch tip is an ancestor of the main branch,
1908
+ * providing consistent results regardless of which worktree the command runs from.
1909
+ *
1910
+ * @param branchName - The branch to check
1911
+ * @param mainBranch - The main branch to check against (defaults to 'main')
1912
+ * @param cwd - Working directory (defaults to process.cwd())
1913
+ * @returns true if branch is merged into main, false otherwise
1914
+ */
1915
+ declare function isBranchMergedIntoMain(branchName: string, mainBranch?: string, cwd?: string): Promise<boolean>;
1916
+ /**
1917
+ * Check if a branch exists on the remote (origin) and is up-to-date with local
1918
+ * Useful for GitHub-PR workflows to ensure branch has been pushed and is current
1919
+ *
1920
+ * @param branchName - Name of the branch to check
1921
+ * @param cwd - Working directory to run git command in
1922
+ * @returns Promise<boolean> - true if remote branch exists and matches local HEAD, false otherwise
1923
+ */
1924
+ declare function isRemoteBranchUpToDate(branchName: string, cwd: string): Promise<boolean>;
1925
+ /**
1926
+ * Result of checking remote branch status for safety validation
1927
+ */
1928
+ interface RemoteBranchStatus {
1929
+ /** Whether the remote branch exists */
1930
+ exists: boolean;
1931
+ /** Whether the remote is ahead of local (has commits not present locally) */
1932
+ remoteAhead: boolean;
1933
+ /** Whether local is ahead of remote (has unpushed commits) */
1934
+ localAhead: boolean;
1935
+ /** Whether a network error occurred during the check */
1936
+ networkError: boolean;
1937
+ /** Error message if network error occurred */
1938
+ errorMessage?: string;
1939
+ }
1940
+ /**
1941
+ * Check the status of a remote branch for safety validation during cleanup
1942
+ * This function provides detailed status needed for the 5-point safety check:
1943
+ *
1944
+ * The key insight: we care about DATA LOSS, not about remote state
1945
+ * - Remote ahead of local is SAFE (commits exist on remote, no data loss)
1946
+ * - Local ahead of remote is DANGEROUS (unpushed commits would be lost)
1947
+ *
1948
+ * 5-point safety logic:
1949
+ * 1. Network error -> BLOCK (can't verify safety)
1950
+ * 2. Remote ahead of local -> OK (no data loss - commits exist on remote)
1951
+ * 3. Local ahead of remote (unpushed commits) -> BLOCK (data loss risk)
1952
+ * 4. No remote, merged to main -> OK (work is in main)
1953
+ * 5. No remote, NOT merged to main -> BLOCK (unmerged work would be lost)
1954
+ *
1955
+ * @param branchName - Name of the branch to check
1956
+ * @param cwd - Working directory to run git command in
1957
+ * @returns Promise<RemoteBranchStatus> - Detailed status of the remote branch
1958
+ */
1959
+ declare function checkRemoteBranchStatus(branchName: string, cwd: string): Promise<RemoteBranchStatus>;
1960
+ /**
1961
+ * Get the merge target branch for a loom
1962
+ * Priority: parent loom metadata (parentLoom.branchName) > configured main branch > 'main'
1963
+ *
1964
+ * This is the shared utility for determining where a branch should merge to.
1965
+ * Child looms merge to their parent branch, standalone looms merge to main.
1966
+ *
1967
+ * @param worktreePath - Path to load metadata/settings from (defaults to process.cwd())
1968
+ * @param options - Optional dependency injection for testing
1969
+ * @returns The branch name to merge into
1970
+ */
1971
+ declare function getMergeTargetBranch(worktreePath?: string, options?: {
1972
+ settingsManager?: SettingsManager;
1973
+ metadataManager?: MetadataManager;
1974
+ }): Promise<string>;
1645
1975
 
1646
1976
  interface LoggerOptions {
1647
1977
  prefix?: string;
@@ -1658,9 +1988,16 @@ interface Logger {
1658
1988
  debug: (message: string, ...args: unknown[]) => void;
1659
1989
  setDebug: (enabled: boolean) => void;
1660
1990
  isDebugEnabled: () => boolean;
1991
+ stdout: NodeJS.WriteStream;
1661
1992
  }
1662
1993
  declare const logger: Logger;
1663
1994
  declare function createLogger(options?: LoggerOptions): Logger;
1995
+ /**
1996
+ * Creates a logger that redirects all output to stderr.
1997
+ * Use this in JSON mode so progress messages don't pollute stdout.
1998
+ * The JSON output can then be cleanly piped.
1999
+ */
2000
+ declare function createStderrLogger(options?: LoggerOptions): Logger;
1664
2001
 
1665
2002
  /**
1666
2003
  * Utility class for converting HTML details/summary format to Linear's collapsible format
@@ -1811,4 +2148,4 @@ declare class TableFormatter {
1811
2148
  static previewFormatting(headers: string[], options?: TableFormatterOptions): string;
1812
2149
  }
1813
2150
 
1814
- export { type AddIssueOptions, type BatchCleanupResult, type BranchCleanupTarget, type BranchDeleteOptions, type BranchGenerationOptions, type BranchNameStrategy, type Capability, type ClaudeContext, ClaudeContextManager, type CleanupOptions, type CleanupResult, type ColorData, type CommitOptions, type Config, type CreateLoomInput, type DatabaseDeletionResult, DatabaseManager, type DatabaseProvider, type EnhanceOptions, type EnvFileOptions, type EnvOperationResult, type EnvVariable, EnvironmentManager, type FeedbackOptions, type FinishOptions, GitHubService, type GitStatus, type GitWorktree, GitWorktreeManager, type InstallationMethod, type Issue, type IssueTracker, IssueTrackerFactory, type IssueTrackerInputDetection, type IssueTrackerProviderType, type LaunchMode, LinearMarkupConverter, type ListOptions, type Logger, type LoggerOptions, type Loom, type LoomSummary, type MergeOptions, type MergeResult, type MockOptions, type OneShotMode, type OperationResult, type PRWorktreePattern, type Platform, type PortAssignmentOptions, type ProcessInfo, type ProjectCapability, type PullRequest, type ResourceCleanupOptions, type RgbColor, type SafetyCheck, type StartOptions, TableFormatter, type TableFormatterOptions, type TableGenerationOptions, type UpdateCheckCache, type UpdateCheckResult, UserAbortedCommitError, type ValidationOptions, type ValidationResult, type ValidationStepResult, type Workspace, type WorkspaceInput, WorkspaceManager, type WorkspaceSummary, type Worktree, type WorktreeCleanupOptions, type WorktreeCreateOptions, type WorktreeListOptions, type WorktreeOperationResult, type WorktreeStatus, type WorktreeValidation, branchExists, createLogger, ensureRepositoryHasCommits, executeGitCommand, extractIssueNumber, extractPRNumber, findAllBranchesForIssue, findMainWorktreePath, findMainWorktreePathWithSettings, generateWorktreePath, getCurrentBranch, getDefaultBranch, getRepoRoot, getWorktreeRoot, hasUncommittedChanges, isEmptyRepository, isFileGitignored, isFileTrackedByGit, isPRBranch, isValidGitRepo, isWorktreePath, logger, parseWorktreeList, pushBranchToRemote };
2151
+ export { type AddIssueOptions, type AddIssueResult, type BatchCleanupResult, type BranchCleanupTarget, type BranchDeleteOptions, type BranchGenerationOptions, type BranchNameStrategy, type Capability, type ClaudeContext, ClaudeContextManager, type CleanupOptions, type CleanupResult, type ColorData, type CommitOptions, type Config, type CreateLoomInput, type DatabaseDeletionResult, DatabaseManager, type DatabaseProvider, type EnhanceOptions, type EnhanceResult, type EnvFileOptions, type EnvOperationResult, type EnvVariable, EnvironmentManager, type FeedbackOptions, type FinishOptions, type FinishResult, GitHubService, type GitStatus, type GitWorktree, GitWorktreeManager, type InstallationMethod, type Issue, type IssueTracker, IssueTrackerFactory, type IssueTrackerInputDetection, type IssueTrackerProviderType, type LaunchMode, LinearMarkupConverter, type ListOptions, type Logger, type LoggerOptions, type Loom, type LoomSummary, type MergeOptions, type MergeResult, type MockOptions, type OneShotMode, type OperationResult, type PRWorktreePattern, type Platform, type PortAssignmentOptions, type ProcessInfo, type ProjectCapability, type PullRequest, type RemoteBranchStatus, type ResourceCleanupOptions, type RgbColor, type SafetyCheck, type StartOptions, type StartResult, type SummaryResult, TableFormatter, type TableFormatterOptions, type TableGenerationOptions, type UpdateCheckCache, type UpdateCheckResult, UserAbortedCommitError, type ValidationOptions, type ValidationResult, type ValidationStepResult, type Workspace, type WorkspaceInput, WorkspaceManager, type WorkspaceSummary, type Worktree, type WorktreeCleanupOptions, type WorktreeCreateOptions, type WorktreeListOptions, type WorktreeOperationResult, type WorktreeStatus, type WorktreeValidation, branchExists, checkRemoteBranchStatus, createLogger, createStderrLogger, ensureRepositoryHasCommits, executeGitCommand, extractIssueNumber, extractPRNumber, findAllBranchesForIssue, findMainWorktreePath, findMainWorktreePathWithSettings, findWorktreeForBranch, generateWorktreePath, getCurrentBranch, getDefaultBranch, getMergeTargetBranch, getRepoRoot, getWorktreeRoot, hasUncommittedChanges, isBranchMergedIntoMain, isEmptyRepository, isFileGitignored, isFileTrackedByGit, isPRBranch, isRemoteBranchUpToDate, isValidGitRepo, isWorktreePath, logger, parseWorktreeList, pushBranchToRemote };