@shepai/cli 1.151.1 → 1.151.2-pr438.6135e39

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 (181) hide show
  1. package/apis/json-schema/AgentRunDetail.yaml +28 -0
  2. package/apis/json-schema/DoctorDiagnosticReport.yaml +76 -0
  3. package/apis/json-schema/FailedRunSummary.yaml +22 -0
  4. package/apis/json-schema/SystemInfo.yaml +22 -0
  5. package/apis/json-schema/WorkerLogEntry.yaml +27 -0
  6. package/apis/json-schema/WorkflowConfig.yaml +5 -0
  7. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +28 -0
  8. package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
  9. package/dist/packages/core/src/application/ports/output/services/github-issue-service.interface.d.ts +57 -0
  10. package/dist/packages/core/src/application/ports/output/services/github-issue-service.interface.d.ts.map +1 -0
  11. package/dist/packages/core/src/application/ports/output/services/github-issue-service.interface.js +39 -0
  12. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +37 -0
  13. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
  14. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +12 -0
  15. package/dist/packages/core/src/application/ports/output/services/index.d.ts +5 -3
  16. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  17. package/dist/packages/core/src/application/ports/output/services/index.js +2 -1
  18. package/dist/packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.d.ts +64 -0
  19. package/dist/packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.d.ts.map +1 -0
  20. package/dist/packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.js +493 -0
  21. package/dist/packages/core/src/domain/generated/output.d.ts +185 -0
  22. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  23. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/di/container.js +4 -0
  25. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.d.ts.map +1 -1
  26. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js +8 -2
  27. package/dist/packages/core/src/infrastructure/services/external/github-issue-creator.service.d.ts +17 -0
  28. package/dist/packages/core/src/infrastructure/services/external/github-issue-creator.service.d.ts.map +1 -0
  29. package/dist/packages/core/src/infrastructure/services/external/github-issue-creator.service.js +69 -0
  30. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +3 -1
  31. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
  32. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +37 -1
  33. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +2 -1
  34. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  35. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +21 -0
  36. package/dist/src/presentation/cli/commands/doctor.command.d.ts +20 -0
  37. package/dist/src/presentation/cli/commands/doctor.command.d.ts.map +1 -0
  38. package/dist/src/presentation/cli/commands/doctor.command.js +129 -0
  39. package/dist/src/presentation/cli/index.js +2 -0
  40. package/dist/tsconfig.build.tsbuildinfo +1 -1
  41. package/package.json +1 -1
  42. package/web/.next/BUILD_ID +1 -1
  43. package/web/.next/build-manifest.json +2 -2
  44. package/web/.next/fallback-build-manifest.json +2 -2
  45. package/web/.next/prerender-manifest.json +3 -3
  46. package/web/.next/required-server-files.js +3 -3
  47. package/web/.next/required-server-files.json +3 -3
  48. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  49. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +29 -29
  52. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  53. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  55. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  56. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  58. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  61. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +29 -29
  64. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  65. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  67. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  68. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  70. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  71. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  72. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  73. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  74. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  76. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  77. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/_global-error.html +2 -2
  79. package/web/.next/server/app/_global-error.rsc +1 -1
  80. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  81. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  83. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  84. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  85. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  86. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  88. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  89. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  90. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  91. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  93. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  95. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  96. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  97. package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js.map +1 -1
  98. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  99. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  100. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js.map +1 -1
  102. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
  103. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js.map +1 -1
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  110. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  124. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/_0c473fef._.js +2 -2
  126. package/web/.next/server/chunks/ssr/_0c473fef._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  128. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
  130. package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
  132. package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
  134. package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
  136. package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
  138. package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
  139. package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/{_2a9037e8._.js → _c2ca0f1b._.js} +2 -2
  141. package/web/.next/server/chunks/ssr/{_2a9037e8._.js.map → _c2ca0f1b._.js.map} +1 -1
  142. package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  144. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/_dc9a9d32._.js +3 -0
  146. package/web/.next/server/chunks/ssr/{_5b5dbf5b._.js.map → _dc9a9d32._.js.map} +1 -1
  147. package/web/.next/server/chunks/ssr/_e9e9ed20._.js +2 -2
  148. package/web/.next/server/chunks/ssr/_e9e9ed20._.js.map +1 -1
  149. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  150. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  152. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  154. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  155. package/web/.next/server/chunks/ssr/{src_presentation_web_1be4a9a5._.js → src_presentation_web_aa941041._.js} +2 -2
  156. package/web/.next/server/chunks/ssr/{src_presentation_web_1be4a9a5._.js.map → src_presentation_web_aa941041._.js.map} +1 -1
  157. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  158. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  159. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  161. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  162. package/web/.next/server/pages/500.html +2 -2
  163. package/web/.next/server/server-reference-manifest.js +1 -1
  164. package/web/.next/server/server-reference-manifest.json +45 -45
  165. package/web/.next/static/chunks/{b113da1fbdb83ffa.js → 091de81012e2bc48.js} +1 -1
  166. package/web/.next/static/chunks/{c28ae41d01ad3130.js → 25889ca8401d1bc0.js} +1 -1
  167. package/web/.next/static/chunks/{176b3e6837dce4ad.js → 359b2815c5ed39cc.js} +1 -1
  168. package/web/.next/static/chunks/{fdd703b4cec873bb.js → 4a28fd1bca225386.js} +1 -1
  169. package/web/.next/static/chunks/{56f68c783c480176.js → 5e1877d1f1bcfd77.js} +1 -1
  170. package/web/.next/static/chunks/{2dfeeccc2f180ab8.js → 76a3f345f8cf2608.js} +1 -1
  171. package/web/.next/static/chunks/{1dc8d2933f22de05.js → 79eae02d0342fb73.js} +1 -1
  172. package/web/.next/static/chunks/{db5dc8b848e7ddd1.js → 80915095cec414bf.js} +1 -1
  173. package/web/.next/static/chunks/{067e63e1f8a471c7.js → 87b72b8a10f8255b.js} +2 -2
  174. package/web/.next/static/chunks/{768e2db272a413cc.js → c2388f8bc58b2a21.js} +1 -1
  175. package/web/.next/static/chunks/e760b952ba1a10d4.js +1 -0
  176. package/web/.next/static/chunks/{e860f0c546deeabc.js → ed9408f100149c34.js} +1 -1
  177. package/web/.next/server/chunks/ssr/_5b5dbf5b._.js +0 -3
  178. package/web/.next/static/chunks/b02205ef744953bc.js +0 -1
  179. /package/web/.next/static/{qifXEaEcnY1cbH8eHlEIN → -o7QIcv1p5C722dwF4EFd}/_buildManifest.js +0 -0
  180. /package/web/.next/static/{qifXEaEcnY1cbH8eHlEIN → -o7QIcv1p5C722dwF4EFd}/_clientMiddlewareManifest.json +0 -0
  181. /package/web/.next/static/{qifXEaEcnY1cbH8eHlEIN → -o7QIcv1p5C722dwF4EFd}/_ssgManifest.js +0 -0
