@sjawhar/claude-envoy 1.32.2 → 1.32.3

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.
@@ -16729,6 +16729,14 @@ async function resolveOrigin(env, exec, cwd) {
16729
16729
  return origin;
16730
16730
  }
16731
16731
 
16732
+ // ../contracts/src/trailing-slash.ts
16733
+ function withoutTrailingSlashes(url) {
16734
+ let end = url.length;
16735
+ while (end > 0 && url[end - 1] === "/")
16736
+ end -= 1;
16737
+ return url.slice(0, end);
16738
+ }
16739
+
16732
16740
  // ../envoy-client/src/dispatch-http.ts
16733
16741
  class DispatchServiceError extends Error {
16734
16742
  code;
@@ -17037,7 +17045,7 @@ class DispatchClient {
17037
17045
  this.fetchImpl = fetchImpl;
17038
17046
  this.writeRetry = writeRetry;
17039
17047
  this.#credential = credential;
17040
- this.#baseUrl = baseUrl.replace(/\/+$/, "");
17048
+ this.#baseUrl = withoutTrailingSlashes(baseUrl);
17041
17049
  this.#signal = requestSignal(signal);
17042
17050
  this.#madeAt = this.#now();
17043
17051
  }
@@ -26201,12 +26209,6 @@ function statusOf(error) {
26201
26209
  }
26202
26210
  return 0;
26203
26211
  }
26204
- function withoutTrailingSlashes(url) {
26205
- let end = url.length;
26206
- while (end > 0 && url[end - 1] === "/")
26207
- end -= 1;
26208
- return url.slice(0, end);
26209
- }
26210
26212
 
26211
26213
  class BrokerTokenClient {
26212
26214
  #brokerUrl;
@@ -26487,12 +26489,6 @@ function brokerCredential(env, session) {
26487
26489
 
26488
26490
  // ../envoy-client/src/dispatch-config.ts
26489
26491
  var DEFAULT_SERVER_URL = "http://localhost:8766";
26490
- function withoutTrailingSlashes2(url) {
26491
- let end = url.length;
26492
- while (end > 0 && url[end - 1] === "/")
26493
- end -= 1;
26494
- return url.slice(0, end);
26495
- }
26496
26492
  function checkoutPair(checkout, serverUrl) {
26497
26493
  const { token } = checkout.dispatch;
26498
26494
  if (token === undefined) {
@@ -26554,7 +26550,7 @@ function dispatchSettings(env, config, options = {}) {
26554
26550
  enabled: true,
26555
26551
  url,
26556
26552
  credential,
26557
- ...publicUrl === undefined ? {} : { publicUrl: publicUrl.replace(/\/+$/, "") }
26553
+ ...publicUrl === undefined ? {} : { publicUrl: withoutTrailingSlashes(publicUrl) }
26558
26554
  };
26559
26555
  }
26560
26556
  function dispatchUrl(env, config) {
@@ -26614,7 +26610,7 @@ function dispatchTarget(env, config) {
26614
26610
  return offWithError(messageFor(error));
26615
26611
  }
26616
26612
  if (route.traded) {
26617
- const brokered = withoutTrailingSlashes2(explicitUrl ?? own.serverUrl ?? DEFAULT_SERVER_URL);
26613
+ const brokered = withoutTrailingSlashes(explicitUrl ?? own.serverUrl ?? DEFAULT_SERVER_URL);
26618
26614
  return { enabled: true, url: brokered, source: { kind: "broker" } };
26619
26615
  }
26620
26616
  if (forced) {
@@ -26622,7 +26618,7 @@ function dispatchTarget(env, config) {
26622
26618
  }
26623
26619
  return offWithError(explicitUrl === undefined ? `${config.path}: dispatch is enabled and no token is: set dispatch.token, or DISPATCH_TOKEN or DISPATCH_TOKEN_FILE` : `DISPATCH_URL is set and no token is: set DISPATCH_TOKEN or DISPATCH_TOKEN_FILE, or dispatch.token in ${config.path}`);
26624
26620
  }
26625
- const url = (explicitUrl ?? (source.kind === "file" ? source.server : own.serverUrl ?? DEFAULT_SERVER_URL)).replace(/\/+$/, "");
26621
+ const url = withoutTrailingSlashes(explicitUrl ?? (source.kind === "file" ? source.server : own.serverUrl ?? DEFAULT_SERVER_URL));
26626
26622
  return { enabled: true, url, source };
26627
26623
  }
26628
26624
  function activeDispatchSettings(resolution) {
@@ -26679,7 +26675,7 @@ function natsServerKey(url) {
26679
26675
  if (match === null)
26680
26676
  return url;
26681
26677
  const [, scheme = "", userinfo = "", host = "", port = "4222", rest = ""] = match;
26682
- return `${scheme.toLowerCase()}://${userinfo}${host.toLowerCase()}:${port}${rest.replace(/\/+$/, "")}`;
26678
+ return `${scheme.toLowerCase()}://${userinfo}${host.toLowerCase()}:${port}${withoutTrailingSlashes(rest)}`;
26683
26679
  }
26684
26680
  function natsCredential(env, section, namedNatsUrls, filePath) {
26685
26681
  const fromEnvironment = natsSeedFromEnvironment(env);
@@ -26750,7 +26746,7 @@ function envoySettings(env, config, options = {}) {
26750
26746
  const namedPassDeadlineMs = namedInterval(env.ENVOY_PASS_DEADLINE_MS);
26751
26747
  return {
26752
26748
  enabled: true,
26753
- url: normalizeEnvoyUrl(url),
26749
+ url: withoutTrailingSlashes(url),
26754
26750
  credential,
26755
26751
  inbound,
26756
26752
  heartbeatMs,
@@ -26759,9 +26755,6 @@ function envoySettings(env, config, options = {}) {
26759
26755
  passDeadlineRaisedFrom: namedPassDeadlineMs !== undefined && namedPassDeadlineMs < heartbeatMs ? namedPassDeadlineMs : undefined
26760
26756
  };
26761
26757
  }
26762
- function normalizeEnvoyUrl(value) {
26763
- return value.replace(/\/+$/, "");
26764
- }
26765
26758
 
26766
26759
  // ../envoy-client/src/session-settings.ts
26767
26760
  function sessionConfigFile(harness, env) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "1.32.2",
3
+ "version": "1.32.3",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",