agentwheel 0.19.3 → 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 +18 -10
- package/openpack.json +1 -1
- package/package.json +1 -1
- package/skills/agentwheel/SKILL.md +1 -1
- package/skills/agentwheel-discovery/SKILL.md +1 -1
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({
|
|
@@ -15076,7 +15076,7 @@ program.command("sync", { hidden: true }).argument("[name-or-source]", "configur
|
|
|
15076
15076
|
console.error("warning: 'agentwheel sync' is deprecated and will be removed in 0.10. Use 'agentwheel install'.");
|
|
15077
15077
|
await runInstallCommand(source, options, { apply: !options.dryRun });
|
|
15078
15078
|
});
|
|
15079
|
-
program.command("update").description("re-resolve tracking packages, then apply the result").argument("[name]", "configured package name or source to update").option("--adapter <adapter>", "built-in adapter or comma-separated adapters").option("-i, --installation-type <type>", "installation type (for example local or user)").option("--user", "use the user workspace", false).option("--local", "use the nearest local workspace", false).option("--fleet <id>", "use one registered named fleet").option("-t, --target-root <path>", "workspace root").option("--agent <name>", "named agent from merged config").option("--all", "run for every configured agent", false).option("--profile <name>", "workspace runtime profile").option("--dry-run", "show plans without writing", false).option("--force-drift", "replace drifted managed artifacts", false).option("--force-foreign-state", "plan even when another workspace owns install state at the same paths", false).option("--force-conflict", "adopt unmanaged destinations when their content already matches the desired artifact", false).option("--replace-conflict", "replace unmanaged destinations even when their content differs", false).option("--execute-plugins", "execute semantic plugin installs", false).option("--reload-runtimes", "run configured runtime reload commands after executed semantic plugin changes", false).option("--restart-runtimes", "alias for --reload-runtimes", false).option("--allow-adapter-code", "allow loading local adapter code from configured packages", false).option("--select <type/name>", "temporarily select an artifact by type/name (repeatable or comma-separated)", collectSelectOption, []).option("--skill <name>", "temporarily select a skill by name (repeatable or comma-separated)", collectSkillOption, []).option("--dependency <name-or-source>", "update one tracking dependency while keeping unrelated graph nodes locked (repeatable)", collectDependencyOption, []).option("--with-suggestions", "include suggested companion artifacts for selected roots", false).option("--suggestion <alias>", "include one suggested companion alias (repeatable or comma-separated)", collectSuggestionOption, []).option("--no-deps", "resolve only root sources and ignore requires with a warning").option("--only-source", "exclude unrelated configured workspace packages", false).option("--frozen-lock", "resolve strictly from the existing graph lock and cached sources", false).option("--offline", "resolve strictly from graph locks and local caches", false).option("--refresh", "refresh available package versions even when the version-index TTL is fresh", false).option("--yes", "trust all new transitive sources", false).option("--trust <pattern>", "pre-approve a transitive source glob (repeatable)", collectTrustOption, []).action(async (name, options) => {
|
|
15079
|
+
program.command("update").description("re-resolve tracking packages, then apply the result").argument("[name]", "configured package name or source to update").option("--adapter <adapter>", "built-in adapter or comma-separated adapters").option("-i, --installation-type <type>", "installation type (for example local or user)").option("--user", "use the user workspace", false).option("--local", "use the nearest local workspace", false).option("--fleet <id>", "use one registered named fleet").option("-t, --target-root <path>", "workspace root").option("--agent <name>", "named agent from merged config").option("--all", "run for every configured agent", false).option("--profile <name>", "workspace runtime profile").option("--dry-run", "show plans without writing", false).option("--force-drift", "replace drifted managed artifacts", false).option("--force-foreign-state", "plan even when another workspace owns install state at the same paths", false).option("--force-conflict", "adopt unmanaged destinations when their content already matches the desired artifact", false).option("--replace-conflict", "replace unmanaged destinations even when their content differs", false).option("--execute-plugins", "execute semantic plugin installs", false).option("--reload-runtimes", "run configured runtime reload commands after executed semantic plugin changes", false).option("--restart-runtimes", "alias for --reload-runtimes", false).option("--allow-adapter-code", "allow loading local adapter code from configured packages", false).option("--select <type/name>", "temporarily select an artifact by type/name (repeatable or comma-separated)", collectSelectOption, []).option("--artifact <type/name>", "update only one configured artifact while preserving sibling state").option("--skill <name>", "temporarily select a skill by name (repeatable or comma-separated)", collectSkillOption, []).option("--dependency <name-or-source>", "update one tracking dependency while keeping unrelated graph nodes locked (repeatable)", collectDependencyOption, []).option("--with-suggestions", "include suggested companion artifacts for selected roots", false).option("--suggestion <alias>", "include one suggested companion alias (repeatable or comma-separated)", collectSuggestionOption, []).option("--no-deps", "resolve only root sources and ignore requires with a warning").option("--only-source", "exclude unrelated configured workspace packages", false).option("--frozen-lock", "resolve strictly from the existing graph lock and cached sources", false).option("--offline", "resolve strictly from graph locks and local caches", false).option("--refresh", "refresh available package versions even when the version-index TTL is fresh", false).option("--yes", "trust all new transitive sources", false).option("--trust <pattern>", "pre-approve a transitive source glob (repeatable)", collectTrustOption, []).action(async (name, options) => {
|
|
15080
15080
|
if (options.onlySource && options.dependency.length > 0) throw new Error("--only-source cannot be combined with --dependency.");
|
|
15081
15081
|
if (options.onlySource && !name) throw new Error("--only-source requires a configured package argument.");
|
|
15082
15082
|
if (name && options.dependency.length > 0) throw new Error("A package argument cannot be combined with --dependency.");
|
|
@@ -15086,15 +15086,23 @@ program.command("update").description("re-resolve tracking packages, then apply
|
|
|
15086
15086
|
if (options.dependency.length > 0 && (options.frozenLock || options.offline)) {
|
|
15087
15087
|
throw new Error("--dependency cannot be combined with --frozen-lock or --offline.");
|
|
15088
15088
|
}
|
|
15089
|
+
if (options.artifact && !name) throw new Error("--artifact requires a configured package argument.");
|
|
15090
|
+
if (options.artifact && (options.select.length > 0 || options.skill.length > 0 || options.dependency.length > 0)) {
|
|
15091
|
+
throw new Error("--artifact cannot be combined with --select, --skill, or --dependency.");
|
|
15092
|
+
}
|
|
15093
|
+
const focusedSelector = options.artifact ? normalizeArtifactSelectors([options.artifact])?.[0] : void 0;
|
|
15094
|
+
const focusedSeparator = focusedSelector?.indexOf("/") ?? -1;
|
|
15095
|
+
const focusedArtifact = focusedSelector && focusedSeparator > 0 ? { type: focusedSelector.slice(0, focusedSeparator), name: focusedSelector.slice(focusedSeparator + 1) } : void 0;
|
|
15089
15096
|
const normalizedOptions = normalizeRuntimeScopeOptions(options);
|
|
15090
15097
|
const composite = await resolveSelectedCompositeProfile(normalizedOptions);
|
|
15091
15098
|
if (composite) {
|
|
15099
|
+
if (focusedArtifact) throw new Error("--artifact does not support composite profiles; select one concrete profile or agent.");
|
|
15092
15100
|
await runCompositeUpdate(composite.workspaceRoot, composite.name, composite.profile, name, normalizedOptions);
|
|
15093
15101
|
return;
|
|
15094
15102
|
}
|
|
15095
15103
|
const targets = await resolveCliTargets(normalizedOptions, { preferAllProfile: true });
|
|
15096
15104
|
for (const target of targets) {
|
|
15097
|
-
await runConfiguredGraphPackages(target, { ...normalizedOptions, scope: name }, { mode: "update" });
|
|
15105
|
+
await runConfiguredGraphPackages(target, { ...normalizedOptions, scope: name, focusedArtifact }, { mode: "update" });
|
|
15098
15106
|
}
|
|
15099
15107
|
});
|
|
15100
15108
|
program.command("skill").description("operate on configured skills").addCommand(
|
|
@@ -16144,7 +16152,7 @@ async function buildGraphPlansForTarget(target, source, options, behavior) {
|
|
|
16144
16152
|
const state = installStateForTarget(group.target, adapter, group.adapterOptions, group.installationType);
|
|
16145
16153
|
const manifest = await readInstallManifest(state.installRoot, adapter.name, transport, state);
|
|
16146
16154
|
const scopedResult = targetOptions.focusedArtifact ? previousGroupLock ? scopeUpdatePlanToArtifact(result, scopedRootId, targetOptions.focusedArtifact, previousGroupLock, manifest) : scopeInstallPlanToArtifact(result, scopedRootId, targetOptions.focusedArtifact, manifest) : previousGroupLock ? scopeUpdatePlanToRoot(result, scopedRootId, previousGroupLock, manifest) : scopeInstallPlanToRoot(result, scopedRootId, manifest);
|
|
16147
|
-
if (targetOptions.focusedArtifact &&
|
|
16155
|
+
if (targetOptions.focusedArtifact && targetOptions.forceForeignState !== true) {
|
|
16148
16156
|
const focusedPaths = scopedResult.plan.operations.filter((operation) => operationMatchesFocusedArtifact(
|
|
16149
16157
|
operation,
|
|
16150
16158
|
targetOptions.focusedArtifact,
|
package/openpack.json
CHANGED
package/package.json
CHANGED