opencara 0.16.0 → 0.16.1
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/index.js +18 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -213,6 +213,13 @@ function parseAgents(data) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
const agent = { model: obj.model, tool: resolvedTool };
|
|
216
|
+
if (typeof obj.thinking === "string") agent.thinking = obj.thinking;
|
|
217
|
+
else if (typeof obj.thinking === "number") agent.thinking = String(obj.thinking);
|
|
218
|
+
else if (obj.thinking !== void 0) {
|
|
219
|
+
console.warn(
|
|
220
|
+
`\u26A0 Config warning: agents[${i}].thinking must be a string or number, got ${typeof obj.thinking}, ignoring`
|
|
221
|
+
);
|
|
222
|
+
}
|
|
216
223
|
if (typeof obj.name === "string") agent.name = obj.name;
|
|
217
224
|
if (typeof obj.command === "string") agent.command = obj.command;
|
|
218
225
|
if (obj.router === true) agent.router = true;
|
|
@@ -2080,6 +2087,7 @@ async function pollLoop(client, agentId, reviewDeps, consumptionDeps, agentInfo,
|
|
|
2080
2087
|
if (synthesizeRepos) pollBody.synthesize_repos = synthesizeRepos;
|
|
2081
2088
|
if (agentInfo.model) pollBody.model = agentInfo.model;
|
|
2082
2089
|
if (agentInfo.tool) pollBody.tool = agentInfo.tool;
|
|
2090
|
+
if (agentInfo.thinking) pollBody.thinking = agentInfo.thinking;
|
|
2083
2091
|
const pollResponse = await client.post("/api/tasks/poll", pollBody);
|
|
2084
2092
|
consecutiveAuthErrors = 0;
|
|
2085
2093
|
consecutiveErrors = 0;
|
|
@@ -2167,7 +2175,8 @@ async function handleTask(client, agentId, task, reviewDeps, consumptionDeps, ag
|
|
|
2167
2175
|
agent_id: agentId,
|
|
2168
2176
|
role,
|
|
2169
2177
|
model: agentInfo.model,
|
|
2170
|
-
tool: agentInfo.tool
|
|
2178
|
+
tool: agentInfo.tool,
|
|
2179
|
+
thinking: agentInfo.thinking
|
|
2171
2180
|
};
|
|
2172
2181
|
claimResponse = await withRetry(
|
|
2173
2182
|
() => client.post(`/api/tasks/${task_id}/claim`, claimBody),
|
|
@@ -2657,7 +2666,7 @@ function sleep2(ms, signal) {
|
|
|
2657
2666
|
async function startAgent(agentId, platformUrl, agentInfo, reviewDeps, consumptionDeps, options) {
|
|
2658
2667
|
const client = new ApiClient(platformUrl, {
|
|
2659
2668
|
authToken: options?.authToken,
|
|
2660
|
-
cliVersion: "0.16.
|
|
2669
|
+
cliVersion: "0.16.1",
|
|
2661
2670
|
versionOverride: options?.versionOverride,
|
|
2662
2671
|
onTokenRefresh: options?.onTokenRefresh
|
|
2663
2672
|
});
|
|
@@ -2677,7 +2686,8 @@ async function startAgent(agentId, platformUrl, agentInfo, reviewDeps, consumpti
|
|
|
2677
2686
|
const { log, logError, logWarn } = logger;
|
|
2678
2687
|
const agentSession = createAgentSession();
|
|
2679
2688
|
log(`${icons.start} Agent started (polling ${platformUrl})`);
|
|
2680
|
-
|
|
2689
|
+
const thinkingInfo = agentInfo.thinking ? ` | Thinking: ${agentInfo.thinking}` : "";
|
|
2690
|
+
log(`Model: ${agentInfo.model} | Tool: ${agentInfo.tool}${thinkingInfo}`);
|
|
2681
2691
|
if (options?.versionOverride) {
|
|
2682
2692
|
log(`${icons.info} Version override active: ${options.versionOverride}`);
|
|
2683
2693
|
}
|
|
@@ -2756,13 +2766,14 @@ async function startAgentRouter() {
|
|
|
2756
2766
|
const usageTracker = new UsageTracker();
|
|
2757
2767
|
const model = agentConfig?.model ?? "unknown";
|
|
2758
2768
|
const tool = agentConfig?.tool ?? "unknown";
|
|
2769
|
+
const thinking = agentConfig?.thinking;
|
|
2759
2770
|
const label = agentConfig?.name ?? "agent[0]";
|
|
2760
2771
|
const roles = agentConfig ? computeRoles(agentConfig) : void 0;
|
|
2761
2772
|
const versionOverride = process.env.OPENCARA_VERSION_OVERRIDE || null;
|
|
2762
2773
|
await startAgent(
|
|
2763
2774
|
agentId,
|
|
2764
2775
|
config.platformUrl,
|
|
2765
|
-
{ model, tool },
|
|
2776
|
+
{ model, tool, thinking },
|
|
2766
2777
|
reviewDeps,
|
|
2767
2778
|
{
|
|
2768
2779
|
agentId,
|
|
@@ -2823,11 +2834,12 @@ function startAgentByIndex(config, agentIndex, pollIntervalMs, oauthToken, versi
|
|
|
2823
2834
|
const usageTracker = new UsageTracker();
|
|
2824
2835
|
const model = agentConfig?.model ?? "unknown";
|
|
2825
2836
|
const tool = agentConfig?.tool ?? "unknown";
|
|
2837
|
+
const thinking = agentConfig?.thinking;
|
|
2826
2838
|
const roles = agentConfig ? computeRoles(agentConfig) : void 0;
|
|
2827
2839
|
const agentPromise = startAgent(
|
|
2828
2840
|
agentId,
|
|
2829
2841
|
config.platformUrl,
|
|
2830
|
-
{ model, tool },
|
|
2842
|
+
{ model, tool, thinking },
|
|
2831
2843
|
reviewDeps,
|
|
2832
2844
|
{ agentId, session, usageTracker, usageLimits: config.usageLimits },
|
|
2833
2845
|
{
|
|
@@ -3186,7 +3198,7 @@ var statusCommand = new Command3("status").description("Show agent config, conne
|
|
|
3186
3198
|
});
|
|
3187
3199
|
|
|
3188
3200
|
// src/index.ts
|
|
3189
|
-
var program = new Command4().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version("0.16.
|
|
3201
|
+
var program = new Command4().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version("0.16.1");
|
|
3190
3202
|
program.addCommand(agentCommand);
|
|
3191
3203
|
program.addCommand(authCommand());
|
|
3192
3204
|
program.addCommand(statusCommand);
|