@sjawhar/claude-envoy 4.15.4 → 4.16.1

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.
@@ -2,5 +2,5 @@
2
2
  "name": "claude-envoy",
3
3
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
4
4
  "mcpServers": "./.mcp.json",
5
- "version": "4.15.4"
5
+ "version": "4.16.1"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "4.15.4",
3
+ "version": "4.16.1",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
package/bin/envoy-send.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { isFinalRefusal } from "@legion/broker-client/token-errors"
1
+ import { isFinalRefusal } from "@legion/cipher-client/token-errors"
2
2
  import { holdUrlUserinfo, scrub, scrubProcessStreams } from "@legion/contracts/held-secrets"
3
3
  import { URL_NOT_PRINTED } from "@legion/contracts/log-text"
4
4
  import { messageFor } from "@legion/envoy-client/errors"
@@ -18537,7 +18537,7 @@ function askAnswerText(answer) {
18537
18537
  return `${selected} - ${text}`;
18538
18538
  }
18539
18539
 
18540
- // ../broker-client/src/wire.ts
18540
+ // ../cipher-client/src/wire.ts
18541
18541
  var TOKEN_PATH = "/v1/oauth/token";
18542
18542
  var GRANT_TYPE_TOKEN_EXCHANGE = "urn:ietf:params:oauth:grant-type:token-exchange";
18543
18543
  var EXCHANGE_CLIENT_ID = "dispatch-token-exchange";
@@ -18553,7 +18553,7 @@ var TOKEN_TYPE_DPOP = "DPoP";
18553
18553
  var POD_SESSION_NOT_REGISTERED = "pod_session_not_registered";
18554
18554
  var SESSION_NAME_NOT_THIS_REGISTRARS = "session_name_not_this_registrars";
18555
18555
 
18556
- // ../broker-client/src/refusal-text.ts
18556
+ // ../cipher-client/src/refusal-text.ts
18557
18557
  var KNOWN_BROKER_REFUSALS = new Set([
18558
18558
  "no entry lists the account this token names",
18559
18559
  "too many token requests; try again later",
@@ -18724,7 +18724,7 @@ function shownOAuthCode(code) {
18724
18724
  return KNOWN_OAUTH_ERROR_CODES.has(code) ? code : `unrecognised error code (${code.length} chars)`;
18725
18725
  }
18726
18726
 
18727
- // ../broker-client/src/signins.ts
18727
+ // ../cipher-client/src/signins.ts
18728
18728
  import { readdir, readFile } from "fs/promises";
18729
18729
  import { join } from "path";
18730
18730
 
@@ -18736,7 +18736,7 @@ function withoutTrailingSlashes(url) {
18736
18736
  return url.slice(0, end);
18737
18737
  }
18738
18738
 
18739
- // ../broker-client/src/error-text.ts
18739
+ // ../cipher-client/src/error-text.ts
18740
18740
  function messageOf(error) {
18741
18741
  return error instanceof Error ? error.message : String(error);
18742
18742
  }
@@ -18746,7 +18746,7 @@ function readErrorCode(error) {
18746
18746
  return typeof code === "string" && READ_ERROR_CODE.test(code) ? code : "an error";
18747
18747
  }
18748
18748
 
18749
- // ../broker-client/src/signins.ts
18749
+ // ../cipher-client/src/signins.ts
18750
18750
  var SIGNIN_DIR_VAR = "AGENT_SECRETS_SIGNIN_DIR";
18751
18751
  var PERSON_VAR = "AGENT_SECRETS_PERSON";
18752
18752
  var PERSON_TRADE_VAR = "PERSON_SIGNIN_TRADE";
@@ -18876,7 +18876,7 @@ async function signInFlow(env) {
18876
18876
  };
18877
18877
  }
18878
18878
 
18879
- // ../broker-client/src/token-errors.ts
18879
+ // ../cipher-client/src/token-errors.ts
18880
18880
  var TOO_MANY_REQUESTS = 429;
18881
18881
  var INVALID_DPOP_PROOF = "invalid_dpop_proof";
18882
18882
  var USE_DPOP_NONCE = "use_dpop_nonce";
@@ -26939,7 +26939,7 @@ async function executeDispatchTool(input) {
26939
26939
  return command.origin === "none" ? command.run(session) : command.run(await commandContext(session));
26940
26940
  }
26941
26941
 
26942
- // ../broker-client/src/dpop.ts
26942
+ // ../cipher-client/src/dpop.ts
26943
26943
  import {
26944
26944
  createHash,
26945
26945
  createPrivateKey,
@@ -27013,7 +27013,7 @@ async function importDpopKey(pkcs8Pem, name) {
27013
27013
  return dpopKey(privateKey, publicJwkOf(privateKey, name));
27014
27014
  }
27015
27015
 
27016
- // ../broker-client/src/metadata-identity.ts
27016
+ // ../cipher-client/src/metadata-identity.ts
27017
27017
  import { Agent, request } from "http";
27018
27018
  var METADATA_HOST_VAR = "GCE_METADATA_HOST";
27019
27019
  var DEFAULT_METADATA_HOST = "metadata.google.internal";
@@ -28312,7 +28312,7 @@ async function genericGrantRequest(config, grantType, parameters, options) {
28312
28312
  return result;
28313
28313
  }
28314
28314
 
28315
- // ../broker-client/src/token-client.ts
28315
+ // ../cipher-client/src/token-client.ts
28316
28316
  var DEFAULT_RENEW_BEFORE_MS = 5 * 60000;
28317
28317
  var BROKER_URL_SETTING = "the broker URL";
28318
28318
  var RETRY_FIRST_WAIT_MS = 15000;
@@ -28726,7 +28726,7 @@ function heldUntil(token) {
28726
28726
  }
28727
28727
  }
28728
28728
 
28729
- // ../broker-client/src/person-identity.ts
28729
+ // ../cipher-client/src/person-identity.ts
28730
28730
  var ISSUER_TIMEOUT_SECONDS = 30;
28731
28731
  var INVALID_GRANT2 = "invalid_grant";
28732
28732
  function issuerSaid(error) {
@@ -28804,7 +28804,7 @@ function personIdentity(record, flow, options = {}) {
28804
28804
  };
28805
28805
  }
28806
28806
 
28807
- // ../broker-client/src/pool-identity.ts
28807
+ // ../cipher-client/src/pool-identity.ts
28808
28808
  var DEFAULT_SECURITY_TOKEN_SERVICE_URL = "https://sts.googleapis.com/v1/token";
28809
28809
  var DEFAULT_IAM_CREDENTIALS_URL = "https://iamcredentials.googleapis.com";
28810
28810
  var REQUESTED_TOKEN_TYPE = "urn:ietf:params:oauth:token-type:access_token";
@@ -28938,7 +28938,7 @@ function poolIdentity(options) {
28938
28938
  };
28939
28939
  }
