agent-shim 9.10.0 → 9.10.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
@@ -33243,7 +33243,7 @@ var init_package = __esm({
33243
33243
  "package.json"() {
33244
33244
  package_default = {
33245
33245
  name: "agent-shim",
33246
- version: "9.10.0",
33246
+ version: "9.10.1",
33247
33247
  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.",
33248
33248
  license: "MIT",
33249
33249
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -138415,14 +138415,17 @@ function createMcpServer(identity, ports) {
138415
138415
  });
138416
138416
  return mcp;
138417
138417
  }
138418
- async function serveMcp(mcp, transport, whileConnected) {
138418
+ async function serveMcp(mcp, transport, options = {}) {
138419
138419
  const closed = new Promise((resolve2) => {
138420
138420
  mcp.server.onclose = resolve2;
138421
138421
  });
138422
138422
  await mcp.connect(transport);
138423
- const stop = whileConnected?.(() => {
138423
+ const stop = options.whileConnected?.(() => {
138424
138424
  void mcp.server.sendToolListChanged();
138425
138425
  });
138426
+ void options.inputEnded?.then(async () => {
138427
+ await mcp.close();
138428
+ });
138426
138429
  await closed;
138427
138430
  stop?.();
138428
138431
  }
@@ -138572,7 +138575,12 @@ function registerMcpCommand(program2, deps) {
138572
138575
  const flags = { writes: options.allowWrites === true, remoteControl: options.allowRemoteControl === true };
138573
138576
  const inForce = () => effectiveMcpPermissions(flags, readStoredMcpPermissions(deps.paths));
138574
138577
  const server = createMcpServer({ name: "agent-shim", version: package_default.version }, doorMcpPorts(deps.paths, inForce));
138575
- await serveMcp(server, new StdioServerTransport(), (announce) => watchMcpPermissions(deps.paths, announce));
138578
+ await serveMcp(server, new StdioServerTransport(), {
138579
+ whileConnected: (announce) => watchMcpPermissions(deps.paths, announce),
138580
+ inputEnded: new Promise((resolve2) => {
138581
+ process.stdin.once("end", resolve2);
138582
+ })
138583
+ });
138576
138584
  });
138577
138585
  withExamples(mcp, ["agent-shim mcp", "agent-shim mcp --allow-writes"]);
138578
138586
  const permissions = withExamples(
package/dist/index.cjs CHANGED
@@ -2663,7 +2663,7 @@ var init_package = __esm({
2663
2663
  "package.json"() {
2664
2664
  package_default = {
2665
2665
  name: "agent-shim",
2666
- version: "9.10.0",
2666
+ version: "9.10.1",
2667
2667
  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.",
2668
2668
  license: "MIT",
2669
2669
  author: "Joseph Mearman <joseph@mearman.co.uk>",
package/dist/index.mjs CHANGED
@@ -2639,7 +2639,7 @@ var init_package = __esm({
2639
2639
  "package.json"() {
2640
2640
  package_default = {
2641
2641
  name: "agent-shim",
2642
- version: "9.10.0",
2642
+ version: "9.10.1",
2643
2643
  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.",
2644
2644
  license: "MIT",
2645
2645
  author: "Joseph Mearman <joseph@mearman.co.uk>",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-shim",
3
- "version": "9.10.0",
3
+ "version": "9.10.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>",