@iloom/cli 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/{BranchNamingService-ECJHBB67.js → BranchNamingService-4OP6LOH6.js} +2 -2
- package/dist/ClaudeContextManager-ZKTUVQB2.js +14 -0
- package/dist/ClaudeService-TRWOYQ6O.js +13 -0
- package/dist/{LoomLauncher-L64HHS3T.js → LoomLauncher-FRECYMXS.js} +6 -6
- package/dist/{PromptTemplateManager-DULSVRRE.js → PromptTemplateManager-YOE2SIPG.js} +2 -2
- package/dist/README.md +2 -2
- package/dist/{SettingsManager-BQDQA3FK.js → SettingsManager-FNKCOZMQ.js} +2 -2
- package/dist/{build-5GO3XW26.js → build-VHGEMXBA.js} +6 -6
- package/dist/{chunk-ZW2LKWWE.js → chunk-2VEWSM34.js} +3 -3
- package/dist/{chunk-LXLMMXXY.js → chunk-2YZCWAVZ.js} +17 -12
- package/dist/chunk-2YZCWAVZ.js.map +1 -0
- package/dist/{chunk-UD3WJDIV.js → chunk-3F27M7ZD.js} +11 -774
- package/dist/chunk-3F27M7ZD.js.map +1 -0
- package/dist/chunk-4E7LCFUG.js +24 -0
- package/dist/chunk-4E7LCFUG.js.map +1 -0
- package/dist/{chunk-MNHZB4Z2.js → chunk-4FGEGQW4.js} +3 -3
- package/dist/{chunk-WY4QBK43.js → chunk-63QWFWH3.js} +2 -2
- package/dist/{chunk-YYAKPQBT.js → chunk-7VHJNVLF.js} +19 -9
- package/dist/chunk-7VHJNVLF.js.map +1 -0
- package/dist/chunk-BFHDVFSK.js +651 -0
- package/dist/chunk-BFHDVFSK.js.map +1 -0
- package/dist/{chunk-FB47TIJG.js → chunk-BFLMCE2U.js} +4 -23
- package/dist/chunk-BFLMCE2U.js.map +1 -0
- package/dist/{chunk-SN3SQCFK.js → chunk-BU53XIGY.js} +4 -4
- package/dist/{chunk-SF2P22EE.js → chunk-C6HNNJIV.js} +2 -2
- package/dist/{chunk-5MWV33NN.js → chunk-CVCTIDDK.js} +2 -2
- package/dist/{chunk-ZEWU5PZK.js → chunk-G5V75JD5.js} +2 -2
- package/dist/{chunk-ZHPNZC75.js → chunk-HYGUPUV5.js} +26 -21
- package/dist/chunk-HYGUPUV5.js.map +1 -0
- package/dist/{chunk-VGGST52X.js → chunk-I5T677EA.js} +2 -2
- package/dist/{chunk-VECNX6VX.js → chunk-KIK2ZFAL.js} +2 -2
- package/dist/{chunk-3D7WQM7I.js → chunk-LLHXQS3C.js} +2 -2
- package/dist/{chunk-Y4YZTHZE.js → chunk-LUKXJSRI.js} +2 -2
- package/dist/{chunk-ONQYPICO.js → chunk-PZ5WSR5Z.js} +63 -9
- package/dist/chunk-PZ5WSR5Z.js.map +1 -0
- package/dist/{chunk-J5S7DFYC.js → chunk-QFTDZ5E3.js} +2 -2
- package/dist/chunk-RJ3VBUFK.js +781 -0
- package/dist/chunk-RJ3VBUFK.js.map +1 -0
- package/dist/{chunk-UWGVCXRF.js → chunk-SKSYYBCU.js} +23 -1
- package/dist/chunk-SKSYYBCU.js.map +1 -0
- package/dist/{chunk-JO2LZ6EQ.js → chunk-SWSJWA2S.js} +2 -2
- package/dist/{chunk-4WJNIR5O.js → chunk-UUEW5KWB.js} +1 -1
- package/dist/chunk-UUEW5KWB.js.map +1 -0
- package/dist/{chunk-6EU6TCF6.js → chunk-V3SVMFDQ.js} +5 -5
- package/dist/{chunk-NRSWLOAZ.js → chunk-WXIM2WS7.js} +4 -4
- package/dist/{chunk-RYWFS37M.js → chunk-XE4BDRZD.js} +2 -2
- package/dist/{ignite-CGOV3TD4.js → chunk-ZGM2FE2R.js} +105 -73
- package/dist/chunk-ZGM2FE2R.js.map +1 -0
- package/dist/{claude-P3NQR6IJ.js → claude-LN7OWVNI.js} +2 -2
- package/dist/{cleanup-6UCPVMFG.js → cleanup-4ZM2AJDC.js} +19 -17
- package/dist/{cleanup-6UCPVMFG.js.map → cleanup-4ZM2AJDC.js.map} +1 -1
- package/dist/cli.js +167 -614
- package/dist/cli.js.map +1 -1
- package/dist/{commit-L3EPY5QG.js → commit-4CFLXRZ3.js} +12 -10
- package/dist/commit-4CFLXRZ3.js.map +1 -0
- package/dist/{compile-ZS4HYRX5.js → compile-7ALJHZ4N.js} +6 -6
- package/dist/{contribute-ORDDQGSL.js → contribute-5GKLK3BQ.js} +3 -3
- package/dist/{dev-server-FYZ2AQIH.js → dev-server-7SMIB7OF.js} +8 -8
- package/dist/{feedback-TMBXSCM5.js → feedback-EZWF5CAL.js} +10 -8
- package/dist/{feedback-TMBXSCM5.js.map → feedback-EZWF5CAL.js.map} +1 -1
- package/dist/{git-ET64COO3.js → git-GTLKAZRJ.js} +3 -3
- package/dist/ignite-MQETGFNA.js +34 -0
- package/dist/ignite-MQETGFNA.js.map +1 -0
- package/dist/index.d.ts +113 -18
- package/dist/index.js +180 -15
- package/dist/index.js.map +1 -1
- package/dist/{init-GFQ5W7GK.js → init-ZB2RITW6.js} +8 -8
- package/dist/install-deps-RLSGSHH7.js +43 -0
- package/dist/install-deps-RLSGSHH7.js.map +1 -0
- package/dist/{issues-T4ZZSPEG.js → issues-4UUAQ5K6.js} +3 -3
- package/dist/{lint-6TQXDZ3T.js → lint-AAN2NZWG.js} +6 -6
- package/dist/mcp/harness-server.js +140 -0
- package/dist/mcp/harness-server.js.map +1 -0
- package/dist/mcp/issue-management-server.js +140 -18
- package/dist/mcp/issue-management-server.js.map +1 -1
- package/dist/{open-5QZGXQRF.js → open-FXWW3VI4.js} +8 -8
- package/dist/{plan-U7ZQWLFY.js → plan-D3KSN5MU.js} +338 -36
- package/dist/plan-D3KSN5MU.js.map +1 -0
- package/dist/prompts/CLAUDE.md +2 -2
- package/dist/prompts/init-prompt.txt +102 -27
- package/dist/prompts/issue-prompt.txt +46 -0
- package/dist/prompts/plan-prompt.txt +59 -19
- package/dist/prompts/swarm-orchestrator-prompt.txt +121 -80
- package/dist/{rebase-DWIB77KV.js → rebase-62FDLIH4.js} +17 -8
- package/dist/rebase-62FDLIH4.js.map +1 -0
- package/dist/{recap-MX63HAKV.js → recap-OMBOKJST.js} +6 -6
- package/dist/{run-O3TFNQFC.js → run-BBXLRIZB.js} +8 -8
- package/dist/schema/settings.schema.json +36 -2
- package/dist/{shell-G6VC2CYR.js → shell-RF7LTND5.js} +5 -5
- package/dist/{summary-FWHAX55O.js → summary-YZI25KW4.js} +9 -9
- package/dist/{test-F7JNJZYP.js → test-SGO6I5Z7.js} +6 -6
- package/dist/{test-git-BTAOIUE2.js → test-git-XM4TM65W.js} +3 -3
- package/dist/{test-jira-CHYNV33F.js → test-jira-LDTOYFSD.js} +3 -3
- package/dist/{test-prefix-Q6TFSU6F.js → test-prefix-GBO37XCN.js} +3 -3
- package/dist/{test-webserver-EONCG7E7.js → test-webserver-NZ3JTVLL.js} +5 -5
- package/dist/{vscode-VA5X4P25.js → vscode-6XUGHJKL.js} +5 -5
- package/package.json +1 -1
- package/dist/ClaudeContextManager-QXX6ZFST.js +0 -14
- package/dist/ClaudeService-NJNK2SUH.js +0 -13
- package/dist/chunk-4WJNIR5O.js.map +0 -1
- package/dist/chunk-FB47TIJG.js.map +0 -1
- package/dist/chunk-LXLMMXXY.js.map +0 -1
- package/dist/chunk-ONQYPICO.js.map +0 -1
- package/dist/chunk-UD3WJDIV.js.map +0 -1
- package/dist/chunk-UVD4CZKS.js +0 -101
- package/dist/chunk-UVD4CZKS.js.map +0 -1
- package/dist/chunk-UWGVCXRF.js.map +0 -1
- package/dist/chunk-YYAKPQBT.js.map +0 -1
- package/dist/chunk-ZHPNZC75.js.map +0 -1
- package/dist/commit-L3EPY5QG.js.map +0 -1
- package/dist/ignite-CGOV3TD4.js.map +0 -1
- package/dist/plan-U7ZQWLFY.js.map +0 -1
- package/dist/rebase-DWIB77KV.js.map +0 -1
- /package/dist/{BranchNamingService-ECJHBB67.js.map → BranchNamingService-4OP6LOH6.js.map} +0 -0
- /package/dist/{ClaudeContextManager-QXX6ZFST.js.map → ClaudeContextManager-ZKTUVQB2.js.map} +0 -0
- /package/dist/{ClaudeService-NJNK2SUH.js.map → ClaudeService-TRWOYQ6O.js.map} +0 -0
- /package/dist/{LoomLauncher-L64HHS3T.js.map → LoomLauncher-FRECYMXS.js.map} +0 -0
- /package/dist/{PromptTemplateManager-DULSVRRE.js.map → PromptTemplateManager-YOE2SIPG.js.map} +0 -0
- /package/dist/{SettingsManager-BQDQA3FK.js.map → SettingsManager-FNKCOZMQ.js.map} +0 -0
- /package/dist/{build-5GO3XW26.js.map → build-VHGEMXBA.js.map} +0 -0
- /package/dist/{chunk-ZW2LKWWE.js.map → chunk-2VEWSM34.js.map} +0 -0
- /package/dist/{chunk-MNHZB4Z2.js.map → chunk-4FGEGQW4.js.map} +0 -0
- /package/dist/{chunk-WY4QBK43.js.map → chunk-63QWFWH3.js.map} +0 -0
- /package/dist/{chunk-SN3SQCFK.js.map → chunk-BU53XIGY.js.map} +0 -0
- /package/dist/{chunk-SF2P22EE.js.map → chunk-C6HNNJIV.js.map} +0 -0
- /package/dist/{chunk-5MWV33NN.js.map → chunk-CVCTIDDK.js.map} +0 -0
- /package/dist/{chunk-ZEWU5PZK.js.map → chunk-G5V75JD5.js.map} +0 -0
- /package/dist/{chunk-VGGST52X.js.map → chunk-I5T677EA.js.map} +0 -0
- /package/dist/{chunk-VECNX6VX.js.map → chunk-KIK2ZFAL.js.map} +0 -0
- /package/dist/{chunk-3D7WQM7I.js.map → chunk-LLHXQS3C.js.map} +0 -0
- /package/dist/{chunk-Y4YZTHZE.js.map → chunk-LUKXJSRI.js.map} +0 -0
- /package/dist/{chunk-J5S7DFYC.js.map → chunk-QFTDZ5E3.js.map} +0 -0
- /package/dist/{chunk-JO2LZ6EQ.js.map → chunk-SWSJWA2S.js.map} +0 -0
- /package/dist/{chunk-6EU6TCF6.js.map → chunk-V3SVMFDQ.js.map} +0 -0
- /package/dist/{chunk-NRSWLOAZ.js.map → chunk-WXIM2WS7.js.map} +0 -0
- /package/dist/{chunk-RYWFS37M.js.map → chunk-XE4BDRZD.js.map} +0 -0
- /package/dist/{claude-P3NQR6IJ.js.map → claude-LN7OWVNI.js.map} +0 -0
- /package/dist/{compile-ZS4HYRX5.js.map → compile-7ALJHZ4N.js.map} +0 -0
- /package/dist/{contribute-ORDDQGSL.js.map → contribute-5GKLK3BQ.js.map} +0 -0
- /package/dist/{dev-server-FYZ2AQIH.js.map → dev-server-7SMIB7OF.js.map} +0 -0
- /package/dist/{git-ET64COO3.js.map → git-GTLKAZRJ.js.map} +0 -0
- /package/dist/{init-GFQ5W7GK.js.map → init-ZB2RITW6.js.map} +0 -0
- /package/dist/{issues-T4ZZSPEG.js.map → issues-4UUAQ5K6.js.map} +0 -0
- /package/dist/{lint-6TQXDZ3T.js.map → lint-AAN2NZWG.js.map} +0 -0
- /package/dist/{open-5QZGXQRF.js.map → open-FXWW3VI4.js.map} +0 -0
- /package/dist/{recap-MX63HAKV.js.map → recap-OMBOKJST.js.map} +0 -0
- /package/dist/{run-O3TFNQFC.js.map → run-BBXLRIZB.js.map} +0 -0
- /package/dist/{shell-G6VC2CYR.js.map → shell-RF7LTND5.js.map} +0 -0
- /package/dist/{summary-FWHAX55O.js.map → summary-YZI25KW4.js.map} +0 -0
- /package/dist/{test-F7JNJZYP.js.map → test-SGO6I5Z7.js.map} +0 -0
- /package/dist/{test-git-BTAOIUE2.js.map → test-git-XM4TM65W.js.map} +0 -0
- /package/dist/{test-jira-CHYNV33F.js.map → test-jira-LDTOYFSD.js.map} +0 -0
- /package/dist/{test-prefix-Q6TFSU6F.js.map → test-prefix-GBO37XCN.js.map} +0 -0
- /package/dist/{test-webserver-EONCG7E7.js.map → test-webserver-NZ3JTVLL.js.map} +0 -0
- /package/dist/{vscode-VA5X4P25.js.map → vscode-6XUGHJKL.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -267,55 +267,69 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
267
267
|
}>>;
|
|
268
268
|
agents: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
269
269
|
model: z.ZodOptional<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
|
|
270
|
+
swarmModel: z.ZodOptional<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
|
|
270
271
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
271
272
|
providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["claude", "gemini", "codex"]>, z.ZodString>>;
|
|
272
273
|
review: z.ZodOptional<z.ZodBoolean>;
|
|
273
274
|
} & {
|
|
274
275
|
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
275
276
|
model: z.ZodOptional<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
|
|
277
|
+
swarmModel: z.ZodOptional<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
|
|
276
278
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
277
279
|
providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["claude", "gemini", "codex"]>, z.ZodString>>;
|
|
278
280
|
review: z.ZodOptional<z.ZodBoolean>;
|
|
279
281
|
}, "strip", z.ZodTypeAny, {
|
|
280
282
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
283
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
281
284
|
enabled?: boolean | undefined;
|
|
282
285
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
283
286
|
review?: boolean | undefined;
|
|
284
287
|
}, {
|
|
285
288
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
289
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
286
290
|
enabled?: boolean | undefined;
|
|
287
291
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
288
292
|
review?: boolean | undefined;
|
|
289
293
|
}>>>;
|
|
294
|
+
subAgentTimeout: z.ZodDefault<z.ZodNumber>;
|
|
290
295
|
}, "strip", z.ZodTypeAny, {
|
|
296
|
+
subAgentTimeout: number;
|
|
291
297
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
298
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
292
299
|
enabled?: boolean | undefined;
|
|
293
300
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
294
301
|
review?: boolean | undefined;
|
|
295
302
|
agents?: Record<string, {
|
|
296
303
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
304
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
297
305
|
enabled?: boolean | undefined;
|
|
298
306
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
299
307
|
review?: boolean | undefined;
|
|
300
308
|
}> | undefined;
|
|
301
309
|
}, {
|
|
302
310
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
311
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
303
312
|
enabled?: boolean | undefined;
|
|
304
313
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
305
314
|
review?: boolean | undefined;
|
|
306
315
|
agents?: Record<string, {
|
|
307
316
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
317
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
308
318
|
enabled?: boolean | undefined;
|
|
309
319
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
310
320
|
review?: boolean | undefined;
|
|
311
321
|
}> | undefined;
|
|
322
|
+
subAgentTimeout?: number | undefined;
|
|
312
323
|
}>>>>;
|
|
313
324
|
spin: z.ZodOptional<z.ZodObject<{
|
|
314
325
|
model: z.ZodDefault<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
|
|
326
|
+
swarmModel: z.ZodOptional<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
|
|
315
327
|
}, "strip", z.ZodTypeAny, {
|
|
316
328
|
model: "opus" | "sonnet" | "haiku";
|
|
329
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
317
330
|
}, {
|
|
318
331
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
332
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
319
333
|
}>>;
|
|
320
334
|
plan: z.ZodOptional<z.ZodObject<{
|
|
321
335
|
model: z.ZodDefault<z.ZodEnum<["sonnet", "opus", "haiku"]>>;
|
|
@@ -532,23 +546,30 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
532
546
|
git: {
|
|
533
547
|
commitTimeout: number;
|
|
534
548
|
};
|
|
549
|
+
plan?: {
|
|
550
|
+
model: "opus" | "sonnet" | "haiku";
|
|
551
|
+
planner: "claude" | "gemini" | "codex";
|
|
552
|
+
reviewer: "claude" | "gemini" | "codex" | "none";
|
|
553
|
+
} | undefined;
|
|
554
|
+
spin?: {
|
|
555
|
+
model: "opus" | "sonnet" | "haiku";
|
|
556
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
557
|
+
} | undefined;
|
|
535
558
|
agents?: Record<string, {
|
|
559
|
+
subAgentTimeout: number;
|
|
536
560
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
561
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
537
562
|
enabled?: boolean | undefined;
|
|
538
563
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
539
564
|
review?: boolean | undefined;
|
|
540
565
|
agents?: Record<string, {
|
|
541
566
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
567
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
542
568
|
enabled?: boolean | undefined;
|
|
543
569
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
544
570
|
review?: boolean | undefined;
|
|
545
571
|
}> | undefined;
|
|
546
572
|
}> | null | undefined;
|
|
547
|
-
plan?: {
|
|
548
|
-
model: "opus" | "sonnet" | "haiku";
|
|
549
|
-
planner: "claude" | "gemini" | "codex";
|
|
550
|
-
reviewer: "claude" | "gemini" | "codex" | "none";
|
|
551
|
-
} | undefined;
|
|
552
573
|
mainBranch?: string | undefined;
|
|
553
574
|
worktreePrefix?: string | undefined;
|
|
554
575
|
protectedBranches?: string[] | undefined;
|
|
@@ -582,9 +603,6 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
582
603
|
noVerify?: boolean | undefined;
|
|
583
604
|
} | undefined;
|
|
584
605
|
} | undefined;
|
|
585
|
-
spin?: {
|
|
586
|
-
model: "opus" | "sonnet" | "haiku";
|
|
587
|
-
} | undefined;
|
|
588
606
|
summary?: {
|
|
589
607
|
model: "opus" | "sonnet" | "haiku";
|
|
590
608
|
} | undefined;
|
|
@@ -638,23 +656,30 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
638
656
|
vscode: boolean;
|
|
639
657
|
} | undefined;
|
|
640
658
|
}, {
|
|
659
|
+
plan?: {
|
|
660
|
+
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
661
|
+
planner?: "claude" | "gemini" | "codex" | undefined;
|
|
662
|
+
reviewer?: "claude" | "gemini" | "codex" | "none" | undefined;
|
|
663
|
+
} | undefined;
|
|
664
|
+
spin?: {
|
|
665
|
+
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
666
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
667
|
+
} | undefined;
|
|
641
668
|
agents?: Record<string, {
|
|
642
669
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
670
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
643
671
|
enabled?: boolean | undefined;
|
|
644
672
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
645
673
|
review?: boolean | undefined;
|
|
646
674
|
agents?: Record<string, {
|
|
647
675
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
676
|
+
swarmModel?: "opus" | "sonnet" | "haiku" | undefined;
|
|
648
677
|
enabled?: boolean | undefined;
|
|
649
678
|
providers?: Partial<Record<"claude" | "gemini" | "codex", string>> | undefined;
|
|
650
679
|
review?: boolean | undefined;
|
|
651
680
|
}> | undefined;
|
|
681
|
+
subAgentTimeout?: number | undefined;
|
|
652
682
|
}> | null | undefined;
|
|
653
|
-
plan?: {
|
|
654
|
-
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
655
|
-
planner?: "claude" | "gemini" | "codex" | undefined;
|
|
656
|
-
reviewer?: "claude" | "gemini" | "codex" | "none" | undefined;
|
|
657
|
-
} | undefined;
|
|
658
683
|
mainBranch?: string | undefined;
|
|
659
684
|
sourceEnvOnStart?: boolean | undefined;
|
|
660
685
|
worktreePrefix?: string | undefined;
|
|
@@ -689,9 +714,6 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
689
714
|
generateSummary?: boolean | undefined;
|
|
690
715
|
} | undefined;
|
|
691
716
|
} | undefined;
|
|
692
|
-
spin?: {
|
|
693
|
-
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
694
|
-
} | undefined;
|
|
695
717
|
summary?: {
|
|
696
718
|
model?: "opus" | "sonnet" | "haiku" | undefined;
|
|
697
719
|
} | undefined;
|
|
@@ -829,7 +851,7 @@ declare class SettingsManager {
|
|
|
829
851
|
* @param settings - Pre-loaded settings object
|
|
830
852
|
* @returns Model shorthand ('opus', 'sonnet', or 'haiku')
|
|
831
853
|
*/
|
|
832
|
-
getSpinModel(settings?: IloomSettings): 'sonnet' | 'opus' | 'haiku';
|
|
854
|
+
getSpinModel(settings?: IloomSettings, mode?: 'swarm'): 'sonnet' | 'opus' | 'haiku';
|
|
833
855
|
/**
|
|
834
856
|
* Get the plan command model with default applied
|
|
835
857
|
* Default is defined in PlanCommandSettingsSchema
|
|
@@ -1328,6 +1350,18 @@ interface InitStartedProperties {
|
|
|
1328
1350
|
interface InitCompletedProperties {
|
|
1329
1351
|
mode: 'accept-defaults' | 'guided' | 'guided-custom-prompt';
|
|
1330
1352
|
}
|
|
1353
|
+
interface AutoSwarmStartedProperties {
|
|
1354
|
+
source: 'decomposition' | 'fresh';
|
|
1355
|
+
planner: string;
|
|
1356
|
+
}
|
|
1357
|
+
interface AutoSwarmCompletedProperties {
|
|
1358
|
+
source: 'decomposition' | 'fresh';
|
|
1359
|
+
success: boolean;
|
|
1360
|
+
child_count: number;
|
|
1361
|
+
duration_minutes: number;
|
|
1362
|
+
phase_reached: 'plan' | 'start' | 'spin';
|
|
1363
|
+
fallback_to_normal: boolean;
|
|
1364
|
+
}
|
|
1331
1365
|
interface TelemetryEventMap {
|
|
1332
1366
|
'cli.installed': CliInstalledProperties;
|
|
1333
1367
|
'cli.upgraded': CliUpgradedProperties;
|
|
@@ -1345,6 +1379,8 @@ interface TelemetryEventMap {
|
|
|
1345
1379
|
'error.occurred': ErrorOccurredProperties;
|
|
1346
1380
|
'init.started': InitStartedProperties;
|
|
1347
1381
|
'init.completed': InitCompletedProperties;
|
|
1382
|
+
'auto_swarm.started': AutoSwarmStartedProperties;
|
|
1383
|
+
'auto_swarm.completed': AutoSwarmCompletedProperties;
|
|
1348
1384
|
}
|
|
1349
1385
|
type TelemetryEventName = keyof TelemetryEventMap;
|
|
1350
1386
|
|
|
@@ -1491,6 +1527,7 @@ interface FinishOptions {
|
|
|
1491
1527
|
cleanup?: boolean;
|
|
1492
1528
|
json?: boolean;
|
|
1493
1529
|
skipToPr?: boolean;
|
|
1530
|
+
jsonStream?: boolean;
|
|
1494
1531
|
review?: boolean;
|
|
1495
1532
|
}
|
|
1496
1533
|
/**
|
|
@@ -1564,6 +1601,18 @@ interface SummaryResult {
|
|
|
1564
1601
|
branchName: string;
|
|
1565
1602
|
loomType: 'issue' | 'pr' | 'branch' | 'epic';
|
|
1566
1603
|
}
|
|
1604
|
+
interface RebaseResult {
|
|
1605
|
+
success: boolean;
|
|
1606
|
+
conflictsDetected: boolean;
|
|
1607
|
+
claudeLaunched: boolean;
|
|
1608
|
+
conflictsResolved?: boolean;
|
|
1609
|
+
error?: string;
|
|
1610
|
+
}
|
|
1611
|
+
interface RebaseOutcome {
|
|
1612
|
+
conflictsDetected: boolean;
|
|
1613
|
+
claudeLaunched: boolean;
|
|
1614
|
+
conflictsResolved: boolean;
|
|
1615
|
+
}
|
|
1567
1616
|
interface MockOptions {
|
|
1568
1617
|
scenario: 'empty' | 'existing' | 'conflicts' | 'error';
|
|
1569
1618
|
data?: unknown;
|
|
@@ -1585,6 +1634,7 @@ interface ValidationOptions {
|
|
|
1585
1634
|
skipTypecheck?: boolean;
|
|
1586
1635
|
skipLint?: boolean;
|
|
1587
1636
|
skipTests?: boolean;
|
|
1637
|
+
jsonStream?: boolean;
|
|
1588
1638
|
}
|
|
1589
1639
|
interface ValidationStepResult {
|
|
1590
1640
|
step: 'typecheck' | 'compile' | 'lint' | 'test';
|
|
@@ -1621,6 +1671,7 @@ interface MergeOptions {
|
|
|
1621
1671
|
dryRun?: boolean;
|
|
1622
1672
|
force?: boolean;
|
|
1623
1673
|
repoRoot?: string;
|
|
1674
|
+
jsonStream?: boolean;
|
|
1624
1675
|
}
|
|
1625
1676
|
interface MergeResult {
|
|
1626
1677
|
success: boolean;
|
|
@@ -1941,7 +1992,9 @@ interface TemplateVariables {
|
|
|
1941
1992
|
CHILD_ISSUES?: string;
|
|
1942
1993
|
DEPENDENCY_MAP?: string;
|
|
1943
1994
|
SWARM_MODE?: boolean;
|
|
1995
|
+
AUTO_SWARM_MODE?: boolean;
|
|
1944
1996
|
SWARM_AGENT_METADATA?: string;
|
|
1997
|
+
SWARM_SUB_AGENT_TIMEOUT_MS?: number;
|
|
1945
1998
|
NO_CLEANUP?: boolean;
|
|
1946
1999
|
ISSUE_PREFIX?: string;
|
|
1947
2000
|
}
|
|
@@ -2583,6 +2636,48 @@ declare function setThemeMode(mode: ThemeMode): void;
|
|
|
2583
2636
|
*/
|
|
2584
2637
|
declare function getThemeMode(): ThemeMode;
|
|
2585
2638
|
|
|
2639
|
+
/**
|
|
2640
|
+
* Utility class for detecting and converting Jira Wiki markup to GitHub-Flavored Markdown.
|
|
2641
|
+
* Applied at the MCP layer to prevent malformed content from reaching issue tracker providers.
|
|
2642
|
+
*
|
|
2643
|
+
* IMPORTANT: Only converts UNAMBIGUOUS Jira Wiki patterns.
|
|
2644
|
+
* Patterns that overlap with valid Markdown (e.g., *bold*, _italic_) are
|
|
2645
|
+
* intentionally NOT converted to avoid corrupting valid Markdown content.
|
|
2646
|
+
*
|
|
2647
|
+
* Safe conversions (unambiguous):
|
|
2648
|
+
* - h1. through h6. headings at line start -> # through ######
|
|
2649
|
+
* - {code}...{code} and {code:lang}...{code} -> fenced code blocks
|
|
2650
|
+
* - {quote}...{quote} -> > blockquotes
|
|
2651
|
+
* - [text|url] -> [text](url) (only when url looks like http/https)
|
|
2652
|
+
*
|
|
2653
|
+
* Intentionally NOT converted (ambiguous):
|
|
2654
|
+
* - *text* (could be Markdown italic)
|
|
2655
|
+
* - _text_ (could be Markdown italic or snake_case)
|
|
2656
|
+
*/
|
|
2657
|
+
declare class JiraWikiSanitizer {
|
|
2658
|
+
/**
|
|
2659
|
+
* Sanitize body text by converting unambiguous Jira Wiki patterns to Markdown.
|
|
2660
|
+
* Preserves content inside backtick-fenced code blocks.
|
|
2661
|
+
* Returns text unchanged if no Wiki patterns detected.
|
|
2662
|
+
*/
|
|
2663
|
+
static sanitize(text: string): string;
|
|
2664
|
+
/**
|
|
2665
|
+
* Check if text contains unambiguous Jira Wiki patterns.
|
|
2666
|
+
* Only checks for patterns that are safe to convert.
|
|
2667
|
+
*/
|
|
2668
|
+
static hasJiraWikiPatterns(text: string): boolean;
|
|
2669
|
+
/**
|
|
2670
|
+
* Split text into segments, separating existing Markdown fenced code blocks
|
|
2671
|
+
* from the rest of the content. This ensures we don't modify content inside
|
|
2672
|
+
* code blocks (e.g., Jira Wiki examples shown in a Markdown code block).
|
|
2673
|
+
*/
|
|
2674
|
+
private static splitByCodeBlocks;
|
|
2675
|
+
/**
|
|
2676
|
+
* Apply all safe Jira Wiki -> Markdown conversions to a text segment.
|
|
2677
|
+
*/
|
|
2678
|
+
private static convertSegment;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2586
2681
|
/**
|
|
2587
2682
|
* Utility class for converting HTML details/summary format to Linear's collapsible format
|
|
2588
2683
|
*
|
|
@@ -2732,4 +2827,4 @@ declare class TableFormatter {
|
|
|
2732
2827
|
static previewFormatting(headers: string[], options?: TableFormatterOptions): string;
|
|
2733
2828
|
}
|
|
2734
2829
|
|
|
2735
|
-
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 CliInstalledProperties, type CliUpgradedProperties, type ColorData, type CommitOptions, type Config, type ContributeStartedProperties, type CreateLoomInput, type DatabaseDeletionResult, DatabaseManager, type DatabaseProvider, type DemoCompletedProperties, type DemoStartedProperties, type EnhanceOptions, type EnhanceResult, type EnvFileOptions, type EnvOperationResult, type EnvVariable, EnvironmentManager, type EpicPlannedProperties, type ErrorOccurredProperties, type FeedbackOptions, type FinishOptions, type FinishResult, GitCommandError, GitHubService, type GitStatus, type GitWorktree, GitWorktreeManager, type InitCompletedProperties, type InitStartedProperties, type InstallationMethod, type Issue, type IssueTracker, IssueTrackerFactory, type IssueTrackerInputDetection, type IssueTrackerProviderType, type LaunchMode, LinearMarkupConverter, type ListOptions, type Logger, type LoggerOptions, type Loom, type LoomAbandonedProperties, type LoomCreatedProperties, type LoomFinishedProperties, type LoomSummary, type MergeOptions, type MergeResult, type MockOptions, type OneShotMode, type OperationResult, PLACEHOLDER_COMMIT_PREFIX, type PRWorktreePattern, type Platform, type PortAssignmentOptions, type ProcessInfo, type ProjectCapability, type PullRequest, type RemoteBranchStatus, type ResourceCleanupOptions, type RgbColor, type SafetyCheck, type SessionStartedProperties, type StartOptions, type StartResult, type SummaryResult, type SwarmChildCompletedProperties, type SwarmCompletedProperties, type SwarmStartedProperties, TableFormatter, type TableFormatterOptions, type TableGenerationOptions, type TelemetryConfig, type TelemetryEventMap, type TelemetryEventName, 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, fetchOrigin, findAllBranchesForIssue, findMainWorktreePath, findMainWorktreePathWithSettings, findPlaceholderCommitSha, findWorktreeForBranch, generateWorktreePath, getCurrentBranch, getDefaultBranch, getMergeTargetBranch, getRepoRoot, getThemeMode, getWorktreeRoot, hasUncommittedChanges, isBranchMergedIntoMain, isEmptyRepository, isFileGitignored, isFileTrackedByGit, isPRBranch, isPlaceholderCommit, isRemoteBranchUpToDate, isValidGitRepo, isWorktreePath, logger, parseWorktreeList, pushBranchToRemote, removePlaceholderCommitFromHead, removePlaceholderCommitFromHistory, setThemeMode };
|
|
2830
|
+
export { type AddIssueOptions, type AddIssueResult, type AutoSwarmCompletedProperties, type AutoSwarmStartedProperties, type BatchCleanupResult, type BranchCleanupTarget, type BranchDeleteOptions, type BranchGenerationOptions, type BranchNameStrategy, type Capability, type ClaudeContext, ClaudeContextManager, type CleanupOptions, type CleanupResult, type CliInstalledProperties, type CliUpgradedProperties, type ColorData, type CommitOptions, type Config, type ContributeStartedProperties, type CreateLoomInput, type DatabaseDeletionResult, DatabaseManager, type DatabaseProvider, type DemoCompletedProperties, type DemoStartedProperties, type EnhanceOptions, type EnhanceResult, type EnvFileOptions, type EnvOperationResult, type EnvVariable, EnvironmentManager, type EpicPlannedProperties, type ErrorOccurredProperties, type FeedbackOptions, type FinishOptions, type FinishResult, GitCommandError, GitHubService, type GitStatus, type GitWorktree, GitWorktreeManager, type InitCompletedProperties, type InitStartedProperties, type InstallationMethod, type Issue, type IssueTracker, IssueTrackerFactory, type IssueTrackerInputDetection, type IssueTrackerProviderType, JiraWikiSanitizer, type LaunchMode, LinearMarkupConverter, type ListOptions, type Logger, type LoggerOptions, type Loom, type LoomAbandonedProperties, type LoomCreatedProperties, type LoomFinishedProperties, type LoomSummary, type MergeOptions, type MergeResult, type MockOptions, type OneShotMode, type OperationResult, PLACEHOLDER_COMMIT_PREFIX, type PRWorktreePattern, type Platform, type PortAssignmentOptions, type ProcessInfo, type ProjectCapability, type PullRequest, type RebaseOutcome, type RebaseResult, type RemoteBranchStatus, type ResourceCleanupOptions, type RgbColor, type SafetyCheck, type SessionStartedProperties, type StartOptions, type StartResult, type SummaryResult, type SwarmChildCompletedProperties, type SwarmCompletedProperties, type SwarmStartedProperties, TableFormatter, type TableFormatterOptions, type TableGenerationOptions, type TelemetryConfig, type TelemetryEventMap, type TelemetryEventName, 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, fetchOrigin, findAllBranchesForIssue, findMainWorktreePath, findMainWorktreePathWithSettings, findPlaceholderCommitSha, findWorktreeForBranch, generateWorktreePath, getCurrentBranch, getDefaultBranch, getMergeTargetBranch, getRepoRoot, getThemeMode, getWorktreeRoot, hasUncommittedChanges, isBranchMergedIntoMain, isEmptyRepository, isFileGitignored, isFileTrackedByGit, isPRBranch, isPlaceholderCommit, isRemoteBranchUpToDate, isValidGitRepo, isWorktreePath, logger, parseWorktreeList, pushBranchToRemote, removePlaceholderCommitFromHead, removePlaceholderCommitFromHistory, setThemeMode };
|
package/dist/index.js
CHANGED
|
@@ -521,6 +521,7 @@ var init_SettingsManager = __esm({
|
|
|
521
521
|
init_logger();
|
|
522
522
|
BaseAgentSettingsSchema = z.object({
|
|
523
523
|
model: z.enum(["sonnet", "opus", "haiku"]).optional().describe("Claude model shorthand: sonnet, opus, or haiku"),
|
|
524
|
+
swarmModel: z.enum(["sonnet", "opus", "haiku"]).optional().describe("Model to use for this agent in swarm mode. Overrides the base model when running inside swarm workers."),
|
|
524
525
|
enabled: z.boolean().optional().describe("Whether this agent is enabled. Defaults to true."),
|
|
525
526
|
providers: z.record(
|
|
526
527
|
z.enum(["claude", "gemini", "codex"]),
|
|
@@ -529,10 +530,12 @@ var init_SettingsManager = __esm({
|
|
|
529
530
|
review: z.boolean().optional().describe("Whether artifacts from this agent should be reviewed before posting (defaults to false)")
|
|
530
531
|
});
|
|
531
532
|
AgentSettingsSchema = BaseAgentSettingsSchema.extend({
|
|
532
|
-
agents: z.record(z.string(), BaseAgentSettingsSchema).optional().describe("Nested per-agent
|
|
533
|
+
agents: z.record(z.string(), BaseAgentSettingsSchema).optional().describe("Nested per-agent settings. Only meaningful under the iloom-swarm-worker agent entry for sub-agent timeout configuration."),
|
|
534
|
+
subAgentTimeout: z.number().min(1, "Sub-agent timeout must be at least 1 minute").max(120, "Sub-agent timeout cannot exceed 120 minutes").default(10).describe("Timeout in minutes for sub-agent claude -p invocations in swarm mode. Applies to each phase agent (evaluator, analyzer, planner, implementer) when invoked via the Bash tool. Default: 10 minutes. Only meaningful under the iloom-swarm-worker agent entry.")
|
|
533
535
|
});
|
|
534
536
|
SpinAgentSettingsSchema = z.object({
|
|
535
|
-
model: z.enum(["sonnet", "opus", "haiku"]).default("opus").describe("Claude model shorthand for spin orchestrator")
|
|
537
|
+
model: z.enum(["sonnet", "opus", "haiku"]).default("opus").describe("Claude model shorthand for spin orchestrator"),
|
|
538
|
+
swarmModel: z.enum(["sonnet", "opus", "haiku"]).optional().describe("Model for the spin orchestrator when running in swarm mode. Overrides spin.model for swarm workflows.")
|
|
536
539
|
});
|
|
537
540
|
PlanCommandSettingsSchema = z.object({
|
|
538
541
|
model: z.enum(["sonnet", "opus", "haiku"]).default("opus").describe("Claude model shorthand for plan command"),
|
|
@@ -625,7 +628,7 @@ var init_SettingsManager = __esm({
|
|
|
625
628
|
copyGitIgnoredPatterns: z.array(z.string().min(1, "Pattern cannot be empty")).optional().describe(`Glob patterns for gitignored files to copy to looms (e.g., ["*.db", "data/*.sqlite"]). Great for local dbs and large test data files that are too big to commit to git. Note: .env (dotenv-flow) files, iloom's and claude's local settings are automatically copied and do not need to be specified here.`),
|
|
626
629
|
workflows: WorkflowsSettingsSchema.describe("Per-workflow-type permission configurations"),
|
|
627
630
|
agents: z.record(z.string(), AgentSettingsSchema).optional().nullable().describe(
|
|
628
|
-
|
|
631
|
+
"Per-agent configuration overrides. Available agents: iloom-issue-analyzer (analyzes issues), iloom-issue-planner (creates implementation plans), iloom-issue-analyze-and-plan (combined analysis and planning), iloom-issue-complexity-evaluator (evaluates complexity), iloom-issue-enhancer (enhances issue descriptions), iloom-issue-implementer (implements code changes), iloom-code-reviewer (reviews code changes against requirements), iloom-artifact-reviewer (reviews artifacts before posting), iloom-swarm-worker (swarm worker agent, dynamically generated). Use swarmModel on any agent to override its model in swarm mode."
|
|
629
632
|
),
|
|
630
633
|
spin: SpinAgentSettingsSchema.optional().describe(
|
|
631
634
|
"Spin orchestrator configuration. Model defaults to opus when not configured."
|
|
@@ -723,10 +726,11 @@ var init_SettingsManager = __esm({
|
|
|
723
726
|
copyGitIgnoredPatterns: z.array(z.string().min(1, "Pattern cannot be empty")).optional().describe(`Glob patterns for gitignored files to copy to looms (e.g., ["*.db", "data/*.sqlite"]). Great for local dbs and large test data files that are too big to commit to git. Note: .env (dotenv-flow) files, iloom's and claude's local settings are automatically copied and do not need to be specified here.`),
|
|
724
727
|
workflows: WorkflowsSettingsSchemaNoDefaults.describe("Per-workflow-type permission configurations"),
|
|
725
728
|
agents: z.record(z.string(), AgentSettingsSchema).optional().nullable().describe(
|
|
726
|
-
|
|
729
|
+
"Per-agent configuration overrides. Available agents: iloom-issue-analyzer (analyzes issues), iloom-issue-planner (creates implementation plans), iloom-issue-analyze-and-plan (combined analysis and planning), iloom-issue-complexity-evaluator (evaluates complexity), iloom-issue-enhancer (enhances issue descriptions), iloom-issue-implementer (implements code changes), iloom-code-reviewer (reviews code changes against requirements), iloom-artifact-reviewer (reviews artifacts before posting), iloom-swarm-worker (swarm worker agent, dynamically generated). Use swarmModel on any agent to override its model in swarm mode."
|
|
727
730
|
),
|
|
728
731
|
spin: z.object({
|
|
729
|
-
model: z.enum(["sonnet", "opus", "haiku"]).optional()
|
|
732
|
+
model: z.enum(["sonnet", "opus", "haiku"]).optional(),
|
|
733
|
+
swarmModel: z.enum(["sonnet", "opus", "haiku"]).optional()
|
|
730
734
|
}).optional().describe("Spin orchestrator configuration"),
|
|
731
735
|
plan: z.object({
|
|
732
736
|
model: z.enum(["sonnet", "opus", "haiku"]).optional(),
|
|
@@ -998,9 +1002,15 @@ ${errorMessages.join("\n")}`
|
|
|
998
1002
|
* @param settings - Pre-loaded settings object
|
|
999
1003
|
* @returns Model shorthand ('opus', 'sonnet', or 'haiku')
|
|
1000
1004
|
*/
|
|
1001
|
-
getSpinModel(settings) {
|
|
1002
|
-
var _a;
|
|
1003
|
-
|
|
1005
|
+
getSpinModel(settings, mode) {
|
|
1006
|
+
var _a, _b;
|
|
1007
|
+
if (mode === "swarm") {
|
|
1008
|
+
if ((_a = settings == null ? void 0 : settings.spin) == null ? void 0 : _a.swarmModel) {
|
|
1009
|
+
return settings.spin.swarmModel;
|
|
1010
|
+
}
|
|
1011
|
+
return "opus";
|
|
1012
|
+
}
|
|
1013
|
+
return ((_b = settings == null ? void 0 : settings.spin) == null ? void 0 : _b.model) ?? SpinAgentSettingsSchema.parse({}).model;
|
|
1004
1014
|
}
|
|
1005
1015
|
/**
|
|
1006
1016
|
* Get the plan command model with default applied
|
|
@@ -5066,7 +5076,7 @@ function parseJsonStreamOutput(output) {
|
|
|
5066
5076
|
}
|
|
5067
5077
|
}
|
|
5068
5078
|
async function launchClaude(prompt, options = {}) {
|
|
5069
|
-
const { model, permissionMode, addDir, headless = false, appendSystemPrompt, mcpConfig, allowedTools, disallowedTools, agents, sessionId, noSessionPersistence, outputFormat, verbose, jsonMode, env: extraEnv } = options;
|
|
5079
|
+
const { model, permissionMode, addDir, headless = false, appendSystemPrompt, mcpConfig, allowedTools, disallowedTools, agents, sessionId, noSessionPersistence, outputFormat, verbose, jsonMode, passthroughStdout, env: extraEnv, signal } = options;
|
|
5070
5080
|
const log = getLogger();
|
|
5071
5081
|
const args = [];
|
|
5072
5082
|
if (headless) {
|
|
@@ -5111,7 +5121,36 @@ async function launchClaude(prompt, options = {}) {
|
|
|
5111
5121
|
args.push("--no-session-persistence");
|
|
5112
5122
|
}
|
|
5113
5123
|
const claudeEnv = { ...process.env, CLAUDECODE: "0" };
|
|
5124
|
+
function attachAbortSignal(subprocess) {
|
|
5125
|
+
if (!signal) return;
|
|
5126
|
+
const onAbort = () => {
|
|
5127
|
+
subprocess.kill("SIGTERM");
|
|
5128
|
+
};
|
|
5129
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
5130
|
+
subprocess.on("exit", () => {
|
|
5131
|
+
signal.removeEventListener("abort", onAbort);
|
|
5132
|
+
});
|
|
5133
|
+
}
|
|
5114
5134
|
try {
|
|
5135
|
+
if (headless && passthroughStdout) {
|
|
5136
|
+
const subprocess = execa4("claude", args, {
|
|
5137
|
+
input: prompt,
|
|
5138
|
+
timeout: 0,
|
|
5139
|
+
...addDir && { cwd: addDir },
|
|
5140
|
+
env: { ...claudeEnv, ...extraEnv },
|
|
5141
|
+
// CLAUDECODE=0 + any extra env vars
|
|
5142
|
+
stdio: ["pipe", "inherit", "pipe"]
|
|
5143
|
+
// stdin: pipe (for prompt), stdout: inherit (passthrough), stderr: pipe (capture errors)
|
|
5144
|
+
});
|
|
5145
|
+
attachAbortSignal(subprocess);
|
|
5146
|
+
try {
|
|
5147
|
+
await subprocess;
|
|
5148
|
+
} catch (err) {
|
|
5149
|
+
if (signal == null ? void 0 : signal.aborted) return;
|
|
5150
|
+
throw err;
|
|
5151
|
+
}
|
|
5152
|
+
return;
|
|
5153
|
+
}
|
|
5115
5154
|
if (headless) {
|
|
5116
5155
|
const isDebugMode = logger.isDebugEnabled();
|
|
5117
5156
|
const execaOptions = {
|
|
@@ -5127,6 +5166,7 @@ async function launchClaude(prompt, options = {}) {
|
|
|
5127
5166
|
// Enable streaming in debug mode
|
|
5128
5167
|
};
|
|
5129
5168
|
const subprocess = execa4("claude", args, execaOptions);
|
|
5169
|
+
attachAbortSignal(subprocess);
|
|
5130
5170
|
const isJsonStreamFormat = args.includes("--output-format") && args.includes("stream-json");
|
|
5131
5171
|
let outputBuffer = "";
|
|
5132
5172
|
let isStreaming = false;
|
|
@@ -5151,7 +5191,13 @@ async function launchClaude(prompt, options = {}) {
|
|
|
5151
5191
|
}
|
|
5152
5192
|
});
|
|
5153
5193
|
}
|
|
5154
|
-
|
|
5194
|
+
let result;
|
|
5195
|
+
try {
|
|
5196
|
+
result = await subprocess;
|
|
5197
|
+
} catch (subprocessError) {
|
|
5198
|
+
if (signal == null ? void 0 : signal.aborted) return;
|
|
5199
|
+
throw subprocessError;
|
|
5200
|
+
}
|
|
5155
5201
|
if (isStreaming) {
|
|
5156
5202
|
const rawOutput = outputBuffer.trim();
|
|
5157
5203
|
if (!isDebugMode && !jsonMode) {
|
|
@@ -5173,7 +5219,7 @@ async function launchClaude(prompt, options = {}) {
|
|
|
5173
5219
|
}
|
|
5174
5220
|
} else {
|
|
5175
5221
|
try {
|
|
5176
|
-
|
|
5222
|
+
const interactiveSubprocess = execa4("claude", [...args, "--", prompt], {
|
|
5177
5223
|
...addDir && { cwd: addDir },
|
|
5178
5224
|
stdio: ["inherit", "inherit", "pipe"],
|
|
5179
5225
|
// Capture stderr to detect session conflicts
|
|
@@ -5183,10 +5229,18 @@ async function launchClaude(prompt, options = {}) {
|
|
|
5183
5229
|
env: { ...claudeEnv, ...extraEnv }
|
|
5184
5230
|
// CLAUDECODE=0 + any extra env vars
|
|
5185
5231
|
});
|
|
5232
|
+
attachAbortSignal(interactiveSubprocess);
|
|
5233
|
+
try {
|
|
5234
|
+
await interactiveSubprocess;
|
|
5235
|
+
} catch (err) {
|
|
5236
|
+
if (signal == null ? void 0 : signal.aborted) return;
|
|
5237
|
+
throw err;
|
|
5238
|
+
}
|
|
5186
5239
|
return;
|
|
5187
5240
|
} catch (interactiveError) {
|
|
5241
|
+
if (signal == null ? void 0 : signal.aborted) return;
|
|
5188
5242
|
const interactiveExecaError = interactiveError;
|
|
5189
|
-
const interactiveErrorMessage = interactiveExecaError.stderr
|
|
5243
|
+
const interactiveErrorMessage = interactiveExecaError.stderr || interactiveExecaError.message || "";
|
|
5190
5244
|
const sessionMatch = interactiveErrorMessage.match(/Session ID ([0-9a-f-]+) is already in use/i);
|
|
5191
5245
|
const conflictSessionId = sessionMatch == null ? void 0 : sessionMatch[1];
|
|
5192
5246
|
if (sessionMatch && sessionId && conflictSessionId) {
|
|
@@ -5197,21 +5251,29 @@ async function launchClaude(prompt, options = {}) {
|
|
|
5197
5251
|
return true;
|
|
5198
5252
|
});
|
|
5199
5253
|
resumeArgs.push("--resume", conflictSessionId);
|
|
5200
|
-
|
|
5254
|
+
const resumeSubprocess = execa4("claude", resumeArgs, {
|
|
5201
5255
|
...addDir && { cwd: addDir },
|
|
5202
5256
|
stdio: "inherit",
|
|
5203
5257
|
timeout: 0,
|
|
5204
5258
|
verbose: logger.isDebugEnabled(),
|
|
5205
5259
|
env: claudeEnv
|
|
5206
5260
|
});
|
|
5261
|
+
attachAbortSignal(resumeSubprocess);
|
|
5262
|
+
try {
|
|
5263
|
+
await resumeSubprocess;
|
|
5264
|
+
} catch (err) {
|
|
5265
|
+
if (signal == null ? void 0 : signal.aborted) return;
|
|
5266
|
+
throw err;
|
|
5267
|
+
}
|
|
5207
5268
|
return;
|
|
5208
5269
|
}
|
|
5209
5270
|
throw interactiveError;
|
|
5210
5271
|
}
|
|
5211
5272
|
}
|
|
5212
5273
|
} catch (error) {
|
|
5274
|
+
if (signal == null ? void 0 : signal.aborted) return;
|
|
5213
5275
|
const execaError = error;
|
|
5214
|
-
const errorMessage = execaError.stderr
|
|
5276
|
+
const errorMessage = execaError.stderr || execaError.message || "Unknown Claude CLI error";
|
|
5215
5277
|
const sessionInUseMatch = errorMessage.match(/Session ID ([0-9a-f-]+) is already in use/i);
|
|
5216
5278
|
const extractedSessionId = sessionInUseMatch == null ? void 0 : sessionInUseMatch[1];
|
|
5217
5279
|
if (sessionInUseMatch && sessionId && extractedSessionId) {
|
|
@@ -5290,7 +5352,7 @@ async function launchClaude(prompt, options = {}) {
|
|
|
5290
5352
|
}
|
|
5291
5353
|
} catch (retryError) {
|
|
5292
5354
|
const retryExecaError = retryError;
|
|
5293
|
-
const retryErrorMessage = retryExecaError.stderr
|
|
5355
|
+
const retryErrorMessage = retryExecaError.stderr || retryExecaError.message || "Unknown Claude CLI error";
|
|
5294
5356
|
throw new Error(`Claude CLI error: ${retryErrorMessage}`);
|
|
5295
5357
|
}
|
|
5296
5358
|
}
|
|
@@ -5578,6 +5640,108 @@ var UserAbortedCommitError = class extends Error {
|
|
|
5578
5640
|
// src/utils/index.ts
|
|
5579
5641
|
init_logger();
|
|
5580
5642
|
|
|
5643
|
+
// src/utils/jira-wiki-sanitizer.ts
|
|
5644
|
+
var JiraWikiSanitizer = class {
|
|
5645
|
+
/**
|
|
5646
|
+
* Sanitize body text by converting unambiguous Jira Wiki patterns to Markdown.
|
|
5647
|
+
* Preserves content inside backtick-fenced code blocks.
|
|
5648
|
+
* Returns text unchanged if no Wiki patterns detected.
|
|
5649
|
+
*/
|
|
5650
|
+
static sanitize(text) {
|
|
5651
|
+
if (!text) {
|
|
5652
|
+
return "";
|
|
5653
|
+
}
|
|
5654
|
+
const segments = this.splitByCodeBlocks(text);
|
|
5655
|
+
const converted = segments.map((segment) => {
|
|
5656
|
+
if (segment.isCode) {
|
|
5657
|
+
return segment.text;
|
|
5658
|
+
}
|
|
5659
|
+
return this.convertSegment(segment.text);
|
|
5660
|
+
});
|
|
5661
|
+
return converted.join("");
|
|
5662
|
+
}
|
|
5663
|
+
/**
|
|
5664
|
+
* Check if text contains unambiguous Jira Wiki patterns.
|
|
5665
|
+
* Only checks for patterns that are safe to convert.
|
|
5666
|
+
*/
|
|
5667
|
+
static hasJiraWikiPatterns(text) {
|
|
5668
|
+
if (!text) {
|
|
5669
|
+
return false;
|
|
5670
|
+
}
|
|
5671
|
+
if (/^h[1-6]\.\s+/m.test(text)) {
|
|
5672
|
+
return true;
|
|
5673
|
+
}
|
|
5674
|
+
if (/\{code(?::[^}]*)?\}/i.test(text)) {
|
|
5675
|
+
return true;
|
|
5676
|
+
}
|
|
5677
|
+
if (/\{quote\}/i.test(text)) {
|
|
5678
|
+
return true;
|
|
5679
|
+
}
|
|
5680
|
+
if (/\[[^\]|]+\|https?:\/\/[^\]]+\]/.test(text)) {
|
|
5681
|
+
return true;
|
|
5682
|
+
}
|
|
5683
|
+
return false;
|
|
5684
|
+
}
|
|
5685
|
+
/**
|
|
5686
|
+
* Split text into segments, separating existing Markdown fenced code blocks
|
|
5687
|
+
* from the rest of the content. This ensures we don't modify content inside
|
|
5688
|
+
* code blocks (e.g., Jira Wiki examples shown in a Markdown code block).
|
|
5689
|
+
*/
|
|
5690
|
+
static splitByCodeBlocks(text) {
|
|
5691
|
+
const segments = [];
|
|
5692
|
+
const codeBlockRegex = /^(`{3,})[^\n]*\n[\s\S]*?^\1\s*$/gm;
|
|
5693
|
+
let lastIndex = 0;
|
|
5694
|
+
for (const match of text.matchAll(codeBlockRegex)) {
|
|
5695
|
+
const matchStart = match.index ?? 0;
|
|
5696
|
+
if (matchStart > lastIndex) {
|
|
5697
|
+
segments.push({ text: text.slice(lastIndex, matchStart), isCode: false });
|
|
5698
|
+
}
|
|
5699
|
+
segments.push({ text: match[0], isCode: true });
|
|
5700
|
+
lastIndex = matchStart + match[0].length;
|
|
5701
|
+
}
|
|
5702
|
+
if (lastIndex < text.length) {
|
|
5703
|
+
segments.push({ text: text.slice(lastIndex), isCode: false });
|
|
5704
|
+
}
|
|
5705
|
+
return segments;
|
|
5706
|
+
}
|
|
5707
|
+
/**
|
|
5708
|
+
* Apply all safe Jira Wiki -> Markdown conversions to a text segment.
|
|
5709
|
+
*/
|
|
5710
|
+
static convertSegment(text) {
|
|
5711
|
+
let result = text;
|
|
5712
|
+
result = result.replace(/^h([1-6])\.\s+(.*?)$/gm, (_match, level, content) => {
|
|
5713
|
+
const hashes = "#".repeat(parseInt(level, 10));
|
|
5714
|
+
return `${hashes} ${content}`;
|
|
5715
|
+
});
|
|
5716
|
+
result = result.replace(
|
|
5717
|
+
/\{code:([^}]+)\}\s*\n([\s\S]*?)\n?\s*\{code\}/gi,
|
|
5718
|
+
(_match, lang, content) => {
|
|
5719
|
+
return "```" + lang.trim() + "\n" + content + "\n```";
|
|
5720
|
+
}
|
|
5721
|
+
);
|
|
5722
|
+
result = result.replace(
|
|
5723
|
+
/\{code\}\s*\n([\s\S]*?)\n?\s*\{code\}/gi,
|
|
5724
|
+
(_match, content) => {
|
|
5725
|
+
return "```\n" + content + "\n```";
|
|
5726
|
+
}
|
|
5727
|
+
);
|
|
5728
|
+
result = result.replace(
|
|
5729
|
+
/\{quote\}\s*\n([\s\S]*?)\n?\s*\{quote\}/gi,
|
|
5730
|
+
(_match, content) => {
|
|
5731
|
+
const lines = content.split("\n");
|
|
5732
|
+
return lines.map((line) => `> ${line}`).join("\n");
|
|
5733
|
+
}
|
|
5734
|
+
);
|
|
5735
|
+
result = result.replace(
|
|
5736
|
+
/\[([^\]|]+)\|(https?:\/\/[^\]]+)\]/g,
|
|
5737
|
+
(_match, linkText, url) => {
|
|
5738
|
+
return `[${linkText}](${url})`;
|
|
5739
|
+
}
|
|
5740
|
+
);
|
|
5741
|
+
return result;
|
|
5742
|
+
}
|
|
5743
|
+
};
|
|
5744
|
+
|
|
5581
5745
|
// src/utils/linear-markup-converter.ts
|
|
5582
5746
|
import { appendFileSync } from "fs";
|
|
5583
5747
|
import { join as join2, dirname, basename, extname } from "path";
|
|
@@ -5886,6 +6050,7 @@ export {
|
|
|
5886
6050
|
GitHubService,
|
|
5887
6051
|
GitWorktreeManager,
|
|
5888
6052
|
IssueTrackerFactory,
|
|
6053
|
+
JiraWikiSanitizer,
|
|
5889
6054
|
LinearMarkupConverter,
|
|
5890
6055
|
PLACEHOLDER_COMMIT_PREFIX,
|
|
5891
6056
|
TableFormatter,
|