orquesta-cli 0.2.90 → 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 +15 -0
- package/dist/core/config/config-manager.js +5 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -121,6 +121,7 @@ program
|
|
|
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
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.')
|
|
124
125
|
.option('--verbose', 'Enable verbose logging')
|
|
125
126
|
.option('--debug', 'Enable debug logging')
|
|
126
127
|
.option('--llm-log', 'Enable LLM logging')
|
|
@@ -150,6 +151,20 @@ program
|
|
|
150
151
|
if (options.appendSystemPrompt) {
|
|
151
152
|
setAppendedSystemPrompt(options.appendSystemPrompt);
|
|
152
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
|
+
}
|
|
153
168
|
if (options.eval) {
|
|
154
169
|
await runEvalMode();
|
|
155
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;
|