@iloom/cli 0.7.6 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +32 -3
  3. package/dist/{ClaudeContextManager-Y2YJC6BU.js → ClaudeContextManager-RDP6CLK6.js} +5 -5
  4. package/dist/{ClaudeService-NDVFQRKC.js → ClaudeService-FKPOQRA4.js} +4 -4
  5. package/dist/GitHubService-ACZVNTJE.js +12 -0
  6. package/dist/{LoomLauncher-U2B3VHPC.js → LoomLauncher-NHZMEVTQ.js} +5 -5
  7. package/dist/{MetadataManager-XJ2YB762.js → MetadataManager-W3C54UYT.js} +2 -2
  8. package/dist/{PRManager-7F3AAY66.js → PRManager-H4TUZTZL.js} +5 -5
  9. package/dist/{PromptTemplateManager-7L3HJQQU.js → PromptTemplateManager-OUYDHOPI.js} +2 -2
  10. package/dist/README.md +32 -3
  11. package/dist/{SettingsManager-YU4VYPTW.js → SettingsManager-VCVLL32H.js} +4 -2
  12. package/dist/{SettingsMigrationManager-KZKDG66H.js → SettingsMigrationManager-LEBMJP3B.js} +3 -3
  13. package/dist/agents/iloom-code-reviewer.md +735 -0
  14. package/dist/agents/iloom-framework-detector.md +1 -1
  15. package/dist/agents/iloom-issue-analyze-and-plan.md +2 -2
  16. package/dist/agents/iloom-issue-analyzer.md +2 -2
  17. package/dist/agents/iloom-issue-complexity-evaluator.md +1 -1
  18. package/dist/agents/iloom-issue-enhancer.md +2 -2
  19. package/dist/agents/iloom-issue-implementer.md +3 -3
  20. package/dist/agents/iloom-issue-planner.md +2 -2
  21. package/dist/{build-HQ5HGA3T.js → build-H4DK3DMQ.js} +7 -7
  22. package/dist/{chunk-N7FVXZNI.js → chunk-4BSXZ5YZ.js} +31 -9
  23. package/dist/chunk-4BSXZ5YZ.js.map +1 -0
  24. package/dist/{chunk-VYKKWU36.js → chunk-4KGRPHM6.js} +3 -3
  25. package/dist/{chunk-CFQVOTHO.js → chunk-52MVUK5V.js} +2 -2
  26. package/dist/{chunk-TIYJEEVO.js → chunk-66QOCD5N.js} +1 -1
  27. package/dist/chunk-66QOCD5N.js.map +1 -0
  28. package/dist/chunk-7JDMYTFZ.js +251 -0
  29. package/dist/chunk-7JDMYTFZ.js.map +1 -0
  30. package/dist/{chunk-7LSSNB7Y.js → chunk-7ZEHSSUP.js} +2 -2
  31. package/dist/chunk-A4UQY3M2.js +75 -0
  32. package/dist/chunk-A4UQY3M2.js.map +1 -0
  33. package/dist/{chunk-ELJKYFSH.js → chunk-BCQDYAOJ.js} +4 -4
  34. package/dist/{chunk-F2PWIRV4.js → chunk-BYUMEDDD.js} +2 -2
  35. package/dist/{chunk-CAXFWFV6.js → chunk-ECP77QGE.js} +4 -4
  36. package/dist/{chunk-6YAMWLCP.js → chunk-EQOFNPEY.js} +3 -3
  37. package/dist/{chunk-ZA575VLF.js → chunk-GDS2HXSW.js} +4 -4
  38. package/dist/{chunk-UDRZY65Y.js → chunk-HSGZW3ID.js} +2 -2
  39. package/dist/{chunk-WFQ5CLTR.js → chunk-IWIIOFEB.js} +56 -5
  40. package/dist/chunk-IWIIOFEB.js.map +1 -0
  41. package/dist/{chunk-VWGKGNJP.js → chunk-KBEIQP4G.js} +3 -1
  42. package/dist/chunk-KBEIQP4G.js.map +1 -0
  43. package/dist/{chunk-ETY2SBW5.js → chunk-NR64HNF7.js} +17 -15
  44. package/dist/chunk-NR64HNF7.js.map +1 -0
  45. package/dist/{chunk-WT4UGBE2.js → chunk-PBSHQVCT.js} +5 -5
  46. package/dist/{chunk-64HCHVJM.js → chunk-PLI3JQWT.js} +2 -2
  47. package/dist/{chunk-USJSNHGG.js → chunk-PVW6JE7E.js} +3 -3
  48. package/dist/{chunk-HBJITKSZ.js → chunk-RNBIISBZ.js} +161 -3
  49. package/dist/chunk-RNBIISBZ.js.map +1 -0
  50. package/dist/{chunk-C7YW5IMS.js → chunk-RODL2HVY.js} +17 -6
  51. package/dist/{chunk-C7YW5IMS.js.map → chunk-RODL2HVY.js.map} +1 -1
  52. package/dist/{chunk-3K3WY3BN.js → chunk-SC6X5EBG.js} +4 -4
  53. package/dist/{chunk-NEPH2O4C.js → chunk-SSASIBDJ.js} +3 -3
  54. package/dist/{chunk-GCPAZSGV.js → chunk-THS5L54H.js} +150 -3
  55. package/dist/chunk-THS5L54H.js.map +1 -0
  56. package/dist/{chunk-5V74K5ZA.js → chunk-TVH67KEO.js} +25 -2
  57. package/dist/chunk-TVH67KEO.js.map +1 -0
  58. package/dist/{chunk-NPEMVE27.js → chunk-UDZCTLD6.js} +115 -3
  59. package/dist/chunk-UDZCTLD6.js.map +1 -0
  60. package/dist/{chunk-ENMTWE74.js → chunk-VZYSM7N7.js} +2 -2
  61. package/dist/{chunk-WZYBHD7P.js → chunk-XHNACIHO.js} +2 -2
  62. package/dist/{chunk-XAMBIVXE.js → chunk-XJHQVOT6.js} +2 -2
  63. package/dist/{chunk-O36JLYNW.js → chunk-XU5A6BWA.js} +4 -7
  64. package/dist/chunk-XU5A6BWA.js.map +1 -0
  65. package/dist/{cleanup-IO4KV2DL.js → cleanup-OGE7V7AD.js} +16 -16
  66. package/dist/cli.js +317 -164
  67. package/dist/cli.js.map +1 -1
  68. package/dist/{commit-3ULFKXNB.js → commit-534QIRHY.js} +10 -10
  69. package/dist/{compile-CT7IR7O2.js → compile-ZOAODFN2.js} +7 -7
  70. package/dist/{contribute-GXKOIA42.js → contribute-7USRBWRM.js} +6 -6
  71. package/dist/{dev-server-OAP3RZC6.js → dev-server-TYYJM3XA.js} +9 -9
  72. package/dist/{feedback-ZLAX3BVL.js → feedback-HZVLOTQJ.js} +9 -9
  73. package/dist/{git-ENLT2VNI.js → git-GUNOPP4Q.js} +4 -4
  74. package/dist/hooks/iloom-hook.js +75 -3
  75. package/dist/{ignite-HA2OJF6Z.js → ignite-ZO7SGUKP.js} +85 -25
  76. package/dist/ignite-ZO7SGUKP.js.map +1 -0
  77. package/dist/index.d.ts +85 -2
  78. package/dist/index.js +133 -73
  79. package/dist/index.js.map +1 -1
  80. package/dist/init-MZBIXQ7V.js +21 -0
  81. package/dist/{lint-HAVU4U34.js → lint-MDVUV3W2.js} +7 -7
  82. package/dist/mcp/issue-management-server.js +569 -2
  83. package/dist/mcp/issue-management-server.js.map +1 -1
  84. package/dist/{neon-helpers-3KBC4A3Y.js → neon-helpers-VVFFTLXE.js} +3 -3
  85. package/dist/{open-IN3LUZXX.js → open-2LPZ7XXW.js} +9 -9
  86. package/dist/plan-PIME6UNY.js +371 -0
  87. package/dist/plan-PIME6UNY.js.map +1 -0
  88. package/dist/{projects-CTRTTMSK.js → projects-325GEEGJ.js} +2 -2
  89. package/dist/{prompt-3SAZYRUN.js → prompt-ONNPSNKM.js} +2 -2
  90. package/dist/prompts/init-prompt.txt +83 -3
  91. package/dist/prompts/issue-prompt.txt +51 -3
  92. package/dist/prompts/plan-prompt.txt +435 -0
  93. package/dist/prompts/pr-prompt.txt +38 -0
  94. package/dist/prompts/regular-prompt.txt +53 -3
  95. package/dist/{rebase-RLEVFHWN.js → rebase-7YS3N274.js} +6 -6
  96. package/dist/{recap-ZKGHZCX6.js → recap-GSXFEOD6.js} +6 -6
  97. package/dist/{run-QEIS2EH2.js → run-XPGCMFFO.js} +9 -9
  98. package/dist/schema/settings.schema.json +57 -1
  99. package/dist/{shell-2NNSIU34.js → shell-2SPM3Z5O.js} +6 -6
  100. package/dist/{summary-MPOOQIOX.js → summary-C5VVSJAJ.js} +11 -11
  101. package/dist/{test-75WAA6DU.js → test-N2725YRI.js} +7 -7
  102. package/dist/{test-git-E2BLXR6M.js → test-git-ZPSPA2TP.js} +4 -4
  103. package/dist/{test-prefix-A7JGGYAA.js → test-prefix-6DLB2BHE.js} +4 -4
  104. package/dist/{test-webserver-J6SMNLU2.js → test-webserver-XLJ2TZFP.js} +6 -6
  105. package/package.json +1 -1
  106. package/dist/GitHubService-O7U4UQ7N.js +0 -12
  107. package/dist/agents/iloom-issue-reviewer.md +0 -139
  108. package/dist/chunk-5V74K5ZA.js.map +0 -1
  109. package/dist/chunk-ETY2SBW5.js.map +0 -1
  110. package/dist/chunk-GCPAZSGV.js.map +0 -1
  111. package/dist/chunk-HBJITKSZ.js.map +0 -1
  112. package/dist/chunk-N7FVXZNI.js.map +0 -1
  113. package/dist/chunk-NPEMVE27.js.map +0 -1
  114. package/dist/chunk-O36JLYNW.js.map +0 -1
  115. package/dist/chunk-TIYJEEVO.js.map +0 -1
  116. package/dist/chunk-VWGKGNJP.js.map +0 -1
  117. package/dist/chunk-WFQ5CLTR.js.map +0 -1
  118. package/dist/chunk-ZX3GTM7O.js +0 -119
  119. package/dist/chunk-ZX3GTM7O.js.map +0 -1
  120. package/dist/ignite-HA2OJF6Z.js.map +0 -1
  121. package/dist/init-S6IEGRSX.js +0 -21
  122. /package/dist/{ClaudeContextManager-Y2YJC6BU.js.map → ClaudeContextManager-RDP6CLK6.js.map} +0 -0
  123. /package/dist/{ClaudeService-NDVFQRKC.js.map → ClaudeService-FKPOQRA4.js.map} +0 -0
  124. /package/dist/{GitHubService-O7U4UQ7N.js.map → GitHubService-ACZVNTJE.js.map} +0 -0
  125. /package/dist/{LoomLauncher-U2B3VHPC.js.map → LoomLauncher-NHZMEVTQ.js.map} +0 -0
  126. /package/dist/{MetadataManager-XJ2YB762.js.map → MetadataManager-W3C54UYT.js.map} +0 -0
  127. /package/dist/{PRManager-7F3AAY66.js.map → PRManager-H4TUZTZL.js.map} +0 -0
  128. /package/dist/{PromptTemplateManager-7L3HJQQU.js.map → PromptTemplateManager-OUYDHOPI.js.map} +0 -0
  129. /package/dist/{SettingsManager-YU4VYPTW.js.map → SettingsManager-VCVLL32H.js.map} +0 -0
  130. /package/dist/{SettingsMigrationManager-KZKDG66H.js.map → SettingsMigrationManager-LEBMJP3B.js.map} +0 -0
  131. /package/dist/{build-HQ5HGA3T.js.map → build-H4DK3DMQ.js.map} +0 -0
  132. /package/dist/{chunk-VYKKWU36.js.map → chunk-4KGRPHM6.js.map} +0 -0
  133. /package/dist/{chunk-CFQVOTHO.js.map → chunk-52MVUK5V.js.map} +0 -0
  134. /package/dist/{chunk-7LSSNB7Y.js.map → chunk-7ZEHSSUP.js.map} +0 -0
  135. /package/dist/{chunk-ELJKYFSH.js.map → chunk-BCQDYAOJ.js.map} +0 -0
  136. /package/dist/{chunk-F2PWIRV4.js.map → chunk-BYUMEDDD.js.map} +0 -0
  137. /package/dist/{chunk-CAXFWFV6.js.map → chunk-ECP77QGE.js.map} +0 -0
  138. /package/dist/{chunk-6YAMWLCP.js.map → chunk-EQOFNPEY.js.map} +0 -0
  139. /package/dist/{chunk-ZA575VLF.js.map → chunk-GDS2HXSW.js.map} +0 -0
  140. /package/dist/{chunk-UDRZY65Y.js.map → chunk-HSGZW3ID.js.map} +0 -0
  141. /package/dist/{chunk-WT4UGBE2.js.map → chunk-PBSHQVCT.js.map} +0 -0
  142. /package/dist/{chunk-64HCHVJM.js.map → chunk-PLI3JQWT.js.map} +0 -0
  143. /package/dist/{chunk-USJSNHGG.js.map → chunk-PVW6JE7E.js.map} +0 -0
  144. /package/dist/{chunk-3K3WY3BN.js.map → chunk-SC6X5EBG.js.map} +0 -0
  145. /package/dist/{chunk-NEPH2O4C.js.map → chunk-SSASIBDJ.js.map} +0 -0
  146. /package/dist/{chunk-ENMTWE74.js.map → chunk-VZYSM7N7.js.map} +0 -0
  147. /package/dist/{chunk-WZYBHD7P.js.map → chunk-XHNACIHO.js.map} +0 -0
  148. /package/dist/{chunk-XAMBIVXE.js.map → chunk-XJHQVOT6.js.map} +0 -0
  149. /package/dist/{cleanup-IO4KV2DL.js.map → cleanup-OGE7V7AD.js.map} +0 -0
  150. /package/dist/{commit-3ULFKXNB.js.map → commit-534QIRHY.js.map} +0 -0
  151. /package/dist/{compile-CT7IR7O2.js.map → compile-ZOAODFN2.js.map} +0 -0
  152. /package/dist/{contribute-GXKOIA42.js.map → contribute-7USRBWRM.js.map} +0 -0
  153. /package/dist/{dev-server-OAP3RZC6.js.map → dev-server-TYYJM3XA.js.map} +0 -0
  154. /package/dist/{feedback-ZLAX3BVL.js.map → feedback-HZVLOTQJ.js.map} +0 -0
  155. /package/dist/{git-ENLT2VNI.js.map → git-GUNOPP4Q.js.map} +0 -0
  156. /package/dist/{init-S6IEGRSX.js.map → init-MZBIXQ7V.js.map} +0 -0
  157. /package/dist/{lint-HAVU4U34.js.map → lint-MDVUV3W2.js.map} +0 -0
  158. /package/dist/{neon-helpers-3KBC4A3Y.js.map → neon-helpers-VVFFTLXE.js.map} +0 -0
  159. /package/dist/{open-IN3LUZXX.js.map → open-2LPZ7XXW.js.map} +0 -0
  160. /package/dist/{projects-CTRTTMSK.js.map → projects-325GEEGJ.js.map} +0 -0
  161. /package/dist/{prompt-3SAZYRUN.js.map → prompt-ONNPSNKM.js.map} +0 -0
  162. /package/dist/{rebase-RLEVFHWN.js.map → rebase-7YS3N274.js.map} +0 -0
  163. /package/dist/{recap-ZKGHZCX6.js.map → recap-GSXFEOD6.js.map} +0 -0
  164. /package/dist/{run-QEIS2EH2.js.map → run-XPGCMFFO.js.map} +0 -0
  165. /package/dist/{shell-2NNSIU34.js.map → shell-2SPM3Z5O.js.map} +0 -0
  166. /package/dist/{summary-MPOOQIOX.js.map → summary-C5VVSJAJ.js.map} +0 -0
  167. /package/dist/{test-75WAA6DU.js.map → test-N2725YRI.js.map} +0 -0
  168. /package/dist/{test-git-E2BLXR6M.js.map → test-git-ZPSPA2TP.js.map} +0 -0
  169. /package/dist/{test-prefix-A7JGGYAA.js.map → test-prefix-6DLB2BHE.js.map} +0 -0
  170. /package/dist/{test-webserver-J6SMNLU2.js.map → test-webserver-XLJ2TZFP.js.map} +0 -0
