@iloom/cli 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +6 -4
  3. package/dist/{BranchNamingService-FLPUUFOB.js → BranchNamingService-AO7BPIUJ.js} +2 -2
  4. package/dist/{ClaudeContextManager-KE5TBZVZ.js → ClaudeContextManager-Y2YJC6BU.js} +4 -4
  5. package/dist/{ClaudeService-CRSETT3A.js → ClaudeService-NDVFQRKC.js} +3 -3
  6. package/dist/{LoomLauncher-NL65LSKP.js → LoomLauncher-U2B3VHPC.js} +4 -4
  7. package/dist/{PRManager-2ABCWXHW.js → PRManager-6ZJZRG5Z.js} +4 -4
  8. package/dist/README.md +6 -4
  9. package/dist/agents/iloom-issue-analyze-and-plan.md +1 -1
  10. package/dist/agents/iloom-issue-analyzer.md +1 -1
  11. package/dist/agents/iloom-issue-complexity-evaluator.md +1 -1
  12. package/dist/agents/iloom-issue-enhancer.md +1 -1
  13. package/dist/agents/iloom-issue-implementer.md +1 -1
  14. package/dist/agents/iloom-issue-planner.md +1 -1
  15. package/dist/agents/iloom-issue-reviewer.md +1 -1
  16. package/dist/{chunk-FM4KBPVA.js → chunk-3K3WY3BN.js} +2 -118
  17. package/dist/chunk-3K3WY3BN.js.map +1 -0
  18. package/dist/{chunk-6TL3BYH6.js → chunk-64HCHVJM.js} +2 -2
  19. package/dist/{chunk-QQFBMCAH.js → chunk-77VLG2KP.js} +20 -17
  20. package/dist/chunk-77VLG2KP.js.map +1 -0
  21. package/dist/{chunk-FEAJR6PN.js → chunk-C7YW5IMS.js} +2 -2
  22. package/dist/{chunk-DAOS6EC3.js → chunk-CAXFWFV6.js} +5 -3
  23. package/dist/{chunk-DAOS6EC3.js.map → chunk-CAXFWFV6.js.map} +1 -1
  24. package/dist/chunk-CFQVOTHO.js +111 -0
  25. package/dist/chunk-CFQVOTHO.js.map +1 -0
  26. package/dist/{chunk-AFRICMSW.js → chunk-ENMTWE74.js} +2 -2
  27. package/dist/{chunk-FP7G7DG3.js → chunk-IGKPPACU.js} +8 -3
  28. package/dist/chunk-IGKPPACU.js.map +1 -0
  29. package/dist/{chunk-CNSTXBJ3.js → chunk-KSXA2NOJ.js} +9 -5
  30. package/dist/chunk-KSXA2NOJ.js.map +1 -0
  31. package/dist/{chunk-GJMEKEI5.js → chunk-LZBSLO6S.js} +76 -1
  32. package/dist/chunk-LZBSLO6S.js.map +1 -0
  33. package/dist/{chunk-YQNSZKKT.js → chunk-NEPH2O4C.js} +8 -4
  34. package/dist/chunk-NEPH2O4C.js.map +1 -0
  35. package/dist/{chunk-KVS4XGBQ.js → chunk-O36JLYNW.js} +2 -2
  36. package/dist/{chunk-C3AKFAIR.js → chunk-Q457PKGH.js} +2 -2
  37. package/dist/{chunk-EPPPDVHD.js → chunk-TB6475EW.js} +6 -4
  38. package/dist/chunk-TB6475EW.js.map +1 -0
  39. package/dist/{chunk-HVQNVRAF.js → chunk-VYKKWU36.js} +96 -3
  40. package/dist/chunk-VYKKWU36.js.map +1 -0
  41. package/dist/{chunk-453NC377.js → chunk-WZYBHD7P.js} +3 -106
  42. package/dist/chunk-WZYBHD7P.js.map +1 -0
  43. package/dist/chunk-XAMBIVXE.js +121 -0
  44. package/dist/chunk-XAMBIVXE.js.map +1 -0
  45. package/dist/{claude-6H36IBHO.js → claude-V4HRPR4Z.js} +2 -2
  46. package/dist/{cleanup-77U5ATYI.js → cleanup-DB7EFBF3.js} +9 -6
  47. package/dist/{cleanup-77U5ATYI.js.map → cleanup-DB7EFBF3.js.map} +1 -1
  48. package/dist/cli.js +104 -156
  49. package/dist/cli.js.map +1 -1
  50. package/dist/{commit-ONRXU67O.js → commit-NGMDWWAP.js} +4 -4
  51. package/dist/{dev-server-UKAPBGUR.js → dev-server-OAP3RZC6.js} +4 -3
  52. package/dist/{dev-server-UKAPBGUR.js.map → dev-server-OAP3RZC6.js.map} +1 -1
  53. package/dist/{feedback-K3A4QUSG.js → feedback-ZLAX3BVL.js} +4 -3
  54. package/dist/{feedback-K3A4QUSG.js.map → feedback-ZLAX3BVL.js.map} +1 -1
  55. package/dist/{ignite-YUAOJ5PP.js → ignite-HA2OJF6Z.js} +26 -40
  56. package/dist/ignite-HA2OJF6Z.js.map +1 -0
  57. package/dist/index.js +4 -1
  58. package/dist/index.js.map +1 -1
  59. package/dist/{init-XQQMFDM6.js → init-S6IEGRSX.js} +3 -3
  60. package/dist/mcp/issue-management-server.js +157 -9
  61. package/dist/mcp/issue-management-server.js.map +1 -1
  62. package/dist/{open-QI63XQ4F.js → open-IN3LUZXX.js} +4 -3
  63. package/dist/{open-QI63XQ4F.js.map → open-IN3LUZXX.js.map} +1 -1
  64. package/dist/{projects-TWY4RT2Z.js → projects-CTRTTMSK.js} +25 -9
  65. package/dist/projects-CTRTTMSK.js.map +1 -0
  66. package/dist/prompts/issue-prompt.txt +16 -0
  67. package/dist/prompts/pr-prompt.txt +33 -13
  68. package/dist/prompts/regular-prompt.txt +7 -0
  69. package/dist/{rebase-QYCRF7JG.js → rebase-RLEVFHWN.js} +3 -3
  70. package/dist/{run-YDVYORT2.js → run-QEIS2EH2.js} +4 -3
  71. package/dist/{run-YDVYORT2.js.map → run-QEIS2EH2.js.map} +1 -1
  72. package/dist/{summary-G6L3VAKK.js → summary-2KLNHVTN.js} +4 -4
  73. package/dist/{test-webserver-NRMGT2HB.js → test-webserver-J6SMNLU2.js} +3 -2
  74. package/dist/{test-webserver-NRMGT2HB.js.map → test-webserver-J6SMNLU2.js.map} +1 -1
  75. package/package.json +1 -1
  76. package/dist/chunk-453NC377.js.map +0 -1
  77. package/dist/chunk-CNSTXBJ3.js.map +0 -1
  78. package/dist/chunk-EPPPDVHD.js.map +0 -1
  79. package/dist/chunk-FM4KBPVA.js.map +0 -1
  80. package/dist/chunk-FP7G7DG3.js.map +0 -1
  81. package/dist/chunk-GJMEKEI5.js.map +0 -1
  82. package/dist/chunk-HVQNVRAF.js.map +0 -1
  83. package/dist/chunk-QQFBMCAH.js.map +0 -1
  84. package/dist/chunk-YQNSZKKT.js.map +0 -1
  85. package/dist/ignite-YUAOJ5PP.js.map +0 -1
  86. package/dist/projects-TWY4RT2Z.js.map +0 -1
  87. /package/dist/{BranchNamingService-FLPUUFOB.js.map → BranchNamingService-AO7BPIUJ.js.map} +0 -0
  88. /package/dist/{ClaudeContextManager-KE5TBZVZ.js.map → ClaudeContextManager-Y2YJC6BU.js.map} +0 -0
  89. /package/dist/{ClaudeService-CRSETT3A.js.map → ClaudeService-NDVFQRKC.js.map} +0 -0
  90. /package/dist/{LoomLauncher-NL65LSKP.js.map → LoomLauncher-U2B3VHPC.js.map} +0 -0
  91. /package/dist/{PRManager-2ABCWXHW.js.map → PRManager-6ZJZRG5Z.js.map} +0 -0
  92. /package/dist/{chunk-6TL3BYH6.js.map → chunk-64HCHVJM.js.map} +0 -0
  93. /package/dist/{chunk-FEAJR6PN.js.map → chunk-C7YW5IMS.js.map} +0 -0
  94. /package/dist/{chunk-AFRICMSW.js.map → chunk-ENMTWE74.js.map} +0 -0
  95. /package/dist/{chunk-KVS4XGBQ.js.map → chunk-O36JLYNW.js.map} +0 -0
  96. /package/dist/{chunk-C3AKFAIR.js.map → chunk-Q457PKGH.js.map} +0 -0
  97. /package/dist/{claude-6H36IBHO.js.map → claude-V4HRPR4Z.js.map} +0 -0
  98. /package/dist/{commit-ONRXU67O.js.map → commit-NGMDWWAP.js.map} +0 -0
  99. /package/dist/{init-XQQMFDM6.js.map → init-S6IEGRSX.js.map} +0 -0
  100. /package/dist/{rebase-QYCRF7JG.js.map → rebase-RLEVFHWN.js.map} +0 -0
  101. /package/dist/{summary-G6L3VAKK.js.map → summary-2KLNHVTN.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  InitCommand
4
- } from "./chunk-FEAJR6PN.js";
4
+ } from "./chunk-C7YW5IMS.js";
5
5
  import "./chunk-Q7POFB5Q.js";