28940
28940
 
28941
- // ../broker-client/src/projected-token.ts
28941
+ // ../cipher-client/src/projected-token.ts
28942
28942
  import { readFile as readFile2 } from "fs/promises";
28943
28943
  function projectedToken(path, variable) {
28944
28944
  const named = `the projected service-account token ${variable} names`;
@@ -28962,7 +28962,7 @@ function projectedToken(path, variable) {
28962
28962
  };
28963
28963
  }
28964
28964
 
28965
- // ../broker-client/src/environment.ts
28965
+ // ../cipher-client/src/environment.ts
28966
28966
  var BROKER_URL_VAR = "AGENT_SECRETS_URL";
28967
28967
  var IDENTITY_VAR = "AGENT_SECRETS_MACHINE_IDENTITY";
28968
28968
  var MACHINE_TOKEN_FILE_VAR = "AGENT_SECRETS_MACHINE_TOKEN_FILE";
package/dist/dispatch.js CHANGED
@@ -18790,7 +18790,7 @@ function commandsHelp() {
18790
18790
  `);
18791
18791
  }
18792
18792
 
18793
- // ../broker-client/src/wire.ts
18793
+ // ../cipher-client/src/wire.ts
18794
18794
  var TOKEN_PATH = "/v1/oauth/token";
18795
18795
  var GRANT_TYPE_TOKEN_EXCHANGE = "urn:ietf:params:oauth:grant-type:token-exchange";
18796
18796
  var EXCHANGE_CLIENT_ID = "dispatch-token-exchange";
@@ -18806,7 +18806,7 @@ var TOKEN_TYPE_DPOP = "DPoP";
18806
18806
  var POD_SESSION_NOT_REGISTERED = "pod_session_not_registered";
18807
18807
  var SESSION_NAME_NOT_THIS_REGISTRARS = "session_name_not_this_registrars";
18808
18808
 
18809
- // ../broker-client/src/refusal-text.ts
18809
+ // ../cipher-client/src/refusal-text.ts
18810
18810
  var KNOWN_BROKER_REFUSALS = new Set([
18811
18811
  "no entry lists the account this token names",
18812
18812
  "too many token requests; try again later",
@@ -18977,7 +18977,7 @@ function shownOAuthCode(code) {
18977
18977
  return KNOWN_OAUTH_ERROR_CODES.has(code) ? code : `unrecognised error code (${code.length} chars)`;
18978
18978
  }
18979
18979
 
18980
- // ../broker-client/src/signins.ts
18980
+ // ../cipher-client/src/signins.ts
18981
18981
  import { readdir, readFile } from "fs/promises";
18982
18982
  import { join as join2 } from "path";
18983
18983
 
@@ -18989,7 +18989,7 @@ function withoutTrailingSlashes(url) {
18989
18989
  return url.slice(0, end);
18990
18990
  }
18991
18991
 
18992
- // ../broker-client/src/error-text.ts
18992
+ // ../cipher-client/src/error-text.ts
18993
18993
  function messageOf(error) {
18994
18994
  return error instanceof Error ? error.message : String(error);
18995
18995
  }
@@ -18999,7 +18999,7 @@ function readErrorCode(error) {
18999
18999
  return typeof code === "string" && READ_ERROR_CODE.test(code) ? code : "an error";
19000
19000
  }
19001
19001
 
19002
- // ../broker-client/src/signins.ts
19002
+ // ../cipher-client/src/signins.ts
19003
19003
  var SIGNIN_DIR_VAR = "AGENT_SECRETS_SIGNIN_DIR";
19004
19004
  var PERSON_VAR = "AGENT_SECRETS_PERSON";
19005
19005
  var PERSON_TRADE_VAR = "PERSON_SIGNIN_TRADE";
@@ -19129,7 +19129,7 @@ async function signInFlow(env) {
19129
19129
  };
19130
19130
  }
19131
19131
 
19132
- // ../broker-client/src/token-errors.ts
19132
+ // ../cipher-client/src/token-errors.ts
19133
19133
  var TOO_MANY_REQUESTS = 429;
19134
19134
  var INVALID_DPOP_PROOF = "invalid_dpop_proof";
19135
19135
  var USE_DPOP_NONCE = "use_dpop_nonce";
@@ -28190,7 +28190,7 @@ function nearestAncestorNamed(names, pid = process.pid, reader = PROC_READER) {
28190
28190
  return;
28191
28191
  }
28192
28192
 
28193
- // ../broker-client/src/dpop.ts
28193
+ // ../cipher-client/src/dpop.ts
28194
28194
  import {
28195
28195
  createHash as createHash3,
28196
28196
  createPrivateKey,
@@ -28264,7 +28264,7 @@ async function importDpopKey(pkcs8Pem, name) {
28264
28264
  return dpopKey(privateKey, publicJwkOf(privateKey, name));
28265
28265
  }
28266
28266
 
28267
- // ../broker-client/src/metadata-identity.ts
28267
+ // ../cipher-client/src/metadata-identity.ts
28268
28268
  import { Agent, request } from "http";
28269
28269
  var METADATA_HOST_VAR = "GCE_METADATA_HOST";
28270
28270
  var DEFAULT_METADATA_HOST = "metadata.google.internal";
@@ -29563,7 +29563,7 @@ async function genericGrantRequest(config, grantType, parameters, options) {
29563
29563
  return result;
29564
29564
  }
29565
29565
 
29566
- // ../broker-client/src/token-client.ts
29566
+ // ../cipher-client/src/token-client.ts
29567
29567
  var DEFAULT_RENEW_BEFORE_MS = 5 * 60000;
29568
29568
  var BROKER_URL_SETTING = "the broker URL";
29569
29569
  var RETRY_FIRST_WAIT_MS = 15000;
@@ -29977,7 +29977,7 @@ function heldUntil(token) {
29977
29977
  }
29978
29978
  }
29979
29979
 
29980
- // ../broker-client/src/person-identity.ts
29980
+ // ../cipher-client/src/person-identity.ts
29981
29981
  var ISSUER_TIMEOUT_SECONDS = 30;
29982
29982
  var INVALID_GRANT2 = "invalid_grant";
29983
29983
  function issuerSaid(error) {
@@ -30055,7 +30055,7 @@ function personIdentity(record, flow, options = {}) {
30055
30055
  };
30056
30056
  }
30057
30057
 
30058
- // ../broker-client/src/pool-identity.ts
30058
+ // ../cipher-client/src/pool-identity.ts
30059
30059
  var DEFAULT_SECURITY_TOKEN_SERVICE_URL = "https://sts.googleapis.com/v1/token";
30060
30060
  var DEFAULT_IAM_CREDENTIALS_URL = "https://iamcredentials.googleapis.com";
30061
30061
  var REQUESTED_TOKEN_TYPE = "urn:ietf:params:oauth:token-type:access_token";
@@ -30189,7 +30189,7 @@ function poolIdentity(options) {
30189
30189
  };
30190
30190
  }
30191
30191
 
30192
- // ../broker-client/src/projected-token.ts
30192
+ // ../cipher-client/src/projected-token.ts
30193
30193
  import { readFile as readFile2 } from "fs/promises";
30194
30194
  function projectedToken(path, variable) {
30195
30195
  const named = `the projected service-account token ${variable} names`;
@@ -30213,7 +30213,7 @@ function projectedToken(path, variable) {
30213
30213
  };
30214
30214
  }
30215
30215
 
30216
- // ../broker-client/src/environment.ts
30216
+ // ../cipher-client/src/environment.ts
30217
30217
  var BROKER_URL_VAR = "AGENT_SECRETS_URL";
30218
30218
  var IDENTITY_VAR = "AGENT_SECRETS_MACHINE_IDENTITY";
30219
30219
  var MACHINE_TOKEN_FILE_VAR = "AGENT_SECRETS_MACHINE_TOKEN_FILE";