orquesta-cli 0.2.53 → 0.2.55
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.
|
@@ -214,13 +214,14 @@ export class LLMClient {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
const isClaudeModel = /claude|sonnet|opus|haiku/i.test(modelId);
|
|
217
|
+
const supportsThinking = isClaudeModel && /anthropic|getorquesta|batuta/i.test(this.baseUrl);
|
|
217
218
|
const requestBody = {
|
|
218
219
|
model: modelId,
|
|
219
220
|
messages: processedMessages,
|
|
220
221
|
temperature: options.temperature ?? 0,
|
|
221
222
|
max_tokens: options.max_tokens,
|
|
222
223
|
stream: false,
|
|
223
|
-
...(
|
|
224
|
+
...(supportsThinking && { thinking: { type: 'enabled', budget_tokens: 10000 } }),
|
|
224
225
|
...(options.tools && {
|
|
225
226
|
tools: options.tools,
|
|
226
227
|
parallel_tool_calls: false,
|
|
@@ -482,13 +483,14 @@ export class LLMClient {
|
|
|
482
483
|
const processedMessages = options.messages ?
|
|
483
484
|
this.preprocessMessages(options.messages, modelId) : [];
|
|
484
485
|
const isClaudeModel = /claude|sonnet|opus|haiku/i.test(modelId);
|
|
486
|
+
const supportsThinking = isClaudeModel && /anthropic|getorquesta|batuta/i.test(this.baseUrl);
|
|
485
487
|
const requestBody = {
|
|
486
488
|
model: modelId,
|
|
487
489
|
messages: processedMessages,
|
|
488
490
|
temperature: options.temperature ?? 0,
|
|
489
491
|
max_tokens: options.max_tokens,
|
|
490
492
|
stream: true,
|
|
491
|
-
...(
|
|
493
|
+
...(supportsThinking && { thinking: { type: 'enabled', budget_tokens: 10000 } }),
|
|
492
494
|
...(options.tools && {
|
|
493
495
|
tools: options.tools,
|
|
494
496
|
...(options.tool_choice && { tool_choice: options.tool_choice }),
|
package/dist/core/sub-agent.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { execSync } from 'child_process';
|
|
2
2
|
export async function spawnSubAgent(task, options) {
|
|
3
|
+
const currentDepth = parseInt(process.env['ORQUESTA_DEPTH'] || '0', 10);
|
|
4
|
+
if (currentDepth >= 3) {
|
|
5
|
+
return { success: false, output: '', error: 'Max sub-agent recursion depth (3) reached' };
|
|
6
|
+
}
|
|
3
7
|
const cwd = options?.cwd || process.cwd();
|
|
4
8
|
const timeout = options?.timeout || 120000;
|
|
5
9
|
try {
|
|
6
|
-
const output = execSync(`orquesta -p '${task.replace(/'/g, "'\\''")}' --dangerously-skip-permissions`, { cwd, timeout, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
10
|
+
const output = execSync(`orquesta -p '${task.replace(/'/g, "'\\''")}' --dangerously-skip-permissions`, { cwd, timeout, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'], env: { ...process.env, ORQUESTA_DEPTH: String(currentDepth + 1) } });
|
|
7
11
|
return { success: true, output: output.trim() };
|
|
8
12
|
}
|
|
9
13
|
catch (err) {
|
|
@@ -162,10 +162,10 @@ export class PlanExecutor {
|
|
|
162
162
|
{ role: 'assistant', content: planMessage }
|
|
163
163
|
];
|
|
164
164
|
callbacks.setMessages(currentMessages);
|
|
165
|
-
this.setupTodoCallbacks(currentTodos, callbacks, (updated) => {
|
|
166
|
-
currentTodos = updated;
|
|
167
|
-
});
|
|
168
165
|
}
|
|
166
|
+
this.setupTodoCallbacks(currentTodos, callbacks, (updated) => {
|
|
167
|
+
currentTodos = updated;
|
|
168
|
+
});
|
|
169
169
|
callbacks.setExecutionPhase('executing');
|
|
170
170
|
const tools = toolRegistry.getLLMToolDefinitions();
|
|
171
171
|
const hasSystemMessage = currentMessages.some(m => m.role === 'system');
|
|
@@ -200,6 +200,8 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo, resumeL
|
|
|
200
200
|
};
|
|
201
201
|
}, []);
|
|
202
202
|
useEffect(() => {
|
|
203
|
+
if (process.env['ORQUESTA_DAEMON_CHILD'] || process.env['container'])
|
|
204
|
+
return;
|
|
203
205
|
let cancelled = false;
|
|
204
206
|
checkForCliUpdate(VERSION).then(info => {
|
|
205
207
|
if (!cancelled && info) {
|