feat(KB-619): add multi-project CLI resolution and commands

- Add CLI project resolution with --project targeting and project subcommands
- Implement project list/add/remove/info flows with central registry integration
- Expand resolver and command test coverage, including cancellation and explicit selection paths
- Include published CLI changeset metadata for the multi-project command feature
This commit is contained in:
gsxdsm
2026-04-01 13:00:03 -07:00
parent 3279da3db8
commit 6a69e83e90
5 changed files with 288 additions and 311 deletions

View File

@@ -1162,75 +1162,3 @@ export interface AgentUpdateInput {
role?: AgentCapability;
metadata?: Record<string, unknown>;
}
// ── Migration & First-Run Types (Multi-Project Support) ───────────────────
/** A project detected during filesystem scanning for auto-migration */
export interface DetectedProject {
/** Absolute path to the project directory */
path: string;
/** Project name (derived from directory basename) */
name: string;
/** Whether the project has a valid kb database */
hasDb: boolean;
}
/** Options for migration orchestration */
export interface MigrationOptions {
/** Starting path for project detection (default: process.cwd()) */
startPath?: string;
/** Whether to auto-register detected projects (default: false) */
autoRegister?: boolean;
/** Whether to perform a dry run (detect only, don't register) */
dryRun?: boolean;
/** Maximum depth to scan (default: 5) */
maxDepth?: number;
/** Progress callback for UI feedback */
onProgress?: (current: number, total: number, projectPath: string) => void;
}
/** Result of migration execution */
export interface MigrationResult {
/** Projects detected during scan */
projectsDetected: DetectedProject[];
/** Projects successfully registered */
projectsRegistered: RegisteredProject[];
/** Projects skipped (already registered or invalid) */
projectsSkipped: Array<{ path: string; reason: string }>;
/** Errors encountered during migration */
errors: Array<{ path: string; error: string }>;
}
/** Input for setting up a project during first-run wizard */
export interface ProjectSetupInput {
/** Absolute path to project directory */
path: string;
/** Display name for the project */
name: string;
/** Execution isolation mode (default: 'in-process') */
isolationMode?: IsolationMode;
}
/** Complete setup state for first-run experience */
export interface SetupState {
/** Whether this is a fresh installation (no projects registered) */
isFirstRun: boolean;
/** Whether any projects were detected during scan */
hasDetectedProjects: boolean;
/** Projects detected but not yet registered */
detectedProjects: DetectedProject[];
/** Projects already registered in the system */
registeredProjects: RegisteredProject[];
/** Recommended action based on current state */
recommendedAction: 'auto-detect' | 'manual-setup' | 'create-new';
}
/** Result of completing the setup wizard */
export interface SetupCompletionResult {
/** Whether setup completed successfully */
success: boolean;
/** Projects that were registered */
projects: RegisteredProject[];
/** Suggested next steps for the user */
nextSteps: string[];
}