claude-b 0.4.1 → 0.4.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.
@@ -2266,9 +2266,11 @@ var FailoverHandler = class extends EventEmitter5 {
2266
2266
  selectHosts(preferredHost, excludeHosts) {
2267
2267
  let hosts = this.clientManager.getHealthyHosts().filter((h) => !excludeHosts?.includes(h.id));
2268
2268
  if (preferredHost) {
2269
- const preferred = hosts.find((h) => h.id === preferredHost);
2269
+ const preferred = hosts.find(
2270
+ (h) => h.id === preferredHost || h.name === preferredHost
2271
+ );
2270
2272
  if (preferred) {
2271
- hosts = [preferred, ...hosts.filter((h) => h.id !== preferredHost)];
2273
+ hosts = [preferred, ...hosts.filter((h) => h.id !== preferred.id)];
2272
2274
  return hosts;
2273
2275
  }
2274
2276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-b",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Background-capable Claude Code with async workflows and REST API",
5
5
  "type": "module",
6
6
  "main": "dist/cli/index.js",