opencara 0.12.0 → 0.12.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 +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -154,13 +154,15 @@ function parseRepoConfig(obj, index) {
|
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
156
|
const config = { mode };
|
|
157
|
+
const list = reposObj.list;
|
|
157
158
|
if (mode === "whitelist" || mode === "blacklist") {
|
|
158
|
-
const list = reposObj.list;
|
|
159
159
|
if (!Array.isArray(list) || list.length === 0) {
|
|
160
160
|
throw new RepoConfigError(
|
|
161
161
|
`agents[${index}].repos.list is required and must be non-empty for mode '${mode}'`
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
|
+
}
|
|
165
|
+
if (Array.isArray(list) && list.length > 0) {
|
|
164
166
|
for (let j = 0; j < list.length; j++) {
|
|
165
167
|
if (typeof list[j] !== "string" || !REPO_PATTERN.test(list[j])) {
|
|
166
168
|
throw new RepoConfigError(
|
|
@@ -1354,7 +1356,7 @@ async function pollLoop(client, agentId, reviewDeps, consumptionDeps, agentInfo,
|
|
|
1354
1356
|
try {
|
|
1355
1357
|
const pollBody = { agent_id: agentId };
|
|
1356
1358
|
if (reviewOnly) pollBody.review_only = true;
|
|
1357
|
-
if (repoConfig?.
|
|
1359
|
+
if (repoConfig?.list?.length) {
|
|
1358
1360
|
pollBody.repos = repoConfig.list;
|
|
1359
1361
|
}
|
|
1360
1362
|
const pollResponse = await client.post("/api/tasks/poll", pollBody);
|
|
@@ -2022,7 +2024,7 @@ agentCommand.command("start").description("Start agents in polling mode").option
|
|
|
2022
2024
|
});
|
|
2023
2025
|
|
|
2024
2026
|
// src/index.ts
|
|
2025
|
-
var program = new Command2().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version("0.12.
|
|
2027
|
+
var program = new Command2().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version("0.12.1");
|
|
2026
2028
|
program.addCommand(agentCommand);
|
|
2027
2029
|
program.action(() => {
|
|
2028
2030
|
startAgentRouter();
|