6
6
  import "./chunk-F2PWIRV4.js";
7
7
  import "./chunk-N7FVXZNI.js";
@@ -12,10 +12,10 @@ import "./chunk-ZA575VLF.js";
12
12
  import "./chunk-WFQ5CLTR.js";
13
13
  import "./chunk-VWGKGNJP.js";
14
14
  import "./chunk-ZX3GTM7O.js";
15
- import "./chunk-FP7G7DG3.js";
15
+ import "./chunk-IGKPPACU.js";
16
16
  import "./chunk-6MLEBAYZ.js";
17
17
  import "./chunk-VT4PDUYT.js";
18
18
  export {
19
19
  InitCommand
20
20
  };
21
- //# sourceMappingURL=init-XQQMFDM6.js.map
21
+ //# sourceMappingURL=init-S6IEGRSX.js.map
@@ -316,6 +316,74 @@ var GitHubIssueManagementProvider = class {
316
316
  }
317
317
  return result;
318
318
  }
319
+ /**
320
+ * Fetch pull request details using gh CLI
321
+ * Normalizes GitHub-specific fields to provider-agnostic format
322
+ */
323
+ async getPR(input) {
324
+ const { number, includeComments = true, repo } = input;
325
+ const prNumber = parseInt(number, 10);
326
+ if (isNaN(prNumber)) {
327
+ throw new Error(`Invalid GitHub PR number: ${number}. GitHub PR IDs must be numeric.`);
328
+ }
329
+ const baseFields = "number,title,body,state,url,author,headRefName,baseRefName,files,commits";
330
+ const fields = includeComments ? `${baseFields},comments` : baseFields;
331
+ const args = [
332
+ "pr",
333
+ "view",
334
+ String(prNumber),
335
+ "--json",
336
+ fields
337
+ ];
338
+ if (repo) {
339
+ args.push("--repo", repo);
340
+ }
341
+ const raw = await executeGhCommand(args);
342
+ const result = {
343
+ // Core fields
344
+ id: String(raw.number),
345
+ number: raw.number,
346
+ title: raw.title,
347
+ body: raw.body,
348
+ state: raw.state,
349
+ url: raw.url,
350
+ // Normalized author
351
+ author: normalizeAuthor(raw.author),
352
+ // PR-specific fields
353
+ headRefName: raw.headRefName,
354
+ baseRefName: raw.baseRefName,
355
+ // Optional files
356
+ ...raw.files && {
357
+ files: raw.files
358
+ },
359
+ // Optional commits - normalize author
360
+ ...raw.commits && {
361
+ commits: raw.commits.map((commit) => {
362
+ var _a;
363
+ return {
364
+ oid: commit.oid,
365
+ messageHeadline: commit.messageHeadline,
366
+ author: ((_a = commit.authors) == null ? void 0 : _a[0]) ? {
367
+ id: commit.authors[0].email,
368
+ displayName: commit.authors[0].name,
369
+ name: commit.authors[0].name,
370
+ email: commit.authors[0].email
371
+ } : null
372
+ };
373
+ })
374
+ }
375
+ };
376
+ if (raw.comments !== void 0) {
377
+ result.comments = raw.comments.map((comment) => ({
378
+ id: extractNumericIdFromUrl(comment.url),
379
+ body: comment.body,
380
+ createdAt: comment.createdAt,
381
+ author: normalizeAuthor(comment.author),
382
+ ...comment.updatedAt && { updatedAt: comment.updatedAt }
383
+ }));
384
+ }
385
+ return result;
386
+ }
319
387
  /**
320
388
  * Fetch a specific comment by ID using gh API
321
389
  * Normalizes author to FlexibleAuthor format
@@ -883,6 +951,13 @@ var LinearIssueManagementProvider = class {
883
951
  }
884
952
  return result;
885
953
  }
954
+ /**
955
+ * Fetch pull request details
956
+ * Linear does not support PRs - this throws an error directing to use GitHub
957
+ */
958
+ async getPR(_input) {
959
+ throw new Error("Linear does not support pull requests. PRs exist only on GitHub. Use the GitHub provider for PR operations.");
960
+ }
886
961
  /**
887
962
  * Fetch comments for an issue
888
963
  */
