feat(workflow): add lightweight interactive planning workflow with in-memory execution and code exploration

- Introduced `lite-plan` command for intelligent task analysis and planning.
- Implemented dynamic exploration and clarification phases based on task complexity.
- Added support for auto mode and forced exploration flags.
- Defined output artifacts and session structure for planning results.
- Enhanced execution process with context handoff to `lite-execute`.

chore(temp): create temporary memory content and import script

- Added `.temp-memory-content.txt` to store session details and execution plan.
- Implemented `temp-import-memory.cjs` to handle memory import using core-memory command.
- Ensured cleanup of temporary files after execution.
This commit is contained in:
catlog22
2026-02-27 11:43:44 +08:00
parent 07452e57b7
commit 4d755ff9b4
48 changed files with 5659 additions and 82 deletions

View File

@@ -32,7 +32,8 @@ async function findProcessOnPort(port: number): Promise<string | null> {
if (proto !== 'TCP') continue;
if (!localAddress.endsWith(`:${port}`)) continue;
if (!/^\d+$/.test(pidCandidate)) continue;
// Reject PID 0 (System Idle Process) and non-numeric PIDs
if (!/^[1-9]\d*$/.test(pidCandidate)) continue;
return pidCandidate; // PID is the last column
}
@@ -43,7 +44,8 @@ async function findProcessOnPort(port: number): Promise<string | null> {
}
async function getProcessCommandLine(pid: string): Promise<string | null> {
if (!/^\d+$/.test(pid)) return null;
// Reject PID 0 (System Idle Process) and non-numeric PIDs
if (!/^[1-9]\d*$/.test(pid)) return null;
try {
const probeCommand =
@@ -78,7 +80,8 @@ function isLikelyViteCommandLine(commandLine: string, port: number): boolean {
* @returns {Promise<boolean>} Success status
*/
async function killProcess(pid: string): Promise<boolean> {
if (!/^\d+$/.test(pid)) return false;
// Reject PID 0 (System Idle Process) and non-numeric PIDs
if (!/^[1-9]\d*$/.test(pid)) return false;
try {
// Prefer taskkill to terminate the entire process tree on Windows (npm/cmd wrappers can orphan children).