opencara 0.24.2 → 0.24.3
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 +12 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1790,7 +1790,7 @@ function fetchPRRef(bareRepoPath, prNumber, ghAvailable) {
|
|
|
1790
1790
|
bareRepoPath
|
|
1791
1791
|
);
|
|
1792
1792
|
}
|
|
1793
|
-
function addWorktree(bareRepoPath, worktreeKey) {
|
|
1793
|
+
function addWorktree(bareRepoPath, worktreeKey, targetRef) {
|
|
1794
1794
|
validatePathSegment(worktreeKey, "worktreeKey");
|
|
1795
1795
|
const repoName = path4.basename(bareRepoPath, ".git");
|
|
1796
1796
|
const worktreeBase = path4.join(path4.dirname(bareRepoPath), `${repoName}-worktrees`);
|
|
@@ -1799,7 +1799,7 @@ function addWorktree(bareRepoPath, worktreeKey) {
|
|
|
1799
1799
|
return worktreePath;
|
|
1800
1800
|
}
|
|
1801
1801
|
fs4.mkdirSync(worktreeBase, { recursive: true });
|
|
1802
|
-
gitExec("git", ["worktree", "add", "--detach", worktreePath,
|
|
1802
|
+
gitExec("git", ["worktree", "add", "--detach", worktreePath, targetRef], bareRepoPath);
|
|
1803
1803
|
return worktreePath;
|
|
1804
1804
|
}
|
|
1805
1805
|
function removeWorktree(bareRepoPath, worktreePath) {
|
|
@@ -1819,6 +1819,9 @@ function repoKeyFromBarePath(bareRepoPath) {
|
|
|
1819
1819
|
const owner = path4.basename(path4.dirname(bareRepoPath));
|
|
1820
1820
|
return `${owner}/${repoName}`;
|
|
1821
1821
|
}
|
|
1822
|
+
function resolveFetchedPrCommit(bareRepoPath) {
|
|
1823
|
+
return gitExec("git", ["rev-parse", "--verify", "FETCH_HEAD"], bareRepoPath).trim();
|
|
1824
|
+
}
|
|
1822
1825
|
async function checkoutWorktree(owner, repo, prNumber, baseDir, _taskId, sparseOptions) {
|
|
1823
1826
|
validatePathSegment(owner, "owner");
|
|
1824
1827
|
validatePathSegment(repo, "repo");
|
|
@@ -1829,8 +1832,9 @@ async function checkoutWorktree(owner, repo, prNumber, baseDir, _taskId, sparseO
|
|
|
1829
1832
|
return withRepoLock(repoKey, () => {
|
|
1830
1833
|
const { bareRepoPath, cloned } = ensureBareClone(owner, repo, baseDir, ghAvailable);
|
|
1831
1834
|
fetchPRRef(bareRepoPath, prNumber, ghAvailable);
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1835
|
+
const prHeadCommit = resolveFetchedPrCommit(bareRepoPath);
|
|
1836
|
+
const worktreePath = addWorktree(bareRepoPath, wtKey, prHeadCommit);
|
|
1837
|
+
gitExec("git", ["checkout", "--detach", "--force", prHeadCommit], worktreePath);
|
|
1834
1838
|
if (useSparse) {
|
|
1835
1839
|
configureSparseCheckout(worktreePath, sparseOptions.diffPaths);
|
|
1836
1840
|
}
|
|
@@ -5732,7 +5736,7 @@ function sleep2(ms, signal) {
|
|
|
5732
5736
|
async function startAgent(agentId, platformUrl, agentInfo, reviewDeps, consumptionDeps, options) {
|
|
5733
5737
|
const client = new ApiClient(platformUrl, {
|
|
5734
5738
|
authToken: options?.authToken,
|
|
5735
|
-
cliVersion: "0.24.
|
|
5739
|
+
cliVersion: "0.24.3",
|
|
5736
5740
|
versionOverride: options?.versionOverride,
|
|
5737
5741
|
onTokenRefresh: options?.onTokenRefresh
|
|
5738
5742
|
});
|
|
@@ -6097,7 +6101,7 @@ async function startBatchAgents(config, agents, pollIntervalMs, oauthToken, opti
|
|
|
6097
6101
|
const { versionOverride, verbose, instancesOverride, agentOwner, userOrgs } = options;
|
|
6098
6102
|
const client = new ApiClient(config.platformUrl, {
|
|
6099
6103
|
authToken: oauthToken,
|
|
6100
|
-
cliVersion: "0.24.
|
|
6104
|
+
cliVersion: "0.24.3",
|
|
6101
6105
|
versionOverride,
|
|
6102
6106
|
onTokenRefresh: () => getValidToken(config.platformUrl, { configPath: config.authFile })
|
|
6103
6107
|
});
|
|
@@ -6446,7 +6450,7 @@ agentCommand.command("start").description("Start agents in polling mode").option
|
|
|
6446
6450
|
}
|
|
6447
6451
|
config = loadConfig();
|
|
6448
6452
|
}
|
|
6449
|
-
console.log(formatVersionBanner("0.24.
|
|
6453
|
+
console.log(formatVersionBanner("0.24.3", "c08a9b3"));
|
|
6450
6454
|
if (config.agents && config.agents.length > 0) {
|
|
6451
6455
|
const toolEntries = config.agents.map((a) => ({
|
|
6452
6456
|
tool: a.tool,
|
|
@@ -7268,7 +7272,7 @@ var statusCommand = new Command4("status").description("Show agent config, conne
|
|
|
7268
7272
|
});
|
|
7269
7273
|
|
|
7270
7274
|
// src/index.ts
|
|
7271
|
-
var program = new Command5().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version(`${"0.24.
|
|
7275
|
+
var program = new Command5().name("opencara").description("OpenCara \u2014 distributed AI code review agent").version(`${"0.24.3"} (${"c08a9b3"})`);
|
|
7272
7276
|
program.addCommand(agentCommand);
|
|
7273
7277
|
program.addCommand(authCommand());
|
|
7274
7278
|
program.addCommand(dedupCommand());
|