@shepai/cli 1.16.0 → 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 (102) hide show
  1. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.d.ts +5 -0
  2. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.d.ts.map +1 -0
  3. package/dist/src/application/ports/output/agents/agent-executor-provider.interface.js +1 -0
  4. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts +2 -0
  5. package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  6. package/dist/src/application/ports/output/agents/index.d.ts +1 -0
  7. package/dist/src/application/ports/output/agents/index.d.ts.map +1 -1
  8. package/dist/src/application/ports/output/index.d.ts +1 -1
  9. package/dist/src/application/ports/output/index.d.ts.map +1 -1
  10. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts +3 -3
  11. package/dist/src/application/use-cases/features/create-feature.use-case.d.ts.map +1 -1
  12. package/dist/src/application/use-cases/features/create-feature.use-case.js +9 -7
  13. package/dist/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  14. package/dist/src/application/use-cases/features/resume-feature.use-case.js +6 -1
  15. package/dist/src/infrastructure/di/container.d.ts.map +1 -1
  16. package/dist/src/infrastructure/di/container.js +9 -2
  17. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts +1 -1
  18. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -1
  19. package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.js +6 -2
  20. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.d.ts +9 -0
  21. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.d.ts.map +1 -0
  22. package/dist/src/infrastructure/services/agents/common/agent-executor-provider.service.js +11 -0
  23. package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts +3 -3
  24. package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts.map +1 -1
  25. package/dist/src/infrastructure/services/agents/common/agent-runner.service.js +4 -4
  26. package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts +1 -9
  27. package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -1
  28. package/dist/src/infrastructure/services/agents/common/agent-validator.service.js +1 -0
  29. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +1 -7
  30. package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  31. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts +38 -0
  32. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts.map +1 -0
  33. package/dist/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +296 -0
  34. package/dist/src/infrastructure/services/agents/common/types.d.ts +23 -0
  35. package/dist/src/infrastructure/services/agents/common/types.d.ts.map +1 -0
  36. package/dist/src/infrastructure/services/agents/common/types.js +7 -0
  37. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +2 -0
  38. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  39. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +6 -0
  40. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +2 -0
  41. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  42. package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +32 -12
  43. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -1
  44. package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +7 -8
  45. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +6 -0
  46. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  47. package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +29 -5
  48. package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -1
  49. package/dist/src/presentation/cli/commands/feat/ls.command.js +42 -7
  50. package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts +1 -1
  51. package/dist/src/presentation/tui/prompts/agent-select.prompt.js +1 -1
  52. package/dist/tsconfig.build.tsbuildinfo +1 -1
  53. package/package.json +1 -1
  54. package/web/.next/BUILD_ID +1 -1
  55. package/web/.next/build-manifest.json +2 -2
  56. package/web/.next/cache/.previewinfo +1 -1
  57. package/web/.next/cache/.rscinfo +1 -1
  58. package/web/.next/cache/config.json +3 -3
  59. package/web/.next/fallback-build-manifest.json +2 -2
  60. package/web/.next/prerender-manifest.json +3 -3
  61. package/web/.next/required-server-files.js +1 -1
  62. package/web/.next/required-server-files.json +1 -1
  63. package/web/.next/server/app/_global-error.html +2 -2
  64. package/web/.next/server/app/_global-error.rsc +1 -1
  65. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  66. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  67. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  68. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  69. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  70. package/web/.next/server/app/_not-found.html +2 -2
  71. package/web/.next/server/app/_not-found.rsc +1 -1
  72. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  73. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  74. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  75. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  76. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  77. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  78. package/web/.next/server/app/index.html +2 -2
  79. package/web/.next/server/app/index.rsc +1 -1
  80. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  81. package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  82. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  83. package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  84. package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  85. package/web/.next/server/app/version.html +2 -2
  86. package/web/.next/server/app/version.rsc +1 -1
  87. package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
  88. package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
  89. package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
  90. package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
  91. package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
  92. package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
  93. package/web/.next/server/chunks/ssr/_19be0743._.js +1 -1
  94. package/web/.next/server/pages/404.html +2 -2
  95. package/web/.next/server/pages/500.html +2 -2
  96. package/web/.next/server/server-reference-manifest.js +1 -1
  97. package/web/.next/server/server-reference-manifest.json +1 -1
  98. package/web/.next/trace +1 -1
  99. package/web/.next/trace-build +1 -1
  100. /package/web/.next/static/{KqMr5DLdrvbaA-agLuHP1 → Wgd1DC_QfVhpAi62LjpwI}/_buildManifest.js +0 -0
  101. /package/web/.next/static/{KqMr5DLdrvbaA-agLuHP1 → Wgd1DC_QfVhpAi62LjpwI}/_clientMiddlewareManifest.json +0 -0
  102. /package/web/.next/static/{KqMr5DLdrvbaA-agLuHP1 → Wgd1DC_QfVhpAi62LjpwI}/_ssgManifest.js +0 -0
@@ -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"}
@@ -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;IA8C9B,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;
@@ -161,7 +163,7 @@ CreateFeatureUseCase = __decorate([
161
163
  __param(2, inject('IFeatureAgentProcessService')),
162
164
  __param(3, inject('IAgentRunRepository')),
163
165
  __param(4, inject('ISpecInitializerService')),
164
- __param(5, inject('IAgentExecutorFactory')),
166
+ __param(5, inject('IAgentExecutorProvider')),
165
167
  __metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object])
