@iloom/cli 0.4.0 → 0.5.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 +24 -0
- package/dist/{BranchNamingService-TOM2KAUT.js → BranchNamingService-GCCWB3LK.js} +2 -2
- package/dist/ClaudeContextManager-DQFKIMEP.js +16 -0
- package/dist/ClaudeService-CJS32WG2.js +15 -0
- package/dist/{LoomLauncher-SJBZFZXE.js → LoomLauncher-4UG2E4CD.js} +40 -32
- package/dist/LoomLauncher-4UG2E4CD.js.map +1 -0
- package/dist/MetadataManager-WXUVXKUS.js +10 -0
- package/dist/PRManager-7DSIMCAD.js +16 -0
- package/dist/{PromptTemplateManager-2TDZAUC6.js → PromptTemplateManager-72FEOGT6.js} +2 -2
- package/dist/README.md +24 -0
- package/dist/{SettingsManager-FJFU6JJD.js → SettingsManager-XPR4TEQL.js} +2 -2
- package/dist/agents/iloom-issue-analyze-and-plan.md +41 -7
- package/dist/agents/iloom-issue-analyzer.md +38 -8
- package/dist/agents/iloom-issue-complexity-evaluator.md +45 -15
- package/dist/agents/iloom-issue-enhancer.md +60 -18
- package/dist/agents/iloom-issue-implementer.md +29 -7
- package/dist/agents/iloom-issue-planner.md +36 -7
- package/dist/agents/iloom-issue-reviewer.md +30 -7
- package/dist/{chunk-M5XUCTTJ.js → chunk-3CMGCRB5.js} +2 -2
- package/dist/{chunk-KM3W7YQX.js → chunk-4YTILIIH.js} +8 -9
- package/dist/chunk-4YTILIIH.js.map +1 -0
- package/dist/{chunk-HVGQP44L.js → chunk-AS2IRKLU.js} +2 -2
- package/dist/{chunk-ADDNFQJ4.js → chunk-CDQEK2WD.js} +6 -6
- package/dist/{chunk-74VMN2KC.js → chunk-DKQ4SUII.js} +16 -1
- package/dist/chunk-DKQ4SUII.js.map +1 -0
- package/dist/{chunk-LTNDJMTH.js → chunk-GVRO4PWE.js} +13 -9
- package/dist/chunk-GVRO4PWE.js.map +1 -0
- package/dist/{chunk-HHDSIE72.js → chunk-HABINPX2.js} +72 -16
- package/dist/{chunk-HHDSIE72.js.map → chunk-HABINPX2.js.map} +1 -1
- package/dist/{chunk-TR5MC2U6.js → chunk-LN4H3A6A.js} +66 -7
- package/dist/chunk-LN4H3A6A.js.map +1 -0
- package/dist/{chunk-VWNS6DH5.js → chunk-OOU3DKNT.js} +13 -7
- package/dist/chunk-OOU3DKNT.js.map +1 -0
- package/dist/chunk-P2ZQ5LKB.js +347 -0
- package/dist/chunk-P2ZQ5LKB.js.map +1 -0
- package/dist/{chunk-P2WZIDF3.js → chunk-QIUJPPJQ.js} +2 -2
- package/dist/{chunk-HD5SUKI2.js → chunk-RFUOIUQF.js} +49 -6
- package/dist/{chunk-HD5SUKI2.js.map → chunk-RFUOIUQF.js.map} +1 -1
- package/dist/{chunk-OF7BNW4D.js → chunk-RJKMF6BC.js} +30 -4
- package/dist/chunk-RJKMF6BC.js.map +1 -0
- package/dist/{chunk-O7WHXLCB.js → chunk-RNZMHJK7.js} +18 -4
- package/dist/chunk-RNZMHJK7.js.map +1 -0
- package/dist/{chunk-75B2HZZ5.js → chunk-RUC7OULH.js} +2 -2
- package/dist/{chunk-F4J6KEL6.js → chunk-S65T4O6I.js} +2 -2
- package/dist/{chunk-NFVFVYAP.js → chunk-T5IIUG4Z.js} +109 -20
- package/dist/chunk-T5IIUG4Z.js.map +1 -0
- package/dist/{chunk-JJUPY5MM.js → chunk-VAYGNQTE.js} +2 -2
- package/dist/{chunk-S44CHE3G.js → chunk-VTXCGKV5.js} +2 -2
- package/dist/{chunk-MLS5FAV7.js → chunk-YZTDGPFB.js} +21 -1
- package/dist/chunk-YZTDGPFB.js.map +1 -0
- package/dist/{chunk-3NFBZRPR.js → chunk-Z5NXYJIG.js} +19 -1
- package/dist/chunk-Z5NXYJIG.js.map +1 -0
- package/dist/{claude-X7EBJRB2.js → claude-ACVXNB6N.js} +4 -4
- package/dist/{cleanup-7QVPYBJJ.js → cleanup-MIDJVSIU.js} +18 -18
- package/dist/cli.js +293 -372
- package/dist/cli.js.map +1 -1
- package/dist/{contribute-RZYCYUDX.js → contribute-RS3DO3WP.js} +4 -4
- package/dist/{dev-server-LOY7YWCP.js → dev-server-ASH7HJVI.js} +28 -14
- package/dist/dev-server-ASH7HJVI.js.map +1 -0
- package/dist/{feedback-562KPG5U.js → feedback-RVIGHBJG.js} +9 -8
- package/dist/{feedback-562KPG5U.js.map → feedback-RVIGHBJG.js.map} +1 -1
- package/dist/{git-OXJACVAU.js → git-OQAPUPLP.js} +16 -6
- package/dist/git-OQAPUPLP.js.map +1 -0
- package/dist/{ignite-VSIPGKKG.js → ignite-XJALWFAT.js} +60 -25
- package/dist/ignite-XJALWFAT.js.map +1 -0
- package/dist/index.d.ts +60 -7
- package/dist/index.js +107 -7
- package/dist/index.js.map +1 -1
- package/dist/init-F6PFMSU5.js +21 -0
- package/dist/init-F6PFMSU5.js.map +1 -0
- package/dist/mcp/recap-server.js +264 -0
- package/dist/mcp/recap-server.js.map +1 -0
- package/dist/{open-CX7HUE26.js → open-KW4NTLXH.js} +15 -16
- package/dist/{open-CX7HUE26.js.map → open-KW4NTLXH.js.map} +1 -1
- package/dist/{projects-6DTNDVLH.js → projects-QEAEBAT2.js} +2 -2
- package/dist/prompts/init-prompt.txt +31 -72
- package/dist/prompts/issue-prompt.txt +115 -15
- package/dist/prompts/pr-prompt.txt +49 -1
- package/dist/prompts/regular-prompt.txt +80 -20
- package/dist/{rebase-55URTXZC.js → rebase-WZHHE5LU.js} +9 -9
- package/dist/recap-33NPZ3ZO.js +117 -0
- package/dist/recap-33NPZ3ZO.js.map +1 -0
- package/dist/{run-DP2U2CA2.js → run-HRYQ7TR7.js} +15 -16
- package/dist/{run-DP2U2CA2.js.map → run-HRYQ7TR7.js.map} +1 -1
- package/dist/schema/settings.schema.json +13 -2
- package/dist/shell-JMU5XTHW.js +240 -0
- package/dist/shell-JMU5XTHW.js.map +1 -0
- package/dist/{summary-J3CJSM7L.js → summary-4SSGGH7N.js} +20 -12
- package/dist/summary-4SSGGH7N.js.map +1 -0
- package/dist/{test-git-QLAIBJLX.js → test-git-6SAIRBUD.js} +4 -4
- package/dist/{test-prefix-6YM2ZOON.js → test-prefix-RLVRK5ZD.js} +4 -4
- package/dist/{test-tabs-JGO3VOXJ.js → test-tabs-3SCJWRKT.js} +3 -3
- package/package.json +1 -1
- package/dist/ClaudeContextManager-VEGJTS5E.js +0 -16
- package/dist/ClaudeService-ICSHJMQ5.js +0 -15
- package/dist/LoomLauncher-SJBZFZXE.js.map +0 -1
- package/dist/chunk-3NFBZRPR.js.map +0 -1
- package/dist/chunk-74VMN2KC.js.map +0 -1
- package/dist/chunk-KM3W7YQX.js.map +0 -1
- package/dist/chunk-LTNDJMTH.js.map +0 -1
- package/dist/chunk-MLS5FAV7.js.map +0 -1
- package/dist/chunk-NFVFVYAP.js.map +0 -1
- package/dist/chunk-O7WHXLCB.js.map +0 -1
- package/dist/chunk-OF7BNW4D.js.map +0 -1
- package/dist/chunk-QRBOPFAA.js +0 -48
- package/dist/chunk-QRBOPFAA.js.map +0 -1
- package/dist/chunk-TR5MC2U6.js.map +0 -1
- package/dist/chunk-VWNS6DH5.js.map +0 -1
- package/dist/dev-server-LOY7YWCP.js.map +0 -1
- package/dist/ignite-VSIPGKKG.js.map +0 -1
- package/dist/init-SCR2LQ4A.js +0 -21
- package/dist/summary-J3CJSM7L.js.map +0 -1
- /package/dist/{BranchNamingService-TOM2KAUT.js.map → BranchNamingService-GCCWB3LK.js.map} +0 -0
- /package/dist/{ClaudeContextManager-VEGJTS5E.js.map → ClaudeContextManager-DQFKIMEP.js.map} +0 -0
- /package/dist/{ClaudeService-ICSHJMQ5.js.map → ClaudeService-CJS32WG2.js.map} +0 -0
- /package/dist/{PromptTemplateManager-2TDZAUC6.js.map → MetadataManager-WXUVXKUS.js.map} +0 -0
- /package/dist/{SettingsManager-FJFU6JJD.js.map → PRManager-7DSIMCAD.js.map} +0 -0
- /package/dist/{claude-X7EBJRB2.js.map → PromptTemplateManager-72FEOGT6.js.map} +0 -0
- /package/dist/{git-OXJACVAU.js.map → SettingsManager-XPR4TEQL.js.map} +0 -0
- /package/dist/{chunk-M5XUCTTJ.js.map → chunk-3CMGCRB5.js.map} +0 -0
- /package/dist/{chunk-HVGQP44L.js.map → chunk-AS2IRKLU.js.map} +0 -0
- /package/dist/{chunk-ADDNFQJ4.js.map → chunk-CDQEK2WD.js.map} +0 -0
- /package/dist/{chunk-P2WZIDF3.js.map → chunk-QIUJPPJQ.js.map} +0 -0
- /package/dist/{chunk-75B2HZZ5.js.map → chunk-RUC7OULH.js.map} +0 -0
- /package/dist/{chunk-F4J6KEL6.js.map → chunk-S65T4O6I.js.map} +0 -0
- /package/dist/{chunk-JJUPY5MM.js.map → chunk-VAYGNQTE.js.map} +0 -0
- /package/dist/{chunk-S44CHE3G.js.map → chunk-VTXCGKV5.js.map} +0 -0
- /package/dist/{init-SCR2LQ4A.js.map → claude-ACVXNB6N.js.map} +0 -0
- /package/dist/{cleanup-7QVPYBJJ.js.map → cleanup-MIDJVSIU.js.map} +0 -0
- /package/dist/{contribute-RZYCYUDX.js.map → contribute-RS3DO3WP.js.map} +0 -0
- /package/dist/{projects-6DTNDVLH.js.map → projects-QEAEBAT2.js.map} +0 -0
- /package/dist/{rebase-55URTXZC.js.map → rebase-WZHHE5LU.js.map} +0 -0
- /package/dist/{test-git-QLAIBJLX.js.map → test-git-6SAIRBUD.js.map} +0 -0
- /package/dist/{test-prefix-6YM2ZOON.js.map → test-prefix-RLVRK5ZD.js.map} +0 -0
- /package/dist/{test-tabs-JGO3VOXJ.js.map → test-tabs-3SCJWRKT.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -381,14 +381,14 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
381
381
|
provider?: "github" | "linear" | undefined;
|
|
382
382
|
}>>;
|
|
383
383
|
mergeBehavior: z.ZodOptional<z.ZodObject<{
|
|
384
|
-
mode: z.ZodDefault<z.ZodEnum<["local", "github-pr"]>>;
|
|
384
|
+
mode: z.ZodDefault<z.ZodEnum<["local", "github-pr", "github-draft-pr"]>>;
|
|
385
385
|
remote: z.ZodOptional<z.ZodString>;
|
|
386
386
|
}, "strip", z.ZodTypeAny, {
|
|
387
|
-
mode: "local" | "github-pr";
|
|
387
|
+
mode: "local" | "github-pr" | "github-draft-pr";
|
|
388
388
|
remote?: string | undefined;
|
|
389
389
|
}, {
|
|
390
390
|
remote?: string | undefined;
|
|
391
|
-
mode?: "local" | "github-pr" | undefined;
|
|
391
|
+
mode?: "local" | "github-pr" | "github-draft-pr" | undefined;
|
|
392
392
|
}>>;
|
|
393
393
|
ide: z.ZodOptional<z.ZodObject<{
|
|
394
394
|
type: z.ZodDefault<z.ZodEnum<["vscode", "cursor", "webstorm", "sublime", "intellij", "windsurf", "antigravity"]>>;
|
|
@@ -407,8 +407,10 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
407
407
|
vscode?: boolean | undefined;
|
|
408
408
|
terminal?: boolean | undefined;
|
|
409
409
|
}>>;
|
|
410
|
+
attribution: z.ZodDefault<z.ZodEnum<["off", "upstreamOnly", "on"]>>;
|
|
410
411
|
}, "strip", z.ZodTypeAny, {
|
|
411
412
|
sourceEnvOnStart: boolean;
|
|
413
|
+
attribution: "off" | "upstreamOnly" | "on";
|
|
412
414
|
mainBranch?: string | undefined;
|
|
413
415
|
worktreePrefix?: string | undefined;
|
|
414
416
|
protectedBranches?: string[] | undefined;
|
|
@@ -476,7 +478,7 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
476
478
|
} | undefined;
|
|
477
479
|
} | undefined;
|
|
478
480
|
mergeBehavior?: {
|
|
479
|
-
mode: "local" | "github-pr";
|
|
481
|
+
mode: "local" | "github-pr" | "github-draft-pr";
|
|
480
482
|
remote?: string | undefined;
|
|
481
483
|
} | undefined;
|
|
482
484
|
ide?: {
|
|
@@ -556,7 +558,7 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
556
558
|
} | undefined;
|
|
557
559
|
mergeBehavior?: {
|
|
558
560
|
remote?: string | undefined;
|
|
559
|
-
mode?: "local" | "github-pr" | undefined;
|
|
561
|
+
mode?: "local" | "github-pr" | "github-draft-pr" | undefined;
|
|
560
562
|
} | undefined;
|
|
561
563
|
ide?: {
|
|
562
564
|
type?: "vscode" | "cursor" | "webstorm" | "sublime" | "intellij" | "windsurf" | "antigravity" | undefined;
|
|
@@ -565,6 +567,7 @@ declare const IloomSettingsSchema: z.ZodObject<{
|
|
|
565
567
|
vscode?: boolean | undefined;
|
|
566
568
|
terminal?: boolean | undefined;
|
|
567
569
|
} | undefined;
|
|
570
|
+
attribution?: "off" | "upstreamOnly" | "on" | undefined;
|
|
568
571
|
}>;
|
|
569
572
|
/**
|
|
570
573
|
* TypeScript type for iloom settings derived from Zod schema
|
|
@@ -1223,7 +1226,7 @@ interface FinishResult {
|
|
|
1223
1226
|
/** Whether this was a dry-run operation */
|
|
1224
1227
|
dryRun?: boolean;
|
|
1225
1228
|
operations: Array<{
|
|
1226
|
-
type: 'validation' | 'commit' | 'rebase' | 'merge' | 'cleanup' | 'pr-creation' | 'build';
|
|
1229
|
+
type: 'validation' | 'commit' | 'rebase' | 'merge' | 'cleanup' | 'pr-creation' | 'pr-ready' | 'build';
|
|
1227
1230
|
message: string;
|
|
1228
1231
|
success: boolean;
|
|
1229
1232
|
error?: string;
|
|
@@ -1540,6 +1543,9 @@ interface TemplateVariables {
|
|
|
1540
1543
|
BRANCH_NAME?: string;
|
|
1541
1544
|
LOOM_TYPE?: string;
|
|
1542
1545
|
COMPACT_SUMMARIES?: string;
|
|
1546
|
+
DRAFT_PR_NUMBER?: number;
|
|
1547
|
+
DRAFT_PR_MODE?: boolean;
|
|
1548
|
+
STANDARD_ISSUE_MODE?: boolean;
|
|
1543
1549
|
}
|
|
1544
1550
|
declare class PromptTemplateManager {
|
|
1545
1551
|
private templateDir;
|
|
@@ -1637,6 +1643,10 @@ interface WriteMetadataInput {
|
|
|
1637
1643
|
issueTracker: string;
|
|
1638
1644
|
colorHex: string;
|
|
1639
1645
|
sessionId: string;
|
|
1646
|
+
projectPath: string;
|
|
1647
|
+
issueUrls: Record<string, string>;
|
|
1648
|
+
prUrls: Record<string, string>;
|
|
1649
|
+
draftPrNumber?: number;
|
|
1640
1650
|
parentLoom?: {
|
|
1641
1651
|
type: 'issue' | 'pr' | 'branch';
|
|
1642
1652
|
identifier: string | number;
|
|
@@ -1659,6 +1669,10 @@ interface LoomMetadata {
|
|
|
1659
1669
|
issueTracker: string | null;
|
|
1660
1670
|
colorHex: string | null;
|
|
1661
1671
|
sessionId: string | null;
|
|
1672
|
+
projectPath: string | null;
|
|
1673
|
+
issueUrls: Record<string, string>;
|
|
1674
|
+
prUrls: Record<string, string>;
|
|
1675
|
+
draftPrNumber: number | null;
|
|
1662
1676
|
parentLoom: {
|
|
1663
1677
|
type: 'issue' | 'pr' | 'branch';
|
|
1664
1678
|
identifier: string | number;
|
|
@@ -1699,6 +1713,12 @@ declare class MetadataManager {
|
|
|
1699
1713
|
* Get the full path to the metadata file for a worktree
|
|
1700
1714
|
*/
|
|
1701
1715
|
private getFilePath;
|
|
1716
|
+
/**
|
|
1717
|
+
* Get the full path to the metadata file for a worktree (public API)
|
|
1718
|
+
* Used by other services that need to reference the metadata file location
|
|
1719
|
+
* (e.g., MCP servers that need to read loom context)
|
|
1720
|
+
*/
|
|
1721
|
+
getMetadataFilePath(worktreePath: string): string;
|
|
1702
1722
|
/**
|
|
1703
1723
|
* Write metadata for a worktree (spec section 3.1)
|
|
1704
1724
|
*
|
|
@@ -1970,6 +1990,39 @@ declare function getMergeTargetBranch(worktreePath?: string, options?: {
|
|
|
1970
1990
|
settingsManager?: SettingsManager;
|
|
1971
1991
|
metadataManager?: MetadataManager;
|
|
1972
1992
|
}): Promise<string>;
|
|
1993
|
+
/**
|
|
1994
|
+
* Placeholder commit prefix used by github-draft-pr mode.
|
|
1995
|
+
* Created during il start to enable draft PR creation (GitHub requires at least one commit ahead of base).
|
|
1996
|
+
* Removed during il finish before the final push to maintain clean commit history.
|
|
1997
|
+
*/
|
|
1998
|
+
declare const PLACEHOLDER_COMMIT_PREFIX = "[iloom-temp]";
|
|
1999
|
+
/**
|
|
2000
|
+
* Check if HEAD commit is a placeholder commit
|
|
2001
|
+
* @param cwd - Working directory (defaults to process.cwd())
|
|
2002
|
+
* @returns true if HEAD is a placeholder commit
|
|
2003
|
+
*/
|
|
2004
|
+
declare function isPlaceholderCommit(cwd?: string): Promise<boolean>;
|
|
2005
|
+
/**
|
|
2006
|
+
* Find placeholder commit SHA in history using git log --grep
|
|
2007
|
+
* @param worktreePath - Working directory
|
|
2008
|
+
* @returns SHA of placeholder commit if found, null otherwise
|
|
2009
|
+
*/
|
|
2010
|
+
declare function findPlaceholderCommitSha(worktreePath: string): Promise<string | null>;
|
|
2011
|
+
/**
|
|
2012
|
+
* Remove placeholder commit when it's HEAD
|
|
2013
|
+
* Uses soft reset to preserve any staged changes
|
|
2014
|
+
* @param worktreePath - Working directory
|
|
2015
|
+
* @returns true if placeholder was removed
|
|
2016
|
+
*/
|
|
2017
|
+
declare function removePlaceholderCommitFromHead(worktreePath: string): Promise<boolean>;
|
|
2018
|
+
/**
|
|
2019
|
+
* Remove placeholder commit from history using rebase
|
|
2020
|
+
* Used when user has made commits on top of placeholder
|
|
2021
|
+
* @param worktreePath - Working directory
|
|
2022
|
+
* @param placeholderSha - SHA of the placeholder commit to remove
|
|
2023
|
+
* @throws Error if rebase fails
|
|
2024
|
+
*/
|
|
2025
|
+
declare function removePlaceholderCommitFromHistory(worktreePath: string, placeholderSha: string): Promise<void>;
|
|
1973
2026
|
|
|
1974
2027
|
interface LoggerOptions {
|
|
1975
2028
|
prefix?: string;
|
|
@@ -2146,4 +2199,4 @@ declare class TableFormatter {
|
|
|
2146
2199
|
static previewFormatting(headers: string[], options?: TableFormatterOptions): string;
|
|
2147
2200
|
}
|
|
2148
2201
|
|
|
2149
|
-
export { type AddIssueOptions, type AddIssueResult, type BatchCleanupResult, type BranchCleanupTarget, type BranchDeleteOptions, type BranchGenerationOptions, type BranchNameStrategy, type Capability, type ClaudeContext, ClaudeContextManager, type CleanupOptions, type CleanupResult, type ColorData, type CommitOptions, type Config, type CreateLoomInput, type DatabaseDeletionResult, DatabaseManager, type DatabaseProvider, type EnhanceOptions, type EnhanceResult, type EnvFileOptions, type EnvOperationResult, type EnvVariable, EnvironmentManager, type FeedbackOptions, type FinishOptions, type FinishResult, GitHubService, type GitStatus, type GitWorktree, GitWorktreeManager, type InstallationMethod, type Issue, type IssueTracker, IssueTrackerFactory, type IssueTrackerInputDetection, type IssueTrackerProviderType, type LaunchMode, LinearMarkupConverter, type ListOptions, type Logger, type LoggerOptions, type Loom, type LoomSummary, type MergeOptions, type MergeResult, type MockOptions, type OneShotMode, type OperationResult, type PRWorktreePattern, type Platform, type PortAssignmentOptions, type ProcessInfo, type ProjectCapability, type PullRequest, type RemoteBranchStatus, type ResourceCleanupOptions, type RgbColor, type SafetyCheck, type StartOptions, type StartResult, type SummaryResult, TableFormatter, type TableFormatterOptions, type TableGenerationOptions, type UpdateCheckCache, type UpdateCheckResult, UserAbortedCommitError, type ValidationOptions, type ValidationResult, type ValidationStepResult, type Workspace, type WorkspaceInput, WorkspaceManager, type WorkspaceSummary, type Worktree, type WorktreeCleanupOptions, type WorktreeCreateOptions, type WorktreeListOptions, type WorktreeOperationResult, type WorktreeStatus, type WorktreeValidation, branchExists, checkRemoteBranchStatus, createLogger, createStderrLogger, ensureRepositoryHasCommits, executeGitCommand, extractIssueNumber, extractPRNumber, findAllBranchesForIssue, findMainWorktreePath, findMainWorktreePathWithSettings, findWorktreeForBranch, generateWorktreePath, getCurrentBranch, getDefaultBranch, getMergeTargetBranch, getRepoRoot, getWorktreeRoot, hasUncommittedChanges, isBranchMergedIntoMain, isEmptyRepository, isFileGitignored, isFileTrackedByGit, isPRBranch, isRemoteBranchUpToDate, isValidGitRepo, isWorktreePath, logger, parseWorktreeList, pushBranchToRemote };
|
|
2202
|
+
export { type AddIssueOptions, type AddIssueResult, type BatchCleanupResult, type BranchCleanupTarget, type BranchDeleteOptions, type BranchGenerationOptions, type BranchNameStrategy, type Capability, type ClaudeContext, ClaudeContextManager, type CleanupOptions, type CleanupResult, type ColorData, type CommitOptions, type Config, type CreateLoomInput, type DatabaseDeletionResult, DatabaseManager, type DatabaseProvider, type EnhanceOptions, type EnhanceResult, type EnvFileOptions, type EnvOperationResult, type EnvVariable, EnvironmentManager, type FeedbackOptions, type FinishOptions, type FinishResult, GitHubService, type GitStatus, type GitWorktree, GitWorktreeManager, type InstallationMethod, type Issue, type IssueTracker, IssueTrackerFactory, type IssueTrackerInputDetection, type IssueTrackerProviderType, type LaunchMode, LinearMarkupConverter, type ListOptions, type Logger, type LoggerOptions, type Loom, type LoomSummary, type MergeOptions, type MergeResult, type MockOptions, type OneShotMode, type OperationResult, PLACEHOLDER_COMMIT_PREFIX, type PRWorktreePattern, type Platform, type PortAssignmentOptions, type ProcessInfo, type ProjectCapability, type PullRequest, type RemoteBranchStatus, type ResourceCleanupOptions, type RgbColor, type SafetyCheck, type StartOptions, type StartResult, type SummaryResult, TableFormatter, type TableFormatterOptions, type TableGenerationOptions, type UpdateCheckCache, type UpdateCheckResult, UserAbortedCommitError, type ValidationOptions, type ValidationResult, type ValidationStepResult, type Workspace, type WorkspaceInput, WorkspaceManager, type WorkspaceSummary, type Worktree, type WorktreeCleanupOptions, type WorktreeCreateOptions, type WorktreeListOptions, type WorktreeOperationResult, type WorktreeStatus, type WorktreeValidation, branchExists, checkRemoteBranchStatus, createLogger, createStderrLogger, ensureRepositoryHasCommits, executeGitCommand, extractIssueNumber, extractPRNumber, findAllBranchesForIssue, findMainWorktreePath, findMainWorktreePathWithSettings, findPlaceholderCommitSha, findWorktreeForBranch, generateWorktreePath, getCurrentBranch, getDefaultBranch, getMergeTargetBranch, getRepoRoot, getWorktreeRoot, hasUncommittedChanges, isBranchMergedIntoMain, isEmptyRepository, isFileGitignored, isFileTrackedByGit, isPRBranch, isPlaceholderCommit, isRemoteBranchUpToDate, isValidGitRepo, isWorktreePath, logger, parseWorktreeList, pushBranchToRemote, removePlaceholderCommitFromHead, removePlaceholderCommitFromHistory };
|
package/dist/index.js
CHANGED
|
@@ -330,9 +330,9 @@ var init_SettingsManager = __esm({
|
|
|
330
330
|
}).optional()
|
|
331
331
|
}).optional().describe("Issue management configuration"),
|
|
332
332
|
mergeBehavior: z.object({
|
|
333
|
-
mode: z.enum(["local", "github-pr"]).default("local"),
|
|
333
|
+
mode: z.enum(["local", "github-pr", "github-draft-pr"]).default("local"),
|
|
334
334
|
remote: z.string().optional()
|
|
335
|
-
}).optional().describe("Merge behavior configuration: local (merge locally) or github-pr (create PR)"),
|
|
335
|
+
}).optional().describe("Merge behavior configuration: local (merge locally), github-pr (create PR), or github-draft-pr (create draft PR at start, mark ready on finish)"),
|
|
336
336
|
ide: z.object({
|
|
337
337
|
type: z.enum(["vscode", "cursor", "webstorm", "sublime", "intellij", "windsurf", "antigravity"]).default("vscode").describe(
|
|
338
338
|
"IDE to launch when starting a loom. Options: vscode (Visual Studio Code), cursor (Cursor AI editor), webstorm (JetBrains WebStorm), sublime (Sublime Text), intellij (JetBrains IntelliJ IDEA), windsurf (Windsurf editor), antigravity (Antigravity IDE)."
|
|
@@ -345,7 +345,10 @@ var init_SettingsManager = __esm({
|
|
|
345
345
|
vscode: z.boolean().default(false).describe(
|
|
346
346
|
"Apply VSCode/Cursor title bar colors based on branch name. Note: This modifies .vscode/settings.json which may be in source control. Default is false for safety; enable via init or explicitly if .vscode is gitignored."
|
|
347
347
|
)
|
|
348
|
-
}).optional().describe("Color synchronization settings for workspace identification")
|
|
348
|
+
}).optional().describe("Color synchronization settings for workspace identification"),
|
|
349
|
+
attribution: z.enum(["off", "upstreamOnly", "on"]).default("upstreamOnly").describe(
|
|
350
|
+
'Controls when iloom attribution appears in session summaries. "off" - never show attribution. "upstreamOnly" - only show for contributions to external repositories (e.g., open source). "on" - always show attribution.'
|
|
351
|
+
)
|
|
349
352
|
});
|
|
350
353
|
IloomSettingsSchemaNoDefaults = z.object({
|
|
351
354
|
mainBranch: z.string().min(1, "Settings 'mainBranch' cannot be empty").optional().describe("Name of the main/primary branch for the repository"),
|
|
@@ -398,9 +401,9 @@ var init_SettingsManager = __esm({
|
|
|
398
401
|
}).optional()
|
|
399
402
|
}).optional().describe("Issue management configuration"),
|
|
400
403
|
mergeBehavior: z.object({
|
|
401
|
-
mode: z.enum(["local", "github-pr"]).optional(),
|
|
404
|
+
mode: z.enum(["local", "github-pr", "github-draft-pr"]).optional(),
|
|
402
405
|
remote: z.string().optional()
|
|
403
|
-
}).optional().describe("Merge behavior configuration: local (merge locally) or github-pr (create PR)"),
|
|
406
|
+
}).optional().describe("Merge behavior configuration: local (merge locally), github-pr (create PR), or github-draft-pr (create draft PR at start, mark ready on finish)"),
|
|
404
407
|
ide: z.object({
|
|
405
408
|
type: z.enum(["vscode", "cursor", "webstorm", "sublime", "intellij", "windsurf", "antigravity"]).optional().describe(
|
|
406
409
|
"IDE to launch when starting a loom. Options: vscode (Visual Studio Code), cursor (Cursor AI editor), webstorm (JetBrains WebStorm), sublime (Sublime Text), intellij (JetBrains IntelliJ IDEA), windsurf (Windsurf editor), antigravity (Antigravity IDE)."
|
|
@@ -413,7 +416,10 @@ var init_SettingsManager = __esm({
|
|
|
413
416
|
vscode: z.boolean().optional().describe(
|
|
414
417
|
"Apply VSCode/Cursor title bar colors based on branch name. Note: This modifies .vscode/settings.json which may be in source control."
|
|
415
418
|
)
|
|
416
|
-
}).optional().describe("Color synchronization settings for workspace identification")
|
|
419
|
+
}).optional().describe("Color synchronization settings for workspace identification"),
|
|
420
|
+
attribution: z.enum(["off", "upstreamOnly", "on"]).optional().describe(
|
|
421
|
+
'Controls when iloom attribution appears in session summaries. "off" - never show attribution. "upstreamOnly" - only show for contributions to external repositories (e.g., open source). "on" - always show attribution.'
|
|
422
|
+
)
|
|
417
423
|
});
|
|
418
424
|
SettingsManager = class {
|
|
419
425
|
/**
|
|
@@ -870,6 +876,14 @@ var MetadataManager = class {
|
|
|
870
876
|
const filename = this.slugifyPath(worktreePath);
|
|
871
877
|
return path2.join(this.loomsDir, filename);
|
|
872
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* Get the full path to the metadata file for a worktree (public API)
|
|
881
|
+
* Used by other services that need to reference the metadata file location
|
|
882
|
+
* (e.g., MCP servers that need to read loom context)
|
|
883
|
+
*/
|
|
884
|
+
getMetadataFilePath(worktreePath) {
|
|
885
|
+
return this.getFilePath(worktreePath);
|
|
886
|
+
}
|
|
873
887
|
/**
|
|
874
888
|
* Write metadata for a worktree (spec section 3.1)
|
|
875
889
|
*
|
|
@@ -891,6 +905,10 @@ var MetadataManager = class {
|
|
|
891
905
|
issueTracker: input.issueTracker,
|
|
892
906
|
colorHex: input.colorHex,
|
|
893
907
|
sessionId: input.sessionId,
|
|
908
|
+
projectPath: input.projectPath,
|
|
909
|
+
issueUrls: input.issueUrls,
|
|
910
|
+
prUrls: input.prUrls,
|
|
911
|
+
...input.draftPrNumber && { draftPrNumber: input.draftPrNumber },
|
|
894
912
|
...input.parentLoom && { parentLoom: input.parentLoom }
|
|
895
913
|
};
|
|
896
914
|
const filePath = this.getFilePath(worktreePath);
|
|
@@ -930,6 +948,10 @@ var MetadataManager = class {
|
|
|
930
948
|
issueTracker: data.issueTracker ?? null,
|
|
931
949
|
colorHex: data.colorHex ?? null,
|
|
932
950
|
sessionId: data.sessionId ?? null,
|
|
951
|
+
projectPath: data.projectPath ?? null,
|
|
952
|
+
issueUrls: data.issueUrls ?? {},
|
|
953
|
+
prUrls: data.prUrls ?? {},
|
|
954
|
+
draftPrNumber: data.draftPrNumber ?? null,
|
|
933
955
|
parentLoom: data.parentLoom ?? null
|
|
934
956
|
};
|
|
935
957
|
} catch (error) {
|
|
@@ -976,6 +998,10 @@ var MetadataManager = class {
|
|
|
976
998
|
issueTracker: data.issueTracker ?? null,
|
|
977
999
|
colorHex: data.colorHex ?? null,
|
|
978
1000
|
sessionId: data.sessionId ?? null,
|
|
1001
|
+
projectPath: data.projectPath ?? null,
|
|
1002
|
+
issueUrls: data.issueUrls ?? {},
|
|
1003
|
+
prUrls: data.prUrls ?? {},
|
|
1004
|
+
draftPrNumber: data.draftPrNumber ?? null,
|
|
979
1005
|
parentLoom: data.parentLoom ?? null
|
|
980
1006
|
});
|
|
981
1007
|
} catch (error) {
|
|
@@ -1455,6 +1481,8 @@ async function pushBranchToRemote(branchName, worktreePath, options) {
|
|
|
1455
1481
|
throw new Error(
|
|
1456
1482
|
`Failed to push changes to origin/${branchName}
|
|
1457
1483
|
|
|
1484
|
+
Git error: ${errorMessage}
|
|
1485
|
+
|
|
1458
1486
|
Possible causes:
|
|
1459
1487
|
\u2022 Remote branch was deleted
|
|
1460
1488
|
\u2022 Push was rejected (non-fast-forward)
|
|
@@ -1468,6 +1496,8 @@ async function pushBranchToRemote(branchName, worktreePath, options) {
|
|
|
1468
1496
|
throw new Error(
|
|
1469
1497
|
`Failed to push changes to origin/${branchName}: Network connectivity issues
|
|
1470
1498
|
|
|
1499
|
+
Git error: ${errorMessage}
|
|
1500
|
+
|
|
1471
1501
|
Check your internet connection and try again.`
|
|
1472
1502
|
);
|
|
1473
1503
|
}
|
|
@@ -1475,6 +1505,8 @@ async function pushBranchToRemote(branchName, worktreePath, options) {
|
|
|
1475
1505
|
throw new Error(
|
|
1476
1506
|
`Failed to push changes: Remote 'origin' not found
|
|
1477
1507
|
|
|
1508
|
+
Git error: ${errorMessage}
|
|
1509
|
+
|
|
1478
1510
|
Configure remote: git remote add origin <url>`
|
|
1479
1511
|
);
|
|
1480
1512
|
}
|
|
@@ -1620,6 +1652,54 @@ async function getMergeTargetBranch(worktreePath = process.cwd(), options) {
|
|
|
1620
1652
|
logger.debug(`Using configured main branch as merge target: ${mainBranch}`);
|
|
1621
1653
|
return mainBranch;
|
|
1622
1654
|
}
|
|
1655
|
+
var PLACEHOLDER_COMMIT_PREFIX = "[iloom-temp]";
|
|
1656
|
+
async function isPlaceholderCommit(cwd = process.cwd()) {
|
|
1657
|
+
try {
|
|
1658
|
+
const subject = await executeGitCommand(["log", "-1", "--format=%s", "HEAD"], { cwd });
|
|
1659
|
+
return subject.trim().startsWith(PLACEHOLDER_COMMIT_PREFIX);
|
|
1660
|
+
} catch {
|
|
1661
|
+
return false;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
async function findPlaceholderCommitSha(worktreePath) {
|
|
1665
|
+
try {
|
|
1666
|
+
const log = await executeGitCommand(
|
|
1667
|
+
["log", "--format=%H", "--fixed-strings", "--grep", PLACEHOLDER_COMMIT_PREFIX, "-n", "1"],
|
|
1668
|
+
{ cwd: worktreePath }
|
|
1669
|
+
);
|
|
1670
|
+
const sha = log.trim();
|
|
1671
|
+
if (sha.length === 0) {
|
|
1672
|
+
return null;
|
|
1673
|
+
}
|
|
1674
|
+
const subject = await executeGitCommand(
|
|
1675
|
+
["log", "-1", "--format=%s", sha],
|
|
1676
|
+
{ cwd: worktreePath }
|
|
1677
|
+
);
|
|
1678
|
+
if (!subject.trim().startsWith(PLACEHOLDER_COMMIT_PREFIX)) {
|
|
1679
|
+
return null;
|
|
1680
|
+
}
|
|
1681
|
+
return sha;
|
|
1682
|
+
} catch {
|
|
1683
|
+
return null;
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
async function removePlaceholderCommitFromHead(worktreePath) {
|
|
1687
|
+
if (!await isPlaceholderCommit(worktreePath)) {
|
|
1688
|
+
return false;
|
|
1689
|
+
}
|
|
1690
|
+
await executeGitCommand(["reset", "--soft", "HEAD~1"], { cwd: worktreePath });
|
|
1691
|
+
return true;
|
|
1692
|
+
}
|
|
1693
|
+
async function removePlaceholderCommitFromHistory(worktreePath, placeholderSha) {
|
|
1694
|
+
const parentSha = await executeGitCommand(
|
|
1695
|
+
["rev-parse", `${placeholderSha}^`],
|
|
1696
|
+
{ cwd: worktreePath }
|
|
1697
|
+
);
|
|
1698
|
+
await executeGitCommand(
|
|
1699
|
+
["rebase", "--onto", parentSha.trim(), placeholderSha],
|
|
1700
|
+
{ cwd: worktreePath }
|
|
1701
|
+
);
|
|
1702
|
+
}
|
|
1623
1703
|
|
|
1624
1704
|
// src/lib/GitWorktreeManager.ts
|
|
1625
1705
|
var GitWorktreeManager = class {
|
|
@@ -3945,6 +4025,9 @@ var PromptTemplateManager = class {
|
|
|
3945
4025
|
if (variables.COMPACT_SUMMARIES !== void 0) {
|
|
3946
4026
|
result = result.replace(/COMPACT_SUMMARIES/g, variables.COMPACT_SUMMARIES);
|
|
3947
4027
|
}
|
|
4028
|
+
if (variables.DRAFT_PR_NUMBER !== void 0) {
|
|
4029
|
+
result = result.replace(/DRAFT_PR_NUMBER/g, String(variables.DRAFT_PR_NUMBER));
|
|
4030
|
+
}
|
|
3948
4031
|
return result;
|
|
3949
4032
|
}
|
|
3950
4033
|
/**
|
|
@@ -4015,6 +4098,18 @@ var PromptTemplateManager = class {
|
|
|
4015
4098
|
} else {
|
|
4016
4099
|
result = result.replace(compactSummariesRegex, "");
|
|
4017
4100
|
}
|
|
4101
|
+
const draftPrModeRegex = /\{\{#IF DRAFT_PR_MODE\}\}(.*?)\{\{\/IF DRAFT_PR_MODE\}\}/gs;
|
|
4102
|
+
if (variables.DRAFT_PR_MODE === true) {
|
|
4103
|
+
result = result.replace(draftPrModeRegex, "$1");
|
|
4104
|
+
} else {
|
|
4105
|
+
result = result.replace(draftPrModeRegex, "");
|
|
4106
|
+
}
|
|
4107
|
+
const standardIssueModeRegex = /\{\{#IF STANDARD_ISSUE_MODE\}\}(.*?)\{\{\/IF STANDARD_ISSUE_MODE\}\}/gs;
|
|
4108
|
+
if (variables.STANDARD_ISSUE_MODE === true) {
|
|
4109
|
+
result = result.replace(standardIssueModeRegex, "$1");
|
|
4110
|
+
} else {
|
|
4111
|
+
result = result.replace(standardIssueModeRegex, "");
|
|
4112
|
+
}
|
|
4018
4113
|
return result;
|
|
4019
4114
|
}
|
|
4020
4115
|
/**
|
|
@@ -4507,6 +4602,7 @@ export {
|
|
|
4507
4602
|
GitWorktreeManager,
|
|
4508
4603
|
IssueTrackerFactory,
|
|
4509
4604
|
LinearMarkupConverter,
|
|
4605
|
+
PLACEHOLDER_COMMIT_PREFIX,
|
|
4510
4606
|
TableFormatter,
|
|
4511
4607
|
UserAbortedCommitError,
|
|
4512
4608
|
WorkspaceManager,
|
|
@@ -4521,6 +4617,7 @@ export {
|
|
|
4521
4617
|
findAllBranchesForIssue,
|
|
4522
4618
|
findMainWorktreePath,
|
|
4523
4619
|
findMainWorktreePathWithSettings,
|
|
4620
|
+
findPlaceholderCommitSha,
|
|
4524
4621
|
findWorktreeForBranch,
|
|
4525
4622
|
generateWorktreePath,
|
|
4526
4623
|
getCurrentBranch,
|
|
@@ -4534,11 +4631,14 @@ export {
|
|
|
4534
4631
|
isFileGitignored,
|
|
4535
4632
|
isFileTrackedByGit,
|
|
4536
4633
|
isPRBranch,
|
|
4634
|
+
isPlaceholderCommit,
|
|
4537
4635
|
isRemoteBranchUpToDate,
|
|
4538
4636
|
isValidGitRepo,
|
|
4539
4637
|
isWorktreePath,
|
|
4540
4638
|
logger,
|
|
4541
4639
|
parseWorktreeList,
|
|
4542
|
-
pushBranchToRemote
|
|
4640
|
+
pushBranchToRemote,
|
|
4641
|
+
removePlaceholderCommitFromHead,
|
|
4642
|
+
removePlaceholderCommitFromHistory
|
|
4543
4643
|
};
|
|
4544
4644
|
//# sourceMappingURL=index.js.map
|