lody 0.55.0 → 0.55.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.
Files changed (2) hide show
  1. package/dist/index.js +2155 -385
  2. package/package.json +9 -6
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import require$$1$4 from "async_hooks";
22
22
  import require$$1$5, { execFile, spawn as spawn$1 } from "node:child_process";
23
23
  import fs$6, { readdir, readFile, createReadStream, existsSync, readFileSync as readFileSync$1, promises } from "node:fs";
24
24
  import * as os from "node:os";
25
- import os__default$1, { homedir } from "node:os";
25
+ import os__default$1, { userInfo, homedir } from "node:os";
26
26
  import * as path$3 from "node:path";
27
27
  import path__default$1, { join as join$2, dirname as dirname$1, posix, sep as sep$1, delimiter, normalize as normalize$2, resolve as resolve$2, relative, isAbsolute } from "node:path";
28
28
  import * as util$2 from "node:util";
@@ -45,9 +45,9 @@ import * as http$2 from "http";
45
45
  import http__default from "http";
46
46
  import require$$1$7 from "https";
47
47
  import require$$3$5, { randomUUID as randomUUID$1, createHash as createHash$1, randomBytes } from "crypto";
48
- import require$$0$a, { execSync, exec, execFileSync, execFile as execFile$1 } from "child_process";
48
+ import require$$1$8, { execSync, exec, execFileSync, execFile as execFile$1 } from "child_process";
49
49
  import { randomFillSync, randomUUID, createHash } from "node:crypto";
50
- import require$$0$b from "net";
50
+ import require$$0$a from "net";
51
51
  import require$$4$3 from "tls";
52
52
  import { i as imports, _ as __wbg_set_wasm$1, r as rawWasm, L as LoroDoc, E as EphemeralStoreWasm, U as UndoManager, c as callPendingEvents$3, a as LoroTree, b as LoroText, d as LoroMovableList, e as LoroList, f as LoroMap, g as __vite__initWasm, V as VersionVector, h as decodeImportBlobMeta, __tla as __tla_0 } from "./chunks/loro_wasm_bg-ICD3atfE.js";
53
53
  import * as fs$5 from "fs/promises";
@@ -4074,7 +4074,7 @@ let __tla = Promise.all([
4074
4074
  Object.setPrototypeOf(this, TimeoutError2.prototype);
4075
4075
  }
4076
4076
  };