166
168
  ], CreateFeatureUseCase);
167
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.
@@ -8,15 +8,9 @@
8
8
  * Uses constructor dependency injection for the spawn function
9
9
  * to enable testability without mocking node:child_process directly.
10
10
  */
11
- import type { ChildProcess } from 'node:child_process';
12
11
  import type { AgentType, AgentFeature } from '../../../../../domain/generated/output.js';
13
12
  import type { IAgentExecutor, AgentExecutionOptions, AgentExecutionResult, AgentExecutionStreamEvent } from '../../../../../application/ports/output/agents/agent-executor.interface.js';
14
- /**
15
- * Type for the spawn dependency.
16
- * Matches the signature of child_process.spawn.
17
- * Injected via constructor to enable testability.
18
- */
19
- export type SpawnFunction = (command: string, args: string[], options?: object) => ChildProcess;
13
+ import type { SpawnFunction } from '../types.js';
20
14
  /**
21
15
  * Executor service for Claude Code agent.
22
16
  * Uses subprocess spawning to interact with the `claude` CLI.
@@ -1 +1 @@
1
- {"version":3,"file":"claude-code-executor.service.d.ts","sourceRoot":"","sources":["../../../../../../../src/infrastructure/services/agents/common/executors/claude-code-executor.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,4EAA4E,CAAC;AAEpF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,YAAY,CAAC;AAUhG;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,cAAc;IAMlD,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAA8B;IAE3D,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAS;gBAEM,KAAK,EAAE,aAAa;IAEjD,4EAA4E;IAC5E,OAAO,CAAC,GAAG;IAML,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAmHtF,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAAC,yBAAyB,CAAC;IA+F3C;;;OAGG;IACH,OAAO,CAAC,cAAc;IAmCtB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAI/C,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,eAAe;CAkExB"}
1
+ {"version":3,"file":"claude-code-executor.service.d.ts","sourceRoot":"","sources":["../../../../../../../src/infrastructure/services/agents/common/executors/claude-code-executor.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,4EAA4E,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAUjD;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,cAAc;IAMlD,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAA8B;IAE3D,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAS;gBAEM,KAAK,EAAE,aAAa;IAEjD,4EAA4E;IAC5E,OAAO,CAAC,GAAG;IAML,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAmHtF,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAAC,yBAAyB,CAAC;IA+F3C;;;OAGG;IACH,OAAO,CAAC,cAAc;IAmCtB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAI/C,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,eAAe;CAkExB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Cursor Executor Service
3
+ *
4
+ * Infrastructure implementation of IAgentExecutor for the Cursor agent.
5
+ * Executes prompts via the `agent` CLI subprocess with JSON and stream-json
6
+ * output formats.
7
+ *
8
+ * Uses constructor dependency injection for the spawn function
9
+ * to enable testability without mocking node:child_process directly.
10
+ */
11
+ import type { AgentType, AgentFeature } from '../../../../../domain/generated/output.js';
12
+ import type { IAgentExecutor, AgentExecutionOptions, AgentExecutionResult, AgentExecutionStreamEvent } from '../../../../../application/ports/output/agents/agent-executor.interface.js';
13
+ import type { SpawnFunction } from '../types.js';
14
+ /**
15
+ * Executor service for Cursor agent.
16
+ * Uses subprocess spawning to interact with the `agent` CLI.
17
+ */
18
+ export declare class CursorExecutorService implements IAgentExecutor {
19
+ private readonly spawn;
20
+ readonly agentType: AgentType;
21
+ /** When true, suppresses debug logging (set per-call via options.silent) */
22
+ private silent;
23
+ constructor(spawn: SpawnFunction);
24
+ /** Debug logging — writes to stdout so it appears in the worker log file */
25
+ private log;
26
+ supportsFeature(feature: AgentFeature): boolean;
27
+ execute(prompt: string, options?: AgentExecutionOptions): Promise<AgentExecutionResult>;
28
+ executeStream(prompt: string, options?: AgentExecutionOptions): AsyncIterable<AgentExecutionStreamEvent>;
29
+ /**
30
+ * Log a stream-json line as a human-readable event in the worker log.
31
+ */
32
+ private logStreamEvent;
33
+ private buildArgs;
34
+ private buildStreamArgs;
35
+ private buildSpawnOptions;
36
+ private parseStreamLine;
37
+ }
38
+ //# sourceMappingURL=cursor-executor.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-executor.service.d.ts","sourceRoot":"","sources":["../../../../../../../src/infrastructure/services/agents/common/executors/cursor-executor.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,4EAA4E,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,cAAc;IAM9C,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAyB;IAEtD,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAS;gBAEM,KAAK,EAAE,aAAa;IAEjD,4EAA4E;IAC5E,OAAO,CAAC,GAAG;IAMX,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAIzC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAkGtF,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAAC,yBAAyB,CAAC;IA8E3C;;OAEG;IACH,OAAO,CAAC,cAAc;IAkCtB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;CAgDxB"}