@iloom/cli 0.1.19 → 0.3.0
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 +290 -30
- package/dist/BranchNamingService-3OQPRSWT.js +13 -0
- package/dist/ClaudeContextManager-MUQSDY2E.js +13 -0
- package/dist/ClaudeService-HG4VQ7AW.js +12 -0
- package/dist/GitHubService-EBOETDIW.js +11 -0
- package/dist/{LoomLauncher-UMMLPIZO.js → LoomLauncher-FLEMBCSQ.js} +64 -33
- package/dist/LoomLauncher-FLEMBCSQ.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 +290 -30
- package/dist/{SettingsManager-SKLUVE3K.js → SettingsManager-WHHFGSL7.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-3KATJIKO.js +55 -0
- package/dist/chunk-3KATJIKO.js.map +1 -0
- package/dist/{chunk-JXQXSC45.js → chunk-3RUPPQRG.js} +1 -18
- package/dist/chunk-3RUPPQRG.js.map +1 -0
- package/dist/{chunk-PR7FKQBG.js → chunk-47KSHUCR.js} +3 -3
- package/dist/chunk-47KSHUCR.js.map +1 -0
- package/dist/{chunk-IO4WFTL2.js → chunk-4HHRTA7Q.js} +3 -3
- package/dist/{chunk-IO4WFTL2.js.map → chunk-4HHRTA7Q.js.map} +1 -1
- package/dist/chunk-5EF7Z346.js +1987 -0
- package/dist/chunk-5EF7Z346.js.map +1 -0
- package/dist/{chunk-VVH3ANF2.js → chunk-AWOFAD5O.js} +12 -12
- package/dist/chunk-AWOFAD5O.js.map +1 -0
- package/dist/{chunk-DEPYQRRB.js → chunk-C5QCTEQK.js} +2 -2
- package/dist/{chunk-CWR2SANQ.js → chunk-EBISESAP.js} +1 -1
- package/dist/{chunk-ELFT36PV.js → chunk-FIAT22G7.js} +4 -16
- package/dist/chunk-FIAT22G7.js.map +1 -0
- package/dist/{chunk-ZWXJBSUW.js → chunk-G2IEYOLQ.js} +11 -38
- package/dist/chunk-G2IEYOLQ.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-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-KOCQAD2E.js → chunk-MAVL6PJF.js} +26 -3
- package/dist/chunk-MAVL6PJF.js.map +1 -0
- package/dist/{chunk-USVVV3FP.js → chunk-MKWYLDFK.js} +5 -5
- package/dist/chunk-ML3NRPNB.js +396 -0
- package/dist/chunk-ML3NRPNB.js.map +1 -0
- package/dist/{chunk-FXV24OYZ.js → chunk-PA6Q6AWM.js} +24 -4
- 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-PV3GAXQO.js → chunk-VAYCCUXW.js} +72 -2
- package/dist/{chunk-PV3GAXQO.js.map → chunk-VAYCCUXW.js.map} +1 -1
- 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-PXZBAC2M.js → chunk-XXV3UFZL.js} +4 -4
- package/dist/{chunk-PXZBAC2M.js.map → chunk-XXV3UFZL.js.map} +1 -1
- package/dist/{chunk-RSRO7564.js → chunk-ZE74H5BR.js} +28 -3
- package/dist/chunk-ZE74H5BR.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/{claude-7LUVDZZ4.js → claude-GOP6PFC7.js} +2 -2
- package/dist/{cleanup-ZHROIBSQ.js → cleanup-7RWLBSLE.js} +86 -25
- package/dist/cleanup-7RWLBSLE.js.map +1 -0
- package/dist/cli.js +2513 -64
- package/dist/cli.js.map +1 -1
- package/dist/{contribute-3MQJ3XAQ.js → contribute-BS2L4FZR.js} +9 -6
- package/dist/{contribute-3MQJ3XAQ.js.map → contribute-BS2L4FZR.js.map} +1 -1
- package/dist/{feedback-ZOUCCHN4.js → feedback-N4ECWIPF.js} +15 -14
- package/dist/{feedback-ZOUCCHN4.js.map → feedback-N4ECWIPF.js.map} +1 -1
- package/dist/{git-OUYMVYJX.js → git-TDXKRTXM.js} +4 -2
- package/dist/{ignite-HICLZEYU.js → ignite-VM64QO3J.js} +32 -27
- package/dist/ignite-VM64QO3J.js.map +1 -0
- package/dist/index.d.ts +379 -45
- package/dist/index.js +1241 -448
- package/dist/index.js.map +1 -1
- package/dist/{init-UMKNHNV5.js → init-G3T64SC4.js} +104 -40
- package/dist/init-G3T64SC4.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/{open-ETZUFSE4.js → open-KXDXEKRZ.js} +39 -36
- package/dist/open-KXDXEKRZ.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 +563 -91
- package/dist/prompts/issue-prompt.txt +27 -27
- package/dist/{rebase-KBWFDZCN.js → rebase-Q7GMM7EI.js} +6 -6
- package/dist/{remote-GJEZWRCC.js → remote-VUNCQZ6J.js} +5 -2
- package/dist/remote-VUNCQZ6J.js.map +1 -0
- package/dist/{run-4SVQ3WEU.js → run-PAWJJCSX.js} +39 -36
- package/dist/run-PAWJJCSX.js.map +1 -0
- package/dist/schema/settings.schema.json +74 -0
- package/dist/{terminal-3D6TUAKJ.js → terminal-BIRBZ4AZ.js} +2 -2
- package/dist/terminal-BIRBZ4AZ.js.map +1 -0
- package/dist/{test-git-MKZATGZN.js → test-git-3WDLNQCA.js} +3 -3
- package/dist/{test-prefix-ZNLWDI3K.js → test-prefix-EVGAWAJW.js} +3 -3
- package/dist/{test-tabs-JRKY3QMM.js → test-tabs-RXDBZ6J7.js} +2 -2
- package/dist/{test-webserver-M2I3EV4J.js → test-webserver-DAHONWCS.js} +4 -4
- package/dist/test-webserver-DAHONWCS.js.map +1 -0
- package/package.json +2 -1
- package/dist/ClaudeContextManager-JKR4WGNU.js +0 -13
- package/dist/ClaudeService-55DQGB7T.js +0 -12
- package/dist/GitHubService-LWP4GKGH.js +0 -11
- package/dist/LoomLauncher-UMMLPIZO.js.map +0 -1
- package/dist/add-issue-X56V3XPB.js +0 -69
- package/dist/add-issue-X56V3XPB.js.map +0 -1
- package/dist/chunk-BLCTGFZN.js.map +0 -1
- package/dist/chunk-ELFT36PV.js.map +0 -1
- package/dist/chunk-FXV24OYZ.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-JXQXSC45.js.map +0 -1
- package/dist/chunk-KOCQAD2E.js.map +0 -1
- package/dist/chunk-PR7FKQBG.js.map +0 -1
- package/dist/chunk-PVAVNJKS.js.map +0 -1
- package/dist/chunk-Q2KYPAH2.js +0 -545
- package/dist/chunk-Q2KYPAH2.js.map +0 -1
- package/dist/chunk-RSRO7564.js.map +0 -1
- package/dist/chunk-SPYPLHMK.js.map +0 -1
- package/dist/chunk-VCMMAFXQ.js +0 -54
- package/dist/chunk-VCMMAFXQ.js.map +0 -1
- package/dist/chunk-VVH3ANF2.js.map +0 -1
- package/dist/chunk-VYQLLHZ7.js +0 -239
- package/dist/chunk-VYQLLHZ7.js.map +0 -1
- package/dist/chunk-ZMNQBJUI.js.map +0 -1
- package/dist/chunk-ZWXJBSUW.js.map +0 -1
- package/dist/cleanup-ZHROIBSQ.js.map +0 -1
- package/dist/enhance-VGWUX474.js +0 -176
- package/dist/enhance-VGWUX474.js.map +0 -1
- package/dist/finish-QJSK6Z7J.js +0 -1355
- package/dist/finish-QJSK6Z7J.js.map +0 -1
- package/dist/ignite-HICLZEYU.js.map +0 -1
- package/dist/init-UMKNHNV5.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-YHHHLSXH.js +0 -249
- package/dist/mcp/claude-YHHHLSXH.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-SDCMDVD7.js +0 -202
- package/dist/mcp/terminal-SDCMDVD7.js.map +0 -1
- package/dist/open-ETZUFSE4.js.map +0 -1
- package/dist/run-4SVQ3WEU.js.map +0 -1
- package/dist/start-CT2ZEFP2.js +0 -983
- package/dist/start-CT2ZEFP2.js.map +0 -1
- package/dist/test-webserver-M2I3EV4J.js.map +0 -1
- /package/dist/{ClaudeContextManager-JKR4WGNU.js.map → BranchNamingService-3OQPRSWT.js.map} +0 -0
- /package/dist/{ClaudeService-55DQGB7T.js.map → ClaudeContextManager-MUQSDY2E.js.map} +0 -0
- /package/dist/{GitHubService-LWP4GKGH.js.map → ClaudeService-HG4VQ7AW.js.map} +0 -0
- /package/dist/{PromptTemplateManager-WII75TKH.js.map → GitHubService-EBOETDIW.js.map} +0 -0
- /package/dist/{SettingsManager-SKLUVE3K.js.map → ProjectCapabilityDetector-34LU7JJ4.js.map} +0 -0
- /package/dist/{claude-7LUVDZZ4.js.map → PromptTemplateManager-A52RUAMS.js.map} +0 -0
- /package/dist/{git-OUYMVYJX.js.map → SettingsManager-WHHFGSL7.js.map} +0 -0
- /package/dist/{neon-helpers-ZVIRPKCI.js.map → SettingsMigrationManager-AGIIIPDQ.js.map} +0 -0
- /package/dist/{chunk-DEPYQRRB.js.map → chunk-C5QCTEQK.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-GZP4UGGM.js.map → chunk-ZM3CFL5L.js.map} +0 -0
- /package/dist/{prompt-ANTQWHUF.js.map → claude-GOP6PFC7.js.map} +0 -0
- /package/dist/{remote-GJEZWRCC.js.map → git-TDXKRTXM.js.map} +0 -0
- /package/dist/{terminal-3D6TUAKJ.js.map → neon-helpers-WPUACUVC.js.map} +0 -0
- /package/dist/{rebase-KBWFDZCN.js.map → rebase-Q7GMM7EI.js.map} +0 -0
- /package/dist/{test-git-MKZATGZN.js.map → test-git-3WDLNQCA.js.map} +0 -0
- /package/dist/{test-prefix-ZNLWDI3K.js.map → test-prefix-EVGAWAJW.js.map} +0 -0
- /package/dist/{test-tabs-JRKY3QMM.js.map → test-tabs-RXDBZ6J7.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,16 +317,59 @@ 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;
|
|
353
|
+
}>>;
|
|
354
|
+
mergeBehavior: z.ZodOptional<z.ZodObject<{
|
|
355
|
+
mode: z.ZodDefault<z.ZodEnum<["local", "github-pr"]>>;
|
|
356
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
mode: "local" | "github-pr";
|
|
359
|
+
remote?: string | undefined;
|
|
360
|
+
}, {
|
|
361
|
+
remote?: string | undefined;
|
|
362
|
+
mode?: "local" | "github-pr" | undefined;
|
|
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;
|
|
326
370
|
}>>;
|
|
327
371
|
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
sourceEnvOnStart: boolean;
|
|
328
373
|
mainBranch?: string | undefined;
|
|
329
374
|
worktreePrefix?: string | undefined;
|
|
330
375
|
protectedBranches?: string[] | undefined;
|
|
@@ -372,12 +417,26 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
372
417
|
} | undefined;
|
|
373
418
|
} | undefined;
|
|
374
419
|
issueManagement?: {
|
|
420
|
+
provider: "github" | "linear";
|
|
375
421
|
github?: {
|
|
376
422
|
remote: string;
|
|
377
423
|
} | undefined;
|
|
424
|
+
linear?: {
|
|
425
|
+
teamId: string;
|
|
426
|
+
branchFormat?: string | undefined;
|
|
427
|
+
apiToken?: string | undefined;
|
|
428
|
+
} | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
mergeBehavior?: {
|
|
431
|
+
mode: "local" | "github-pr";
|
|
432
|
+
remote?: string | undefined;
|
|
433
|
+
} | undefined;
|
|
434
|
+
ide?: {
|
|
435
|
+
type: "vscode" | "cursor" | "webstorm" | "sublime" | "intellij" | "windsurf";
|
|
378
436
|
} | undefined;
|
|
379
437
|
}, {
|
|
380
438
|
mainBranch?: string | undefined;
|
|
439
|
+
sourceEnvOnStart?: boolean | undefined;
|
|
381
440
|
worktreePrefix?: string | undefined;
|
|
382
441
|
protectedBranches?: string[] | undefined;
|
|
383
442
|
workflows?: {
|
|
@@ -427,6 +486,19 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
427
486
|
github?: {
|
|
428
487
|
remote: string;
|
|
429
488
|
} | undefined;
|
|
489
|
+
linear?: {
|
|
490
|
+
teamId: string;
|
|
491
|
+
branchFormat?: string | undefined;
|
|
492
|
+
apiToken?: string | undefined;
|
|
493
|
+
} | undefined;
|
|
494
|
+
provider?: "github" | "linear" | undefined;
|
|
495
|
+
} | undefined;
|
|
496
|
+
mergeBehavior?: {
|
|
497
|
+
remote?: string | undefined;
|
|
498
|
+
mode?: "local" | "github-pr" | undefined;
|
|
499
|
+
} | undefined;
|
|
500
|
+
ide?: {
|
|
501
|
+
type?: "vscode" | "cursor" | "webstorm" | "sublime" | "intellij" | "windsurf" | undefined;
|
|
430
502
|
} | undefined;
|
|
431
503
|
}>;
|
|
432
504
|
/**
|
|
@@ -438,10 +510,13 @@ type IloomSettings = z.infer<typeof IloomSettingsSchema>;
|
|
|
438
510
|
*/
|
|
439
511
|
declare class SettingsManager {
|
|
440
512
|
/**
|
|
441
|
-
* Load settings from
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
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)
|
|
445
520
|
*/
|
|
446
521
|
loadSettings(projectRoot?: string, cliOverrides?: Partial<IloomSettings>): Promise<IloomSettings>;
|
|
447
522
|
/**
|
|
@@ -451,6 +526,7 @@ declare class SettingsManager {
|
|
|
451
526
|
/**
|
|
452
527
|
* Load and parse a single settings file
|
|
453
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
|
|
454
530
|
*/
|
|
455
531
|
private loadSettingsFile;
|
|
456
532
|
/**
|
|
@@ -472,6 +548,20 @@ declare class SettingsManager {
|
|
|
472
548
|
* Get project root (defaults to process.cwd())
|
|
473
549
|
*/
|
|
474
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;
|
|
475
565
|
/**
|
|
476
566
|
* Get effective protected branches list with mainBranch always included
|
|
477
567
|
*
|
|
@@ -596,7 +686,7 @@ declare class GitWorktreeManager {
|
|
|
596
686
|
* Avoids false matches like: tissue-44, myissue-44
|
|
597
687
|
* Ports: find_existing_worktree() from bash script lines 131-165
|
|
598
688
|
*/
|
|
599
|
-
findWorktreeForIssue(issueNumber: number): Promise<GitWorktree | null>;
|
|
689
|
+
findWorktreeForIssue(issueNumber: string | number): Promise<GitWorktree | null>;
|
|
600
690
|
/**
|
|
601
691
|
* Find worktree for a specific PR by branch name
|
|
602
692
|
* Ports: find_existing_worktree() for PR type from bash script lines 149-160
|
|
@@ -634,6 +724,22 @@ declare class GitWorktreeManager {
|
|
|
634
724
|
};
|
|
635
725
|
}
|
|
636
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
|
+
|
|
637
743
|
interface EnvVariable {
|
|
638
744
|
key: string;
|
|
639
745
|
value: string;
|
|
@@ -653,7 +759,7 @@ interface EnvOperationResult {
|
|
|
653
759
|
}
|
|
654
760
|
interface PortAssignmentOptions {
|
|
655
761
|
basePort?: number;
|
|
656
|
-
issueNumber?: number;
|
|
762
|
+
issueNumber?: string | number;
|
|
657
763
|
prNumber?: number;
|
|
658
764
|
branchName?: string;
|
|
659
765
|
}
|
|
@@ -670,7 +776,7 @@ interface Loom {
|
|
|
670
776
|
databaseBranch?: string;
|
|
671
777
|
createdAt: Date;
|
|
672
778
|
lastAccessed: Date;
|
|
673
|
-
|
|
779
|
+
issueData?: {
|
|
674
780
|
title?: string;
|
|
675
781
|
body?: string;
|
|
676
782
|
url?: string;
|
|
@@ -685,6 +791,13 @@ interface CreateLoomInput {
|
|
|
685
791
|
identifier: string | number;
|
|
686
792
|
originalInput: string;
|
|
687
793
|
baseBranch?: string;
|
|
794
|
+
parentLoom?: {
|
|
795
|
+
type: 'issue' | 'pr' | 'branch';
|
|
796
|
+
identifier: string | number;
|
|
797
|
+
branchName: string;
|
|
798
|
+
worktreePath: string;
|
|
799
|
+
databaseBranch?: string;
|
|
800
|
+
};
|
|
688
801
|
options?: {
|
|
689
802
|
skipDatabase?: boolean;
|
|
690
803
|
skipColorSync?: boolean;
|
|
@@ -695,6 +808,7 @@ interface CreateLoomInput {
|
|
|
695
808
|
oneShot?: OneShotMode;
|
|
696
809
|
setArguments?: string[];
|
|
697
810
|
executablePath?: string;
|
|
811
|
+
sourceEnvOnStart?: boolean;
|
|
698
812
|
};
|
|
699
813
|
}
|
|
700
814
|
type LaunchMode = 'editor' | 'terminal' | 'both';
|
|
@@ -794,7 +908,7 @@ interface BranchCleanupTarget {
|
|
|
794
908
|
*/
|
|
795
909
|
interface BatchCleanupResult {
|
|
796
910
|
/** Issue number that was cleaned up */
|
|
797
|
-
issueNumber: number;
|
|
911
|
+
issueNumber: string | number;
|
|
798
912
|
/** Number of branches found matching the issue */
|
|
799
913
|
targetsFound: number;
|
|
800
914
|
/** Number of worktrees successfully removed */
|
|
@@ -827,7 +941,7 @@ interface Workspace {
|
|
|
827
941
|
id: string;
|
|
828
942
|
path: string;
|
|
829
943
|
branch: string;
|
|
830
|
-
issueNumber?: number;
|
|
944
|
+
issueNumber?: string | number;
|
|
831
945
|
prNumber?: number;
|
|
832
946
|
port: number;
|
|
833
947
|
databaseBranch?: string;
|
|
@@ -841,7 +955,7 @@ interface WorkspaceInput {
|
|
|
841
955
|
}
|
|
842
956
|
interface WorkspaceSummary {
|
|
843
957
|
id: string;
|
|
844
|
-
issueNumber?: number;
|
|
958
|
+
issueNumber?: string | number;
|
|
845
959
|
prNumber?: number;
|
|
846
960
|
title: string;
|
|
847
961
|
branch: string;
|
|
@@ -855,7 +969,7 @@ interface Worktree {
|
|
|
855
969
|
commit: string;
|
|
856
970
|
isPR: boolean;
|
|
857
971
|
prNumber?: number;
|
|
858
|
-
issueNumber?: number;
|
|
972
|
+
issueNumber?: string | number;
|
|
859
973
|
port?: number;
|
|
860
974
|
}
|
|
861
975
|
interface GitStatus {
|
|
@@ -867,7 +981,7 @@ interface GitStatus {
|
|
|
867
981
|
isBehindRemote: boolean;
|
|
868
982
|
}
|
|
869
983
|
interface Issue {
|
|
870
|
-
number: number;
|
|
984
|
+
number: string | number;
|
|
871
985
|
title: string;
|
|
872
986
|
body: string;
|
|
873
987
|
state: 'open' | 'closed';
|
|
@@ -885,6 +999,16 @@ interface PullRequest {
|
|
|
885
999
|
url: string;
|
|
886
1000
|
isDraft: boolean;
|
|
887
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
|
+
|
|
888
1012
|
/**
|
|
889
1013
|
* Result of database branch deletion operation
|
|
890
1014
|
* Distinguishes between successful deletion, branch not found, and errors
|
|
@@ -929,11 +1053,14 @@ interface StartOptions {
|
|
|
929
1053
|
code?: boolean;
|
|
930
1054
|
devServer?: boolean;
|
|
931
1055
|
terminal?: boolean;
|
|
1056
|
+
childLoom?: boolean;
|
|
932
1057
|
oneShot?: OneShotMode;
|
|
1058
|
+
body?: string;
|
|
933
1059
|
}
|
|
934
1060
|
interface AddIssueOptions {
|
|
935
1061
|
}
|
|
936
1062
|
interface FeedbackOptions {
|
|
1063
|
+
body?: string;
|
|
937
1064
|
}
|
|
938
1065
|
interface EnhanceOptions {
|
|
939
1066
|
noBrowser?: boolean;
|
|
@@ -943,6 +1070,8 @@ interface FinishOptions {
|
|
|
943
1070
|
dryRun?: boolean;
|
|
944
1071
|
pr?: number;
|
|
945
1072
|
skipBuild?: boolean;
|
|
1073
|
+
noBrowser?: boolean;
|
|
1074
|
+
cleanup?: boolean;
|
|
946
1075
|
}
|
|
947
1076
|
/**
|
|
948
1077
|
* Options for the cleanup command
|
|
@@ -1000,7 +1129,7 @@ interface ValidationResult {
|
|
|
1000
1129
|
}
|
|
1001
1130
|
interface CommitOptions {
|
|
1002
1131
|
dryRun?: boolean;
|
|
1003
|
-
issueNumber?: number;
|
|
1132
|
+
issueNumber?: string | number;
|
|
1004
1133
|
message?: string;
|
|
1005
1134
|
noReview?: boolean;
|
|
1006
1135
|
skipVerify?: boolean;
|
|
@@ -1028,30 +1157,43 @@ interface UpdateCheckResult {
|
|
|
1028
1157
|
}
|
|
1029
1158
|
type InstallationMethod = 'global' | 'local' | 'linked' | 'unknown';
|
|
1030
1159
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
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;
|
|
1043
1187
|
}
|
|
1044
1188
|
|
|
1045
|
-
declare class GitHubService {
|
|
1046
|
-
|
|
1189
|
+
declare class GitHubService implements IssueTracker {
|
|
1190
|
+
readonly providerName = "github";
|
|
1191
|
+
readonly supportsPullRequests = true;
|
|
1047
1192
|
private prompter;
|
|
1048
1193
|
constructor(options?: {
|
|
1049
|
-
branchNameStrategy?: BranchNameStrategy;
|
|
1050
|
-
useClaude?: boolean;
|
|
1051
|
-
claudeModel?: string;
|
|
1052
1194
|
prompter?: (message: string) => Promise<boolean>;
|
|
1053
1195
|
});
|
|
1054
|
-
detectInputType(input: string, repo?: string): Promise<
|
|
1196
|
+
detectInputType(input: string, repo?: string): Promise<IssueTrackerInputDetection>;
|
|
1055
1197
|
fetchIssue(issueNumber: number, repo?: string): Promise<Issue>;
|
|
1056
1198
|
isValidIssue(issueNumber: number, repo?: string): Promise<Issue | false>;
|
|
1057
1199
|
private fetchIssueInternal;
|
|
@@ -1060,9 +1202,8 @@ declare class GitHubService {
|
|
|
1060
1202
|
isValidPR(prNumber: number, repo?: string): Promise<PullRequest | false>;
|
|
1061
1203
|
private fetchPRInternal;
|
|
1062
1204
|
validatePRState(pr: PullRequest): Promise<void>;
|
|
1063
|
-
generateBranchName(options: BranchGenerationOptions): Promise<string>;
|
|
1064
1205
|
createIssue(title: string, body: string, repository?: string, labels?: string[]): Promise<{
|
|
1065
|
-
number: number;
|
|
1206
|
+
number: string | number;
|
|
1066
1207
|
url: string;
|
|
1067
1208
|
}>;
|
|
1068
1209
|
getIssueUrl(issueNumber: number, repo?: string): Promise<string>;
|
|
@@ -1072,8 +1213,35 @@ declare class GitHubService {
|
|
|
1072
1213
|
private mapGitHubIssueToIssue;
|
|
1073
1214
|
private mapGitHubPRToPullRequest;
|
|
1074
1215
|
private promptUserConfirmation;
|
|
1075
|
-
|
|
1076
|
-
|
|
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;
|
|
1077
1245
|
}
|
|
1078
1246
|
|
|
1079
1247
|
declare class EnvironmentManager {
|
|
@@ -1088,6 +1256,11 @@ declare class EnvironmentManager {
|
|
|
1088
1256
|
* Read and parse a .env file
|
|
1089
1257
|
*/
|
|
1090
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>;
|
|
1091
1264
|
/**
|
|
1092
1265
|
* Generic file copy helper that only copies if source exists
|
|
1093
1266
|
* Does not throw if source file doesn't exist - just logs and returns
|
|
@@ -1104,7 +1277,7 @@ declare class EnvironmentManager {
|
|
|
1104
1277
|
/**
|
|
1105
1278
|
* Set port environment variable for workspace
|
|
1106
1279
|
*/
|
|
1107
|
-
setPortForWorkspace(envFilePath: string, issueNumber?: number, prNumber?: number, branchName?: string): Promise<number>;
|
|
1280
|
+
setPortForWorkspace(envFilePath: string, issueNumber?: string | number, prNumber?: number, branchName?: string): Promise<number>;
|
|
1108
1281
|
/**
|
|
1109
1282
|
* Validate environment configuration
|
|
1110
1283
|
*/
|
|
@@ -1149,8 +1322,9 @@ declare class DatabaseManager {
|
|
|
1149
1322
|
* @param branchName - Name of the branch to create
|
|
1150
1323
|
* @param envFilePath - Path to .env file for configuration checks
|
|
1151
1324
|
* @param cwd - Optional working directory to run commands from
|
|
1325
|
+
* @param fromBranch - Optional parent branch to create from (for child looms)
|
|
1152
1326
|
*/
|
|
1153
|
-
createBranchIfConfigured(branchName: string, envFilePath: string, cwd?: string): Promise<string | null>;
|
|
1327
|
+
createBranchIfConfigured(branchName: string, envFilePath: string, cwd?: string, fromBranch?: string): Promise<string | null>;
|
|
1154
1328
|
/**
|
|
1155
1329
|
* Delete database branch only if configured
|
|
1156
1330
|
* Returns result object indicating what happened
|
|
@@ -1161,6 +1335,14 @@ declare class DatabaseManager {
|
|
|
1161
1335
|
* @param cwd - Optional working directory to run commands from (prevents issues with deleted directories)
|
|
1162
1336
|
*/
|
|
1163
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>;
|
|
1164
1346
|
/**
|
|
1165
1347
|
* Check if .env has the configured database URL variable
|
|
1166
1348
|
* CRITICAL: If user explicitly configured a custom variable name (not default),
|
|
@@ -1170,7 +1352,7 @@ declare class DatabaseManager {
|
|
|
1170
1352
|
}
|
|
1171
1353
|
|
|
1172
1354
|
interface TemplateVariables {
|
|
1173
|
-
ISSUE_NUMBER?: number;
|
|
1355
|
+
ISSUE_NUMBER?: string | number;
|
|
1174
1356
|
PR_NUMBER?: number;
|
|
1175
1357
|
ISSUE_TITLE?: string;
|
|
1176
1358
|
PR_TITLE?: string;
|
|
@@ -1178,6 +1360,7 @@ interface TemplateVariables {
|
|
|
1178
1360
|
PORT?: number;
|
|
1179
1361
|
ONE_SHOT_MODE?: boolean;
|
|
1180
1362
|
SETTINGS_SCHEMA?: string;
|
|
1363
|
+
SETTINGS_GLOBAL_JSON?: string;
|
|
1181
1364
|
SETTINGS_JSON?: string;
|
|
1182
1365
|
SETTINGS_LOCAL_JSON?: string;
|
|
1183
1366
|
SHELL_TYPE?: string;
|
|
@@ -1219,7 +1402,7 @@ declare class PromptTemplateManager {
|
|
|
1219
1402
|
|
|
1220
1403
|
interface ClaudeWorkflowOptions {
|
|
1221
1404
|
type: 'issue' | 'pr' | 'regular';
|
|
1222
|
-
issueNumber?: number;
|
|
1405
|
+
issueNumber?: string | number;
|
|
1223
1406
|
prNumber?: number;
|
|
1224
1407
|
title?: string;
|
|
1225
1408
|
workspacePath: string;
|
|
@@ -1251,10 +1434,6 @@ declare class ClaudeService {
|
|
|
1251
1434
|
* Launch Claude for a specific workflow
|
|
1252
1435
|
*/
|
|
1253
1436
|
launchForWorkflow(options: ClaudeWorkflowOptions): Promise<string | void>;
|
|
1254
|
-
/**
|
|
1255
|
-
* Generate branch name with Claude, with fallback on failure
|
|
1256
|
-
*/
|
|
1257
|
-
generateBranchNameWithFallback(issueTitle: string, issueNumber: number): Promise<string>;
|
|
1258
1437
|
}
|
|
1259
1438
|
|
|
1260
1439
|
interface ClaudeContext {
|
|
@@ -1305,6 +1484,12 @@ declare function isPRBranch(branchName: string): boolean;
|
|
|
1305
1484
|
* Extract PR number from branch name
|
|
1306
1485
|
*/
|
|
1307
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;
|
|
1308
1493
|
/**
|
|
1309
1494
|
* Check if a path follows worktree naming patterns
|
|
1310
1495
|
*/
|
|
@@ -1375,7 +1560,7 @@ declare function getDefaultBranch(path?: string): Promise<string>;
|
|
|
1375
1560
|
* @param path - Working directory to search from (defaults to process.cwd())
|
|
1376
1561
|
* @param settingsManager - Optional SettingsManager instance (for DI/testing)
|
|
1377
1562
|
*/
|
|
1378
|
-
declare function findAllBranchesForIssue(issueNumber: number, path?: string, settingsManager?: SettingsManager): Promise<string[]>;
|
|
1563
|
+
declare function findAllBranchesForIssue(issueNumber: string | number, path?: string, settingsManager?: SettingsManager): Promise<string[]>;
|
|
1379
1564
|
/**
|
|
1380
1565
|
* Check if a repository is empty (has no commits yet)
|
|
1381
1566
|
* @param path - Repository path to check (defaults to process.cwd())
|
|
@@ -1420,4 +1605,153 @@ interface Logger {
|
|
|
1420
1605
|
declare const logger: Logger;
|
|
1421
1606
|
declare function createLogger(options?: LoggerOptions): Logger;
|
|
1422
1607
|
|
|
1423
|
-
|
|
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 };
|