orquesta-cli 0.2.89 → 0.2.91
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 +24 -0
- package/dist/core/config/config-manager.js +5 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -120,6 +120,8 @@ program
|
|
|
120
120
|
.option('-p, --print [prompt]', 'Execute a prompt and exit (non-interactive mode). Omit the value to read the prompt from stdin — orquesta-agent uses this on Windows to dodge the cmd.exe command-line length limit.')
|
|
121
121
|
.option('--dangerously-skip-permissions', 'Skip all permission prompts (auto-approve)')
|
|
122
122
|
.option('--append-system-prompt <prompt>', 'Append text to the system prompt (parity with claude CLI; used by orquesta-agent sessions)')
|
|
123
|
+
.option('--append-system-prompt-file <path>', 'Read the appended system prompt from a file (orquesta-agent uses this to keep a large ~38KB system prompt out of argv — Windows CreateProcess caps the command line at 32767 chars)')
|
|
124
|
+
.option('--endpoint <idOrName>', 'Use a specific configured LLM endpoint for this run (id or name; "batuta" = the managed Batuta endpoint). orquesta-agent passes this to honor a per-project provider choice without changing the org default.')
|
|
123
125
|
.option('--verbose', 'Enable verbose logging')
|
|
124
126
|
.option('--debug', 'Enable debug logging')
|
|
125
127
|
.option('--llm-log', 'Enable LLM logging')
|
|
@@ -138,9 +140,31 @@ program
|
|
|
138
140
|
.option('--update', 'Update orquesta-cli to the latest published version and exit')
|
|
139
141
|
.option('-c, --continue', 'Resume the most recent conversation session')
|
|
140
142
|
.action(async (options) => {
|
|
143
|
+
if (options.appendSystemPromptFile) {
|
|
144
|
+
try {
|
|
145
|
+
const { readFileSync } = await import('fs');
|
|
146
|
+
setAppendedSystemPrompt(readFileSync(options.appendSystemPromptFile, 'utf-8'));
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
}
|
|
150
|
+
}
|
|
141
151
|
if (options.appendSystemPrompt) {
|
|
142
152
|
setAppendedSystemPrompt(options.appendSystemPrompt);
|
|
143
153
|
}
|
|
154
|
+
if (options.endpoint) {
|
|
155
|
+
const wanted = String(options.endpoint).toLowerCase();
|
|
156
|
+
const all = configManager.getAllEndpoints();
|
|
157
|
+
const ep = wanted === 'batuta'
|
|
158
|
+
? all.find((e) => e.id === 'batuta-proxy' || e.provider === 'batuta')
|
|
159
|
+
: all.find((e) => e.id === options.endpoint) ||
|
|
160
|
+
all.find((e) => (e.name || '').toLowerCase() === wanted);
|
|
161
|
+
if (ep) {
|
|
162
|
+
await configManager.setCurrentEndpoint(ep.id);
|
|
163
|
+
const m = ep.models.find((x) => x.enabled) || ep.models[0];
|
|
164
|
+
if (m)
|
|
165
|
+
await configManager.setCurrentModel(m.id);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
144
168
|
if (options.eval) {
|
|
145
169
|
await runEvalMode();
|
|
146
170
|
return;
|
|
@@ -65,10 +65,12 @@ export class ConfigManager {
|
|
|
65
65
|
}
|
|
66
66
|
getCurrentModel() {
|
|
67
67
|
const endpoint = this.getCurrentEndpoint();
|
|
68
|
-
if (!endpoint
|
|
68
|
+
if (!endpoint)
|
|
69
69
|
return null;
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
const byId = endpoint.models.find((m) => m.id === this.config?.currentModel);
|
|
71
|
+
if (byId)
|
|
72
|
+
return byId;
|
|
73
|
+
return endpoint.models.find((m) => m.enabled) || endpoint.models[0] || null;
|
|
72
74
|
}
|
|
73
75
|
getAllEndpoints() {
|
|
74
76
|
return this.getConfig().endpoints;
|