agentwheel 0.16.1 → 0.16.2
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 +35 -0
- package/openpack.json +1 -1
- package/package.json +1 -1
- package/skills/agentwheel/SKILL.md +1 -1
package/dist/index.js
CHANGED
|
@@ -941,6 +941,9 @@ function mergeOpenClawJson(base, incoming, path = []) {
|
|
|
941
941
|
if (path.join(".") === "agents.list" && Array.isArray(base) && Array.isArray(incoming)) {
|
|
942
942
|
return mergeOpenClawAgentsById(base, incoming);
|
|
943
943
|
}
|
|
944
|
+
if (isAgentwheelSkillRouterRepositoriesPath(path) && Array.isArray(base) && Array.isArray(incoming)) {
|
|
945
|
+
return mergeOpenClawRecordsByKey(base, incoming, "name");
|
|
946
|
+
}
|
|
944
947
|
if (Array.isArray(base) && Array.isArray(incoming)) {
|
|
945
948
|
return deepMerge(base, incoming);
|
|
946
949
|
}
|
|
@@ -956,6 +959,9 @@ function mergeOpenClawJson(base, incoming, path = []) {
|
|
|
956
959
|
function isMcpServerCodexAgentsPath(path) {
|
|
957
960
|
return path.length === 5 && path[0] === "mcp" && path[1] === "servers" && path[3] === "codex" && path[4] === "agents";
|
|
958
961
|
}
|
|
962
|
+
function isAgentwheelSkillRouterRepositoriesPath(path) {
|
|
963
|
+
return path.join(".") === "plugins.entries.agentwheel-skill-router.config.repositories";
|
|
964
|
+
}
|
|
959
965
|
function expandEnvPlaceholders(value, sourcePath) {
|
|
960
966
|
if (typeof value === "string") {
|
|
961
967
|
return value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) => {
|
|
@@ -1011,6 +1017,35 @@ function mergeOpenClawAgentsById(base, incoming) {
|
|
|
1011
1017
|
}
|
|
1012
1018
|
return out;
|
|
1013
1019
|
}
|
|
1020
|
+
function mergeOpenClawRecordsByKey(base, incoming, key) {
|
|
1021
|
+
const replacements = /* @__PURE__ */ new Map();
|
|
1022
|
+
for (const value of incoming) {
|
|
1023
|
+
const recordKey = isRecord(value) && typeof value[key] === "string" ? value[key] : void 0;
|
|
1024
|
+
if (recordKey) replacements.set(recordKey, value);
|
|
1025
|
+
}
|
|
1026
|
+
const out = [];
|
|
1027
|
+
const emitted = /* @__PURE__ */ new Set();
|
|
1028
|
+
for (const value of base) {
|
|
1029
|
+
const recordKey = isRecord(value) && typeof value[key] === "string" ? value[key] : void 0;
|
|
1030
|
+
const replacement = recordKey ? replacements.get(recordKey) : void 0;
|
|
1031
|
+
if (!recordKey || !replacement) {
|
|
1032
|
+
out.push(value);
|
|
1033
|
+
continue;
|
|
1034
|
+
}
|
|
1035
|
+
if (!emitted.has(recordKey)) {
|
|
1036
|
+
out.push(replacement);
|
|
1037
|
+
emitted.add(recordKey);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
for (const value of incoming) {
|
|
1041
|
+
const recordKey = isRecord(value) && typeof value[key] === "string" ? value[key] : void 0;
|
|
1042
|
+
if (!recordKey || !emitted.has(recordKey)) {
|
|
1043
|
+
out.push(value);
|
|
1044
|
+
if (recordKey) emitted.add(recordKey);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
return out;
|
|
1048
|
+
}
|
|
1014
1049
|
|
|
1015
1050
|
// src/install/manifest.ts
|
|
1016
1051
|
import { createHash as createHash2 } from "crypto";
|
package/openpack.json
CHANGED
package/package.json
CHANGED