@bulletproof-sh/ctrl-daemon 0.0.10 → 0.0.12

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4384,7 +4384,7 @@ function buildWebUrl(port, host) {
4384
4384
  if (port === DEFAULT_WS_PORT)
4385
4385
  return WEB_APP_BASE_URL;
4386
4386
  const wsUrl = `ws://${host}:${port}/ws`;
4387
- return `${WEB_APP_BASE_URL}?daemon=${encodeURIComponent(wsUrl)}`;
4387
+ return `${WEB_APP_BASE_URL}?daemon=${wsUrl}`;
4388
4388
  }
4389
4389
  function printReady(port, host, version2, updateMsg) {
4390
4390
  const versionStr = version2 ? ` ${DM}v${version2}${RS}` : "";
@@ -5087,7 +5087,9 @@ function createServer({ port, host, agents }) {
5087
5087
  try {
5088
5088
  return Bun.serve(makeServerConfig(boundPort));
5089
5089
  } catch (err) {
5090
- const isAddrInUse = err instanceof Error && (err.message.includes("EADDRINUSE") || err.message.includes("address already in use"));
5090
+ const errCode = err.code ?? "";
5091
+ const errMsg = err instanceof Error ? err.message : "";
5092
+ const isAddrInUse = errCode === "EADDRINUSE" || errMsg.includes("EADDRINUSE") || errMsg.includes("address already in use");
5091
5093
  if (!isAddrInUse || attempt === PORT_RETRY_LIMIT - 1)
5092
5094
  throw err;
5093
5095
  boundPort++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bulletproof-sh/ctrl-daemon",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "WebSocket daemon for ctrl — watches Claude Code sessions and broadcasts agent state",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",