orquesta-cli 0.2.8 → 0.2.9
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.
|
@@ -17,11 +17,15 @@ import { formatErrorMessage, buildTodoContext, findActiveTodo, getTodoStats } fr
|
|
|
17
17
|
import { runParallelGraph, shouldUseParallelOrchestrator } from './parallel-orchestrator.js';
|
|
18
18
|
import { memoryStore } from './memory-store.js';
|
|
19
19
|
import { auditLog } from './audit-log.js';
|
|
20
|
+
function buildEnvironmentContext() {
|
|
21
|
+
const cwd = process.cwd();
|
|
22
|
+
return `\n\n## Environment\n\nWorking directory (where ALL your tools execute): \`${cwd}\`\nTools (read_file, list_files, bash, edit_file, …) run on the USER'S machine in this directory.\n- Use paths RELATIVE to this directory ("package.json", "src/foo.ts", "."). They resolve against the working directory automatically.\n- Do NOT prepend the absolute working-directory path to tool arguments, and do NOT invent absolute paths from documentation — the repo is already at the working directory above.\n- Ignore any other "current directory" that may appear elsewhere in your context (e.g. a proxy's /tmp); the directory above is authoritative.\n`;
|
|
23
|
+
}
|
|
20
24
|
function buildSystemPrompt() {
|
|
21
25
|
const isGitRepo = detectGitRepo();
|
|
22
26
|
const projectContext = getProjectContext();
|
|
23
27
|
const base = isGitRepo ? `${PLAN_PROMPT}\n\n${GIT_COMMIT_RULES}` : PLAN_PROMPT;
|
|
24
|
-
return base + projectContext;
|
|
28
|
+
return base + buildEnvironmentContext() + projectContext;
|
|
25
29
|
}
|
|
26
30
|
export class PlanExecutor {
|
|
27
31
|
currentLLMClient = null;
|