@shepai/cli 1.150.0 → 1.150.1-pr438.a45c5a8
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.
- package/apis/json-schema/AgentRunDetail.yaml +28 -0
- package/apis/json-schema/DoctorDiagnosticReport.yaml +76 -0
- package/apis/json-schema/FailedRunSummary.yaml +22 -0
- package/apis/json-schema/SystemInfo.yaml +22 -0
- package/apis/json-schema/WorkerLogEntry.yaml +27 -0
- package/apis/json-schema/WorkflowConfig.yaml +5 -0
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +28 -0
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/github-issue-service.interface.d.ts +57 -0
- package/dist/packages/core/src/application/ports/output/services/github-issue-service.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/github-issue-service.interface.js +39 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +37 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +12 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +5 -3
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/index.js +2 -1
- package/dist/packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.d.ts +64 -0
- package/dist/packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.js +493 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +185 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +4 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js +2 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.js +11 -42
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +2 -3
- package/dist/packages/core/src/infrastructure/services/external/github-issue-creator.service.d.ts +17 -0
- package/dist/packages/core/src/infrastructure/services/external/github-issue-creator.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/external/github-issue-creator.service.js +69 -0
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +3 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +37 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +2 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +21 -0
- package/dist/src/presentation/cli/commands/doctor.command.d.ts +20 -0
- package/dist/src/presentation/cli/commands/doctor.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/doctor.command.js +129 -0
- package/dist/src/presentation/cli/index.js +2 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0c5f56e3._.js +2 -2
- package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
- package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js +2 -2
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
- package/web/.next/server/chunks/ssr/_8fcc39d4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_92b9e766._.js → _c57fcc3d._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_92b9e766._.js.map → _c57fcc3d._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d9ec0ad3._.js +3 -0
- package/web/.next/server/chunks/ssr/{_bf695af2._.js.map → _d9ec0ad3._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_59679705._.js +3 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_f449e0af._.js.map → src_presentation_web_59679705._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +44 -44
- package/web/.next/static/chunks/{f17d6d87a3508ba0.js → 105e115cc0279d0b.js} +1 -1
- package/web/.next/static/chunks/{d2e9df0b38f0d962.js → 30654541007efa41.js} +1 -1
- package/web/.next/static/chunks/{ad8f9fe681d88d09.js → 7e355140b474096e.js} +1 -1
- package/web/.next/static/chunks/{1f265c393614cad2.js → 81d36111ffb9fa39.js} +1 -1
- package/web/.next/static/chunks/{f9a69279d55bfd3b.js → 8eeba06dafaf3eea.js} +1 -1
- package/web/.next/static/chunks/b6cfa78b4f0c8396.js +1 -0
- package/web/.next/static/chunks/{c69cea3bed20eea7.js → c3404e49c0659db6.js} +1 -1
- package/web/.next/static/chunks/{a18a5348858c6d75.js → d05b0218c27f0983.js} +2 -2
- package/web/.next/static/chunks/{97a773e5a88462a0.js → d73e26cbdd504e80.js} +1 -1
- package/web/.next/static/chunks/{eb7b91c45ec7b468.js → e82c47107e20a24a.js} +1 -1
- package/web/.next/static/chunks/{10b75a1ea923a690.js → ecfca4afb3eafaec.js} +1 -1
- package/web/.next/static/chunks/{413e2ca694528497.js → f8eb0bb5796e089a.js} +1 -1
- package/web/.next/server/chunks/ssr/_bf695af2._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_f449e0af._.js +0 -3
- package/web/.next/static/chunks/56233eb0780a997e.js +0 -1
- /package/web/.next/static/{e6hBEk7bk-CV1jLaYcZLX → uNnTvV-39iw19q7UYtmz3}/_buildManifest.js +0 -0
- /package/web/.next/static/{e6hBEk7bk-CV1jLaYcZLX → uNnTvV-39iw19q7UYtmz3}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{e6hBEk7bk-CV1jLaYcZLX → uNnTvV-39iw19q7UYtmz3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor Command
|
|
3
|
+
*
|
|
4
|
+
* Diagnoses shep operation failures, opens a GitHub issue on shep-ai/cli,
|
|
5
|
+
* and optionally invokes an AI agent to attempt a fix and open a PR.
|
|
6
|
+
*
|
|
7
|
+
* Usage: shep doctor [description] [options]
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* $ shep doctor "agent crashed during planning"
|
|
11
|
+
* $ shep doctor --fix
|
|
12
|
+
* $ shep doctor --no-fix
|
|
13
|
+
* $ shep doctor "broken workflow" --fix --workdir /tmp/my-fix
|
|
14
|
+
*/
|
|
15
|
+
import { Command } from 'commander';
|
|
16
|
+
import { container } from '../../../../packages/core/src/infrastructure/di/container.js';
|
|
17
|
+
import { DoctorDiagnoseUseCase } from '../../../../packages/core/src/application/use-cases/doctor/doctor-diagnose.use-case.js';
|
|
18
|
+
import { colors, messages, spinner } from '../ui/index.js';
|
|
19
|
+
/**
|
|
20
|
+
* Create the doctor command
|
|
21
|
+
*/
|
|
22
|
+
export function createDoctorCommand() {
|
|
23
|
+
const cmd = new Command('doctor')
|
|
24
|
+
.description('Diagnose shep failures, open a GitHub issue, and optionally attempt a fix')
|
|
25
|
+
.argument('[description]', 'Problem description (prompted interactively if omitted)')
|
|
26
|
+
.option('--fix', 'Skip confirmation and attempt a fix automatically')
|
|
27
|
+
.option('--no-fix', 'Skip the fix attempt entirely (only create the issue)')
|
|
28
|
+
.action(async (description, options) => {
|
|
29
|
+
try {
|
|
30
|
+
// Step 1: Validate prerequisites
|
|
31
|
+
await validatePrerequisites();
|
|
32
|
+
// Step 2: Collect description (argument or interactive prompt)
|
|
33
|
+
const problemDescription = description ?? (await promptForDescription());
|
|
34
|
+
if (!problemDescription) {
|
|
35
|
+
messages.info('No description provided. Cancelled.');
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
// Step 3: Determine fix behavior
|
|
39
|
+
const shouldFix = await resolveFix(options);
|
|
40
|
+
// Step 4: Run the use case
|
|
41
|
+
const useCase = container.resolve(DoctorDiagnoseUseCase);
|
|
42
|
+
messages.newline();
|
|
43
|
+
messages.info('Running shep doctor...');
|
|
44
|
+
messages.newline();
|
|
45
|
+
const result = await spinner('Collecting diagnostics and creating issue', () => useCase.execute({
|
|
46
|
+
description: problemDescription,
|
|
47
|
+
fix: shouldFix,
|
|
48
|
+
workdir: options.workdir,
|
|
49
|
+
featureId: options.featureId,
|
|
50
|
+
}));
|
|
51
|
+
// Step 5: Display results
|
|
52
|
+
messages.newline();
|
|
53
|
+
messages.success(`GitHub issue created: ${colors.accent(result.issueUrl)}`);
|
|
54
|
+
if (result.prUrl) {
|
|
55
|
+
messages.success(`Pull request created: ${colors.accent(result.prUrl)}`);
|
|
56
|
+
if (result.flowType) {
|
|
57
|
+
messages.info(`Flow: ${result.flowType === 'maintainer' ? 'direct push (maintainer)' : 'fork (contributor)'}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (shouldFix && result.error) {
|
|
61
|
+
messages.warning(`Fix attempt failed: ${result.error}`);
|
|
62
|
+
messages.info('The issue has been created — a maintainer can review it.');
|
|
63
|
+
}
|
|
64
|
+
else if (!shouldFix) {
|
|
65
|
+
messages.info('Issue created. Use --fix to attempt an automated fix.');
|
|
66
|
+
}
|
|
67
|
+
if (result.cleanedUp) {
|
|
68
|
+
messages.info('Temporary working directory cleaned up.');
|
|
69
|
+
}
|
|
70
|
+
messages.newline();
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
74
|
+
// Handle Ctrl+C gracefully
|
|
75
|
+
if (err.message.includes('force closed') || err.message.includes('User force closed')) {
|
|
76
|
+
messages.info('Cancelled.');
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
messages.error('Doctor failed', err);
|
|
80
|
+
process.exitCode = 1;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
// Commander handles --no-fix by negating the --fix option, but we need
|
|
84
|
+
// explicit --workdir and --feature-id as separate options
|
|
85
|
+
cmd.option('--workdir <path>', 'Custom directory for the cloned repository');
|
|
86
|
+
cmd.option('--feature-id <id>', 'Scope diagnostics to a specific feature (by ID or prefix)');
|
|
87
|
+
return cmd;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Validate that gh CLI is installed and authenticated.
|
|
91
|
+
*/
|
|
92
|
+
async function validatePrerequisites() {
|
|
93
|
+
const toolInstaller = container.resolve('IToolInstallerService');
|
|
94
|
+
const ghStatus = await toolInstaller.checkAvailability('gh');
|
|
95
|
+
if (ghStatus.status !== 'available') {
|
|
96
|
+
throw new Error('GitHub CLI (gh) is not installed. Install it from https://cli.github.com/ and run: gh auth login');
|
|
97
|
+
}
|
|
98
|
+
const repoService = container.resolve('IGitHubRepositoryService');
|
|
99
|
+
await repoService.checkAuth();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Prompt the user interactively for a problem description.
|
|
103
|
+
*/
|
|
104
|
+
async function promptForDescription() {
|
|
105
|
+
const { input } = await import('@inquirer/prompts');
|
|
106
|
+
const description = await input({
|
|
107
|
+
message: 'Describe the problem you encountered:',
|
|
108
|
+
});
|
|
109
|
+
return description.trim() || undefined;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Determine whether to attempt a fix based on flags or interactive prompt.
|
|
113
|
+
*/
|
|
114
|
+
async function resolveFix(options) {
|
|
115
|
+
// --fix explicitly set: always fix
|
|
116
|
+
if (options.fix === true) {
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
// --no-fix explicitly set (Commander sets fix to false): skip fix
|
|
120
|
+
if (options.fix === false) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
// Interactive: ask the user
|
|
124
|
+
const { confirm } = await import('@inquirer/prompts');
|
|
125
|
+
return confirm({
|
|
126
|
+
message: 'Would you like shep to attempt a fix?',
|
|
127
|
+
default: false,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
@@ -42,6 +42,7 @@ import { createIdeOpenCommand } from './commands/ide-open.command.js';
|
|
|
42
42
|
import { createInstallCommand } from './commands/install.command.js';
|
|
43
43
|
import { createUpgradeCommand } from './commands/upgrade.command.js';
|
|
44
44
|
import { createToolsCommand } from './commands/tools.command.js';
|
|
45
|
+
import { createDoctorCommand } from './commands/doctor.command.js';
|
|
45
46
|
import { messages } from './ui/index.js';
|
|
46
47
|
// Daemon lifecycle commands
|
|
47
48
|
import { createStartCommand } from './commands/start.command.js';
|
|
@@ -110,6 +111,7 @@ async function bootstrap() {
|
|
|
110
111
|
program.addCommand(createInstallCommand());
|
|
111
112
|
program.addCommand(createToolsCommand());
|
|
112
113
|
program.addCommand(createUpgradeCommand());
|
|
114
|
+
program.addCommand(createDoctorCommand());
|
|
113
115
|
// Daemon lifecycle commands (task-9)
|
|
114
116
|
program.addCommand(createStartCommand());
|
|
115
117
|
program.addCommand(createStopCommand());
|