@sjawhar/claude-envoy 1.32.1 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/dispatch.js +15 -22
- package/dist/envoy-channel.js +2189 -2196
- package/dist/session-hook.js +14 -21
- package/legion/skills/legion-worker/references/tools.md +4 -2
- package/package.json +1 -1
package/.omp-plugin/plugin.json
CHANGED
package/dist/dispatch.js
CHANGED
|
@@ -17725,6 +17725,14 @@ async function resolveOrigin(env, exec, cwd) {
|
|
|
17725
17725
|
return origin;
|
|
17726
17726
|
}
|
|
17727
17727
|
|
|
17728
|
+
// ../contracts/src/trailing-slash.ts
|
|
17729
|
+
function withoutTrailingSlashes(url) {
|
|
17730
|
+
let end = url.length;
|
|
17731
|
+
while (end > 0 && url[end - 1] === "/")
|
|
17732
|
+
end -= 1;
|
|
17733
|
+
return url.slice(0, end);
|
|
17734
|
+
}
|
|
17735
|
+
|
|
17728
17736
|
// ../envoy-client/src/dispatch-http.ts
|
|
17729
17737
|
class DispatchServiceError extends Error {
|
|
17730
17738
|
code;
|
|
@@ -18033,7 +18041,7 @@ class DispatchClient {
|
|
|
18033
18041
|
this.fetchImpl = fetchImpl;
|
|
18034
18042
|
this.writeRetry = writeRetry;
|
|
18035
18043
|
this.#credential = credential;
|
|
18036
|
-
this.#baseUrl = baseUrl
|
|
18044
|
+
this.#baseUrl = withoutTrailingSlashes(baseUrl);
|
|
18037
18045
|
this.#signal = requestSignal(signal);
|
|
18038
18046
|
this.#madeAt = this.#now();
|
|
18039
18047
|
}
|
|
@@ -27322,12 +27330,6 @@ function statusOf(error) {
|
|
|
27322
27330
|
}
|
|
27323
27331
|
return 0;
|
|
27324
27332
|
}
|
|
27325
|
-
function withoutTrailingSlashes(url) {
|
|
27326
|
-
let end = url.length;
|
|
27327
|
-
while (end > 0 && url[end - 1] === "/")
|
|
27328
|
-
end -= 1;
|
|
27329
|
-
return url.slice(0, end);
|
|
27330
|
-
}
|
|
27331
27333
|
|
|
27332
27334
|
class BrokerTokenClient {
|
|
27333
27335
|
#brokerUrl;
|
|
@@ -27608,12 +27610,6 @@ function brokerCredential(env, session) {
|
|
|
27608
27610
|
|
|
27609
27611
|
// ../envoy-client/src/dispatch-config.ts
|
|
27610
27612
|
var DEFAULT_SERVER_URL = "http://localhost:8766";
|
|
27611
|
-
function withoutTrailingSlashes2(url) {
|
|
27612
|
-
let end = url.length;
|
|
27613
|
-
while (end > 0 && url[end - 1] === "/")
|
|
27614
|
-
end -= 1;
|
|
27615
|
-
return url.slice(0, end);
|
|
27616
|
-
}
|
|
27617
27613
|
function checkoutPair(checkout, serverUrl) {
|
|
27618
27614
|
const { token } = checkout.dispatch;
|
|
27619
27615
|
if (token === undefined) {
|
|
@@ -27675,7 +27671,7 @@ function dispatchSettings(env, config, options = {}) {
|
|
|
27675
27671
|
enabled: true,
|
|
27676
27672
|
url,
|
|
27677
27673
|
credential,
|
|
27678
|
-
...publicUrl === undefined ? {} : { publicUrl: publicUrl
|
|
27674
|
+
...publicUrl === undefined ? {} : { publicUrl: withoutTrailingSlashes(publicUrl) }
|
|
27679
27675
|
};
|
|
27680
27676
|
}
|
|
27681
27677
|
function dispatchUrl(env, config) {
|
|
@@ -27735,7 +27731,7 @@ function dispatchTarget(env, config) {
|
|
|
27735
27731
|
return offWithError(messageFor(error));
|
|
27736
27732
|
}
|
|
27737
27733
|
if (route.traded) {
|
|
27738
|
-
const brokered =
|
|
27734
|
+
const brokered = withoutTrailingSlashes(explicitUrl ?? own.serverUrl ?? DEFAULT_SERVER_URL);
|
|
27739
27735
|
return { enabled: true, url: brokered, source: { kind: "broker" } };
|
|
27740
27736
|
}
|
|
27741
27737
|
if (forced) {
|
|
@@ -27743,7 +27739,7 @@ function dispatchTarget(env, config) {
|
|
|
27743
27739
|
}
|
|
27744
27740
|
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}`);
|
|
27745
27741
|
}
|
|
27746
|
-
const url = (explicitUrl ?? (source.kind === "file" ? source.server : own.serverUrl ?? DEFAULT_SERVER_URL))
|
|
27742
|
+
const url = withoutTrailingSlashes(explicitUrl ?? (source.kind === "file" ? source.server : own.serverUrl ?? DEFAULT_SERVER_URL));
|
|
27747
27743
|
return { enabled: true, url, source };
|
|
27748
27744
|
}
|
|
27749
27745
|
function activeDispatchSettings(resolution) {
|
|
@@ -27800,7 +27796,7 @@ function natsServerKey(url) {
|
|
|
27800
27796
|
if (match === null)
|
|
27801
27797
|
return url;
|
|
27802
27798
|
const [, scheme = "", userinfo = "", host = "", port = "4222", rest = ""] = match;
|
|
27803
|
-
return `${scheme.toLowerCase()}://${userinfo}${host.toLowerCase()}:${port}${rest
|
|
27799
|
+
return `${scheme.toLowerCase()}://${userinfo}${host.toLowerCase()}:${port}${withoutTrailingSlashes(rest)}`;
|
|
27804
27800
|
}
|
|
27805
27801
|
function natsCredential(env, section, namedNatsUrls, filePath) {
|
|
27806
27802
|
const fromEnvironment = natsSeedFromEnvironment(env);
|
|
@@ -27871,7 +27867,7 @@ function envoySettings(env, config, options = {}) {
|
|
|
27871
27867
|
const namedPassDeadlineMs = namedInterval(env.ENVOY_PASS_DEADLINE_MS);
|
|
27872
27868
|
return {
|
|
27873
27869
|
enabled: true,
|
|
27874
|
-
url:
|
|
27870
|
+
url: withoutTrailingSlashes(url),
|
|
27875
27871
|
credential,
|
|
27876
27872
|
inbound,
|
|
27877
27873
|
heartbeatMs,
|
|
@@ -27880,9 +27876,6 @@ function envoySettings(env, config, options = {}) {
|
|
|
27880
27876
|
passDeadlineRaisedFrom: namedPassDeadlineMs !== undefined && namedPassDeadlineMs < heartbeatMs ? namedPassDeadlineMs : undefined
|
|
27881
27877
|
};
|
|
27882
27878
|
}
|
|
27883
|
-
function normalizeEnvoyUrl(value) {
|
|
27884
|
-
return value.replace(/\/+$/, "");
|
|
27885
|
-
}
|
|
27886
27879
|
|
|
27887
27880
|
// ../envoy-client/src/session-settings.ts
|
|
27888
27881
|
function sessionConfigFile(harness, env) {
|
|
@@ -28223,7 +28216,7 @@ function resolveCallTiming(config) {
|
|
|
28223
28216
|
};
|
|
28224
28217
|
}
|
|
28225
28218
|
function createEnvoyClient(config) {
|
|
28226
|
-
const baseUrl =
|
|
28219
|
+
const baseUrl = withoutTrailingSlashes(config.baseUrl);
|
|
28227
28220
|
const { timeoutMs, attempts, retryDelayMs } = resolveCallTiming(config);
|
|
28228
28221
|
const credential = config.credential;
|
|
28229
28222
|
const attemptOnce = async (url, init, deadlineMs, actingSession) => {
|