agent-shim 11.6.0 → 11.6.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.
package/dist/cli.cjs CHANGED
@@ -34007,7 +34007,7 @@ var init_package = __esm({
34007
34007
  "package.json"() {
34008
34008
  package_default = {
34009
34009
  name: "agent-shim",
34010
- version: "11.6.0",
34010
+ version: "11.6.1",
34011
34011
  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.",
34012
34012
  license: "MIT",
34013
34013
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -62048,6 +62048,20 @@ request.on("error", (error) => finish(failed, (error.code ? error.code + ": " :
62048
62048
  }
62049
62049
  });
62050
62050
 
62051
+ // src/frontdoor/selfIdentity.ts
62052
+ function declareThisProcessTheFrontDoor() {
62053
+ declaredPid = process.pid;
62054
+ }
62055
+ function isFrontDoorSupervisorPid(pid, identify) {
62056
+ return declaredPid !== void 0 && pid === declaredPid && pid === process.pid || identify(pid);
62057
+ }
62058
+ var declaredPid;
62059
+ var init_selfIdentity = __esm({
62060
+ "src/frontdoor/selfIdentity.ts"() {
62061
+ "use strict";
62062
+ }
62063
+ });
62064
+
62051
62065
  // src/frontdoor/trust.ts
62052
62066
  function resolveTrustBundle(params) {
62053
62067
  const { caCertFile, bundlesDir, variable, inherited, fs: fs23 } = params;
@@ -62094,7 +62108,7 @@ function realEnsurePorts(paths, spawnDaemon) {
62094
62108
  now: () => Date.now(),
62095
62109
  sleep: realSleepSync,
62096
62110
  spawnSupervisor: (layout) => spawnDaemon(layout, "__frontdoor-supervisor", layout.frontdoorLogPath),
62097
- isFrontDoorSupervisor: realIsFrontDoorSupervisor,
62111
+ isFrontDoorSupervisor: (pid) => isFrontDoorSupervisorPid(pid, realIsFrontDoorSupervisor),
62098
62112
  stopSupervisor: (pid) => {
62099
62113
  process.kill(pid, "SIGTERM");
62100
62114
  },
@@ -62135,6 +62149,7 @@ var init_realFrontDoorPort = __esm({
62135
62149
  init_ensure2();
62136
62150
  init_state();
62137
62151
  init_probe();
62152
+ init_selfIdentity();
62138
62153
  init_trust();
62139
62154
  realTrustBundleFs = {
62140
62155
  readFileUtf8: (file2) => import_node_fs13.default.readFileSync(file2, "utf8"),
@@ -131034,6 +131049,7 @@ function formatFrontDoorStatus(status, caCertPath) {
131034
131049
 
131035
131050
  // src/frontdoor/commands.ts
131036
131051
  init_state();
131052
+ init_selfIdentity();
131037
131053
  init_account();
131038
131054
  init_middleware();
131039
131055
  init_quotaRefresh();
@@ -131515,6 +131531,7 @@ function registerFrontDoorCommand(program2, deps) {
131515
131531
  process.on("SIGINT", () => {
131516
131532
  deps.exit(0);
131517
131533
  });
131534
+ declareThisProcessTheFrontDoor();
131518
131535
  deps.exit(await runFrontDoorSupervisor(idleShutdownMinutes, realFrontDoorSupervisorPorts(paths)));
131519
131536
  });
131520
131537
  }
package/dist/index.cjs CHANGED
@@ -2787,7 +2787,7 @@ var init_package = __esm({
2787
2787
  "package.json"() {
2788
2788
  package_default = {
2789
2789
  name: "agent-shim",
2790
- version: "11.6.0",
2790
+ version: "11.6.1",
2791
2791
  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.",
2792
2792
  license: "MIT",
2793
2793
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -8140,6 +8140,17 @@ request.on("error", (error) => finish(failed, (error.code ? error.code + ": " :
8140
8140
  }
8141
8141
  });
8142
8142
 
8143
+ // src/frontdoor/selfIdentity.ts
8144
+ function isFrontDoorSupervisorPid(pid, identify) {
8145
+ return declaredPid !== void 0 && pid === declaredPid && pid === process.pid || identify(pid);
8146
+ }
8147
+ var declaredPid;
8148
+ var init_selfIdentity = __esm({
8149
+ "src/frontdoor/selfIdentity.ts"() {
8150
+ "use strict";
8151
+ }
8152
+ });
8153
+
8143
8154
  // src/frontdoor/trust.ts
8144
8155
  function resolveTrustBundle(params) {
8145
8156
  const { caCertFile, bundlesDir, variable, inherited, fs: fs12 } = params;
@@ -8186,7 +8197,7 @@ function realEnsurePorts(paths, spawnDaemon) {
8186
8197
  now: () => Date.now(),
8187
8198
  sleep: realSleepSync,
8188
8199
  spawnSupervisor: (layout) => spawnDaemon(layout, "__frontdoor-supervisor", layout.frontdoorLogPath),
8189
- isFrontDoorSupervisor: realIsFrontDoorSupervisor,
8200
+ isFrontDoorSupervisor: (pid) => isFrontDoorSupervisorPid(pid, realIsFrontDoorSupervisor),
8190
8201
  stopSupervisor: (pid) => {
8191
8202
  process.kill(pid, "SIGTERM");
8192
8203
  },
@@ -8224,6 +8235,7 @@ var init_realFrontDoorPort = __esm({
8224
8235
  init_ensure2();
8225
8236
  init_state();
8226
8237
  init_probe();
8238
+ init_selfIdentity();
8227
8239
  init_trust();
8228
8240
  realTrustBundleFs = {
8229
8241
  readFileUtf8: (file) => import_node_fs11.default.readFileSync(file, "utf8"),
package/dist/index.mjs CHANGED
@@ -2763,7 +2763,7 @@ var init_package = __esm({
2763
2763
  "package.json"() {
2764
2764
  package_default = {
2765
2765
  name: "agent-shim",
2766
- version: "11.6.0",
2766
+ version: "11.6.1",
2767
2767
  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.",
2768
2768
  license: "MIT",
2769
2769
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -8111,6 +8111,17 @@ request.on("error", (error) => finish(failed, (error.code ? error.code + ": " :
8111
8111
  }
8112
8112
  });
8113
8113
 
8114
+ // src/frontdoor/selfIdentity.ts
8115
+ function isFrontDoorSupervisorPid(pid, identify) {
8116
+ return declaredPid !== void 0 && pid === declaredPid && pid === process.pid || identify(pid);
8117
+ }
8118
+ var declaredPid;
8119
+ var init_selfIdentity = __esm({
8120
+ "src/frontdoor/selfIdentity.ts"() {
8121
+ "use strict";
8122
+ }
8123
+ });
8124
+
8114
8125
  // src/frontdoor/trust.ts
8115
8126
  import { createHash as createHash6 } from "node:crypto";
8116
8127
  import path40 from "node:path";
@@ -8158,7 +8169,7 @@ function realEnsurePorts(paths, spawnDaemon) {
8158
8169
  now: () => Date.now(),
8159
8170
  sleep: realSleepSync,
8160
8171
  spawnSupervisor: (layout) => spawnDaemon(layout, "__frontdoor-supervisor", layout.frontdoorLogPath),
8161
- isFrontDoorSupervisor: realIsFrontDoorSupervisor,
8172
+ isFrontDoorSupervisor: (pid) => isFrontDoorSupervisorPid(pid, realIsFrontDoorSupervisor),
8162
8173
  stopSupervisor: (pid) => {
8163
8174
  process.kill(pid, "SIGTERM");
8164
8175
  },
@@ -8195,6 +8206,7 @@ var init_realFrontDoorPort = __esm({
8195
8206
  init_ensure2();
8196
8207
  init_state();
8197
8208
  init_probe();
8209
+ init_selfIdentity();
8198
8210
  init_trust();
8199
8211
  realTrustBundleFs = {
8200
8212
  readFileUtf8: (file) => fs11.readFileSync(file, "utf8"),
@@ -5656,7 +5656,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5656
5656
  kind: zod.ZodLiteral<"profile">;
5657
5657
  name: zod.ZodString;
5658
5658
  value: zod.ZodObject<{
5659
- description: zod.ZodOptional<zod.ZodString>;
5660
5659
  entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
5661
5660
  value: zod.ZodBoolean;
5662
5661
  when: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -5732,6 +5731,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5732
5731
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
5733
5732
  }, zod_v4_core.$strip>], "kind">]>;
5734
5733
  }, zod_v4_core.$strict>]>>>;
5734
+ description: zod.ZodOptional<zod.ZodString>;
5735
5735
  extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5736
5736
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
5737
5737
  all: zod.ZodOptional<zod.ZodBoolean>;
@@ -5775,7 +5775,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5775
5775
  kind: zod.ZodLiteral<"profile">;
5776
5776
  name: zod.ZodString;
5777
5777
  value: zod.ZodObject<{
5778
- description: zod.ZodOptional<zod.ZodString>;
5779
5778
  entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
5780
5779
  value: zod.ZodBoolean;
5781
5780
  when: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -5851,6 +5850,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
5851
5850
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
5852
5851
  }, zod_v4_core.$strip>], "kind">]>;
5853
5852
  }, zod_v4_core.$strict>]>>>;
5853
+ description: zod.ZodOptional<zod.ZodString>;
5854
5854
  extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5855
5855
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
5856
5856
  all: zod.ZodOptional<zod.ZodBoolean>;
@@ -8606,7 +8606,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8606
8606
  kind: zod.ZodLiteral<"profile">;
8607
8607
  name: zod.ZodString;
8608
8608
  value: zod.ZodObject<{
8609
- description: zod.ZodOptional<zod.ZodString>;
8610
8609
  entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
8611
8610
  value: zod.ZodBoolean;
8612
8611
  when: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -8682,6 +8681,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8682
8681
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
8683
8682
  }, zod_v4_core.$strip>], "kind">]>;
8684
8683
  }, zod_v4_core.$strict>]>>>;
8684
+ description: zod.ZodOptional<zod.ZodString>;
8685
8685
  extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8686
8686
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
8687
8687
  all: zod.ZodOptional<zod.ZodBoolean>;
@@ -8725,7 +8725,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8725
8725
  kind: zod.ZodLiteral<"profile">;
8726
8726
  name: zod.ZodString;
8727
8727
  value: zod.ZodObject<{
8728
- description: zod.ZodOptional<zod.ZodString>;
8729
8728
  entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
8730
8729
  value: zod.ZodBoolean;
8731
8730
  when: zod.ZodUnion<readonly [zod.ZodObject<{
@@ -8801,6 +8800,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
8801
8800
  key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
8802
8801
  }, zod_v4_core.$strip>], "kind">]>;
8803
8802
  }, zod_v4_core.$strict>]>>>;
8803
+ description: zod.ZodOptional<zod.ZodString>;
8804
8804
  extends: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8805
8805
  categories: zod.ZodOptional<zod.ZodPipe<zod.ZodObject<{
8806
8806
  all: zod.ZodOptional<zod.ZodBoolean>;
@@ -10714,7 +10714,6 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
10714
10714
  kind: z.ZodLiteral<"profile">;
10715
10715
  name: z.ZodString;
10716
10716
  value: z.ZodObject<{
10717
- description: z.ZodOptional<z.ZodString>;
10718
10717
  entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
10719
10718
  value: z.ZodBoolean;
10720
10719
  when: z.ZodUnion<readonly [z.ZodObject<{
@@ -10790,6 +10789,7 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
10790
10789
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
10791
10790
  }, z.core.$strip>], "kind">]>;
10792
10791
  }, z.core.$strict>]>>>;
10792
+ description: z.ZodOptional<z.ZodString>;
10793
10793
  extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10794
10794
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
10795
10795
  all: z.ZodOptional<z.ZodBoolean>;
@@ -10835,7 +10835,6 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
10835
10835
  kind: z.ZodLiteral<"profile">;
10836
10836
  name: z.ZodString;
10837
10837
  value: z.ZodObject<{
10838
- description: z.ZodOptional<z.ZodString>;
10839
10838
  entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
10840
10839
  value: z.ZodBoolean;
10841
10840
  when: z.ZodUnion<readonly [z.ZodObject<{
@@ -10911,6 +10910,7 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
10911
10910
  key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
10912
10911
  }, z.core.$strip>], "kind">]>;
10913
10912
  }, z.core.$strict>]>>>;
10913
+ description: z.ZodOptional<z.ZodString>;
10914
10914
  extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
10915
10915
  categories: z.ZodOptional<z.ZodPipe<z.ZodObject<{
10916
10916
  all: z.ZodOptional<z.ZodBoolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "11.6.0",
3
+ "version": "11.6.1",
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>",