package/dist/index.js CHANGED
@@ -197,8 +197,8 @@ async function buildAppleScript(options) {
197
197
  script += `end tell`;
198
198
  return script;
199
199
  }
200
- function escapePathForAppleScript(path7) {
201
- return path7.replace(/'/g, "'\\''");
200
+ function escapePathForAppleScript(path8) {
201
+ return path8.replace(/'/g, "'\\''");
202
202
  }
203
203
  function escapeForAppleScript(command) {
204
204
  return command.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
@@ -481,6 +481,7 @@ __export(SettingsManager_exports, {
481
481
  IloomSettingsSchema: () => IloomSettingsSchema,
482
482
  IloomSettingsSchemaNoDefaults: () => IloomSettingsSchemaNoDefaults,
483
483
  NeonSettingsSchema: () => NeonSettingsSchema,
484
+ PlanCommandSettingsSchema: () => PlanCommandSettingsSchema,
484
485
  SettingsManager: () => SettingsManager,
485
486
  SpinAgentSettingsSchema: () => SpinAgentSettingsSchema,
486
487
  SummarySettingsSchema: () => SummarySettingsSchema,
@@ -494,19 +495,28 @@ import path2 from "path";
494
495
  import os from "os";
495
496
  import { z } from "zod";
496
497
  import deepmerge from "deepmerge";
497
- var PROJECT_CAPABILITIES, AgentSettingsSchema, SpinAgentSettingsSchema, SummarySettingsSchema, WorkflowPermissionSchema, WorkflowPermissionSchemaNoDefaults, WorkflowsSettingsSchema, WorkflowsSettingsSchemaNoDefaults, CapabilitiesSettingsSchema, CapabilitiesSettingsSchemaNoDefaults, NeonSettingsSchema, DatabaseProvidersSettingsSchema, IloomSettingsSchema, IloomSettingsSchemaNoDefaults, SettingsManager;
498
+ var PROJECT_CAPABILITIES, AgentSettingsSchema, SpinAgentSettingsSchema, PlanCommandSettingsSchema, SummarySettingsSchema, WorkflowPermissionSchema, WorkflowPermissionSchemaNoDefaults, WorkflowsSettingsSchema, WorkflowsSettingsSchemaNoDefaults, CapabilitiesSettingsSchema, CapabilitiesSettingsSchemaNoDefaults, NeonSettingsSchema, DatabaseProvidersSettingsSchema, IloomSettingsSchema, IloomSettingsSchemaNoDefaults, SettingsManager;
498
499
  var init_SettingsManager = __esm({
499
500
  "src/lib/SettingsManager.ts"() {
500
501
  "use strict";
501
502
  init_logger();
502
503
  PROJECT_CAPABILITIES = ["cli", "web"];
503
504
  AgentSettingsSchema = z.object({
504
- model: z.enum(["sonnet", "opus", "haiku"]).optional().describe("Claude model shorthand: sonnet, opus, or haiku")
505
- // Future: could add other per-agent overrides
505
+ model: z.enum(["sonnet", "opus", "haiku"]).optional().describe("Claude model shorthand: sonnet, opus, or haiku"),
506
+ enabled: z.boolean().optional().describe("Whether this agent is enabled. Defaults to true."),
507
+ providers: z.record(
508
+ z.enum(["claude", "gemini", "codex"]),
509
+ z.string()
510
+ ).optional().describe('Map of review providers to model names. Keys: claude, gemini, codex. Values: model name strings (e.g., "sonnet", "gemini-3-pro-preview", "gpt-5.2-codex")')
506
511
  });
507
512
  SpinAgentSettingsSchema = z.object({
508
513
  model: z.enum(["sonnet", "opus", "haiku"]).default("opus").describe("Claude model shorthand for spin orchestrator")
509
514
  });
515
+ PlanCommandSettingsSchema = z.object({
516
+ model: z.enum(["sonnet", "opus", "haiku"]).default("opus").describe("Claude model shorthand for plan command"),
517
+ planner: z.enum(["claude", "gemini", "codex"]).default("claude").describe("AI provider for creating the plan"),
518
+ reviewer: z.enum(["claude", "gemini", "codex", "none"]).default("none").describe("AI provider for reviewing the plan (none to skip review)")
519
+ });
510
520
  SummarySettingsSchema = z.object({
511
521
  model: z.enum(["sonnet", "opus", "haiku"]).default("sonnet").describe("Claude model shorthand for session summary generation")
512
522
  });
@@ -595,11 +605,14 @@ var init_SettingsManager = __esm({
595
605
  copyGitIgnoredPatterns: z.array(z.string().min(1, "Pattern cannot be empty")).optional().describe(`Glob patterns for gitignored files to copy to looms (e.g., ["*.db", "data/*.sqlite"]). Great for local dbs and large test data files that are too big to commit to git. Note: .env (dotenv-flow) files, iloom's and claude's local settings are automatically copied and do not need to be specified here.`),
596
606
  workflows: WorkflowsSettingsSchema.describe("Per-workflow-type permission configurations"),
597
607
  agents: z.record(z.string(), AgentSettingsSchema).optional().nullable().describe(
598
- "Per-agent configuration overrides. Available agents: iloom-issue-analyzer (analyzes issues), iloom-issue-planner (creates implementation plans), iloom-issue-analyze-and-plan (combined analysis and planning), iloom-issue-complexity-evaluator (evaluates complexity), iloom-issue-enhancer (enhances issue descriptions), iloom-issue-implementer (implements code changes), iloom-issue-reviewer (reviews code changes against requirements)"
608
+ "Per-agent configuration overrides. Available agents: iloom-issue-analyzer (analyzes issues), iloom-issue-planner (creates implementation plans), iloom-issue-analyze-and-plan (combined analysis and planning), iloom-issue-complexity-evaluator (evaluates complexity), iloom-issue-enhancer (enhances issue descriptions), iloom-issue-implementer (implements code changes), iloom-code-reviewer (reviews code changes against requirements)"
599
609
  ),
600
610
  spin: SpinAgentSettingsSchema.optional().describe(
601
611
  "Spin orchestrator configuration. Model defaults to opus when not configured."
602
612
  ),
613
+ plan: PlanCommandSettingsSchema.optional().describe(
614
+ "Plan command configuration. Model defaults to opus, planner to claude, reviewer to none when not configured."
615
+ ),
603
616
  summary: SummarySettingsSchema.optional().describe(
604
617
  "Session summary generation configuration. Model defaults to sonnet when not configured."
605
618
  ),
@@ -667,11 +680,16 @@ var init_SettingsManager = __esm({
667
680
  copyGitIgnoredPatterns: z.array(z.string().min(1, "Pattern cannot be empty")).optional().describe(`Glob patterns for gitignored files to copy to looms (e.g., ["*.db", "data/*.sqlite"]). Great for local dbs and large test data files that are too big to commit to git. Note: .env (dotenv-flow) files, iloom's and claude's local settings are automatically copied and do not need to be specified here.`),
668
681
  workflows: WorkflowsSettingsSchemaNoDefaults.describe("Per-workflow-type permission configurations"),
669
682
  agents: z.record(z.string(), AgentSettingsSchema).optional().nullable().describe(
670
- "Per-agent configuration overrides. Available agents: iloom-issue-analyzer (analyzes issues), iloom-issue-planner (creates implementation plans), iloom-issue-analyze-and-plan (combined analysis and planning), iloom-issue-complexity-evaluator (evaluates complexity), iloom-issue-enhancer (enhances issue descriptions), iloom-issue-implementer (implements code changes), iloom-issue-reviewer (reviews code changes against requirements)"
683
+ "Per-agent configuration overrides. Available agents: iloom-issue-analyzer (analyzes issues), iloom-issue-planner (creates implementation plans), iloom-issue-analyze-and-plan (combined analysis and planning), iloom-issue-complexity-evaluator (evaluates complexity), iloom-issue-enhancer (enhances issue descriptions), iloom-issue-implementer (implements code changes), iloom-code-reviewer (reviews code changes against requirements)"
671
684
  ),
672
685
  spin: z.object({
673
686
  model: z.enum(["sonnet", "opus", "haiku"]).optional()
674
687
  }).optional().describe("Spin orchestrator configuration"),
688
+ plan: z.object({
689
+ model: z.enum(["sonnet", "opus", "haiku"]).optional(),
690
+ planner: z.enum(["claude", "gemini", "codex"]).optional(),
691
+ reviewer: z.enum(["claude", "gemini", "codex", "none"]).optional()
692
+ }).optional().describe("Plan command configuration"),
675
693
  summary: z.object({
676
694
  model: z.enum(["sonnet", "opus", "haiku"]).optional()
677
695
  }).optional().describe("Session summary generation configuration"),
@@ -807,8 +825,8 @@ Note: CLI overrides were applied. Check your --set arguments.`);
807
825
  */
808
826
  formatAllZodErrors(error, settingsPath) {
809
827
  const errorMessages = error.issues.map((issue) => {
810
- const path7 = issue.path.length > 0 ? issue.path.join(".") : "root";
811
- return ` - ${path7}: ${issue.message}`;
828
+ const path8 = issue.path.length > 0 ? issue.path.join(".") : "root";
829
+ return ` - ${path8}: ${issue.message}`;
812
830
  });
813
831
  return new Error(
814
832
  `Settings validation failed at ${settingsPath}:
@@ -921,6 +939,39 @@ ${errorMessages.join("\n")}`
921
939
  var _a;
922
940
  return ((_a = settings == null ? void 0 : settings.spin) == null ? void 0 : _a.model) ?? SpinAgentSettingsSchema.parse({}).model;
923
941
  }
942
+ /**
943
+ * Get the plan command model with default applied
944
+ * Default is defined in PlanCommandSettingsSchema
945
+ *
946
+ * @param settings - Pre-loaded settings object
947
+ * @returns Model shorthand ('opus', 'sonnet', or 'haiku')
948
+ */
949
+ getPlanModel(settings) {
950
+ var _a;
951
+ return ((_a = settings == null ? void 0 : settings.plan) == null ? void 0 : _a.model) ?? PlanCommandSettingsSchema.parse({}).model;
952
+ }
953
+ /**
954
+ * Get the plan command planner with default applied
955
+ * Default is 'claude'
956
+ *
957
+ * @param settings - Pre-loaded settings object
958
+ * @returns Planner provider ('claude', 'gemini', or 'codex')
959
+ */
960
+ getPlanPlanner(settings) {
961
+ var _a;
962
+ return ((_a = settings == null ? void 0 : settings.plan) == null ? void 0 : _a.planner) ?? "claude";
963
+ }
964
+ /**
965
+ * Get the plan command reviewer with default applied
966
+ * Default is 'none' (no review step)
967
+ *
968
+ * @param settings - Pre-loaded settings object
969
+ * @returns Reviewer provider ('claude', 'gemini', 'codex', or 'none')
970
+ */
971
+ getPlanReviewer(settings) {
972
+ var _a;
973
+ return ((_a = settings == null ? void 0 : settings.plan) == null ? void 0 : _a.reviewer) ?? "none";
974
+ }
924
975
  /**
925
976
  * Get the session summary model with default applied
926
977
  * Default is defined in SummarySettingsSchema
@@ -1195,6 +1246,7 @@ var MetadataManager = class {
1195
1246
  issueUrls: data.issueUrls ?? {},
1196
1247
  prUrls: data.prUrls ?? {},
1197
1248
  draftPrNumber: data.draftPrNumber ?? null,
1249
+ oneShot: data.oneShot ?? null,
1198
1250
  capabilities: data.capabilities ?? [],
1199
1251
  parentLoom: data.parentLoom ?? null
1200
1252
  };
@@ -1259,6 +1311,7 @@ var MetadataManager = class {
1259
1311
  prUrls: input.prUrls,
1260
1312
  capabilities: input.capabilities,
1261
1313
  ...input.draftPrNumber && { draftPrNumber: input.draftPrNumber },
1314
+ ...input.oneShot && { oneShot: input.oneShot },
1262
1315
  ...input.parentLoom && { parentLoom: input.parentLoom }
1263
1316
  };
1264
1317
  const filePath = this.getFilePath(worktreePath);
@@ -1605,7 +1658,7 @@ function extractIssueNumber(branchName) {
1605
1658
  }
1606
1659
  return null;
1607
1660
  }
1608
- function isWorktreePath(path7) {
1661
+ function isWorktreePath(path8) {
1609
1662
  const worktreePatterns = [
1610
1663
  /\/worktrees?\//i,
1611
1664
  // Contains /worktree/ or /worktrees/
@@ -1620,7 +1673,7 @@ function isWorktreePath(path7) {
1620
1673
  /\.worktree$/i
1621
1674
  // ends with .worktree
1622
1675
  ];
1623
- return worktreePatterns.some((pattern) => pattern.test(path7));
1676
+ return worktreePatterns.some((pattern) => pattern.test(path8));
1624
1677
  }
1625
1678
  function generateWorktreePath(branchName, rootDir = process.cwd(), options) {
1626
1679
  let sanitized = branchName.replace(/\//g, "-");
@@ -1662,31 +1715,31 @@ function generateWorktreePath(branchName, rootDir = process.cwd(), options) {
1662
1715
  return path4.join(parentDir, `${prefix}${sanitized}`);
1663
1716
  }
1664
1717
  }
1665
- async function isValidGitRepo(path7) {
1718
+ async function isValidGitRepo(path8) {
1666
1719
  try {
1667
- await executeGitCommand(["rev-parse", "--git-dir"], { cwd: path7 });
1720
+ await executeGitCommand(["rev-parse", "--git-dir"], { cwd: path8 });
1668
1721
  return true;
1669
1722
  } catch {
1670
1723
  return false;
1671
1724
  }
1672
1725
  }
1673
- async function getCurrentBranch(path7 = process.cwd()) {
1726
+ async function getCurrentBranch(path8 = process.cwd()) {
1674
1727
  try {
1675
- const result = await executeGitCommand(["branch", "--show-current"], { cwd: path7 });
1728
+ const result = await executeGitCommand(["branch", "--show-current"], { cwd: path8 });
1676
1729
  return result.trim();
1677
1730
  } catch {
1678
1731
  return null;
1679
1732
  }
1680
1733
  }
1681
- async function branchExists(branchName, path7 = process.cwd(), includeRemote = true) {
1734
+ async function branchExists(branchName, path8 = process.cwd(), includeRemote = true) {
1682
1735
  try {
1683
- const localResult = await executeGitCommand(["branch", "--list", branchName], { cwd: path7 });
1736
+ const localResult = await executeGitCommand(["branch", "--list", branchName], { cwd: path8 });
1684
1737
  if (localResult.trim()) {
1685
1738
  return true;
1686
1739
  }
1687
1740
  if (includeRemote) {
1688
1741
  const remoteResult = await executeGitCommand(["branch", "-r", "--list", `*/${branchName}`], {
1689
- cwd: path7
1742
+ cwd: path8
1690
1743
  });
1691
1744
  if (remoteResult.trim()) {
1692
1745
  return true;
@@ -1697,36 +1750,36 @@ async function branchExists(branchName, path7 = process.cwd(), includeRemote = t
1697
1750
  return false;
1698
1751
  }
1699
1752
  }
1700
- async function getWorktreeRoot(path7 = process.cwd()) {
1753
+ async function getWorktreeRoot(path8 = process.cwd()) {
1701
1754
  try {
1702
- const result = await executeGitCommand(["rev-parse", "--show-toplevel"], { cwd: path7 });
1755
+ const result = await executeGitCommand(["rev-parse", "--show-toplevel"], { cwd: path8 });
1703
1756
  return result.trim();
1704
1757
  } catch {
1705
1758
  return null;
1706
1759
  }
1707
1760
  }
1708
- async function getRepoRoot(path7 = process.cwd()) {
1761
+ async function getRepoRoot(path8 = process.cwd()) {
1709
1762
  try {
1710
1763
  const gitCommonDir = await executeGitCommand(
1711
1764
  ["rev-parse", "--path-format=absolute", "--git-common-dir"],
1712
- { cwd: path7 }
1765
+ { cwd: path8 }
1713
1766
  );
1714
1767
  const trimmedPath = gitCommonDir.trim();
1715
1768
  const repoRoot = trimmedPath.replace(/\/\.git\/worktrees\/[^/]+$/, "").replace(/\/\.git$/, "");
1716
1769
  return repoRoot;
1717
1770
  } catch (error) {
1718
1771
  if (error instanceof GitCommandError && (error.exitCode === 128 || /fatal: not a git repository/i.test(error.stderr))) {
1719
- logger.info(`Note: No git repository detected: ${path7}`);
1772
+ logger.info(`Note: No git repository detected: ${path8}`);
1720
1773
  } else {
1721
1774
  const errorMessage = error instanceof Error ? error.message : String(error);
1722
- logger.warn(`Failed to determine repo root from git-common-dir: ${path7}`, errorMessage);
1775
+ logger.warn(`Failed to determine repo root from git-common-dir: ${path8}`, errorMessage);
1723
1776
  }
1724
1777
  return null;
1725
1778
  }
1726
1779
  }
1727
- async function findMainWorktreePath(path7 = process.cwd(), options) {
1780
+ async function findMainWorktreePath(path8 = process.cwd(), options) {
1728
1781
  try {
1729
- const output = await executeGitCommand(["worktree", "list", "--porcelain"], { cwd: path7 });
1782
+ const output = await executeGitCommand(["worktree", "list", "--porcelain"], { cwd: path8 });
1730
1783
  const worktrees = parseWorktreeList(output, options == null ? void 0 : options.mainBranch);
1731
1784
  if (worktrees.length === 0) {
1732
1785
  throw new Error("No worktrees found in repository");
@@ -1756,15 +1809,15 @@ async function findMainWorktreePath(path7 = process.cwd(), options) {
1756
1809
  throw new Error(`Failed to find main worktree: ${error instanceof Error ? error.message : String(error)}`);
1757
1810
  }
1758
1811
  }
1759
- async function findMainWorktreePathWithSettings(path7, settingsManager) {
1812
+ async function findMainWorktreePathWithSettings(path8, settingsManager) {
1760
1813
  settingsManager ??= new SettingsManager();
1761
- const settings = await settingsManager.loadSettings(path7);
1814
+ const settings = await settingsManager.loadSettings(path8);
1762
1815
  const findOptions = settings.mainBranch ? { mainBranch: settings.mainBranch } : void 0;
1763
- return findMainWorktreePath(path7, findOptions);
1816
+ return findMainWorktreePath(path8, findOptions);
1764
1817
  }
1765
- async function findWorktreeForBranch(branchName, path7 = process.cwd()) {
1818
+ async function findWorktreeForBranch(branchName, path8 = process.cwd()) {
1766
1819
  try {
1767
- const output = await executeGitCommand(["worktree", "list", "--porcelain"], { cwd: path7 });
1820
+ const output = await executeGitCommand(["worktree", "list", "--porcelain"], { cwd: path8 });
1768
1821
  const worktrees = parseWorktreeList(output, branchName);
1769
1822
  if (worktrees.length === 0) {
1770
1823
  throw new Error("No worktrees found in repository");
@@ -1783,24 +1836,24 @@ async function findWorktreeForBranch(branchName, path7 = process.cwd()) {
1783
1836
  throw new Error(`Failed to find worktree for branch '${branchName}': ${error instanceof Error ? error.message : String(error)}`);
1784
1837
  }
1785
1838
  }
1786
- async function hasUncommittedChanges(path7 = process.cwd()) {
1839
+ async function hasUncommittedChanges(path8 = process.cwd()) {
1787
1840
  try {
1788
- const result = await executeGitCommand(["status", "--porcelain"], { cwd: path7 });
1841
+ const result = await executeGitCommand(["status", "--porcelain"], { cwd: path8 });
1789
1842
  return result.trim().length > 0;
1790
1843
  } catch {
1791
1844
  return false;
1792
1845
  }
1793
1846
  }
1794
- async function getDefaultBranch(path7 = process.cwd()) {
1847
+ async function getDefaultBranch(path8 = process.cwd()) {
1795
1848
  try {
1796
1849
  const remoteResult = await executeGitCommand(["symbolic-ref", "refs/remotes/origin/HEAD"], {
1797
- cwd: path7
1850
+ cwd: path8
1798
1851
  });
1799
1852
  const match = remoteResult.match(/refs\/remotes\/origin\/(.+)/);
1800
1853
  if (match) return match[1] ?? "main";
1801
1854
  const commonDefaults = ["main", "master", "develop"];
1802
1855
  for (const branch of commonDefaults) {
1803
- if (await branchExists(branch, path7)) {
1856
+ if (await branchExists(branch, path8)) {
1804
1857
  return branch;
1805
1858
  }
1806
1859
  }
@@ -1809,13 +1862,13 @@ async function getDefaultBranch(path7 = process.cwd()) {
1809
1862
  return "main";
1810
1863
  }
1811
1864
  }
1812
- async function findAllBranchesForIssue(issueNumber, path7 = process.cwd(), settingsManager) {
1865
+ async function findAllBranchesForIssue(issueNumber, path8 = process.cwd(), settingsManager) {
1813
1866
  if (!settingsManager) {
1814
1867
  const { SettingsManager: SM } = await Promise.resolve().then(() => (init_SettingsManager(), SettingsManager_exports));
1815
1868
  settingsManager = new SM();
1816
1869
  }
1817
- const protectedBranches = await settingsManager.getProtectedBranches(path7);
1818
- const output = await executeGitCommand(["branch", "-a"], { cwd: path7 });
1870
+ const protectedBranches = await settingsManager.getProtectedBranches(path8);
1871
+ const output = await executeGitCommand(["branch", "-a"], { cwd: path8 });
1819
1872
  const branches = [];
1820
1873
  const lines = output.split("\n").filter(Boolean);
1821
1874
  for (const line of lines) {
@@ -1872,18 +1925,18 @@ async function findAllBranchesForIssue(issueNumber, path7 = process.cwd(), setti
1872
1925
  }
1873
1926
  return branches;
1874
1927
  }
1875
- async function isEmptyRepository(path7 = process.cwd()) {
1928
+ async function isEmptyRepository(path8 = process.cwd()) {
1876
1929
  try {
1877
- await executeGitCommand(["rev-parse", "--verify", "HEAD"], { cwd: path7 });
1930
+ await executeGitCommand(["rev-parse", "--verify", "HEAD"], { cwd: path8 });
1878
1931
  return false;
1879
1932
  } catch {
1880
1933
  return true;
1881
1934
  }
1882
1935
  }
1883
- async function ensureRepositoryHasCommits(path7 = process.cwd()) {
1884
- const isEmpty = await isEmptyRepository(path7);
1936
+ async function ensureRepositoryHasCommits(path8 = process.cwd()) {
1937
+ const isEmpty = await isEmptyRepository(path8);
1885
1938
  if (isEmpty) {
1886
- await executeGitCommand(["commit", "--no-verify", "--allow-empty", "-m", "Initial commit"], { cwd: path7 });
1939
+ await executeGitCommand(["commit", "--no-verify", "--allow-empty", "-m", "Initial commit"], { cwd: path8 });
1887
1940
  }
1888
1941
  }
1889
1942
  async function pushBranchToRemote(branchName, worktreePath, options) {
@@ -2490,7 +2543,7 @@ var GitWorktreeManager = class {
2490
2543
  };
2491
2544
 
2492
2545
  // src/lib/GitHubService.ts
2493
- import { execSync } from "child_process";
2546
+ import { execSync as execSync2 } from "child_process";
2494
2547
 
2495
2548
  // src/types/github.ts
2496
2549
  var GitHubError = class extends Error {
@@ -2511,7 +2564,7 @@ async function executeGhCommand(args, options) {
2511
2564
  timeout: (options == null ? void 0 : options.timeout) ?? 3e4,
2512
2565
  encoding: "utf8"
2513
2566
  });
2514
- const isJson = args.includes("--json") || args.includes("--jq") || args.includes("--format") && args[args.indexOf("--format") + 1] === "json";
2567
+ const isJson = args.includes("--json") || args.includes("--jq") || args.includes("--format") && args[args.indexOf("--format") + 1] === "json" || args[0] === "api" && args[1] === "graphql";
2515
2568
  const data = isJson ? JSON.parse(result.stdout) : result.stdout;
2516
2569
  return data;
2517
2570
  }
@@ -2688,6 +2741,16 @@ async function createIssue(title, body, options) {
2688
2741
  // src/utils/prompt.ts
2689
2742
  init_logger();
2690
2743
  import * as readline from "readline";
2744
+
2745
+ // src/utils/notification.ts
2746
+ import net from "net";
2747
+ import fs3 from "fs";
2748
+ import path6 from "path";
2749
+ import os3 from "os";
2750
+ import { execSync } from "child_process";
2751
+ var DEBUG = process.env.ILOOM_NOTIF_DEBUG === "1";
2752
+
2753
+ // src/utils/prompt.ts
2691
2754
  async function promptConfirmation(message, defaultValue = false) {
2692
2755
  const suffix = defaultValue ? "[Y/n]" : "[y/N]";
2693
2756
  const fullMessage = `${message} ${suffix}: `;
@@ -2730,7 +2793,7 @@ var GitHubService = class {
2730
2793
  */
2731
2794
  static isCliAvailable() {
2732
2795
  try {
2733
- execSync("gh --version", { stdio: "ignore" });
2796
+ execSync2("gh --version", { stdio: "ignore" });
2734
2797
  return true;
2735
2798
  } catch {
2736
2799
  return false;
@@ -2997,7 +3060,7 @@ var LinearServiceError = class _LinearServiceError extends Error {
2997
3060
  };
2998
3061
 
2999
3062
  // src/utils/linear.ts
3000
- import { LinearClient } from "@linear/sdk";
3063
+ import { LinearClient, IssueRelationType } from "@linear/sdk";
3001
3064
  init_logger();
3002
3065
  function slugifyTitle(title, maxLength = 50) {
3003
3066
  const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
@@ -3355,13 +3418,13 @@ var IssueTrackerFactory = class {
3355
3418
  };
3356
3419
 
3357
3420
  // src/lib/EnvironmentManager.ts
3358
- import fs4 from "fs-extra";
3421
+ import fs5 from "fs-extra";
3359
3422
  init_env();
3360
3423
 
3361
3424
  // src/utils/port.ts
3362
3425
  import { createHash } from "crypto";
3363
3426
  init_env();
3364
- import fs3 from "fs-extra";
3427
+ import fs4 from "fs-extra";
3365
3428
  init_logger();
3366
3429
  function wrapPort(rawPort, basePort) {
3367
3430
  if (rawPort <= 65535) return rawPort;
@@ -3419,15 +3482,15 @@ var EnvironmentManager = class {
3419
3482
  if (!validation.valid) {
3420
3483
  throw new Error(validation.error ?? "Invalid variable name");
3421
3484
  }
3422
- const fileExists = await fs4.pathExists(filePath);
3485
+ const fileExists = await fs5.pathExists(filePath);
3423
3486
  if (!fileExists) {
3424
3487
  getLogger().info(`Creating ${filePath} with ${key}...`);
3425
3488
  const content = formatEnvLine(key, value);
3426
- await fs4.writeFile(filePath, content, "utf8");
3489
+ await fs5.writeFile(filePath, content, "utf8");
3427
3490
  getLogger().success(`${filePath} created with ${key}`);
3428
3491
  return;
3429
3492
  }
3430
- const existingContent = await fs4.readFile(filePath, "utf8");
3493
+ const existingContent = await fs5.readFile(filePath, "utf8");
3431
3494
  const envMap = parseEnvFile(existingContent);
3432
3495
  let backupPath;
3433
3496
  if (backup) {
@@ -3464,7 +3527,7 @@ var EnvironmentManager = class {
3464
3527
  getLogger().success(`${key} updated successfully`);
3465
3528
  }
3466
3529
  const newContent = newLines.join("\n");
3467
- await fs4.writeFile(filePath, newContent, "utf8");
3530
+ await fs5.writeFile(filePath, newContent, "utf8");
3468
3531
  return backupPath;
3469
3532
  }
3470
3533
  /**
@@ -3472,7 +3535,7 @@ var EnvironmentManager = class {
3472
3535
  */
3473
3536
  async readEnvFile(filePath) {
3474
3537
  try {
3475
- const content = await fs4.readFile(filePath, "utf8");
3538
+ const content = await fs5.readFile(filePath, "utf8");
3476
3539
  return parseEnvFile(content);
3477
3540
  } catch (error) {
3478
3541
  getLogger().debug(
@@ -3495,12 +3558,12 @@ var EnvironmentManager = class {
3495
3558
  * @private
3496
3559
  */
3497
3560
  async copyIfExists(source, destination) {
3498
- const sourceExists = await fs4.pathExists(source);
3561
+ const sourceExists = await fs5.pathExists(source);
3499
3562
  if (!sourceExists) {
3500
3563
  getLogger().debug(`Source file ${source} does not exist, skipping copy`);
3501
3564
  return;
3502
3565
  }
3503
- await fs4.copy(source, destination, { overwrite: false });
3566
+ await fs5.copy(source, destination, { overwrite: false });
3504
3567
  getLogger().success(`Copied ${source} to ${destination}`);
3505
3568
  }
3506
3569
  /**
@@ -3546,7 +3609,7 @@ var EnvironmentManager = class {
3546
3609
  */
3547
3610
  async validateEnvFile(filePath) {
3548
3611
  try {
3549
- const content = await fs4.readFile(filePath, "utf8");
3612
+ const content = await fs5.readFile(filePath, "utf8");
3550
3613
  const envMap = parseEnvFile(content);
3551
3614
  const errors = [];
3552
3615
  for (const [key, value] of envMap.entries()) {
@@ -3574,7 +3637,7 @@ var EnvironmentManager = class {
3574
3637
  async createBackup(filePath) {
3575
3638
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
3576
3639
  const backupPath = `${filePath}${this.backupSuffix}-${timestamp}`;
3577
- await fs4.copy(filePath, backupPath);
3640
+ await fs5.copy(filePath, backupPath);
3578
3641
  getLogger().debug(`Created backup at ${backupPath}`);
3579
3642
  return backupPath;
3580
3643
  }
@@ -3582,7 +3645,7 @@ var EnvironmentManager = class {
3582
3645
 
3583
3646
  // src/lib/DatabaseManager.ts
3584
3647
  init_env();
3585
- import fs5 from "fs-extra";
3648
+ import fs6 from "fs-extra";
3586
3649
  var DatabaseManager = class {
3587
3650
  constructor(provider, environment, databaseUrlEnvVarName = "DATABASE_URL") {
3588
3651
  this.provider = provider;
@@ -3771,7 +3834,7 @@ var DatabaseManager = class {
3771
3834
  const hasConfiguredVar = await hasVariableInAnyEnvFile(
3772
3835
  workspacePath,
3773
3836
  this.databaseUrlEnvVarName,
3774
- async (p) => fs5.pathExists(p),
3837
+ async (p) => fs6.pathExists(p),
3775
3838
  async (p, v) => this.environment.getEnvVariable(p, v)
3776
3839
  );
3777
3840
  if (hasConfiguredVar) {
@@ -3791,7 +3854,7 @@ var DatabaseManager = class {
3791
3854
  const hasDefaultVar = await hasVariableInAnyEnvFile(
3792
3855
  workspacePath,
3793
3856
  "DATABASE_URL",
3794
- async (p) => fs5.pathExists(p),
3857
+ async (p) => fs6.pathExists(p),
3795
3858
  async (p, v) => this.environment.getEnvVariable(p, v)
3796
3859
  );
3797
3860
  if (hasDefaultVar) {
@@ -4104,7 +4167,7 @@ async function launchClaudeInNewTerminalWindow(_prompt, options) {
4104
4167
  init_logger();
4105
4168
  import { readFile as readFile2 } from "fs/promises";
4106
4169
  import { accessSync } from "fs";
4107
- import path6 from "path";
4170
+ import path7 from "path";
4108
4171
  import { fileURLToPath } from "url";
4109
4172
  import Handlebars from "handlebars";
4110
4173
  Handlebars.registerHelper("raw", function(options) {
@@ -4117,17 +4180,17 @@ var PromptTemplateManager = class {
4117
4180
  } else {
4118
4181
  const currentFileUrl = import.meta.url;
4119
4182
  const currentFilePath = fileURLToPath(currentFileUrl);
4120
- const distDir = path6.dirname(currentFilePath);
4121
- let templateDir2 = path6.join(distDir, "prompts");
4183
+ const distDir = path7.dirname(currentFilePath);
4184
+ let templateDir2 = path7.join(distDir, "prompts");
4122
4185
  let currentDir = distDir;
4123
- while (currentDir !== path6.dirname(currentDir)) {
4124
- const candidatePath = path6.join(currentDir, "prompts");
4186
+ while (currentDir !== path7.dirname(currentDir)) {
4187
+ const candidatePath = path7.join(currentDir, "prompts");
4125
4188
  try {
4126
4189
  accessSync(candidatePath);
4127
4190
  templateDir2 = candidatePath;
4128
4191
  break;
4129
4192
  } catch {
4130
- currentDir = path6.dirname(currentDir);
4193
+ currentDir = path7.dirname(currentDir);
4131
4194
  }
4132
4195
  }
4133
4196
  this.templateDir = templateDir2;
@@ -4142,7 +4205,7 @@ var PromptTemplateManager = class {
4142
4205
  * Load a template file by name
4143
4206
  */
4144
4207
  async loadTemplate(templateName) {
4145
- const templatePath = path6.join(this.templateDir, `${templateName}-prompt.txt`);
4208
+ const templatePath = path7.join(this.templateDir, `${templateName}-prompt.txt`);
4146
4209
  logger.debug("Loading template", {
4147
4210
  templateName,
4148
4211
  templateDir: this.templateDir,
@@ -4196,10 +4259,7 @@ var ClaudeService = class {
4196
4259
  return workflowConfig.permissionMode;
4197
4260
  }
4198
4261
  }
4199
- if (type === "issue") {
4200
- return "acceptEdits";
4201
- }
4202
- return "default";
4262
+ return "acceptEdits";
4203
4263
  }
4204
4264
  /**
4205
4265
  * Launch Claude for a specific workflow