@rynfar/meridian 1.55.0 → 1.55.1

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.
@@ -9081,9 +9081,15 @@ var KNOWN_ALIASES = {
9081
9081
  executor: "build"
9082
9082
  };
9083
9083
  var STRIP_SUFFIXES = ["-agent", "-tool", "-worker", "-task", " agent", " tool"];
9084
- function resolveAgentAlias(input) {
9084
+ function resolveAgentAlias(input, validAgents) {
9085
9085
  const lowered = input.toLowerCase();
9086
- return KNOWN_ALIASES[lowered] ?? lowered;
9086
+ const exact = validAgents.find((a) => a.toLowerCase() === lowered);
9087
+ if (exact)
9088
+ return exact;
9089
+ const alias = KNOWN_ALIASES[lowered];
9090
+ if (alias && validAgents.includes(alias))
9091
+ return alias;
9092
+ return lowered;
9087
9093
  }
9088
9094
  function fuzzyMatchAgentName(input, validAgents) {
9089
9095
  if (!input)
@@ -20241,7 +20247,7 @@ function createProxyServer(config = {}) {
20241
20247
  const clientTool = requestTools.find((t) => t.name === toolName);
20242
20248
  let toolInput = normalizeToolInput(input.tool_input, clientTool?.input_schema);
20243
20249
  if (toolName.toLowerCase() === "task" && toolInput?.subagent_type && typeof toolInput.subagent_type === "string") {
20244
- toolInput = { ...toolInput, subagent_type: resolveAgentAlias(toolInput.subagent_type) };
20250
+ toolInput = { ...toolInput, subagent_type: resolveAgentAlias(toolInput.subagent_type, validAgentNames) };
20245
20251
  }
20246
20252
  const signature = toolUseSignature(toolName, toolInput);
20247
20253
  const isExactDuplicate = capturedSignatures.has(signature);
@@ -21356,7 +21362,7 @@ data: ${JSON.stringify({ type: "message_stop" })}
21356
21362
  try {
21357
21363
  const parsed = JSON.parse(buffered);
21358
21364
  if (typeof parsed.subagent_type === "string") {
21359
- parsed.subagent_type = resolveAgentAlias(parsed.subagent_type);
21365
+ parsed.subagent_type = resolveAgentAlias(parsed.subagent_type, validAgentNames);
21360
21366
  }
21361
21367
  fixed = JSON.stringify(parsed);
21362
21368
  } catch {}
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startProxyServer
4
- } from "./cli-w63v1ftp.js";
4
+ } from "./cli-3p1793vq.js";
5
5
  import"./cli-f0yqy2d2.js";
6
6
  import"./cli-sry5aqdj.js";
7
7
  import"./cli-xmweegb1.js";
@@ -22,7 +22,12 @@
22
22
  * the SDK may validate against registered alias variants (e.g., "general-purpose"
23
23
  * is registered by `addCaseVariants`), but the client expects the canonical
24
24
  * agent name from its config ("general").
25
+ *
26
+ * The alias table exists to REPAIR invalid names, never to remap valid ones
27
+ * (#671): a name that already matches a registered agent is returned in the
28
+ * config's canonical casing, and an alias is applied only when its target is
29
+ * itself registered — renaming to a nonexistent agent can only ever fail.
25
30
  */
26
- export declare function resolveAgentAlias(input: string): string;
31
+ export declare function resolveAgentAlias(input: string, validAgents: string[]): string;
27
32
  export declare function fuzzyMatchAgentName(input: string, validAgents: string[]): string;
28
33
  //# sourceMappingURL=agentMatch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentMatch.d.ts","sourceRoot":"","sources":["../../src/proxy/agentMatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA0CH;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAsChF"}
1
+ {"version":3,"file":"agentMatch.d.ts","sourceRoot":"","sources":["../../src/proxy/agentMatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA0CH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAO9E;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAsChF"}
package/dist/server.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  runObserveHook,
12
12
  runTransformHook,
13
13
  startProxyServer
14
- } from "./cli-w63v1ftp.js";
14
+ } from "./cli-3p1793vq.js";
15
15
  import"./cli-f0yqy2d2.js";
16
16
  import"./cli-sry5aqdj.js";
17
17
  import"./cli-xmweegb1.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynfar/meridian",
3
- "version": "1.55.0",
3
+ "version": "1.55.1",
4
4
  "description": "Local Anthropic API powered by your Claude Max subscription. One subscription, every agent.",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",