agentwheel 0.19.4 → 0.19.5
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
CHANGED
|
@@ -1712,7 +1712,7 @@ function hasMergeRemovalContent(removal) {
|
|
|
1712
1712
|
async function mergeRemovalForInstall(sourcePath, strategy, currentContent, options = {}) {
|
|
1713
1713
|
const source = await readMergeSource(sourcePath, strategy);
|
|
1714
1714
|
if (currentContent === void 0) return source;
|
|
1715
|
-
if (options.
|
|
1715
|
+
if (options.adoptExisting) {
|
|
1716
1716
|
if (strategy === "codex-toml-mcp") {
|
|
1717
1717
|
const mismatched = mismatchedCodexTomlMcpServers(source, currentContent);
|
|
1718
1718
|
if (mismatched.length > 0) {
|
|
@@ -1720,10 +1720,8 @@ async function mergeRemovalForInstall(sourcePath, strategy, currentContent, opti
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return source;
|
|
1722
1722
|
}
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
}
|
|
1726
|
-
const mismatch = firstMcpContributionMismatch(parseMergeDestination(currentContent, strategy), source);
|
|
1723
|
+
const current = parseMergeDestination(currentContent, strategy);
|
|
1724
|
+
const mismatch = options.adoptExisting === "mcp" ? firstMcpContributionMismatch(current, source) : firstMergeContributionMismatch(current, source);
|
|
1727
1725
|
if (mismatch) {
|
|
1728
1726
|
throw new MergeAdoptionMismatchError(`cannot adopt merged contribution: destination differs or is missing at ${mismatch}`);
|
|
1729
1727
|
}
|
|
@@ -4015,10 +4013,12 @@ async function createPlanFromOperations(desiredOps, adapter, targetRoot, manifes
|
|
|
4015
4013
|
}
|
|
4016
4014
|
}
|
|
4017
4015
|
const incompleteMergeOwnership = existing2 && existing2.mergeStrategy && !("mergeCreatedDestination" in existing2 && existing2.mergeCreatedDestination === true) && !("mergeRemoval" in existing2 && hasMergeRemovalContent(existing2.mergeRemoval));
|
|
4018
|
-
const adoptExisting = exists2 && (!existing2 || incompleteMergeOwnership) && options.forceConflict === true
|
|
4016
|
+
const adoptExisting = exists2 && (!existing2 || incompleteMergeOwnership) && options.forceConflict === true;
|
|
4019
4017
|
let mergeRemoval;
|
|
4020
4018
|
try {
|
|
4021
|
-
mergeRemoval = await mergeRemovalForInstall(op.sourcePath, op.mergeStrategy, currentContent, {
|
|
4019
|
+
mergeRemoval = await mergeRemovalForInstall(op.sourcePath, op.mergeStrategy, currentContent, {
|
|
4020
|
+
adoptExisting: adoptExisting ? op.artifactType === "mcp" ? "mcp" : "generic" : void 0
|
|
4021
|
+
});
|
|
4022
4022
|
} catch (error) {
|
|
4023
4023
|
if (!(error instanceof MergeAdoptionMismatchError)) throw error;
|
|
4024
4024
|
operations.push({
|
package/openpack.json
CHANGED
package/package.json
CHANGED