4077
- function callWithTimeout(promise, timeout2) {
4077
+ function callWithTimeout(promise2, timeout2) {
4078
4078
  let timeoutHandle;
4079
4079
  const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {
4080
4080
  timeoutHandle = setTimeout(function timeoutHandler() {
@@ -4082,7 +4082,7 @@ let __tla = Promise.all([
4082
4082
  }, timeout2);
4083
4083
  });
4084
4084
  return Promise.race([
4085
- promise,
4085
+ promise2,
4086
4086
  timeoutPromise
4087
4087
  ]).then((result) => {
4088
4088
  clearTimeout(timeoutHandle);
@@ -6196,7 +6196,7 @@ let __tla = Promise.all([
6196
6196
  function waitForAllMessagesAcknowledged() {
6197
6197
  const timer2 = setInterval(() => {
6198
6198
  }, 1e3);
6199
- const promise = new Promise((resolve2) => {
6199
+ const promise2 = new Promise((resolve2) => {
6200
6200
  resolveFn = resolve2;
6201
6201
  }).then(() => {
6202
6202
  clearInterval(timer2);
@@ -6204,7 +6204,7 @@ let __tla = Promise.all([
6204
6204
  if (pendingAckCount === 0) {
6205
6205
  resolveFn();
6206
6206
  }
6207
- return promise;
6207
+ return promise2;
6208
6208
  }
6209
6209
  const addHookMessagePort = port2;
6210
6210
  const registerOptions = {
@@ -6718,11 +6718,11 @@ let __tla = Promise.all([
6718
6718
  ];
6719
6719
  return internalTypes$8;
6720
6720
  }
6721
- var error$3;
6722
- var hasRequiredError$2;
6723
- function requireError$2() {
6724
- if (hasRequiredError$2) return error$3;
6725
- hasRequiredError$2 = 1;
6721
+ var error$4;
6722
+ var hasRequiredError$3;
6723
+ function requireError$3() {
6724
+ if (hasRequiredError$3) return error$4;
6725
+ hasRequiredError$3 = 1;
6726
6726
  var util2 = require$$0$5;
6727
6727
  function ParseError(message, input2) {
6728
6728
  Error.captureStackTrace(this, ParseError);
@@ -6731,8 +6731,8 @@ let __tla = Promise.all([
6731
6731
  this.input = input2;
6732
6732
  }
6733
6733
  util2.inherits(ParseError, Error);
6734
- error$3 = ParseError;
6735
- return error$3;
6734
+ error$4 = ParseError;
6735
+ return error$4;
6736
6736
  }
6737
6737
  var ascii;
6738
6738
  var hasRequiredAscii;
@@ -6765,7 +6765,7 @@ let __tla = Promise.all([
6765
6765
  if (hasRequiredForwardedParse) return forwardedParse;
6766
6766
  hasRequiredForwardedParse = 1;
6767
6767
  var util2 = require$$0$5;
6768
- var ParseError = requireError$2();
6768
+ var ParseError = requireError$3();
6769
6769
  var ascii2 = requireAscii();
6770
6770
  var isDelimiter = ascii2.isDelimiter;
6771
6771
  var isTokenChar = ascii2.isTokenChar;
@@ -8174,7 +8174,7 @@ let __tla = Promise.all([
8174
8174
  function warn$1(...args2) {
8175
8175
  _maybeLog("warn", ...args2);
8176
8176
  }
8177
- function error$2(...args2) {
8177
+ function error$3(...args2) {
8178
8178
  _maybeLog("error", ...args2);
8179
8179
  }
8180
8180
  function _maybeLog(level, ...args2) {
@@ -8203,7 +8203,7 @@ let __tla = Promise.all([
8203
8203
  isEnabled: isEnabled$2,
8204
8204
  log: log$1,
8205
8205
  warn: warn$1,
8206
- error: error$2
8206
+ error: error$3
8207
8207
  };
8208
8208
  const STACKTRACE_FRAME_LIMIT = 50;
8209
8209
  const UNKNOWN_FUNCTION = "?";
@@ -21569,7 +21569,7 @@ Event: ${getEventDescription(event)}`);
21569
21569
  return list.some((matcher2) => isMatchingReason(matcher2, errorInfo));
21570
21570
  }
21571
21571
  function makeUnhandledPromiseHandler(client, options) {
21572
- return function sendUnhandledPromise(reason, promise) {
21572
+ return function sendUnhandledPromise(reason, promise2) {
21573
21573
  if (getClient() !== client) {
21574
21574
  return;
21575
21575
  }
@@ -21581,7 +21581,7 @@ Event: ${getEventDescription(event)}`);
21581
21581
  const activeSpanWrapper = activeSpanForError ? (fn) => withActiveSpan$1(activeSpanForError, fn) : (fn) => fn();
21582
21582
  activeSpanWrapper(() => {
21583
21583
  captureException$1(reason, {
21584
- originalException: promise,
21584
+ originalException: promise2,
21585
21585
  captureContext: {
21586
21586
  extra: {
21587
21587
  unhandledPromiseRejection: true
@@ -36822,10 +36822,10 @@ Mongoose Error Code: ${error2.code}` : ""}`
36822
36822
  return client;
36823
36823
  }
36824
36824
  const name = "lody";
36825
- const version$4 = "0.55.0";
36825
+ const version$4 = "0.55.2";
36826
36826
  const description$1 = "Lody Agent CLI tool for managing remote command execution";
36827
36827
  const type$2 = "module";
36828
- const main$3 = "dist/index.js";
36828
+ const main$4 = "dist/index.js";
36829
36829
  const bin = {
36830
36830
  "lody": "dist/index.js"
36831
36831
  };
@@ -36865,7 +36865,7 @@ Mongoose Error Code: ${error2.code}` : ""}`
36865
36865
  "node": ">=18.0.0"
36866
36866
  };
36867
36867
  const optionalDependencies = {
36868
- "acp-extension-claude": "0.37.0",
36868
+ "acp-extension-claude": "0.39.0",
36869
36869
  "acp-extension-codex": "0.15.0"
36870
36870
  };
36871
36871
  const devDependencies = {
@@ -36930,12 +36930,15 @@ Mongoose Error Code: ${error2.code}` : ""}`
36930
36930
  "README.md",
36931
36931
  "LICENSE"
36932
36932
  ];
36933
+ const dependencies$1 = {
36934
+ "shell-env": "^4.0.3"
36935
+ };
36933
36936
  const pkg = {
36934
36937
  name,
36935
36938
  version: version$4,
36936
36939
  description: description$1,
36937
36940
  type: type$2,
36938
- main: main$3,
36941
+ main: main$4,
36939
36942
  bin,
36940
36943
  scripts,
36941
36944
  keywords,
@@ -36944,7 +36947,8 @@ Mongoose Error Code: ${error2.code}` : ""}`
36944
36947
  engines,
36945
36948
  optionalDependencies,
36946
36949
  devDependencies,
36947
- files
36950
+ files,
36951
+ dependencies: dependencies$1
36948
36952
  };
36949
36953
  const normalizeRuntimeEnv = (value) => {
36950
36954
  switch (value?.toLowerCase()) {
@@ -37016,11 +37020,11 @@ Mongoose Error Code: ${error2.code}` : ""}`
37016
37020
  const isSentryEnabled = () => sentryEnabled;
37017
37021
  var commander$1 = {};
37018
37022
  var argument = {};
37019
- var error$1 = {};
37020
- var hasRequiredError$1;
37021
- function requireError$1() {
37022
- if (hasRequiredError$1) return error$1;
37023
- hasRequiredError$1 = 1;
37023
+ var error$2 = {};
37024
+ var hasRequiredError$2;
37025
+ function requireError$2() {
37026
+ if (hasRequiredError$2) return error$2;
37027
+ hasRequiredError$2 = 1;
37024
37028
  class CommanderError2 extends Error {
37025
37029
  constructor(exitCode, code2, message) {
37026
37030
  super(message);
@@ -37038,15 +37042,15 @@ Mongoose Error Code: ${error2.code}` : ""}`
37038
37042
  this.name = this.constructor.name;
37039
37043
  }
37040
37044
  }
37041
- error$1.CommanderError = CommanderError2;
37042
- error$1.InvalidArgumentError = InvalidArgumentError2;
37043
- return error$1;
37045
+ error$2.CommanderError = CommanderError2;
37046
+ error$2.InvalidArgumentError = InvalidArgumentError2;
37047
+ return error$2;
37044
37048
  }
37045
37049
  var hasRequiredArgument;
37046
37050
  function requireArgument() {
37047
37051
  if (hasRequiredArgument) return argument;
37048
37052
  hasRequiredArgument = 1;
37049
- const { InvalidArgumentError: InvalidArgumentError2 } = requireError$1();
37053
+ const { InvalidArgumentError: InvalidArgumentError2 } = requireError$2();
37050
37054
  class Argument2 {
37051
37055
  constructor(name2, description2) {
37052
37056
  this.description = description2 || "";
@@ -37124,7 +37128,7 @@ Mongoose Error Code: ${error2.code}` : ""}`
37124
37128
  argument.humanReadableArgName = humanReadableArgName;
37125
37129
  return argument;
37126
37130
  }
37127
- var command = {};
37131
+ var command$1 = {};
37128
37132
  var help = {};
37129
37133
  var hasRequiredHelp;
37130
37134
  function requireHelp() {
@@ -37386,7 +37390,7 @@ Mongoose Error Code: ${error2.code}` : ""}`
37386
37390
  function requireOption() {
37387
37391
  if (hasRequiredOption) return option;
37388
37392
  hasRequiredOption = 1;
37389
- const { InvalidArgumentError: InvalidArgumentError2 } = requireError$1();
37393
+ const { InvalidArgumentError: InvalidArgumentError2 } = requireError$2();
37390
37394
  class Option2 {
37391
37395
  constructor(flags, description2) {
37392
37396
  this.flags = flags;
@@ -37615,17 +37619,17 @@ Mongoose Error Code: ${error2.code}` : ""}`
37615
37619
  suggestSimilar.suggestSimilar = suggestSimilar$1;
37616
37620
  return suggestSimilar;
37617
37621
  }
37618
- var hasRequiredCommand;
37619
- function requireCommand() {
37620
- if (hasRequiredCommand) return command;
37621
- hasRequiredCommand = 1;
37622
+ var hasRequiredCommand$1;
37623
+ function requireCommand$1() {
37624
+ if (hasRequiredCommand$1) return command$1;
37625
+ hasRequiredCommand$1 = 1;
37622
37626
  const EventEmitter2 = require$$0$7.EventEmitter;
37623
37627
  const childProcess = require$$1$5;
37624
37628
  const path2 = path__default$1;
37625
37629
  const fs2 = fs$6;
37626
37630
  const process2 = process$3;
37627
37631
  const { Argument: Argument2, humanReadableArgName } = requireArgument();
37628
- const { CommanderError: CommanderError2 } = requireError$1();
37632
+ const { CommanderError: CommanderError2 } = requireError$2();
37629
37633
  const { Help: Help2 } = requireHelp();
37630
37634
  const { Option: Option2, DualOptions } = requireOption();
37631
37635
  const { suggestSimilar: suggestSimilar2 } = requireSuggestSimilar();
@@ -38294,14 +38298,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
38294
38298
  });
38295
38299
  this.processedArgs = processedArgs;
38296
38300
  }
38297
- _chainOrCall(promise, fn) {
38298
- if (promise && promise.then && typeof promise.then === "function") {
38299
- return promise.then(() => fn());
38301
+ _chainOrCall(promise2, fn) {
38302
+ if (promise2 && promise2.then && typeof promise2.then === "function") {
38303
+ return promise2.then(() => fn());
38300
38304
  }
38301
38305
  return fn();
38302
38306
  }
38303
- _chainOrCallHooks(promise, event) {
38304
- let result = promise;
38307
+ _chainOrCallHooks(promise2, event) {
38308
+ let result = promise2;
38305
38309
  const hooks2 = [];
38306
38310
  this._getCommandAndAncestors().reverse().filter((cmd) => cmd._lifeCycleHooks[event] !== void 0).forEach((hookedCommand) => {
38307
38311
  hookedCommand._lifeCycleHooks[event].forEach((callback) => {
@@ -38321,8 +38325,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
38321
38325
  });
38322
38326
  return result;
38323
38327
  }
38324
- _chainOrCallSubCommandHook(promise, subCommand, event) {
38325
- let result = promise;
38328
+ _chainOrCallSubCommandHook(promise2, subCommand, event) {
38329
+ let result = promise2;
38326
38330
  if (this._lifeCycleHooks[event] !== void 0) {
38327
38331
  this._lifeCycleHooks[event].forEach((hook) => {
38328
38332
  result = this._chainOrCall(result, () => {
@@ -38901,16 +38905,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
38901
38905
  return arg;
38902
38906
  });
38903
38907
  }
38904
- command.Command = Command2;
38905
- return command;
38908
+ command$1.Command = Command2;
38909
+ return command$1;
38906
38910
  }
38907
38911
  var hasRequiredCommander;
38908
38912
  function requireCommander() {
38909
38913
  if (hasRequiredCommander) return commander$1;
38910
38914
  hasRequiredCommander = 1;
38911
38915
  const { Argument: Argument2 } = requireArgument();
38912
- const { Command: Command2 } = requireCommand();
38913
- const { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = requireError$1();
38916
+ const { Command: Command2 } = requireCommand$1();
38917
+ const { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = requireError$2();
38914
38918
  const { Help: Help2 } = requireHelp();
38915
38919
  const { Option: Option2 } = requireOption();
38916
38920
  commander$1.program = new Command2();
@@ -39253,7 +39257,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
39253
39257
  const terminatorPosition = argv.indexOf("--");
39254
39258
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
39255
39259
  }
39256
- const { env: env$1 } = process$3;
39260
+ const { env: env$2 } = process$3;
39257
39261
  let flagForceColor;
39258
39262
  if (hasFlag$2("no-color") || hasFlag$2("no-colors") || hasFlag$2("color=false") || hasFlag$2("color=never")) {
39259
39263
  flagForceColor = 0;
@@ -39261,14 +39265,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
39261
39265
  flagForceColor = 1;
39262
39266
  }
39263
39267
  function envForceColor() {
39264
- if ("FORCE_COLOR" in env$1) {
39265
- if (env$1.FORCE_COLOR === "true") {
39268
+ if ("FORCE_COLOR" in env$2) {
39269
+ if (env$2.FORCE_COLOR === "true") {
39266
39270
  return 1;
39267
39271
  }
39268
- if (env$1.FORCE_COLOR === "false") {
39272
+ if (env$2.FORCE_COLOR === "false") {
39269
39273
  return 0;
39270
39274
  }
39271
- return env$1.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env$1.FORCE_COLOR, 10), 3);
39275
+ return env$2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env$2.FORCE_COLOR, 10), 3);
39272
39276
  }
39273
39277
  }
39274
39278
  function translateLevel(level) {
@@ -39299,14 +39303,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
39299
39303
  return 2;
39300
39304
  }
39301
39305
  }
39302
- if ("TF_BUILD" in env$1 && "AGENT_NAME" in env$1) {
39306
+ if ("TF_BUILD" in env$2 && "AGENT_NAME" in env$2) {
39303
39307
  return 1;
39304
39308
  }
39305
39309
  if (haveStream && !streamIsTTY && forceColor === void 0) {
39306
39310
  return 0;
39307
39311
  }
39308
39312
  const min2 = forceColor || 0;
39309
- if (env$1.TERM === "dumb") {
39313
+ if (env$2.TERM === "dumb") {
39310
39314
  return min2;
39311
39315
  }
39312
39316
  if (process$3.platform === "win32") {
@@ -39316,12 +39320,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
39316
39320
  }
39317
39321
  return 1;
39318
39322
  }
39319
- if ("CI" in env$1) {
39323
+ if ("CI" in env$2) {
39320
39324
  if ([
39321
39325
  "GITHUB_ACTIONS",
39322
39326
  "GITEA_ACTIONS",
39323
39327
  "CIRCLECI"
39324
- ].some((key2) => key2 in env$1)) {
39328
+ ].some((key2) => key2 in env$2)) {
39325
39329
  return 3;
39326
39330
  }
39327
39331
  if ([
@@ -39330,29 +39334,29 @@ Expecting one of '${allowedValues.join("', '")}'`);
39330
39334
  "GITLAB_CI",
39331
39335
  "BUILDKITE",
39332
39336
  "DRONE"
39333
- ].some((sign2) => sign2 in env$1) || env$1.CI_NAME === "codeship") {
39337
+ ].some((sign2) => sign2 in env$2) || env$2.CI_NAME === "codeship") {
39334
39338
  return 1;
39335
39339
  }
39336
39340
  return min2;
39337
39341
  }
39338
- if ("TEAMCITY_VERSION" in env$1) {
39339
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0;
39342
+ if ("TEAMCITY_VERSION" in env$2) {
39343
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$2.TEAMCITY_VERSION) ? 1 : 0;
39340
39344
  }
39341
- if (env$1.COLORTERM === "truecolor") {
39345
+ if (env$2.COLORTERM === "truecolor") {
39342
39346
  return 3;
39343
39347
  }
39344
- if (env$1.TERM === "xterm-kitty") {
39348
+ if (env$2.TERM === "xterm-kitty") {
39345
39349
  return 3;
39346
39350
  }
39347
- if (env$1.TERM === "xterm-ghostty") {
39351
+ if (env$2.TERM === "xterm-ghostty") {
39348
39352
  return 3;
39349
39353
  }
39350
- if (env$1.TERM === "wezterm") {
39354
+ if (env$2.TERM === "wezterm") {
39351
39355
  return 3;
39352
39356
  }
39353
- if ("TERM_PROGRAM" in env$1) {
39354
- const version2 = Number.parseInt((env$1.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
39355
- switch (env$1.TERM_PROGRAM) {
39357
+ if ("TERM_PROGRAM" in env$2) {
39358
+ const version2 = Number.parseInt((env$2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
39359
+ switch (env$2.TERM_PROGRAM) {
39356
39360
  case "iTerm.app": {
39357
39361
  return version2 >= 3 ? 3 : 2;
39358
39362
  }
@@ -39361,13 +39365,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
39361
39365
  }
39362
39366
  }
39363
39367
  }
39364
- if (/-256(color)?$/i.test(env$1.TERM)) {
39368
+ if (/-256(color)?$/i.test(env$2.TERM)) {
39365
39369
  return 2;
39366
39370
  }
39367
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) {
39371
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$2.TERM)) {
39368
39372
  return 1;
39369
39373
  }
39370
- if ("COLORTERM" in env$1) {
39374
+ if ("COLORTERM" in env$2) {
39371
39375
  return 1;
39372
39376
  }
39373
39377
  return min2;
@@ -39583,13 +39587,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
39583
39587
  node$1 = require$$0$5.deprecate;
39584
39588
  return node$1;
39585
39589
  }
39586
- var stream$6;
39587
- var hasRequiredStream$6;
39588
- function requireStream$6() {
39589
- if (hasRequiredStream$6) return stream$6;
39590
- hasRequiredStream$6 = 1;
39591
- stream$6 = require$$0$8;
39592
- return stream$6;
39590
+ var stream$7;
39591
+ var hasRequiredStream$7;
39592
+ function requireStream$7() {
39593
+ if (hasRequiredStream$7) return stream$7;
39594
+ hasRequiredStream$7 = 1;
39595
+ stream$7 = require$$0$8;
39596
+ return stream$7;
39593
39597
  }
39594
39598
  var destroy_1;
39595
39599
  var hasRequiredDestroy;
@@ -40599,18 +40603,18 @@ Expecting one of '${allowedValues.join("', '")}'`);
40599
40603
  });
40600
40604
  }
40601
40605
  var lastPromise = this[kLastPromise];
40602
- var promise;
40606
+ var promise2;
40603
40607
  if (lastPromise) {
40604
- promise = new Promise(wrapForNext(lastPromise, this));
40608
+ promise2 = new Promise(wrapForNext(lastPromise, this));
40605
40609
  } else {
40606
40610
  var data = this[kStream].read();
40607
40611
  if (data !== null) {
40608
40612
  return Promise.resolve(createIterResult(data, false));
40609
40613
  }
40610
- promise = new Promise(this[kHandlePromise]);
40614
+ promise2 = new Promise(this[kHandlePromise]);
40611
40615
  }
40612
- this[kLastPromise] = promise;
40613
- return promise;
40616
+ this[kLastPromise] = promise2;
40617
+ return promise2;
40614
40618
  }
40615
40619
  }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() {
40616
40620
  return this;
@@ -40826,7 +40830,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
40826
40830
  var EElistenerCount = function EElistenerCount2(emitter, type2) {
40827
40831
  return emitter.listeners(type2).length;
40828
40832
  };
40829
- var Stream = requireStream$6();
40833
+ var Stream = requireStream$7();
40830
40834
  var Buffer2 = require$$0$9.Buffer;
40831
40835
  var OurUint8Array = (typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
40832
40836
  };
@@ -41639,7 +41643,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
41639
41643
  var internalUtil = {
41640
41644
  deprecate: requireNode$1()
41641
41645
  };
41642
- var Stream = requireStream$6();
41646
+ var Stream = requireStream$7();
41643
41647
  var Buffer2 = require$$0$9.Buffer;
41644
41648
  var OurUint8Array = (typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
41645
41649
  };
@@ -45305,8 +45309,8 @@ ${originalIndentation}`;
45305
45309
  if ((0, _wrapAsync.isAsync)(func)) {
45306
45310
  return function(...args2) {
45307
45311
  const callback = args2.pop();
45308
- const promise = func.apply(this, args2);
45309
- return handlePromise(promise, callback);
45312
+ const promise2 = func.apply(this, args2);
45313
+ return handlePromise(promise2, callback);
45310
45314
  };
45311
45315
  }
45312
45316
  return (0, _initialParams2.default)(function(args2, callback) {
@@ -45323,8 +45327,8 @@ ${originalIndentation}`;
45323
45327
  }
45324
45328
  });
45325
45329
  }
45326
- function handlePromise(promise, callback) {
45327
- return promise.then((value) => {
45330
+ function handlePromise(promise2, callback) {
45331
+ return promise2.then((value) => {
45328
45332
  invokeCallback(callback, null, value);
45329
45333
  }, (err2) => {
45330
45334
  invokeCallback(callback, err2 && (err2 instanceof Error || err2.message) ? err2 : new Error(err2));
@@ -49610,16 +49614,16 @@ ${originalIndentation}`;
49610
49614
  isStream_1 = isStream;
49611
49615
  return isStream_1;
49612
49616
  }
49613
- var stream$5;
49614
- var hasRequiredStream$5;
49615
- function requireStream$5() {
49616
- if (hasRequiredStream$5) return stream$5;
49617
- hasRequiredStream$5 = 1;
49617
+ var stream$6;
49618
+ var hasRequiredStream$6;
49619
+ function requireStream$6() {
49620
+ if (hasRequiredStream$6) return stream$6;
49621
+ hasRequiredStream$6 = 1;
49618
49622
  const isStream = requireIsStream();
49619
49623
  const { MESSAGE } = requireTripleBeam();
49620
49624
  const os2 = os__default;
49621
49625
  const TransportStream = requireWinstonTransport();
49622
- stream$5 = class Stream extends TransportStream {
49626
+ stream$6 = class Stream extends TransportStream {
49623
49627
  constructor(options = {}) {
49624
49628
  super(options);
49625
49629
  if (!options.stream || !isStream(options.stream)) {
@@ -49646,7 +49650,7 @@ ${originalIndentation}`;
49646
49650
  return;
49647
49651
  }
49648
49652
  };
49649
- return stream$5;
49653
+ return stream$6;
49650
49654
  }
49651
49655
  var hasRequiredTransports;
49652
49656
  function requireTransports() {
@@ -49678,7 +49682,7 @@ ${originalIndentation}`;
49678
49682
  configurable: true,
49679
49683
  enumerable: true,
49680
49684
  get() {
49681
- return requireStream$5();
49685
+ return requireStream$6();
49682
49686
  }
49683
49687
  });
49684
49688
  })(transports);
@@ -57090,7 +57094,7 @@ ${info.stack}`;
57090
57094
  function requireCrossSpawn() {
57091
57095
  if (hasRequiredCrossSpawn) return crossSpawn.exports;
57092
57096
  hasRequiredCrossSpawn = 1;
57093
- const cp = require$$0$a;
57097
+ const cp = require$$1$8;
57094
57098
  const parse2 = requireParse$2();
57095
57099
  const enoent2 = requireEnoent();
57096
57100
  function spawn2(command2, args2, options) {
@@ -57212,7 +57216,7 @@ ${fromBody}`;
57212
57216
  return to2;
57213
57217
  }
57214
57218
  const calledFunctions = /* @__PURE__ */ new WeakMap();
57215
- const onetime = (function_, options = {}) => {
57219
+ const onetime$1 = (function_, options = {}) => {
57216
57220
  if (typeof function_ !== "function") {
57217
57221
  throw new TypeError("Expected a function");
57218
57222
  }
@@ -57233,19 +57237,19 @@ ${fromBody}`;
57233
57237
  calledFunctions.set(onetime2, callCount);
57234
57238
  return onetime2;
57235
57239
  };
57236
- onetime.callCount = (function_) => {
57240
+ onetime$1.callCount = (function_) => {
57237
57241
  if (!calledFunctions.has(function_)) {
57238
57242
  throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
57239
57243
  }
57240
57244
  return calledFunctions.get(function_);
57241
57245
  };
57242
- const signals = [];
57243
- signals.push("SIGHUP", "SIGINT", "SIGTERM");
57246
+ const signals$2 = [];
57247
+ signals$2.push("SIGHUP", "SIGINT", "SIGTERM");
57244
57248
  if (process.platform !== "win32") {
57245
- signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
57249
+ signals$2.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
57246
57250
  }
57247
57251
  if (process.platform === "linux") {
57248
- signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
57252
+ signals$2.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
57249
57253
  }
57250
57254
  const processOk = (process2) => !!process2 && typeof process2 === "object" && typeof process2.removeListener === "function" && typeof process2.emit === "function" && typeof process2.reallyExit === "function" && typeof process2.listeners === "function" && typeof process2.kill === "function" && typeof process2.pid === "number" && typeof process2.on === "function";
57251
57255
  const kExitEmitter = Symbol.for("signal-exit emitter");
@@ -57340,7 +57344,7 @@ ${fromBody}`;
57340
57344
  super();
57341
57345
  this.#process = process2;
57342
57346
  this.#sigListeners = {};
57343
- for (const sig of signals) {
57347
+ for (const sig of signals$2) {
57344
57348
  this.#sigListeners[sig] = () => {
57345
57349
  const listeners = this.#process.listeners(sig);
57346
57350
  let { count: count2 } = this.#emitter;
@@ -57382,7 +57386,7 @@ ${fromBody}`;
57382
57386
  }
57383
57387
  this.#loaded = true;
57384
57388
  this.#emitter.count += 1;
57385
- for (const sig of signals) {
57389
+ for (const sig of signals$2) {
57386
57390
  try {
57387
57391
  const fn = this.#sigListeners[sig];
57388
57392
  if (fn) this.#process.on(sig, fn);
@@ -57401,7 +57405,7 @@ ${fromBody}`;
57401
57405
  return;
57402
57406
  }
57403
57407
  this.#loaded = false;
57404
- signals.forEach((sig) => {
57408
+ signals$2.forEach((sig) => {
57405
57409
  const listener = this.#sigListeners[sig];
57406
57410
  if (!listener) {
57407
57411
  throw new Error("Listener not defined for signal: " + sig);
@@ -57440,7 +57444,7 @@ ${fromBody}`;
57440
57444
  const process$2 = globalThis.process;
57441
57445
  const { onExit: onExit$2 } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
57442
57446
  const terminal = process$3.stderr.isTTY ? process$3.stderr : process$3.stdout.isTTY ? process$3.stdout : void 0;
57443
- const restoreCursor = terminal ? onetime(() => {
57447
+ const restoreCursor = terminal ? onetime$1(() => {
57444
57448
  onExit$2(() => {
57445
57449
  terminal.write("\x1B[?25h");
57446
57450
  }, {
@@ -59208,7 +59212,7 @@ ${fromBody}`;
59208
59212
  }
59209
59213
  return Boolean(process$3.env.CI) || Boolean(process$3.env.WT_SESSION) || Boolean(process$3.env.TERMINUS_SUBLIME) || process$3.env.ConEmuTask === "{cmd::Cmder}" || process$3.env.TERM_PROGRAM === "Terminus-Sublime" || process$3.env.TERM_PROGRAM === "vscode" || process$3.env.TERM === "xterm-256color" || process$3.env.TERM === "alacritty" || process$3.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
59210
59214
  }
59211
- const main$2 = {
59215
+ const main$3 = {
59212
59216
  info: chalk.blue("\u2139"),
59213
59217
  success: chalk.green("\u2714"),
59214
59218
  warning: chalk.yellow("\u26A0"),
@@ -59220,7 +59224,7 @@ ${fromBody}`;
59220
59224
  warning: chalk.yellow("\u203C"),
59221
59225
  error: chalk.red("\xD7")
59222
59226
  };
59223
- const logSymbols = isUnicodeSupported$2() ? main$2 : fallback;
59227
+ const logSymbols = isUnicodeSupported$2() ? main$3 : fallback;
59224
59228
  function ansiRegex$1({ onlyFirst = false } = {}) {
59225
59229
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
59226
59230
  const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
@@ -65216,7 +65220,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
65216
65220
  }
65217
65221
  const _envShim = /* @__PURE__ */ Object.create(null);
65218
65222
  const _getEnv = (useShim) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (useShim ? _envShim : globalThis);
65219
- const env = new Proxy(_envShim, {
65223
+ const env$1 = new Proxy(_envShim, {
65220
65224
  get(_2, prop) {
65221
65225
  return _getEnv()[prop] ?? _envShim[prop];
65222
65226
  },
@@ -65306,13 +65310,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
65306
65310
  }
65307
65311
  if (getEnvVar("NODE_DISABLE_COLORS") !== void 0 && getEnvVar("NODE_DISABLE_COLORS") !== "" || getEnvVar("NO_COLOR") !== void 0 && getEnvVar("NO_COLOR") !== "" || getEnvVar("TERM") === "dumb") return COLORS_2;
65308
65312
  if (getEnvVar("TMUX")) return COLORS_16m;
65309
- if ("TF_BUILD" in env && "AGENT_NAME" in env) return COLORS_16;
65310
- if ("CI" in env) {
65311
- for (const { 0: envName, 1: colors2 } of CI_ENVS_MAP) if (envName in env) return colors2;
65313
+ if ("TF_BUILD" in env$1 && "AGENT_NAME" in env$1) return COLORS_16;
65314
+ if ("CI" in env$1) {
65315
+ for (const { 0: envName, 1: colors2 } of CI_ENVS_MAP) if (envName in env$1) return colors2;
65312
65316
  if (getEnvVar("CI_NAME") === "codeship") return COLORS_256;
65313
65317
  return COLORS_2;
65314
65318
  }
65315
- if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(getEnvVar("TEAMCITY_VERSION")) !== null ? COLORS_16 : COLORS_2;
65319
+ if ("TEAMCITY_VERSION" in env$1) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(getEnvVar("TEAMCITY_VERSION")) !== null ? COLORS_16 : COLORS_2;
65316
65320
  switch (getEnvVar("TERM_PROGRAM")) {
65317
65321
  case "iTerm.app":
65318
65322
  if (!getEnvVar("TERM_PROGRAM_VERSION") || /^[0-2]\./.exec(getEnvVar("TERM_PROGRAM_VERSION")) !== null) return COLORS_256;
@@ -65489,7 +65493,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
65489
65493
  function getBaseURL(url, path2, request, loadEnv2, trustedProxyHeaders) {
65490
65494
  if (url) return withPath(url, path2);
65491
65495
  {
65492
- const fromEnv2 = env.BETTER_AUTH_URL || env.NEXT_PUBLIC_BETTER_AUTH_URL || env.PUBLIC_BETTER_AUTH_URL || env.NUXT_PUBLIC_BETTER_AUTH_URL || env.NUXT_PUBLIC_AUTH_URL || (env.BASE_URL !== "/" ? env.BASE_URL : void 0);
65496
+ const fromEnv2 = env$1.BETTER_AUTH_URL || env$1.NEXT_PUBLIC_BETTER_AUTH_URL || env$1.PUBLIC_BETTER_AUTH_URL || env$1.NUXT_PUBLIC_BETTER_AUTH_URL || env$1.NUXT_PUBLIC_AUTH_URL || (env$1.BASE_URL !== "/" ? env$1.BASE_URL : void 0);
65493
65497
  if (fromEnv2) return withPath(fromEnv2, path2);
65494
65498
  }
65495
65499
  if (typeof window !== "undefined" && window.location) return withPath(window.location.origin, path2);
@@ -79170,7 +79174,7 @@ Task description:
79170
79174
  {
79171
79175
  id: "amp-acp",
79172
79176
  name: "Amp",
79173
- version: "0.7.0",
79177
+ version: "0.8.0",
79174
79178
  description: "ACP wrapper for Amp - the frontier coding agent",
79175
79179
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/amp-acp.svg",
79176
79180
  distribution: {
@@ -79189,12 +79193,12 @@ Task description:
79189
79193
  {
79190
79194
  id: "auggie",
79191
79195
  name: "Auggie CLI",
79192
- version: "0.27.2",
79196
+ version: "0.28.0",
79193
79197
  description: "Augment Code's powerful software agent, backed by industry-leading context engine",
79194
79198
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/auggie.svg",
79195
79199
  distribution: {
79196
79200
  npx: {
79197
- package: "@augmentcode/auggie@0.27.2",
79201
+ package: "@augmentcode/auggie@0.28.0",
79198
79202
  args: [
79199
79203
  "--acp"
79200
79204
  ],
@@ -79219,12 +79223,12 @@ Task description:
79219
79223
  {
79220
79224
  id: "cline",
79221
79225
  name: "Cline",
79222
- version: "3.0.7",
79226
+ version: "3.0.14",
79223
79227
  description: "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more",
79224
79228
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/cline.svg",
79225
79229
  distribution: {
79226
79230
  npx: {
79227
- package: "cline@3.0.7",
79231
+ package: "cline@3.0.14",
79228
79232
  args: [
79229
79233
  "--acp"
79230
79234
  ]
@@ -79234,12 +79238,12 @@ Task description:
79234
79238
  {
79235
79239
  id: "codebuddy-code",
79236
79240
  name: "Codebuddy Code",
79237
- version: "2.97.3",
79241
+ version: "2.99.1",
79238
79242
  description: "Tencent Cloud's official intelligent coding tool",
79239
79243
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/codebuddy-code.svg",
79240
79244
  distribution: {
79241
79245
  npx: {
79242
- package: "@tencent-ai/codebuddy-code@2.97.3",
79246
+ package: "@tencent-ai/codebuddy-code@2.99.1",
79243
79247
  args: [
79244
79248
  "--acp"
79245
79249
  ]
@@ -79249,7 +79253,7 @@ Task description:
79249
79253
  {
79250
79254
  id: "cursor",
79251
79255
  name: "Cursor",
79252
- version: "2026.05.09",
79256
+ version: "2026.05.20",
79253
79257
  description: "Cursor's coding agent",
79254
79258
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/cursor.svg",
79255
79259
  distribution: {
@@ -79279,12 +79283,12 @@ Task description:
79279
79283
  {
79280
79284
  id: "dimcode",
79281
79285
  name: "DimCode",
79282
- version: "0.0.66",
79286
+ version: "0.0.75",
79283
79287
  description: "A coding agent that puts leading models at your command.",
79284
79288
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/dimcode.svg",
79285
79289
  distribution: {
79286
79290
  npx: {
79287
- package: "dimcode@0.0.66",
79291
+ package: "dimcode@0.0.75",
79288
79292
  args: [
79289
79293
  "acp"
79290
79294
  ]
@@ -79309,16 +79313,16 @@ Task description:
79309
79313
  {
79310
79314
  id: "factory-droid",
79311
79315
  name: "Factory Droid",
79312
- version: "0.129.0",
79316
+ version: "0.136.1",
79313
79317
  description: "Factory Droid - AI coding agent powered by Factory AI",
79314
79318
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/factory-droid.svg",
79315
79319
  distribution: {
79316
79320
  npx: {
79317
- package: "droid@0.129.0",
79321
+ package: "droid@0.136.1",
79318
79322
  args: [
79319
79323
  "exec",
79320
79324
  "--output-format",
79321
- "acp"
79325
+ "acp-daemon"
79322
79326
  ],
79323
79327
  env: {
79324
79328
  DROID_DISABLE_AUTO_UPDATE: "true",
@@ -79330,12 +79334,12 @@ Task description:
79330
79334
  {
79331
79335
  id: "fast-agent",
79332
79336
  name: "fast-agent",
79333
- version: "0.7.6",
79337
+ version: "0.7.13",
79334
79338
  description: "Code and build agents with comprehensive multi-provider support",
79335
79339
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/fast-agent.svg",
79336
79340
  distribution: {
79337
79341
  uvx: {
79338
- package: "fast-agent-acp==0.7.6",
79342
+ package: "fast-agent-acp==0.7.13",
79339
79343
  args: [
79340
79344
  "-x"
79341
79345
  ]
@@ -79345,12 +79349,12 @@ Task description:
79345
79349
  {
79346
79350
  id: "gemini",
79347
79351
  name: "Gemini CLI",
79348
- version: "0.42.0",
79352
+ version: "0.44.1",
79349
79353
  description: "Google's official CLI for Gemini",
79350
79354
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/gemini.svg",
79351
79355
  distribution: {
79352
79356
  npx: {
79353
- package: "@google/gemini-cli@0.42.0",
79357
+ package: "@google/gemini-cli@0.44.1",
79354
79358
  args: [
79355
79359
  "--acp"
79356
79360
  ]
@@ -79360,12 +79364,12 @@ Task description:
79360
79364
  {
79361
79365
  id: "github-copilot-cli",
79362
79366
  name: "GitHub Copilot",
79363
- version: "1.0.50",
79367
+ version: "1.0.55",
79364
79368
  description: "GitHub's AI pair programmer",
79365
79369
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/github-copilot-cli.svg",
79366
79370
  distribution: {
79367
79371
  npx: {
79368
- package: "@github/copilot@1.0.50",
79372
+ package: "@github/copilot@1.0.55",
79369
79373
  args: [
79370
79374
  "--acp"
79371
79375
  ]
@@ -79387,7 +79391,7 @@ Task description:
79387
79391
  {
79388
79392
  id: "goose",
79389
79393
  name: "goose",
79390
- version: "1.34.1",
79394
+ version: "1.36.0",
79391
79395
  description: "A local, extensible, open source AI agent that automates engineering tasks",
79392
79396
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/goose.svg",
79393
79397
  distribution: {
@@ -79405,7 +79409,7 @@ Task description:
79405
79409
  {
79406
79410
  id: "junie",
79407
79411
  name: "Junie",
79408
- version: "1588.20.0",
79412
+ version: "1668.43.0",
79409
79413
  description: "AI Coding Agent by JetBrains",
79410
79414
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/junie.svg",
79411
79415
  distribution: {
@@ -79423,12 +79427,12 @@ Task description:
79423
79427
  {
79424
79428
  id: "kilo",
79425
79429
  name: "Kilo",
79426
- version: "7.3.0",
79430
+ version: "7.3.16",
79427
79431
  description: "The open source coding agent",
79428
79432
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/kilo.svg",
79429
79433
  distribution: {
79430
79434
  npx: {
79431
- package: "@kilocode/cli@7.3.0",
79435
+ package: "@kilocode/cli@7.3.16",
79432
79436
  args: [
79433
79437
  "acp"
79434
79438
  ]
@@ -79438,7 +79442,7 @@ Task description:
79438
79442
  {
79439
79443
  id: "kimi",
79440
79444
  name: "Kimi CLI",
79441
- version: "1.44.0",
79445
+ version: "1.46.0",
79442
79446
  description: "Moonshot AI's coding assistant",
79443
79447
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/kimi.svg",
79444
79448
  distribution: {
@@ -79474,7 +79478,7 @@ Task description:
79474
79478
  {
79475
79479
  id: "mistral-vibe",
79476
79480
  name: "Mistral Vibe",
79477
- version: "2.9.3",
79481
+ version: "2.12.1",
79478
79482
  description: "Mistral's open-source coding assistant",
79479
79483
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/mistral-vibe.svg",
79480
79484
  distribution: {
@@ -79490,12 +79494,12 @@ Task description:
79490
79494
  {
79491
79495
  id: "nova",
79492
79496
  name: "Nova",
79493
- version: "1.1.9",
79497
+ version: "1.1.12",
79494
79498
  description: "Nova by Compass AI - a fully-fledged software engineer at your command",
79495
79499
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/nova.svg",
79496
79500
  distribution: {
79497
79501
  npx: {
79498
- package: "@compass-ai/nova@1.1.9",
79502
+ package: "@compass-ai/nova@1.1.12",
79499
79503
  args: [
79500
79504
  "acp"
79501
79505
  ]
@@ -79505,7 +79509,7 @@ Task description:
79505
79509
  {
79506
79510
  id: "opencode",
79507
79511
  name: "OpenCode",
79508
- version: "1.15.5",
79512
+ version: "1.15.12",
79509
79513
  description: "The open source coding agent",
79510
79514
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/opencode.svg",
79511
79515
  distribution: {
@@ -79550,12 +79554,12 @@ Task description:
79550
79554
  {
79551
79555
  id: "qwen-code",
79552
79556
  name: "Qwen Code",
79553
- version: "0.15.11",
79557
+ version: "0.17.0",
79554
79558
  description: "Alibaba's Qwen coding assistant",
79555
79559
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/qwen-code.svg",
79556
79560
  distribution: {
79557
79561
  npx: {
79558
- package: "@qwen-code/qwen-code@0.15.11",
79562
+ package: "@qwen-code/qwen-code@0.17.0",
79559
79563
  args: [
79560
79564
  "--acp",
79561
79565
  "--experimental-skills"
@@ -79578,7 +79582,7 @@ Task description:
79578
79582
  {
79579
79583
  id: "stakpak",
79580
79584
  name: "Stakpak",
79581
- version: "0.3.81",
79585
+ version: "0.3.82",
79582
79586
  description: "Open-source DevOps agent in Rust with enterprise-grade security",
79583
79587
  icon: "https://cdn.agentclientprotocol.com/registry/v1/latest/stakpak.svg",
79584
79588
  distribution: {
@@ -79826,6 +79830,9 @@ Task description:
79826
79830
  _meta: record(string$2(), unknown()).nullish(),
79827
79831
  terminalId: string$2()
79828
79832
  });
79833
+ const zDeleteSessionResponse = object$1({
79834
+ _meta: record(string$2(), unknown()).nullish()
79835
+ });
79829
79836
  const zDiff = object$1({
79830
79837
  _meta: record(string$2(), unknown()).nullish(),
79831
79838
  newText: string$2(),
@@ -79839,6 +79846,9 @@ Task description:
79839
79846
  const zDisableProvidersResponse = object$1({
79840
79847
  _meta: record(string$2(), unknown()).nullish()
79841
79848
  });
79849
+ const zDisconnectMcpResponse = object$1({
79850
+ _meta: record(string$2(), unknown()).nullish()
79851
+ });
79842
79852
  const zElicitationContentValue = union$3([
79843
79853
  string$2(),
79844
79854
  number$3(),
@@ -79944,7 +79954,6 @@ Task description:
79944
79954
  });
79945
79955
  const zListSessionsRequest = object$1({
79946
79956
  _meta: record(string$2(), unknown()).nullish(),
79947
- additionalDirectories: array$3(string$2()).optional(),
79948
79957
  cursor: string$2().nullish(),
79949
79958
  cwd: string$2().nullish()
79950
79959
  });
@@ -79971,9 +79980,29 @@ Task description:
79971
79980
  });
79972
79981
  const zMcpCapabilities = object$1({
79973
79982
  _meta: record(string$2(), unknown()).nullish(),
79983
+ acp: boolean().optional().default(false),
79974
79984
  http: boolean().optional().default(false),
79975
79985
  sse: boolean().optional().default(false)
79976
79986
  });
79987
+ const zMcpConnectionId = string$2();
79988
+ const zConnectMcpResponse = object$1({
79989
+ _meta: record(string$2(), unknown()).nullish(),
79990
+ connectionId: zMcpConnectionId
79991
+ });
79992
+ const zDisconnectMcpRequest = object$1({
79993
+ _meta: record(string$2(), unknown()).nullish(),
79994
+ connectionId: zMcpConnectionId
79995
+ });
79996
+ const zMcpServerAcpId = string$2();
79997
+ const zConnectMcpRequest = object$1({
79998
+ _meta: record(string$2(), unknown()).nullish(),
79999
+ acpId: zMcpServerAcpId
80000
+ });
80001
+ const zMcpServerAcp = object$1({
80002
+ _meta: record(string$2(), unknown()).nullish(),
80003
+ id: zMcpServerAcpId,
80004
+ name: string$2()
80005
+ });
79977
80006
  const zMcpServerHttp = object$1({
79978
80007
  _meta: record(string$2(), unknown()).nullish(),
79979
80008
  headers: array$3(zHttpHeader),
@@ -80000,8 +80029,24 @@ Task description:
80000
80029
  zMcpServerSse.and(object$1({
80001
80030
  type: literal("sse")
80002
80031
  })),
80032
+ zMcpServerAcp.and(object$1({
80033
+ type: literal("acp")
80034
+ })),
80003
80035
  zMcpServerStdio
80004
80036
  ]);
80037
+ const zMessageMcpNotification = object$1({
80038
+ _meta: record(string$2(), unknown()).nullish(),
80039
+ connectionId: zMcpConnectionId,
80040
+ method: string$2(),
80041
+ params: record(string$2(), unknown()).nullish()
80042
+ });
80043
+ const zMessageMcpRequest = object$1({
80044
+ _meta: record(string$2(), unknown()).nullish(),
80045
+ connectionId: zMcpConnectionId,
80046
+ method: string$2(),
80047
+ params: record(string$2(), unknown()).nullish()
80048
+ });
80049
+ const zMessageMcpResponse = unknown();
80005
80050
  const zModelId = string$2();
80006
80051
  const zModelInfo = object$1({
80007
80052
  _meta: record(string$2(), unknown()).nullish(),
@@ -80425,6 +80470,9 @@ Task description:
80425
80470
  _meta: record(string$2(), unknown()).nullish(),
80426
80471
  configOptions: array$3(zSessionConfigOption)
80427
80472
  });
80473
+ const zSessionDeleteCapabilities = object$1({
80474
+ _meta: record(string$2(), unknown()).nullish()
80475
+ });
80428
80476
  const zSessionForkCapabilities = object$1({
80429
80477
  _meta: record(string$2(), unknown()).nullish()
80430
80478
  });
@@ -80455,6 +80503,10 @@ Task description:
80455
80503
  outputByteLimit: number$3().nullish(),
80456
80504
  sessionId: zSessionId
80457
80505
  });
80506
+ const zDeleteSessionRequest = object$1({
80507
+ _meta: record(string$2(), unknown()).nullish(),
80508
+ sessionId: zSessionId
80509
+ });
80458
80510
  const zDidCloseDocumentNotification = object$1({
80459
80511
  _meta: record(string$2(), unknown()).nullish(),
80460
80512
  sessionId: zSessionId,
@@ -80604,6 +80656,7 @@ Task description:
80604
80656
  _meta: record(string$2(), unknown()).nullish(),
80605
80657
  additionalDirectories: zSessionAdditionalDirectoriesCapabilities.nullish(),
80606
80658
  close: zSessionCloseCapabilities.nullish(),
80659
+ delete: zSessionDeleteCapabilities.nullish(),
80607
80660
  fork: zSessionForkCapabilities.nullish(),
80608
80661
  list: zSessionListCapabilities.nullish(),
80609
80662
  resume: zSessionResumeCapabilities.nullish()
@@ -80746,6 +80799,7 @@ Task description:
80746
80799
  zDidFocusDocumentNotification,
80747
80800
  zAcceptNesNotification,
80748
80801
  zRejectNesNotification,
80802
+ zMessageMcpNotification,
80749
80803
  zExtNotification
80750
80804
  ]).nullish()
80751
80805
  });
@@ -80779,6 +80833,7 @@ Task description:
80779
80833
  auth: zAgentAuthCapabilities.optional().default({}),
80780
80834
  loadSession: boolean().optional().default(false),
80781
80835
  mcpCapabilities: zMcpCapabilities.optional().default({
80836
+ acp: false,
80782
80837
  http: false,
80783
80838
  sse: false
80784
80839
  }),
@@ -80798,6 +80853,7 @@ Task description:
80798
80853
  auth: {},
80799
80854
  loadSession: false,
80800
80855
  mcpCapabilities: {
80856
+ acp: false,
80801
80857
  http: false,
80802
80858
  sse: false
80803
80859
  },
@@ -81037,6 +81093,7 @@ Task description:
81037
81093
  zNewSessionResponse,
81038
81094
  zLoadSessionResponse,
81039
81095
  zListSessionsResponse,
81096
+ zDeleteSessionResponse,
81040
81097
  zForkSessionResponse,
81041
81098
  zResumeSessionResponse,
81042
81099
  zCloseSessionResponse,
@@ -81047,7 +81104,8 @@ Task description:
81047
81104
  zStartNesResponse,
81048
81105
  zSuggestNesResponse,
81049
81106
  zCloseNesResponse,
81050
- zExtResponse
81107
+ zExtResponse,
81108
+ zMessageMcpResponse
81051
81109
  ])
81052
81110
  }),
81053
81111
  object$1({
@@ -81106,6 +81164,7 @@ Task description:
81106
81164
  params: union$3([
81107
81165
  zSessionNotification,
81108
81166
  zCompleteElicitationNotification,
81167
+ zMessageMcpNotification,
81109
81168
  zExtNotification
81110
81169
  ]).nullish()
81111
81170
  });
@@ -81144,6 +81203,7 @@ Task description:
81144
81203
  zNewSessionRequest,
81145
81204
  zLoadSessionRequest,
81146
81205
  zListSessionsRequest,
81206
+ zDeleteSessionRequest,
81147
81207
  zForkSessionRequest,
81148
81208
  zResumeSessionRequest,
81149
81209
  zCloseSessionRequest,
@@ -81154,6 +81214,7 @@ Task description:
81154
81214
  zStartNesRequest,
81155
81215
  zSuggestNesRequest,
81156
81216
  zCloseNesRequest,
81217
+ zMessageMcpRequest,
81157
81218
  zExtRequest
81158
81219
  ]).nullish()
81159
81220
  });
@@ -81176,6 +81237,9 @@ Task description:
81176
81237
  zWaitForTerminalExitRequest,
81177
81238
  zKillTerminalRequest,
81178
81239
  zCreateElicitationRequest,
81240
+ zConnectMcpRequest,
81241
+ zMessageMcpRequest,
81242
+ zDisconnectMcpRequest,
81179
81243
  zExtRequest
81180
81244
  ]).nullish()
81181
81245
  });
@@ -81195,7 +81259,10 @@ Task description:
81195
81259
  zWaitForTerminalExitResponse,
81196
81260
  zKillTerminalResponse,
81197
81261
  zCreateElicitationResponse,
81198
- zExtResponse
81262
+ zConnectMcpResponse,
81263
+ zDisconnectMcpResponse,
81264
+ zExtResponse,
81265
+ zMessageMcpResponse
81199
81266
  ])
81200
81267
  }),
81201
81268
  object$1({
@@ -85596,7 +85663,7 @@ ${tailedOutput}` : null;
85596
85663
  const getTagNameForConversationEnd = (turnId) => {
85597
85664
  return `${turnId}:end`;
85598
85665
  };
85599
- function withSlowOperationWarning(promise, logger2, operationName, sessionId, intervalMs = 1e4) {
85666
+ function withSlowOperationWarning(promise2, logger2, operationName, sessionId, intervalMs = 1e4) {
85600
85667
  let completed = false;
85601
85668
  const startMs = Date.now();
85602
85669
  const interval2 = setInterval(() => {
@@ -85606,7 +85673,7 @@ ${tailedOutput}` : null;
85606
85673
  }
85607
85674
  }, intervalMs);
85608
85675
  interval2.unref?.();
85609
- return promise.finally(() => {
85676
+ return promise2.finally(() => {
85610
85677
  completed = true;
85611
85678
  clearInterval(interval2);
85612
85679
  });
@@ -87293,7 +87360,7 @@ ${tailedOutput}` : null;
87293
87360
  const EventEmitter2 = require$$0$6;
87294
87361
  const https2 = require$$1$7;
87295
87362
  const http2 = http__default;
87296
- const net2 = require$$0$b;
87363
+ const net2 = require$$0$a;
87297
87364
  const tls2 = require$$4$3;
87298
87365
  const { randomBytes: randomBytes2, createHash: createHash2 } = require$$3$5;
87299
87366
  const { Duplex, Readable: Readable2 } = require$$0$8;
@@ -88028,11 +88095,11 @@ ${tailedOutput}` : null;
88028
88095
  }
88029
88096
  return websocket;
88030
88097
  }
88031
- var stream$4;
88032
- var hasRequiredStream$4;
88033
- function requireStream$4() {
88034
- if (hasRequiredStream$4) return stream$4;
88035
- hasRequiredStream$4 = 1;
88098
+ var stream$5;
88099
+ var hasRequiredStream$5;
88100
+ function requireStream$5() {
88101
+ if (hasRequiredStream$5) return stream$5;
88102
+ hasRequiredStream$5 = 1;
88036
88103
  requireWebsocket();
88037
88104
  const { Duplex } = require$$0$8;
88038
88105
  function emitClose(stream2) {
@@ -88123,10 +88190,10 @@ ${tailedOutput}` : null;
88123
88190
  duplex.on("error", duplexOnError);
88124
88191
  return duplex;
88125
88192
  }
88126
- stream$4 = createWebSocketStream;
88127
- return stream$4;
88193
+ stream$5 = createWebSocketStream;
88194
+ return stream$5;
88128
88195
  }
88129
- requireStream$4();
88196
+ requireStream$5();
88130
88197
  requireReceiver();
88131
88198
  requireSender();
88132
88199
  var websocketExports = requireWebsocket();
@@ -90969,12 +91036,15 @@ ${val.stack}`;
90969
91036
  }
90970
91037
  function hydrateMetaSnapshots(legacy2, updates) {
90971
91038
  let loadedJsonUpdate = false;
90972
- const baseUpdateIndex = updates.findIndex((bytes) => isFlockFile(bytes));
90973
- let flock = baseUpdateIndex >= 0 ? Flock.fromFile(updates[baseUpdateIndex]) : void 0;
91039
+ let baseUpdateIndex = -1;
91040
+ let flock;
90974
91041
  if (legacy2) {
90975
91042
  const merged = mergeMetaSnapshot(flock, legacy2);
90976
91043
  flock = merged.flock;
90977
91044
  if (merged.format === "json") loadedJsonUpdate = true;
91045
+ } else {
91046
+ baseUpdateIndex = updates.findIndex((bytes) => isFlockFile(bytes));
91047
+ if (baseUpdateIndex >= 0) flock = Flock.fromFile(updates[baseUpdateIndex]);
90978
91048
  }
90979
91049
  for (let index2 = 0; index2 < updates.length; index2 += 1) {
90980
91050
  if (index2 === baseUpdateIndex) continue;
@@ -90989,16 +91059,15 @@ ${val.stack}`;
90989
91059
  }
90990
91060
  function mergeMetaSnapshot(flock, bytes) {
90991
91061
  if (isFlockFile(bytes)) {
90992
- const snapshot = Flock.fromFile(bytes);
90993
91062
  if (flock) {
90994
- flock.merge(snapshot);
91063
+ flock.importFile(bytes);
90995
91064
  return {
90996
91065
  flock,
90997
91066
  format: "file"
90998
91067
  };
90999
91068
  }
91000
91069
  return {
91001
- flock: snapshot,
91070
+ flock: Flock.fromFile(bytes),
91002
91071
  format: "file"
91003
91072
  };
91004
91073
  }
@@ -92149,9 +92218,7 @@ ${val.stack}`;
92149
92218
  this.incrementalUpdatesSinceCompaction = 0;
92150
92219
  this.incrementalUpdateBytesSinceCompaction = 0;
92151
92220
  } else {
92152
- const update2 = encodeMetaJsonUpdate(await flock.exportJson({
92153
- from: previousVersion
92154
- }));
92221
+ const update2 = encodeMetaJsonUpdate(flock.exportJson(previousVersion));
92155
92222
  await this.storage.save({
92156
92223
  type: "meta-update",
92157
92224
  update: update2
@@ -92284,11 +92351,9 @@ ${val.stack}`;
92284
92351
  const metaDebounceCommitMs = typeof configuredDebounceCommit === "number" && Number.isFinite(configuredDebounceCommit) && configuredDebounceCommit >= 0 ? configuredDebounceCommit : DEFAULT_META_DEBOUNCE_COMMIT_MS;
92285
92352
  const configuredMaxDebounce = options.metaMaxDebounceMs;
92286
92353
  const metaMaxDebounceMs = typeof configuredMaxDebounce === "number" && Number.isFinite(configuredMaxDebounce) && configuredMaxDebounce > 0 ? configuredMaxDebounce : void 0;
92287
- const rawMetaFlock = new Flock();
92288
- if (options.storageAdapter) {
92289
- const loaded = await options.storageAdapter.loadMeta();
92290
- if (loaded) rawMetaFlock.merge(loaded);
92291
- }
92354
+ let rawMetaFlock;
92355
+ if (options.storageAdapter) rawMetaFlock = await options.storageAdapter.loadMeta();
92356
+ rawMetaFlock ??= new Flock();
92292
92357
  configureFlockDebounce(rawMetaFlock, {
92293
92358
  debounceMs: metaDebounceCommitMs,
92294
92359
  maxDebounceMs: metaMaxDebounceMs
@@ -99526,14 +99591,14 @@ stream:${scope2.streamId}`;
99526
99591
  }
99527
99592
  return parsed;
99528
99593
  };
99529
- const withTimeout$3 = async (promise, timeoutMs, message) => {
99594
+ const withTimeout$3 = async (promise2, timeoutMs, message) => {
99530
99595
  if (timeoutMs <= 0) {
99531
- return promise;
99596
+ return promise2;
99532
99597
  }
99533
99598
  let timeout2 = null;
99534
99599
  try {
99535
99600
  return await Promise.race([
99536
- promise,
99601
+ promise2,
99537
99602
  new Promise((_resolve, reject) => {
99538
99603
  timeout2 = setTimeout(() => reject(new Error(message)), timeoutMs);
99539
99604
  })
@@ -102957,7 +103022,7 @@ stream:${scope2.streamId}`;
102957
103022
  pattern$1.isAbsolute = isAbsolute2;
102958
103023
  return pattern$1;
102959
103024
  }
102960
- var stream$3 = {};
103025
+ var stream$4 = {};
102961
103026
  var merge2_1;
102962
103027
  var hasRequiredMerge2;
102963
103028
  function requireMerge2() {
@@ -102990,10 +103055,10 @@ stream:${scope2.streamId}`;
102990
103055
  for (let i2 = 0, len2 = arguments.length; i2 < len2; i2++) {
102991
103056
  streamsQueue.push(pauseStreams(arguments[i2], options));
102992
103057
  }
102993
- mergeStream();
103058
+ mergeStream2();
102994
103059
  return this;
102995
103060
  }
102996
- function mergeStream() {
103061
+ function mergeStream2() {
102997
103062
  if (merging) {
102998
103063
  return;
102999
103064
  }
@@ -103014,7 +103079,7 @@ stream:${scope2.streamId}`;
103014
103079
  return;
103015
103080
  }
103016
103081
  merging = false;
103017
- mergeStream();
103082
+ mergeStream2();
103018
103083
  }
103019
103084
  function pipe2(stream2) {
103020
103085
  function onend() {
@@ -103081,14 +103146,14 @@ stream:${scope2.streamId}`;
103081
103146
  }
103082
103147
  return merge2_1;
103083
103148
  }
103084
- var hasRequiredStream$3;
103085
- function requireStream$3() {
103086
- if (hasRequiredStream$3) return stream$3;
103087
- hasRequiredStream$3 = 1;
103088
- Object.defineProperty(stream$3, "__esModule", {
103149
+ var hasRequiredStream$4;
103150
+ function requireStream$4() {
103151
+ if (hasRequiredStream$4) return stream$4;
103152
+ hasRequiredStream$4 = 1;
103153
+ Object.defineProperty(stream$4, "__esModule", {
103089
103154
  value: true
103090
103155
  });
103091
- stream$3.merge = void 0;
103156
+ stream$4.merge = void 0;
103092
103157
  const merge2 = requireMerge2();
103093
103158
  function merge3(streams2) {
103094
103159
  const mergedStream = merge2(streams2);
@@ -103099,11 +103164,11 @@ stream:${scope2.streamId}`;
103099
103164
  mergedStream.once("end", () => propagateCloseEventToSources(streams2));
103100
103165
  return mergedStream;
103101
103166
  }
103102
- stream$3.merge = merge3;
103167
+ stream$4.merge = merge3;
103103
103168
  function propagateCloseEventToSources(streams2) {
103104
103169
  streams2.forEach((stream2) => stream2.emit("close"));
103105
103170
  }
103106
- return stream$3;
103171
+ return stream$4;
103107
103172
  }
103108
103173
  var string$1 = {};
103109
103174
  var hasRequiredString;
@@ -103142,7 +103207,7 @@ stream:${scope2.streamId}`;
103142
103207
  utils$5.path = path2;
103143
103208
  const pattern2 = requirePattern$1();
103144
103209
  utils$5.pattern = pattern2;
103145
- const stream2 = requireStream$3();
103210
+ const stream2 = requireStream$4();
103146
103211
  utils$5.stream = stream2;
103147
103212
  const string2 = requireString();
103148
103213
  utils$5.string = string2;
@@ -103408,8 +103473,8 @@ stream:${scope2.streamId}`;
103408
103473
  function requireQueueMicrotask() {
103409
103474
  if (hasRequiredQueueMicrotask) return queueMicrotask_1;
103410
103475
  hasRequiredQueueMicrotask = 1;
103411
- let promise;
103412
- queueMicrotask_1 = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : commonjsGlobal) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err2) => setTimeout(() => {
103476
+ let promise2;
103477
+ queueMicrotask_1 = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : commonjsGlobal) : (cb) => (promise2 || (promise2 = Promise.resolve())).then(cb).catch((err2) => setTimeout(() => {
103413
103478
  throw err2;
103414
103479
  }, 0));
103415
103480
  return queueMicrotask_1;
@@ -103895,7 +103960,7 @@ stream:${scope2.streamId}`;
103895
103960
  getQueue,
103896
103961
  unshift,
103897
103962
  empty: noop2,
103898
- kill,
103963
+ kill: kill2,
103899
103964
  killAndDrain,
103900
103965
  error: error2,
103901
103966
  abort: abort2
@@ -104006,7 +104071,7 @@ stream:${scope2.streamId}`;
104006
104071
  self2.drain();
104007
104072
  }
104008
104073
  }
104009
- function kill() {
104074
+ function kill2() {
104010
104075
  queueHead = null;
104011
104076
  queueTail = null;
104012
104077
  self2.drain = noop2;
@@ -104331,12 +104396,12 @@ stream:${scope2.streamId}`;
104331
104396
  }
104332
104397
  return async$4;
104333
104398
  }
104334
- var stream$2 = {};
104335
- var hasRequiredStream$2;
104336
- function requireStream$2() {
104337
- if (hasRequiredStream$2) return stream$2;
104338
- hasRequiredStream$2 = 1;
104339
- Object.defineProperty(stream$2, "__esModule", {
104399
+ var stream$3 = {};
104400
+ var hasRequiredStream$3;
104401
+ function requireStream$3() {
104402
+ if (hasRequiredStream$3) return stream$3;
104403
+ hasRequiredStream$3 = 1;
104404
+ Object.defineProperty(stream$3, "__esModule", {
104340
104405
  value: true
104341
104406
  });
104342
104407
  const stream_1 = require$$0$8;
@@ -104371,8 +104436,8 @@ stream:${scope2.streamId}`;
104371
104436
  return this._stream;
104372
104437
  }
104373
104438
  }
104374
- stream$2.default = StreamProvider;
104375
- return stream$2;
104439
+ stream$3.default = StreamProvider;
104440
+ return stream$3;
104376
104441
  }
104377
104442
  var sync$5 = {};
104378
104443
  var sync$4 = {};
@@ -104508,7 +104573,7 @@ stream:${scope2.streamId}`;
104508
104573
  });
104509
104574
  out$3.Settings = out$3.walkStream = out$3.walkSync = out$3.walk = void 0;
104510
104575
  const async_1 = requireAsync$3();
104511
- const stream_1 = requireStream$2();
104576
+ const stream_1 = requireStream$3();
104512
104577
  const sync_1 = requireSync$2();
104513
104578
  const settings_1 = requireSettings$1();
104514
104579
  out$3.Settings = settings_1.default;
@@ -104581,12 +104646,12 @@ stream:${scope2.streamId}`;
104581
104646
  reader.default = Reader2;
104582
104647
  return reader;
104583
104648
  }
104584
- var stream$1 = {};
104585
- var hasRequiredStream$1;
104586
- function requireStream$1() {
104587
- if (hasRequiredStream$1) return stream$1;
104588
- hasRequiredStream$1 = 1;
104589
- Object.defineProperty(stream$1, "__esModule", {
104649
+ var stream$2 = {};
104650
+ var hasRequiredStream$2;
104651
+ function requireStream$2() {
104652
+ if (hasRequiredStream$2) return stream$2;
104653
+ hasRequiredStream$2 = 1;
104654
+ Object.defineProperty(stream$2, "__esModule", {
104590
104655
  value: true
104591
104656
  });
104592
104657
  const stream_1 = require$$0$8;
@@ -104639,8 +104704,8 @@ stream:${scope2.streamId}`;
104639
104704
  });
104640
104705
  }
104641
104706
  }
104642
- stream$1.default = ReaderStream;
104643
- return stream$1;
104707
+ stream$2.default = ReaderStream;
104708
+ return stream$2;
104644
104709
  }
104645
104710
  var hasRequiredAsync$2;
104646
104711
  function requireAsync$2() {
@@ -104651,7 +104716,7 @@ stream:${scope2.streamId}`;
104651
104716
  });
104652
104717
  const fsWalk = requireOut$1();
104653
104718
  const reader_1 = requireReader();
104654
- const stream_1 = requireStream$1();
104719
+ const stream_1 = requireStream$2();
104655
104720
  class ReaderAsync extends reader_1.default {
104656
104721
  constructor() {
104657
104722
  super(...arguments);
@@ -104936,12 +105001,12 @@ stream:${scope2.streamId}`;
104936
105001
  entry$1.default = EntryFilter;
104937
105002
  return entry$1;
104938
105003
  }
104939
- var error = {};
104940
- var hasRequiredError;
104941
- function requireError() {
104942
- if (hasRequiredError) return error;
104943
- hasRequiredError = 1;
104944
- Object.defineProperty(error, "__esModule", {
105004
+ var error$1 = {};
105005
+ var hasRequiredError$1;
105006
+ function requireError$1() {
105007
+ if (hasRequiredError$1) return error$1;
105008
+ hasRequiredError$1 = 1;
105009
+ Object.defineProperty(error$1, "__esModule", {
104945
105010
  value: true
104946
105011
  });
104947
105012
  const utils2 = requireUtils$3();
@@ -104956,8 +105021,8 @@ stream:${scope2.streamId}`;
104956
105021
  return utils2.errno.isEnoentCodeError(error2) || this._settings.suppressErrors;
104957
105022
  }
104958
105023
  }
104959
- error.default = ErrorFilter;
104960
- return error;
105024
+ error$1.default = ErrorFilter;
105025
+ return error$1;
104961
105026
  }
104962
105027
  var entry = {};
104963
105028
  var hasRequiredEntry;
@@ -105005,7 +105070,7 @@ stream:${scope2.streamId}`;
105005
105070
  const path2 = path__default;
105006
105071
  const deep_1 = requireDeep();
105007
105072
  const entry_1 = requireEntry$1();
105008
- const error_1 = requireError();
105073
+ const error_1 = requireError$1();
105009
105074
  const entry_2 = requireEntry();
105010
105075
  class Provider {
105011
105076
  constructor(_settings) {
@@ -105080,16 +105145,16 @@ stream:${scope2.streamId}`;
105080
105145
  async$6.default = ProviderAsync;
105081
105146
  return async$6;
105082
105147
  }
105083
- var stream = {};
105084
- var hasRequiredStream;
105085
- function requireStream() {
105086
- if (hasRequiredStream) return stream;
105087
- hasRequiredStream = 1;
105088
- Object.defineProperty(stream, "__esModule", {
105148
+ var stream$1 = {};
105149
+ var hasRequiredStream$1;
105150
+ function requireStream$1() {
105151
+ if (hasRequiredStream$1) return stream$1;
105152
+ hasRequiredStream$1 = 1;
105153
+ Object.defineProperty(stream$1, "__esModule", {
105089
105154
  value: true
105090
105155
  });
105091
105156
  const stream_1 = require$$0$8;
105092
- const stream_2 = requireStream$1();
105157
+ const stream_2 = requireStream$2();
105093
105158
  const provider_1 = requireProvider();
105094
105159
  class ProviderStream extends provider_1.default {
105095
105160
  constructor() {
@@ -105116,8 +105181,8 @@ stream:${scope2.streamId}`;
105116
105181
  return this._reader.static(task.patterns, options);
105117
105182
  }
105118
105183
  }
105119
- stream.default = ProviderStream;
105120
- return stream;
105184
+ stream$1.default = ProviderStream;
105185
+ return stream$1;
105121
105186
  }
105122
105187
  var sync$3 = {};
105123
105188
  var sync$2 = {};
@@ -105271,7 +105336,7 @@ stream:${scope2.streamId}`;
105271
105336
  hasRequiredOut = 1;
105272
105337
  const taskManager = requireTasks();
105273
105338
  const async_1 = requireAsync$1();
105274
- const stream_1 = requireStream();
105339
+ const stream_1 = requireStream$1();
105275
105340
  const sync_1 = requireSync();
105276
105341
  const settings_1 = requireSettings();
105277
105342
  const utils2 = requireUtils$3();
@@ -112825,7 +112890,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112825
112890
  interruptChildren: void 0
112826
112891
  }));
112827
112892
  const identifier = Symbol.for("effect/Micro/identifier");
112828
- const args$1 = Symbol.for("effect/Micro/args");
112893
+ const args$2 = Symbol.for("effect/Micro/args");
112829
112894
  const evaluate = Symbol.for("effect/Micro/evaluate");
112830
112895
  const successCont = Symbol.for("effect/Micro/successCont");
112831
112896
  const failureCont = Symbol.for("effect/Micro/failureCont");
@@ -112850,8 +112915,8 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112850
112915
  return {
112851
112916
  _id: "Micro",
112852
112917
  op: this[identifier],
112853
- ...args$1 in this ? {
112854
- args: this[args$1]
112918
+ ...args$2 in this ? {
112919
+ args: this[args$2]
112855
112920
  } : void 0
112856
112921
  };
112857
112922
  },
@@ -112877,7 +112942,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112877
112942
  const Proto = makePrimitiveProto(options);
112878
112943
  return function() {
112879
112944
  const self2 = Object.create(Proto);
112880
- self2[args$1] = options.single === false ? arguments : arguments[0];
112945
+ self2[args$2] = options.single === false ? arguments : arguments[0];
112881
112946
  return self2;
112882
112947
  };
112883
112948
  };
@@ -112887,25 +112952,25 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112887
112952
  [MicroExitTypeId]: MicroExitTypeId,
112888
112953
  _tag: options.op,
112889
112954
  get [options.prop]() {
112890
- return this[args$1];
112955
+ return this[args$2];
112891
112956
  },
112892
112957
  toJSON() {
112893
112958
  return {
112894
112959
  _id: "MicroExit",
112895
112960
  _tag: options.op,
112896
- [options.prop]: this[args$1]
112961
+ [options.prop]: this[args$2]
112897
112962
  };
112898
112963
  },
112899
112964
  [symbol](that) {
112900
- return isMicroExit(that) && that._tag === options.op && equals$1(this[args$1], that[args$1]);
112965
+ return isMicroExit(that) && that._tag === options.op && equals$1(this[args$2], that[args$2]);
112901
112966
  },
112902
112967
  [symbol$1]() {
112903
- return cached(this, combine$5(string(options.op))(hash(this[args$1])));
112968
+ return cached(this, combine$5(string(options.op))(hash(this[args$2])));
112904
112969
  }
112905
112970
  };
112906
112971
  return function(value) {
112907
112972
  const self2 = Object.create(Proto);
112908
- self2[args$1] = value;
112973
+ self2[args$2] = value;
112909
112974
  self2[successCont] = void 0;
112910
112975
  self2[failureCont] = void 0;
112911
112976
  self2[ensureCont] = void 0;
@@ -112917,7 +112982,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112917
112982
  prop: "value",
112918
112983
  eval(fiber) {
112919
112984
  const cont = fiber.getCont(successCont);
112920
- return cont ? cont[successCont](this[args$1], fiber) : fiber.yieldWith(this);
112985
+ return cont ? cont[successCont](this[args$2], fiber) : fiber.yieldWith(this);
112921
112986
  }
112922
112987
  });
112923
112988
  const failCause = makeExit({
@@ -112925,10 +112990,10 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112925
112990
  prop: "cause",
112926
112991
  eval(fiber) {
112927
112992
  let cont = fiber.getCont(failureCont);
112928
- while (causeIsInterrupt(this[args$1]) && cont && fiber.interruptible) {
112993
+ while (causeIsInterrupt(this[args$2]) && cont && fiber.interruptible) {
112929
112994
  cont = fiber.getCont(failureCont);
112930
112995
  }
112931
- return cont ? cont[failureCont](this[args$1], fiber) : fiber.yieldWith(this);
112996
+ return cont ? cont[failureCont](this[args$2], fiber) : fiber.yieldWith(this);
112932
112997
  }
112933
112998
  });
112934
112999
  const yieldNowWith = makePrimitive({
@@ -112938,7 +113003,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112938
113003
  fiber.getRef(CurrentScheduler).scheduleTask(() => {
112939
113004
  if (resumed) return;
112940
113005
  fiber.evaluate(exitVoid);
112941
- }, this[args$1] ?? 0);
113006
+ }, this[args$2] ?? 0);
112942
113007
  return fiber.yieldWith(() => {
112943
113008
  resumed = true;
112944
113009
  });
@@ -112949,12 +113014,12 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112949
113014
  const withMicroFiber = makePrimitive({
112950
113015
  op: "WithMicroFiber",
112951
113016
  eval(fiber) {
112952
- return this[args$1](fiber);
113017
+ return this[args$2](fiber);
112953
113018
  }
112954
113019
  });
112955
113020
  const flatMap$2 = dual(2, (self2, f) => {
112956
113021
  const onSuccess = Object.create(OnSuccessProto);
112957
- onSuccess[args$1] = self2;
113022
+ onSuccess[args$2] = self2;
112958
113023
  onSuccess[successCont] = f;
112959
113024
  return onSuccess;
112960
113025
  });
@@ -112962,7 +113027,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
112962
113027
  op: "OnSuccess",
112963
113028
  eval(fiber) {
112964
113029
  fiber._stack.push(this);
112965
- return this[args$1];
113030
+ return this[args$2];
112966
113031
  }
112967
113032
  });
112968
113033
  const isMicroExit = (u) => hasProperty(u, MicroExitTypeId);
@@ -113021,7 +113086,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
113021
113086
  }
113022
113087
  const matchCauseEffect = dual(2, (self2, options) => {
113023
113088
  const primitive = Object.create(OnSuccessAndFailureProto);
113024
- primitive[args$1] = self2;
113089
+ primitive[args$2] = self2;
113025
113090
  primitive[successCont] = options.onSuccess;
113026
113091
  primitive[failureCont] = options.onFailure;
113027
113092
  return primitive;
@@ -113030,7 +113095,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
113030
113095
  op: "OnSuccessAndFailure",
113031
113096
  eval(fiber) {
113032
113097
  fiber._stack.push(this);
113033
- return this[args$1];
113098
+ return this[args$2];
113034
113099
  }
113035
113100
  });
113036
113101
  const onExit = dual(2, (self2, f) => uninterruptibleMask((restore) => matchCauseEffect(restore(self2), {
@@ -113040,7 +113105,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
113040
113105
  const setInterruptible = makePrimitive({
113041
113106
  op: "SetInterruptible",
113042
113107
  ensure(fiber) {
113043
- fiber.interruptible = this[args$1];
113108
+ fiber.interruptible = this[args$2];
113044
113109
  if (fiber._interrupted && fiber.interruptible) {
113045
113110
  return () => exitInterrupt;
113046
113111
  }
@@ -116075,12 +116140,12 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
116075
116140
  })))));
116076
116141
  }
116077
116142
  async trackActiveOperation(operation) {
116078
- const promise = operation();
116079
- this.activeOperation = promise;
116143
+ const promise2 = operation();
116144
+ this.activeOperation = promise2;
116080
116145
  try {
116081
- await promise;
116146
+ await promise2;
116082
116147
  } finally {
116083
- if (this.activeOperation === promise) {
116148
+ if (this.activeOperation === promise2) {
116084
116149
  this.activeOperation = null;
116085
116150
  }
116086
116151
  }
@@ -116484,10 +116549,10 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
116484
116549
  function req(url, opts = {}) {
116485
116550
  const href = typeof url === "string" ? url : url.href;
116486
116551
  const req2 = (href.startsWith("https:") ? https2 : http2).request(url, opts);
116487
- const promise = new Promise((resolve2, reject) => {
116552
+ const promise2 = new Promise((resolve2, reject) => {
116488
116553
  req2.once("response", resolve2).once("error", reject).end();
116489
116554
  });
116490
- req2.then = promise.then.bind(promise);
116555
+ req2.then = promise2.then.bind(promise2);
116491
116556
  return req2;
116492
116557
  }
116493
116558
  helpers.req = req;
@@ -116538,7 +116603,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
116538
116603
  value: true
116539
116604
  });
116540
116605
  exports$1.Agent = void 0;
116541
- const net2 = __importStar(require$$0$b);
116606
+ const net2 = __importStar(require$$0$a);
116542
116607
  const http2 = __importStar(http__default);
116543
116608
  const https_1 = require$$1$7;
116544
116609
  __exportStar(requireHelpers(), exports$1);
@@ -116794,7 +116859,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
116794
116859
  value: true
116795
116860
  });
116796
116861
  dist$2.HttpsProxyAgent = void 0;
116797
- const net2 = __importStar(require$$0$b);
116862
+ const net2 = __importStar(require$$0$a);
116798
116863
  const tls2 = __importStar(require$$4$3);
116799
116864
  const assert_1 = __importDefault(require$$2$7);
116800
116865
  const debug_12 = __importDefault(requireSrc$m());
@@ -117123,7 +117188,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
117123
117188
  const createDeferred = () => {
117124
117189
  let resolve2;
117125
117190
  let reject;
117126
- const promise = new Promise((nextResolve, nextReject) => {
117191
+ const promise2 = new Promise((nextResolve, nextReject) => {
117127
117192
  resolve2 = nextResolve;
117128
117193
  reject = nextReject;
117129
117194
  });
@@ -117131,7 +117196,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
117131
117196
  throw new Error("Failed to create deferred promise");
117132
117197
  }
117133
117198
  return {
117134
- promise,
117199
+ promise: promise2,
117135
117200
  resolve: resolve2,
117136
117201
  reject
117137
117202
  };
@@ -120417,6 +120482,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120417
120482
  providers_set: "providers/set",
120418
120483
  session_cancel: "session/cancel",
120419
120484
  session_close: "session/close",
120485
+ session_delete: "session/delete",
120420
120486
  session_fork: "session/fork",
120421
120487
  session_list: "session/list",
120422
120488
  session_load: "session/load",
@@ -120509,6 +120575,15 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120509
120575
  writable
120510
120576
  };
120511
120577
  }
120578
+ function emptyObjectResponse(response) {
120579
+ return response ?? {};
120580
+ }
120581
+ function rejectedPromise(error2) {
120582
+ const promise2 = Promise.reject(error2);
120583
+ promise2.catch(() => {
120584
+ });
120585
+ return promise2;
120586
+ }
120512
120587
  class ClientSideConnection {
120513
120588
  connection;
120514
120589
  constructor(toClient, stream2) {
@@ -120517,7 +120592,8 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120517
120592
  switch (method) {
120518
120593
  case CLIENT_METHODS.fs_write_text_file: {
120519
120594
  const validatedParams = zWriteTextFileRequest.parse(params);
120520
- return client.writeTextFile?.(validatedParams);
120595
+ const result = await client.writeTextFile?.(validatedParams);
120596
+ return result ?? {};
120521
120597
  }
120522
120598
  case CLIENT_METHODS.fs_read_text_file: {
120523
120599
  const validatedParams = zReadTextFileRequest.parse(params);
@@ -120583,92 +120659,95 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120583
120659
  };
120584
120660
  this.connection = new Connection(requestHandler, notificationHandler, stream2);
120585
120661
  }
120586
- async initialize(params) {
120587
- return await this.connection.sendRequest(AGENT_METHODS.initialize, params);
120662
+ initialize(params) {
120663
+ return this.connection.sendRequest(AGENT_METHODS.initialize, params);
120588
120664
  }
120589
- async newSession(params) {
120590
- return await this.connection.sendRequest(AGENT_METHODS.session_new, params);
120665
+ newSession(params) {
120666
+ return this.connection.sendRequest(AGENT_METHODS.session_new, params);
120591
120667
  }
120592
- async loadSession(params) {
120593
- return await this.connection.sendRequest(AGENT_METHODS.session_load, params) ?? {};
120668
+ loadSession(params) {
120669
+ return this.connection.sendRequest(AGENT_METHODS.session_load, params, emptyObjectResponse);
120594
120670
  }
120595
- async unstable_forkSession(params) {
120596
- return await this.connection.sendRequest(AGENT_METHODS.session_fork, params);
120671
+ unstable_forkSession(params) {
120672
+ return this.connection.sendRequest(AGENT_METHODS.session_fork, params);
120597
120673
  }
120598
- async listSessions(params) {
120599
- return await this.connection.sendRequest(AGENT_METHODS.session_list, params);
120674
+ listSessions(params) {
120675
+ return this.connection.sendRequest(AGENT_METHODS.session_list, params);
120600
120676
  }
120601
- async resumeSession(params) {
120602
- return await this.connection.sendRequest(AGENT_METHODS.session_resume, params);
120677
+ unstable_deleteSession(params) {
120678
+ return this.connection.sendRequest(AGENT_METHODS.session_delete, params, emptyObjectResponse);
120603
120679
  }
120604
- async closeSession(params) {
120605
- return await this.connection.sendRequest(AGENT_METHODS.session_close, params);
120680
+ resumeSession(params) {
120681
+ return this.connection.sendRequest(AGENT_METHODS.session_resume, params);
120606
120682
  }
120607
- async setSessionMode(params) {
120608
- return await this.connection.sendRequest(AGENT_METHODS.session_set_mode, params) ?? {};
120683
+ closeSession(params) {
120684
+ return this.connection.sendRequest(AGENT_METHODS.session_close, params);
120609
120685
  }
120610
- async unstable_setSessionModel(params) {
120611
- return await this.connection.sendRequest(AGENT_METHODS.session_set_model, params) ?? {};
120686
+ setSessionMode(params) {
120687
+ return this.connection.sendRequest(AGENT_METHODS.session_set_mode, params, emptyObjectResponse);
120612
120688
  }
120613
- async setSessionConfigOption(params) {
120614
- return await this.connection.sendRequest(AGENT_METHODS.session_set_config_option, params);
120689
+ unstable_setSessionModel(params) {
120690
+ return this.connection.sendRequest(AGENT_METHODS.session_set_model, params, emptyObjectResponse);
120615
120691
  }
120616
- async authenticate(params) {
120617
- return await this.connection.sendRequest(AGENT_METHODS.authenticate, params) ?? {};
120692
+ setSessionConfigOption(params) {
120693
+ return this.connection.sendRequest(AGENT_METHODS.session_set_config_option, params);
120618
120694
  }
120619
- async unstable_listProviders(params) {
120620
- return await this.connection.sendRequest(AGENT_METHODS.providers_list, params);
120695
+ authenticate(params) {
120696
+ return this.connection.sendRequest(AGENT_METHODS.authenticate, params, emptyObjectResponse);
120621
120697
  }
120622
- async unstable_setProvider(params) {
120623
- return await this.connection.sendRequest(AGENT_METHODS.providers_set, params) ?? {};
120698
+ unstable_listProviders(params) {
120699
+ return this.connection.sendRequest(AGENT_METHODS.providers_list, params);
120624
120700
  }
120625
- async unstable_disableProvider(params) {
120626
- return await this.connection.sendRequest(AGENT_METHODS.providers_disable, params) ?? {};
120701
+ unstable_setProvider(params) {
120702
+ return this.connection.sendRequest(AGENT_METHODS.providers_set, params, emptyObjectResponse);
120627
120703
  }
120628
- async unstable_logout(params) {
120629
- return await this.connection.sendRequest(AGENT_METHODS.logout, params) ?? {};
120704
+ unstable_disableProvider(params) {
120705
+ return this.connection.sendRequest(AGENT_METHODS.providers_disable, params, emptyObjectResponse);
120630
120706
  }
120631
- async prompt(params) {
120632
- return await this.connection.sendRequest(AGENT_METHODS.session_prompt, params);
120707
+ unstable_logout(params) {
120708
+ return this.connection.sendRequest(AGENT_METHODS.logout, params, emptyObjectResponse);
120633
120709
  }
120634
- async cancel(params) {
120635
- return await this.connection.sendNotification(AGENT_METHODS.session_cancel, params);
120710
+ prompt(params) {
120711
+ return this.connection.sendRequest(AGENT_METHODS.session_prompt, params);
120636
120712
  }
120637
- async unstable_startNes(params) {
120638
- return await this.connection.sendRequest(AGENT_METHODS.nes_start, params);
120713
+ cancel(params) {
120714
+ return this.connection.sendNotification(AGENT_METHODS.session_cancel, params);
120639
120715
  }
120640
- async unstable_suggestNes(params) {
120641
- return await this.connection.sendRequest(AGENT_METHODS.nes_suggest, params);
120716
+ unstable_startNes(params) {
120717
+ return this.connection.sendRequest(AGENT_METHODS.nes_start, params);
120642
120718
  }
120643
- async unstable_closeNes(params) {
120644
- return await this.connection.sendRequest(AGENT_METHODS.nes_close, params) ?? {};
120719
+ unstable_suggestNes(params) {
120720
+ return this.connection.sendRequest(AGENT_METHODS.nes_suggest, params);
120645
120721
  }
120646
- async unstable_didOpenDocument(params) {
120647
- return await this.connection.sendNotification(AGENT_METHODS.document_did_open, params);
120722
+ unstable_closeNes(params) {
120723
+ return this.connection.sendRequest(AGENT_METHODS.nes_close, params, emptyObjectResponse);
120648
120724
  }
120649
- async unstable_didChangeDocument(params) {
120650
- return await this.connection.sendNotification(AGENT_METHODS.document_did_change, params);
120725
+ unstable_didOpenDocument(params) {
120726
+ return this.connection.sendNotification(AGENT_METHODS.document_did_open, params);
120651
120727
  }
120652
- async unstable_didCloseDocument(params) {
120653
- return await this.connection.sendNotification(AGENT_METHODS.document_did_close, params);
120728
+ unstable_didChangeDocument(params) {
120729
+ return this.connection.sendNotification(AGENT_METHODS.document_did_change, params);
120654
120730
  }
120655
- async unstable_didSaveDocument(params) {
120656
- return await this.connection.sendNotification(AGENT_METHODS.document_did_save, params);
120731
+ unstable_didCloseDocument(params) {
120732
+ return this.connection.sendNotification(AGENT_METHODS.document_did_close, params);
120657
120733
  }
120658
- async unstable_didFocusDocument(params) {
120659
- return await this.connection.sendNotification(AGENT_METHODS.document_did_focus, params);
120734
+ unstable_didSaveDocument(params) {
120735
+ return this.connection.sendNotification(AGENT_METHODS.document_did_save, params);
120660
120736
  }
120661
- async unstable_acceptNes(params) {
120662
- return await this.connection.sendNotification(AGENT_METHODS.nes_accept, params);
120737
+ unstable_didFocusDocument(params) {
120738
+ return this.connection.sendNotification(AGENT_METHODS.document_did_focus, params);
120663
120739
  }
120664
- async unstable_rejectNes(params) {
120665
- return await this.connection.sendNotification(AGENT_METHODS.nes_reject, params);
120740
+ unstable_acceptNes(params) {
120741
+ return this.connection.sendNotification(AGENT_METHODS.nes_accept, params);
120666
120742
  }
120667
- async extMethod(method, params) {
120668
- return await this.connection.sendRequest(method, params);
120743
+ unstable_rejectNes(params) {
120744
+ return this.connection.sendNotification(AGENT_METHODS.nes_reject, params);
120669
120745
  }
120670
- async extNotification(method, params) {
120671
- return await this.connection.sendNotification(method, params);
120746
+ extMethod(method, params) {
120747
+ return this.connection.sendRequest(method, params);
120748
+ }
120749
+ extNotification(method, params) {
120750
+ return this.connection.sendNotification(method, params);
120672
120751
  }
120673
120752
  get signal() {
120674
120753
  return this.connection.signal;
@@ -120844,12 +120923,20 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120844
120923
  console.error("Got response to unknown request", response.id);
120845
120924
  }
120846
120925
  }
120847
- sendRequest(method, params) {
120848
- this.throwIfClosed();
120926
+ sendRequest(method, params, mapResponse) {
120927
+ if (this.abortController.signal.aborted) {
120928
+ return rejectedPromise(this.closedReason());
120929
+ }
120849
120930
  const id2 = this.nextRequestId++;
120850
120931
  const responsePromise = new Promise((resolve2, reject) => {
120851
120932
  this.pendingResponses.set(id2, {
120852
- resolve: resolve2,
120933
+ resolve: (response) => {
120934
+ try {
120935
+ resolve2(mapResponse ? mapResponse(response) : response);
120936
+ } catch (error2) {
120937
+ reject(error2);
120938
+ }
120939
+ },
120853
120940
  reject
120854
120941
  });
120855
120942
  });
@@ -120863,18 +120950,18 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120863
120950
  });
120864
120951
  return responsePromise;
120865
120952
  }
120866
- async sendNotification(method, params) {
120867
- this.throwIfClosed();
120868
- await this.sendMessage({
120953
+ sendNotification(method, params) {
120954
+ if (this.abortController.signal.aborted) {
120955
+ return rejectedPromise(this.closedReason());
120956
+ }
120957
+ return this.sendMessage({
120869
120958
  jsonrpc: "2.0",
120870
120959
  method,
120871
120960
  params
120872
120961
  });
120873
120962
  }
120874
- throwIfClosed() {
120875
- if (this.abortController.signal.aborted) {
120876
- throw this.abortController.signal.reason ?? new Error("ACP connection closed");
120877
- }
120963
+ closedReason() {
120964
+ return this.abortController.signal.reason ?? new Error("ACP connection closed");
120878
120965
  }
120879
120966
  async sendMessage(message) {
120880
120967
  this.writeQueue = this.writeQueue.then(async () => {
@@ -120975,7 +121062,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120975
121062
  this.name = "AcpTimeoutError";
120976
121063
  }
120977
121064
  }
120978
- function withTimeout$2(promise, logger2, operationName, sessionId, timeoutMs, warningIntervalMs = 1e4) {
121065
+ function withTimeout$2(promise2, logger2, operationName, sessionId, timeoutMs, warningIntervalMs = 1e4) {
120979
121066
  let completed = false;
120980
121067
  let elapsedMs = 0;
120981
121068
  let timeoutHandle;
@@ -120994,7 +121081,7 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
120994
121081
  }, timeoutMs);
120995
121082
  });
120996
121083
  return Promise.race([
120997
- promise,
121084
+ promise2,
120998
121085
  timeoutPromise
120999
121086
  ]).finally(() => {
121000
121087
  completed = true;
@@ -121002,12 +121089,12 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
121002
121089
  clearTimeout(timeoutHandle);
121003
121090
  });
121004
121091
  }
121005
- function withAbort(promise, abortPromise) {
121092
+ function withAbort(promise2, abortPromise) {
121006
121093
  if (!abortPromise) {
121007
- return promise;
121094
+ return promise2;
121008
121095
  }
121009
121096
  return Promise.race([
121010
- promise,
121097
+ promise2,
121011
121098
  abortPromise
121012
121099
  ]);
121013
121100
  }
@@ -121687,9 +121774,9 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
121687
121774
  this.logger.debug(`[${this.options.sessionId}] setSessionConfigOption called (configId=${configId} value=${value})`);
121688
121775
  this.ensureSessionMatch(sessionId);
121689
121776
  const result = await withTransportRetry(async () => {
121690
- const promise = this.connection?.setSessionConfigOption(request);
121691
- if (promise) {
121692
- return await withSlowOperationWarning(promise, this.logger, "connection.setSessionConfigOption", this.options.sessionId);
121777
+ const promise2 = this.connection?.setSessionConfigOption(request);
121778
+ if (promise2) {
121779
+ return await withSlowOperationWarning(promise2, this.logger, "connection.setSessionConfigOption", this.options.sessionId);
121693
121780
  }
121694
121781
  return void 0;
121695
121782
  }, this.logger, "setSessionConfigOption", this.options.sessionId);
@@ -121797,10 +121884,1658 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
121797
121884
  const end = limit2 !== null ? start2 + Math.max(limit2, 0) : void 0;
121798
121885
  return lines2.slice(start2, end).join("\n");
121799
121886
  };
121887
+ var execa$1 = {
121888
+ exports: {}
121889
+ };
121890
+ var stripFinalNewline;
121891
+ var hasRequiredStripFinalNewline;
121892
+ function requireStripFinalNewline() {
121893
+ if (hasRequiredStripFinalNewline) return stripFinalNewline;
121894
+ hasRequiredStripFinalNewline = 1;
121895
+ stripFinalNewline = (input2) => {
121896
+ const LF = typeof input2 === "string" ? "\n" : "\n".charCodeAt();
121897
+ const CR = typeof input2 === "string" ? "\r" : "\r".charCodeAt();
121898
+ if (input2[input2.length - 1] === LF) {
121899
+ input2 = input2.slice(0, input2.length - 1);
121900
+ }
121901
+ if (input2[input2.length - 1] === CR) {
121902
+ input2 = input2.slice(0, input2.length - 1);
121903
+ }
121904
+ return input2;
121905
+ };
121906
+ return stripFinalNewline;
121907
+ }
121908
+ var npmRunPath = {
121909
+ exports: {}
121910
+ };
121911
+ npmRunPath.exports;
121912
+ var hasRequiredNpmRunPath;
121913
+ function requireNpmRunPath() {
121914
+ if (hasRequiredNpmRunPath) return npmRunPath.exports;
121915
+ hasRequiredNpmRunPath = 1;
121916
+ (function(module2) {
121917
+ const path2 = path__default;
121918
+ const pathKey2 = requirePathKey();
121919
+ const npmRunPath2 = (options) => {
121920
+ options = {
121921
+ cwd: process.cwd(),
121922
+ path: process.env[pathKey2()],
121923
+ execPath: process.execPath,
121924
+ ...options
121925
+ };
121926
+ let previous;
121927
+ let cwdPath = path2.resolve(options.cwd);
121928
+ const result = [];
121929
+ while (previous !== cwdPath) {
121930
+ result.push(path2.join(cwdPath, "node_modules/.bin"));
121931
+ previous = cwdPath;
121932
+ cwdPath = path2.resolve(cwdPath, "..");
121933
+ }
121934
+ const execPathDir = path2.resolve(options.cwd, options.execPath, "..");
121935
+ result.push(execPathDir);
121936
+ return result.concat(options.path).join(path2.delimiter);
121937
+ };
121938
+ module2.exports = npmRunPath2;
121939
+ module2.exports.default = npmRunPath2;
121940
+ module2.exports.env = (options) => {
121941
+ options = {
121942
+ env: process.env,
121943
+ ...options
121944
+ };
121945
+ const env2 = {
121946
+ ...options.env
121947
+ };
121948
+ const path3 = pathKey2({
121949
+ env: env2
121950
+ });
121951
+ options.path = env2[path3];
121952
+ env2[path3] = module2.exports(options);
121953
+ return env2;
121954
+ };
121955
+ })(npmRunPath);
121956
+ return npmRunPath.exports;
121957
+ }
121958
+ var onetime = {
121959
+ exports: {}
121960
+ };
121961
+ var mimicFn = {
121962
+ exports: {}
121963
+ };
121964
+ var hasRequiredMimicFn;
121965
+ function requireMimicFn() {
121966
+ if (hasRequiredMimicFn) return mimicFn.exports;
121967
+ hasRequiredMimicFn = 1;
121968
+ const mimicFn$1 = (to2, from2) => {
121969
+ for (const prop of Reflect.ownKeys(from2)) {
121970
+ Object.defineProperty(to2, prop, Object.getOwnPropertyDescriptor(from2, prop));
121971
+ }
121972
+ return to2;
121973
+ };
121974
+ mimicFn.exports = mimicFn$1;
121975
+ mimicFn.exports.default = mimicFn$1;
121976
+ return mimicFn.exports;
121977
+ }
121978
+ var hasRequiredOnetime;
121979
+ function requireOnetime() {
121980
+ if (hasRequiredOnetime) return onetime.exports;
121981
+ hasRequiredOnetime = 1;
121982
+ const mimicFn2 = requireMimicFn();
121983
+ const calledFunctions2 = /* @__PURE__ */ new WeakMap();
121984
+ const onetime$12 = (function_, options = {}) => {
121985
+ if (typeof function_ !== "function") {
121986
+ throw new TypeError("Expected a function");
121987
+ }
121988
+ let returnValue;
121989
+ let callCount = 0;
121990
+ const functionName2 = function_.displayName || function_.name || "<anonymous>";
121991
+ const onetime2 = function(...arguments_) {
121992
+ calledFunctions2.set(onetime2, ++callCount);
121993
+ if (callCount === 1) {
121994
+ returnValue = function_.apply(this, arguments_);
121995
+ function_ = null;
121996
+ } else if (options.throw === true) {
121997
+ throw new Error(`Function \`${functionName2}\` can only be called once`);
121998
+ }
121999
+ return returnValue;
122000
+ };
122001
+ mimicFn2(onetime2, function_);
122002
+ calledFunctions2.set(onetime2, callCount);
122003
+ return onetime2;
122004
+ };
122005
+ onetime.exports = onetime$12;
122006
+ onetime.exports.default = onetime$12;
122007
+ onetime.exports.callCount = (function_) => {
122008
+ if (!calledFunctions2.has(function_)) {
122009
+ throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
122010
+ }
122011
+ return calledFunctions2.get(function_);
122012
+ };
122013
+ return onetime.exports;
122014
+ }
122015
+ var main$2 = {};
122016
+ var signals$1 = {};
122017
+ var core$2 = {};
122018
+ var hasRequiredCore$2;
122019
+ function requireCore$2() {
122020
+ if (hasRequiredCore$2) return core$2;
122021
+ hasRequiredCore$2 = 1;
122022
+ Object.defineProperty(core$2, "__esModule", {
122023
+ value: true
122024
+ });
122025
+ core$2.SIGNALS = void 0;
122026
+ const SIGNALS = [
122027
+ {
122028
+ name: "SIGHUP",
122029
+ number: 1,
122030
+ action: "terminate",
122031
+ description: "Terminal closed",
122032
+ standard: "posix"
122033
+ },
122034
+ {
122035
+ name: "SIGINT",
122036
+ number: 2,
122037
+ action: "terminate",
122038
+ description: "User interruption with CTRL-C",
122039
+ standard: "ansi"
122040
+ },
122041
+ {
122042
+ name: "SIGQUIT",
122043
+ number: 3,
122044
+ action: "core",
122045
+ description: "User interruption with CTRL-\\",
122046
+ standard: "posix"
122047
+ },
122048
+ {
122049
+ name: "SIGILL",
122050
+ number: 4,
122051
+ action: "core",
122052
+ description: "Invalid machine instruction",
122053
+ standard: "ansi"
122054
+ },
122055
+ {
122056
+ name: "SIGTRAP",
122057
+ number: 5,
122058
+ action: "core",
122059
+ description: "Debugger breakpoint",
122060
+ standard: "posix"
122061
+ },
122062
+ {
122063
+ name: "SIGABRT",
122064
+ number: 6,
122065
+ action: "core",
122066
+ description: "Aborted",
122067
+ standard: "ansi"
122068
+ },
122069
+ {
122070
+ name: "SIGIOT",
122071
+ number: 6,
122072
+ action: "core",
122073
+ description: "Aborted",
122074
+ standard: "bsd"
122075
+ },
122076
+ {
122077
+ name: "SIGBUS",
122078
+ number: 7,
122079
+ action: "core",
122080
+ description: "Bus error due to misaligned, non-existing address or paging error",
122081
+ standard: "bsd"
122082
+ },
122083
+ {
122084
+ name: "SIGEMT",
122085
+ number: 7,
122086
+ action: "terminate",
122087
+ description: "Command should be emulated but is not implemented",
122088
+ standard: "other"
122089
+ },
122090
+ {
122091
+ name: "SIGFPE",
122092
+ number: 8,
122093
+ action: "core",
122094
+ description: "Floating point arithmetic error",
122095
+ standard: "ansi"
122096
+ },
122097
+ {
122098
+ name: "SIGKILL",
122099
+ number: 9,
122100
+ action: "terminate",
122101
+ description: "Forced termination",
122102
+ standard: "posix",
122103
+ forced: true
122104
+ },
122105
+ {
122106
+ name: "SIGUSR1",
122107
+ number: 10,
122108
+ action: "terminate",
122109
+ description: "Application-specific signal",
122110
+ standard: "posix"
122111
+ },
122112
+ {
122113
+ name: "SIGSEGV",
122114
+ number: 11,
122115
+ action: "core",
122116
+ description: "Segmentation fault",
122117
+ standard: "ansi"
122118
+ },
122119
+ {
122120
+ name: "SIGUSR2",
122121
+ number: 12,
122122
+ action: "terminate",
122123
+ description: "Application-specific signal",
122124
+ standard: "posix"
122125
+ },
122126
+ {
122127
+ name: "SIGPIPE",
122128
+ number: 13,
122129
+ action: "terminate",
122130
+ description: "Broken pipe or socket",
122131
+ standard: "posix"
122132
+ },
122133
+ {
122134
+ name: "SIGALRM",
122135
+ number: 14,
122136
+ action: "terminate",
122137
+ description: "Timeout or timer",
122138
+ standard: "posix"
122139
+ },
122140
+ {
122141
+ name: "SIGTERM",
122142
+ number: 15,
122143
+ action: "terminate",
122144
+ description: "Termination",
122145
+ standard: "ansi"
122146
+ },
122147
+ {
122148
+ name: "SIGSTKFLT",
122149
+ number: 16,
122150
+ action: "terminate",
122151
+ description: "Stack is empty or overflowed",
122152
+ standard: "other"
122153
+ },
122154
+ {
122155
+ name: "SIGCHLD",
122156
+ number: 17,
122157
+ action: "ignore",
122158
+ description: "Child process terminated, paused or unpaused",
122159
+ standard: "posix"
122160
+ },
122161
+ {
122162
+ name: "SIGCLD",
122163
+ number: 17,
122164
+ action: "ignore",
122165
+ description: "Child process terminated, paused or unpaused",
122166
+ standard: "other"
122167
+ },
122168
+ {
122169
+ name: "SIGCONT",
122170
+ number: 18,
122171
+ action: "unpause",
122172
+ description: "Unpaused",
122173
+ standard: "posix",
122174
+ forced: true
122175
+ },
122176
+ {
122177
+ name: "SIGSTOP",
122178
+ number: 19,
122179
+ action: "pause",
122180
+ description: "Paused",
122181
+ standard: "posix",
122182
+ forced: true
122183
+ },
122184
+ {
122185
+ name: "SIGTSTP",
122186
+ number: 20,
122187
+ action: "pause",
122188
+ description: 'Paused using CTRL-Z or "suspend"',
122189
+ standard: "posix"
122190
+ },
122191
+ {
122192
+ name: "SIGTTIN",
122193
+ number: 21,
122194
+ action: "pause",
122195
+ description: "Background process cannot read terminal input",
122196
+ standard: "posix"
122197
+ },
122198
+ {
122199
+ name: "SIGBREAK",
122200
+ number: 21,
122201
+ action: "terminate",
122202
+ description: "User interruption with CTRL-BREAK",
122203
+ standard: "other"
122204
+ },
122205
+ {
122206
+ name: "SIGTTOU",
122207
+ number: 22,
122208
+ action: "pause",
122209
+ description: "Background process cannot write to terminal output",
122210
+ standard: "posix"
122211
+ },
122212
+ {
122213
+ name: "SIGURG",
122214
+ number: 23,
122215
+ action: "ignore",
122216
+ description: "Socket received out-of-band data",
122217
+ standard: "bsd"
122218
+ },
122219
+ {
122220
+ name: "SIGXCPU",
122221
+ number: 24,
122222
+ action: "core",
122223
+ description: "Process timed out",
122224
+ standard: "bsd"
122225
+ },
122226
+ {
122227
+ name: "SIGXFSZ",
122228
+ number: 25,
122229
+ action: "core",
122230
+ description: "File too big",
122231
+ standard: "bsd"
122232
+ },
122233
+ {
122234
+ name: "SIGVTALRM",
122235
+ number: 26,
122236
+ action: "terminate",
122237
+ description: "Timeout or timer",
122238
+ standard: "bsd"
122239
+ },
122240
+ {
122241
+ name: "SIGPROF",
122242
+ number: 27,
122243
+ action: "terminate",
122244
+ description: "Timeout or timer",
122245
+ standard: "bsd"
122246
+ },
122247
+ {
122248
+ name: "SIGWINCH",
122249
+ number: 28,
122250
+ action: "ignore",
122251
+ description: "Terminal window size changed",
122252
+ standard: "bsd"
122253
+ },
122254
+ {
122255
+ name: "SIGIO",
122256
+ number: 29,
122257
+ action: "terminate",
122258
+ description: "I/O is available",
122259
+ standard: "other"
122260
+ },
122261
+ {
122262
+ name: "SIGPOLL",
122263
+ number: 29,
122264
+ action: "terminate",
122265
+ description: "Watched event",
122266
+ standard: "other"
122267
+ },
122268
+ {
122269
+ name: "SIGINFO",
122270
+ number: 29,
122271
+ action: "ignore",
122272
+ description: "Request for process information",
122273
+ standard: "other"
122274
+ },
122275
+ {
122276
+ name: "SIGPWR",
122277
+ number: 30,
122278
+ action: "terminate",
122279
+ description: "Device running out of power",
122280
+ standard: "systemv"
122281
+ },
122282
+ {
122283
+ name: "SIGSYS",
122284
+ number: 31,
122285
+ action: "core",
122286
+ description: "Invalid system call",
122287
+ standard: "other"
122288
+ },
122289
+ {
122290
+ name: "SIGUNUSED",
122291
+ number: 31,
122292
+ action: "terminate",
122293
+ description: "Invalid system call",
122294
+ standard: "other"
122295
+ }
122296
+ ];
122297
+ core$2.SIGNALS = SIGNALS;
122298
+ return core$2;
122299
+ }
122300
+ var realtime = {};
122301
+ var hasRequiredRealtime;
122302
+ function requireRealtime() {
122303
+ if (hasRequiredRealtime) return realtime;
122304
+ hasRequiredRealtime = 1;
122305
+ Object.defineProperty(realtime, "__esModule", {
122306
+ value: true
122307
+ });
122308
+ realtime.SIGRTMAX = realtime.getRealtimeSignals = void 0;
122309
+ const getRealtimeSignals = function() {
122310
+ const length2 = SIGRTMAX - SIGRTMIN + 1;
122311
+ return Array.from({
122312
+ length: length2
122313
+ }, getRealtimeSignal);
122314
+ };
122315
+ realtime.getRealtimeSignals = getRealtimeSignals;
122316
+ const getRealtimeSignal = function(value, index2) {
122317
+ return {
122318
+ name: `SIGRT${index2 + 1}`,
122319
+ number: SIGRTMIN + index2,
122320
+ action: "terminate",
122321
+ description: "Application-specific signal (realtime)",
122322
+ standard: "posix"
122323
+ };
122324
+ };
122325
+ const SIGRTMIN = 34;
122326
+ const SIGRTMAX = 64;
122327
+ realtime.SIGRTMAX = SIGRTMAX;
122328
+ return realtime;
122329
+ }
122330
+ var hasRequiredSignals$1;
122331
+ function requireSignals$1() {
122332
+ if (hasRequiredSignals$1) return signals$1;
122333
+ hasRequiredSignals$1 = 1;
122334
+ Object.defineProperty(signals$1, "__esModule", {
122335
+ value: true
122336
+ });
122337
+ signals$1.getSignals = void 0;
122338
+ var _os = os__default;
122339
+ var _core = requireCore$2();
122340
+ var _realtime = requireRealtime();
122341
+ const getSignals = function() {
122342
+ const realtimeSignals = (0, _realtime.getRealtimeSignals)();
122343
+ const signals2 = [
122344
+ ..._core.SIGNALS,
122345
+ ...realtimeSignals
122346
+ ].map(normalizeSignal);
122347
+ return signals2;
122348
+ };
122349
+ signals$1.getSignals = getSignals;
122350
+ const normalizeSignal = function({ name: name2, number: defaultNumber, description: description2, action, forced: forced2 = false, standard: standard2 }) {
122351
+ const { signals: { [name2]: constantSignal } } = _os.constants;
122352
+ const supported = constantSignal !== void 0;
122353
+ const number2 = supported ? constantSignal : defaultNumber;
122354
+ return {
122355
+ name: name2,
122356
+ number: number2,
122357
+ description: description2,
122358
+ supported,
122359
+ action,
122360
+ forced: forced2,
122361
+ standard: standard2
122362
+ };
122363
+ };
122364
+ return signals$1;
122365
+ }
122366
+ var hasRequiredMain$2;
122367
+ function requireMain$2() {
122368
+ if (hasRequiredMain$2) return main$2;
122369
+ hasRequiredMain$2 = 1;
122370
+ Object.defineProperty(main$2, "__esModule", {
122371
+ value: true
122372
+ });
122373
+ main$2.signalsByNumber = main$2.signalsByName = void 0;
122374
+ var _os = os__default;
122375
+ var _signals = requireSignals$1();
122376
+ var _realtime = requireRealtime();
122377
+ const getSignalsByName = function() {
122378
+ const signals2 = (0, _signals.getSignals)();
122379
+ return signals2.reduce(getSignalByName, {});
122380
+ };
122381
+ const getSignalByName = function(signalByNameMemo, { name: name2, number: number2, description: description2, supported, action, forced: forced2, standard: standard2 }) {
122382
+ return {
122383
+ ...signalByNameMemo,
122384
+ [name2]: {
122385
+ name: name2,
122386
+ number: number2,
122387
+ description: description2,
122388
+ supported,
122389
+ action,
122390
+ forced: forced2,
122391
+ standard: standard2
122392
+ }
122393
+ };
122394
+ };
122395
+ const signalsByName = getSignalsByName();
122396
+ main$2.signalsByName = signalsByName;
122397
+ const getSignalsByNumber = function() {
122398
+ const signals2 = (0, _signals.getSignals)();
122399
+ const length2 = _realtime.SIGRTMAX + 1;
122400
+ const signalsA = Array.from({
122401
+ length: length2
122402
+ }, (value, number2) => getSignalByNumber(number2, signals2));
122403
+ return Object.assign({}, ...signalsA);
122404
+ };
122405
+ const getSignalByNumber = function(number2, signals2) {
122406
+ const signal = findSignalByNumber(number2, signals2);
122407
+ if (signal === void 0) {
122408
+ return {};
122409
+ }
122410
+ const { name: name2, description: description2, supported, action, forced: forced2, standard: standard2 } = signal;
122411
+ return {
122412
+ [number2]: {
122413
+ name: name2,
122414
+ number: number2,
122415
+ description: description2,
122416
+ supported,
122417
+ action,
122418
+ forced: forced2,
122419
+ standard: standard2
122420
+ }
122421
+ };
122422
+ };
122423
+ const findSignalByNumber = function(number2, signals2) {
122424
+ const signal = signals2.find(({ name: name2 }) => _os.constants.signals[name2] === number2);
122425
+ if (signal !== void 0) {
122426
+ return signal;
122427
+ }
122428
+ return signals2.find((signalA) => signalA.number === number2);
122429
+ };
122430
+ const signalsByNumber = getSignalsByNumber();
122431
+ main$2.signalsByNumber = signalsByNumber;
122432
+ return main$2;
122433
+ }
122434
+ var error;
122435
+ var hasRequiredError;
122436
+ function requireError() {
122437
+ if (hasRequiredError) return error;
122438
+ hasRequiredError = 1;
122439
+ const { signalsByName } = requireMain$2();
122440
+ const getErrorPrefix = ({ timedOut, timeout: timeout2, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
122441
+ if (timedOut) {
122442
+ return `timed out after ${timeout2} milliseconds`;
122443
+ }
122444
+ if (isCanceled) {
122445
+ return "was canceled";
122446
+ }
122447
+ if (errorCode !== void 0) {
122448
+ return `failed with ${errorCode}`;
122449
+ }
122450
+ if (signal !== void 0) {
122451
+ return `was killed with ${signal} (${signalDescription})`;
122452
+ }
122453
+ if (exitCode !== void 0) {
122454
+ return `failed with exit code ${exitCode}`;
122455
+ }
122456
+ return "failed";
122457
+ };
122458
+ const makeError = ({ stdout, stderr, all, error: error2, signal, exitCode, command: command2, escapedCommand, timedOut, isCanceled, killed, parsed: { options: { timeout: timeout2 } } }) => {
122459
+ exitCode = exitCode === null ? void 0 : exitCode;
122460
+ signal = signal === null ? void 0 : signal;
122461
+ const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
122462
+ const errorCode = error2 && error2.code;
122463
+ const prefix = getErrorPrefix({
122464
+ timedOut,
122465
+ timeout: timeout2,
122466
+ errorCode,
122467
+ signal,
122468
+ signalDescription,
122469
+ exitCode,
122470
+ isCanceled
122471
+ });
122472
+ const execaMessage = `Command ${prefix}: ${command2}`;
122473
+ const isError2 = Object.prototype.toString.call(error2) === "[object Error]";
122474
+ const shortMessage = isError2 ? `${execaMessage}
122475
+ ${error2.message}` : execaMessage;
122476
+ const message = [
122477
+ shortMessage,
122478
+ stderr,
122479
+ stdout
122480
+ ].filter(Boolean).join("\n");
122481
+ if (isError2) {
122482
+ error2.originalMessage = error2.message;
122483
+ error2.message = message;
122484
+ } else {
122485
+ error2 = new Error(message);
122486
+ }
122487
+ error2.shortMessage = shortMessage;
122488
+ error2.command = command2;
122489
+ error2.escapedCommand = escapedCommand;
122490
+ error2.exitCode = exitCode;
122491
+ error2.signal = signal;
122492
+ error2.signalDescription = signalDescription;
122493
+ error2.stdout = stdout;
122494
+ error2.stderr = stderr;
122495
+ if (all !== void 0) {
122496
+ error2.all = all;
122497
+ }
122498
+ if ("bufferedData" in error2) {
122499
+ delete error2.bufferedData;
122500
+ }
122501
+ error2.failed = true;
122502
+ error2.timedOut = Boolean(timedOut);
122503
+ error2.isCanceled = isCanceled;
122504
+ error2.killed = killed && !timedOut;
122505
+ return error2;
122506
+ };
122507
+ error = makeError;
122508
+ return error;
122509
+ }
122510
+ var stdio = {
122511
+ exports: {}
122512
+ };
122513
+ var hasRequiredStdio;
122514
+ function requireStdio() {
122515
+ if (hasRequiredStdio) return stdio.exports;
122516
+ hasRequiredStdio = 1;
122517
+ const aliases2 = [
122518
+ "stdin",
122519
+ "stdout",
122520
+ "stderr"
122521
+ ];
122522
+ const hasAlias = (options) => aliases2.some((alias) => options[alias] !== void 0);
122523
+ const normalizeStdio = (options) => {
122524
+ if (!options) {
122525
+ return;
122526
+ }
122527
+ const { stdio: stdio2 } = options;
122528
+ if (stdio2 === void 0) {
122529
+ return aliases2.map((alias) => options[alias]);
122530
+ }
122531
+ if (hasAlias(options)) {
122532
+ throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases2.map((alias) => `\`${alias}\``).join(", ")}`);
122533
+ }
122534
+ if (typeof stdio2 === "string") {
122535
+ return stdio2;
122536
+ }
122537
+ if (!Array.isArray(stdio2)) {
122538
+ throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio2}\``);
122539
+ }
122540
+ const length2 = Math.max(stdio2.length, aliases2.length);
122541
+ return Array.from({
122542
+ length: length2
122543
+ }, (value, index2) => stdio2[index2]);
122544
+ };
122545
+ stdio.exports = normalizeStdio;
122546
+ stdio.exports.node = (options) => {
122547
+ const stdio2 = normalizeStdio(options);
122548
+ if (stdio2 === "ipc") {
122549
+ return "ipc";
122550
+ }
122551
+ if (stdio2 === void 0 || typeof stdio2 === "string") {
122552
+ return [
122553
+ stdio2,
122554
+ stdio2,
122555
+ stdio2,
122556
+ "ipc"
122557
+ ];
122558
+ }
122559
+ if (stdio2.includes("ipc")) {
122560
+ return stdio2;
122561
+ }
122562
+ return [
122563
+ ...stdio2,
122564
+ "ipc"
122565
+ ];
122566
+ };
122567
+ return stdio.exports;
122568
+ }
122569
+ var signalExit = {
122570
+ exports: {}
122571
+ };
122572
+ var signals = {
122573
+ exports: {}
122574
+ };
122575
+ var hasRequiredSignals;
122576
+ function requireSignals() {
122577
+ if (hasRequiredSignals) return signals.exports;
122578
+ hasRequiredSignals = 1;
122579
+ (function(module2) {
122580
+ module2.exports = [
122581
+ "SIGABRT",
122582
+ "SIGALRM",
122583
+ "SIGHUP",
122584
+ "SIGINT",
122585
+ "SIGTERM"
122586
+ ];
122587
+ if (process.platform !== "win32") {
122588
+ module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
122589
+ }
122590
+ if (process.platform === "linux") {
122591
+ module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
122592
+ }
122593
+ })(signals);
122594
+ return signals.exports;
122595
+ }
122596
+ var hasRequiredSignalExit;
122597
+ function requireSignalExit() {
122598
+ if (hasRequiredSignalExit) return signalExit.exports;
122599
+ hasRequiredSignalExit = 1;
122600
+ var process2 = commonjsGlobal.process;
122601
+ const processOk2 = function(process3) {
122602
+ return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
122603
+ };
122604
+ if (!processOk2(process2)) {
122605
+ signalExit.exports = function() {
122606
+ return function() {
122607
+ };
122608
+ };
122609
+ } else {
122610
+ var assert = require$$2$7;
122611
+ var signals2 = requireSignals();
122612
+ var isWin = /^win/i.test(process2.platform);
122613
+ var EE = require$$0$6;
122614
+ if (typeof EE !== "function") {
122615
+ EE = EE.EventEmitter;
122616
+ }
122617
+ var emitter;
122618
+ if (process2.__signal_exit_emitter__) {
122619
+ emitter = process2.__signal_exit_emitter__;
122620
+ } else {
122621
+ emitter = process2.__signal_exit_emitter__ = new EE();
122622
+ emitter.count = 0;
122623
+ emitter.emitted = {};
122624
+ }
122625
+ if (!emitter.infinite) {
122626
+ emitter.setMaxListeners(Infinity);
122627
+ emitter.infinite = true;
122628
+ }
122629
+ signalExit.exports = function(cb, opts) {
122630
+ if (!processOk2(commonjsGlobal.process)) {
122631
+ return function() {
122632
+ };
122633
+ }
122634
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
122635
+ if (loaded === false) {
122636
+ load();
122637
+ }
122638
+ var ev = "exit";
122639
+ if (opts && opts.alwaysLast) {
122640
+ ev = "afterexit";
122641
+ }
122642
+ var remove2 = function() {
122643
+ emitter.removeListener(ev, cb);
122644
+ if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
122645
+ unload();
122646
+ }
122647
+ };
122648
+ emitter.on(ev, cb);
122649
+ return remove2;
122650
+ };
122651
+ var unload = function unload2() {
122652
+ if (!loaded || !processOk2(commonjsGlobal.process)) {
122653
+ return;
122654
+ }
122655
+ loaded = false;
122656
+ signals2.forEach(function(sig) {
122657
+ try {
122658
+ process2.removeListener(sig, sigListeners[sig]);
122659
+ } catch (er) {
122660
+ }
122661
+ });
122662
+ process2.emit = originalProcessEmit;
122663
+ process2.reallyExit = originalProcessReallyExit;
122664
+ emitter.count -= 1;
122665
+ };
122666
+ signalExit.exports.unload = unload;
122667
+ var emit = function emit2(event, code2, signal) {
122668
+ if (emitter.emitted[event]) {
122669
+ return;
122670
+ }
122671
+ emitter.emitted[event] = true;
122672
+ emitter.emit(event, code2, signal);
122673
+ };
122674
+ var sigListeners = {};
122675
+ signals2.forEach(function(sig) {
122676
+ sigListeners[sig] = function listener() {
122677
+ if (!processOk2(commonjsGlobal.process)) {
122678
+ return;
122679
+ }
122680
+ var listeners = process2.listeners(sig);
122681
+ if (listeners.length === emitter.count) {
122682
+ unload();
122683
+ emit("exit", null, sig);
122684
+ emit("afterexit", null, sig);
122685
+ if (isWin && sig === "SIGHUP") {
122686
+ sig = "SIGINT";
122687
+ }
122688
+ process2.kill(process2.pid, sig);
122689
+ }
122690
+ };
122691
+ });
122692
+ signalExit.exports.signals = function() {
122693
+ return signals2;
122694
+ };
122695
+ var loaded = false;
122696
+ var load = function load2() {
122697
+ if (loaded || !processOk2(commonjsGlobal.process)) {
122698
+ return;
122699
+ }
122700
+ loaded = true;
122701
+ emitter.count += 1;
122702
+ signals2 = signals2.filter(function(sig) {
122703
+ try {
122704
+ process2.on(sig, sigListeners[sig]);
122705
+ return true;
122706
+ } catch (er) {
122707
+ return false;
122708
+ }
122709
+ });
122710
+ process2.emit = processEmit;
122711
+ process2.reallyExit = processReallyExit;
122712
+ };
122713
+ signalExit.exports.load = load;
122714
+ var originalProcessReallyExit = process2.reallyExit;
122715
+ var processReallyExit = function processReallyExit2(code2) {
122716
+ if (!processOk2(commonjsGlobal.process)) {
122717
+ return;
122718
+ }
122719
+ process2.exitCode = code2 || 0;
122720
+ emit("exit", process2.exitCode, null);
122721
+ emit("afterexit", process2.exitCode, null);
122722
+ originalProcessReallyExit.call(process2, process2.exitCode);
122723
+ };
122724
+ var originalProcessEmit = process2.emit;
122725
+ var processEmit = function processEmit2(ev, arg) {
122726
+ if (ev === "exit" && processOk2(commonjsGlobal.process)) {
122727
+ if (arg !== void 0) {
122728
+ process2.exitCode = arg;
122729
+ }
122730
+ var ret = originalProcessEmit.apply(this, arguments);
122731
+ emit("exit", process2.exitCode, null);
122732
+ emit("afterexit", process2.exitCode, null);
122733
+ return ret;
122734
+ } else {
122735
+ return originalProcessEmit.apply(this, arguments);
122736
+ }
122737
+ };
122738
+ }
122739
+ return signalExit.exports;
122740
+ }
122741
+ var kill;
122742
+ var hasRequiredKill;
122743
+ function requireKill() {
122744
+ if (hasRequiredKill) return kill;
122745
+ hasRequiredKill = 1;
122746
+ const os2 = os__default;
122747
+ const onExit2 = requireSignalExit();
122748
+ const DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
122749
+ const spawnedKill = (kill2, signal = "SIGTERM", options = {}) => {
122750
+ const killResult = kill2(signal);
122751
+ setKillTimeout(kill2, signal, options, killResult);
122752
+ return killResult;
122753
+ };
122754
+ const setKillTimeout = (kill2, signal, options, killResult) => {
122755
+ if (!shouldForceKill(signal, options, killResult)) {
122756
+ return;
122757
+ }
122758
+ const timeout2 = getForceKillAfterTimeout(options);
122759
+ const t = setTimeout(() => {
122760
+ kill2("SIGKILL");
122761
+ }, timeout2);
122762
+ if (t.unref) {
122763
+ t.unref();
122764
+ }
122765
+ };
122766
+ const shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => {
122767
+ return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
122768
+ };
122769
+ const isSigterm = (signal) => {
122770
+ return signal === os2.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
122771
+ };
122772
+ const getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
122773
+ if (forceKillAfterTimeout === true) {
122774
+ return DEFAULT_FORCE_KILL_TIMEOUT;
122775
+ }
122776
+ if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
122777
+ throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
122778
+ }
122779
+ return forceKillAfterTimeout;
122780
+ };
122781
+ const spawnedCancel = (spawned, context2) => {
122782
+ const killResult = spawned.kill();
122783
+ if (killResult) {
122784
+ context2.isCanceled = true;
122785
+ }
122786
+ };
122787
+ const timeoutKill = (spawned, signal, reject) => {
122788
+ spawned.kill(signal);
122789
+ reject(Object.assign(new Error("Timed out"), {
122790
+ timedOut: true,
122791
+ signal
122792
+ }));
122793
+ };
122794
+ const setupTimeout = (spawned, { timeout: timeout2, killSignal = "SIGTERM" }, spawnedPromise) => {
122795
+ if (timeout2 === 0 || timeout2 === void 0) {
122796
+ return spawnedPromise;
122797
+ }
122798
+ let timeoutId;
122799
+ const timeoutPromise = new Promise((resolve2, reject) => {
122800
+ timeoutId = setTimeout(() => {
122801
+ timeoutKill(spawned, killSignal, reject);
122802
+ }, timeout2);
122803
+ });
122804
+ const safeSpawnedPromise = spawnedPromise.finally(() => {
122805
+ clearTimeout(timeoutId);
122806
+ });
122807
+ return Promise.race([
122808
+ timeoutPromise,
122809
+ safeSpawnedPromise
122810
+ ]);
122811
+ };
122812
+ const validateTimeout = ({ timeout: timeout2 }) => {
122813
+ if (timeout2 !== void 0 && (!Number.isFinite(timeout2) || timeout2 < 0)) {
122814
+ throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout2}\` (${typeof timeout2})`);
122815
+ }
122816
+ };
122817
+ const setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
122818
+ if (!cleanup || detached) {
122819
+ return timedPromise;
122820
+ }
122821
+ const removeExitHandler = onExit2(() => {
122822
+ spawned.kill();
122823
+ });
122824
+ return timedPromise.finally(() => {
122825
+ removeExitHandler();
122826
+ });
122827
+ };
122828
+ kill = {
122829
+ spawnedKill,
122830
+ spawnedCancel,
122831
+ setupTimeout,
122832
+ validateTimeout,
122833
+ setExitHandler
122834
+ };
122835
+ return kill;
122836
+ }
122837
+ var getStream = {
122838
+ exports: {}
122839
+ };
122840
+ var bufferStream;
122841
+ var hasRequiredBufferStream;
122842
+ function requireBufferStream() {
122843
+ if (hasRequiredBufferStream) return bufferStream;
122844
+ hasRequiredBufferStream = 1;
122845
+ const { PassThrough: PassThroughStream } = require$$0$8;
122846
+ bufferStream = (options) => {
122847
+ options = {
122848
+ ...options
122849
+ };
122850
+ const { array: array2 } = options;
122851
+ let { encoding } = options;
122852
+ const isBuffer2 = encoding === "buffer";
122853
+ let objectMode = false;
122854
+ if (array2) {
122855
+ objectMode = !(encoding || isBuffer2);
122856
+ } else {
122857
+ encoding = encoding || "utf8";
122858
+ }
122859
+ if (isBuffer2) {
122860
+ encoding = null;
122861
+ }
122862
+ const stream2 = new PassThroughStream({
122863
+ objectMode
122864
+ });
122865
+ if (encoding) {
122866
+ stream2.setEncoding(encoding);
122867
+ }
122868
+ let length2 = 0;
122869
+ const chunks = [];
122870
+ stream2.on("data", (chunk) => {
122871
+ chunks.push(chunk);
122872
+ if (objectMode) {
122873
+ length2 = chunks.length;
122874
+ } else {
122875
+ length2 += chunk.length;
122876
+ }
122877
+ });
122878
+ stream2.getBufferedValue = () => {
122879
+ if (array2) {
122880
+ return chunks;
122881
+ }
122882
+ return isBuffer2 ? Buffer.concat(chunks, length2) : chunks.join("");
122883
+ };
122884
+ stream2.getBufferedLength = () => length2;
122885
+ return stream2;
122886
+ };
122887
+ return bufferStream;
122888
+ }
122889
+ var hasRequiredGetStream;
122890
+ function requireGetStream() {
122891
+ if (hasRequiredGetStream) return getStream.exports;
122892
+ hasRequiredGetStream = 1;
122893
+ const { constants: BufferConstants } = require$$0$9;
122894
+ const stream2 = require$$0$8;
122895
+ const { promisify: promisify2 } = require$$0$5;
122896
+ const bufferStream2 = requireBufferStream();
122897
+ const streamPipelinePromisified = promisify2(stream2.pipeline);
122898
+ class MaxBufferError extends Error {
122899
+ constructor() {
122900
+ super("maxBuffer exceeded");
122901
+ this.name = "MaxBufferError";
122902
+ }
122903
+ }
122904
+ async function getStream$1(inputStream, options) {
122905
+ if (!inputStream) {
122906
+ throw new Error("Expected a stream");
122907
+ }
122908
+ options = {
122909
+ maxBuffer: Infinity,
122910
+ ...options
122911
+ };
122912
+ const { maxBuffer } = options;
122913
+ const stream3 = bufferStream2(options);
122914
+ await new Promise((resolve2, reject) => {
122915
+ const rejectPromise = (error2) => {
122916
+ if (error2 && stream3.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
122917
+ error2.bufferedData = stream3.getBufferedValue();
122918
+ }
122919
+ reject(error2);
122920
+ };
122921
+ (async () => {
122922
+ try {
122923
+ await streamPipelinePromisified(inputStream, stream3);
122924
+ resolve2();
122925
+ } catch (error2) {
122926
+ rejectPromise(error2);
122927
+ }
122928
+ })();
122929
+ stream3.on("data", () => {
122930
+ if (stream3.getBufferedLength() > maxBuffer) {
122931
+ rejectPromise(new MaxBufferError());
122932
+ }
122933
+ });
122934
+ });
122935
+ return stream3.getBufferedValue();
122936
+ }
122937
+ getStream.exports = getStream$1;
122938
+ getStream.exports.buffer = (stream3, options) => getStream$1(stream3, {
122939
+ ...options,
122940
+ encoding: "buffer"
122941
+ });
122942
+ getStream.exports.array = (stream3, options) => getStream$1(stream3, {
122943
+ ...options,
122944
+ array: true
122945
+ });
122946
+ getStream.exports.MaxBufferError = MaxBufferError;
122947
+ return getStream.exports;
122948
+ }
122949
+ var mergeStream;
122950
+ var hasRequiredMergeStream;
122951
+ function requireMergeStream() {
122952
+ if (hasRequiredMergeStream) return mergeStream;
122953
+ hasRequiredMergeStream = 1;
122954
+ const { PassThrough } = require$$0$8;
122955
+ mergeStream = function() {
122956
+ var sources = [];
122957
+ var output = new PassThrough({
122958
+ objectMode: true
122959
+ });
122960
+ output.setMaxListeners(0);
122961
+ output.add = add2;
122962
+ output.isEmpty = isEmpty2;
122963
+ output.on("unpipe", remove2);
122964
+ Array.prototype.slice.call(arguments).forEach(add2);
122965
+ return output;
122966
+ function add2(source) {
122967
+ if (Array.isArray(source)) {
122968
+ source.forEach(add2);
122969
+ return this;
122970
+ }
122971
+ sources.push(source);
122972
+ source.once("end", remove2.bind(null, source));
122973
+ source.once("error", output.emit.bind(output, "error"));
122974
+ source.pipe(output, {
122975
+ end: false
122976
+ });
122977
+ return this;
122978
+ }
122979
+ function isEmpty2() {
122980
+ return sources.length == 0;
122981
+ }
122982
+ function remove2(source) {
122983
+ sources = sources.filter(function(it) {
122984
+ return it !== source;
122985
+ });
122986
+ if (!sources.length && output.readable) {
122987
+ output.end();
122988
+ }
122989
+ }
122990
+ };
122991
+ return mergeStream;
122992
+ }
122993
+ var stream;
122994
+ var hasRequiredStream;
122995
+ function requireStream() {
122996
+ if (hasRequiredStream) return stream;
122997
+ hasRequiredStream = 1;
122998
+ const isStream = requireIsStream();
122999
+ const getStream2 = requireGetStream();
123000
+ const mergeStream2 = requireMergeStream();
123001
+ const handleInput = (spawned, input2) => {
123002
+ if (input2 === void 0 || spawned.stdin === void 0) {
123003
+ return;
123004
+ }
123005
+ if (isStream(input2)) {
123006
+ input2.pipe(spawned.stdin);
123007
+ } else {
123008
+ spawned.stdin.end(input2);
123009
+ }
123010
+ };
123011
+ const makeAllStream = (spawned, { all }) => {
123012
+ if (!all || !spawned.stdout && !spawned.stderr) {
123013
+ return;
123014
+ }
123015
+ const mixed = mergeStream2();
123016
+ if (spawned.stdout) {
123017
+ mixed.add(spawned.stdout);
123018
+ }
123019
+ if (spawned.stderr) {
123020
+ mixed.add(spawned.stderr);
123021
+ }
123022
+ return mixed;
123023
+ };
123024
+ const getBufferedData = async (stream2, streamPromise) => {
123025
+ if (!stream2) {
123026
+ return;
123027
+ }
123028
+ stream2.destroy();
123029
+ try {
123030
+ return await streamPromise;
123031
+ } catch (error2) {
123032
+ return error2.bufferedData;
123033
+ }
123034
+ };
123035
+ const getStreamPromise = (stream2, { encoding, buffer: buffer2, maxBuffer }) => {
123036
+ if (!stream2 || !buffer2) {
123037
+ return;
123038
+ }
123039
+ if (encoding) {
123040
+ return getStream2(stream2, {
123041
+ encoding,
123042
+ maxBuffer
123043
+ });
123044
+ }
123045
+ return getStream2.buffer(stream2, {
123046
+ maxBuffer
123047
+ });
123048
+ };
123049
+ const getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer: buffer2, maxBuffer }, processDone) => {
123050
+ const stdoutPromise = getStreamPromise(stdout, {
123051
+ encoding,
123052
+ buffer: buffer2,
123053
+ maxBuffer
123054
+ });
123055
+ const stderrPromise = getStreamPromise(stderr, {
123056
+ encoding,
123057
+ buffer: buffer2,
123058
+ maxBuffer
123059
+ });
123060
+ const allPromise = getStreamPromise(all, {
123061
+ encoding,
123062
+ buffer: buffer2,
123063
+ maxBuffer: maxBuffer * 2
123064
+ });
123065
+ try {
123066
+ return await Promise.all([
123067
+ processDone,
123068
+ stdoutPromise,
123069
+ stderrPromise,
123070
+ allPromise
123071
+ ]);
123072
+ } catch (error2) {
123073
+ return Promise.all([
123074
+ {
123075
+ error: error2,
123076
+ signal: error2.signal,
123077
+ timedOut: error2.timedOut
123078
+ },
123079
+ getBufferedData(stdout, stdoutPromise),
123080
+ getBufferedData(stderr, stderrPromise),
123081
+ getBufferedData(all, allPromise)
123082
+ ]);
123083
+ }
123084
+ };
123085
+ const validateInputSync = ({ input: input2 }) => {
123086
+ if (isStream(input2)) {
123087
+ throw new TypeError("The `input` option cannot be a stream in sync mode");
123088
+ }
123089
+ };
123090
+ stream = {
123091
+ handleInput,
123092
+ makeAllStream,
123093
+ getSpawnedResult,
123094
+ validateInputSync
123095
+ };
123096
+ return stream;
123097
+ }
123098
+ var promise;
123099
+ var hasRequiredPromise;
123100
+ function requirePromise() {
123101
+ if (hasRequiredPromise) return promise;
123102
+ hasRequiredPromise = 1;
123103
+ const nativePromisePrototype = (async () => {
123104
+ })().constructor.prototype;
123105
+ const descriptors = [
123106
+ "then",
123107
+ "catch",
123108
+ "finally"
123109
+ ].map((property) => [
123110
+ property,
123111
+ Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)
123112
+ ]);
123113
+ const mergePromise = (spawned, promise2) => {
123114
+ for (const [property, descriptor] of descriptors) {
123115
+ const value = typeof promise2 === "function" ? (...args2) => Reflect.apply(descriptor.value, promise2(), args2) : descriptor.value.bind(promise2);
123116
+ Reflect.defineProperty(spawned, property, {
123117
+ ...descriptor,
123118
+ value
123119
+ });
123120
+ }
123121
+ return spawned;
123122
+ };
123123
+ const getSpawnedPromise = (spawned) => {
123124
+ return new Promise((resolve2, reject) => {
123125
+ spawned.on("exit", (exitCode, signal) => {
123126
+ resolve2({
123127
+ exitCode,
123128
+ signal
123129
+ });
123130
+ });
123131
+ spawned.on("error", (error2) => {
123132
+ reject(error2);
123133
+ });
123134
+ if (spawned.stdin) {
123135
+ spawned.stdin.on("error", (error2) => {
123136
+ reject(error2);
123137
+ });
123138
+ }
123139
+ });
123140
+ };
123141
+ promise = {
123142
+ mergePromise,
123143
+ getSpawnedPromise
123144
+ };
123145
+ return promise;
123146
+ }
123147
+ var command;
123148
+ var hasRequiredCommand;
123149
+ function requireCommand() {
123150
+ if (hasRequiredCommand) return command;
123151
+ hasRequiredCommand = 1;
123152
+ const normalizeArgs = (file2, args2 = []) => {
123153
+ if (!Array.isArray(args2)) {
123154
+ return [
123155
+ file2
123156
+ ];
123157
+ }
123158
+ return [
123159
+ file2,
123160
+ ...args2
123161
+ ];
123162
+ };
123163
+ const NO_ESCAPE_REGEXP = /^[\w.-]+$/;
123164
+ const DOUBLE_QUOTES_REGEXP = /"/g;
123165
+ const escapeArg = (arg) => {
123166
+ if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
123167
+ return arg;
123168
+ }
123169
+ return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`;
123170
+ };
123171
+ const joinCommand = (file2, args2) => {
123172
+ return normalizeArgs(file2, args2).join(" ");
123173
+ };
123174
+ const getEscapedCommand = (file2, args2) => {
123175
+ return normalizeArgs(file2, args2).map((arg) => escapeArg(arg)).join(" ");
123176
+ };
123177
+ const SPACES_REGEXP = / +/g;
123178
+ const parseCommand = (command2) => {
123179
+ const tokens2 = [];
123180
+ for (const token2 of command2.trim().split(SPACES_REGEXP)) {
123181
+ const previousToken = tokens2[tokens2.length - 1];
123182
+ if (previousToken && previousToken.endsWith("\\")) {
123183
+ tokens2[tokens2.length - 1] = `${previousToken.slice(0, -1)} ${token2}`;
123184
+ } else {
123185
+ tokens2.push(token2);
123186
+ }
123187
+ }
123188
+ return tokens2;
123189
+ };
123190
+ command = {
123191
+ joinCommand,
123192
+ getEscapedCommand,
123193
+ parseCommand
123194
+ };
123195
+ return command;
123196
+ }
123197
+ var hasRequiredExeca;
123198
+ function requireExeca() {
123199
+ if (hasRequiredExeca) return execa$1.exports;
123200
+ hasRequiredExeca = 1;
123201
+ const path2 = path__default;
123202
+ const childProcess = require$$1$8;
123203
+ const crossSpawn2 = requireCrossSpawn();
123204
+ const stripFinalNewline2 = requireStripFinalNewline();
123205
+ const npmRunPath2 = requireNpmRunPath();
123206
+ const onetime2 = requireOnetime();
123207
+ const makeError = requireError();
123208
+ const normalizeStdio = requireStdio();
123209
+ const { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = requireKill();
123210
+ const { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = requireStream();
123211
+ const { mergePromise, getSpawnedPromise } = requirePromise();
123212
+ const { joinCommand, parseCommand, getEscapedCommand } = requireCommand();
123213
+ const DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
123214
+ const getEnv2 = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
123215
+ const env2 = extendEnv ? {
123216
+ ...process.env,
123217
+ ...envOption
123218
+ } : envOption;
123219
+ if (preferLocal) {
123220
+ return npmRunPath2.env({
123221
+ env: env2,
123222
+ cwd: localDir,
123223
+ execPath
123224
+ });
123225
+ }
123226
+ return env2;
123227
+ };
123228
+ const handleArguments = (file2, args2, options = {}) => {
123229
+ const parsed = crossSpawn2._parse(file2, args2, options);
123230
+ file2 = parsed.command;
123231
+ args2 = parsed.args;
123232
+ options = parsed.options;
123233
+ options = {
123234
+ maxBuffer: DEFAULT_MAX_BUFFER,
123235
+ buffer: true,
123236
+ stripFinalNewline: true,
123237
+ extendEnv: true,
123238
+ preferLocal: false,
123239
+ localDir: options.cwd || process.cwd(),
123240
+ execPath: process.execPath,
123241
+ encoding: "utf8",
123242
+ reject: true,
123243
+ cleanup: true,
123244
+ all: false,
123245
+ windowsHide: true,
123246
+ ...options
123247
+ };
123248
+ options.env = getEnv2(options);
123249
+ options.stdio = normalizeStdio(options);
123250
+ if (process.platform === "win32" && path2.basename(file2, ".exe") === "cmd") {
123251
+ args2.unshift("/q");
123252
+ }
123253
+ return {
123254
+ file: file2,
123255
+ args: args2,
123256
+ options,
123257
+ parsed
123258
+ };
123259
+ };
123260
+ const handleOutput = (options, value, error2) => {
123261
+ if (typeof value !== "string" && !Buffer.isBuffer(value)) {
123262
+ return error2 === void 0 ? void 0 : "";
123263
+ }
123264
+ if (options.stripFinalNewline) {
123265
+ return stripFinalNewline2(value);
123266
+ }
123267
+ return value;
123268
+ };
123269
+ const execa2 = (file2, args2, options) => {
123270
+ const parsed = handleArguments(file2, args2, options);
123271
+ const command2 = joinCommand(file2, args2);
123272
+ const escapedCommand = getEscapedCommand(file2, args2);
123273
+ validateTimeout(parsed.options);
123274
+ let spawned;
123275
+ try {
123276
+ spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
123277
+ } catch (error2) {
123278
+ const dummySpawned = new childProcess.ChildProcess();
123279
+ const errorPromise = Promise.reject(makeError({
123280
+ error: error2,
123281
+ stdout: "",
123282
+ stderr: "",
123283
+ all: "",
123284
+ command: command2,
123285
+ escapedCommand,
123286
+ parsed,
123287
+ timedOut: false,
123288
+ isCanceled: false,
123289
+ killed: false
123290
+ }));
123291
+ return mergePromise(dummySpawned, errorPromise);
123292
+ }
123293
+ const spawnedPromise = getSpawnedPromise(spawned);
123294
+ const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
123295
+ const processDone = setExitHandler(spawned, parsed.options, timedPromise);
123296
+ const context2 = {
123297
+ isCanceled: false
123298
+ };
123299
+ spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
123300
+ spawned.cancel = spawnedCancel.bind(null, spawned, context2);
123301
+ const handlePromise = async () => {
123302
+ const [{ error: error2, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
123303
+ const stdout = handleOutput(parsed.options, stdoutResult);
123304
+ const stderr = handleOutput(parsed.options, stderrResult);
123305
+ const all = handleOutput(parsed.options, allResult);
123306
+ if (error2 || exitCode !== 0 || signal !== null) {
123307
+ const returnedError = makeError({
123308
+ error: error2,
123309
+ exitCode,
123310
+ signal,
123311
+ stdout,
123312
+ stderr,
123313
+ all,
123314
+ command: command2,
123315
+ escapedCommand,
123316
+ parsed,
123317
+ timedOut,
123318
+ isCanceled: context2.isCanceled,
123319
+ killed: spawned.killed
123320
+ });
123321
+ if (!parsed.options.reject) {
123322
+ return returnedError;
123323
+ }
123324
+ throw returnedError;
123325
+ }
123326
+ return {
123327
+ command: command2,
123328
+ escapedCommand,
123329
+ exitCode: 0,
123330
+ stdout,
123331
+ stderr,
123332
+ all,
123333
+ failed: false,
123334
+ timedOut: false,
123335
+ isCanceled: false,
123336
+ killed: false
123337
+ };
123338
+ };
123339
+ const handlePromiseOnce = onetime2(handlePromise);
123340
+ handleInput(spawned, parsed.options.input);
123341
+ spawned.all = makeAllStream(spawned, parsed.options);
123342
+ return mergePromise(spawned, handlePromiseOnce);
123343
+ };
123344
+ execa$1.exports = execa2;
123345
+ execa$1.exports.sync = (file2, args2, options) => {
123346
+ const parsed = handleArguments(file2, args2, options);
123347
+ const command2 = joinCommand(file2, args2);
123348
+ const escapedCommand = getEscapedCommand(file2, args2);
123349
+ validateInputSync(parsed.options);
123350
+ let result;
123351
+ try {
123352
+ result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
123353
+ } catch (error2) {
123354
+ throw makeError({
123355
+ error: error2,
123356
+ stdout: "",
123357
+ stderr: "",
123358
+ all: "",
123359
+ command: command2,
123360
+ escapedCommand,
123361
+ parsed,
123362
+ timedOut: false,
123363
+ isCanceled: false,
123364
+ killed: false
123365
+ });
123366
+ }
123367
+ const stdout = handleOutput(parsed.options, result.stdout, result.error);
123368
+ const stderr = handleOutput(parsed.options, result.stderr, result.error);
123369
+ if (result.error || result.status !== 0 || result.signal !== null) {
123370
+ const error2 = makeError({
123371
+ stdout,
123372
+ stderr,
123373
+ error: result.error,
123374
+ signal: result.signal,
123375
+ exitCode: result.status,
123376
+ command: command2,
123377
+ escapedCommand,
123378
+ parsed,
123379
+ timedOut: result.error && result.error.code === "ETIMEDOUT",
123380
+ isCanceled: false,
123381
+ killed: result.signal !== null
123382
+ });
123383
+ if (!parsed.options.reject) {
123384
+ return error2;
123385
+ }
123386
+ throw error2;
123387
+ }
123388
+ return {
123389
+ command: command2,
123390
+ escapedCommand,
123391
+ exitCode: 0,
123392
+ stdout,
123393
+ stderr,
123394
+ failed: false,
123395
+ timedOut: false,
123396
+ isCanceled: false,
123397
+ killed: false
123398
+ };
123399
+ };
123400
+ execa$1.exports.command = (command2, options) => {
123401
+ const [file2, ...args2] = parseCommand(command2);
123402
+ return execa2(file2, args2, options);
123403
+ };
123404
+ execa$1.exports.commandSync = (command2, options) => {
123405
+ const [file2, ...args2] = parseCommand(command2);
123406
+ return execa2.sync(file2, args2, options);
123407
+ };
123408
+ execa$1.exports.node = (scriptPath, args2, options = {}) => {
123409
+ if (args2 && !Array.isArray(args2) && typeof args2 === "object") {
123410
+ options = args2;
123411
+ args2 = [];
123412
+ }
123413
+ const stdio2 = normalizeStdio.node(options);
123414
+ const defaultExecArgv = process.execArgv.filter((arg) => !arg.startsWith("--inspect"));
123415
+ const { nodePath = process.execPath, nodeOptions = defaultExecArgv } = options;
123416
+ return execa2(nodePath, [
123417
+ ...nodeOptions,
123418
+ scriptPath,
123419
+ ...Array.isArray(args2) ? args2 : []
123420
+ ], {
123421
+ ...options,
123422
+ stdin: void 0,
123423
+ stdout: void 0,
123424
+ stderr: void 0,
123425
+ stdio: stdio2,
123426
+ shell: false
123427
+ });
123428
+ };
123429
+ return execa$1.exports;
123430
+ }
123431
+ var execaExports = requireExeca();
123432
+ const execa = getDefaultExportFromCjs(execaExports);
123433
+ const detectDefaultShell = () => {
123434
+ const { env: env2 } = process$3;
123435
+ if (process$3.platform === "win32") {
123436
+ return env2.COMSPEC || "cmd.exe";
123437
+ }
123438
+ try {
123439
+ const { shell } = userInfo();
123440
+ if (shell) {
123441
+ return shell;
123442
+ }
123443
+ } catch {
123444
+ }
123445
+ if (process$3.platform === "darwin") {
123446
+ return env2.SHELL || "/bin/zsh";
123447
+ }
123448
+ return env2.SHELL || "/bin/sh";
123449
+ };
123450
+ const defaultShell = detectDefaultShell();
123451
+ const args$1 = [
123452
+ "-ilc",
123453
+ 'echo -n "_SHELL_ENV_DELIMITER_"; command env; echo -n "_SHELL_ENV_DELIMITER_"; exit'
123454
+ ];
123455
+ const env = {
123456
+ DISABLE_AUTO_UPDATE: "true",
123457
+ ZSH_TMUX_AUTOSTARTED: "true",
123458
+ ZSH_TMUX_AUTOSTART: "false"
123459
+ };
123460
+ const parseEnv = (env2) => {
123461
+ env2 = env2.split("_SHELL_ENV_DELIMITER_")[1];
123462
+ const returnValue = {};
123463
+ for (const line3 of stripAnsi$2(env2).split("\n").filter(Boolean)) {
123464
+ const [key2, ...values] = line3.split("=");
123465
+ returnValue[key2] = values.join("=");
123466
+ }
123467
+ return returnValue;
123468
+ };
123469
+ const fallbackShells = [
123470
+ "/bin/zsh",
123471
+ "/bin/bash"
123472
+ ].filter((shell) => shell !== defaultShell);
123473
+ async function tryFallbackShells() {
123474
+ for (const shell of fallbackShells) {
123475
+ try {
123476
+ const { stdout } = await execa(shell, args$1, {
123477
+ env
123478
+ });
123479
+ return parseEnv(stdout);
123480
+ } catch {
123481
+ }
123482
+ }
123483
+ return process$3.env;
123484
+ }
123485
+ async function shellEnv(shell) {
123486
+ if (process$3.platform === "win32") {
123487
+ return process$3.env;
123488
+ }
123489
+ try {
123490
+ const { stdout } = await execa(shell || defaultShell, args$1, {
123491
+ env
123492
+ });
123493
+ return parseEnv(stdout);
123494
+ } catch (error2) {
123495
+ return tryFallbackShells();
123496
+ }
123497
+ }
123498
+ const SHELL_ENV_TIMEOUT_MS = 3e3;
123499
+ let cachedShellEnvPromise = null;
123500
+ let resolvedShellEnv = {};
123501
+ const shouldSkip = () => process.platform === "win32" || process.env.LODY_DISABLE_SHELL_ENV === "1";
123502
+ const resolveOnce = () => {
123503
+ const probe = shellEnv().then((env2) => {
123504
+ resolvedShellEnv = env2;
123505
+ cachedShellEnvPromise = Promise.resolve(env2);
123506
+ return env2;
123507
+ }).catch(() => ({}));
123508
+ const timeout2 = new Promise((resolve2) => {
123509
+ const timer2 = setTimeout(() => resolve2({}), SHELL_ENV_TIMEOUT_MS);
123510
+ timer2.unref();
123511
+ });
123512
+ return Promise.race([
123513
+ probe,
123514
+ timeout2
123515
+ ]);
123516
+ };
123517
+ const getLoginShellEnv = async () => {
123518
+ if (shouldSkip()) {
123519
+ return {};
123520
+ }
123521
+ if (!cachedShellEnvPromise) {
123522
+ cachedShellEnvPromise = resolveOnce();
123523
+ }
123524
+ return cachedShellEnvPromise;
123525
+ };
123526
+ const getCachedLoginShellEnvSync = () => {
123527
+ if (shouldSkip()) {
123528
+ return {};
123529
+ }
123530
+ if (!cachedShellEnvPromise) {
123531
+ void getLoginShellEnv();
123532
+ }
123533
+ return resolvedShellEnv;
123534
+ };
121800
123535
  const BuiltinACPSetting = {
121801
123536
  claude: {
121802
123537
  packageName: "acp-extension-claude",
121803
- version: "0.37.0",
123538
+ version: "0.39.0",
121804
123539
  binName: "acp-extension-claude"
121805
123540
  },
121806
123541
  codex: {
@@ -122039,6 +123774,36 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
122039
123774
  [pathKey2]: nextPath
122040
123775
  };
122041
123776
  }
123777
+ function mergeLoginShellEnv(base, shellEnv2) {
123778
+ if (!shellEnv2 || Object.keys(shellEnv2).length === 0) {
123779
+ return base;
123780
+ }
123781
+ const merged = {
123782
+ ...shellEnv2,
123783
+ ...base
123784
+ };
123785
+ const pathKey2 = getPathEnvKey(base);
123786
+ const shellPathKey = getPathEnvKey(shellEnv2);
123787
+ const shellParts = (shellEnv2[shellPathKey] ?? "").split(delimiter).filter(Boolean);
123788
+ const baseParts = (base[pathKey2] ?? "").split(delimiter).filter(Boolean);
123789
+ const seen = /* @__PURE__ */ new Set();
123790
+ const ordered = [];
123791
+ for (const entry2 of [
123792
+ ...shellParts,
123793
+ ...baseParts
123794
+ ]) {
123795
+ const normalized = normalizePathEntry(entry2);
123796
+ if (seen.has(normalized)) {
123797
+ continue;
123798
+ }
123799
+ seen.add(normalized);
123800
+ ordered.push(entry2);
123801
+ }
123802
+ if (ordered.length > 0) {
123803
+ merged[pathKey2] = ordered.join(delimiter);
123804
+ }
123805
+ return merged;
123806
+ }
122042
123807
  function createStdinWritableStream(stdin) {
122043
123808
  stdin.on("error", (err2) => {
122044
123809
  if (err2.code !== "EPIPE") {
@@ -122319,7 +124084,8 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
122319
124084
  ...baseEnv,
122320
124085
  CODEX_HOME: path__default.join(options.workdir, ".codex")
122321
124086
  } : baseEnv;
122322
- const envWithAcpStartup = withDefaultAcpPathEntries(mergeACPProcessEnv(launch, env2));
124087
+ const loginShellEnv = await getLoginShellEnv();
124088
+ const envWithAcpStartup = withDefaultAcpPathEntries(mergeACPProcessEnv(launch, mergeLoginShellEnv(env2, loginShellEnv)));
122323
124089
  const keepCodexHome = env2.LODY_KEEP_CODEX_HOME === "1";
122324
124090
  const defaultCodexHome = path__default.join(os__default.homedir(), ".codex");
122325
124091
  const defaultAuthPath = path__default.join(defaultCodexHome, "auth.json");
@@ -129719,7 +131485,7 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
129719
131485
  function asError(error2) {
129720
131486
  return error2 instanceof Error ? error2 : new Error(formatError(error2));
129721
131487
  }
129722
- async function withTimeout$1(promise, timeoutMs, message) {
131488
+ async function withTimeout$1(promise2, timeoutMs, message) {
129723
131489
  let timeoutHandle;
129724
131490
  const timeoutPromise = new Promise((_2, reject) => {
129725
131491
  timeoutHandle = setTimeout(() => reject(new Error(message)), timeoutMs);
@@ -129727,7 +131493,7 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
129727
131493
  });
129728
131494
  try {
129729
131495
  return await Promise.race([
129730
- promise,
131496
+ promise2,
129731
131497
  timeoutPromise
129732
131498
  ]);
129733
131499
  } finally {
@@ -129846,7 +131612,7 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
129846
131612
  const probeTcp = async (target) => {
129847
131613
  const host = target.host === "localhost" ? "127.0.0.1" : target.host;
129848
131614
  return await new Promise((resolve2) => {
129849
- const socket = require$$0$b.createConnection({
131615
+ const socket = require$$0$a.createConnection({
129850
131616
  host,
129851
131617
  port: target.port
129852
131618
  });
@@ -130625,11 +132391,11 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
130625
132391
  }
130626
132392
  await waitForChildProcessExit(child, ACP_PROCESS_EXIT_TIMEOUT_MS);
130627
132393
  }
130628
- async function withTimeout(promise, label2) {
132394
+ async function withTimeout(promise2, label2) {
130629
132395
  let timeout2 = null;
130630
132396
  try {
130631
132397
  return await Promise.race([
130632
- promise,
132398
+ promise2,
130633
132399
  new Promise((_resolve, reject) => {
130634
132400
  timeout2 = setTimeout(() => reject(new Error(`${label2} timed out after ${ACP_OPERATION_TIMEOUT_MS}ms`)), ACP_OPERATION_TIMEOUT_MS);
130635
132401
  })
@@ -130667,11 +132433,13 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
130667
132433
  const launch = resolveHistoryACPProcessLaunch({
130668
132434
  provider: args2.provider
130669
132435
  });
132436
+ const loginShellEnv = await getLoginShellEnv();
132437
+ const env2 = withDefaultAcpPathEntries(mergeLoginShellEnv(launch.env, loginShellEnv));
130670
132438
  const agentProcess = spawnAcpProcess({
130671
132439
  cliType: args2.provider.cliType,
130672
132440
  agentType: args2.provider.agentType,
130673
132441
  workdir: args2.workdir,
130674
- env: launch.env,
132442
+ env: env2,
130675
132443
  command: launch.command,
130676
132444
  args: launch.args
130677
132445
  });
@@ -131845,21 +133613,21 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
131845
133613
  this.logger.debug(`[${sessionId}] Failed to resolve usage update context: ${formatErrorMessage(error2)}`);
131846
133614
  }
131847
133615
  }
131848
- trackPendingContextWindowPersist(sessionId, promise) {
133616
+ trackPendingContextWindowPersist(sessionId, promise2) {
131849
133617
  const state2 = this.store.get(sessionId);
131850
- state2.pendingContextWindowHandlers.add(promise);
131851
- void promise.finally(() => {
131852
- state2.pendingContextWindowHandlers.delete(promise);
133618
+ state2.pendingContextWindowHandlers.add(promise2);
133619
+ void promise2.finally(() => {
133620
+ state2.pendingContextWindowHandlers.delete(promise2);
131853
133621
  });
131854
133622
  }
131855
133623
  enqueueThreadGoalHistoryPersist(sessionId, task) {
131856
133624
  const state2 = this.store.get(sessionId);
131857
- const promise = state2.threadGoalPersistChain.catch(() => void 0).then(task);
131858
- state2.threadGoalPersistChain = promise;
131859
- state2.pendingThreadGoalHandlers.add(promise);
131860
- void promise.finally(() => {
131861
- state2.pendingThreadGoalHandlers.delete(promise);
131862
- if (state2.threadGoalPersistChain === promise) {
133625
+ const promise2 = state2.threadGoalPersistChain.catch(() => void 0).then(task);
133626
+ state2.threadGoalPersistChain = promise2;
133627
+ state2.pendingThreadGoalHandlers.add(promise2);
133628
+ void promise2.finally(() => {
133629
+ state2.pendingThreadGoalHandlers.delete(promise2);
133630
+ if (state2.threadGoalPersistChain === promise2) {
131863
133631
  state2.threadGoalPersistChain = Promise.resolve();
131864
133632
  }
131865
133633
  });
@@ -132183,8 +133951,8 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
132183
133951
  return;
132184
133952
  }
132185
133953
  state2.contextWindowUsageBuffer = null;
132186
- const promise = this.persistContextWindowUsage(sessionId, latest2);
132187
- this.trackPendingContextWindowPersist(sessionId, promise);
133954
+ const promise2 = this.persistContextWindowUsage(sessionId, latest2);
133955
+ this.trackPendingContextWindowPersist(sessionId, promise2);
132188
133956
  }, MessageHandler.CONTEXT_WINDOW_USAGE_THROTTLE_MS);
132189
133957
  }
132190
133958
  async flushSessionContextWindowUsage(sessionId) {
@@ -132196,8 +133964,8 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
132196
133964
  const latest2 = state2.contextWindowUsageBuffer;
132197
133965
  if (latest2) {
132198
133966
  state2.contextWindowUsageBuffer = null;
132199
- const promise = this.persistContextWindowUsage(sessionId, latest2);
132200
- this.trackPendingContextWindowPersist(sessionId, promise);
133967
+ const promise2 = this.persistContextWindowUsage(sessionId, latest2);
133968
+ this.trackPendingContextWindowPersist(sessionId, promise2);
132201
133969
  }
132202
133970
  for (; ; ) {
132203
133971
  const cwState = this.store.get(sessionId);
@@ -132690,11 +134458,11 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
132690
134458
  this.enqueueACPUpdate(sessionId, update2);
132691
134459
  });
132692
134460
  this.sessionManager.on("onUsageUpdate", ({ sessionId, acpSessionId, usage }) => {
132693
- const promise = this.handleUsageUpdate(sessionId, acpSessionId, usage);
134461
+ const promise2 = this.handleUsageUpdate(sessionId, acpSessionId, usage);
132694
134462
  const usageState = this.store.get(sessionId);
132695
- usageState.pendingUsageHandlers.add(promise);
132696
- void promise.finally(() => {
132697
- usageState.pendingUsageHandlers.delete(promise);
134463
+ usageState.pendingUsageHandlers.add(promise2);
134464
+ void promise2.finally(() => {
134465
+ usageState.pendingUsageHandlers.delete(promise2);
132698
134466
  });
132699
134467
  });
132700
134468
  this.sessionManager.on("onContextWindowUsageUpdate", (sessionId, usage) => {
@@ -134916,7 +136684,7 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
134916
136684
  this.messageProcessor.enqueue(message, async (nextMessage) => {
134917
136685
  const responses = [];
134918
136686
  let settled = false;
134919
- const resolveOnce = () => {
136687
+ const resolveOnce2 = () => {
134920
136688
  if (settled) {
134921
136689
  return;
134922
136690
  }
@@ -134942,13 +136710,13 @@ ${escapeHtmlScriptContent(VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT)}
134942
136710
  const isImmediateCreateResponse = nextMessage.type === "session/create" && typed.type === "session/create_response" && typed.sessionId === nextMessage.sessionId;
134943
136711
  const isImmediateChatResponse = nextMessage.type === "session/chat" && typed.type === "session/chat_response" && typed.sessionId === nextMessage.sessionId && typed.userTurnId === nextMessage.userTurnId;
134944
136712
  if (isImmediateCreateResponse || isImmediateChatResponse) {
134945
- resolveOnce();
136713
+ resolveOnce2();
134946
136714
  }
134947
136715
  }
134948
136716
  };
134949
136717
  try {
134950
136718
  await handler.handleMessage(nextMessage, context2);
134951
- resolveOnce();
136719
+ resolveOnce2();
134952
136720
  } catch (error2) {
134953
136721
  rejectOnce(error2);
134954
136722
  throw error2;
@@ -141685,10 +143453,11 @@ export PATH=${toSingleQuotedShellString(ghShimBinDir)}:"$PATH"
141685
143453
  LODY_SESSION_ID: this.sessionId,
141686
143454
  LODY_WORKSPACE_SESSION_ID: workspaceSessionId
141687
143455
  };
141688
- const agentEnv = this.config.agentCliType === "builtin" && this.config.agentType === "claude" ? scrubInheritedClaudeAuthEnv(merged, {
143456
+ const withLoginShell = mergeLoginShellEnv(merged, getCachedLoginShellEnvSync());
143457
+ const agentEnv = this.config.agentCliType === "builtin" && this.config.agentType === "claude" ? scrubInheritedClaudeAuthEnv(withLoginShell, {
141689
143458
  ...configEnv,
141690
143459
  ...extraEnv
141691
- }) : merged;
143460
+ }) : withLoginShell;
141692
143461
  return withDefaultAcpPathEntries(agentEnv);
141693
143462
  }
141694
143463
  async createAgent(callbacks) {
@@ -141968,11 +143737,11 @@ export PATH=${toSingleQuotedShellString(ghShimBinDir)}:"$PATH"
141968
143737
  if (existing) {
141969
143738
  return await existing;
141970
143739
  }
141971
- const promise = this.createSessionInnerWithAgent(config2, agentStart).finally(() => {
143740
+ const promise2 = this.createSessionInnerWithAgent(config2, agentStart).finally(() => {
141972
143741
  this.pendingSessionCreates.delete(sessionId);
141973
143742
  });
141974
- this.pendingSessionCreates.set(sessionId, promise);
141975
- return await promise;
143743
+ this.pendingSessionCreates.set(sessionId, promise2);
143744
+ return await promise2;
141976
143745
  }
141977
143746
  async initialize() {
141978
143747
  this.logger.debug("Session manager initialized");
@@ -142544,6 +144313,7 @@ export PATH=${toSingleQuotedShellString(ghShimBinDir)}:"$PATH"
142544
144313
  return new Lody(options, manager);
142545
144314
  }
142546
144315
  async start() {
144316
+ void getLoginShellEnv();
142547
144317
  await this.runtime.initialize();
142548
144318
  }
142549
144319
  async registerAgent(cliTypes) {
@@ -148546,12 +150316,12 @@ Received ${signal}, shutting down gracefully...` : "\nShutting down gracefully..
148546
150316
  static withResolver() {
148547
150317
  let resolve2;
148548
150318
  let reject;
148549
- const promise = new Promise((res, rej) => {
150319
+ const promise2 = new Promise((res, rej) => {
148550
150320
  resolve2 = res;
148551
150321
  reject = rej;
148552
150322
  });
148553
150323
  return {
148554
- promise,
150324
+ promise: promise2,
148555
150325
  resolve: resolve2,
148556
150326
  reject
148557
150327
  };
@@ -148569,7 +150339,7 @@ Received ${signal}, shutting down gracefully...` : "\nShutting down gracefully..
148569
150339
  output
148570
150340
  });
148571
150341
  const screen = new ScreenManager(rl);
148572
- const { promise, resolve: resolve2, reject } = PromisePolyfill.withResolver();
150342
+ const { promise: promise2, resolve: resolve2, reject } = PromisePolyfill.withResolver();
148573
150343
  const cancel = () => reject(new CancelPromptError());
148574
150344
  if (signal) {
148575
150345
  const abort2 = () => reject(new AbortPromptError({
@@ -148577,7 +150347,7 @@ Received ${signal}, shutting down gracefully...` : "\nShutting down gracefully..
148577
150347
  }));
148578
150348
  if (signal.aborted) {
148579
150349
  abort2();
148580
- return Object.assign(promise, {
150350
+ return Object.assign(promise2, {
148581
150351
  cancel
148582
150352
  });
148583
150353
  }
@@ -148608,7 +150378,7 @@ Received ${signal}, shutting down gracefully...` : "\nShutting down gracefully..
148608
150378
  reject(error2);
148609
150379
  }
148610
150380
  });
148611
- return Object.assign(promise.then((answer) => {
150381
+ return Object.assign(promise2.then((answer) => {
148612
150382
  effectScheduler.clearAll();
148613
150383
  return answer;
148614
150384
  }, (error2) => {
@@ -148620,7 +150390,7 @@ Received ${signal}, shutting down gracefully...` : "\nShutting down gracefully..
148620
150390
  clearContent: Boolean(context2?.clearPromptOnDone)
148621
150391
  });
148622
150392
  output.end();
148623
- }).then(() => promise), {
150393
+ }).then(() => promise2), {
148624
150394
  cancel
148625
150395
  });
148626
150396
  });
@@ -158534,7 +160304,7 @@ ${page}${helpTipBottom}${choiceDescription}${error2}${ansiEscapes.cursorHide}`;
158534
160304
  value: true
158535
160305
  });
158536
160306
  var chardet_1 = requireChardet();
158537
- var child_process_1 = require$$0$a;
160307
+ var child_process_1 = require$$1$8;
158538
160308
  var fs_1 = fs__default;
158539
160309
  var iconv_lite_1 = requireLib();
158540
160310
  var tmp_1 = requireTmp();
@@ -162887,9 +164657,9 @@ ${page}${helpTipBottom}${choiceDescription}${ansiEscapes.cursorHide}`;
162887
164657
  });
162888
164658
  }
162889
164659
  innerFrom.fromArrayLike = fromArrayLike;
162890
- function fromPromise(promise) {
164660
+ function fromPromise(promise2) {
162891
164661
  return new Observable_1.Observable(function(subscriber) {
162892
- promise.then(function(value) {
164662
+ promise2.then(function(value) {
162893
164663
  if (!subscriber.closed) {
162894
164664
  subscriber.next(value);
162895
164665
  subscriber.complete();
@@ -170302,7 +172072,7 @@ ${page}${helpTipBottom}${choiceDescription}${ansiEscapes.cursorHide}`;
170302
172072
  return function() {
170303
172073
  var args2 = arguments;
170304
172074
  var originalThis = this;
170305
- var promise = new Promise(function(resolve2, reject) {
172075
+ var promise2 = new Promise(function(resolve2, reject) {
170306
172076
  var resolved = false;
170307
172077
  const wrappedResolve = function(value) {
170308
172078
  if (resolved) {
@@ -170373,8 +172143,8 @@ ${page}${helpTipBottom}${choiceDescription}${ansiEscapes.cursorHide}`;
170373
172143
  }
170374
172144
  contextEnded = true;
170375
172145
  });
170376
- promise.then(cb.bind(null, null), cb);
170377
- return promise;
172146
+ promise2.then(cb.bind(null, null), cb);
172147
+ return promise2;
170378
172148
  };
170379
172149
  };
170380
172150
  runAsync2.cb = function(func, cb) {