agent-shim 8.20.0 → 8.20.2

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/dist/cli.cjs CHANGED
@@ -61790,7 +61790,7 @@ function registerIdentityCommand(program2, deps) {
61790
61790
  // package.json
61791
61791
  var package_default = {
61792
61792
  name: "agent-shim",
61793
- version: "8.20.0",
61793
+ version: "8.20.2",
61794
61794
  description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
61795
61795
  license: "MIT",
61796
61796
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -62169,6 +62169,7 @@ var INTERNAL_HEADER_NAMES = [
62169
62169
  "x-agent-shim-hop",
62170
62170
  "x-agent-shim-hop-id",
62171
62171
  "x-headroom-project-id",
62172
+ "x-headroom-session-id",
62172
62173
  "x-headroom-base-url"
62173
62174
  ];
62174
62175
  var IDENTITY_HEADER = "x-agent-shim-identity";
@@ -62176,6 +62177,7 @@ var SESSION_HEADER = "x-agent-shim-session";
62176
62177
  var PROVIDER_HEADER = "x-agent-shim-provider";
62177
62178
  var HEADROOM_FLAG_HEADER = "x-agent-shim-headroom";
62178
62179
  var PROJECT_ID_HEADER = "x-headroom-project-id";
62180
+ var SESSION_ATTRIBUTION_HEADER = "x-headroom-session-id";
62179
62181
  var HEADROOM_BASE_URL_HEADER = "x-headroom-base-url";
62180
62182
  var AUTH_HEADER = "x-agent-shim-auth";
62181
62183
  var HOP_SECRET_HEADER = "x-agent-shim-hop";
@@ -62818,7 +62820,7 @@ function assess(member, nowMs) {
62818
62820
  return assessRefusedNested(member, nested, nowMs);
62819
62821
  }
62820
62822
  const assessment = assessIdentity(member, nowMs);
62821
- return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}": ${nested.reasons.join("; ")}`, ...assessment.candidate.reasons] } };
62823
+ return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}"`, ...nested.reasons] } };
62822
62824
  }
62823
62825
  function assessIdentity(member, nowMs) {
62824
62826
  const plan = planOf(member.account);
@@ -72230,6 +72232,9 @@ async function applyHeadroomHop(request7, response, upstream, deps) {
72230
72232
  if (request7.session.projectId !== void 0) {
72231
72233
  headers[PROJECT_ID_HEADER] = request7.session.projectId;
72232
72234
  }
72235
+ if (request7.session.sessionId !== void 0) {
72236
+ headers[SESSION_ATTRIBUTION_HEADER] = request7.session.sessionId;
72237
+ }
72233
72238
  headers[HOP_SECRET_HEADER] = deps.hopSecret;
72234
72239
  try {
72235
72240
  await forwardThroughHeadroom(request7, response, { socketPath, headers, log: deps.log });
@@ -77088,8 +77093,15 @@ function describeRule(rule) {
77088
77093
  return parts.length === 0 ? "(nothing)" : parts.join(", ");
77089
77094
  }
77090
77095
  async function checkRuleTargets(deps, options) {
77091
- if (typeof options.identity === "string" && readIdentity(deps.paths, options.identity) === void 0) {
77092
- throw new IdentityNotFoundError(options.identity);
77096
+ if (typeof options.identity === "string") {
77097
+ if (options.identity.startsWith(POOL_SELECTOR_PREFIX)) {
77098
+ const poolName = options.identity.slice(POOL_SELECTOR_PREFIX.length);
77099
+ if (readPools(deps.paths)[poolName] === void 0) {
77100
+ throw new PoolNotFoundError(poolName);
77101
+ }
77102
+ } else if (readIdentity(deps.paths, options.identity) === void 0) {
77103
+ throw new IdentityNotFoundError(options.identity);
77104
+ }
77093
77105
  }
77094
77106
  if (typeof options.configProfile === "string") {
77095
77107
  await ensureProfileExists(deps, options.configProfile);
package/dist/index.cjs CHANGED
@@ -6059,7 +6059,7 @@ function assess(member, nowMs) {
6059
6059
  return assessRefusedNested(member, nested, nowMs);
6060
6060
  }
6061
6061
  const assessment = assessIdentity(member, nowMs);
6062
- return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}": ${nested.reasons.join("; ")}`, ...assessment.candidate.reasons] } };
6062
+ return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}"`, ...nested.reasons] } };
6063
6063
  }
6064
6064
  function assessIdentity(member, nowMs) {
6065
6065
  const plan = planOf(member.account);
package/dist/index.mjs CHANGED
@@ -5795,7 +5795,7 @@ function assess(member, nowMs) {
5795
5795
  return assessRefusedNested(member, nested, nowMs);
5796
5796
  }
5797
5797
  const assessment = assessIdentity(member, nowMs);
5798
- return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}": ${nested.reasons.join("; ")}`, ...assessment.candidate.reasons] } };
5798
+ return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}"`, ...nested.reasons] } };
5799
5799
  }
5800
5800
  function assessIdentity(member, nowMs) {
5801
5801
  const plan = planOf(member.account);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "8.20.0",
3
+ "version": "8.20.2",
4
4
  "description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
5
5
  "license": "MIT",
6
6
  "author": "Joseph Mearman <joseph@mearman.co.uk>",