@shepai/cli 1.15.1 → 1.17.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.
Files changed (118) hide show
  1. package/README.md +168 -22
  2. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.d.ts +5 -0
  3. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.d.ts.map +1 -0
  4. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.js +1 -0
  5. package/dist/src/application/ports/output/agents/agent-executor.interface.d.ts +2 -0
  6. package/dist/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
  7. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts +2 -0
  8. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  9. package/dist/src/application/ports/output/agents/index.d.ts +1 -0
  10. package/dist/src/application/ports/output/agents/index.d.ts.map +1 -1
  11. package/dist/src/application/ports/output/index.d.ts +1 -1
  12. package/dist/src/application/ports/output/index.d.ts.map +1 -1
  13. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts +3 -3
  14. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts.map +1 -1
  15. package/dist/src/application/use-cases/features/create-feature.use-case.js +10 -7
  16. package/dist/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  17. package/dist/src/application/use-cases/features/resume-feature.use-case.js +6 -1
  18. package/dist/src/infrastructure/di/container.d.ts.map +1 -1
  19. package/dist/src/infrastructure/di/container.js +9 -2
  20. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts +1 -1
  21. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -1
  22. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.js +6 -2
  23. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.d.ts +9 -0
  24. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.d.ts.map +1 -0
  25. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.js +11 -0
  26. package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts +3 -3
  27. package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts.map +1 -1
  28. package/dist/src/infrastructure/services/agents/common/agent-runner.service.js +4 -4
  29. package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts +1 -9
  30. package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -1
  31. package/dist/src/infrastructure/services/agents/common/agent-validator.service.js +1 -0
  32. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +3 -7
  33. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  34. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +5 -0
  35. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts +38 -0
  36. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts.map +1 -0
  37. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +296 -0
  38. package/dist/src/infrastructure/services/agents/common/types.d.ts +23 -0
  39. package/dist/src/infrastructure/services/agents/common/types.d.ts.map +1 -0
  40. package/dist/src/infrastructure/services/agents/common/types.js +7 -0
  41. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +2 -0
  42. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  43. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +6 -0
  44. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +2 -0
  45. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  46. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +32 -12
  47. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts +8 -7
  48. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -1
  49. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +139 -16
  50. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +6 -0
  51. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  52. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +29 -5
  53. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.d.ts +44 -4
  54. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.d.ts.map +1 -1
  55. package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.js +86 -14
  56. package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -1
  57. package/dist/src/presentation/cli/commands/feat/ls.command.js +42 -7
  58. package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
  59. package/dist/src/presentation/cli/commands/feat/new.command.js +3 -3
  60. package/dist/src/presentation/cli/ui/index.d.ts +1 -0
  61. package/dist/src/presentation/cli/ui/index.d.ts.map +1 -1
  62. package/dist/src/presentation/cli/ui/index.js +1 -0
  63. package/dist/src/presentation/cli/ui/spinner.d.ts +21 -0
  64. package/dist/src/presentation/cli/ui/spinner.d.ts.map +1 -0
  65. package/dist/src/presentation/cli/ui/spinner.js +45 -0
  66. package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts +1 -1
  67. package/dist/src/presentation/tui/prompts/agent-select.prompt.js +1 -1
  68. package/dist/tsconfig.build.tsbuildinfo +1 -1
  69. package/package.json +1 -1
  70. package/web/.next/BUILD_ID +1 -1
  71. package/web/.next/build-manifest.json +2 -2
  72. package/web/.next/cache/.previewinfo +1 -1
  73. package/web/.next/cache/.rscinfo +1 -1
  74. package/web/.next/cache/config.json +3 -3
  75. package/web/.next/fallback-build-manifest.json +2 -2
  76. package/web/.next/prerender-manifest.json +3 -3
  77. package/web/.next/required-server-files.js +1 -1
  78. package/web/.next/required-server-files.json +1 -1
  79. package/web/.next/server/app/_global-error.html +2 -2
  80. package/web/.next/server/app/_global-error.rsc +1 -1
  81. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  82. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  83. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  84. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  85. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  86. package/web/.next/server/app/_not-found.html +2 -2
  87. package/web/.next/server/app/_not-found.rsc +1 -1
  88. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  89. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  90. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  91. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  92. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  93. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  94. package/web/.next/server/app/index.html +2 -2
  95. package/web/.next/server/app/index.rsc +1 -1
  96. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  97. package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  98. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  99. package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  100. package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  101. package/web/.next/server/app/version.html +2 -2
  102. package/web/.next/server/app/version.rsc +1 -1
  103. package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
  104. package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
  105. package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
  106. package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
  107. package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
  108. package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
  109. package/web/.next/server/chunks/ssr/_19be0743._.js +1 -1
  110. package/web/.next/server/pages/404.html +2 -2
  111. package/web/.next/server/pages/500.html +2 -2
  112. package/web/.next/server/server-reference-manifest.js +1 -1
  113. package/web/.next/server/server-reference-manifest.json +1 -1
  114. package/web/.next/trace +1 -1
  115. package/web/.next/trace-build +1 -1
  116. /package/web/.next/static/{iYaq62xFNOChDTbH3WMrr → Wgd1DC_QfVhpAi62LjpwI}/_buildManifest.js +0 -0
  117. /package/web/.next/static/{iYaq62xFNOChDTbH3WMrr → Wgd1DC_QfVhpAi62LjpwI}/_clientMiddlewareManifest.json +0 -0
  118. /package/web/.next/static/{iYaq62xFNOChDTbH3WMrr → Wgd1DC_QfVhpAi62LjpwI}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -23,27 +23,183 @@ _Manage Claude Code, Cursor CLI, or any coding agent across the full development
