claude-use 11.5.0 → 11.5.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
@@ -33976,7 +33976,7 @@ var init_package = __esm({
33976
33976
  "package.json"() {
33977
33977
  package_default = {
33978
33978
  name: "claude-use",
33979
- version: "11.5.0",
33979
+ version: "11.5.1",
33980
33980
  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.",
33981
33981
  license: "MIT",
33982
33982
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -61807,6 +61807,10 @@ function ensureFrontDoor(params) {
61807
61807
  let replaced = false;
61808
61808
  const distrusted = /* @__PURE__ */ new Set();
61809
61809
  let lastRejection;
61810
+ let busyDoor;
61811
+ const liveSessionsOn = (doorPid) => listFrontDoorSessions(ports.fs, paths.frontdoorSessionsDir).filter(
61812
+ (session) => session.pid !== params.launcherPid && ports.isRunning(session.pid) && (session.supervisorPid === void 0 || session.supervisorPid === doorPid)
61813
+ ).length;
61810
61814
  const verifyWithRetry = (port) => {
61811
61815
  let verdict = ports.verifyListener(port);
61812
61816
  for (let attempt = 1; !verdict.ok && attempt < FRONTDOOR_PROBE_ATTEMPTS; attempt += 1) {
@@ -61848,11 +61852,17 @@ function ensureFrontDoor(params) {
61848
61852
  throw new FrontDoorStartError(`${lastRejection}; refusing to send this session's credentials to it. Daemon log: ${paths.frontdoorLogPath}`);
61849
61853
  }
61850
61854
  if (ports.isFrontDoorSupervisor(supervisorPid)) {
61851
- stopAndAwaitExit(supervisorPid, `the front door (pid ${String(supervisorPid)}) stopped answering and did not exit when asked to`);
61855
+ const stranded = liveSessionsOn(supervisorPid);
61856
+ if (stranded > 0) {
61857
+ busyDoor = { pid: supervisorPid, sessions: stranded };
61858
+ } else {
61859
+ stopAndAwaitExit(supervisorPid, `the front door (pid ${String(supervisorPid)}) stopped answering and did not exit when asked to`);
61860
+ continue;
61861
+ }
61862
+ } else {
61863
+ distrusted.add(supervisorPid);
61852
61864
  continue;
61853
61865
  }
61854
- distrusted.add(supervisorPid);
61855
- continue;
61856
61866
  }
61857
61867
  if (state?.lastError !== void 0) {
61858
61868
  throw new FrontDoorStartError(`the front door reported a fatal error and is not serving: ${state.lastError} (daemon log: ${paths.frontdoorLogPath})`);
@@ -61875,7 +61885,7 @@ function ensureFrontDoor(params) {
61875
61885
  if (ports.now() >= deadline) {
61876
61886
  const lastError = state?.lastError;
61877
61887
  throw new FrontDoorStartError(
61878
- `the front door did not become ready within ${String(FRONTDOOR_START_TIMEOUT_MS)}ms` + (lastError === void 0 ? "" : ` (last error: ${lastError})`) + (lastRejection === void 0 ? "" : ` (${lastRejection})`) + `. Daemon log: ${paths.frontdoorLogPath}`
61888
+ `the front door did not become ready within ${String(FRONTDOOR_START_TIMEOUT_MS)}ms` + (lastError === void 0 ? "" : ` (last error: ${lastError})`) + (lastRejection === void 0 ? "" : ` (${lastRejection})`) + (busyDoor === void 0 ? "" : `. It was not replaced because ${String(busyDoor.sessions)} live session(s) are using it and would lose their connections; run \`agent-shim frontdoor restart\` to replace it deliberately`) + `. Daemon log: ${paths.frontdoorLogPath}`
61879
61889
  );
61880
61890
  }
61881
61891
  ports.sleep(FRONTDOOR_LAUNCHER_POLL_MS);
package/dist/index.cjs CHANGED
@@ -2758,7 +2758,7 @@ var init_package = __esm({
2758
2758
  "package.json"() {
2759
2759
  package_default = {
2760
2760
  name: "claude-use",
2761
- version: "11.5.0",
2761
+ version: "11.5.1",
2762
2762
  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.",
2763
2763
  license: "MIT",
2764
2764
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -6758,6 +6758,10 @@ function ensureFrontDoor(params) {
6758
6758
  let replaced = false;
6759
6759
  const distrusted = /* @__PURE__ */ new Set();
6760
6760
  let lastRejection;
6761
+ let busyDoor;
6762
+ const liveSessionsOn = (doorPid) => listFrontDoorSessions(ports.fs, paths.frontdoorSessionsDir).filter(
6763
+ (session) => session.pid !== params.launcherPid && ports.isRunning(session.pid) && (session.supervisorPid === void 0 || session.supervisorPid === doorPid)
6764
+ ).length;
6761
6765
  const verifyWithRetry = (port) => {
6762
6766
  let verdict = ports.verifyListener(port);
6763
6767
  for (let attempt = 1; !verdict.ok && attempt < FRONTDOOR_PROBE_ATTEMPTS; attempt += 1) {
@@ -6799,11 +6803,17 @@ function ensureFrontDoor(params) {
6799
6803
  throw new FrontDoorStartError(`${lastRejection}; refusing to send this session's credentials to it. Daemon log: ${paths.frontdoorLogPath}`);
6800
6804
  }
6801
6805
  if (ports.isFrontDoorSupervisor(supervisorPid)) {
6802
- stopAndAwaitExit(supervisorPid, `the front door (pid ${String(supervisorPid)}) stopped answering and did not exit when asked to`);
6806
+ const stranded = liveSessionsOn(supervisorPid);
6807
+ if (stranded > 0) {
6808
+ busyDoor = { pid: supervisorPid, sessions: stranded };
6809
+ } else {
6810
+ stopAndAwaitExit(supervisorPid, `the front door (pid ${String(supervisorPid)}) stopped answering and did not exit when asked to`);
6811
+ continue;
6812
+ }
6813
+ } else {
6814
+ distrusted.add(supervisorPid);
6803
6815
  continue;
6804
6816
  }
6805
- distrusted.add(supervisorPid);
6806
- continue;
6807
6817
  }
6808
6818
  if (state?.lastError !== void 0) {
6809
6819
  throw new FrontDoorStartError(`the front door reported a fatal error and is not serving: ${state.lastError} (daemon log: ${paths.frontdoorLogPath})`);
@@ -6826,7 +6836,7 @@ function ensureFrontDoor(params) {
6826
6836
  if (ports.now() >= deadline) {
6827
6837
  const lastError = state?.lastError;
6828
6838
  throw new FrontDoorStartError(
6829
- `the front door did not become ready within ${String(FRONTDOOR_START_TIMEOUT_MS)}ms` + (lastError === void 0 ? "" : ` (last error: ${lastError})`) + (lastRejection === void 0 ? "" : ` (${lastRejection})`) + `. Daemon log: ${paths.frontdoorLogPath}`
6839
+ `the front door did not become ready within ${String(FRONTDOOR_START_TIMEOUT_MS)}ms` + (lastError === void 0 ? "" : ` (last error: ${lastError})`) + (lastRejection === void 0 ? "" : ` (${lastRejection})`) + (busyDoor === void 0 ? "" : `. It was not replaced because ${String(busyDoor.sessions)} live session(s) are using it and would lose their connections; run \`agent-shim frontdoor restart\` to replace it deliberately`) + `. Daemon log: ${paths.frontdoorLogPath}`
6830
6840
  );
6831
6841
  }
6832
6842
  ports.sleep(FRONTDOOR_LAUNCHER_POLL_MS);
package/dist/index.mjs CHANGED
@@ -2734,7 +2734,7 @@ var init_package = __esm({
2734
2734
  "package.json"() {
2735
2735
  package_default = {
2736
2736
  name: "claude-use",
2737
- version: "11.5.0",
2737
+ version: "11.5.1",
2738
2738
  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.",
2739
2739
  license: "MIT",
2740
2740
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -6732,6 +6732,10 @@ function ensureFrontDoor(params) {
6732
6732
  let replaced = false;
6733
6733
  const distrusted = /* @__PURE__ */ new Set();
6734
6734
  let lastRejection;
6735
+ let busyDoor;
6736
+ const liveSessionsOn = (doorPid) => listFrontDoorSessions(ports.fs, paths.frontdoorSessionsDir).filter(
6737
+ (session) => session.pid !== params.launcherPid && ports.isRunning(session.pid) && (session.supervisorPid === void 0 || session.supervisorPid === doorPid)
6738
+ ).length;
6735
6739
  const verifyWithRetry = (port) => {
6736
6740
  let verdict = ports.verifyListener(port);
6737
6741
  for (let attempt = 1; !verdict.ok && attempt < FRONTDOOR_PROBE_ATTEMPTS; attempt += 1) {
@@ -6773,11 +6777,17 @@ function ensureFrontDoor(params) {
6773
6777
  throw new FrontDoorStartError(`${lastRejection}; refusing to send this session's credentials to it. Daemon log: ${paths.frontdoorLogPath}`);
6774
6778
  }
6775
6779
  if (ports.isFrontDoorSupervisor(supervisorPid)) {
6776
- stopAndAwaitExit(supervisorPid, `the front door (pid ${String(supervisorPid)}) stopped answering and did not exit when asked to`);
6780
+ const stranded = liveSessionsOn(supervisorPid);
6781
+ if (stranded > 0) {
6782
+ busyDoor = { pid: supervisorPid, sessions: stranded };
6783
+ } else {
6784
+ stopAndAwaitExit(supervisorPid, `the front door (pid ${String(supervisorPid)}) stopped answering and did not exit when asked to`);
6785
+ continue;
6786
+ }
6787
+ } else {
6788
+ distrusted.add(supervisorPid);
6777
6789
  continue;
6778
6790
  }
6779
- distrusted.add(supervisorPid);
6780
- continue;
6781
6791
  }
6782
6792
  if (state?.lastError !== void 0) {
6783
6793
  throw new FrontDoorStartError(`the front door reported a fatal error and is not serving: ${state.lastError} (daemon log: ${paths.frontdoorLogPath})`);
@@ -6800,7 +6810,7 @@ function ensureFrontDoor(params) {
6800
6810
  if (ports.now() >= deadline) {
6801
6811
  const lastError = state?.lastError;
6802
6812
  throw new FrontDoorStartError(
6803
- `the front door did not become ready within ${String(FRONTDOOR_START_TIMEOUT_MS)}ms` + (lastError === void 0 ? "" : ` (last error: ${lastError})`) + (lastRejection === void 0 ? "" : ` (${lastRejection})`) + `. Daemon log: ${paths.frontdoorLogPath}`
6813
+ `the front door did not become ready within ${String(FRONTDOOR_START_TIMEOUT_MS)}ms` + (lastError === void 0 ? "" : ` (last error: ${lastError})`) + (lastRejection === void 0 ? "" : ` (${lastRejection})`) + (busyDoor === void 0 ? "" : `. It was not replaced because ${String(busyDoor.sessions)} live session(s) are using it and would lose their connections; run \`agent-shim frontdoor restart\` to replace it deliberately`) + `. Daemon log: ${paths.frontdoorLogPath}`
6804
6814
  );
6805
6815
  }
6806
6816
  ports.sleep(FRONTDOOR_LAUNCHER_POLL_MS);
@@ -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": "claude-use",
3
- "version": "11.5.0",
3
+ "version": "11.5.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>",