orquesta-cli 0.2.16 → 0.2.18
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/dist/cli.js
CHANGED
|
@@ -19,6 +19,7 @@ import { createRequire } from 'module';
|
|
|
19
19
|
import { configManager } from './core/config/config-manager.js';
|
|
20
20
|
import { createLLMClient } from './core/llm/llm-client.js';
|
|
21
21
|
import { PlanExecuteApp } from './ui/components/PlanExecuteApp.js';
|
|
22
|
+
import { setAppendedSystemPrompt } from './orchestration/plan-executor.js';
|
|
22
23
|
import { setupLogging, logger } from './utils/logger.js';
|
|
23
24
|
import { runEvalMode } from './eval/index.js';
|
|
24
25
|
import { initializeOptionalTools } from './tools/registry.js';
|
|
@@ -38,6 +39,7 @@ program
|
|
|
38
39
|
program
|
|
39
40
|
.option('-p, --print <prompt>', 'Execute a prompt and exit (non-interactive mode)')
|
|
40
41
|
.option('--dangerously-skip-permissions', 'Skip all permission prompts (auto-approve)')
|
|
42
|
+
.option('--append-system-prompt <prompt>', 'Append text to the system prompt (parity with claude CLI; used by orquesta-agent sessions)')
|
|
41
43
|
.option('--verbose', 'Enable verbose logging')
|
|
42
44
|
.option('--debug', 'Enable debug logging')
|
|
43
45
|
.option('--llm-log', 'Enable LLM logging')
|
|
@@ -53,6 +55,9 @@ program
|
|
|
53
55
|
.option('--add-provider <providerId>', 'Add a specific provider by ID (e.g., openai, anthropic, ollama)')
|
|
54
56
|
.option('--init', 'Initialize Claude Code hook integration for this project (requires --token)')
|
|
55
57
|
.action(async (options) => {
|
|
58
|
+
if (options.appendSystemPrompt) {
|
|
59
|
+
setAppendedSystemPrompt(options.appendSystemPrompt);
|
|
60
|
+
}
|
|
56
61
|
if (options.eval) {
|
|
57
62
|
await runEvalMode();
|
|
58
63
|
return;
|
|
@@ -2,6 +2,7 @@ import { Message, TodoItem } from '../types/index.js';
|
|
|
2
2
|
import { LLMClient } from '../core/llm/llm-client.js';
|
|
3
3
|
import { CompactResult } from '../core/compact/index.js';
|
|
4
4
|
import type { StateCallbacks } from './types.js';
|
|
5
|
+
export declare function setAppendedSystemPrompt(text: string): void;
|
|
5
6
|
export declare class PlanExecutor {
|
|
6
7
|
private currentLLMClient;
|
|
7
8
|
constructor();
|
|
@@ -21,11 +21,16 @@ function buildEnvironmentContext() {
|
|
|
21
21
|
const cwd = process.cwd();
|
|
22
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
23
|
}
|
|
24
|
+
let appendedSystemPrompt = '';
|
|
25
|
+
export function setAppendedSystemPrompt(text) {
|
|
26
|
+
appendedSystemPrompt = text || '';
|
|
27
|
+
}
|
|
24
28
|
function buildSystemPrompt() {
|
|
25
29
|
const isGitRepo = detectGitRepo();
|
|
26
30
|
const projectContext = getProjectContext();
|
|
27
31
|
const base = isGitRepo ? `${PLAN_PROMPT}\n\n${GIT_COMMIT_RULES}` : PLAN_PROMPT;
|
|
28
|
-
|
|
32
|
+
const appended = appendedSystemPrompt ? `\n\n${appendedSystemPrompt}` : '';
|
|
33
|
+
return base + buildEnvironmentContext() + projectContext + appended;
|
|
29
34
|
}
|
|
30
35
|
export class PlanExecutor {
|
|
31
36
|
currentLLMClient = null;
|
|
@@ -25,7 +25,7 @@ const ORQUESTA_TEXT = `
|
|
|
25
25
|
██ ███ ██ ██ ██ █ ██ ██ ██ ██ ██ ██ ██ ██
|
|
26
26
|
██████ ██ ██ █████ █ ██████ ███████ ███████ ██ ██ ██
|
|
27
27
|
`.trim();
|
|
28
|
-
export const Logo = ({ showTagline = true, modelName, workingDirectory, projectName, organizationName, }) => {
|
|
28
|
+
export const Logo = ({ showVersion = false, showTagline = true, version, modelName, workingDirectory, projectName, organizationName, }) => {
|
|
29
29
|
return (React.createElement(Box, { flexDirection: "column" },
|
|
30
30
|
React.createElement(Box, { flexDirection: "row", alignItems: "center" },
|
|
31
31
|
React.createElement(Box, { flexDirection: "column", marginRight: 1 }, BASS_CLEF.map((line, idx) => (React.createElement(Text, { key: idx, color: "cyan", bold: true }, line)))),
|
|
@@ -41,6 +41,11 @@ export const Logo = ({ showTagline = true, modelName, workingDirectory, projectN
|
|
|
41
41
|
React.createElement(Text, { color: "green" }, "Your AI assistant for orchestrating development with local LLMs."))),
|
|
42
42
|
React.createElement(Box, { marginTop: 1 },
|
|
43
43
|
React.createElement(Text, { color: "gray" }, "Press Ctrl+C to quit. Type /model to change model. Type /help for commands.")),
|
|
44
|
+
showVersion && version && (React.createElement(Box, { marginTop: 1 },
|
|
45
|
+
React.createElement(Text, { color: "gray" }, "Version: "),
|
|
46
|
+
React.createElement(Text, { color: "cyan", bold: true },
|
|
47
|
+
"v",
|
|
48
|
+
version))),
|
|
44
49
|
(modelName || workingDirectory) && (React.createElement(Box, { marginTop: 1 },
|
|
45
50
|
modelName && (React.createElement(Text, { color: "gray" },
|
|
46
51
|
"Model: ",
|
|
@@ -1008,7 +1008,7 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
};
|
|
1010
1010
|
return (React.createElement(Box, { flexDirection: "column", paddingX: 2, paddingY: 1 },
|
|
1011
|
-
React.createElement(Logo, { showVersion: true, showTagline: true, projectName: configManager.getOrquestaConfig()?.projectName, organizationName: configManager.getOrquestaConfig()?.organizationName }),
|
|
1011
|
+
React.createElement(Logo, { showVersion: true, version: VERSION, showTagline: true, projectName: configManager.getOrquestaConfig()?.projectName, organizationName: configManager.getOrquestaConfig()?.organizationName }),
|
|
1012
1012
|
React.createElement(Box, { marginTop: 1 },
|
|
1013
1013
|
React.createElement(Text, { color: "gray" },
|
|
1014
1014
|
getInitStepText(),
|
|
@@ -1050,7 +1050,7 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
|
|
|
1050
1050
|
switch (entry.type) {
|
|
1051
1051
|
case 'logo': {
|
|
1052
1052
|
return (React.createElement(Box, { key: entry.id, flexDirection: "column", marginBottom: 1 },
|
|
1053
|
-
React.createElement(Logo, { showVersion: true, showTagline: false, animate: false, projectName: configManager.getOrquestaConfig()?.projectName, organizationName: configManager.getOrquestaConfig()?.organizationName, modelName: currentModelInfo.model, workingDirectory: shortenPath(process.cwd()) }),
|
|
1053
|
+
React.createElement(Logo, { showVersion: true, version: VERSION, showTagline: false, animate: false, projectName: configManager.getOrquestaConfig()?.projectName, organizationName: configManager.getOrquestaConfig()?.organizationName, modelName: currentModelInfo.model, workingDirectory: shortenPath(process.cwd()) }),
|
|
1054
1054
|
React.createElement(Text, null, ' '),
|
|
1055
1055
|
React.createElement(Box, null,
|
|
1056
1056
|
React.createElement(Text, { color: "gray" }, STARTUP_TIP))));
|
|
@@ -1246,7 +1246,7 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
|
|
|
1246
1246
|
React.createElement(Text, { color: "red" }, "\u2717 Failed")));
|
|
1247
1247
|
case 'compact':
|
|
1248
1248
|
return (React.createElement(Box, { key: entry.id, flexDirection: "column", marginTop: 1 },
|
|
1249
|
-
React.createElement(Logo, { showVersion: true, showTagline: false, animate: false, projectName: configManager.getOrquestaConfig()?.projectName, organizationName: configManager.getOrquestaConfig()?.organizationName, modelName: currentModelInfo.model, workingDirectory: shortenPath(process.cwd()) }),
|
|
1249
|
+
React.createElement(Logo, { showVersion: true, version: VERSION, showTagline: false, animate: false, projectName: configManager.getOrquestaConfig()?.projectName, organizationName: configManager.getOrquestaConfig()?.organizationName, modelName: currentModelInfo.model, workingDirectory: shortenPath(process.cwd()) }),
|
|
1250
1250
|
React.createElement(Text, { color: "gray" },
|
|
1251
1251
|
"\u2500\u2500 ",
|
|
1252
1252
|
entry.content,
|