23
23
 
24
24
  <img src="docs/poc/imgs/00-control-center-hero.png" alt="Shep AI Control Center — manage all features across repos from a single canvas" width="100%" />
25
25
 
26
- <br />
26
+ [![Live Demo](https://img.shields.io/badge/Live_Demo-shep--ai.github.io-blue?style=for-the-badge)](https://shep-ai.github.io/cli/poc/)
27
27
 
28
28
  </div>
29
29
 
30
- ---
31
-
32
- Running AI agents is easy. **Managing many of them through a full SDLC is the hard part.** Shep gives you a control center that handles the entire lifecycle — requirements gathering, planning, implementation, QA, and deployment — across multiple agent sessions running in parallel. See what each agent is doing, jump into any session's web preview, code editor, or terminal, approve plans when agents need your input, and let them keep working while you move on. Plug in Claude Code, Cursor CLI, Gemini CLI, or any coding agent. Each feature gets its own isolated worktree and dev environment. You manage the lifecycle, agents do the work.
30
+ ### Install
33
31
 
34
32
  ```bash
35
33
  npm i -g @shepai/cli
36
- cd your-repo/
37
- shep feat new "Implement SSO with SAML 2.0"
38
- # Agent starts working in a dedicated worktree.
39
- # Open the control center to watch progress, intervene, or switch context.
40
- shep ui
41
34
  ```
42
35
 
36
+ ### Try it
37
+
38
+ ```bash
39
+ cd your-project/
40
+ shep feat new "Add unit tests for all source files"
41
+ ```
42
+
43
+ <details>
44
+ <summary><b>List features</b> &mdash; <code>shep feat ls</code></summary>
45
+ <br />
46
+
47
+ ```
48
+ Features for /home/user/projects/my-app
49
+
50
+ ID Name Status Branch Created
51
+ 1b0a7969 Add Unit Tests ✓ Completed feat/add-unit-tests 2/13/2026
52
+ ```
53
+
54
+ </details>
55
+
56
+ <details>
57
+ <summary><b>Show feature detail</b> &mdash; <code>shep feat show 1b0a7969</code></summary>
58
+ <br />
59
+
60
+ ```
61
+ Feature: Add Unit Tests
62
+
63
+ ID 1b0a7969-b420-4754-832f-5c38801b4852
64
+ Slug add-unit-tests
65
+ Description Add comprehensive unit tests for all existing source files
66
+ in the project to ensure code correctness and improve test coverage.
67
+ Repository /home/user/projects/my-app
68
+ Branch feat/add-unit-tests
69
+ Status ✓ Completed
70
+ Worktree ~/.shep/repos/9bbd30de/wt/feat-add-unit-tests
71
+ Spec Dir ~/.shep/repos/9bbd30de/wt/feat-add-unit-tests/specs/001-add-unit-tests
72
+ Agent Run 732a1fc2-a346-4052-a028-dcb1a46b6f2c
73
+
74
+ Timestamps
75
+ Created 2/13/2026, 12:15:08 AM
76
+ Updated 2/13/2026, 12:15:08 AM
77
+ ```
78
+
79
+ </details>
80
+
81
+ <details>
82
+ <summary><b>Isolated worktree per feature</b> &mdash; no stashing, no branch switching</summary>
83
+ <br />
84
+
85
+ Each feature gets its own git worktree — fully isolated from your main branch.
86
+
87
+ ```
88
+ ~/.shep/repos/9bbd30de/wt/feat-add-unit-tests/
89
+ ├── .git # linked worktree (not a clone)
90
+ ├── src/
91
+ ├── tests/
92
+ ├── specs/
93
+ │ └── 001-add-unit-tests/
94
+ │ ├── feature.yaml # status tracking
95
+ │ ├── spec.yaml # requirements & scope
96
+ │ ├── research.yaml # technical decisions
97
+ │ ├── plan.yaml # implementation strategy
98
+ │ └── tasks.yaml # task breakdown
99
+ ├── pyproject.toml
100
+ └── README.md
101
+ ```
102
+
103
+ </details>
104
+
105
+ <details>
106
+ <summary><b>Auto-generated spec files</b> &mdash; real output from a single <code>shep feat new</code></summary>
107
+ <br />
108
+
109
+ > **`spec.yaml`** — requirements & scope
110
+
111
+ ```yaml
112
+ name: add-unit-tests
113
+ oneLiner: Add comprehensive unit tests for all source modules
114
+ summary: >
115
+ Add unit tests for every module in the package. The project currently has
116
+ minimal test coverage (only 7 tests total). This feature adds tests for
117
+ config, agents, flows, tools, observability, and CLI — using pytest with
118
+ mocking to avoid external dependencies.
119
+ sizeEstimate: M
120
+ openQuestions:
121
+ - question: 'Should we set a minimum coverage threshold and enforce it in CI?'
122
+ resolved: true
123
+ answer: >
124
+ Set 70% minimum via --cov-fail-under=70. Achievable and prevents regression.
125
+ ```
126
+
127
+ > **`research.yaml`** — technical decisions with rationale
128
+
129
+ ```yaml
130
+ decisions:
131
+ - title: 'Test Framework'
132
+ chosen: 'pytest (already configured)'
133
+ rejected:
134
+ - 'unittest — More verbose, no fixture system'
135
+ - 'nose2 — Unmaintained, no advantage'
136
+ rationale: >
137
+ Already a dev dependency with asyncio and coverage plugins configured.
138
+
139
+ - title: 'Mocking Library'
140
+ chosen: 'unittest.mock (stdlib)'
141
+ rejected:
142
+ - 'pytest-mock — Adds a dependency for marginal convenience'
143
+ rationale: >
144
+ patch() for module-level replacement, MagicMock for spec objects,
145
+ assert_called_with for verification. No new dependency needed.
146
+ ```
147
+
148
+ > **`tasks.yaml`** — TDD task breakdown
149
+
150
+ ```yaml
151
+ tasks:
152
+ - id: task-1
153
+ title: 'Create conftest.py with shared fixtures'
154
+ dependencies: []
155
+ acceptanceCriteria:
156
+ - 'mock_settings returns a Settings instance with known values'
157
+ - 'mock_llm returns MagicMock(spec=LLM) for agent tests'
158
+ - 'tmp_repo creates a temp dir with git init and one commit'
159
+ tdd:
160
+ red: ['Write test_smoke.py that imports fixtures and asserts properties']
161
+ green: ['Implement conftest.py with all three fixtures']
162
+ refactor: ['Remove smoke test — subsumed by real test files']
163
+
164
+ - id: task-3
165
+ title: 'Test config/llm.py'
166
+ dependencies: [task-1]
167
+ acceptanceCriteria:
168
+ - 'test_create_llm_with_openai_provider: verifies model, temperature, api_key'
169
+ - 'test_create_llm_with_cursor_provider: verifies base_url included'
170
+ - 'test_get_fast_llm: calls create_llm with settings.fast_model'
171
+ tdd:
172
+ red: ['Patch LLM and get_settings, assert constructor kwargs']
173
+ green: ['Tests pass — they verify existing code with mocks']
174
+ refactor: ['Extract common patch decorators if repetitive']
175
+ ```
176
+
177
+ > **`feature.yaml`** — machine-readable progress (updated continuously)
178
+
179
+ ```yaml
180
+ feature:
181
+ id: '001-add-unit-tests'
182
+ branch: 'feat/001-add-unit-tests'
183
+ lifecycle: 'research'
184
+
185
+ status:
186
+ phase: 'research'
187
+ progress: { completed: 0, total: 12, percentage: 0 }
188
+ lastUpdatedBy: 'feature-agent'
189
+ ```
190
+
191
+ </details>
192
+
193
+ ---
194
+
195
+ Running AI agents is easy. **Managing many of them through a full SDLC is the hard part.** Shep gives you a control center that handles the entire lifecycle — requirements gathering, planning, implementation, QA, and deployment — across multiple agent sessions running in parallel. See what each agent is doing, jump into any session's web preview, code editor, or terminal, approve plans when agents need your input, and let them keep working while you move on. Plug in Claude Code, Cursor CLI, Gemini CLI, or any coding agent. Each feature gets its own isolated worktree and dev environment. You manage the lifecycle, agents do the work.
196
+
43
197
  ---
44
198
 
45
199
  ## Features
46
200
 
201
+ > 🚧 **Under active development** — Web UI screenshots are from the design spec. Core CLI (`feat new`, `feat ls`, `feat show`, `settings`, `ui`) works today. Some commands (`mem`, `start`) are still WIP.
202
+
47
203
  <table>
48
204
  <tr>
49
205
  <td width="55%"><img src="docs/poc/imgs/01-features-control-center-overview.png" alt="Feature properties with attachments and metadata" /></td>
@@ -182,21 +338,11 @@ shep ui
182
338
  ## Quick Start
183
339
 
184
340
  ```bash
185
- # Install
186
- npm i -g @shepai/cli
187
-
188
- # Start the background service
189
- shep start
190
- # ➜ Local: http://localhost:5173/
191
- # Shep service is running in background, have fun!
192
-
193
- # Navigate to any repo
194
- cd ~/repos/your-project
195
-
196
- # Create your first feature
341
+ # Navigate to any repo and create a feature
342
+ cd ~/projects/your-app
197
343
  shep feat new "Add user authentication with OAuth 2.0"
198
344
 
199
- # Open the control center
345
+ # Open the control center to watch progress
200
346
  shep ui
201
347
  ```
202
348
 
@@ -0,0 +1,5 @@
1
+ import type { IAgentExecutor } from './agent-executor.interface.js';
2
+ export interface IAgentExecutorProvider {
3
+ getExecutor(): IAgentExecutor;
4
+ }
5
+ //# sourceMappingURL=agent-executor-provider.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-executor-provider.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/agents/agent-executor-provider.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACrC,WAAW,IAAI,cAAc,CAAC;CAC/B"}
@@ -68,6 +68,8 @@ export interface AgentExecutionOptions {
68
68
  outputSchema?: object;
69
69
  /** Execution timeout in milliseconds */
70
70
  timeout?: number;
71
+ /** Suppress executor debug logging (e.g. for quick foreground calls) */
72
+ silent?: boolean;
71
73
  }
72
74
  /**
73
75
  * Port interface for executing prompts against an AI agent.
@@ -1 +1 @@
1
- {"version":3,"file":"agent-executor.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/agents/agent-executor.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,KAAK,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,2DAA2D;IAC3D,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAExF;;;;;;OAMG;IACH,aAAa,CACX,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC;CACjD"}
1
+ {"version":3,"file":"agent-executor.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/agents/agent-executor.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,KAAK,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,2DAA2D;IAC3D,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAExF;;;;;;OAMG;IACH,aAAa,CACX,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC;CACjD"}
@@ -25,6 +25,8 @@ export interface IFeatureAgentProcessService {
25
25
  spawn(featureId: string, runId: string, repoPath: string, specDir: string, worktreePath?: string, options?: {
26
26
  approvalMode?: string;
27
27
  resume?: boolean;
28
+ threadId?: string;
29
+ resumeFromInterrupt?: boolean;
28
30
  }): number;
29
31
  /**
30
32
  * Check if a process is still alive.
@@ -1 +1 @@
1
- {"version":3,"file":"feature-agent-process.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/agents/feature-agent-process.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;;;OAQG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GACpD,MAAM,CAAC;IAEV;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
1
+ {"version":3,"file":"feature-agent-process.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/agents/feature-agent-process.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;;;OAQG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,GACA,MAAM,CAAC;IAEV;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
@@ -5,6 +5,7 @@
5
5
  */
6
6
  export type { IAgentExecutor, AgentExecutionResult, AgentExecutionStreamEvent, AgentExecutionOptions, } from './agent-executor.interface.js';
7
7
  export type { IAgentExecutorFactory } from './agent-executor-factory.interface.js';
8
+ export type { IAgentExecutorProvider } from './agent-executor-provider.interface.js';
8
9
  export type { IAgentRegistry, AgentDefinitionWithFactory } from './agent-registry.interface.js';
9
10
  export type { IAgentRunner, AgentRunOptions } from './agent-runner.interface.js';
10
11
  export type { IAgentRunRepository } from './agent-run-repository.interface.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/agents/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AACnF,YAAY,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChG,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACjF,YAAY,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC7F,YAAY,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/agents/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AACnF,YAAY,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AACrF,YAAY,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChG,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACjF,YAAY,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC7F,YAAY,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC"}
@@ -6,7 +6,7 @@
6
6
  * - repositories/ — Data access and persistence
7
7
  * - services/ — External services and integrations
8
8
  */
9
- export type { IAgentExecutor, AgentExecutionResult, AgentExecutionStreamEvent, AgentExecutionOptions, IAgentExecutorFactory, IAgentRegistry, AgentDefinitionWithFactory, IAgentRunner, AgentRunOptions, IAgentRunRepository, IAgentValidator, AgentValidationResult, IFeatureAgentProcessService, } from './agents/index.js';
9
+ export type { IAgentExecutor, AgentExecutionResult, AgentExecutionStreamEvent, AgentExecutionOptions, IAgentExecutorFactory, IAgentExecutorProvider, IAgentRegistry, AgentDefinitionWithFactory, IAgentRunner, AgentRunOptions, IAgentRunRepository, IAgentValidator, AgentValidationResult, IFeatureAgentProcessService, } from './agents/index.js';
10
10
  export type { IFeatureRepository, FeatureListFilters, ISettingsRepository, } from './repositories/index.js';
11
11
  export type { IExternalIssueFetcher, ExternalIssue, ISpecInitializerService, SpecInitializerResult, IVersionService, IWebServerService, IWorktreeService, WorktreeInfo, } from './services/index.js';
12
12
  export { IssueFetcherError, IssueNotFoundError, IssueAuthenticationError, IssueServiceUnavailableError, WorktreeError, WorktreeErrorCode, } from './services/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/application/ports/output/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/application/ports/output/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,0BAA0B,EAC1B,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAC"}
@@ -22,7 +22,7 @@ import type { IWorktreeService } from '../../ports/output/services/worktree-serv
22
22
  import type { IFeatureAgentProcessService } from '../../ports/output/agents/feature-agent-process.interface.js';
23
23
  import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
24
24
  import type { ISpecInitializerService } from '../../ports/output/services/spec-initializer.interface.js';
25
- import type { IAgentExecutorFactory } from '../../ports/output/agents/agent-executor-factory.interface.js';
25
+ import type { IAgentExecutorProvider } from '../../ports/output/agents/agent-executor-provider.interface.js';
26
26
  export interface CreateFeatureInput {
27
27
  userInput: string;
28
28
  repositoryPath: string;
@@ -34,8 +34,8 @@ export declare class CreateFeatureUseCase {
34
34
  private readonly agentProcess;
35
35
  private readonly runRepository;
36
36
  private readonly specInitializer;
37
- private readonly executorFactory;
38
- constructor(featureRepo: IFeatureRepository, worktreeService: IWorktreeService, agentProcess: IFeatureAgentProcessService, runRepository: IAgentRunRepository, specInitializer: ISpecInitializerService, executorFactory: IAgentExecutorFactory);
37
+ private readonly executorProvider;
38
+ constructor(featureRepo: IFeatureRepository, worktreeService: IWorktreeService, agentProcess: IFeatureAgentProcessService, runRepository: IAgentRunRepository, specInitializer: ISpecInitializerService, executorProvider: IAgentExecutorProvider);
39
39
  execute(input: CreateFeatureInput): Promise<Feature>;
40
40
  private generateMetadata;
41
41
  private toSlug;
@@ -1 +1 @@
1
- {"version":3,"file":"create-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/features/create-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAO3G,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAQD,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAVf,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB,EAEjC,YAAY,EAAE,2BAA2B,EAEzC,aAAa,EAAE,mBAAmB,EAElC,eAAe,EAAE,uBAAuB,EAExC,eAAe,EAAE,qBAAqB;IAGnD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;YA8E5C,gBAAgB;IA6C9B,OAAO,CAAC,MAAM;CAQf"}
1
+ {"version":3,"file":"create-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/features/create-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAO7G,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAQD,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAVhB,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB,EAEjC,YAAY,EAAE,2BAA2B,EAEzC,aAAa,EAAE,mBAAmB,EAElC,eAAe,EAAE,uBAAuB,EAExC,gBAAgB,EAAE,sBAAsB;IAGrD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;YA0E5C,gBAAgB;IA6C9B,OAAO,CAAC,MAAM;CAQf"}
@@ -41,14 +41,14 @@ let CreateFeatureUseCase = class CreateFeatureUseCase {
41
41
  agentProcess;
42
42
  runRepository;
43
43
  specInitializer;
44
- executorFactory;
45
- constructor(featureRepo, worktreeService, agentProcess, runRepository, specInitializer, executorFactory) {
44
+ executorProvider;
45
+ constructor(featureRepo, worktreeService, agentProcess, runRepository, specInitializer, executorProvider) {
46
46
  this.featureRepo = featureRepo;
47
47
  this.worktreeService = worktreeService;
48
48
  this.agentProcess = agentProcess;
49
49
  this.runRepository = runRepository;
50
50
  this.specInitializer = specInitializer;
51
- this.executorFactory = executorFactory;
51
+ this.executorProvider = executorProvider;
52
52
  }
53
53
  async execute(input) {
54
54
  const metadata = await this.generateMetadata(input.userInput);
@@ -102,13 +102,15 @@ let CreateFeatureUseCase = class CreateFeatureUseCase {
102
102
  updatedAt: now.toISOString(),
103
103
  };
104
104
  await this.runRepository.create(agentRun);
105
- this.agentProcess.spawn(feature.id, runId, input.repositoryPath, specDir, worktreePath, input.approvalMode ? { approvalMode: input.approvalMode } : undefined);
105
+ this.agentProcess.spawn(feature.id, runId, input.repositoryPath, specDir, worktreePath, {
106
+ ...(input.approvalMode ? { approvalMode: input.approvalMode } : {}),
107
+ threadId: agentRun.threadId,
108
+ });
106
109
  return feature;
107
110
  }
108
111
  async generateMetadata(userInput) {
109
112
  try {
110
- const settings = getSettings();
111
- const executor = this.executorFactory.createExecutor(settings.agent.type, settings.agent);
113
+ const executor = this.executorProvider.getExecutor();
112
114
  const truncated = userInput.length > MAX_INPUT_FOR_AI
113
115
  ? `${userInput.slice(0, MAX_INPUT_FOR_AI)}...`
114
116
  : userInput;
@@ -124,6 +126,7 @@ JSON only, no markdown fences.`;
124
126
  const result = await executor.execute(prompt, {
125
127
  maxTurns: 1,
126
128
  allowedTools: [],
129
+ silent: true,
127
130
  });
128
131
  const parsed = JSON.parse(result.result);
129
132
  if (!parsed.slug || !parsed.name || !parsed.description) {
@@ -160,7 +163,7 @@ CreateFeatureUseCase = __decorate([
160
163
  __param(2, inject('IFeatureAgentProcessService')),
161
164
  __param(3, inject('IAgentRunRepository')),
162
165
  __param(4, inject('ISpecInitializerService')),
163
- __param(5, inject('IAgentExecutorFactory')),
166
+ __param(5, inject('IAgentExecutorProvider')),
164
167
  __metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object])
165
168
  ], CreateFeatureUseCase);
166
169
  export { CreateFeatureUseCase };
@@ -1 +1 @@
1
- {"version":3,"file":"resume-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/features/resume-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAQlG,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAExB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBANf,WAAW,EAAE,kBAAkB,EAE/B,OAAO,EAAE,mBAAmB,EAE5B,cAAc,EAAE,2BAA2B,EAE3C,eAAe,EAAE,gBAAgB;IAG9C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAwE/D"}
1
+ {"version":3,"file":"resume-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/features/resume-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAQlG,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAExB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBANf,WAAW,EAAE,kBAAkB,EAE/B,OAAO,EAAE,mBAAmB,EAE5B,cAAc,EAAE,2BAA2B,EAE3C,eAAe,EAAE,gBAAgB;IAG9C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA6E/D"}
@@ -85,7 +85,12 @@ let ResumeFeatureUseCase = class ResumeFeatureUseCase {
85
85
  });
86
86
  // Derive worktree path and spawn resume worker
87
87
  const worktreePath = this.worktreeService.getWorktreePath(feature.repositoryPath, feature.branch);
88
- this.processService.spawn(feature.id, newRunId, feature.repositoryPath, worktreePath, worktreePath, { resume: true, approvalMode: lastRun.approvalMode });
88
+ this.processService.spawn(feature.id, newRunId, feature.repositoryPath, worktreePath, worktreePath, {
89
+ resume: true,
90
+ approvalMode: lastRun.approvalMode,
91
+ threadId: lastRun.threadId,
92
+ resumeFromInterrupt: lastRun.status === AgentRunStatus.waitingApproval,
93
+ });
89
94
  return { feature, newRun };
90
95
  }
91
96
  };
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAgErC;;;;;GAKG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CA8GrE;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAkErC;;;;;GAKG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CAqHrE;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -21,6 +21,7 @@ import { VersionService } from '../services/version.service.js';
21
21
  import { WebServerService } from '../services/web-server.service.js';
22
22
  import { WorktreeService } from '../services/git/worktree.service.js';
23
23
  import { AgentExecutorFactory } from '../services/agents/common/agent-executor-factory.service.js';
24
+ import { AgentExecutorProvider } from '../services/agents/common/agent-executor-provider.service.js';
24
25
  import { MockAgentExecutorFactory } from '../services/agents/common/executors/mock-executor-factory.service.js';
25
26
  import { AgentRegistryService } from '../services/agents/common/agent-registry.service.js';
26
27
  import { AgentRunnerService } from '../services/agents/common/agent-runner.service.js';
@@ -109,6 +110,12 @@ export async function initializeContainer() {
109
110
  },
110
111
  });
111
112
  }
113
+ container.register('IAgentExecutorProvider', {
114
+ useFactory: (c) => {
115
+ const factory = c.resolve('IAgentExecutorFactory');
116
+ return new AgentExecutorProvider(factory);
117
+ },
118
+ });
112
119
  container.register('IAgentRegistry', {
113
120
  useFactory: () => new AgentRegistryService(),
114
121
  });
@@ -118,10 +125,10 @@ export async function initializeContainer() {
118
125
  container.register('IAgentRunner', {
119
126
  useFactory: (c) => {
120
127
  const registry = c.resolve('IAgentRegistry');
121
- const executorFactory = c.resolve('IAgentExecutorFactory');
128
+ const executorProvider = c.resolve('IAgentExecutorProvider');
122
129
  const checkpointer = c.resolve('Checkpointer');
123
130
  const runRepository = c.resolve('IAgentRunRepository');
124
- return new AgentRunnerService(registry, executorFactory, checkpointer, runRepository);
131
+ return new AgentRunnerService(registry, executorProvider, checkpointer, runRepository);
125
132
  },
126
133
  });
127
134
  container.register('IFeatureAgentProcessService', {
@@ -10,7 +10,7 @@
10
10
  import type { AgentType, AgentConfig } from '../../../../domain/generated/output.js';
11
11
  import type { IAgentExecutor } from '../../../../application/ports/output/agents/agent-executor.interface.js';
12
12
  import type { IAgentExecutorFactory } from '../../../../application/ports/output/agents/agent-executor-factory.interface.js';
13
- import { type SpawnFunction } from './executors/claude-code-executor.service.js';
13
+ import type { SpawnFunction } from './types.js';
14
14
  /**
15
15
  * Factory that creates and caches agent executor instances.
16
16
  *
@@ -1 +1 @@
1
- {"version":3,"file":"agent-executor-factory.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/common/agent-executor-factory.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yEAAyE,CAAC;AAC9G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iFAAiF,CAAC;AAC7H,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,6CAA6C,CAAC;AAErD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,qBAAqB;IAMpD,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqC;IAE3D;;OAEG;gBAC0B,KAAK,EAAE,aAAa;IAEjD;;;;;;;OAOG;IACH,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,GAAG,cAAc;IAoB9E;;;;OAIG;IACH,kBAAkB,IAAI,SAAS,EAAE;CAGlC"}
1
+ {"version":3,"file":"agent-executor-factory.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/common/agent-executor-factory.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yEAAyE,CAAC;AAC9G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iFAAiF,CAAC;AAG7H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,qBAAqB;IAMpD,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqC;IAE3D;;OAEG;gBAC0B,KAAK,EAAE,aAAa;IAEjD;;;;;;;OAOG;IACH,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,GAAG,cAAc;IAuB9E;;;;OAIG;IACH,kBAAkB,IAAI,SAAS,EAAE;CAGlC"}
@@ -7,7 +7,8 @@
7
7
  * Uses constructor dependency injection for the spawn function
8
8
  * to enable testability without mocking node:child_process directly.
9
9
  */
10
- import { ClaudeCodeExecutorService, } from './executors/claude-code-executor.service.js';
10
+ import { ClaudeCodeExecutorService } from './executors/claude-code-executor.service.js';
11
+ import { CursorExecutorService } from './executors/cursor-executor.service.js';
11
12
  /**
12
13
  * Factory that creates and caches agent executor instances.
13
14
  *
@@ -41,6 +42,9 @@ export class AgentExecutorFactory {
41
42
  case 'claude-code':
42
43
  executor = new ClaudeCodeExecutorService(this.spawn);
43
44
  break;
45
+ case 'cursor':
46
+ executor = new CursorExecutorService(this.spawn);
47
+ break;
44
48
  default:
45
49
  throw new Error(`Unsupported agent type: ${agentType}. Supported: ${this.getSupportedAgents().join(', ')}`);
46
50
  }
@@ -53,6 +57,6 @@ export class AgentExecutorFactory {
53
57
  * @returns Array of supported agent types
54
58
  */
55
59
  getSupportedAgents() {
56
- return ['claude-code'];
60
+ return ['claude-code', 'cursor'];
57
61
  }
58
62
  }
@@ -0,0 +1,9 @@
1
+ import type { IAgentExecutorProvider } from '../../../../application/ports/output/agents/agent-executor-provider.interface.js';
2
+ import type { IAgentExecutorFactory } from '../../../../application/ports/output/agents/agent-executor-factory.interface.js';
3
+ import type { IAgentExecutor } from '../../../../application/ports/output/agents/agent-executor.interface.js';
4
+ export declare class AgentExecutorProvider implements IAgentExecutorProvider {
5
+ private readonly factory;
6
+ constructor(factory: IAgentExecutorFactory);
7
+ getExecutor(): IAgentExecutor;
8
+ }
9
+ //# sourceMappingURL=agent-executor-provider.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-executor-provider.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/common/agent-executor-provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kFAAkF,CAAC;AAC/H,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iFAAiF,CAAC;AAC7H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yEAAyE,CAAC;AAG9G,qBAAa,qBAAsB,YAAW,sBAAsB;IACtD,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,qBAAqB;IAE3D,WAAW,IAAI,cAAc;CAI9B"}
@@ -0,0 +1,11 @@
1
+ import { getSettings } from '../../settings.service.js';
2
+ export class AgentExecutorProvider {
3
+ factory;
4
+ constructor(factory) {
5
+ this.factory = factory;
6
+ }
7
+ getExecutor() {
8
+ const settings = getSettings();
9
+ return this.factory.createExecutor(settings.agent.type, settings.agent);
10
+ }
11
+ }
@@ -9,15 +9,15 @@
9
9
  import type { BaseCheckpointSaver } from '@langchain/langgraph';
10
10
  import type { IAgentRunner, AgentRunOptions } from '../../../../application/ports/output/agents/agent-runner.interface.js';
11
11
  import type { IAgentRegistry } from '../../../../application/ports/output/agents/agent-registry.interface.js';
12
- import type { IAgentExecutorFactory } from '../../../../application/ports/output/agents/agent-executor-factory.interface.js';
12
+ import type { IAgentExecutorProvider } from '../../../../application/ports/output/agents/agent-executor-provider.interface.js';
13
13
  import type { IAgentRunRepository } from '../../../../application/ports/output/agents/agent-run-repository.interface.js';
14
14
  import type { AgentRun, AgentRunEvent } from '../../../../domain/generated/output.js';
15
15
  export declare class AgentRunnerService implements IAgentRunner {
16
16
  private readonly registry;
17
- private readonly executorFactory;
17
+ private readonly executorProvider;
18
18
  private readonly checkpointer;
19
19
  private readonly runRepository;
20
- constructor(registry: IAgentRegistry, executorFactory: IAgentExecutorFactory, checkpointer: BaseCheckpointSaver, runRepository: IAgentRunRepository);
20
+ constructor(registry: IAgentRegistry, executorProvider: IAgentExecutorProvider, checkpointer: BaseCheckpointSaver, runRepository: IAgentRunRepository);
21
21
  runAgent(agentName: string, prompt: string, options?: AgentRunOptions): Promise<AgentRun>;
22
22
  runAgentStream(agentName: string, prompt: string, options?: AgentRunOptions): AsyncIterable<AgentRunEvent>;
23
23
  private setupRun;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-runner.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/common/agent-runner.service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAChB,MAAM,6DAA6D,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uEAAuE,CAAC;AACnH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qEAAqE,CAAC;AAE/G,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAM5E,qBAAa,kBAAmB,YAAW,YAAY;IAEnD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAHb,QAAQ,EAAE,cAAc,EACxB,eAAe,EAAE,qBAAqB,EACtC,YAAY,EAAE,mBAAmB,EACjC,aAAa,EAAE,mBAAmB;IAG/C,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAmBxF,cAAc,CACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,aAAa,CAAC,aAAa,CAAC;YAwCjB,QAAQ;YAwCR,aAAa;YAUb,UAAU;CAQzB"}
1
+ {"version":3,"file":"agent-runner.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/common/agent-runner.service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAChB,MAAM,6DAA6D,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AACrH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qEAAqE,CAAC;AAE/G,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAM5E,qBAAa,kBAAmB,YAAW,YAAY;IAEnD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAHb,QAAQ,EAAE,cAAc,EACxB,gBAAgB,EAAE,sBAAsB,EACxC,YAAY,EAAE,mBAAmB,EACjC,aAAa,EAAE,mBAAmB;IAG/C,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAmBxF,cAAc,CACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,aAAa,CAAC,aAAa,CAAC;YAwCjB,QAAQ;YAwCR,aAAa;YAUb,UAAU;CAQzB"}
@@ -13,12 +13,12 @@ import { EventChannel } from '../streaming/event-channel.js';
13
13
  import { StreamingExecutorProxy } from '../streaming/streaming-executor-proxy.js';
14
14
  export class AgentRunnerService {
15
15
  registry;
16
- executorFactory;
16
+ executorProvider;
17
17
  checkpointer;
18
18
  runRepository;
19
- constructor(registry, executorFactory, checkpointer, runRepository) {
19
+ constructor(registry, executorProvider, checkpointer, runRepository) {
20
20
  this.registry = registry;
21
- this.executorFactory = executorFactory;
21
+ this.executorProvider = executorProvider;
22
22
  this.checkpointer = checkpointer;
23
23
  this.runRepository = runRepository;
24
24
  }
@@ -76,7 +76,7 @@ export class AgentRunnerService {
76
76
  }
77
77
  const settings = getSettings();
78
78
  const agentType = settings.agent.type;
79
- const executor = this.executorFactory.createExecutor(agentType, settings.agent);
79
+ const executor = this.executorProvider.getExecutor();
80
80
  const runId = crypto.randomUUID();
81
81
  const threadId = crypto.randomUUID();
82
82
  const now = new Date().toISOString();
@@ -10,15 +10,7 @@
10
10
  */
11
11
  import type { AgentType } from '../../../../domain/generated/output.js';
12
12
  import type { IAgentValidator, AgentValidationResult } from '../../../../application/ports/output/agents/agent-validator.interface.js';
13
- /**
14
- * Type for the command executor dependency.
15
- * Matches the promisified signature of child_process.execFile.
16
- * Injected via constructor to avoid direct node module mocking in tests.
17
- */
18
- export type ExecFunction = (file: string, args: string[]) => Promise<{
19
- stdout: string;
20
- stderr: string;
21
- }>;
13
+ import type { ExecFunction } from './types.js';
22
14
  /**
23
15
  * Service that validates agent tool availability on the system.
24
16
  *
@@ -1 +1 @@
1
- {"version":3,"file":"agent-validator.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/common/agent-validator.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,0EAA0E,CAAC;AAElF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,KACX,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AASjD;;;;;GAKG;AACH,qBACa,qBAAsB,YAAW,eAAe;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC;;;OAGG;gBACiC,MAAM,EAAE,YAAY;IAIxD;;;;;OAKG;IACG,WAAW,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,qBAAqB,CAAC;CA2BxE"}
1
+ {"version":3,"file":"agent-validator.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/common/agent-validator.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,0EAA0E,CAAC;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAU/C;;;;;GAKG;AACH,qBACa,qBAAsB,YAAW,eAAe;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC;;;OAGG;gBACiC,MAAM,EAAE,YAAY;IAIxD;;;;;OAKG;IACG,WAAW,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,qBAAqB,CAAC;CA2BxE"}
@@ -26,6 +26,7 @@ import { injectable, inject } from 'tsyringe';
26
26
  */
27
27
  const AGENT_BINARY_MAP = {
28
28
  'claude-code': 'claude',
29
+ cursor: 'agent',
29
30
  };
30
31
  /**
31
32
  * Service that validates agent tool availability on the system.