opencara 0.23.11 → 0.23.12
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 +27 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4576,21 +4576,39 @@ function buildBatchPollRequest(agents) {
|
|
|
4576
4576
|
});
|
|
4577
4577
|
return { agents: batchAgents };
|
|
4578
4578
|
}
|
|
4579
|
-
function filterTasksForAgent(tasks, agent, maxDiffSizeKb, diffFailCounts, maxDiffFetchAttempts = 3, accessibleRepos) {
|
|
4579
|
+
function filterTasksForAgent(tasks, agent, maxDiffSizeKb, diffFailCounts, maxDiffFetchAttempts = 3, accessibleRepos, log) {
|
|
4580
4580
|
return tasks.filter((t) => {
|
|
4581
|
-
|
|
4581
|
+
const repo = `${t.owner}/${t.repo}`;
|
|
4582
|
+
if (accessibleRepos && !accessibleRepos.has(repo)) {
|
|
4583
|
+
log?.(
|
|
4584
|
+
`Skipping task ${t.task_id.slice(0, 8)}\u2026 (${repo} PR#${t.pr_number}) \u2014 repo not in accessible set`
|
|
4585
|
+
);
|
|
4582
4586
|
return false;
|
|
4583
4587
|
}
|
|
4584
4588
|
if (agent.repoConfig && !isRepoAllowed(agent.repoConfig, t.owner, t.repo, agent.agentOwner, agent.userOrgs)) {
|
|
4589
|
+
log?.(
|
|
4590
|
+
`Skipping task ${t.task_id.slice(0, 8)}\u2026 (${repo} PR#${t.pr_number}) \u2014 repo not allowed by config (mode=${agent.repoConfig.mode})`
|
|
4591
|
+
);
|
|
4585
4592
|
return false;
|
|
4586
4593
|
}
|
|
4587
4594
|
if (agent.synthesizeRepos && !isRepoAllowed(agent.synthesizeRepos, t.owner, t.repo, agent.agentOwner, agent.userOrgs)) {
|
|
4595
|
+
log?.(
|
|
4596
|
+
`Skipping task ${t.task_id.slice(0, 8)}\u2026 (${repo} PR#${t.pr_number}) \u2014 repo not allowed by synthesize_repos config`
|
|
4597
|
+
);
|
|
4588
4598
|
return false;
|
|
4589
4599
|
}
|
|
4590
|
-
|
|
4600
|
+
const isExplicitlyListed = agent.repoConfig?.list?.includes(repo) ?? false;
|
|
4601
|
+
if (!isExplicitlyListed && maxDiffSizeKb && t.diff_size != null && t.diff_size * ESTIMATED_BYTES_PER_DIFF_LINE / 1024 > maxDiffSizeKb) {
|
|
4602
|
+
const estimatedKb = Math.round(t.diff_size * ESTIMATED_BYTES_PER_DIFF_LINE / 1024);
|
|
4603
|
+
log?.(
|
|
4604
|
+
`Skipping task ${t.task_id.slice(0, 8)}\u2026 (${repo} PR#${t.pr_number}) \u2014 estimated diff ${estimatedKb}KB exceeds max_diff_size_kb (${maxDiffSizeKb}KB)`
|
|
4605
|
+
);
|
|
4591
4606
|
return false;
|
|
4592
4607
|
}
|
|
4593
4608
|
if (diffFailCounts && (diffFailCounts.get(t.task_id) ?? 0) >= maxDiffFetchAttempts) {
|
|
4609
|
+
log?.(
|
|
4610
|
+
`Skipping task ${t.task_id.slice(0, 8)}\u2026 (${repo} PR#${t.pr_number}) \u2014 diff fetch failed ${maxDiffFetchAttempts} times`
|
|
4611
|
+
);
|
|
4594
4612
|
return false;
|
|
4595
4613
|
}
|
|
4596
4614
|
return true;
|
|
@@ -5677,7 +5695,7 @@ function sleep2(ms, signal) {
|
|
|
5677
5695
|
async function startAgent(agentId, platformUrl, agentInfo, reviewDeps, consumptionDeps, options) {
|
|
5678
5696
|
const client = new ApiClient(platformUrl, {
|
|
5679
5697
|
authToken: options?.authToken,
|
|
5680
|
-
cliVersion: "0.23.
|
|
5698
|
+
cliVersion: "0.23.12",
|
|
5681
5699
|
versionOverride: options?.versionOverride,
|
|
5682
5700
|
onTokenRefresh: options?.onTokenRefresh
|
|
5683
5701
|
});
|
|
@@ -5862,7 +5880,8 @@ async function batchPollLoop(client, agentStates, options) {
|
|
|
5862
5880
|
state.reviewDeps.maxDiffSizeKb,
|
|
5863
5881
|
state.diffFailCounts,
|
|
5864
5882
|
MAX_DIFF_FETCH_ATTEMPTS,
|
|
5865
|
-
accessibleRepos
|
|
5883
|
+
accessibleRepos,
|
|
5884
|
+
(msg) => state.logger.logWarn(`${icons.warn} ${msg}`)
|
|
5866
5885
|
);
|
|
5867
5886
|
const task = eligible[0];
|
|
5868
5887
|
if (!task) continue;
|
|
@@ -5973,7 +5992,7 @@ async function startBatchAgents(config, agents, pollIntervalMs, oauthToken, opti
|
|
|
5973
5992
|
const { versionOverride, verbose, instancesOverride, agentOwner, userOrgs } = options;
|
|
5974
5993
|
const client = new ApiClient(config.platformUrl, {
|
|
5975
5994
|
authToken: oauthToken,
|
|
5976
|
-
cliVersion: "0.23.
|
|
5995
|
+
cliVersion: "0.23.12",
|
|
5977
5996
|
versionOverride,
|
|
5978
5997
|
onTokenRefresh: () => getValidToken(config.platformUrl, { configPath: config.authFile })
|
|
5979
5998
|
});
|
|
@@ -6318,7 +6337,7 @@ agentCommand.command("start").description("Start agents in polling mode").option
|
|
|
6318
6337
|
}
|
|
6319
6338
|
config = loadConfig();
|
|
6320
6339
|
}
|
|
6321
|
-
console.log(formatVersionBanner("0.23.
|
|
6340
|
+
console.log(formatVersionBanner("0.23.12", "d2879c9"));
|
|
6322
6341
|
if (config.agents && config.agents.length > 0) {
|
|
6323
6342
|
const toolEntries = config.agents.map((a) => ({
|
|
6324
6343
|
tool: a.tool,
|
|
@@ -7140,7 +7159,7 @@ var statusCommand = new Command4("status").description("Show agent config, conne
|
|
|
7140
7159
|
});
|
|
7141
7160
|
|
|
7142
7161
|
// src/index.ts
|
|
7143
|
-
var program = new Command5().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version(`${"0.23.
|
|
7162
|
+
var program = new Command5().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version(`${"0.23.12"} (${"d2879c9"})`);
|
|
7144
7163
|
program.addCommand(agentCommand);
|
|
7145
7164
|
program.addCommand(authCommand());
|
|
7146
7165
|
program.addCommand(dedupCommand());
|