Files
ccs/src/types/cli.ts
T
kaitranntt 0139333146 feat: set up quality gates for CCS TypeScript package
- Migrate package manager from npm to bun
- Add ESLint configuration with TypeScript support
- Add Prettier configuration and .prettierignore
- Format all TypeScript source files
- Update CLAUDE.md with bun instructions
- Verify 39 tests passing
2025-11-26 20:43:21 -05:00

54 lines
1.0 KiB
TypeScript

import { SpawnOptions as NodeSpawnOptions } from 'child_process';
/**
* CLI Runtime Types
*/
/**
* Parsed CLI arguments
*/
export interface ParsedArgs {
profile?: string; // Profile name (glm, kimi, work, etc.)
prompt?: string; // -p/--prompt flag value
isDelegation: boolean; // -p flag present
isContinue: boolean; // :continue suffix detected
remainingArgs: string[]; // Args to pass to Claude CLI
}
/**
* Spawn options for Claude CLI execution
*/
export interface ClaudeSpawnOptions extends NodeSpawnOptions {
stdio: 'inherit' | 'pipe';
windowsHide?: boolean;
shell?: boolean;
env: NodeJS.ProcessEnv;
}
/**
* Platform detection
*/
export type Platform = 'darwin' | 'linux' | 'win32';
/**
* Claude CLI detection result
*/
export interface ClaudeCliInfo {
path: string;
version?: string;
isWindows: boolean;
needsShell: boolean; // .cmd/.bat/.ps1 files
}
/**
* Exit codes
*/
export enum ExitCode {
SUCCESS = 0,
GENERIC_ERROR = 1,
CLAUDE_NOT_FOUND = 127,
CONFIG_ERROR = 2,
DELEGATION_ERROR = 3,
TIMEOUT = 124,
}