happy-coder 0.9.0-2 → 0.9.0-4

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/index.cjs CHANGED
@@ -2327,23 +2327,30 @@ class OutgoingMessageQueue {
2327
2327
  }
2328
2328
  /**
2329
2329
  * Process queue - send messages in ID order that are released
2330
+ * (Internal implementation without lock)
2330
2331
  */
2331
- async processQueue() {
2332
- await this.lock.inLock(async () => {
2333
- this.queue.sort((a, b) => a.id - b.id);
2334
- while (this.queue.length > 0) {
2335
- const item = this.queue[0];
2336
- if (!item.released) {
2337
- break;
2338
- }
2339
- if (!item.sent) {
2340
- if (item.logMessage.type !== "system") {
2341
- this.sendFunction(item.logMessage);
2342
- }
2343
- item.sent = true;
2332
+ processQueueInternal() {
2333
+ this.queue.sort((a, b) => a.id - b.id);
2334
+ while (this.queue.length > 0) {
2335
+ const item = this.queue[0];
2336
+ if (!item.released) {
2337
+ break;
2338
+ }
2339
+ if (!item.sent) {
2340
+ if (item.logMessage.type !== "system") {
2341
+ this.sendFunction(item.logMessage);
2344
2342
  }
2345
- this.queue.shift();
2343
+ item.sent = true;
2346
2344
  }
2345
+ this.queue.shift();
2346
+ }
2347
+ }
2348
+ /**
2349
+ * Process queue - send messages in ID order that are released
2350
+ */
2351
+ async processQueue() {
2352
+ await this.lock.inLock(async () => {
2353
+ this.processQueueInternal();
2347
2354
  });
2348
2355
  }
2349
2356
  /**
@@ -2358,7 +2365,7 @@ class OutgoingMessageQueue {
2358
2365
  for (const item of this.queue) {
2359
2366
  item.released = true;
2360
2367
  }
2361
- await this.processQueue();
2368
+ this.processQueueInternal();
2362
2369
  });
2363
2370
  }
2364
2371
  /**
@@ -2670,8 +2677,10 @@ async function claudeRemoteLauncher(session) {
2670
2677
  }
2671
2678
  }
2672
2679
  ongoingToolCalls.clear();
2680
+ types$1.logger.debug("[remote]: flushing message queue");
2673
2681
  await messageQueue.flush();
2674
2682
  messageQueue.destroy();
2683
+ types$1.logger.debug("[remote]: message queue flushed");
2675
2684
  abortController = null;
2676
2685
  abortFuture?.resolve(void 0);
2677
2686
  abortFuture = null;
@@ -2745,7 +2754,7 @@ async function loop(opts) {
2745
2754
  }
2746
2755
 
2747
2756
  var name = "happy-coder";
2748
- var version = "0.9.0-2";
2757
+ var version = "0.9.0-4";
2749
2758
  var description = "Claude Code session sharing CLI";
2750
2759
  var author = "Kirill Dubovitskiy";
2751
2760
  var license = "MIT";
package/dist/index.mjs CHANGED
@@ -2306,23 +2306,30 @@ class OutgoingMessageQueue {
2306
2306
  }
2307
2307
  /**
2308
2308
  * Process queue - send messages in ID order that are released
2309
+ * (Internal implementation without lock)
2309
2310
  */
2310
- async processQueue() {
2311
- await this.lock.inLock(async () => {
2312
- this.queue.sort((a, b) => a.id - b.id);
2313
- while (this.queue.length > 0) {
2314
- const item = this.queue[0];
2315
- if (!item.released) {
2316
- break;
2317
- }
2318
- if (!item.sent) {
2319
- if (item.logMessage.type !== "system") {
2320
- this.sendFunction(item.logMessage);
2321
- }
2322
- item.sent = true;
2311
+ processQueueInternal() {
2312
+ this.queue.sort((a, b) => a.id - b.id);
2313
+ while (this.queue.length > 0) {
2314
+ const item = this.queue[0];
2315
+ if (!item.released) {
2316
+ break;
2317
+ }
2318
+ if (!item.sent) {
2319
+ if (item.logMessage.type !== "system") {
2320
+ this.sendFunction(item.logMessage);
2323
2321
  }
2324
- this.queue.shift();
2322
+ item.sent = true;
2325
2323
  }
2324
+ this.queue.shift();
2325
+ }
2326
+ }
2327
+ /**
2328
+ * Process queue - send messages in ID order that are released
2329
+ */
2330
+ async processQueue() {
2331
+ await this.lock.inLock(async () => {
2332
+ this.processQueueInternal();
2326
2333
  });
2327
2334
  }
2328
2335
  /**
@@ -2337,7 +2344,7 @@ class OutgoingMessageQueue {
2337
2344
  for (const item of this.queue) {
2338
2345
  item.released = true;
2339
2346
  }
2340
- await this.processQueue();
2347
+ this.processQueueInternal();
2341
2348
  });
2342
2349
  }
2343
2350
  /**
@@ -2649,8 +2656,10 @@ async function claudeRemoteLauncher(session) {
2649
2656
  }
2650
2657
  }
2651
2658
  ongoingToolCalls.clear();
2659
+ logger.debug("[remote]: flushing message queue");
2652
2660
  await messageQueue.flush();
2653
2661
  messageQueue.destroy();
2662
+ logger.debug("[remote]: message queue flushed");
2654
2663
  abortController = null;
2655
2664
  abortFuture?.resolve(void 0);
2656
2665
  abortFuture = null;
@@ -2724,7 +2733,7 @@ async function loop(opts) {
2724
2733
  }
2725
2734
 
2726
2735
  var name = "happy-coder";
2727
- var version = "0.9.0-2";
2736
+ var version = "0.9.0-4";
2728
2737
  var description = "Claude Code session sharing CLI";
2729
2738
  var author = "Kirill Dubovitskiy";
2730
2739
  var license = "MIT";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "happy-coder",
3
- "version": "0.9.0-2",
3
+ "version": "0.9.0-4",
4
4
  "description": "Claude Code session sharing CLI",
5
5
  "author": "Kirill Dubovitskiy",
6
6
  "license": "MIT",