@@ -0,0 +1,28 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: AgentRunDetail.yaml
3
+ type: object
4
+ properties:
5
+ agentType:
6
+ type: string
7
+ description: Type of agent (e.g. claude-code, gemini-cli)
8
+ agentName:
9
+ type: string
10
+ description: Name/identifier of the agent run
11
+ prompt:
12
+ type: string
13
+ description: Input prompt sent to the agent executor
14
+ result:
15
+ type: string
16
+ description: Final result output from the agent (if available)
17
+ error:
18
+ type: string
19
+ description: Error message if the run failed
20
+ timestamp:
21
+ type: string
22
+ description: ISO 8601 timestamp of the run
23
+ required:
24
+ - agentType
25
+ - agentName
26
+ - prompt
27
+ - timestamp
28
+ description: Detailed agent run information including prompt and result for diagnostic reporting
@@ -0,0 +1,76 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: DoctorDiagnosticReport.yaml
3
+ type: object
4
+ properties:
5
+ userDescription:
6
+ type: string
7
+ description: User-provided description of the problem
8
+ failedRunSummaries:
9
+ type: array
10
+ items:
11
+ $ref: FailedRunSummary.yaml
12
+ description: Summaries of recent failed agent runs
13
+ systemInfo:
14
+ $ref: SystemInfo.yaml
15
+ description: System environment information
16
+ cliVersion:
17
+ type: string
18
+ description: Current shep CLI version
19
+ featureId:
20
+ type: string
21
+ description: Feature ID when diagnosing a specific feature (optional)
22
+ featureName:
23
+ type: string
24
+ description: Feature name when diagnosing a specific feature (optional)
25
+ featureLifecycle:
26
+ type: string
27
+ description: Feature lifecycle phase (e.g. Implementation, Review)
28
+ featureBranch:
29
+ type: string
30
+ description: Feature git branch name
31
+ featureDescription:
32
+ type: string
33
+ description: Feature description
34
+ featureWorkflowConfig:
35
+ type: string
36
+ description: JSON-serialized feature workflow configuration (fast, push, openPr, approvalGates)
37
+ specYaml:
38
+ type: string
39
+ description: Raw spec.yaml content
40
+ researchYaml:
41
+ type: string
42
+ description: Raw research.yaml content
43
+ planYaml:
44
+ type: string
45
+ description: Raw plan.yaml content
46
+ tasksYaml:
47
+ type: string
48
+ description: Raw tasks.yaml content
49
+ featureStatusYaml:
50
+ type: string
51
+ description: Raw feature.yaml (status tracking) content
52
+ agentRunDetails:
53
+ type: array
54
+ items:
55
+ $ref: AgentRunDetail.yaml
56
+ description: Detailed agent run information including prompts and results
57
+ conversationMessages:
58
+ type: string
59
+ description: JSON-serialized conversation messages (Feature.messages[])
60
+ featurePlan:
61
+ type: string
62
+ description: JSON-serialized feature plan (Feature.plan)
63
+ workerLogs:
64
+ type: array
65
+ items:
66
+ $ref: WorkerLogEntry.yaml
67
+ description: Worker execution logs for agent runs associated with this feature
68
+ phaseTimings:
69
+ type: string
70
+ description: JSON-serialized phase timing records
71
+ required:
72
+ - userDescription
73
+ - failedRunSummaries
74
+ - systemInfo
75
+ - cliVersion
76
+ description: Structured diagnostic report collected by shep doctor for issue creation
@@ -0,0 +1,22 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: FailedRunSummary.yaml
3
+ type: object
4
+ properties:
5
+ agentType:
6
+ type: string
7
+ description: Type of agent that failed (e.g. claude-code, gemini-cli)
8
+ agentName:
9
+ type: string
10
+ description: Name/identifier of the agent run
11
+ error:
12
+ type: string
13
+ description: Error message from the failed run
14
+ timestamp:
15
+ type: string
16
+ description: ISO 8601 timestamp when the failure occurred
17
+ required:
18
+ - agentType
19
+ - agentName
20
+ - error
21
+ - timestamp
22
+ description: Summary of a failed agent run for diagnostic reporting
@@ -0,0 +1,22 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: SystemInfo.yaml
3
+ type: object
4
+ properties:
5
+ nodeVersion:
6
+ type: string
7
+ description: Node.js version (e.g. v20.11.0)
8
+ platform:
9
+ type: string
10
+ description: Operating system platform (e.g. darwin, linux, win32)
11
+ arch:
12
+ type: string
13
+ description: CPU architecture (e.g. x64, arm64)
14
+ ghVersion:
15
+ type: string
16
+ description: gh CLI version string
17
+ required:
18
+ - nodeVersion
19
+ - platform
20
+ - arch
21
+ - ghVersion
22
+ description: System environment information for diagnostic reporting
@@ -0,0 +1,27 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: WorkerLogEntry.yaml
3
+ type: object
4
+ properties:
5
+ agentRunId:
6
+ type: string
7
+ description: Agent run ID this log belongs to
8
+ agentName:
9
+ type: string
10
+ description: Name of the agent that produced this log
11
+ content:
12
+ type: string
13
+ description: Full log file content (may be truncated)
14
+ truncated:
15
+ type: boolean
16
+ description: Whether the content was truncated due to size limits
17
+ originalLength:
18
+ type: integer
19
+ minimum: -2147483648
20
+ maximum: 2147483647
21
+ description: Original character count before truncation (only set when truncated)
22
+ required:
23
+ - agentRunId
24
+ - agentName
25
+ - content
26
+ - truncated
27
+ description: Worker log entry for a specific agent run
@@ -55,6 +55,11 @@ properties:
55
55
  hideCiStatus:
