agent-shim 14.19.2 → 14.20.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/README.md CHANGED
@@ -48,8 +48,6 @@ agent-shim identity add personal # create your first identity (a fresh logi
48
48
  agent-shim run @personal # log in and start using it
49
49
  ```
50
50
 
51
- Want the shorter `claude @personal` instead? Run `agent-shim shim enable` once — see [Install](#install).
52
-
53
51
  That's it — with no further configuration, everything in `~/.claude` that isn't credentials or daemon runtime is classified into categories (see below) and shared according to sensible defaults. Add a second identity, add configuration profiles, and add directory rules only once you actually need more control than that.
54
52
 
55
53
  ## Codex CLI
package/dist/cli.cjs CHANGED
@@ -31437,6 +31437,32 @@ var init_sameDirectory = __esm({
31437
31437
  }
31438
31438
  });
31439
31439
 
31440
+ // src/launcher/launchLoop.ts
31441
+ function markLaunchedChild(env, launcherPid) {
31442
+ return { ...env, [LAUNCHER_PID_VARIABLE]: String(launcherPid) };
31443
+ }
31444
+ function refuseLaunchLoop(env, parentPid) {
31445
+ if (env[LAUNCHER_PID_VARIABLE] === String(parentPid)) {
31446
+ throw new LaunchLoopError();
31447
+ }
31448
+ }
31449
+ var LAUNCHER_PID_VARIABLE, LaunchLoopError;
31450
+ var init_launchLoop = __esm({
31451
+ "src/launcher/launchLoop.ts"() {
31452
+ "use strict";
31453
+ init_cliError();
31454
+ LAUNCHER_PID_VARIABLE = "AGENT_SHIM_LAUNCHER_PID";
31455
+ LaunchLoopError = class extends CliError {
31456
+ constructor() {
31457
+ super(
31458
+ "the program agent-shim started as the real binary started agent-shim again, which would repeat without end. It is a script or link that leads back here: remove it from PATH, or point PATH at the real binary ahead of it."
31459
+ );
31460
+ this.name = "LaunchLoopError";
31461
+ }
31462
+ };
31463
+ }
31464
+ });
31465
+
31440
31466
  // src/launcher/report.ts
31441
31467
  function renderReport(rows, style) {
31442
31468
  if (rows.length === 0) {
@@ -31961,6 +31987,7 @@ var init_realPorts = __esm({
31961
31987
  init_supervisor();
31962
31988
  init_state2();
31963
31989
  init_sameDirectory();
31990
+ init_launchLoop();
31964
31991
  init_logStyle();
31965
31992
  realFsPort = {
31966
31993
  sameDirectory,
@@ -32227,7 +32254,7 @@ var init_realPorts = __esm({
32227
32254
  };
32228
32255
  realSpawnPort = {
32229
32256
  spawnSync(command, args, options) {
32230
- const result = spawnSyncUnbounded("a spawned program", command, args, options);
32257
+ const result = spawnSyncUnbounded("a spawned program", command, args, { ...options, env: markLaunchedChild(options.env, process.pid) });
32231
32258
  return { status: result.status, signal: result.signal, ...result.error === void 0 ? {} : { error: result.error } };
32232
32259
  }
32233
32260
  };
@@ -76222,7 +76249,7 @@ var RC_SESSION_COMMAND_VERIFIED_VERSIONS, RELEASE_VERSION;
76222
76249
  var init_verifiedVersions = __esm({
76223
76250
  "src/supervise/verifiedVersions.ts"() {
76224
76251
  "use strict";
76225
- RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325", "2.1.326", "2.1.327", "2.1.328", "2.1.329"];
76252
+ RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325", "2.1.326", "2.1.327", "2.1.328", "2.1.329", "2.1.330", "2.1.331", "2.1.332", "2.1.333", "2.1.334"];
76226
76253
  RELEASE_VERSION = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u;
76227
76254
  }
76228
76255
  });
@@ -76821,7 +76848,7 @@ var init_package = __esm({
76821
76848
  "package.json"() {
76822
76849
  package_default = {
76823
76850
  name: "agent-shim",
76824
- version: "14.19.2",
76851
+ version: "14.20.1",
76825
76852
  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.",
76826
76853
  license: "MIT",
76827
76854
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -176235,6 +176262,7 @@ init_cascade();
176235
176262
  init_cliOverride();
176236
176263
  init_farm();
176237
176264
  init_identity2();
176265
+ init_launchLoop();
176238
176266
  init_spawn();
176239
176267
  init_realPorts();
176240
176268
  init_walk();
@@ -176242,11 +176270,12 @@ init_walk();
176242
176270
  // src/supervise/realPorts.ts
176243
176271
  var import_node_child_process12 = require("node:child_process");
176244
176272
  var import_node_fs40 = __toESM(require("node:fs"), 1);
176273
+ init_launchLoop();
176245
176274
  init_realPorts();
176246
176275
  init_blockingSpawn();
176247
176276
  var realSupervisedSpawnPort = {
176248
176277
  spawn(command, args, options) {
176249
- const child = (0, import_node_child_process12.spawn)(command, [...args], { stdio: options.stdio, env: { ...options.env } });
176278
+ const child = (0, import_node_child_process12.spawn)(command, [...args], { stdio: options.stdio, env: markLaunchedChild(options.env, process.pid) });
176250
176279
  const exit = new Promise((resolve3) => {
176251
176280
  child.once("error", (error63) => {
176252
176281
  resolve3({ status: null, signal: null, error: error63 });
@@ -176416,6 +176445,7 @@ async function runCodexChild(plan, spawn10, signals) {
176416
176445
  }
176417
176446
  }
176418
176447
  async function runCodex(paths, argv) {
176448
+ refuseLaunchLoop(process.env, process.ppid);
176419
176449
  const own2 = resolveOwnBinaryCheck(paths, realContentSourcePath());
176420
176450
  const resolveBinary = () => {
176421
176451
  const explicit = process.env.AGENT_SHIM_CODEX_BIN;
@@ -178126,6 +178156,7 @@ async function runSupervised(params) {
178126
178156
  // src/runClaude.ts
178127
178157
  init_launcher();
178128
178158
  init_argv();
178159
+ init_launchLoop();
178129
178160
  init_extraFlags();
178130
178161
 
178131
178162
  // src/launcher/native.ts
@@ -178173,6 +178204,7 @@ init_identity2();
178173
178204
  init_realPorts();
178174
178205
  init_ownEntry();
178175
178206
  async function runClaude(argvOverride) {
178207
+ refuseLaunchLoop(process.env, process.ppid);
178176
178208
  const paths = resolveLayoutPaths();
178177
178209
  const launchProc = argvOverride === void 0 ? realProcPort : { ...realProcPort, argv: argvOverride };
178178
178210
  const nativeArgv = parseLauncherArgv(launchProc.argv);
package/dist/index.cjs CHANGED
@@ -12016,6 +12016,19 @@ var init_supervisor2 = __esm({
12016
12016
  }
12017
12017
  });
12018
12018
 
12019
+ // src/launcher/launchLoop.ts
12020
+ function markLaunchedChild(env, launcherPid) {
12021
+ return { ...env, [LAUNCHER_PID_VARIABLE]: String(launcherPid) };
12022
+ }
12023
+ var LAUNCHER_PID_VARIABLE;
12024
+ var init_launchLoop = __esm({
12025
+ "src/launcher/launchLoop.ts"() {
12026
+ "use strict";
12027
+ init_cliError();
12028
+ LAUNCHER_PID_VARIABLE = "AGENT_SHIM_LAUNCHER_PID";
12029
+ }
12030
+ });
12031
+
12019
12032
  // src/launcher/report.ts
12020
12033
  function renderReport(rows, style) {
12021
12034
  if (rows.length === 0) {
@@ -12388,6 +12401,7 @@ var init_realPorts = __esm({
12388
12401
  init_supervisor2();
12389
12402
  init_state2();
12390
12403
  init_sameDirectory();
12404
+ init_launchLoop();
12391
12405
  init_logStyle();
12392
12406
  realFsPort = {
12393
12407
  sameDirectory,
@@ -12644,7 +12658,7 @@ var init_realPorts = __esm({
12644
12658
  };
12645
12659
  realSpawnPort = {
12646
12660
  spawnSync(command, args, options) {
12647
- const result = spawnSyncUnbounded("a spawned program", command, args, options);
12661
+ const result = spawnSyncUnbounded("a spawned program", command, args, { ...options, env: markLaunchedChild(options.env, process.pid) });
12648
12662
  return { status: result.status, signal: result.signal, ...result.error === void 0 ? {} : { error: result.error } };
12649
12663
  }
12650
12664
  };
@@ -15369,7 +15383,7 @@ var init_package = __esm({
15369
15383
  "package.json"() {
15370
15384
  package_default = {
15371
15385
  name: "agent-shim",
15372
- version: "14.19.2",
15386
+ version: "14.20.1",
15373
15387
  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.",
15374
15388
  license: "MIT",
15375
15389
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -15527,7 +15541,7 @@ var RC_SESSION_COMMAND_VERIFIED_VERSIONS, RELEASE_VERSION;
15527
15541
  var init_verifiedVersions = __esm({
15528
15542
  "src/supervise/verifiedVersions.ts"() {
15529
15543
  "use strict";
15530
- RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325", "2.1.326", "2.1.327", "2.1.328", "2.1.329"];
15544
+ RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325", "2.1.326", "2.1.327", "2.1.328", "2.1.329", "2.1.330", "2.1.331", "2.1.332", "2.1.333", "2.1.334"];
15531
15545
  RELEASE_VERSION = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u;
15532
15546
  }
15533
15547
  });
package/dist/index.mjs CHANGED
@@ -11987,6 +11987,19 @@ var init_supervisor2 = __esm({
11987
11987
  }
11988
11988
  });
11989
11989
 
11990
+ // src/launcher/launchLoop.ts
11991
+ function markLaunchedChild(env, launcherPid) {
11992
+ return { ...env, [LAUNCHER_PID_VARIABLE]: String(launcherPid) };
11993
+ }
11994
+ var LAUNCHER_PID_VARIABLE;
11995
+ var init_launchLoop = __esm({
11996
+ "src/launcher/launchLoop.ts"() {
11997
+ "use strict";
11998
+ init_cliError();
11999
+ LAUNCHER_PID_VARIABLE = "AGENT_SHIM_LAUNCHER_PID";
12000
+ }
12001
+ });
12002
+
11990
12003
  // src/launcher/report.ts
11991
12004
  function renderReport(rows, style) {
11992
12005
  if (rows.length === 0) {
@@ -12359,6 +12372,7 @@ var init_realPorts = __esm({
12359
12372
  init_supervisor2();
12360
12373
  init_state2();
12361
12374
  init_sameDirectory();
12375
+ init_launchLoop();
12362
12376
  init_logStyle();
12363
12377
  realFsPort = {
12364
12378
  sameDirectory,
@@ -12615,7 +12629,7 @@ var init_realPorts = __esm({
12615
12629
  };
12616
12630
  realSpawnPort = {
12617
12631
  spawnSync(command, args, options) {
12618
- const result = spawnSyncUnbounded("a spawned program", command, args, options);
12632
+ const result = spawnSyncUnbounded("a spawned program", command, args, { ...options, env: markLaunchedChild(options.env, process.pid) });
12619
12633
  return { status: result.status, signal: result.signal, ...result.error === void 0 ? {} : { error: result.error } };
12620
12634
  }
12621
12635
  };
@@ -15340,7 +15354,7 @@ var init_package = __esm({
15340
15354
  "package.json"() {
15341
15355
  package_default = {
15342
15356
  name: "agent-shim",
15343
- version: "14.19.2",
15357
+ version: "14.20.1",
15344
15358
  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.",
15345
15359
  license: "MIT",
15346
15360
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -15498,7 +15512,7 @@ var RC_SESSION_COMMAND_VERIFIED_VERSIONS, RELEASE_VERSION;
15498
15512
  var init_verifiedVersions = __esm({
15499
15513
  "src/supervise/verifiedVersions.ts"() {
15500
15514
  "use strict";
15501
- RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325", "2.1.326", "2.1.327", "2.1.328", "2.1.329"];
15515
+ RC_SESSION_COMMAND_VERIFIED_VERSIONS = ["2.1.319", "2.1.325", "2.1.326", "2.1.327", "2.1.328", "2.1.329", "2.1.330", "2.1.331", "2.1.332", "2.1.333", "2.1.334"];
15502
15516
  RELEASE_VERSION = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u;
15503
15517
  }
15504
15518
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "14.19.2",
3
+ "version": "14.20.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>",