@@ -1104,6 +1179,80 @@ server.registerTool(
1104
1179
  }
1105
1180
  }
1106
1181
  );
1182
+ server.registerTool(
1183
+ "get_pr",
1184
+ {
1185
+ title: "Get Pull Request",
1186
+ description: "Fetch pull request details including title, body, comments, files, commits, and branch information. PRs only exist on GitHub, so this tool always uses GitHub regardless of configured issue tracker. Author fields have normalized core fields: { id, displayName } plus provider-specific fields.",
1187
+ inputSchema: {
1188
+ number: z.string().describe("The PR number"),
1189
+ includeComments: z.boolean().optional().describe("Whether to include comments (default: true)"),
1190
+ repo: z.string().optional().describe(
1191
+ 'Optional repository in "owner/repo" format or full GitHub URL. When not provided, uses the current repository.'
1192
+ )
1193
+ },
1194
+ outputSchema: {
1195
+ // Core validated fields
1196
+ id: z.string().describe("PR identifier"),
1197
+ number: z.number().describe("PR number"),
1198
+ title: z.string().describe("PR title"),
1199
+ body: z.string().describe("PR body/description"),
1200
+ state: z.string().describe("PR state (OPEN, CLOSED, MERGED)"),
1201
+ url: z.string().describe("PR URL"),
1202
+ // Branch info
1203
+ headRefName: z.string().describe("Source branch name"),
1204
+ baseRefName: z.string().describe("Target branch name"),
1205
+ // Flexible author - core fields + passthrough
1206
+ author: flexibleAuthorSchema.nullable().describe(
1207
+ "PR author with normalized { id, displayName } plus provider-specific fields"
1208
+ ),
1209
+ // Optional flexible arrays
1210
+ files: z.array(
1211
+ z.object({
1212
+ path: z.string(),
1213
+ additions: z.number(),
1214
+ deletions: z.number()
1215
+ }).passthrough()
1216
+ ).optional().describe("Changed files in the PR"),
1217
+ commits: z.array(
1218
+ z.object({
1219
+ oid: z.string(),
1220
+ messageHeadline: z.string(),
1221
+ author: flexibleAuthorSchema.nullable()
1222
+ }).passthrough()
1223
+ ).optional().describe("Commits in the PR"),
1224
+ comments: z.array(
1225
+ z.object({
1226
+ id: z.string(),
1227
+ body: z.string(),
1228
+ author: flexibleAuthorSchema.nullable(),
1229
+ createdAt: z.string()
1230
+ }).passthrough()
1231
+ ).optional().describe("PR comments")
1232
+ }
1233
+ },
1234
+ async ({ number, includeComments, repo }) => {
1235
+ console.error(`Fetching PR ${number}${repo ? ` from ${repo}` : ""}`);
1236
+ try {
1237
+ const provider = new GitHubIssueManagementProvider();
1238
+ const result = await provider.getPR({ number, includeComments, repo });
1239
+ console.error(`PR fetched successfully: #${result.number} - ${result.title}`);
1240
+ return {
1241
+ content: [
1242
+ {
1243
+ type: "text",
1244
+ text: JSON.stringify(result)
1245
+ }
1246
+ ],
1247
+ structuredContent: result
1248
+ };
1249
+ } catch (error) {
1250
+ const errorMessage = error instanceof Error ? error.message : "Unknown error";
1251
+ console.error(`Failed to fetch PR: ${errorMessage}`);
1252
+ throw new Error(`Failed to fetch PR: ${errorMessage}`);
1253
+ }
1254
+ }
1255
+ );
1107
1256
  server.registerTool(
1108
1257
  "get_comment",
1109
1258
  {
@@ -1169,9 +1318,8 @@ server.registerTool(
1169
1318
  async ({ number, body, type }) => {
1170
1319
  console.error(`Creating ${type} comment on ${number}`);
1171
1320
  try {
1172
- const provider = IssueManagementProviderFactory.create(
1173
- process.env.ISSUE_PROVIDER
1174
- );
1321
+ const providerType = type === "pr" ? "github" : process.env.ISSUE_PROVIDER;
1322
+ const provider = IssueManagementProviderFactory.create(providerType);
1175
1323
  const result = await provider.createComment({ number, body, type });
1176
1324
  console.error(
1177
1325
  `Comment created successfully: ${result.id} at ${result.url}`
@@ -1200,7 +1348,8 @@ server.registerTool(
1200
1348
  inputSchema: {
1201
1349
  commentId: z.string().describe("The comment identifier to update"),
1202
1350
  number: z.string().describe("The issue or PR identifier (context for providers that need it)"),
1203
- body: z.string().describe("The updated comment body (markdown supported)")
1351
+ body: z.string().describe("The updated comment body (markdown supported)"),
1352
+ type: z.enum(["issue", "pr"]).optional().describe("Optional type to route PR comments to GitHub regardless of configured provider")
1204
1353
  },
1205
1354
  outputSchema: {
1206
1355
  id: z.string(),
@@ -1208,12 +1357,11 @@ server.registerTool(
1208
1357
  updated_at: z.string().optional()
1209
1358
  }
1210
1359
  },
1211
- async ({ commentId, number, body }) => {
1212
- console.error(`Updating comment ${commentId} on issue ${number}`);
1360
+ async ({ commentId, number, body, type }) => {
1361
+ console.error(`Updating comment ${commentId} on ${type === "pr" ? "PR" : "issue"} ${number}`);
1213
1362
  try {
1214
- const provider = IssueManagementProviderFactory.create(
1215
- process.env.ISSUE_PROVIDER
1216
- );
1363
+ const providerType = type === "pr" ? "github" : process.env.ISSUE_PROVIDER;
1364
+ const provider = IssueManagementProviderFactory.create(providerType);
1217
1365
  const result = await provider.updateComment({ commentId, number, body });
1218
1366
  console.error(
1219
1367
  `Comment updated successfully: ${result.id} at ${result.url}`