@sjawhar/claude-envoy 4.10.0 → 4.11.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.
@@ -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.10.0"
5
+ "version": "4.11.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
@@ -18516,6 +18516,7 @@ var SUBJECT_TOKEN_TYPE_PERSON = "urn:envoy:params:oauth:token-type:person-google
18516
18516
  var ACTOR_TOKEN_TYPE_MACHINE = "urn:envoy:params:oauth:token-type:machine-google-identity";
18517
18517
  var TOKEN_TYPE_DPOP = "DPoP";
18518
18518
  var POD_SESSION_NOT_REGISTERED = "pod_session_not_registered";
18519
+ var SESSION_NAME_NOT_THIS_REGISTRARS = "session_name_not_this_registrars";
18519
18520
 
18520
18521
  // ../broker-client/src/refusal-text.ts
18521
18522
  var KNOWN_BROKER_REFUSALS = new Set([
@@ -18620,6 +18621,9 @@ var KNOWN_BROKER_REFUSAL_PATTERNS = [
18620
18621
  `The session name '${SESSION_SLOT}' belongs to another identity: one the broker's configuration fixes it for, or one that has written under it within the last [0-9]{1,4} days\\. Ask under a name of your own\\.`,
18621
18622
  `No registration says this pod may write under the session name '${SESSION_SLOT}'\\. A pod writes under a session name its deployment registered for it\\.`,
18622
18623
  `Refused: this pod's registration for session '${SESSION_SLOT}' is bound to another key; a role trades only for its own session\\.`,
18624
+ `Refused: this pod's registration for session '${SESSION_SLOT}' was released; a pod trades only under a registration its registrar has not released\\.`,
18625
+ `The session name '${SESSION_SLOT}' belongs to another daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
18626
+ `The session name '${SESSION_SLOT}' is bound to no daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
18623
18627
  `${PERSON_SLOT}'s credentials are held by Dispatch; they work again when \\k<person> signs in to Dispatch, or when Dispatch can confirm \\k<person> with Google again`,
18624
18628
  ...POLICY_REFUSAL_PATTERNS
18625
18629
  ].map((source) => new RegExp(`^${source}$`));
@@ -18630,14 +18634,16 @@ var LIBRARY_DESCRIPTIONS = [
18630
18634
  "The authorization server encountered an unexpected condition that prevented it from fulfilling the request."
18631
18635
  ];
18632
18636
  var REFUSAL_CODE_PREFIX = /^[A-Z][A-Z_]{1,63}: /;
18637
+ var CODE_PREFIXES = [POD_SESSION_NOT_REGISTERED, SESSION_NAME_NOT_THIS_REGISTRARS].map((code) => `${code}: `);
18633
18638
  function brokerHint(text) {
18634
18639
  for (const fixed of LIBRARY_DESCRIPTIONS) {
18635
18640
  if (text.startsWith(`${fixed} `))
18636
18641
  return text.slice(fixed.length + 1);
18637
18642
  }
18638
- const pod = `${POD_SESSION_NOT_REGISTERED}: `;
18639
- if (text.startsWith(pod))
18640
- return text.slice(pod.length);
18643
+ for (const prefix of CODE_PREFIXES) {
18644
+ if (text.startsWith(prefix))
18645
+ return text.slice(prefix.length);
18646
+ }
18641
18647
  return text.replace(REFUSAL_CODE_PREFIX, "");
18642
18648
  }
18643
18649
  function isKnownBrokerRefusal(text, context = {}) {
package/dist/dispatch.js CHANGED
@@ -18769,6 +18769,7 @@ var SUBJECT_TOKEN_TYPE_PERSON = "urn:envoy:params:oauth:token-type:person-google
18769
18769
  var ACTOR_TOKEN_TYPE_MACHINE = "urn:envoy:params:oauth:token-type:machine-google-identity";
18770
18770
  var TOKEN_TYPE_DPOP = "DPoP";
18771
18771
  var POD_SESSION_NOT_REGISTERED = "pod_session_not_registered";
18772
+ var SESSION_NAME_NOT_THIS_REGISTRARS = "session_name_not_this_registrars";
18772
18773
 
18773
18774
  // ../broker-client/src/refusal-text.ts
18774
18775
  var KNOWN_BROKER_REFUSALS = new Set([
@@ -18873,6 +18874,9 @@ var KNOWN_BROKER_REFUSAL_PATTERNS = [
18873
18874
  `The session name '${SESSION_SLOT}' belongs to another identity: one the broker's configuration fixes it for, or one that has written under it within the last [0-9]{1,4} days\\. Ask under a name of your own\\.`,
18874
18875
  `No registration says this pod may write under the session name '${SESSION_SLOT}'\\. A pod writes under a session name its deployment registered for it\\.`,
18875
18876
  `Refused: this pod's registration for session '${SESSION_SLOT}' is bound to another key; a role trades only for its own session\\.`,
18877
+ `Refused: this pod's registration for session '${SESSION_SLOT}' was released; a pod trades only under a registration its registrar has not released\\.`,
18878
+ `The session name '${SESSION_SLOT}' belongs to another daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
18879
+ `The session name '${SESSION_SLOT}' is bound to no daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
18876
18880
  `${PERSON_SLOT}'s credentials are held by Dispatch; they work again when \\k<person> signs in to Dispatch, or when Dispatch can confirm \\k<person> with Google again`,
18877
18881
  ...POLICY_REFUSAL_PATTERNS
18878
18882
  ].map((source) => new RegExp(`^${source}$`));
@@ -18883,14 +18887,16 @@ var LIBRARY_DESCRIPTIONS = [
18883
18887
  "The authorization server encountered an unexpected condition that prevented it from fulfilling the request."
18884
18888
  ];
18885
18889
  var REFUSAL_CODE_PREFIX = /^[A-Z][A-Z_]{1,63}: /;
18890
+ var CODE_PREFIXES = [POD_SESSION_NOT_REGISTERED, SESSION_NAME_NOT_THIS_REGISTRARS].map((code) => `${code}: `);
18886
18891
  function brokerHint(text) {
18887
18892
  for (const fixed of LIBRARY_DESCRIPTIONS) {
18888
18893
  if (text.startsWith(`${fixed} `))
18889
18894
  return text.slice(fixed.length + 1);
18890
18895
  }
18891
- const pod = `${POD_SESSION_NOT_REGISTERED}: `;
18892
- if (text.startsWith(pod))
18893
- return text.slice(pod.length);
18896
+ for (const prefix of CODE_PREFIXES) {
18897
+ if (text.startsWith(prefix))
18898
+ return text.slice(prefix.length);
18899
+ }
18894
18900
  return text.replace(REFUSAL_CODE_PREFIX, "");
18895
18901
  }
18896
18902
  function isKnownBrokerRefusal(text, context = {}) {
@@ -40461,6 +40461,7 @@ var SUBJECT_TOKEN_TYPE_PERSON = "urn:envoy:params:oauth:token-type:person-google
40461
40461
  var ACTOR_TOKEN_TYPE_MACHINE = "urn:envoy:params:oauth:token-type:machine-google-identity";
40462
40462
  var TOKEN_TYPE_DPOP = "DPoP";
40463
40463
  var POD_SESSION_NOT_REGISTERED = "pod_session_not_registered";
40464
+ var SESSION_NAME_NOT_THIS_REGISTRARS = "session_name_not_this_registrars";
40464
40465
 
40465
40466
  // ../broker-client/src/metadata-identity.ts
40466
40467
  var METADATA_HOST_VAR = "GCE_METADATA_HOST";
@@ -41863,6 +41864,9 @@ var KNOWN_BROKER_REFUSAL_PATTERNS = [
41863
41864
  `The session name '${SESSION_SLOT}' belongs to another identity: one the broker's configuration fixes it for, or one that has written under it within the last [0-9]{1,4} days\\. Ask under a name of your own\\.`,
41864
41865
  `No registration says this pod may write under the session name '${SESSION_SLOT}'\\. A pod writes under a session name its deployment registered for it\\.`,
41865
41866
  `Refused: this pod's registration for session '${SESSION_SLOT}' is bound to another key; a role trades only for its own session\\.`,
41867
+ `Refused: this pod's registration for session '${SESSION_SLOT}' was released; a pod trades only under a registration its registrar has not released\\.`,
41868
+ `The session name '${SESSION_SLOT}' belongs to another daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
41869
+ `The session name '${SESSION_SLOT}' is bound to no daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
41866
41870
  `${PERSON_SLOT}'s credentials are held by Dispatch; they work again when \\k<person> signs in to Dispatch, or when Dispatch can confirm \\k<person> with Google again`,
41867
41871
  ...POLICY_REFUSAL_PATTERNS
41868
41872
  ].map((source) => new RegExp(`^${source}$`));
@@ -41873,14 +41877,16 @@ var LIBRARY_DESCRIPTIONS = [
41873
41877
  "The authorization server encountered an unexpected condition that prevented it from fulfilling the request."
41874
41878
  ];
41875
41879
  var REFUSAL_CODE_PREFIX = /^[A-Z][A-Z_]{1,63}: /;
41880
+ var CODE_PREFIXES = [POD_SESSION_NOT_REGISTERED, SESSION_NAME_NOT_THIS_REGISTRARS].map((code) => `${code}: `);
41876
41881
  function brokerHint(text) {
41877
41882
  for (const fixed of LIBRARY_DESCRIPTIONS) {
41878
41883
  if (text.startsWith(`${fixed} `))
41879
41884
  return text.slice(fixed.length + 1);
41880
41885
  }
41881
- const pod = `${POD_SESSION_NOT_REGISTERED}: `;
41882
- if (text.startsWith(pod))
41883
- return text.slice(pod.length);
41886
+ for (const prefix of CODE_PREFIXES) {
41887
+ if (text.startsWith(prefix))
41888
+ return text.slice(prefix.length);
41889
+ }
41884
41890
  return text.replace(REFUSAL_CODE_PREFIX, "");
41885
41891
  }
41886
41892
  function isKnownBrokerRefusal(text, context = {}) {
@@ -58380,7 +58386,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
58380
58386
 
58381
58387
  // package.json
58382
58388
  var name2 = "@sjawhar/claude-envoy";
58383
- var version2 = "4.10.0";
58389
+ var version2 = "4.11.0";
58384
58390
  var legion = {
58385
58391
  daemonApiVersion: 168
58386
58392
  };
@@ -18517,6 +18517,7 @@ var SUBJECT_TOKEN_TYPE_PERSON = "urn:envoy:params:oauth:token-type:person-google
18517
18517
  var ACTOR_TOKEN_TYPE_MACHINE = "urn:envoy:params:oauth:token-type:machine-google-identity";
18518
18518
  var TOKEN_TYPE_DPOP = "DPoP";
18519
18519
  var POD_SESSION_NOT_REGISTERED = "pod_session_not_registered";
18520
+ var SESSION_NAME_NOT_THIS_REGISTRARS = "session_name_not_this_registrars";
18520
18521
 
18521
18522
  // ../broker-client/src/refusal-text.ts
18522
18523
  var KNOWN_BROKER_REFUSALS = new Set([
@@ -18621,6 +18622,9 @@ var KNOWN_BROKER_REFUSAL_PATTERNS = [
18621
18622
  `The session name '${SESSION_SLOT}' belongs to another identity: one the broker's configuration fixes it for, or one that has written under it within the last [0-9]{1,4} days\\. Ask under a name of your own\\.`,
18622
18623
  `No registration says this pod may write under the session name '${SESSION_SLOT}'\\. A pod writes under a session name its deployment registered for it\\.`,
18623
18624
  `Refused: this pod's registration for session '${SESSION_SLOT}' is bound to another key; a role trades only for its own session\\.`,
18625
+ `Refused: this pod's registration for session '${SESSION_SLOT}' was released; a pod trades only under a registration its registrar has not released\\.`,
18626
+ `The session name '${SESSION_SLOT}' belongs to another daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
18627
+ `The session name '${SESSION_SLOT}' is bound to no daemon: a pod trades only under a session name the daemon that registered it holds\\.`,
18624
18628
  `${PERSON_SLOT}'s credentials are held by Dispatch; they work again when \\k<person> signs in to Dispatch, or when Dispatch can confirm \\k<person> with Google again`,
18625
18629
  ...POLICY_REFUSAL_PATTERNS
18626
18630
  ].map((source) => new RegExp(`^${source}$`));
@@ -18631,14 +18635,16 @@ var LIBRARY_DESCRIPTIONS = [
18631
18635
  "The authorization server encountered an unexpected condition that prevented it from fulfilling the request."
18632
18636
  ];
18633
18637
  var REFUSAL_CODE_PREFIX = /^[A-Z][A-Z_]{1,63}: /;
18638
+ var CODE_PREFIXES = [POD_SESSION_NOT_REGISTERED, SESSION_NAME_NOT_THIS_REGISTRARS].map((code) => `${code}: `);
18634
18639
  function brokerHint(text) {
18635
18640
  for (const fixed of LIBRARY_DESCRIPTIONS) {
18636
18641
  if (text.startsWith(`${fixed} `))
18637
18642
  return text.slice(fixed.length + 1);
18638
18643
  }
18639
- const pod = `${POD_SESSION_NOT_REGISTERED}: `;
18640
- if (text.startsWith(pod))
18641
- return text.slice(pod.length);
18644
+ for (const prefix of CODE_PREFIXES) {
18645
+ if (text.startsWith(prefix))
18646
+ return text.slice(prefix.length);
18647
+ }
18642
18648
  return text.replace(REFUSAL_CODE_PREFIX, "");
18643
18649
  }
18644
18650
  function isKnownBrokerRefusal(text, context = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",