mycomesh-consumer 0.1.41 → 0.1.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mycomesh-consumer",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "description": "Native Node.js MycoMesh Consumer and OpenAI-compatible request CLI.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -798,7 +798,7 @@ export class NativeConsumerState {
798
798
  for (let attempt = 0; attempt < 2; attempt += 1) {
799
799
  const child = this.tunnelSpawn(
800
800
  this.tunnelCommand,
801
- ["tunnel", "--no-autoupdate", "--url", `http://127.0.0.1:${address.port}`],
801
+ ["tunnel", "--no-autoupdate", "--protocol", "http2", "--url", `http://127.0.0.1:${address.port}`],
802
802
  { stdio: ["ignore", "pipe", "pipe"] },
803
803
  );
804
804
  share.process = child;
@@ -807,6 +807,8 @@ export class NativeConsumerState {
807
807
  break;
808
808
  } catch (error) {
809
809
  lastError = error;
810
+ await stopTunnelProcess(child);
811
+ if (share.process === child) share.process = null;
810
812
  if (this.share !== share || attempt === 1) throw error;
811
813
  await new Promise((resolve) => setTimeout(resolve, 1000));
812
814
  }
@@ -1084,7 +1086,7 @@ function waitForTunnelUrl(child) {
1084
1086
  }
1085
1087
 
1086
1088
  async function stopTunnelProcess(child) {
1087
- if (!child || child.exitCode !== null) return;
1089
+ if (!child || child.exitCode !== null || child.signalCode != null) return;
1088
1090
  await new Promise((resolve) => {
1089
1091
  let settled = false;
1090
1092
  const finish = () => {
package/src/consumer.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  createConsumerServer,
12
12
  } from "./consumer-runtime.mjs";
13
13
 
14
- export const CONSUMER_RELEASE_VERSION = "0.1.41";
14
+ export const CONSUMER_RELEASE_VERSION = "0.1.43";
15
15
  export const API_COMMANDS = new Set(["health", "models", "responses", "chat"]);
16
16
  const API_VALUE_OPTIONS = new Set([
17
17
  "--base-url",