56
56
  type: boolean
57
57
  description: "Hide CI status badges from UI (default: true)"
58
+ doctorMaxFixAttempts:
59
+ type: integer
60
+ minimum: -2147483648
61
+ maximum: 2147483647
62
+ description: "Maximum number of doctor fix attempts before giving up (default: 1)"
58
63
  required:
59
64
  - openPrOnImplementationComplete
60
65
  - approvalGateDefaults
@@ -120,6 +120,21 @@ export interface PrStatusInfo {
120
120
  /** Whether the PR can be merged (undefined if unknown, false = merge conflicts) */
121
121
  mergeable?: boolean;
122
122
  }
123
+ /**
124
+ * Arguments for creating a PR programmatically (without a pr.yaml file).
125
+ */
126
+ export interface PrCreateArgs {
127
+ /** PR title */
128
+ title: string;
129
+ /** PR body (Markdown) */
130
+ body: string;
131
+ /** Labels to apply to the PR */
132
+ labels: string[];
133
+ /** Base branch to merge into (e.g. "main") */
134
+ base: string;
135
+ /** Target repository for cross-fork PRs (e.g. "shep-ai/cli"). Omit for same-repo PRs. */
136
+ repo?: string;
137
+ }
123
138
  /**
124
139
  * Merge strategy for pull requests.
125
140
  */
