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 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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "name": "NestDevLab/agentwheel",
4
- "version": "0.16.1",
4
+ "version": "0.16.2",
5
5
  "provides": [
6
6
  { "type": "skills", "path": "skills" }
7
7
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentwheel",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "Weave skills, rules, and instructions across every AI agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -5,7 +5,7 @@ allowed-tools: [Bash]
5
5
  license: MIT
6
6
  metadata:
7
7
  author: NestDevLab
8
- version: "0.16.1"
8
+ version: "0.16.2"
9
9
  ---
10
10
 
11
11
  # agentwheel