claude-b 0.4.0 → 0.4.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.
@@ -1448,13 +1448,16 @@ var RemoteClient = class extends EventEmitter2 {
1448
1448
  const timeoutId = setTimeout(() => controller.abort(), timeout);
1449
1449
  try {
1450
1450
  const start = Date.now();
1451
+ const headers = {
1452
+ "Authorization": `Bearer ${token}`
1453
+ };
1454
+ if (body !== void 0) {
1455
+ headers["Content-Type"] = "application/json";
1456
+ }
1451
1457
  const response = await fetch(`${this.host.url}${path}`, {
1452
1458
  method,
1453
- headers: {
1454
- "Authorization": `Bearer ${token}`,
1455
- "Content-Type": "application/json"
1456
- },
1457
- body: body ? JSON.stringify(body) : void 0,
1459
+ headers,
1460
+ body: body !== void 0 ? JSON.stringify(body) : void 0,
1458
1461
  signal: controller.signal
1459
1462
  });
1460
1463
  const latency = Date.now() - start;
@@ -1499,9 +1502,9 @@ var RemoteClient = class extends EventEmitter2 {
1499
1502
  const result = await this.request(
1500
1503
  "POST",
1501
1504
  "/api/sessions",
1502
- name ? { name } : void 0
1505
+ name ? { name } : {}
1503
1506
  );
1504
- return { ...result.session, host: this.host.id };
1507
+ return { ...result, host: this.host.id };
1505
1508
  }
1506
1509
  async getSession(sessionId) {
1507
1510
  try {
@@ -1509,7 +1512,7 @@ var RemoteClient = class extends EventEmitter2 {
1509
1512
  "GET",
1510
1513
  `/api/sessions/${sessionId}`
1511
1514
  );
1512
- return { ...result.session, host: this.host.id };
1515
+ return { ...result, host: this.host.id };
1513
1516
  } catch {
1514
1517
  return null;
1515
1518
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-b",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Background-capable Claude Code with async workflows and REST API",
5
5
  "type": "module",
6
6
  "main": "dist/cli/index.js",