@@ -197,6 +212,19 @@ export interface IGitPrService {
197
212
  * @throws GitPrError with GH_NOT_FOUND or AUTH_FAILURE code
198
213
  */
199
214
  createPr(cwd: string, prYamlPath: string): Promise<PrCreateResult>;
215
+ /**
216
+ * Create a pull request from explicit arguments (no pr.yaml file needed).
217
+ *
218
+ * Useful for programmatic PR creation where the title, body, and labels
219
+ * are constructed in code rather than read from a YAML file. Supports
220
+ * cross-fork PRs via the optional `repo` field in args.
221
+ *
222
+ * @param cwd - Working directory path (must be inside the git repo)
223
+ * @param args - PR creation arguments (title, body, labels, base, optional repo)
224
+ * @returns URL and number of the created PR
225
+ * @throws GitPrError with GH_NOT_FOUND or AUTH_FAILURE code
226
+ */
227
+ createPrFromArgs(cwd: string, args: PrCreateArgs): Promise<PrCreateResult>;
200
228
  /**
201
229
  * Merge a pull request immediately.
202
230
  *
@@ -1 +1 @@
1
- {"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc;IACxB,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAGjB,IAAI,EAAE,cAAc;aACpB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,cAAc,EACpB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wBAAwB;IACxB,MAAM,EAAE,QAAQ,CAAC;IACjB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ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;OAWG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAIlG;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpF;;;;;;;OAOG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEnD;;;;;;;OAOG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExD;;;;;;;;OAQG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3C;;;;;;OAMG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CACjB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C"}
1
+ {"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;A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issue Service Interface
3
+ *
4
+ * Output port for creating GitHub issues via the gh CLI.
5
+ * Implementations wrap `gh issue create` for issue creation on
6
+ * any GitHub repository. Separate from IExternalIssueFetcher which
7
+ * is a read-only fetcher — this service handles write operations.
8
+ */
9
+ /**
10
+ * Error codes for GitHub issue creation operations.
11
+ */
12
+ export declare enum GitHubIssueErrorCode {
13
+ /** The target repository was not found or the user lacks access */
14
+ GH_NOT_FOUND = "GH_NOT_FOUND",
15
+ /** GitHub CLI authentication failure */
16
+ AUTH_FAILURE = "AUTH_FAILURE",
17
+ /** Network connectivity error during API call */
18
+ NETWORK_ERROR = "NETWORK_ERROR",
19
+ /** Issue creation failed for an unspecified reason */
20
+ CREATE_FAILED = "CREATE_FAILED"
21
+ }
22
+ /**
23
+ * Typed error for GitHub issue creation operations.
24
+ */
25
+ export declare class GitHubIssueError extends Error {
26
+ readonly code: GitHubIssueErrorCode;
27
+ readonly cause?: Error | undefined;
28
+ constructor(message: string, code: GitHubIssueErrorCode, cause?: Error | undefined);
29
+ }
30
+ /**
31
+ * Result of creating a GitHub issue.
32
+ */
33
+ export interface GitHubIssueCreateResult {
34
+ /** URL of the created issue (e.g. "https://github.com/owner/repo/issues/42") */
35
+ url: string;
36
+ /** Issue number */
37
+ number: number;
38
+ }
39
+ /**
40
+ * Output port for GitHub issue creation.
41
+ *
42
+ * Implementations use the `gh` CLI for all GitHub interactions.
43
+ */
44
+ export interface IGitHubIssueService {
45
+ /**
46
+ * Create a new issue on a GitHub repository.
47
+ *
48
+ * @param repo - Full owner/repo identifier (e.g. "shep-ai/cli")
49
+ * @param title - Issue title
50
+ * @param body - Issue body (Markdown)
51
+ * @param labels - Labels to apply to the issue (e.g. ["bug", "shep-doctor"])
52
+ * @returns The created issue's URL and number
53
+ * @throws {GitHubIssueError} with appropriate error code on failure
54
+ */
55
+ createIssue(repo: string, title: string, body: string, labels: string[]): Promise<GitHubIssueCreateResult>;
56
+ }
57
+ //# sourceMappingURL=github-issue-service.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-issue-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/github-issue-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,mEAAmE;IACnE,YAAY,iBAAiB;IAC7B,wCAAwC;IACxC,YAAY,iBAAiB;IAC7B,iDAAiD;IACjD,aAAa,kBAAkB;IAC/B,sDAAsD;IACtD,aAAa,kBAAkB;CAChC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;aAGvB,IAAI,EAAE,oBAAoB;aAC1B,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,oBAAoB,EAC1B,KAAK,CAAC,EAAE,KAAK,YAAA;CAMhC;AAMD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,WAAW,CACT,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACrC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GitHub Issue Service Interface
3
+ *
4
+ * Output port for creating GitHub issues via the gh CLI.
5
+ * Implementations wrap `gh issue create` for issue creation on
6
+ * any GitHub repository. Separate from IExternalIssueFetcher which
7
+ * is a read-only fetcher — this service handles write operations.
8
+ */
9
+ // ---------------------------------------------------------------------------
10
+ // Error types
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * Error codes for GitHub issue creation operations.
14
+ */
15
+ export var GitHubIssueErrorCode;
16
+ (function (GitHubIssueErrorCode) {
17
+ /** The target repository was not found or the user lacks access */
18
+ GitHubIssueErrorCode["GH_NOT_FOUND"] = "GH_NOT_FOUND";
19
+ /** GitHub CLI authentication failure */
20
+ GitHubIssueErrorCode["AUTH_FAILURE"] = "AUTH_FAILURE";
21
+ /** Network connectivity error during API call */
22
+ GitHubIssueErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
23
+ /** Issue creation failed for an unspecified reason */
24
+ GitHubIssueErrorCode["CREATE_FAILED"] = "CREATE_FAILED";
25
+ })(GitHubIssueErrorCode || (GitHubIssueErrorCode = {}));
26
+ /**
27
+ * Typed error for GitHub issue creation operations.
28
+ */
29
+ export class GitHubIssueError extends Error {
30
+ code;
31
+ cause;
32
+ constructor(message, code, cause) {
33
+ super(message);
34
+ this.code = code;
35
+ this.cause = cause;
36
+ this.name = 'GitHubIssueError';
37
+ Object.setPrototypeOf(this, new.target.prototype);
38
+ }
39
+ }
@@ -29,6 +29,12 @@ export declare class GitHubUrlParseError extends Error {
29
29
  export declare class GitHubRepoListError extends Error {
30
30
  constructor(message: string, cause?: Error);
31
31
  }
32
+ /**
33
+ * Thrown when a `gh repo fork` operation fails.
34
+ */
35
+ export declare class GitHubForkError extends Error {
36
+ constructor(message: string, cause?: Error);
37
+ }
32
38
  /**
33
39
  * Thrown when checking the viewer's permission on a repository fails.
34
40
  */
@@ -66,6 +72,15 @@ export interface CloneOptions {
66
72
  /** Callback invoked with stderr chunks during clone for progress display */
67
73
  onProgress?: (data: string) => void;
68
74
  }
75
+ /**
76
+ * Result of forking a GitHub repository.
77
+ */
78
+ export interface ForkResult {
79
+ /** Full owner/repo identifier of the fork (e.g. "username/cli") */
80
+ nameWithOwner: string;
81
+ /** Clone URL for the fork (e.g. "https://github.com/username/cli.git") */
82
+ cloneUrl: string;
83
+ }
69
84
  /**
70
85
  * Result of parsing a GitHub URL.
71
86
  */
@@ -120,6 +135,28 @@ export interface IGitHubRepositoryService {
120
135
  * @throws {GitHubUrlParseError} if the URL does not match any supported format
121
136
  */
122
137
  parseGitHubUrl(url: string): ParsedGitHubUrl;
138
+ /**
139
+ * Check whether the authenticated user has push access to a repository.
140
+ *
141
+ * Uses `gh api repos/{owner}/{repo} --jq '.permissions.push'` to detect
142
+ * access level. Returns false as the safe fallback on any error (network,
143
+ * rate limit, API change) per NFR-9.
144
+ *
145
+ * @param repoNameWithOwner - Full owner/repo identifier (e.g. "shep-ai/cli")
146
+ * @returns True if the user has push access, false otherwise (including on errors)
147
+ */
148
+ checkPushAccess(repoNameWithOwner: string): Promise<boolean>;
149
+ /**
150
+ * Fork a GitHub repository into the authenticated user's account.
151
+ *
152
+ * Uses `gh repo fork` which is idempotent — if the user already has a fork,
153
+ * it detects the existing fork and returns it rather than failing.
154
+ *
155
+ * @param repoNameWithOwner - Full owner/repo identifier (e.g. "shep-ai/cli")
156
+ * @returns The fork's nameWithOwner and clone URL
157
+ * @throws {GitHubForkError} if the fork operation fails
158
+ */
159
+ forkRepository(repoNameWithOwner: string): Promise<ForkResult>;
123
160
  /**
124
161
  * Get the authenticated user's permission level on a GitHub repository.
125
162
  *
@@ -1 +1 @@
1
- {"version":3,"file":"github-repository-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;C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E,MAAM,GAAG,eAAe,CAAC;IAE7C;;;;;;;;;OASG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxD"}
1
+ {"version":3,"file":"github-repository-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAMD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;I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AC,CAAC;CACxD"}
@@ -56,6 +56,18 @@ export class GitHubRepoListError extends Error {
56
56
  this.cause = cause;
57
57
  }
58
58
  }
59
+ /**
60
+ * Thrown when a `gh repo fork` operation fails.
61
+ */
62
+ export class GitHubForkError extends Error {
63
+ constructor(message, cause) {
64
+ super(message);
65
+ this.name = 'GitHubForkError';
66
+ Object.setPrototypeOf(this, new.target.prototype);
67
+ if (cause)
68
+ this.cause = cause;
69
+ }
70
+ }
59
71
  /**
60
72
  * Thrown when checking the viewer's permission on a repository fails.
61
73
  */
@@ -12,11 +12,13 @@ export type { IWorktreeService, WorktreeInfo } from './worktree-service.interfac
12
12
  export { WorktreeError, WorktreeErrorCode } from './worktree-service.interface.js';
13
13
  export type { IToolInstallerService, AvailableTerminalEntry } from './tool-installer.service.js';
14
14
  export type { INotificationService } from './notification-service.interface.js';
15
- export type { IGitPrService, CiStatus, CiStatusResult, DiffSummary, MergeStrategy, PrCreateResult, } from './git-pr-service.interface.js';
15
+ export type { IGitPrService, CiStatus, CiStatusResult, DiffSummary, MergeStrategy, PrCreateArgs, PrCreateResult, } from './git-pr-service.interface.js';
16
16
  export { GitPrError, GitPrErrorCode } from './git-pr-service.interface.js';
17
17
  export type { IIdeLauncherService, LaunchIdeInput, LaunchIdeResult, LaunchIdeSuccess, LaunchIdeFailed, } from './ide-launcher-service.interface.js';
18
18
  export type { IDaemonService, DaemonState } from './daemon-service.interface.js';
19
19
  export type { IDeploymentService, DeploymentStatus } from './deployment-service.interface.js';
20
- export type { IGitHubRepositoryService, GitHubRepo, ListUserRepositoriesOptions, CloneOptions, ParsedGitHubUrl, } from './github-repository-service.interface.js';
21
- export { GitHubAuthError, GitHubCloneError, GitHubUrlParseError, GitHubRepoListError, } from './github-repository-service.interface.js';
20
+ export type { IGitHubRepositoryService, GitHubRepo, ListUserRepositoriesOptions, CloneOptions, ParsedGitHubUrl, ForkResult, } from './github-repository-service.interface.js';
21
+ export { GitHubAuthError, GitHubCloneError, GitHubUrlParseError, GitHubRepoListError, GitHubForkError, } from './github-repository-service.interface.js';
22
+ export type { IGitHubIssueService, GitHubIssueCreateResult, } from './github-issue-service.interface.js';
23
+ export { GitHubIssueError, GitHubIssueErrorCode } from './github-issue-service.interface.js';
22
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACnF,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACjG,YAAY,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,YAAY,EACV,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC9F,YAAY,EACV,wBAAwB,EACxB,UAAU,EACV,2BAA2B,EAC3B,YAAY,EACZ,eAAe,GAChB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACnF,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACjG,YAAY,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,YAAY,EACV,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC9F,YAAY,EACV,wBAAwB,EACxB,UAAU,EACV,2BAA2B,EAC3B,YAAY,EACZ,eAAe,EACf,UAAU,GACX,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC"}
@@ -6,4 +6,5 @@
6
6
  export { IssueFetcherError, IssueNotFoundError, IssueAuthenticationError, IssueServiceUnavailableError, } from './external-issue-fetcher.interface.js';
7
7
  export { WorktreeError, WorktreeErrorCode } from './worktree-service.interface.js';
8
8
  export { GitPrError, GitPrErrorCode } from './git-pr-service.interface.js';
9
- export { GitHubAuthError, GitHubCloneError, GitHubUrlParseError, GitHubRepoListError, } from './github-repository-service.interface.js';
9
+ export { GitHubAuthError, GitHubCloneError, GitHubUrlParseError, GitHubRepoListError, GitHubForkError, } from './github-repository-service.interface.js';
10
+ export { GitHubIssueError, GitHubIssueErrorCode } from './github-issue-service.interface.js';
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Doctor Diagnose Use Case
3
+ *
4
+ * Orchestrates the shep doctor workflow:
5
+ * 1. Collect diagnostic context (failed agent runs, version, system info)
6
+ * 2. Create a structured GitHub issue on shep-ai/cli
7
+ * 3. Optionally attempt a fix via AI agent
8
+ * 4. Open a PR with the fix (direct push for maintainers, fork for contributors)
9
+ *
10
+ * Following Clean Architecture: all external operations are injected via interfaces.
11
+ */
12
+ import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
13
+ import type { IPhaseTimingRepository } from '../../ports/output/agents/phase-timing-repository.interface.js';
14
+ import type { IVersionService } from '../../ports/output/services/version-service.interface.js';
15
+ import type { IGitHubIssueService } from '../../ports/output/services/github-issue-service.interface.js';
16
+ import type { IGitHubRepositoryService } from '../../ports/output/services/github-repository-service.interface.js';
17
+ import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
18
+ import type { IAgentExecutorProvider } from '../../ports/output/agents/agent-executor-provider.interface.js';
19
+ import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
20
+ import type { ExecFunction } from '../../../infrastructure/services/git/worktree.service.js';
21
+ import type { DoctorDiagnosticReport } from '../../../domain/generated/output.js';
22
+ export interface DoctorDiagnoseInput {
23
+ description: string;
24
+ fix: boolean;
25
+ workdir?: string;
26
+ featureId?: string;
27
+ }
28
+ export interface DoctorDiagnoseResult {
29
+ diagnosticReport: DoctorDiagnosticReport;
30
+ issueUrl: string;
31
+ issueNumber: number;
32
+ prUrl?: string;
33
+ flowType?: 'maintainer' | 'contributor';
34
+ error?: string;
35
+ cleanedUp: boolean;
36
+ }
37
+ export declare class DoctorDiagnoseUseCase {
38
+ private readonly agentRunRepo;
39
+ private readonly versionService;
40
+ private readonly issueService;
41
+ private readonly repoService;
42
+ private readonly prService;
43
+ private readonly agentExecutorProvider;
44
+ private readonly execFile;
45
+ private readonly featureRepo;
46
+ private readonly phaseTimingRepo;
47
+ constructor(agentRunRepo: IAgentRunRepository, versionService: IVersionService, issueService: IGitHubIssueService, repoService: IGitHubRepositoryService, prService: IGitPrService, agentExecutorProvider: IAgentExecutorProvider, execFile: ExecFunction, featureRepo: IFeatureRepository, phaseTimingRepo: IPhaseTimingRepository);
48
+ execute(input: DoctorDiagnoseInput): Promise<DoctorDiagnoseResult>;
49
+ private collectDiagnostics;
50
+ private filterFailedRuns;
51
+ private sanitizeRunSummary;
52
+ private collectSystemInfo;
53
+ private truncate;
54
+ private collectSpecYamls;
55
+ private collectWorkerLogs;
56
+ private collectPhaseTimings;
57
+ private buildAgentRunDetails;
58
+ private readFileSafe;
59
+ private formatIssueTitle;
60
+ private formatIssueBody;
61
+ private attemptFix;
62
+ private buildFixPrompt;
63
+ }
64
+ //# sourceMappingURL=doctor-diagnose.use-case.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-diagnose.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAChG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAC;AACzG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oEAAoE,CAAC;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0DAA0D,CAAC;AAC7F,OAAO,KAAK,EACV,sBAAsB,EAMvB,MAAM,qCAAqC,CAAC;AAO7C,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,YAA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