clawmux 0.3.4 → 0.3.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/cli.cjs CHANGED
@@ -3778,7 +3778,10 @@ async function handleApiRequest(req, body, apiType, config, openclawConfig, auth
3778
3778
  const message = err instanceof Error ? err.message : String(err);
3779
3779
  return jsonErrorResponse(`Upstream request failed: ${message}`, 502);
3780
3780
  }
3781
- console.log(`[clawmux] [llm] ${decision.tier} → ${decision.model} | conf=${classification.confidence.toFixed(2)}${classification.reasoning ? ` | ${classification.reasoning}` : ""}`);
3781
+ const lastUserMsg = [...parsed.messages].reverse().find((m) => m.role === "user");
3782
+ const msgText = typeof lastUserMsg?.content === "string" ? lastUserMsg.content : Array.isArray(lastUserMsg?.content) ? lastUserMsg.content.filter((b) => b.type === "text").map((b) => b.text ?? "").join(" ") : "";
3783
+ const preview = msgText.replace(/\s+/g, " ").trim().slice(0, 100);
3784
+ console.log(`[clawmux] [llm] ${decision.tier} → ${decision.model} | conf=${classification.confidence.toFixed(2)}${classification.reasoning ? ` | ${classification.reasoning}` : ""}${preview ? ` | "${preview}${msgText.length > 100 ? "…" : ""}"` : ""}`);
3782
3785
  if (compressionMiddleware && upstreamResponse.ok) {
3783
3786
  compressionMiddleware.afterResponse(parsed, adapter, baseUrl, authInfo);
3784
3787
  }
@@ -3942,7 +3945,7 @@ function getLogDir() {
3942
3945
  }
3943
3946
 
3944
3947
  // src/cli.ts
3945
- var VERSION2 = process.env.npm_package_version ?? "0.3.4";
3948
+ var VERSION2 = process.env.npm_package_version ?? "0.3.5";
3946
3949
  var SERVICE_NAME = "clawmux";
3947
3950
  var HELP = `Usage: clawmux <command>
3948
3951
 
package/dist/index.cjs CHANGED
@@ -3801,7 +3801,10 @@ async function handleApiRequest(req, body, apiType, config, openclawConfig, auth
3801
3801
  const message = err instanceof Error ? err.message : String(err);
3802
3802
  return jsonErrorResponse(`Upstream request failed: ${message}`, 502);
3803
3803
  }
3804
- console.log(`[clawmux] [llm] ${decision.tier} → ${decision.model} | conf=${classification.confidence.toFixed(2)}${classification.reasoning ? ` | ${classification.reasoning}` : ""}`);
3804
+ const lastUserMsg = [...parsed.messages].reverse().find((m) => m.role === "user");
3805
+ const msgText = typeof lastUserMsg?.content === "string" ? lastUserMsg.content : Array.isArray(lastUserMsg?.content) ? lastUserMsg.content.filter((b) => b.type === "text").map((b) => b.text ?? "").join(" ") : "";
3806
+ const preview = msgText.replace(/\s+/g, " ").trim().slice(0, 100);
3807
+ console.log(`[clawmux] [llm] ${decision.tier} → ${decision.model} | conf=${classification.confidence.toFixed(2)}${classification.reasoning ? ` | ${classification.reasoning}` : ""}${preview ? ` | "${preview}${msgText.length > 100 ? "…" : ""}"` : ""}`);
3805
3808
  if (compressionMiddleware && upstreamResponse.ok) {
3806
3809
  compressionMiddleware.afterResponse(parsed, adapter, baseUrl, authInfo);
3807
3810
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmux",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Smart model routing + context compression proxy for OpenClaw",
5
5
  "type": "module",
6
6
  "bin": {