ai-devkit 0.8.1 → 0.10.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/README.md +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent.d.ts +3 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +143 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +26 -26
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +6 -9
- package/dist/commands/memory.js.map +1 -1
- package/dist/commands/phase.js +7 -7
- package/dist/commands/phase.js.map +1 -1
- package/dist/commands/setup.js +16 -16
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +30 -19
- package/dist/commands/skill.js.map +1 -1
- package/dist/lib/AgentManager.d.ts +104 -0
- package/dist/lib/AgentManager.d.ts.map +1 -0
- package/dist/lib/AgentManager.js +185 -0
- package/dist/lib/AgentManager.js.map +1 -0
- package/dist/lib/SkillManager.d.ts +31 -0
- package/dist/lib/SkillManager.d.ts.map +1 -1
- package/dist/lib/SkillManager.js +158 -27
- package/dist/lib/SkillManager.js.map +1 -1
- package/dist/lib/TerminalFocusManager.d.ts +22 -0
- package/dist/lib/TerminalFocusManager.d.ts.map +1 -0
- package/dist/lib/TerminalFocusManager.js +195 -0
- package/dist/lib/TerminalFocusManager.js.map +1 -0
- package/dist/lib/adapters/AgentAdapter.d.ts +92 -0
- package/dist/lib/adapters/AgentAdapter.d.ts.map +1 -0
- package/dist/lib/adapters/AgentAdapter.js +29 -0
- package/dist/lib/adapters/AgentAdapter.js.map +1 -0
- package/dist/lib/adapters/ClaudeCodeAdapter.d.ts +66 -0
- package/dist/lib/adapters/ClaudeCodeAdapter.d.ts.map +1 -0
- package/dist/lib/adapters/ClaudeCodeAdapter.js +306 -0
- package/dist/lib/adapters/ClaudeCodeAdapter.js.map +1 -0
- package/dist/util/file.d.ts +52 -0
- package/dist/util/file.d.ts.map +1 -0
- package/dist/util/file.js +135 -0
- package/dist/util/file.js.map +1 -0
- package/dist/util/git.d.ts +12 -0
- package/dist/util/git.d.ts.map +1 -1
- package/dist/util/git.js +28 -0
- package/dist/util/git.js.map +1 -1
- package/dist/util/process.d.ts +61 -0
- package/dist/util/process.d.ts.map +1 -0
- package/dist/util/process.js +166 -0
- package/dist/util/process.js.map +1 -0
- package/dist/util/terminal-ui.d.ts +122 -0
- package/dist/util/terminal-ui.d.ts.map +1 -0
- package/dist/util/terminal-ui.js +177 -0
- package/dist/util/terminal-ui.js.map +1 -0
- package/package.json +3 -2
package/dist/util/git.js
CHANGED
|
@@ -35,6 +35,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.ensureGitInstalled = ensureGitInstalled;
|
|
37
37
|
exports.cloneRepository = cloneRepository;
|
|
38
|
+
exports.isGitRepository = isGitRepository;
|
|
39
|
+
exports.pullRepository = pullRepository;
|
|
38
40
|
const child_process_1 = require("child_process");
|
|
39
41
|
const util_1 = require("util");
|
|
40
42
|
const fs = __importStar(require("fs-extra"));
|
|
@@ -79,4 +81,30 @@ async function cloneRepository(targetDir, repoName, gitUrl) {
|
|
|
79
81
|
throw new Error(`Git clone failed: ${error.message}. Check network and git installation.`);
|
|
80
82
|
}
|
|
81
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Checks if a directory is a git repository
|
|
86
|
+
* @param dirPath - Absolute path to directory
|
|
87
|
+
* @returns true if .git directory exists
|
|
88
|
+
*/
|
|
89
|
+
async function isGitRepository(dirPath) {
|
|
90
|
+
const gitDir = path.join(dirPath, '.git');
|
|
91
|
+
return await fs.pathExists(gitDir);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Pulls latest changes for a git repository
|
|
95
|
+
* @param repoPath - Absolute path to git repository
|
|
96
|
+
* @throws Error if git pull fails
|
|
97
|
+
*/
|
|
98
|
+
async function pullRepository(repoPath) {
|
|
99
|
+
try {
|
|
100
|
+
await execAsync('git pull', {
|
|
101
|
+
cwd: repoPath,
|
|
102
|
+
timeout: 60000,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
const message = error.message || 'Unknown error';
|
|
107
|
+
throw new Error(`Git pull failed: ${message}`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
82
110
|
//# sourceMappingURL=git.js.map
|
package/dist/util/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/util/git.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,gDAQC;AAUD,0CAoBC;
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/util/git.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,gDAQC;AAUD,0CAoBC;AAOD,0CAGC;AAOD,wCAUC;AA5ED,iDAAqC;AACrC,+BAAiC;AACjC,6CAA+B;AAC/B,2CAA6B;AAE7B,MAAM,SAAS,GAAG,IAAA,gBAAS,EAAC,oBAAI,CAAC,CAAC;AAElC;;;GAGG;AACI,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,wFAAwF,CACzF,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,eAAe,CAAC,SAAiB,EAAE,QAAgB,EAAE,MAAc;IACvF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAEhD,IAAI,MAAM,EAAE,CAAC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1
|
+
/**
|
|
2
|
+
* Process Detection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Utilities for detecting and inspecting running processes on the system.
|
|
5
|
+
* Primarily focused on macOS/Unix-like systems using the `ps` command.
|
|
6
|
+
*/
|
|
7
|
+
import type { ProcessInfo } from '../lib/adapters/AgentAdapter';
|
|
8
|
+
/**
|
|
9
|
+
* Options for listing processes
|
|
10
|
+
*/
|
|
11
|
+
export interface ListProcessesOptions {
|
|
12
|
+
/** Filter processes by name pattern (case-insensitive) */
|
|
13
|
+
namePattern?: string;
|
|
14
|
+
/** Include only processes matching these PIDs */
|
|
15
|
+
pids?: number[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List running processes on the system
|
|
19
|
+
*
|
|
20
|
+
* @param options Filtering options
|
|
21
|
+
* @returns Array of process information
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* // List all Claude Code processes
|
|
26
|
+
* const processes = listProcesses({ namePattern: 'claude' });
|
|
27
|
+
*
|
|
28
|
+
* // Get specific process info
|
|
29
|
+
* const process = listProcesses({ pids: [12345] });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function listProcesses(options?: ListProcessesOptions): ProcessInfo[];
|
|
33
|
+
/**
|
|
34
|
+
* Get the current working directory for a specific process
|
|
35
|
+
*
|
|
36
|
+
* @param pid Process ID
|
|
37
|
+
* @returns Working directory path, or empty string if unavailable
|
|
38
|
+
*/
|
|
39
|
+
export declare function getProcessCwd(pid: number): string;
|
|
40
|
+
/**
|
|
41
|
+
* Get the TTY device for a specific process
|
|
42
|
+
*
|
|
43
|
+
* @param pid Process ID
|
|
44
|
+
* @returns TTY device name (e.g., "ttys030"), or "?" if unavailable
|
|
45
|
+
*/
|
|
46
|
+
export declare function getProcessTty(pid: number): string;
|
|
47
|
+
/**
|
|
48
|
+
* Check if a process with the given PID is running
|
|
49
|
+
*
|
|
50
|
+
* @param pid Process ID
|
|
51
|
+
* @returns True if process is running
|
|
52
|
+
*/
|
|
53
|
+
export declare function isProcessRunning(pid: number): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Get detailed information for a specific process
|
|
56
|
+
*
|
|
57
|
+
* @param pid Process ID
|
|
58
|
+
* @returns Process information, or null if process not found
|
|
59
|
+
*/
|
|
60
|
+
export declare function getProcessInfo(pid: number): ProcessInfo | null;
|
|
61
|
+
//# sourceMappingURL=process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/util/process.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,WAAW,EAAE,CA2D/E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAgCjD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAYjD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CASrD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAG9D"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Process Detection Utilities
|
|
4
|
+
*
|
|
5
|
+
* Utilities for detecting and inspecting running processes on the system.
|
|
6
|
+
* Primarily focused on macOS/Unix-like systems using the `ps` command.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.listProcesses = listProcesses;
|
|
10
|
+
exports.getProcessCwd = getProcessCwd;
|
|
11
|
+
exports.getProcessTty = getProcessTty;
|
|
12
|
+
exports.isProcessRunning = isProcessRunning;
|
|
13
|
+
exports.getProcessInfo = getProcessInfo;
|
|
14
|
+
const child_process_1 = require("child_process");
|
|
15
|
+
/**
|
|
16
|
+
* List running processes on the system
|
|
17
|
+
*
|
|
18
|
+
* @param options Filtering options
|
|
19
|
+
* @returns Array of process information
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* // List all Claude Code processes
|
|
24
|
+
* const processes = listProcesses({ namePattern: 'claude' });
|
|
25
|
+
*
|
|
26
|
+
* // Get specific process info
|
|
27
|
+
* const process = listProcesses({ pids: [12345] });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
function listProcesses(options = {}) {
|
|
31
|
+
try {
|
|
32
|
+
// Get all processes with full details
|
|
33
|
+
// Format: user pid command
|
|
34
|
+
const psOutput = (0, child_process_1.execSync)('ps aux', { encoding: 'utf-8' });
|
|
35
|
+
const lines = psOutput.trim().split('\n');
|
|
36
|
+
// Skip header line
|
|
37
|
+
const processLines = lines.slice(1);
|
|
38
|
+
const processes = [];
|
|
39
|
+
for (const line of processLines) {
|
|
40
|
+
// Parse ps aux output
|
|
41
|
+
// Format: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
|
|
42
|
+
const parts = line.trim().split(/\s+/);
|
|
43
|
+
if (parts.length < 11)
|
|
44
|
+
continue;
|
|
45
|
+
const pid = parseInt(parts[1], 10);
|
|
46
|
+
if (isNaN(pid))
|
|
47
|
+
continue;
|
|
48
|
+
const tty = parts[6];
|
|
49
|
+
const command = parts.slice(10).join(' ');
|
|
50
|
+
// Apply PID filter
|
|
51
|
+
if (options.pids && !options.pids.includes(pid)) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
// Apply name pattern filter (case-insensitive)
|
|
55
|
+
if (options.namePattern) {
|
|
56
|
+
const pattern = options.namePattern.toLowerCase();
|
|
57
|
+
const commandLower = command.toLowerCase();
|
|
58
|
+
if (!commandLower.includes(pattern)) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Get working directory for this process
|
|
63
|
+
const cwd = getProcessCwd(pid);
|
|
64
|
+
// Get TTY in short format (remove /dev/ prefix if present)
|
|
65
|
+
const ttyShort = tty.startsWith('/dev/') ? tty.slice(5) : tty;
|
|
66
|
+
processes.push({
|
|
67
|
+
pid,
|
|
68
|
+
command,
|
|
69
|
+
cwd,
|
|
70
|
+
tty: ttyShort,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return processes;
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
// If ps command fails, return empty array
|
|
77
|
+
console.error('Failed to list processes:', error);
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the current working directory for a specific process
|
|
83
|
+
*
|
|
84
|
+
* @param pid Process ID
|
|
85
|
+
* @returns Working directory path, or empty string if unavailable
|
|
86
|
+
*/
|
|
87
|
+
function getProcessCwd(pid) {
|
|
88
|
+
try {
|
|
89
|
+
// Use lsof to get the current working directory
|
|
90
|
+
// -a: AND the selections, -d cwd: get cwd only, -Fn: output format (file names only)
|
|
91
|
+
const output = (0, child_process_1.execSync)(`lsof -a -p ${pid} -d cwd -Fn 2>/dev/null`, {
|
|
92
|
+
encoding: 'utf-8',
|
|
93
|
+
});
|
|
94
|
+
// Parse lsof output
|
|
95
|
+
// Format: p{PID}\nn{path}
|
|
96
|
+
const lines = output.trim().split('\n');
|
|
97
|
+
for (const line of lines) {
|
|
98
|
+
if (line.startsWith('n')) {
|
|
99
|
+
return line.slice(1); // Remove 'n' prefix
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return '';
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
// If lsof fails, try alternative method using pwdx (Linux)
|
|
106
|
+
try {
|
|
107
|
+
const output = (0, child_process_1.execSync)(`pwdx ${pid} 2>/dev/null`, {
|
|
108
|
+
encoding: 'utf-8',
|
|
109
|
+
});
|
|
110
|
+
// Format: {PID}: {path}
|
|
111
|
+
const match = output.match(/^\d+:\s*(.+)$/);
|
|
112
|
+
return match ? match[1].trim() : '';
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
// Both methods failed
|
|
116
|
+
return '';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Get the TTY device for a specific process
|
|
122
|
+
*
|
|
123
|
+
* @param pid Process ID
|
|
124
|
+
* @returns TTY device name (e.g., "ttys030"), or "?" if unavailable
|
|
125
|
+
*/
|
|
126
|
+
function getProcessTty(pid) {
|
|
127
|
+
try {
|
|
128
|
+
const output = (0, child_process_1.execSync)(`ps -p ${pid} -o tty=`, {
|
|
129
|
+
encoding: 'utf-8',
|
|
130
|
+
});
|
|
131
|
+
const tty = output.trim();
|
|
132
|
+
// Remove /dev/ prefix if present
|
|
133
|
+
return tty.startsWith('/dev/') ? tty.slice(5) : tty;
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
return '?';
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Check if a process with the given PID is running
|
|
141
|
+
*
|
|
142
|
+
* @param pid Process ID
|
|
143
|
+
* @returns True if process is running
|
|
144
|
+
*/
|
|
145
|
+
function isProcessRunning(pid) {
|
|
146
|
+
try {
|
|
147
|
+
// Send signal 0 to check if process exists
|
|
148
|
+
// This doesn't actually send a signal, just checks if we can
|
|
149
|
+
(0, child_process_1.execSync)(`kill -0 ${pid} 2>/dev/null`);
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get detailed information for a specific process
|
|
158
|
+
*
|
|
159
|
+
* @param pid Process ID
|
|
160
|
+
* @returns Process information, or null if process not found
|
|
161
|
+
*/
|
|
162
|
+
function getProcessInfo(pid) {
|
|
163
|
+
const processes = listProcesses({ pids: [pid] });
|
|
164
|
+
return processes.length > 0 ? processes[0] : null;
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=process.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../src/util/process.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AA+BH,sCA2DC;AAQD,sCAgCC;AAQD,sCAYC;AAQD,4CASC;AAQD,wCAGC;AAhLD,iDAAyC;AAczC;;;;;;;;;;;;;;GAcG;AACH,SAAgB,aAAa,CAAC,UAAgC,EAAE;IAC5D,IAAI,CAAC;QACD,sCAAsC;QACtC,2BAA2B;QAC3B,MAAM,QAAQ,GAAG,IAAA,wBAAQ,EAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAE3D,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1C,mBAAmB;QACnB,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEpC,MAAM,SAAS,GAAkB,EAAE,CAAC;QAEpC,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;YAC9B,sBAAsB;YACtB,iEAAiE;YACjE,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAEvC,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE;gBAAE,SAAS;YAEhC,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CA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UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACxD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,GAAG,CAAC;IACf,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IACxC,IAAI,CAAC;QACD,2CAA2C;QAC3C,6DAA6D;QAC7D,IAAA,wBAAQ,EAAC,WAAW,GAAG,cAAc,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,GAAW;IACtC,MAAM,SAAS,GAAG,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal UI utility for consistent message formatting across CLI commands
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import { ui } from '../util/terminal-ui';
|
|
7
|
+
*
|
|
8
|
+
* // Display messages
|
|
9
|
+
* ui.info('Initializing project...');
|
|
10
|
+
* ui.success('Project initialized successfully!');
|
|
11
|
+
* ui.warning('Configuration file not found, using defaults');
|
|
12
|
+
* ui.error('Failed to create directory');
|
|
13
|
+
*
|
|
14
|
+
* // Use spinner for async operations
|
|
15
|
+
* const spinner = ui.spinner('Cloning repository...');
|
|
16
|
+
* spinner.start();
|
|
17
|
+
* try {
|
|
18
|
+
* await cloneRepo();
|
|
19
|
+
* spinner.succeed('Repository cloned successfully');
|
|
20
|
+
* } catch (error) {
|
|
21
|
+
* spinner.fail('Failed to clone repository');
|
|
22
|
+
* ui.error(error.message);
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare const ui: {
|
|
27
|
+
/**
|
|
28
|
+
* Display a text line
|
|
29
|
+
* @param text - The text to display
|
|
30
|
+
*/
|
|
31
|
+
text: (text: string, { breakline }?: {
|
|
32
|
+
breakline?: boolean;
|
|
33
|
+
}) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Display a break line
|
|
36
|
+
*/
|
|
37
|
+
breakline: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Display informational message (blue)
|
|
40
|
+
* @param message - The message to display
|
|
41
|
+
*/
|
|
42
|
+
info: (message: string) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Display success message (green)
|
|
45
|
+
* @param message - The message to display
|
|
46
|
+
*/
|
|
47
|
+
success: (message: string) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Display warning message (yellow)
|
|
50
|
+
* @param message - The message to display
|
|
51
|
+
*/
|
|
52
|
+
warning: (message: string) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Display error message (red)
|
|
55
|
+
* @param message - The message to display
|
|
56
|
+
*/
|
|
57
|
+
error: (message: string) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Create a spinner for async operations
|
|
60
|
+
* @param text - The text to display with the spinner
|
|
61
|
+
* @returns Ora spinner instance with start/succeed/fail/warn/stop methods
|
|
62
|
+
*/
|
|
63
|
+
spinner: (text: string) => import("ora").Ora;
|
|
64
|
+
/**
|
|
65
|
+
* Display a formatted table with headers and rows
|
|
66
|
+
* @param options - Table configuration
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* ui.table({
|
|
70
|
+
* headers: ['Name', 'Status', 'Type'],
|
|
71
|
+
* rows: [
|
|
72
|
+
* ['skill-1', 'active', 'frontend'],
|
|
73
|
+
* ['skill-2', 'inactive', 'backend']
|
|
74
|
+
* ],
|
|
75
|
+
* columnStyles: [chalk.cyan, chalk.green, chalk.dim]
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
table: (options: {
|
|
80
|
+
headers: string[];
|
|
81
|
+
rows: string[][];
|
|
82
|
+
columnStyles?: Array<(text: string) => string>;
|
|
83
|
+
indent?: string;
|
|
84
|
+
}) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Display a summary section with title and items
|
|
87
|
+
* @param options - Summary configuration
|
|
88
|
+
* @example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* ui.summary({
|
|
91
|
+
* title: 'Update Summary',
|
|
92
|
+
* items: [
|
|
93
|
+
* { type: 'success', count: 5, label: 'updated' },
|
|
94
|
+
* { type: 'warning', count: 2, label: 'skipped' },
|
|
95
|
+
* { type: 'error', count: 1, label: 'failed' }
|
|
96
|
+
* ],
|
|
97
|
+
* details: {
|
|
98
|
+
* title: 'Errors',
|
|
99
|
+
* items: [
|
|
100
|
+
* { message: 'Failed to update registry-1', tip: 'Check network connection' }
|
|
101
|
+
* ]
|
|
102
|
+
* }
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
summary: (options: {
|
|
107
|
+
title?: string;
|
|
108
|
+
items: Array<{
|
|
109
|
+
type: "success" | "warning" | "error" | "info";
|
|
110
|
+
count: number;
|
|
111
|
+
label: string;
|
|
112
|
+
}>;
|
|
113
|
+
details?: {
|
|
114
|
+
title: string;
|
|
115
|
+
items: Array<{
|
|
116
|
+
message: string;
|
|
117
|
+
tip?: string;
|
|
118
|
+
}>;
|
|
119
|
+
};
|
|
120
|
+
}) => void;
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=terminal-ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-ui.d.ts","sourceRoot":"","sources":["../../src/util/terminal-ui.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,EAAE;IACX;;;OAGG;iBACU,MAAM,kBAAyB;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,KAA0B,IAAI;IAIjG;;OAEG;qBACY,IAAI;IAInB;;;OAGG;oBACa,MAAM,KAAG,IAAI;IAI7B;;;OAGG;uBACgB,MAAM,KAAG,IAAI;IAIhC;;;OAGG;uBACgB,MAAM,KAAG,IAAI;IAIhC;;;OAGG;qBACc,MAAM,KAAG,IAAI;IAI9B;;;;OAIG;oBACa,MAAM;IAOtB;;;;;;;;;;;;;;OAcG;qBACc;QACb,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;QACjB,YAAY,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;QAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,KAAG,IAAI;IA0BR;;;;;;;;;;;;;;;;;;;;OAoBG;uBACgB;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,KAAK,CAAC;YACT,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;YAC/C,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;SACjB,CAAC,CAAC;QACH,OAAO,CAAC,EAAE;YACN,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,KAAK,CAAC;gBACT,OAAO,EAAE,MAAM,CAAC;gBAChB,GAAG,CAAC,EAAE,MAAM,CAAC;aAChB,CAAC,CAAC;SACN,CAAC;KACL,KAAG,IAAI;CA+BX,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ui = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
/**
|
|
10
|
+
* Sanitize message to prevent terminal injection
|
|
11
|
+
* Removes ANSI escape codes from user-provided strings
|
|
12
|
+
*/
|
|
13
|
+
const sanitize = (message) => {
|
|
14
|
+
// eslint-disable-next-line no-control-regex
|
|
15
|
+
return message.replace(/\x1b\[[0-9;]*m/g, '');
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Terminal UI utility for consistent message formatting across CLI commands
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import { ui } from '../util/terminal-ui';
|
|
23
|
+
*
|
|
24
|
+
* // Display messages
|
|
25
|
+
* ui.info('Initializing project...');
|
|
26
|
+
* ui.success('Project initialized successfully!');
|
|
27
|
+
* ui.warning('Configuration file not found, using defaults');
|
|
28
|
+
* ui.error('Failed to create directory');
|
|
29
|
+
*
|
|
30
|
+
* // Use spinner for async operations
|
|
31
|
+
* const spinner = ui.spinner('Cloning repository...');
|
|
32
|
+
* spinner.start();
|
|
33
|
+
* try {
|
|
34
|
+
* await cloneRepo();
|
|
35
|
+
* spinner.succeed('Repository cloned successfully');
|
|
36
|
+
* } catch (error) {
|
|
37
|
+
* spinner.fail('Failed to clone repository');
|
|
38
|
+
* ui.error(error.message);
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
exports.ui = {
|
|
43
|
+
/**
|
|
44
|
+
* Display a text line
|
|
45
|
+
* @param text - The text to display
|
|
46
|
+
*/
|
|
47
|
+
text: (text, { breakline = false } = { breakline: false }) => {
|
|
48
|
+
console.log(`${breakline ? '\n' : ''}${text}${breakline ? '\n' : ''}`);
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Display a break line
|
|
52
|
+
*/
|
|
53
|
+
breakline: () => {
|
|
54
|
+
console.log('\n');
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Display informational message (blue)
|
|
58
|
+
* @param message - The message to display
|
|
59
|
+
*/
|
|
60
|
+
info: (message) => {
|
|
61
|
+
console.log(chalk_1.default.blue('ℹ'), sanitize(message));
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Display success message (green)
|
|
65
|
+
* @param message - The message to display
|
|
66
|
+
*/
|
|
67
|
+
success: (message) => {
|
|
68
|
+
console.log(chalk_1.default.green('✔'), sanitize(message));
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Display warning message (yellow)
|
|
72
|
+
* @param message - The message to display
|
|
73
|
+
*/
|
|
74
|
+
warning: (message) => {
|
|
75
|
+
console.log(chalk_1.default.yellow('⚠'), sanitize(message));
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Display error message (red)
|
|
79
|
+
* @param message - The message to display
|
|
80
|
+
*/
|
|
81
|
+
error: (message) => {
|
|
82
|
+
console.error(chalk_1.default.red('✖'), sanitize(message));
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Create a spinner for async operations
|
|
86
|
+
* @param text - The text to display with the spinner
|
|
87
|
+
* @returns Ora spinner instance with start/succeed/fail/warn/stop methods
|
|
88
|
+
*/
|
|
89
|
+
spinner: (text) => {
|
|
90
|
+
return (0, ora_1.default)({
|
|
91
|
+
text: sanitize(text),
|
|
92
|
+
color: 'cyan',
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* Display a formatted table with headers and rows
|
|
97
|
+
* @param options - Table configuration
|
|
98
|
+
* @example
|
|
99
|
+
* ```typescript
|
|
100
|
+
* ui.table({
|
|
101
|
+
* headers: ['Name', 'Status', 'Type'],
|
|
102
|
+
* rows: [
|
|
103
|
+
* ['skill-1', 'active', 'frontend'],
|
|
104
|
+
* ['skill-2', 'inactive', 'backend']
|
|
105
|
+
* ],
|
|
106
|
+
* columnStyles: [chalk.cyan, chalk.green, chalk.dim]
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
table: (options) => {
|
|
111
|
+
const { headers, rows, columnStyles = [], indent = ' ' } = options;
|
|
112
|
+
const columnWidths = headers.map((header, i) => {
|
|
113
|
+
const maxDataWidth = Math.max(...rows.map(row => (row[i] || '').length));
|
|
114
|
+
return Math.max(header.length, maxDataWidth);
|
|
115
|
+
});
|
|
116
|
+
const headerRow = headers.map((header, i) => {
|
|
117
|
+
const style = columnStyles[i] || chalk_1.default.bold;
|
|
118
|
+
return style(header.padEnd(columnWidths[i] + 2));
|
|
119
|
+
}).join('');
|
|
120
|
+
console.log(chalk_1.default.dim(indent) + headerRow);
|
|
121
|
+
const totalWidth = columnWidths.reduce((sum, width) => sum + width + 2, 0);
|
|
122
|
+
console.log(chalk_1.default.dim(indent + '─'.repeat(totalWidth)));
|
|
123
|
+
rows.forEach(row => {
|
|
124
|
+
const formattedRow = row.map((cell, i) => {
|
|
125
|
+
const style = columnStyles[i] || ((text) => text);
|
|
126
|
+
return style((cell || '').padEnd(columnWidths[i] + 2));
|
|
127
|
+
}).join('');
|
|
128
|
+
console.log(indent + formattedRow);
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* Display a summary section with title and items
|
|
133
|
+
* @param options - Summary configuration
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* ui.summary({
|
|
137
|
+
* title: 'Update Summary',
|
|
138
|
+
* items: [
|
|
139
|
+
* { type: 'success', count: 5, label: 'updated' },
|
|
140
|
+
* { type: 'warning', count: 2, label: 'skipped' },
|
|
141
|
+
* { type: 'error', count: 1, label: 'failed' }
|
|
142
|
+
* ],
|
|
143
|
+
* details: {
|
|
144
|
+
* title: 'Errors',
|
|
145
|
+
* items: [
|
|
146
|
+
* { message: 'Failed to update registry-1', tip: 'Check network connection' }
|
|
147
|
+
* ]
|
|
148
|
+
* }
|
|
149
|
+
* });
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
summary: (options) => {
|
|
153
|
+
const { title = 'Summary', items, details } = options;
|
|
154
|
+
console.log(chalk_1.default.bold(`\n\n${title}:`));
|
|
155
|
+
items.forEach(item => {
|
|
156
|
+
if (item.count > 0) {
|
|
157
|
+
const symbol = item.type === 'success' ? '✓' :
|
|
158
|
+
item.type === 'warning' ? '⊘' :
|
|
159
|
+
item.type === 'error' ? '✗' : 'ℹ';
|
|
160
|
+
const color = item.type === 'success' ? chalk_1.default.green :
|
|
161
|
+
item.type === 'warning' ? chalk_1.default.yellow :
|
|
162
|
+
item.type === 'error' ? chalk_1.default.red : chalk_1.default.blue;
|
|
163
|
+
console.log(color(` ${symbol} ${item.count} ${item.label}`));
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
if (details && details.items.length > 0) {
|
|
167
|
+
console.log(chalk_1.default.bold(`\n\n${details.title}:`));
|
|
168
|
+
details.items.forEach(item => {
|
|
169
|
+
console.log(chalk_1.default.red(` • ${item.message}`));
|
|
170
|
+
if (item.tip) {
|
|
171
|
+
console.log(chalk_1.default.dim(` Tip: ${item.tip}`));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=terminal-ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-ui.js","sourceRoot":"","sources":["../../src/util/terminal-ui.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAAsB;AAEtB;;;GAGG;AACH,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAU,EAAE;IACzC,4CAA4C;IAC5C,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACU,QAAA,EAAE,GAAG;IACd;;;OAGG;IACH,IAAI,EA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CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,CAAC;oBACjD,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,eAAK,CAAC,MAAM,CAAC,CAAC;wBACpC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,CAAC,CAAC,eAAK,CAAC,IAAI,CAAC;gBAEvD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,MAAM,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAClE,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAEjD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACzB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gBAE9C,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;oBACX,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;gBACnD,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-devkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "A CLI toolkit for AI-assisted software development with phase templates and environment setup",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ai-devkit/memory": "
|
|
30
|
+
"@ai-devkit/memory": "0.4.0",
|
|
31
31
|
"chalk": "^4.1.2",
|
|
32
32
|
"commander": "^11.1.0",
|
|
33
33
|
"fs-extra": "^11.2.0",
|
|
34
34
|
"gray-matter": "^4.0.3",
|
|
35
35
|
"inquirer": "^8.2.6",
|
|
36
|
+
"ora": "^9.1.0",
|
|
36
37
|
"yaml": "^2.3.4"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|