@sjawhar/claude-envoy 1.32.2 → 1.33.0
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/package.json +1 -1
- package/skills/agent-secrets/SKILL.md +5 -1
package/dist/session-hook.js
CHANGED
|
@@ -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
|
|
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
|
|
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 =
|
|
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))
|
|
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
|
|
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:
|
|
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
|
@@ -24,7 +24,11 @@ agent-secrets NAME... [--reason TEXT] [--wait DURATION] [--ttl DURATION] -- <com
|
|
|
24
24
|
approver can decide on, and name in it the issue you work on, by its key (below). A request
|
|
25
25
|
every name of which is granted at once reaches nobody and needs none.
|
|
26
26
|
- `agent-secrets --help` holds the rest: the flags that narrow a GitHub App token
|
|
27
|
-
(`--github-owner`, `--github-repo`, `--github-read-only`),
|
|
27
|
+
(`--github-owner`, `--github-repo`, `--github-read-only`), the flag that hands the token over
|
|
28
|
+
alone (`--github-token`), and how long a grant lasts. With `--github-owner` and
|
|
29
|
+
`--github-token`, the secret's name holds that one account's token, the string an
|
|
30
|
+
`Authorization` header carries. Without `--github-token` the name holds the JSON object of
|
|
31
|
+
installations, and a command that sends that object to GitHub reads `401`.
|
|
28
32
|
- A narrowing and the airlock do not go together. Ask for a narrowing in a run whose grant holds
|
|
29
33
|
a secret behind the airlock (below) and the broker refuses the release, naming that secret;
|
|
30
34
|
nothing runs. Ask for the GitHub App secret in a run of its own, with no airlocked name beside
|