clawmux 0.3.11 → 0.3.13

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
@@ -112220,7 +112220,7 @@ var import_node_child_process = require("node:child_process");
112220
112220
  var import_node_os2 = require("node:os");
112221
112221
 
112222
112222
  // src/proxy/router.ts
112223
- var VERSION = process.env.npm_package_version ?? "0.3.11";
112223
+ var VERSION = process.env.npm_package_version ?? "0.3.13";
112224
112224
  function jsonResponse(body, status = 200) {
112225
112225
  return new Response(JSON.stringify(body), {
112226
112226
  status,
@@ -121258,15 +121258,24 @@ function detectInstallMethod() {
121258
121258
  return "npm";
121259
121259
  }
121260
121260
  }
121261
+ function resolveBinPath(command) {
121262
+ try {
121263
+ return import_node_child_process.execSync(`which ${command}`, { encoding: "utf-8" }).trim();
121264
+ } catch {
121265
+ return command;
121266
+ }
121267
+ }
121261
121268
  function resolveClawmuxBin() {
121262
121269
  try {
121263
121270
  const bin = import_node_child_process.execSync("which clawmux", { encoding: "utf-8" }).trim();
121264
121271
  if (bin.includes("/tmp/") || bin.includes("bunx-") || bin.includes("npx-")) {
121265
- return detectInstallMethod() === "bun" ? "bunx clawmux" : "npx clawmux";
121272
+ const runtime = detectInstallMethod();
121273
+ return runtime === "bun" ? `${resolveBinPath("bunx")} clawmux@latest` : `${resolveBinPath("npx")} clawmux@latest`;
121266
121274
  }
121267
121275
  return bin;
121268
121276
  } catch {
121269
- return detectInstallMethod() === "bun" ? "bunx clawmux" : "npx clawmux";
121277
+ const runtime = detectInstallMethod();
121278
+ return runtime === "bun" ? `${resolveBinPath("bunx")} clawmux@latest` : `${resolveBinPath("npx")} clawmux@latest`;
121270
121279
  }
121271
121280
  }
121272
121281
  function getHomeDir3() {
@@ -121277,6 +121286,14 @@ var SYSTEMD_PATH = import_node_path7.join(SYSTEMD_DIR, `${SERVICE_NAME}.service`
121277
121286
  var LAUNCHD_DIR = import_node_path7.join(getHomeDir3(), "Library", "LaunchAgents");
121278
121287
  var LAUNCHD_PATH = import_node_path7.join(LAUNCHD_DIR, `com.${SERVICE_NAME}.plist`);
121279
121288
  function buildSystemdUnit(bin, port, workDir) {
121289
+ const userPaths = [
121290
+ import_node_path7.join(getHomeDir3(), ".bun", "bin"),
121291
+ import_node_path7.join(getHomeDir3(), ".local", "bin"),
121292
+ import_node_path7.join(getHomeDir3(), ".npm-global", "bin"),
121293
+ "/usr/local/bin",
121294
+ "/usr/bin",
121295
+ "/bin"
121296
+ ].join(":");
121280
121297
  return `[Unit]
121281
121298
  Description=ClawMux - Smart model routing proxy
121282
121299
  After=network.target
@@ -121288,6 +121305,7 @@ WorkingDirectory=${workDir}
121288
121305
  Restart=on-failure
121289
121306
  RestartSec=5
121290
121307
  Environment=CLAWMUX_PORT=${port}
121308
+ Environment=PATH=${userPaths}
121291
121309
 
121292
121310
  [Install]
121293
121311
  WantedBy=default.target
package/dist/index.cjs CHANGED
@@ -112238,7 +112238,7 @@ __export(exports_src2, {
112238
112238
  module.exports = __toCommonJS(exports_src2);
112239
112239
 
112240
112240
  // src/proxy/router.ts
112241
- var VERSION = process.env.npm_package_version ?? "0.3.11";
112241
+ var VERSION = process.env.npm_package_version ?? "0.3.13";
112242
112242
  function jsonResponse(body, status = 200) {
112243
112243
  return new Response(JSON.stringify(body), {
112244
112244
  status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmux",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "Smart model routing + context compression proxy for OpenClaw",
5
5
  "type": "module",
6
6
  "bin": {