@iloom/cli 0.2.0 → 0.3.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.
- package/README.md +234 -667
- package/dist/BranchNamingService-OMWKUYMM.js +13 -0
- package/dist/ClaudeContextManager-3VXA6UPR.js +13 -0
- package/dist/ClaudeService-6CPK43N4.js +12 -0
- package/dist/GitHubService-EBOETDIW.js +11 -0
- package/dist/{LoomLauncher-CTSWJL35.js → LoomLauncher-JF7JZMTZ.js} +63 -32
- package/dist/LoomLauncher-JF7JZMTZ.js.map +1 -0
- package/dist/ProjectCapabilityDetector-34LU7JJ4.js +9 -0
- package/dist/{PromptTemplateManager-WII75TKH.js → PromptTemplateManager-A52RUAMS.js} +2 -2
- package/dist/README.md +234 -667
- package/dist/{SettingsManager-XOYCLH3D.js → SettingsManager-ZCWJ56WP.js} +12 -4
- package/dist/SettingsMigrationManager-AGIIIPDQ.js +10 -0
- package/dist/agents/iloom-issue-analyze-and-plan.md +125 -35
- package/dist/agents/iloom-issue-analyzer.md +284 -32
- package/dist/agents/iloom-issue-complexity-evaluator.md +40 -21
- package/dist/agents/iloom-issue-enhancer.md +69 -48
- package/dist/agents/iloom-issue-implementer.md +36 -25
- package/dist/agents/iloom-issue-planner.md +35 -24
- package/dist/agents/iloom-issue-reviewer.md +62 -9
- package/dist/{chunk-SWCRXDZC.js → chunk-3RUPPQRG.js} +1 -18
- package/dist/chunk-3RUPPQRG.js.map +1 -0
- package/dist/{chunk-HBVFXN7R.js → chunk-4BGK7T6X.js} +26 -3
- package/dist/chunk-4BGK7T6X.js.map +1 -0
- package/dist/{chunk-6LEQW46Y.js → chunk-4E4LD3QR.js} +72 -2
- package/dist/{chunk-6LEQW46Y.js.map → chunk-4E4LD3QR.js.map} +1 -1
- package/dist/{chunk-CWR2SANQ.js → chunk-EBISESAP.js} +1 -1
- package/dist/{chunk-TS6DL67T.js → chunk-G2IEYOLQ.js} +11 -38
- package/dist/chunk-G2IEYOLQ.js.map +1 -0
- package/dist/chunk-HBYZH6GD.js +1989 -0
- package/dist/chunk-HBYZH6GD.js.map +1 -0
- package/dist/chunk-INW24J2W.js +55 -0
- package/dist/chunk-INW24J2W.js.map +1 -0
- package/dist/{chunk-ZMNQBJUI.js → chunk-IP7SMKIF.js} +61 -22
- package/dist/chunk-IP7SMKIF.js.map +1 -0
- package/dist/{chunk-4IV6W4U5.js → chunk-IXKLYTWO.js} +12 -12
- package/dist/chunk-IXKLYTWO.js.map +1 -0
- package/dist/{chunk-JNKJ7NJV.js → chunk-JKXJ7BGL.js} +6 -2
- package/dist/{chunk-JNKJ7NJV.js.map → chunk-JKXJ7BGL.js.map} +1 -1
- package/dist/{chunk-LAPY6NAE.js → chunk-JQFO7QQN.js} +68 -12
- package/dist/{chunk-LAPY6NAE.js.map → chunk-JQFO7QQN.js.map} +1 -1
- package/dist/{SettingsMigrationManager-MTQIMI54.js → chunk-KLBYVHPK.js} +3 -2
- package/dist/{chunk-USVVV3FP.js → chunk-MKWYLDFK.js} +5 -5
- package/dist/chunk-O5OH5MRX.js +396 -0
- package/dist/chunk-O5OH5MRX.js.map +1 -0
- package/dist/{chunk-DJUGYNQE.js → chunk-PA6Q6AWM.js} +16 -3
- package/dist/chunk-PA6Q6AWM.js.map +1 -0
- package/dist/chunk-RO26VS3W.js +444 -0
- package/dist/chunk-RO26VS3W.js.map +1 -0
- package/dist/{chunk-VETG35MF.js → chunk-TSKY3JI7.js} +3 -3
- package/dist/{chunk-VETG35MF.js.map → chunk-TSKY3JI7.js.map} +1 -1
- package/dist/{chunk-LHP6ROUM.js → chunk-U5QDY7ZD.js} +4 -16
- package/dist/chunk-U5QDY7ZD.js.map +1 -0
- package/dist/{chunk-SPYPLHMK.js → chunk-VU3QMIP2.js} +34 -2
- package/dist/chunk-VU3QMIP2.js.map +1 -0
- package/dist/{chunk-PVAVNJKS.js → chunk-WEN5C5DM.js} +10 -1
- package/dist/chunk-WEN5C5DM.js.map +1 -0
- package/dist/{chunk-2PLUQT6J.js → chunk-XPKDPZ5D.js} +2 -2
- package/dist/{chunk-RF2YI2XJ.js → chunk-ZBQVSHVT.js} +5 -5
- package/dist/chunk-ZBQVSHVT.js.map +1 -0
- package/dist/{chunk-GZP4UGGM.js → chunk-ZM3CFL5L.js} +2 -2
- package/dist/{chunk-BLCTGFZN.js → chunk-ZT3YZB4K.js} +3 -4
- package/dist/chunk-ZT3YZB4K.js.map +1 -0
- package/dist/{chunk-MFU53H6J.js → chunk-ZWFBBPJI.js} +6 -6
- package/dist/{chunk-MFU53H6J.js.map → chunk-ZWFBBPJI.js.map} +1 -1
- package/dist/{claude-ZIWDG4XG.js → claude-LUZ35IMK.js} +2 -2
- package/dist/{cleanup-FEIVZSIV.js → cleanup-3MONU4PU.js} +88 -27
- package/dist/cleanup-3MONU4PU.js.map +1 -0
- package/dist/cli.js +2511 -62
- package/dist/cli.js.map +1 -1
- package/dist/{contribute-EMZKCAC6.js → contribute-UWJAGIG7.js} +6 -6
- package/dist/{feedback-LFNMQBAZ.js → feedback-W3BXTGIM.js} +15 -14
- package/dist/{feedback-LFNMQBAZ.js.map → feedback-W3BXTGIM.js.map} +1 -1
- package/dist/{git-WC6HZLOT.js → git-34Z6QVDS.js} +4 -2
- package/dist/{ignite-MQWVJEAB.js → ignite-KVJEFXNO.js} +32 -27
- package/dist/ignite-KVJEFXNO.js.map +1 -0
- package/dist/index.d.ts +359 -45
- package/dist/index.js +1267 -503
- package/dist/index.js.map +1 -1
- package/dist/{init-GJDYN2IK.js → init-L55Q73H4.js} +104 -40
- package/dist/init-L55Q73H4.js.map +1 -0
- package/dist/mcp/issue-management-server.js +934 -0
- package/dist/mcp/issue-management-server.js.map +1 -0
- package/dist/{neon-helpers-ZVIRPKCI.js → neon-helpers-WPUACUVC.js} +3 -3
- package/dist/neon-helpers-WPUACUVC.js.map +1 -0
- package/dist/{open-NXSN7XOC.js → open-LNRZL3UU.js} +39 -36
- package/dist/open-LNRZL3UU.js.map +1 -0
- package/dist/{prompt-ANTQWHUF.js → prompt-7INJ7YRU.js} +4 -2
- package/dist/prompt-7INJ7YRU.js.map +1 -0
- package/dist/prompts/init-prompt.txt +541 -98
- package/dist/prompts/issue-prompt.txt +27 -27
- package/dist/{rebase-DUNFOJVS.js → rebase-C4WNCVGM.js} +6 -6
- package/dist/{remote-ZCXJVVNW.js → remote-VUNCQZ6J.js} +3 -2
- package/dist/remote-VUNCQZ6J.js.map +1 -0
- package/dist/{run-O7ZK7CKA.js → run-IOGNIOYN.js} +39 -36
- package/dist/run-IOGNIOYN.js.map +1 -0
- package/dist/schema/settings.schema.json +59 -3
- package/dist/{test-git-T76HOTIA.js → test-git-J7I5MFYH.js} +3 -3
- package/dist/{test-prefix-6HJUVQMH.js → test-prefix-ZCONBCBX.js} +3 -3
- package/dist/{test-webserver-M2I3EV4J.js → test-webserver-DAHONWCS.js} +4 -4
- package/dist/test-webserver-DAHONWCS.js.map +1 -0
- package/package.json +3 -2
- package/dist/ClaudeContextManager-LVCYRM6Q.js +0 -13
- package/dist/ClaudeService-WVTWB3DK.js +0 -12
- package/dist/GitHubService-7E2S5NNZ.js +0 -11
- package/dist/LoomLauncher-CTSWJL35.js.map +0 -1
- package/dist/add-issue-OBI325W7.js +0 -69
- package/dist/add-issue-OBI325W7.js.map +0 -1
- package/dist/chunk-4IV6W4U5.js.map +0 -1
- package/dist/chunk-BLCTGFZN.js.map +0 -1
- package/dist/chunk-CVLAZRNB.js +0 -54
- package/dist/chunk-CVLAZRNB.js.map +0 -1
- package/dist/chunk-DJUGYNQE.js.map +0 -1
- package/dist/chunk-H4E4THUZ.js +0 -55
- package/dist/chunk-H4E4THUZ.js.map +0 -1
- package/dist/chunk-H5LDRGVK.js +0 -642
- package/dist/chunk-H5LDRGVK.js.map +0 -1
- package/dist/chunk-HBVFXN7R.js.map +0 -1
- package/dist/chunk-LHP6ROUM.js.map +0 -1
- package/dist/chunk-PVAVNJKS.js.map +0 -1
- package/dist/chunk-RF2YI2XJ.js.map +0 -1
- package/dist/chunk-SPYPLHMK.js.map +0 -1
- package/dist/chunk-SWCRXDZC.js.map +0 -1
- package/dist/chunk-SYOSCMIT.js +0 -545
- package/dist/chunk-SYOSCMIT.js.map +0 -1
- package/dist/chunk-T3KEIB4D.js +0 -243
- package/dist/chunk-T3KEIB4D.js.map +0 -1
- package/dist/chunk-TS6DL67T.js.map +0 -1
- package/dist/chunk-ZMNQBJUI.js.map +0 -1
- package/dist/cleanup-FEIVZSIV.js.map +0 -1
- package/dist/enhance-MNA4ZGXW.js +0 -176
- package/dist/enhance-MNA4ZGXW.js.map +0 -1
- package/dist/finish-TX5CJICB.js +0 -1749
- package/dist/finish-TX5CJICB.js.map +0 -1
- package/dist/ignite-MQWVJEAB.js.map +0 -1
- package/dist/init-GJDYN2IK.js.map +0 -1
- package/dist/mcp/chunk-6SDFJ42P.js +0 -62
- package/dist/mcp/chunk-6SDFJ42P.js.map +0 -1
- package/dist/mcp/claude-NDFOCQQQ.js +0 -249
- package/dist/mcp/claude-NDFOCQQQ.js.map +0 -1
- package/dist/mcp/color-QS5BFCNN.js +0 -168
- package/dist/mcp/color-QS5BFCNN.js.map +0 -1
- package/dist/mcp/github-comment-server.js +0 -168
- package/dist/mcp/github-comment-server.js.map +0 -1
- package/dist/mcp/terminal-OMNRFWB3.js +0 -227
- package/dist/mcp/terminal-OMNRFWB3.js.map +0 -1
- package/dist/open-NXSN7XOC.js.map +0 -1
- package/dist/run-O7ZK7CKA.js.map +0 -1
- package/dist/start-73I5W7WW.js +0 -983
- package/dist/start-73I5W7WW.js.map +0 -1
- package/dist/test-webserver-M2I3EV4J.js.map +0 -1
- /package/dist/{ClaudeContextManager-LVCYRM6Q.js.map → BranchNamingService-OMWKUYMM.js.map} +0 -0
- /package/dist/{ClaudeService-WVTWB3DK.js.map → ClaudeContextManager-3VXA6UPR.js.map} +0 -0
- /package/dist/{GitHubService-7E2S5NNZ.js.map → ClaudeService-6CPK43N4.js.map} +0 -0
- /package/dist/{PromptTemplateManager-WII75TKH.js.map → GitHubService-EBOETDIW.js.map} +0 -0
- /package/dist/{SettingsManager-XOYCLH3D.js.map → ProjectCapabilityDetector-34LU7JJ4.js.map} +0 -0
- /package/dist/{claude-ZIWDG4XG.js.map → PromptTemplateManager-A52RUAMS.js.map} +0 -0
- /package/dist/{git-WC6HZLOT.js.map → SettingsManager-ZCWJ56WP.js.map} +0 -0
- /package/dist/{neon-helpers-ZVIRPKCI.js.map → SettingsMigrationManager-AGIIIPDQ.js.map} +0 -0
- /package/dist/{chunk-CWR2SANQ.js.map → chunk-EBISESAP.js.map} +0 -0
- /package/dist/{SettingsMigrationManager-MTQIMI54.js.map → chunk-KLBYVHPK.js.map} +0 -0
- /package/dist/{chunk-USVVV3FP.js.map → chunk-MKWYLDFK.js.map} +0 -0
- /package/dist/{chunk-2PLUQT6J.js.map → chunk-XPKDPZ5D.js.map} +0 -0
- /package/dist/{chunk-GZP4UGGM.js.map → chunk-ZM3CFL5L.js.map} +0 -0
- /package/dist/{prompt-ANTQWHUF.js.map → claude-LUZ35IMK.js.map} +0 -0
- /package/dist/{contribute-EMZKCAC6.js.map → contribute-UWJAGIG7.js.map} +0 -0
- /package/dist/{remote-ZCXJVVNW.js.map → git-34Z6QVDS.js.map} +0 -0
- /package/dist/{rebase-DUNFOJVS.js.map → rebase-C4WNCVGM.js.map} +0 -0
- /package/dist/{test-git-T76HOTIA.js.map → test-git-J7I5MFYH.js.map} +0 -0
- /package/dist/{test-prefix-6HJUVQMH.js.map → test-prefix-ZCONBCBX.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -128,6 +128,7 @@ interface WorktreeCleanupOptions {
|
|
|
128
128
|
*/
|
|
129
129
|
declare const IloomSettingsSchema: z.ZodObject<{
|
|
130
130
|
mainBranch: z.ZodOptional<z.ZodString>;
|
|
131
|
+
sourceEnvOnStart: z.ZodDefault<z.ZodBoolean>;
|
|
131
132
|
worktreePrefix: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
132
133
|
protectedBranches: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
133
134
|
workflows: z.ZodOptional<z.ZodObject<{
|
|
@@ -308,6 +309,7 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
308
309
|
} | undefined;
|
|
309
310
|
}>>;
|
|
310
311
|
issueManagement: z.ZodOptional<z.ZodObject<{
|
|
312
|
+
provider: z.ZodDefault<z.ZodOptional<z.ZodEnum<["github", "linear"]>>>;
|
|
311
313
|
github: z.ZodOptional<z.ZodObject<{
|
|
312
314
|
remote: z.ZodString;
|
|
313
315
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -315,14 +317,39 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
315
317
|
}, {
|
|
316
318
|
remote: string;
|
|
317
319
|
}>>;
|
|
320
|
+
linear: z.ZodOptional<z.ZodObject<{
|
|
321
|
+
teamId: z.ZodString;
|
|
322
|
+
branchFormat: z.ZodOptional<z.ZodString>;
|
|
323
|
+
apiToken: z.ZodOptional<z.ZodString>;
|
|
324
|
+
}, "strip", z.ZodTypeAny, {
|
|
325
|
+
teamId: string;
|
|
326
|
+
branchFormat?: string | undefined;
|
|
327
|
+
apiToken?: string | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
teamId: string;
|
|
330
|
+
branchFormat?: string | undefined;
|
|
331
|
+
apiToken?: string | undefined;
|
|
332
|
+
}>>;
|
|
318
333
|
}, "strip", z.ZodTypeAny, {
|
|
334
|
+
provider: "github" | "linear";
|
|
319
335
|
github?: {
|
|
320
336
|
remote: string;
|
|
321
337
|
} | undefined;
|
|
338
|
+
linear?: {
|
|
339
|
+
teamId: string;
|
|
340
|
+
branchFormat?: string | undefined;
|
|
341
|
+
apiToken?: string | undefined;
|
|
342
|
+
} | undefined;
|
|
322
343
|
}, {
|
|
323
344
|
github?: {
|
|
324
345
|
remote: string;
|
|
325
346
|
} | undefined;
|
|
347
|
+
linear?: {
|
|
348
|
+
teamId: string;
|
|
349
|
+
branchFormat?: string | undefined;
|
|
350
|
+
apiToken?: string | undefined;
|
|
351
|
+
} | undefined;
|
|
352
|
+
provider?: "github" | "linear" | undefined;
|
|
326
353
|
}>>;
|
|
327
354
|
mergeBehavior: z.ZodOptional<z.ZodObject<{
|
|
328
355
|
mode: z.ZodDefault<z.ZodEnum<["local", "github-pr"]>>;
|
|
@@ -334,7 +361,15 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
334
361
|
remote?: string | undefined;
|
|
335
362
|
mode?: "local" | "github-pr" | undefined;
|
|
336
363
|
}>>;
|
|
364
|
+
ide: z.ZodOptional<z.ZodObject<{
|
|
365
|
+
type: z.ZodDefault<z.ZodEnum<["vscode", "cursor", "webstorm", "sublime", "intellij", "windsurf"]>>;
|
|
366
|
+
}, "strip", z.ZodTypeAny, {
|
|
367
|
+
type: "vscode" | "cursor" | "webstorm" | "sublime" | "intellij" | "windsurf";
|
|
368
|
+
}, {
|
|
369
|
+
type?: "vscode" | "cursor" | "webstorm" | "sublime" | "intellij" | "windsurf" | undefined;
|
|
370
|
+
}>>;
|
|
337
371
|
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
sourceEnvOnStart: boolean;
|
|
338
373
|
mainBranch?: string | undefined;
|
|
339
374
|
worktreePrefix?: string | undefined;
|
|
340
375
|
protectedBranches?: string[] | undefined;
|
|
@@ -382,16 +417,26 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
382
417
|
} | undefined;
|
|
383
418
|
} | undefined;
|
|
384
419
|
issueManagement?: {
|
|
420
|
+
provider: "github" | "linear";
|
|
385
421
|
github?: {
|
|
386
422
|
remote: string;
|
|
387
423
|
} | undefined;
|
|
424
|
+
linear?: {
|
|
425
|
+
teamId: string;
|
|
426
|
+
branchFormat?: string | undefined;
|
|
427
|
+
apiToken?: string | undefined;
|
|
428
|
+
} | undefined;
|
|
388
429
|
} | undefined;
|
|
389
430
|
mergeBehavior?: {
|
|
390
431
|
mode: "local" | "github-pr";
|
|
391
432
|
remote?: string | undefined;
|
|
392
433
|
} | undefined;
|
|
434
|
+
ide?: {
|
|
435
|
+
type: "vscode" | "cursor" | "webstorm" | "sublime" | "intellij" | "windsurf";
|
|
436
|
+
} | undefined;
|
|
393
437
|
}, {
|
|
394
438
|
mainBranch?: string | undefined;
|
|
439
|
+
sourceEnvOnStart?: boolean | undefined;
|
|
395
440
|
worktreePrefix?: string | undefined;
|
|
396
441
|
protectedBranches?: string[] | undefined;
|
|
397
442
|
workflows?: {
|
|
@@ -441,11 +486,20 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
441
486
|
github?: {
|
|
442
487
|
remote: string;
|
|
443
488
|
} | undefined;
|
|
489
|
+
linear?: {
|
|
490
|
+
teamId: string;
|
|
491
|
+
branchFormat?: string | undefined;
|
|
492
|
+
apiToken?: string | undefined;
|
|
493
|
+
} | undefined;
|
|
494
|
+
provider?: "github" | "linear" | undefined;
|
|
444
495
|
} | undefined;
|
|
445
496
|
mergeBehavior?: {
|
|
446
497
|
remote?: string | undefined;
|
|
447
498
|
mode?: "local" | "github-pr" | undefined;
|
|
448
499
|
} | undefined;
|
|
500
|
+
ide?: {
|
|
501
|
+
type?: "vscode" | "cursor" | "webstorm" | "sublime" | "intellij" | "windsurf" | undefined;
|
|
502
|
+
} | undefined;
|
|
449
503
|
}>;
|
|
450
504
|
/**
|
|
451
505
|
* TypeScript type for iloom settings derived from Zod schema
|
|
@@ -456,10 +510,13 @@ type IloomSettings = z.infer<typeof IloomSettingsSchema>;
|
|
|
456
510
|
*/
|
|
457
511
|
declare class SettingsManager {
|
|
458
512
|
/**
|
|
459
|
-
* Load settings from
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
513
|
+
* Load settings from global, project, and local sources with proper precedence
|
|
514
|
+
* Merge hierarchy (lowest to highest priority):
|
|
515
|
+
* 1. Global settings (~/.config/iloom-ai/settings.json)
|
|
516
|
+
* 2. Project settings (<PROJECT_ROOT>/.iloom/settings.json)
|
|
517
|
+
* 3. Local settings (<PROJECT_ROOT>/.iloom/settings.local.json)
|
|
518
|
+
* 4. CLI overrides (--set flags)
|
|
519
|
+
* Returns empty object if all files don't exist (not an error)
|
|
463
520
|
*/
|
|
464
521
|
loadSettings(projectRoot?: string, cliOverrides?: Partial<IloomSettings>): Promise<IloomSettings>;
|
|
465
522
|
/**
|
|
@@ -469,6 +526,7 @@ declare class SettingsManager {
|
|
|
469
526
|
/**
|
|
470
527
|
* Load and parse a single settings file
|
|
471
528
|
* Returns empty object if file doesn't exist (not an error)
|
|
529
|
+
* Uses non-defaulting schema to prevent polluting partial settings with defaults before merge
|
|
472
530
|
*/
|
|
473
531
|
private loadSettingsFile;
|
|
474
532
|
/**
|
|
@@ -490,6 +548,20 @@ declare class SettingsManager {
|
|
|
490
548
|
* Get project root (defaults to process.cwd())
|
|
491
549
|
*/
|
|
492
550
|
private getProjectRoot;
|
|
551
|
+
/**
|
|
552
|
+
* Get global config directory path (~/.config/iloom-ai)
|
|
553
|
+
*/
|
|
554
|
+
private getGlobalConfigDir;
|
|
555
|
+
/**
|
|
556
|
+
* Get global settings file path (~/.config/iloom-ai/settings.json)
|
|
557
|
+
*/
|
|
558
|
+
private getGlobalSettingsPath;
|
|
559
|
+
/**
|
|
560
|
+
* Load and parse global settings file
|
|
561
|
+
* Returns empty object if file doesn't exist (not an error)
|
|
562
|
+
* Warns but returns empty object on validation/parse errors (graceful degradation)
|
|
563
|
+
*/
|
|
564
|
+
private loadGlobalSettingsFile;
|
|
493
565
|
/**
|
|
494
566
|
* Get effective protected branches list with mainBranch always included
|
|
495
567
|
*
|
|
@@ -614,7 +686,7 @@ declare class GitWorktreeManager {
|
|
|
614
686
|
* Avoids false matches like: tissue-44, myissue-44
|
|
615
687
|
* Ports: find_existing_worktree() from bash script lines 131-165
|
|
616
688
|
*/
|
|
617
|
-
findWorktreeForIssue(issueNumber: number): Promise<GitWorktree | null>;
|
|
689
|
+
findWorktreeForIssue(issueNumber: string | number): Promise<GitWorktree | null>;
|
|
618
690
|
/**
|
|
619
691
|
* Find worktree for a specific PR by branch name
|
|
620
692
|
* Ports: find_existing_worktree() for PR type from bash script lines 149-160
|
|
@@ -652,6 +724,22 @@ declare class GitWorktreeManager {
|
|
|
652
724
|
};
|
|
653
725
|
}
|
|
654
726
|
|
|
727
|
+
/**
|
|
728
|
+
* Strategy interface for generating branch names from issue information
|
|
729
|
+
*/
|
|
730
|
+
interface BranchNameStrategy {
|
|
731
|
+
generate(issueNumber: string | number, title: string): Promise<string>;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Options for branch name generation
|
|
735
|
+
* Supports both simple generation and custom strategy override
|
|
736
|
+
*/
|
|
737
|
+
interface BranchGenerationOptions {
|
|
738
|
+
issueNumber: string | number;
|
|
739
|
+
title: string;
|
|
740
|
+
strategy?: BranchNameStrategy;
|
|
741
|
+
}
|
|
742
|
+
|
|
655
743
|
interface EnvVariable {
|
|
656
744
|
key: string;
|
|
657
745
|
value: string;
|
|
@@ -671,7 +759,7 @@ interface EnvOperationResult {
|
|
|
671
759
|
}
|
|
672
760
|
interface PortAssignmentOptions {
|
|
673
761
|
basePort?: number;
|
|
674
|
-
issueNumber?: number;
|
|
762
|
+
issueNumber?: string | number;
|
|
675
763
|
prNumber?: number;
|
|
676
764
|
branchName?: string;
|
|
677
765
|
}
|
|
@@ -688,7 +776,7 @@ interface Loom {
|
|
|
688
776
|
databaseBranch?: string;
|
|
689
777
|
createdAt: Date;
|
|
690
778
|
lastAccessed: Date;
|
|
691
|
-
|
|
779
|
+
issueData?: {
|
|
692
780
|
title?: string;
|
|
693
781
|
body?: string;
|
|
694
782
|
url?: string;
|
|
@@ -703,6 +791,13 @@ interface CreateLoomInput {
|
|
|
703
791
|
identifier: string | number;
|
|
704
792
|
originalInput: string;
|
|
705
793
|
baseBranch?: string;
|
|
794
|
+
parentLoom?: {
|
|
795
|
+
type: 'issue' | 'pr' | 'branch';
|
|
796
|
+
identifier: string | number;
|
|
797
|
+
branchName: string;
|
|
798
|
+
worktreePath: string;
|
|
799
|
+
databaseBranch?: string;
|
|
800
|
+
};
|
|
706
801
|
options?: {
|
|
707
802
|
skipDatabase?: boolean;
|
|
708
803
|
skipColorSync?: boolean;
|
|
@@ -713,6 +808,7 @@ interface CreateLoomInput {
|
|
|
713
808
|
oneShot?: OneShotMode;
|
|
714
809
|
setArguments?: string[];
|
|
715
810
|
executablePath?: string;
|
|
811
|
+
sourceEnvOnStart?: boolean;
|
|
716
812
|
};
|
|
717
813
|
}
|
|
718
814
|
type LaunchMode = 'editor' | 'terminal' | 'both';
|
|
@@ -812,7 +908,7 @@ interface BranchCleanupTarget {
|
|
|
812
908
|
*/
|
|
813
909
|
interface BatchCleanupResult {
|
|
814
910
|
/** Issue number that was cleaned up */
|
|
815
|
-
issueNumber: number;
|
|
911
|
+
issueNumber: string | number;
|
|
816
912
|
/** Number of branches found matching the issue */
|
|
817
913
|
targetsFound: number;
|
|
818
914
|
/** Number of worktrees successfully removed */
|
|
@@ -845,7 +941,7 @@ interface Workspace {
|
|
|
845
941
|
id: string;
|
|
846
942
|
path: string;
|
|
847
943
|
branch: string;
|
|
848
|
-
issueNumber?: number;
|
|
944
|
+
issueNumber?: string | number;
|
|
849
945
|
prNumber?: number;
|
|
850
946
|
port: number;
|
|
851
947
|
databaseBranch?: string;
|
|
@@ -859,7 +955,7 @@ interface WorkspaceInput {
|
|
|
859
955
|
}
|
|
860
956
|
interface WorkspaceSummary {
|
|
861
957
|
id: string;
|
|
862
|
-
issueNumber?: number;
|
|
958
|
+
issueNumber?: string | number;
|
|
863
959
|
prNumber?: number;
|
|
864
960
|
title: string;
|
|
865
961
|
branch: string;
|
|
@@ -873,7 +969,7 @@ interface Worktree {
|
|
|
873
969
|
commit: string;
|
|
874
970
|
isPR: boolean;
|
|
875
971
|
prNumber?: number;
|
|
876
|
-
issueNumber?: number;
|
|
972
|
+
issueNumber?: string | number;
|
|
877
973
|
port?: number;
|
|
878
974
|
}
|
|
879
975
|
interface GitStatus {
|
|
@@ -885,7 +981,7 @@ interface GitStatus {
|
|
|
885
981
|
isBehindRemote: boolean;
|
|
886
982
|
}
|
|
887
983
|
interface Issue {
|
|
888
|
-
number: number;
|
|
984
|
+
number: string | number;
|
|
889
985
|
title: string;
|
|
890
986
|
body: string;
|
|
891
987
|
state: 'open' | 'closed';
|
|
@@ -903,6 +999,16 @@ interface PullRequest {
|
|
|
903
999
|
url: string;
|
|
904
1000
|
isDraft: boolean;
|
|
905
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Generic input detection result for issue trackers
|
|
1004
|
+
* String-based identifier to support non-numeric IDs (e.g., Linear "ENG-123")
|
|
1005
|
+
*/
|
|
1006
|
+
interface IssueTrackerInputDetection {
|
|
1007
|
+
type: 'issue' | 'pr' | 'unknown';
|
|
1008
|
+
identifier: string | null;
|
|
1009
|
+
rawInput: string;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
906
1012
|
/**
|
|
907
1013
|
* Result of database branch deletion operation
|
|
908
1014
|
* Distinguishes between successful deletion, branch not found, and errors
|
|
@@ -947,11 +1053,14 @@ interface StartOptions {
|
|
|
947
1053
|
code?: boolean;
|
|
948
1054
|
devServer?: boolean;
|
|
949
1055
|
terminal?: boolean;
|
|
1056
|
+
childLoom?: boolean;
|
|
950
1057
|
oneShot?: OneShotMode;
|
|
1058
|
+
body?: string;
|
|
951
1059
|
}
|
|
952
1060
|
interface AddIssueOptions {
|
|
953
1061
|
}
|
|
954
1062
|
interface FeedbackOptions {
|
|
1063
|
+
body?: string;
|
|
955
1064
|
}
|
|
956
1065
|
interface EnhanceOptions {
|
|
957
1066
|
noBrowser?: boolean;
|
|
@@ -1020,7 +1129,7 @@ interface ValidationResult {
|
|
|
1020
1129
|
}
|
|
1021
1130
|
interface CommitOptions {
|
|
1022
1131
|
dryRun?: boolean;
|
|
1023
|
-
issueNumber?: number;
|
|
1132
|
+
issueNumber?: string | number;
|
|
1024
1133
|
message?: string;
|
|
1025
1134
|
noReview?: boolean;
|
|
1026
1135
|
skipVerify?: boolean;
|
|
@@ -1048,30 +1157,43 @@ interface UpdateCheckResult {
|
|
|
1048
1157
|
}
|
|
1049
1158
|
type InstallationMethod = 'global' | 'local' | 'linked' | 'unknown';
|
|
1050
1159
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1160
|
+
/**
|
|
1161
|
+
* IssueTracker interface - abstraction for issue tracking providers
|
|
1162
|
+
* Follows DatabaseProvider pattern from src/types/index.ts:94-111
|
|
1163
|
+
*
|
|
1164
|
+
* Design Philosophy:
|
|
1165
|
+
* - Core methods are required and work with generic Issue/PullRequest types
|
|
1166
|
+
* - PR methods are optional (not all trackers have PR concepts)
|
|
1167
|
+
* - Identifiers use string | number to support both GitHub (#123) and Linear (ENG-123)
|
|
1168
|
+
* - Providers expose capabilities via boolean flags (supportsPullRequests, etc.)
|
|
1169
|
+
*/
|
|
1170
|
+
interface IssueTracker {
|
|
1171
|
+
readonly providerName: string;
|
|
1172
|
+
readonly supportsPullRequests: boolean;
|
|
1173
|
+
detectInputType(input: string, repo?: string): Promise<IssueTrackerInputDetection>;
|
|
1174
|
+
fetchIssue(identifier: string | number, repo?: string): Promise<Issue>;
|
|
1175
|
+
isValidIssue(identifier: string | number, repo?: string): Promise<Issue | false>;
|
|
1176
|
+
validateIssueState(issue: Issue): Promise<void>;
|
|
1177
|
+
createIssue(title: string, body: string, repository?: string, labels?: string[]): Promise<{
|
|
1178
|
+
number: string | number;
|
|
1179
|
+
url: string;
|
|
1180
|
+
}>;
|
|
1181
|
+
getIssueUrl(identifier: string | number, repo?: string): Promise<string>;
|
|
1182
|
+
fetchPR?(identifier: string | number, repo?: string): Promise<PullRequest>;
|
|
1183
|
+
isValidPR?(identifier: string | number, repo?: string): Promise<PullRequest | false>;
|
|
1184
|
+
validatePRState?(pr: PullRequest): Promise<void>;
|
|
1185
|
+
moveIssueToInProgress?(identifier: string | number): Promise<void>;
|
|
1186
|
+
extractContext(entity: Issue | PullRequest): string;
|
|
1063
1187
|
}
|
|
1064
1188
|
|
|
1065
|
-
declare class GitHubService {
|
|
1066
|
-
|
|
1189
|
+
declare class GitHubService implements IssueTracker {
|
|
1190
|
+
readonly providerName = "github";
|
|
1191
|
+
readonly supportsPullRequests = true;
|
|
1067
1192
|
private prompter;
|
|
1068
1193
|
constructor(options?: {
|
|
1069
|
-
branchNameStrategy?: BranchNameStrategy;
|
|
1070
|
-
useClaude?: boolean;
|
|
1071
|
-
claudeModel?: string;
|
|
1072
1194
|
prompter?: (message: string) => Promise<boolean>;
|
|
1073
1195
|
});
|
|
1074
|
-
detectInputType(input: string, repo?: string): Promise<
|
|
1196
|
+
detectInputType(input: string, repo?: string): Promise<IssueTrackerInputDetection>;
|
|
1075
1197
|
fetchIssue(issueNumber: number, repo?: string): Promise<Issue>;
|
|
1076
1198
|
isValidIssue(issueNumber: number, repo?: string): Promise<Issue | false>;
|
|
1077
1199
|
private fetchIssueInternal;
|
|
@@ -1080,9 +1202,8 @@ declare class GitHubService {
|
|
|
1080
1202
|
isValidPR(prNumber: number, repo?: string): Promise<PullRequest | false>;
|
|
1081
1203
|
private fetchPRInternal;
|
|
1082
1204
|
validatePRState(pr: PullRequest): Promise<void>;
|
|
1083
|
-
generateBranchName(options: BranchGenerationOptions): Promise<string>;
|
|
1084
1205
|
createIssue(title: string, body: string, repository?: string, labels?: string[]): Promise<{
|
|
1085
|
-
number: number;
|
|
1206
|
+
number: string | number;
|
|
1086
1207
|
url: string;
|
|
1087
1208
|
}>;
|
|
1088
1209
|
getIssueUrl(issueNumber: number, repo?: string): Promise<string>;
|
|
@@ -1092,8 +1213,35 @@ declare class GitHubService {
|
|
|
1092
1213
|
private mapGitHubIssueToIssue;
|
|
1093
1214
|
private mapGitHubPRToPullRequest;
|
|
1094
1215
|
private promptUserConfirmation;
|
|
1095
|
-
|
|
1096
|
-
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
type IssueTrackerProviderType = 'github' | 'linear';
|
|
1219
|
+
/**
|
|
1220
|
+
* Factory for creating IssueTracker instances based on settings
|
|
1221
|
+
* Provides a single point of provider instantiation
|
|
1222
|
+
*
|
|
1223
|
+
* Usage:
|
|
1224
|
+
* const tracker = IssueTrackerFactory.create(settings, { useClaude: true })
|
|
1225
|
+
* const issue = await tracker.fetchIssue(123)
|
|
1226
|
+
*/
|
|
1227
|
+
declare class IssueTrackerFactory {
|
|
1228
|
+
/**
|
|
1229
|
+
* Create an IssueTracker instance based on settings configuration
|
|
1230
|
+
* Defaults to GitHub if no provider specified
|
|
1231
|
+
*
|
|
1232
|
+
* @param settings - iloom settings containing issueManagement.provider
|
|
1233
|
+
* @returns IssueTracker instance configured for the specified provider
|
|
1234
|
+
* @throws Error if provider type is not supported
|
|
1235
|
+
*/
|
|
1236
|
+
static create(settings: IloomSettings): IssueTracker;
|
|
1237
|
+
/**
|
|
1238
|
+
* Get the configured provider name from settings
|
|
1239
|
+
* Defaults to 'github' if not configured
|
|
1240
|
+
*
|
|
1241
|
+
* @param settings - iloom settings
|
|
1242
|
+
* @returns Provider type string
|
|
1243
|
+
*/
|
|
1244
|
+
static getProviderName(settings: IloomSettings): IssueTrackerProviderType;
|
|
1097
1245
|
}
|
|
1098
1246
|
|
|
1099
1247
|
declare class EnvironmentManager {
|
|
@@ -1108,6 +1256,11 @@ declare class EnvironmentManager {
|
|
|
1108
1256
|
* Read and parse a .env file
|
|
1109
1257
|
*/
|
|
1110
1258
|
readEnvFile(filePath: string): Promise<Map<string, string>>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Get a specific environment variable from a .env file
|
|
1261
|
+
* Returns null if file doesn't exist or variable is not found
|
|
1262
|
+
*/
|
|
1263
|
+
getEnvVariable(filePath: string, variableName: string): Promise<string | null>;
|
|
1111
1264
|
/**
|
|
1112
1265
|
* Generic file copy helper that only copies if source exists
|
|
1113
1266
|
* Does not throw if source file doesn't exist - just logs and returns
|
|
@@ -1124,7 +1277,7 @@ declare class EnvironmentManager {
|
|
|
1124
1277
|
/**
|
|
1125
1278
|
* Set port environment variable for workspace
|
|
1126
1279
|
*/
|
|
1127
|
-
setPortForWorkspace(envFilePath: string, issueNumber?: number, prNumber?: number, branchName?: string): Promise<number>;
|
|
1280
|
+
setPortForWorkspace(envFilePath: string, issueNumber?: string | number, prNumber?: number, branchName?: string): Promise<number>;
|
|
1128
1281
|
/**
|
|
1129
1282
|
* Validate environment configuration
|
|
1130
1283
|
*/
|
|
@@ -1169,8 +1322,9 @@ declare class DatabaseManager {
|
|
|
1169
1322
|
* @param branchName - Name of the branch to create
|
|
1170
1323
|
* @param envFilePath - Path to .env file for configuration checks
|
|
1171
1324
|
* @param cwd - Optional working directory to run commands from
|
|
1325
|
+
* @param fromBranch - Optional parent branch to create from (for child looms)
|
|
1172
1326
|
*/
|
|
1173
|
-
createBranchIfConfigured(branchName: string, envFilePath: string, cwd?: string): Promise<string | null>;
|
|
1327
|
+
createBranchIfConfigured(branchName: string, envFilePath: string, cwd?: string, fromBranch?: string): Promise<string | null>;
|
|
1174
1328
|
/**
|
|
1175
1329
|
* Delete database branch only if configured
|
|
1176
1330
|
* Returns result object indicating what happened
|
|
@@ -1181,6 +1335,14 @@ declare class DatabaseManager {
|
|
|
1181
1335
|
* @param cwd - Optional working directory to run commands from (prevents issues with deleted directories)
|
|
1182
1336
|
*/
|
|
1183
1337
|
deleteBranchIfConfigured(branchName: string, shouldCleanup: boolean, isPreview?: boolean, cwd?: string): Promise<DatabaseDeletionResult>;
|
|
1338
|
+
/**
|
|
1339
|
+
* Get database branch name from connection string (reverse lookup)
|
|
1340
|
+
* Returns branch name if provider supports reverse lookup, null otherwise
|
|
1341
|
+
*
|
|
1342
|
+
* @param connectionString - Database connection string
|
|
1343
|
+
* @param cwd - Optional working directory to run commands from
|
|
1344
|
+
*/
|
|
1345
|
+
getBranchNameFromConnectionString(connectionString: string, cwd?: string): Promise<string | null>;
|
|
1184
1346
|
/**
|
|
1185
1347
|
* Check if .env has the configured database URL variable
|
|
1186
1348
|
* CRITICAL: If user explicitly configured a custom variable name (not default),
|
|
@@ -1190,7 +1352,7 @@ declare class DatabaseManager {
|
|
|
1190
1352
|
}
|
|
1191
1353
|
|
|
1192
1354
|
interface TemplateVariables {
|
|
1193
|
-
ISSUE_NUMBER?: number;
|
|
1355
|
+
ISSUE_NUMBER?: string | number;
|
|
1194
1356
|
PR_NUMBER?: number;
|
|
1195
1357
|
ISSUE_TITLE?: string;
|
|
1196
1358
|
PR_TITLE?: string;
|
|
@@ -1198,6 +1360,7 @@ interface TemplateVariables {
|
|
|
1198
1360
|
PORT?: number;
|
|
1199
1361
|
ONE_SHOT_MODE?: boolean;
|
|
1200
1362
|
SETTINGS_SCHEMA?: string;
|
|
1363
|
+
SETTINGS_GLOBAL_JSON?: string;
|
|
1201
1364
|
SETTINGS_JSON?: string;
|
|
1202
1365
|
SETTINGS_LOCAL_JSON?: string;
|
|
1203
1366
|
SHELL_TYPE?: string;
|
|
@@ -1239,7 +1402,7 @@ declare class PromptTemplateManager {
|
|
|
1239
1402
|
|
|
1240
1403
|
interface ClaudeWorkflowOptions {
|
|
1241
1404
|
type: 'issue' | 'pr' | 'regular';
|
|
1242
|
-
issueNumber?: number;
|
|
1405
|
+
issueNumber?: string | number;
|
|
1243
1406
|
prNumber?: number;
|
|
1244
1407
|
title?: string;
|
|
1245
1408
|
workspacePath: string;
|
|
@@ -1271,10 +1434,6 @@ declare class ClaudeService {
|
|
|
1271
1434
|
* Launch Claude for a specific workflow
|
|
1272
1435
|
*/
|
|
1273
1436
|
launchForWorkflow(options: ClaudeWorkflowOptions): Promise<string | void>;
|
|
1274
|
-
/**
|
|
1275
|
-
* Generate branch name with Claude, with fallback on failure
|
|
1276
|
-
*/
|
|
1277
|
-
generateBranchNameWithFallback(issueTitle: string, issueNumber: number): Promise<string>;
|
|
1278
1437
|
}
|
|
1279
1438
|
|
|
1280
1439
|
interface ClaudeContext {
|
|
@@ -1325,6 +1484,12 @@ declare function isPRBranch(branchName: string): boolean;
|
|
|
1325
1484
|
* Extract PR number from branch name
|
|
1326
1485
|
*/
|
|
1327
1486
|
declare function extractPRNumber(branchName: string): number | null;
|
|
1487
|
+
/**
|
|
1488
|
+
* Extract issue number from branch name
|
|
1489
|
+
* Supports both new format (issue-{issueId}__{slug}) and old format (issue-{number}-{slug})
|
|
1490
|
+
* @returns string issue ID (alphanumeric) or null if not found
|
|
1491
|
+
*/
|
|
1492
|
+
declare function extractIssueNumber(branchName: string): string | null;
|
|
1328
1493
|
/**
|
|
1329
1494
|
* Check if a path follows worktree naming patterns
|
|
1330
1495
|
*/
|
|
@@ -1395,7 +1560,7 @@ declare function getDefaultBranch(path?: string): Promise<string>;
|
|
|
1395
1560
|
* @param path - Working directory to search from (defaults to process.cwd())
|
|
1396
1561
|
* @param settingsManager - Optional SettingsManager instance (for DI/testing)
|
|
1397
1562
|
*/
|
|
1398
|
-
declare function findAllBranchesForIssue(issueNumber: number, path?: string, settingsManager?: SettingsManager): Promise<string[]>;
|
|
1563
|
+
declare function findAllBranchesForIssue(issueNumber: string | number, path?: string, settingsManager?: SettingsManager): Promise<string[]>;
|
|
1399
1564
|
/**
|
|
1400
1565
|
* Check if a repository is empty (has no commits yet)
|
|
1401
1566
|
* @param path - Repository path to check (defaults to process.cwd())
|
|
@@ -1440,4 +1605,153 @@ interface Logger {
|
|
|
1440
1605
|
declare const logger: Logger;
|
|
1441
1606
|
declare function createLogger(options?: LoggerOptions): Logger;
|
|
1442
1607
|
|
|
1443
|
-
|
|
1608
|
+
/**
|
|
1609
|
+
* Utility class for converting HTML details/summary format to Linear's collapsible format
|
|
1610
|
+
*
|
|
1611
|
+
* Converts:
|
|
1612
|
+
* <details>
|
|
1613
|
+
* <summary>Header</summary>
|
|
1614
|
+
* CONTENT
|
|
1615
|
+
* </details>
|
|
1616
|
+
*
|
|
1617
|
+
* Into Linear format:
|
|
1618
|
+
* +++ Header
|
|
1619
|
+
*
|
|
1620
|
+
* CONTENT
|
|
1621
|
+
*
|
|
1622
|
+
* +++
|
|
1623
|
+
*/
|
|
1624
|
+
declare class LinearMarkupConverter {
|
|
1625
|
+
/**
|
|
1626
|
+
* Convert HTML details/summary blocks to Linear's collapsible format
|
|
1627
|
+
* Handles nested details blocks recursively
|
|
1628
|
+
*
|
|
1629
|
+
* @param text - Text containing HTML details/summary blocks
|
|
1630
|
+
* @returns Text with details/summary converted to Linear format
|
|
1631
|
+
*/
|
|
1632
|
+
static convertDetailsToLinear(text: string): string;
|
|
1633
|
+
/**
|
|
1634
|
+
* Perform a single pass of details block conversion
|
|
1635
|
+
* Converts the innermost details blocks first
|
|
1636
|
+
*/
|
|
1637
|
+
private static convertSinglePass;
|
|
1638
|
+
/**
|
|
1639
|
+
* Clean text by trimming whitespace and decoding common HTML entities
|
|
1640
|
+
*/
|
|
1641
|
+
private static cleanText;
|
|
1642
|
+
/**
|
|
1643
|
+
* Clean content while preserving internal structure
|
|
1644
|
+
* - Removes leading/trailing whitespace
|
|
1645
|
+
* - Normalizes internal blank lines (max 2 consecutive newlines)
|
|
1646
|
+
* - Preserves code blocks and other formatting
|
|
1647
|
+
*/
|
|
1648
|
+
private static cleanContent;
|
|
1649
|
+
/**
|
|
1650
|
+
* Check if text contains HTML details/summary blocks
|
|
1651
|
+
* Useful for conditional conversion
|
|
1652
|
+
*/
|
|
1653
|
+
static hasDetailsBlocks(text: string): boolean;
|
|
1654
|
+
/**
|
|
1655
|
+
* Remove wrapper tags from code sample details blocks
|
|
1656
|
+
* Identifies details blocks where summary contains "X lines" pattern
|
|
1657
|
+
* and removes the details/summary tags while preserving the content
|
|
1658
|
+
*
|
|
1659
|
+
* @param text - Text containing potential code sample details blocks
|
|
1660
|
+
* @returns Text with code sample wrappers removed
|
|
1661
|
+
*/
|
|
1662
|
+
static removeCodeSampleWrappers(text: string): string;
|
|
1663
|
+
/**
|
|
1664
|
+
* Convert text for Linear - applies all necessary conversions
|
|
1665
|
+
* Currently only converts details/summary blocks, but can be extended
|
|
1666
|
+
* for other HTML to Linear markdown conversions
|
|
1667
|
+
*/
|
|
1668
|
+
static convertToLinear(text: string): string;
|
|
1669
|
+
/**
|
|
1670
|
+
* Log conversion input/output if LINEAR_MARKDOWN_LOG_FILE is set
|
|
1671
|
+
*/
|
|
1672
|
+
private static logConversion;
|
|
1673
|
+
/**
|
|
1674
|
+
* Generate timestamped log file path
|
|
1675
|
+
* Example: debug.log -> debug-20231202-161234.log
|
|
1676
|
+
*/
|
|
1677
|
+
private static getTimestampedLogPath;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* Table formatting utilities for creating markdown tables with controlled column widths
|
|
1682
|
+
* Uses entities to force minimum column widths in markdown renderers like Linear
|
|
1683
|
+
*/
|
|
1684
|
+
interface TableFormatterOptions {
|
|
1685
|
+
/** Target total width across all headers (default: 140) */
|
|
1686
|
+
targetTotalWidth?: number;
|
|
1687
|
+
/** Padding character to use (default: ' ') */
|
|
1688
|
+
paddingChar?: string;
|
|
1689
|
+
/** Maximum number of padding entities per column (default: 16) */
|
|
1690
|
+
maxPadding?: number;
|
|
1691
|
+
}
|
|
1692
|
+
interface TableGenerationOptions extends TableFormatterOptions {
|
|
1693
|
+
/** Table headers */
|
|
1694
|
+
headers: string[];
|
|
1695
|
+
/** Table rows data */
|
|
1696
|
+
rows: string[][];
|
|
1697
|
+
}
|
|
1698
|
+
declare class TableFormatter {
|
|
1699
|
+
private static readonly DEFAULT_TARGET_WIDTH;
|
|
1700
|
+
private static readonly DEFAULT_PADDING_CHAR;
|
|
1701
|
+
private static readonly DEFAULT_MAX_PADDING;
|
|
1702
|
+
/**
|
|
1703
|
+
* Pad table headers to achieve equal column widths
|
|
1704
|
+
* @param headers Array of header text
|
|
1705
|
+
* @param options Formatting options
|
|
1706
|
+
* @returns Array of padded headers
|
|
1707
|
+
*/
|
|
1708
|
+
static padHeaders(headers: string[], options?: TableFormatterOptions): string[];
|
|
1709
|
+
/**
|
|
1710
|
+
* Generate a complete markdown table with padded headers
|
|
1711
|
+
* @param options Table generation options
|
|
1712
|
+
* @returns Complete markdown table string
|
|
1713
|
+
*/
|
|
1714
|
+
static generateTable(options: TableGenerationOptions): string;
|
|
1715
|
+
/**
|
|
1716
|
+
* Calculate the optimal width distribution for given headers
|
|
1717
|
+
* @param headers Array of header text
|
|
1718
|
+
* @param targetTotalWidth Target total width
|
|
1719
|
+
* @param maxPadding Maximum padding entities per column
|
|
1720
|
+
* @returns Width distribution information
|
|
1721
|
+
*/
|
|
1722
|
+
static calculateWidthDistribution(headers: string[], targetTotalWidth?: number, maxPadding?: number): {
|
|
1723
|
+
totalWidth: number;
|
|
1724
|
+
widthPerColumn: number;
|
|
1725
|
+
headers: Array<{
|
|
1726
|
+
text: string;
|
|
1727
|
+
currentLength: number;
|
|
1728
|
+
targetLength: number;
|
|
1729
|
+
paddingNeeded: number;
|
|
1730
|
+
paddingUsed: number;
|
|
1731
|
+
}>;
|
|
1732
|
+
};
|
|
1733
|
+
/**
|
|
1734
|
+
* Create a simple two-column assessment table (common pattern)
|
|
1735
|
+
* @param assessmentData Array of [question, answer] pairs
|
|
1736
|
+
* @param options Formatting options
|
|
1737
|
+
* @returns Formatted markdown table
|
|
1738
|
+
*/
|
|
1739
|
+
static createAssessmentTable(assessmentData: Array<[string, string]>, options?: TableFormatterOptions): string;
|
|
1740
|
+
/**
|
|
1741
|
+
* Create a three-column status table (common pattern)
|
|
1742
|
+
* @param statusData Array of [task, status, assignee] tuples
|
|
1743
|
+
* @param options Formatting options
|
|
1744
|
+
* @returns Formatted markdown table
|
|
1745
|
+
*/
|
|
1746
|
+
static createStatusTable(statusData: Array<[string, string, string]>, options?: TableFormatterOptions): string;
|
|
1747
|
+
/**
|
|
1748
|
+
* Preview table formatting without generating full markdown
|
|
1749
|
+
* Useful for debugging and development
|
|
1750
|
+
* @param headers Array of header text
|
|
1751
|
+
* @param options Formatting options
|
|
1752
|
+
* @returns Human-readable formatting preview
|
|
1753
|
+
*/
|
|
1754
|
+
static previewFormatting(headers: string[], options?: TableFormatterOptions): string;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
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, 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, hasUncommittedChanges, isEmptyRepository, isPRBranch, isValidGitRepo, isWorktreePath, logger, parseWorktreeList, pushBranchToRemote };
|