@shepai/cli 1.18.0 → 1.20.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.
- package/dist/eslint.config.mjs +3 -0
- package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts +2 -1
- package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
- package/dist/src/application/ports/output/agents/index.d.ts +1 -0
- package/dist/src/application/ports/output/agents/index.d.ts.map +1 -1
- package/dist/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +44 -0
- package/dist/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agents/phase-timing-repository.interface.js +11 -0
- package/dist/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
- package/dist/src/application/use-cases/agents/approve-agent-run.use-case.js +6 -2
- package/dist/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
- package/dist/src/application/use-cases/agents/reject-agent-run.use-case.js +0 -1
- package/dist/src/application/use-cases/features/create-feature.use-case.d.ts +12 -2
- package/dist/src/application/use-cases/features/create-feature.use-case.d.ts.map +1 -1
- package/dist/src/application/use-cases/features/create-feature.use-case.js +45 -10
- package/dist/src/application/use-cases/features/resume-feature.use-case.js +2 -2
- package/dist/src/domain/factories/settings-defaults.factory.js +2 -2
- package/dist/src/domain/generated/output.d.ts +48 -7
- package/dist/src/domain/generated/output.d.ts.map +1 -1
- package/dist/src/domain/generated/output.js +8 -0
- package/dist/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/src/infrastructure/di/container.js +7 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts +1 -2
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts.map +1 -1
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.js +4 -4
- package/dist/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
- package/dist/src/infrastructure/persistence/sqlite/migrations.js +31 -0
- package/dist/src/infrastructure/repositories/agent-run.repository.d.ts.map +1 -1
- package/dist/src/infrastructure/repositories/agent-run.repository.js +5 -9
- package/dist/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +21 -0
- package/dist/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -0
- package/dist/src/infrastructure/repositories/sqlite-phase-timing.repository.js +100 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +305 -13
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.js +124 -7
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +2 -1
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +2 -2
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +2 -1
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +19 -7
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +1 -1
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +11 -2
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +46 -15
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/repair.node.d.ts +23 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/repair.node.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/repair.node.js +77 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/plan.schema.d.ts +4 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/plan.schema.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/plan.schema.js +54 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/research.schema.d.ts +3 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/research.schema.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/research.schema.js +24 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/spec.schema.d.ts +4 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/spec.schema.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/spec.schema.js +50 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/validation.d.ts +8 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/validation.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/schemas/validation.js +36 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/validate.node.d.ts +12 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/validate.node.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/validate.node.js +58 -0
- package/dist/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts +30 -0
- package/dist/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/phase-timing-context.js +68 -0
- package/dist/src/infrastructure/services/agents/feature-agent/state.d.ts +5 -1
- package/dist/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
- package/dist/src/infrastructure/services/agents/feature-agent/state.js +14 -1
- package/dist/src/infrastructure/services/ide-launchers/antigravity.launcher.d.ts +10 -0
- package/dist/src/infrastructure/services/ide-launchers/antigravity.launcher.d.ts.map +1 -0
- package/dist/src/infrastructure/services/ide-launchers/antigravity.launcher.js +21 -0
- package/dist/src/infrastructure/services/ide-launchers/cursor.launcher.d.ts +10 -0
- package/dist/src/infrastructure/services/ide-launchers/cursor.launcher.d.ts.map +1 -0
- package/dist/src/infrastructure/services/ide-launchers/cursor.launcher.js +21 -0
- package/dist/src/infrastructure/services/ide-launchers/ide-launcher.interface.d.ts +31 -0
- package/dist/src/infrastructure/services/ide-launchers/ide-launcher.interface.d.ts.map +1 -0
- package/dist/src/infrastructure/services/ide-launchers/ide-launcher.interface.js +8 -0
- package/dist/src/infrastructure/services/ide-launchers/ide-launcher.registry.d.ts +9 -0
- package/dist/src/infrastructure/services/ide-launchers/ide-launcher.registry.d.ts.map +1 -0
- package/dist/src/infrastructure/services/ide-launchers/ide-launcher.registry.js +24 -0
- package/dist/src/infrastructure/services/ide-launchers/vscode.launcher.d.ts +10 -0
- package/dist/src/infrastructure/services/ide-launchers/vscode.launcher.d.ts.map +1 -0
- package/dist/src/infrastructure/services/ide-launchers/vscode.launcher.js +21 -0
- package/dist/src/infrastructure/services/ide-launchers/windsurf.launcher.d.ts +10 -0
- package/dist/src/infrastructure/services/ide-launchers/windsurf.launcher.d.ts.map +1 -0
- package/dist/src/infrastructure/services/ide-launchers/windsurf.launcher.js +21 -0
- package/dist/src/infrastructure/services/ide-launchers/zed.launcher.d.ts +10 -0
- package/dist/src/infrastructure/services/ide-launchers/zed.launcher.d.ts.map +1 -0
- package/dist/src/infrastructure/services/ide-launchers/zed.launcher.js +21 -0
- package/dist/src/presentation/cli/commands/feat/approve.command.d.ts +12 -0
- package/dist/src/presentation/cli/commands/feat/approve.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/approve.command.js +48 -0
- package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/index.js +7 -1
- package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/ls.command.js +13 -5
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/new.command.js +34 -15
- package/dist/src/presentation/cli/commands/feat/reject.command.d.ts +12 -0
- package/dist/src/presentation/cli/commands/feat/reject.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/reject.command.js +50 -0
- package/dist/src/presentation/cli/commands/feat/resolve-waiting-feature.d.ts +30 -0
- package/dist/src/presentation/cli/commands/feat/resolve-waiting-feature.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/resolve-waiting-feature.js +57 -0
- package/dist/src/presentation/cli/commands/feat/review.command.d.ts +12 -0
- package/dist/src/presentation/cli/commands/feat/review.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/review.command.js +49 -0
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.js +51 -6
- package/dist/src/presentation/cli/commands/ide-open.command.d.ts +10 -0
- package/dist/src/presentation/cli/commands/ide-open.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/ide-open.command.js +77 -0
- package/dist/src/presentation/cli/commands/settings/ide.command.d.ts +15 -0
- package/dist/src/presentation/cli/commands/settings/ide.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/settings/ide.command.js +76 -0
- package/dist/src/presentation/cli/commands/settings/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/index.js +3 -1
- package/dist/src/presentation/cli/index.js +2 -0
- package/dist/src/presentation/tui/prompts/ide-select.prompt.d.ts +45 -0
- package/dist/src/presentation/tui/prompts/ide-select.prompt.d.ts.map +1 -0
- package/dist/src/presentation/tui/prompts/ide-select.prompt.js +44 -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/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +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.html +2 -2
- package/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/index.html +2 -2
- package/web/.next/server/app/index.rsc +1 -1
- package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.html +2 -2
- package/web/.next/server/app/version.rsc +1 -1
- package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
- package/web/.next/server/chunks/ssr/_19be0743._.js +1 -1
- package/web/.next/server/pages/404.html +2 -2
- 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 +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- /package/web/.next/static/{iV3kEDpfUq_ttVqv3E57o → u-tyZUMnsIne6K_0rPmPO}/_buildManifest.js +0 -0
- /package/web/.next/static/{iV3kEDpfUq_ttVqv3E57o → u-tyZUMnsIne6K_0rPmPO}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{iV3kEDpfUq_ttVqv3E57o → u-tyZUMnsIne6K_0rPmPO}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDE Open Command
|
|
3
|
+
*
|
|
4
|
+
* Opens a feature worktree in the configured IDE.
|
|
5
|
+
*
|
|
6
|
+
* Usage: shep ide <feat-id> [--vscode|--cursor|--windsurf|--zed|--antigravity]
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import { createHash } from 'node:crypto';
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
import { EditorType } from '../../../domain/generated/output.js';
|
|
12
|
+
import { container } from '../../../infrastructure/di/container.js';
|
|
13
|
+
import { ShowFeatureUseCase } from '../../../application/use-cases/features/show-feature.use-case.js';
|
|
14
|
+
import { getSettings } from '../../../infrastructure/services/settings.service.js';
|
|
15
|
+
import { createLauncherRegistry } from '../../../infrastructure/services/ide-launchers/ide-launcher.registry.js';
|
|
16
|
+
import { SHEP_HOME_DIR } from '../../../infrastructure/services/filesystem/shep-directory.service.js';
|
|
17
|
+
import { messages } from '../ui/index.js';
|
|
18
|
+
function computeWorktreePath(repoPath, branch) {
|
|
19
|
+
const repoHash = createHash('sha256').update(repoPath).digest('hex').slice(0, 16);
|
|
20
|
+
const slug = branch.replace(/\//g, '-');
|
|
21
|
+
return join(SHEP_HOME_DIR, 'repos', repoHash, 'wt', slug);
|
|
22
|
+
}
|
|
23
|
+
/** IDE flag names mapped to their EditorType values. */
|
|
24
|
+
const IDE_FLAG_MAP = {
|
|
25
|
+
vscode: EditorType.VsCode,
|
|
26
|
+
cursor: EditorType.Cursor,
|
|
27
|
+
windsurf: EditorType.Windsurf,
|
|
28
|
+
zed: EditorType.Zed,
|
|
29
|
+
antigravity: EditorType.Antigravity,
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Determine which editor to use based on CLI flags and settings.
|
|
33
|
+
* Flag takes precedence over settings.
|
|
34
|
+
*/
|
|
35
|
+
function resolveEditorId(options) {
|
|
36
|
+
for (const [flag, editorType] of Object.entries(IDE_FLAG_MAP)) {
|
|
37
|
+
if (options[flag]) {
|
|
38
|
+
return editorType;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return getSettings().environment.defaultEditor;
|
|
42
|
+
}
|
|
43
|
+
export function createIdeOpenCommand() {
|
|
44
|
+
return new Command('ide')
|
|
45
|
+
.description('Open a feature worktree in your IDE')
|
|
46
|
+
.argument('<feat-id>', 'Feature ID or prefix')
|
|
47
|
+
.option('--vscode', 'Open in VS Code')
|
|
48
|
+
.option('--cursor', 'Open in Cursor')
|
|
49
|
+
.option('--windsurf', 'Open in Windsurf')
|
|
50
|
+
.option('--zed', 'Open in Zed')
|
|
51
|
+
.option('--antigravity', 'Open in Antigravity')
|
|
52
|
+
.action(async (featId, options) => {
|
|
53
|
+
try {
|
|
54
|
+
// Resolve the editor
|
|
55
|
+
const editorId = resolveEditorId(options);
|
|
56
|
+
const registry = createLauncherRegistry();
|
|
57
|
+
const launcher = registry.get(editorId);
|
|
58
|
+
if (!launcher) {
|
|
59
|
+
messages.error(`Unknown editor "${editorId}". Supported: ${[...registry.keys()].join(', ')}`, new Error(`Unknown editor: ${editorId}`));
|
|
60
|
+
process.exitCode = 1;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
// Resolve the feature
|
|
64
|
+
const useCase = container.resolve(ShowFeatureUseCase);
|
|
65
|
+
const feature = await useCase.execute(featId);
|
|
66
|
+
// Compute worktree path and launch
|
|
67
|
+
const worktreePath = computeWorktreePath(feature.repositoryPath, feature.branch);
|
|
68
|
+
await launcher.launch(worktreePath);
|
|
69
|
+
messages.success(`Opened ${launcher.name} at ${worktreePath}`);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
73
|
+
messages.error('Failed to open IDE', err);
|
|
74
|
+
process.exitCode = 1;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDE Configuration Command
|
|
3
|
+
*
|
|
4
|
+
* Configures the preferred IDE/editor used by Shep.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep settings ide # Interactive selection
|
|
8
|
+
* shep settings ide --editor cursor # Non-interactive
|
|
9
|
+
*/
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
/**
|
|
12
|
+
* Create the IDE configuration command.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createIdeCommand(): Command;
|
|
15
|
+
//# sourceMappingURL=ide.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ide.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/settings/ide.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAkE1C"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDE Configuration Command
|
|
3
|
+
*
|
|
4
|
+
* Configures the preferred IDE/editor used by Shep.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep settings ide # Interactive selection
|
|
8
|
+
* shep settings ide --editor cursor # Non-interactive
|
|
9
|
+
*/
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
import { select } from '@inquirer/prompts';
|
|
12
|
+
import { EditorType } from '../../../../domain/generated/output.js';
|
|
13
|
+
import { container } from '../../../../infrastructure/di/container.js';
|
|
14
|
+
import { UpdateSettingsUseCase } from '../../../../application/use-cases/settings/update-settings.use-case.js';
|
|
15
|
+
import { createIdeSelectConfig } from '../../../tui/prompts/ide-select.prompt.js';
|
|
16
|
+
import { getSettings, resetSettings, initializeSettings, } from '../../../../infrastructure/services/settings.service.js';
|
|
17
|
+
import { createLauncherRegistry } from '../../../../infrastructure/services/ide-launchers/ide-launcher.registry.js';
|
|
18
|
+
import { messages } from '../../ui/index.js';
|
|
19
|
+
/** Valid EditorType values for input validation. */
|
|
20
|
+
const VALID_EDITORS = new Set(Object.values(EditorType));
|
|
21
|
+
/**
|
|
22
|
+
* Create the IDE configuration command.
|
|
23
|
+
*/
|
|
24
|
+
export function createIdeCommand() {
|
|
25
|
+
return new Command('ide')
|
|
26
|
+
.description('Configure preferred IDE/editor')
|
|
27
|
+
.option('--editor <name>', 'IDE/editor name (e.g., vscode, cursor, windsurf, zed, antigravity)')
|
|
28
|
+
.addHelpText('after', `
|
|
29
|
+
Examples:
|
|
30
|
+
$ shep settings ide Interactive selection
|
|
31
|
+
$ shep settings ide --editor cursor Non-interactive
|
|
32
|
+
$ shep settings ide --editor antigravity Set Google Antigravity`)
|
|
33
|
+
.action(async (options) => {
|
|
34
|
+
try {
|
|
35
|
+
let editorValue;
|
|
36
|
+
if (options.editor !== undefined) {
|
|
37
|
+
if (!VALID_EDITORS.has(options.editor)) {
|
|
38
|
+
messages.error(`Unknown editor "${options.editor}". Valid: ${[...VALID_EDITORS].join(', ')}`, new Error(`Unknown editor: ${options.editor}`));
|
|
39
|
+
process.exitCode = 1;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
editorValue = options.editor;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
editorValue = await select(createIdeSelectConfig());
|
|
46
|
+
}
|
|
47
|
+
// PATH check via launcher registry (non-blocking warning)
|
|
48
|
+
const registry = createLauncherRegistry();
|
|
49
|
+
const launcher = registry.get(editorValue);
|
|
50
|
+
if (launcher) {
|
|
51
|
+
const available = await launcher.checkAvailable();
|
|
52
|
+
if (!available) {
|
|
53
|
+
messages.warning(`'${launcher.binary}' not found in PATH. The editor will still be saved.`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Persist settings
|
|
57
|
+
const settings = getSettings();
|
|
58
|
+
settings.environment.defaultEditor = editorValue;
|
|
59
|
+
const useCase = container.resolve(UpdateSettingsUseCase);
|
|
60
|
+
const updatedSettings = await useCase.execute(settings);
|
|
61
|
+
// Refresh in-memory singleton
|
|
62
|
+
resetSettings();
|
|
63
|
+
initializeSettings(updatedSettings);
|
|
64
|
+
messages.success(`Default editor set to: ${editorValue}`);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
68
|
+
if (err.message.includes('force closed') || err.message.includes('User force closed')) {
|
|
69
|
+
messages.info('Configuration cancelled.');
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
messages.error('Failed to configure IDE', err);
|
|
73
|
+
process.exitCode = 1;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/settings/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/settings/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAO/C"}
|
|
@@ -12,6 +12,7 @@ import { Command } from 'commander';
|
|
|
12
12
|
import { createShowCommand } from './show.command.js';
|
|
13
13
|
import { createInitCommand } from './init.command.js';
|
|
14
14
|
import { createAgentCommand } from './agent.command.js';
|
|
15
|
+
import { createIdeCommand } from './ide.command.js';
|
|
15
16
|
/**
|
|
16
17
|
* Create the settings command group
|
|
17
18
|
*/
|
|
@@ -20,5 +21,6 @@ export function createSettingsCommand() {
|
|
|
20
21
|
.description('Manage Shep global settings')
|
|
21
22
|
.addCommand(createShowCommand())
|
|
22
23
|
.addCommand(createInitCommand())
|
|
23
|
-
.addCommand(createAgentCommand())
|
|
24
|
+
.addCommand(createAgentCommand())
|
|
25
|
+
.addCommand(createIdeCommand());
|
|
24
26
|
}
|
|
@@ -30,6 +30,7 @@ import { createUiCommand } from './commands/ui.command.js';
|
|
|
30
30
|
import { createRunCommand } from './commands/run.command.js';
|
|
31
31
|
import { createAgentCommand } from './commands/agent/index.js';
|
|
32
32
|
import { createFeatCommand } from './commands/feat/index.js';
|
|
33
|
+
import { createIdeOpenCommand } from './commands/ide-open.command.js';
|
|
33
34
|
import { messages } from './ui/index.js';
|
|
34
35
|
// DI container and settings
|
|
35
36
|
import { initializeContainer, container } from '../../infrastructure/di/container.js';
|
|
@@ -78,6 +79,7 @@ async function bootstrap() {
|
|
|
78
79
|
program.addCommand(createRunCommand());
|
|
79
80
|
program.addCommand(createAgentCommand());
|
|
80
81
|
program.addCommand(createFeatCommand());
|
|
82
|
+
program.addCommand(createIdeOpenCommand());
|
|
81
83
|
// Parse arguments (parseAsync needed for async command actions like init)
|
|
82
84
|
await program.parseAsync();
|
|
83
85
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDE Select Prompt Configuration
|
|
3
|
+
*
|
|
4
|
+
* Configuration for the @inquirer/select prompt that lets users
|
|
5
|
+
* choose their preferred IDE/editor.
|
|
6
|
+
*/
|
|
7
|
+
import { EditorType } from '../../../domain/generated/output.js';
|
|
8
|
+
/**
|
|
9
|
+
* Creates the @inquirer/select configuration for selecting a preferred IDE.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createIdeSelectConfig(): {
|
|
12
|
+
readonly message: "Select your preferred IDE";
|
|
13
|
+
readonly choices: readonly [{
|
|
14
|
+
readonly name: "VS Code";
|
|
15
|
+
readonly value: EditorType.VsCode;
|
|
16
|
+
readonly description: "Visual Studio Code";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "Cursor";
|
|
19
|
+
readonly value: EditorType.Cursor;
|
|
20
|
+
readonly description: "Cursor AI editor";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "Windsurf";
|
|
23
|
+
readonly value: EditorType.Windsurf;
|
|
24
|
+
readonly description: "Windsurf editor";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "Zed";
|
|
27
|
+
readonly value: EditorType.Zed;
|
|
28
|
+
readonly description: "Zed editor";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "Antigravity";
|
|
31
|
+
readonly value: EditorType.Antigravity;
|
|
32
|
+
readonly description: "Google Antigravity IDE";
|
|
33
|
+
}];
|
|
34
|
+
readonly theme: {
|
|
35
|
+
readonly prefix: {
|
|
36
|
+
readonly idle: string;
|
|
37
|
+
readonly done: string;
|
|
38
|
+
};
|
|
39
|
+
readonly style: {
|
|
40
|
+
readonly highlight: import("picocolors/types.js").Formatter;
|
|
41
|
+
readonly answer: import("picocolors/types.js").Formatter;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=ide-select.prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ide-select.prompt.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/prompts/ide-select.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGjE;;GAEG;AACH,wBAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCpC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDE Select Prompt Configuration
|
|
3
|
+
*
|
|
4
|
+
* Configuration for the @inquirer/select prompt that lets users
|
|
5
|
+
* choose their preferred IDE/editor.
|
|
6
|
+
*/
|
|
7
|
+
import { EditorType } from '../../../domain/generated/output.js';
|
|
8
|
+
import { shepTheme } from '../themes/shep.theme.js';
|
|
9
|
+
/**
|
|
10
|
+
* Creates the @inquirer/select configuration for selecting a preferred IDE.
|
|
11
|
+
*/
|
|
12
|
+
export function createIdeSelectConfig() {
|
|
13
|
+
return {
|
|
14
|
+
message: 'Select your preferred IDE',
|
|
15
|
+
choices: [
|
|
16
|
+
{
|
|
17
|
+
name: 'VS Code',
|
|
18
|
+
value: EditorType.VsCode,
|
|
19
|
+
description: 'Visual Studio Code',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Cursor',
|
|
23
|
+
value: EditorType.Cursor,
|
|
24
|
+
description: 'Cursor AI editor',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Windsurf',
|
|
28
|
+
value: EditorType.Windsurf,
|
|
29
|
+
description: 'Windsurf editor',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Zed',
|
|
33
|
+
value: EditorType.Zed,
|
|
34
|
+
description: 'Zed editor',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Antigravity',
|
|
38
|
+
value: EditorType.Antigravity,
|
|
39
|
+
description: 'Google Antigravity IDE',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
theme: shepTheme,
|
|
43
|
+
};
|
|
44
|
+
}
|