@lobehub/cli 0.0.85 → 0.0.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import { Buffer as Buffer$1 } from "node:buffer";
15
15
  import * as net$1 from "node:net";
16
16
  import net, { BlockList, connect, createServer, isIP } from "node:net";
17
17
  import { scheduler, setImmediate as setImmediate$1, setTimeout as setTimeout$1 } from "node:timers/promises";
18
- import _w, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
18
+ import process$1, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
19
19
  import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
20
20
  import { finished, pipeline } from "node:stream/promises";
21
21
  import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark, pipeline as pipeline$1 } from "node:stream";
@@ -8222,6 +8222,8 @@ var init_agentRuntime = __esmMin((() => {
8222
8222
  RequestTrigger["InputCompletion"] = "input_completion";
8223
8223
  RequestTrigger["Memory"] = "memory";
8224
8224
  RequestTrigger["MultimodalAnalysis"] = "multimodal_analysis";
8225
+ /** Text-to-music generation from a music generation topic. */
8226
+ RequestTrigger["Music"] = "music";
8225
8227
  RequestTrigger["Notify"] = "notify";
8226
8228
  RequestTrigger["Onboarding"] = "onboarding";
8227
8229
  RequestTrigger["Openapi"] = "openapi";
@@ -9869,6 +9871,7 @@ var init_files = __esmMin((() => {
9869
9871
  FileSource["ImageGeneration"] = "image_generation";
9870
9872
  /** Audio recording owned by a meeting (`meetings.audio_file_id`), not the resource library. */
9871
9873
  FileSource["Meeting"] = "meeting";
9874
+ FileSource["MusicGeneration"] = "music_generation";
9872
9875
  FileSource["PageEditor"] = "page-editor";
9873
9876
  /**
9874
9877
  * A file a skill package holds: a binary file beside its `SKILL.md`, or a
@@ -11842,10 +11845,10 @@ var init_acceptanceFlow = __esmMin((() => {
11842
11845
 
11843
11846
  //#endregion
11844
11847
  //#region ../../packages/types/src/acceptanceReview.ts
11845
- var rectSchema, acceptanceReviewAnchorSchema, ACCEPTANCE_REVIEW_ANCHOR_MAX_BYTES, createAcceptanceReviewCommentSchema, acceptanceReviewDecisionSchema;
11848
+ var rectSchema$1, acceptanceReviewAnchorSchema, ACCEPTANCE_REVIEW_ANCHOR_MAX_BYTES, createAcceptanceReviewCommentSchema, acceptanceReviewDecisionSchema;
11846
11849
  var init_acceptanceReview = __esmMin((() => {
11847
11850
  init_zod$1();
11848
- rectSchema = object$1({
11851
+ rectSchema$1 = object$1({
11849
11852
  height: number$1().finite(),
11850
11853
  width: number$1().finite(),
11851
11854
  x: number$1().finite(),
@@ -11863,9 +11866,9 @@ var init_acceptanceReview = __esmMin((() => {
11863
11866
  userAgent: string().max(500)
11864
11867
  }).optional(),
11865
11868
  intent: _enum(["change", "comment"]),
11866
- region: rectSchema.optional(),
11869
+ region: rectSchema$1.optional(),
11867
11870
  regionRefs: array(object$1({
11868
- box: rectSchema,
11871
+ box: rectSchema$1,
11869
11872
  selector: string().max(2e3),
11870
11873
  text: string().max(200).optional()
11871
11874
  }).nullable()).max(6).optional(),
@@ -11886,7 +11889,7 @@ var init_acceptanceReview = __esmMin((() => {
11886
11889
  line: number$1().int()
11887
11890
  }).optional(),
11888
11891
  label: string().max(200),
11889
- rect: rectSchema,
11892
+ rect: rectSchema$1,
11890
11893
  selector: string().max(2e3),
11891
11894
  text: string().max(200).optional()
11892
11895
  })).max(8),
@@ -11913,6 +11916,97 @@ var init_acceptanceReview = __esmMin((() => {
11913
11916
  });
11914
11917
  }));
11915
11918
 
11919
+ //#endregion
11920
+ //#region ../../packages/types/src/acceptanceReviewRound.ts
11921
+ var acceptanceReviewMarkKinds, finite, rectSchema, anchorShape, sketchNodeSchema, acceptanceReviewMarkContextSchema, acceptanceReviewPageMetaSchema, acceptanceReviewMarkInputSchema, ACCEPTANCE_REVIEW_MARK_MAX_BYTES, screenshotSchema, createAcceptanceReviewMarkSchema, updateAcceptanceReviewMarkSchema, submitAcceptanceReviewSchema, acceptanceReviewMarkVerdicts, acceptanceReviewMarkVerdictSchema, createAcceptanceReviewReplySchema;
11922
+ var init_acceptanceReviewRound = __esmMin((() => {
11923
+ init_zod$1();
11924
+ init_acceptanceReview();
11925
+ acceptanceReviewMarkKinds = [
11926
+ "region",
11927
+ "element",
11928
+ "sketch"
11929
+ ];
11930
+ finite = number$1().finite();
11931
+ rectSchema = object$1({
11932
+ height: finite,
11933
+ width: finite,
11934
+ x: finite,
11935
+ y: finite
11936
+ });
11937
+ anchorShape = acceptanceReviewAnchorSchema.shape;
11938
+ sketchNodeSchema = lazy(() => object$1({
11939
+ children: array(sketchNodeSchema).max(50),
11940
+ rect: rectSchema,
11941
+ type: _enum([
11942
+ "avatar",
11943
+ "button",
11944
+ "card",
11945
+ "image",
11946
+ "input",
11947
+ "text"
11948
+ ])
11949
+ }));
11950
+ acceptanceReviewMarkContextSchema = object$1({
11951
+ commit: anchorShape.commit,
11952
+ context: anchorShape.context,
11953
+ env: anchorShape.env
11954
+ });
11955
+ acceptanceReviewPageMetaSchema = object$1({
11956
+ description: string().max(500).optional(),
11957
+ favicon: string().max(2e3).optional(),
11958
+ lang: string().max(35).optional(),
11959
+ title: string().max(300).optional()
11960
+ });
11961
+ acceptanceReviewMarkInputSchema = object$1({
11962
+ clientId: string().trim().min(1).max(255),
11963
+ content: string().trim().min(1).max(4e3),
11964
+ context: acceptanceReviewMarkContextSchema.optional(),
11965
+ kind: _enum(acceptanceReviewMarkKinds),
11966
+ pageMeta: acceptanceReviewPageMetaSchema.optional(),
11967
+ rectDocument: rectSchema,
11968
+ rectViewport: rectSchema,
11969
+ regionRefs: anchorShape.regionRefs,
11970
+ regions: array(rectSchema).max(6).optional(),
11971
+ routeKey: string().max(500),
11972
+ scroll: object$1({
11973
+ x: finite,
11974
+ y: finite
11975
+ }),
11976
+ sketch: array(sketchNodeSchema).max(50).optional(),
11977
+ targets: anchorShape.targets.optional(),
11978
+ url: string().url().max(2e3),
11979
+ viewport: object$1({
11980
+ dpr: number$1().positive(),
11981
+ height: finite,
11982
+ width: finite
11983
+ })
11984
+ });
11985
+ ACCEPTANCE_REVIEW_MARK_MAX_BYTES = 64 * 1024;
11986
+ screenshotSchema = object$1({ dataUrl: string().regex(/^data:image\/(jpeg|webp);base64,/) });
11987
+ createAcceptanceReviewMarkSchema = acceptanceReviewMarkInputSchema.extend({ screenshot: screenshotSchema.optional() }).refine(({ screenshot: _screenshot, ...mark }) => JSON.stringify(mark).length <= ACCEPTANCE_REVIEW_MARK_MAX_BYTES, { message: "Mark is too large" });
11988
+ updateAcceptanceReviewMarkSchema = object$1({
11989
+ content: string().trim().min(1).max(4e3).optional(),
11990
+ rectDocument: rectSchema.optional(),
11991
+ rectViewport: rectSchema.optional(),
11992
+ regionRefs: anchorShape.regionRefs,
11993
+ regions: array(rectSchema).max(6).optional()
11994
+ }).refine((value) => Object.values(value).some((field) => field !== void 0), { message: "Nothing to update" });
11995
+ submitAcceptanceReviewSchema = object$1({
11996
+ agentId: string().trim().min(1).max(255).optional(),
11997
+ feedback: string().trim().max(4e3).optional()
11998
+ });
11999
+ acceptanceReviewMarkVerdicts = ["pass", "not_fixed"];
12000
+ acceptanceReviewMarkVerdictSchema = object$1({
12001
+ reason: string().trim().max(2e3).optional(),
12002
+ verdict: _enum(acceptanceReviewMarkVerdicts)
12003
+ });
12004
+ createAcceptanceReviewReplySchema = object$1({
12005
+ clientId: string().trim().min(1).max(255),
12006
+ content: string().trim().min(1).max(4e3)
12007
+ });
12008
+ }));
12009
+
11916
12010
  //#endregion
11917
12011
  //#region ../../packages/types/src/oauthApp.ts
11918
12012
  var init_oauthApp = __esmMin((() => {}));
@@ -12048,6 +12142,7 @@ var init_src$1 = __esmMin((() => {
12048
12142
  init_acceptanceComment();
12049
12143
  init_acceptanceFlow();
12050
12144
  init_acceptanceReview();
12145
+ init_acceptanceReviewRound();
12051
12146
  init_agentRuntime();
12052
12147
  init_oauthApp();
12053
12148
  init_chat();
@@ -17675,7 +17770,7 @@ const ZH_HANT = toZhPools((text) => [...text].map((char) => ZH_HANT_CHARS[char]
17675
17770
  const API_KEY_FULL_ACCESS_SCOPE = "*";
17676
17771
  /**
17677
17772
  * The selectable scope catalog. `model:invoke` is its own tier because it is
17678
- * the one that burns money (chat/completions, image, video, asr).
17773
+ * the one that burns money (chat/completions, image, video, music, asr).
17679
17774
  *
17680
17775
  * Deliberately absent (a restricted key can never obtain them):
17681
17776
  * - `api_key:*` — keys must not mint keys (self-provisioning)
@@ -17788,6 +17883,7 @@ const TRPC_NAMESPACE_API_KEY_RULES = {
17788
17883
  message: rw("chat:read", "chat:write"),
17789
17884
  messenger: "blocked",
17790
17885
  metric: rw("agent:read", "agent:write"),
17886
+ music: { any: "model:invoke" },
17791
17887
  notebook: rw("knowledge:read", "knowledge:write"),
17792
17888
  notification: rw("user:read", "user:write"),
17793
17889
  oauthApp: "blocked",
@@ -21471,7 +21567,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
21471
21567
  const childProcess$2 = __require("node:child_process");
21472
21568
  const path$16 = __require("node:path");
21473
21569
  const fs$17 = __require("node:fs");
21474
- const process$2 = __require("node:process");
21570
+ const process$3 = __require("node:process");
21475
21571
  const { Argument, humanReadableArgName } = require_argument();
21476
21572
  const { CommanderError } = require_error$1();
21477
21573
  const { Help, stripColor } = require_help();
@@ -21523,13 +21619,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
21523
21619
  this._showSuggestionAfterError = true;
21524
21620
  this._savedState = null;
21525
21621
  this._outputConfiguration = {
21526
- writeOut: (str) => process$2.stdout.write(str),
21527
- writeErr: (str) => process$2.stderr.write(str),
21622
+ writeOut: (str) => process$3.stdout.write(str),
21623
+ writeErr: (str) => process$3.stderr.write(str),
21528
21624
  outputError: (str, write) => write(str),
21529
- getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
21530
- getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
21531
- getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
21532
- getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
21625
+ getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
21626
+ getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
21627
+ getOutHasColors: () => useColor() ?? (process$3.stdout.isTTY && process$3.stdout.hasColors?.()),
21628
+ getErrHasColors: () => useColor() ?? (process$3.stderr.isTTY && process$3.stderr.hasColors?.()),
21533
21629
  stripColor: (str) => stripColor(str)
21534
21630
  };
21535
21631
  this._hidden = false;
@@ -21887,7 +21983,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
21887
21983
  */
21888
21984
  _exit(exitCode, code, message) {
21889
21985
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
21890
- process$2.exit(exitCode);
21986
+ process$3.exit(exitCode);
21891
21987
  }
21892
21988
  /**
21893
21989
  * Register callback `fn` for the command.
@@ -22226,11 +22322,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
22226
22322
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
22227
22323
  parseOptions = parseOptions || {};
22228
22324
  if (argv === void 0 && parseOptions.from === void 0) {
22229
- if (process$2.versions?.electron) parseOptions.from = "electron";
22230
- const execArgv = process$2.execArgv ?? [];
22325
+ if (process$3.versions?.electron) parseOptions.from = "electron";
22326
+ const execArgv = process$3.execArgv ?? [];
22231
22327
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
22232
22328
  }
22233
- if (argv === void 0) argv = process$2.argv;
22329
+ if (argv === void 0) argv = process$3.argv;
22234
22330
  this.rawArgs = argv.slice();
22235
22331
  let userArgs;
22236
22332
  switch (parseOptions.from) {
@@ -22240,7 +22336,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
22240
22336
  userArgs = argv.slice(2);
22241
22337
  break;
22242
22338
  case "electron":
22243
- if (process$2.defaultApp) {
22339
+ if (process$3.defaultApp) {
22244
22340
  this._scriptPath = argv[1];
22245
22341
  userArgs = argv.slice(2);
22246
22342
  } else userArgs = argv.slice(1);
@@ -22405,16 +22501,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
22405
22501
  }
22406
22502
  launchWithNode = sourceExt.includes(path$16.extname(executableFile));
22407
22503
  let proc;
22408
- if (process$2.platform !== "win32") if (launchWithNode) {
22504
+ if (process$3.platform !== "win32") if (launchWithNode) {
22409
22505
  args.unshift(executableFile);
22410
- args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
22411
- proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
22506
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
22507
+ proc = childProcess$2.spawn(process$3.argv[0], args, { stdio: "inherit" });
22412
22508
  } else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
22413
22509
  else {
22414
22510
  this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
22415
22511
  args.unshift(executableFile);
22416
- args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
22417
- proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
22512
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
22513
+ proc = childProcess$2.spawn(process$3.execPath, args, { stdio: "inherit" });
22418
22514
  }
22419
22515
  if (!proc.killed) [
22420
22516
  "SIGUSR1",
@@ -22423,20 +22519,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
22423
22519
  "SIGINT",
22424
22520
  "SIGHUP"
22425
22521
  ].forEach((signal) => {
22426
- process$2.on(signal, () => {
22522
+ process$3.on(signal, () => {
22427
22523
  if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
22428
22524
  });
22429
22525
  });
22430
22526
  const exitCallback = this._exitCallback;
22431
22527
  proc.on("close", (code) => {
22432
22528
  code = code ?? 1;
22433
- if (!exitCallback) process$2.exit(code);
22529
+ if (!exitCallback) process$3.exit(code);
22434
22530
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
22435
22531
  });
22436
22532
  proc.on("error", (err) => {
22437
22533
  if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
22438
22534
  else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
22439
- if (!exitCallback) process$2.exit(1);
22535
+ if (!exitCallback) process$3.exit(1);
22440
22536
  else {
22441
22537
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
22442
22538
  wrappedError.nestedError = err;
@@ -22845,13 +22941,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
22845
22941
  */
22846
22942
  _parseOptionsEnv() {
22847
22943
  this.options.forEach((option) => {
22848
- if (option.envVar && option.envVar in process$2.env) {
22944
+ if (option.envVar && option.envVar in process$3.env) {
22849
22945
  const optionKey = option.attributeName();
22850
22946
  if (this.getOptionValue(optionKey) === void 0 || [
22851
22947
  "default",
22852
22948
  "config",
22853
22949
  "env"
22854
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
22950
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
22855
22951
  else this.emit(`optionEnv:${option.name()}`);
22856
22952
  }
22857
22953
  });
@@ -23268,7 +23364,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
23268
23364
  */
23269
23365
  help(contextOptions) {
23270
23366
  this.outputHelp(contextOptions);
23271
- let exitCode = Number(process$2.exitCode ?? 0);
23367
+ let exitCode = Number(process$3.exitCode ?? 0);
23272
23368
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
23273
23369
  this._exit(exitCode, "commander.help", "(outputHelp)");
23274
23370
  }
@@ -23358,8 +23454,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
23358
23454
  * @package
23359
23455
  */
23360
23456
  function useColor() {
23361
- if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
23362
- if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
23457
+ if (process$3.env.NO_COLOR || process$3.env.FORCE_COLOR === "0" || process$3.env.FORCE_COLOR === "false") return false;
23458
+ if (process$3.env.FORCE_COLOR || process$3.env.CLICOLOR_FORCE !== void 0) return true;
23363
23459
  }
23364
23460
  exports.Command = Command;
23365
23461
  exports.useColor = useColor;
@@ -31324,7 +31420,7 @@ _Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /
31324
31420
  var src_default = new Mime(types$1, types$2)._freeze();
31325
31421
 
31326
31422
  //#endregion
31327
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/Errors.js
31423
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/Errors.js
31328
31424
  var defaultMessages, EndOfStreamError, AbortError$1;
31329
31425
  var init_Errors = __esmMin((() => {
31330
31426
  defaultMessages = "End-Of-Stream";
@@ -31343,7 +31439,7 @@ var init_Errors = __esmMin((() => {
31343
31439
  }));
31344
31440
 
31345
31441
  //#endregion
31346
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/AbortSignal.js
31442
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/AbortSignal.js
31347
31443
  /** Reject an already-cancelled operation before acquiring tokenizer resources. */
31348
31444
  function throwIfAborted(signal) {
31349
31445
  if (signal?.aborted) throw new AbortError$1();
@@ -31353,7 +31449,7 @@ var init_AbortSignal = __esmMin((() => {
31353
31449
  }));
31354
31450
 
31355
31451
  //#endregion
31356
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/BufferSizeError.js
31452
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/BufferSizeError.js
31357
31453
  /**
31358
31454
  * Validate options before acquiring file handles or stream readers.
31359
31455
  * @param options - Tokenizer options containing the optional allocation limit
@@ -31383,12 +31479,12 @@ var init_BufferSizeError = __esmMin((() => {
31383
31479
  }));
31384
31480
 
31385
31481
  //#endregion
31386
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/AbstractStreamReader.js
31482
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/AbstractStreamReader.js
31387
31483
  var AbstractStreamReader;
31388
31484
  var init_AbstractStreamReader = __esmMin((() => {
31389
31485
  init_Errors();
31390
31486
  AbstractStreamReader = class {
31391
- constructor() {
31487
+ constructor(options) {
31392
31488
  this.endOfStream = false;
31393
31489
  this.interrupted = false;
31394
31490
  /**
@@ -31396,6 +31492,7 @@ var init_AbstractStreamReader = __esmMin((() => {
31396
31492
  * @type {Array}
31397
31493
  */
31398
31494
  this.peekQueue = [];
31495
+ this.onCloseCallback = options?.onClose;
31399
31496
  }
31400
31497
  async peek(uint8Array, mayBeLess = false) {
31401
31498
  const bytesRead = await this.read(uint8Array, mayBeLess);
@@ -31439,11 +31536,23 @@ var init_AbstractStreamReader = __esmMin((() => {
31439
31536
  if (!mayBeLess && bytesRead < buffer.length) throw new EndOfStreamError();
31440
31537
  return bytesRead;
31441
31538
  }
31539
+ /** Share resource cleanup, callback completion and failures across close calls. */
31540
+ close() {
31541
+ this.closePromise ?? (this.closePromise = Promise.resolve().then(async () => {
31542
+ await this.closeResource();
31543
+ await this.onCloseCallback?.();
31544
+ }));
31545
+ return this.closePromise;
31546
+ }
31547
+ /** Backend cleanup completes before the optional close callback. */
31548
+ closeResource() {
31549
+ return this.abort();
31550
+ }
31442
31551
  };
31443
31552
  }));
31444
31553
 
31445
31554
  //#endregion
31446
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/Deferred.js
31555
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/Deferred.js
31447
31556
  var Deferred;
31448
31557
  var init_Deferred = __esmMin((() => {
31449
31558
  Deferred = class {
@@ -31459,7 +31568,7 @@ var init_Deferred = __esmMin((() => {
31459
31568
  }));
31460
31569
 
31461
31570
  //#endregion
31462
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/StreamReader.js
31571
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/StreamReader.js
31463
31572
  function handlePostEndError() {
31464
31573
  this.removeListener("close", removePostEndErrorHandler);
31465
31574
  }
@@ -31472,8 +31581,8 @@ var init_StreamReader = __esmMin((() => {
31472
31581
  init_Deferred();
31473
31582
  init_Errors();
31474
31583
  StreamReader = class extends AbstractStreamReader {
31475
- constructor(s) {
31476
- super();
31584
+ constructor(s, options) {
31585
+ super(options);
31477
31586
  this.s = s;
31478
31587
  /**
31479
31588
  * Pending requests waiting for data, tracked until completion or cancellation
@@ -31561,33 +31670,31 @@ var init_StreamReader = __esmMin((() => {
31561
31670
  async abort() {
31562
31671
  this.reject(new AbortError$1());
31563
31672
  }
31564
- async close() {
31565
- return this.abort();
31566
- }
31567
31673
  };
31568
31674
  }));
31569
31675
 
31570
31676
  //#endregion
31571
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/WebStreamReader.js
31677
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/WebStreamReader.js
31572
31678
  var WebStreamReader;
31573
31679
  var init_WebStreamReader = __esmMin((() => {
31574
31680
  init_AbstractStreamReader();
31575
31681
  WebStreamReader = class extends AbstractStreamReader {
31576
- constructor(reader) {
31577
- super();
31682
+ constructor(reader, options) {
31683
+ super(options);
31578
31684
  this.reader = reader;
31685
+ this.released = false;
31579
31686
  }
31580
31687
  async abort() {
31581
- return this.close();
31582
- }
31583
- async close() {
31584
- this.reader.releaseLock();
31688
+ if (!this.released) {
31689
+ this.reader.releaseLock();
31690
+ this.released = true;
31691
+ }
31585
31692
  }
31586
31693
  };
31587
31694
  }));
31588
31695
 
31589
31696
  //#endregion
31590
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/WebStreamByobReader.js
31697
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/WebStreamByobReader.js
31591
31698
  var WebStreamByobReader;
31592
31699
  var init_WebStreamByobReader = __esmMin((() => {
31593
31700
  init_WebStreamReader();
@@ -31612,14 +31719,14 @@ var init_WebStreamByobReader = __esmMin((() => {
31612
31719
  }));
31613
31720
 
31614
31721
  //#endregion
31615
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js
31722
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js
31616
31723
  var WebStreamDefaultReader;
31617
31724
  var init_WebStreamDefaultReader = __esmMin((() => {
31618
31725
  init_AbstractStreamReader();
31619
31726
  init_Errors();
31620
31727
  WebStreamDefaultReader = class extends AbstractStreamReader {
31621
- constructor(reader) {
31622
- super();
31728
+ constructor(reader, options) {
31729
+ super(options);
31623
31730
  this.reader = reader;
31624
31731
  this.buffer = null;
31625
31732
  }
@@ -31658,7 +31765,7 @@ var init_WebStreamDefaultReader = __esmMin((() => {
31658
31765
  this.interrupted = true;
31659
31766
  return this.reader.cancel();
31660
31767
  }
31661
- async close() {
31768
+ async closeResource() {
31662
31769
  try {
31663
31770
  await this.abort();
31664
31771
  } finally {
@@ -31669,14 +31776,14 @@ var init_WebStreamDefaultReader = __esmMin((() => {
31669
31776
  }));
31670
31777
 
31671
31778
  //#endregion
31672
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js
31673
- function makeWebStreamReader(stream) {
31779
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js
31780
+ function makeWebStreamReader(stream, options) {
31674
31781
  try {
31675
31782
  const reader = stream.getReader({ mode: "byob" });
31676
- if (reader instanceof ReadableStreamDefaultReader) return new WebStreamDefaultReader(reader);
31677
- return new WebStreamByobReader(reader);
31783
+ if (reader instanceof ReadableStreamDefaultReader) return new WebStreamDefaultReader(reader, options);
31784
+ return new WebStreamByobReader(reader, options);
31678
31785
  } catch (error) {
31679
- if (error instanceof TypeError) return new WebStreamDefaultReader(stream.getReader());
31786
+ if (error instanceof TypeError) return new WebStreamDefaultReader(stream.getReader(), options);
31680
31787
  throw error;
31681
31788
  }
31682
31789
  }
@@ -31686,7 +31793,7 @@ var init_WebStreamReaderFactory = __esmMin((() => {
31686
31793
  }));
31687
31794
 
31688
31795
  //#endregion
31689
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/stream/index.js
31796
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/index.js
31690
31797
  var init_stream$1 = __esmMin((() => {
31691
31798
  init_Errors();
31692
31799
  init_StreamReader();
@@ -31696,7 +31803,7 @@ var init_stream$1 = __esmMin((() => {
31696
31803
  }));
31697
31804
 
31698
31805
  //#endregion
31699
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/AbstractTokenizer.js
31806
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/AbstractTokenizer.js
31700
31807
  var AbstractTokenizer;
31701
31808
  var init_AbstractTokenizer = __esmMin((() => {
31702
31809
  init_AbortSignal();
@@ -31872,7 +31979,7 @@ var init_AbstractTokenizer = __esmMin((() => {
31872
31979
  }));
31873
31980
 
31874
31981
  //#endregion
31875
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/BlobTokenizer.js
31982
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/BlobTokenizer.js
31876
31983
  var BlobTokenizer;
31877
31984
  var init_BlobTokenizer = __esmMin((() => {
31878
31985
  init_AbstractTokenizer();
@@ -31937,7 +32044,7 @@ var init_BlobTokenizer = __esmMin((() => {
31937
32044
  }));
31938
32045
 
31939
32046
  //#endregion
31940
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/BufferTokenizer.js
32047
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/BufferTokenizer.js
31941
32048
  var BufferTokenizer;
31942
32049
  var init_BufferTokenizer = __esmMin((() => {
31943
32050
  init_AbstractTokenizer();
@@ -31995,7 +32102,7 @@ var init_BufferTokenizer = __esmMin((() => {
31995
32102
  }));
31996
32103
 
31997
32104
  //#endregion
31998
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/ReadStreamTokenizer.js
32105
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/ReadStreamTokenizer.js
31999
32106
  var ignoreChunkSize, ReadStreamTokenizer;
32000
32107
  var init_ReadStreamTokenizer = __esmMin((() => {
32001
32108
  init_AbstractTokenizer();
@@ -32112,7 +32219,7 @@ var init_ReadStreamTokenizer = __esmMin((() => {
32112
32219
  }));
32113
32220
 
32114
32221
  //#endregion
32115
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/core.js
32222
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/core.js
32116
32223
  /**
32117
32224
  * Construct ReadStreamTokenizer from given Stream.
32118
32225
  * Will set fileSize, if provided given Stream has set the .path property/
@@ -32166,7 +32273,7 @@ var init_core$1 = __esmMin((() => {
32166
32273
  }));
32167
32274
 
32168
32275
  //#endregion
32169
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/NotRegularFileError.js
32276
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/NotRegularFileError.js
32170
32277
  var NotRegularFileError;
32171
32278
  var init_NotRegularFileError = __esmMin((() => {
32172
32279
  NotRegularFileError = class extends Error {
@@ -32179,7 +32286,7 @@ var init_NotRegularFileError = __esmMin((() => {
32179
32286
  }));
32180
32287
 
32181
32288
  //#endregion
32182
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/FileTokenizer.js
32289
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/FileTokenizer.js
32183
32290
  var FileTokenizer;
32184
32291
  var init_FileTokenizer = __esmMin((() => {
32185
32292
  init_AbortSignal();
@@ -32228,11 +32335,7 @@ var init_FileTokenizer = __esmMin((() => {
32228
32335
  async readBuffer(uint8Array, options) {
32229
32336
  const normOptions = this.normalizeOptions(uint8Array, options);
32230
32337
  this.position = normOptions.position;
32231
- if (normOptions.length === 0) return 0;
32232
- const res = await this.fileHandle.read(uint8Array, 0, normOptions.length, normOptions.position);
32233
- this.position += res.bytesRead;
32234
- if (res.bytesRead < normOptions.length && (!options || !options.mayBeLess)) throw new EndOfStreamError();
32235
- return res.bytesRead;
32338
+ return this.readBufferAt(uint8Array, normOptions, true);
32236
32339
  }
32237
32340
  /**
32238
32341
  * Peek buffer from file
@@ -32241,10 +32344,23 @@ var init_FileTokenizer = __esmMin((() => {
32241
32344
  * @returns Promise number of bytes read
32242
32345
  */
32243
32346
  async peekBuffer(uint8Array, options) {
32244
- const normOptions = this.normalizeOptions(uint8Array, options);
32245
- const res = await this.fileHandle.read(uint8Array, 0, normOptions.length, normOptions.position);
32246
- if (!normOptions.mayBeLess && res.bytesRead < normOptions.length) throw new EndOfStreamError();
32247
- return res.bytesRead;
32347
+ return this.readBufferAt(uint8Array, this.normalizeOptions(uint8Array, options), false);
32348
+ }
32349
+ /**
32350
+ * Fill requests across short file reads; only a zero-byte read establishes EOF.
32351
+ * Keep this policy below token decoding and independent of the size recorded at open.
32352
+ * mayBeLess tolerates EOF, not fragmentation; peeks never commit cursor progress.
32353
+ */
32354
+ async readBufferAt(uint8Array, options, advancePosition) {
32355
+ let bytesRead = 0;
32356
+ while (bytesRead < options.length) {
32357
+ const res = await this.fileHandle.read(uint8Array, bytesRead, options.length - bytesRead, options.position + bytesRead);
32358
+ bytesRead += res.bytesRead;
32359
+ if (advancePosition) this.position += res.bytesRead;
32360
+ if (res.bytesRead === 0) break;
32361
+ }
32362
+ if (!options.mayBeLess && bytesRead < options.length) throw new EndOfStreamError();
32363
+ return bytesRead;
32248
32364
  }
32249
32365
  async closeOnce() {
32250
32366
  await this.fileHandle.close();
@@ -32261,7 +32377,7 @@ var init_FileTokenizer = __esmMin((() => {
32261
32377
  }));
32262
32378
 
32263
32379
  //#endregion
32264
- //#region node_modules/.pnpm/strtok3@10.7.0/node_modules/strtok3/lib/index.js
32380
+ //#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/index.js
32265
32381
  async function waitForPendingOpen(stream) {
32266
32382
  if (stream.pending !== true || stream.destroyed || stream.errored !== null) return;
32267
32383
  await new Promise((resolve) => {
@@ -49480,13 +49596,17 @@ function registerAgentCommand(program) {
49480
49596
  registerAgentSpaceFsCommand(agent);
49481
49597
  registerAgentAccountCommand(agent);
49482
49598
  registerAgentInboxCommand(agent);
49483
- agent.command("list").description("List agents").option("-L, --limit <n>", "Maximum number of items", "30").option("-k, --keyword <keyword>", "Filter by keyword").option("--json [fields]", "Output JSON, optionally specify fields (comma-separated)").action(async (options) => {
49599
+ agent.command("list").description("List agents").option("-L, --limit <n>", "Maximum number of items", "30").option("-k, --keyword <keyword>", "Filter by keyword").option("--tag <tag>", "Only agents carrying this tag").option("--json [fields]", "Output JSON, optionally specify fields (comma-separated)").action(async (options) => {
49484
49600
  const client = await getTrpcClient();
49485
49601
  const input = { includeInbox: true };
49486
49602
  if (options.keyword) input.keyword = options.keyword;
49603
+ if (options.tag?.trim()) input.tag = options.tag.trim();
49487
49604
  if (options.limit) input.limit = Number.parseInt(options.limit, 10);
49488
49605
  const result = await client.agent.queryAgents.query(input);
49489
- const items = Array.isArray(result) ? result : result.items ?? [];
49606
+ const listed = Array.isArray(result) ? result : result.items ?? [];
49607
+ const tag = input.tag;
49608
+ const items = tag === void 0 ? listed : listed.filter((a) => Array.isArray(a?.tags) && a.tags.includes(tag));
49609
+ if (tag !== void 0 && listed.length > 0 && !listed.some((a) => Array.isArray(a?.tags))) log$13.warn("This server does not filter agents by tag; upgrade it to use --tag.");
49490
49610
  if (options.json !== void 0) {
49491
49611
  const fields = typeof options.json === "string" ? options.json : void 0;
49492
49612
  outputJson(withUrls(items, await resolveUrlBuilder(client), (item) => resourcePath.agent(item.id)), fields);
@@ -49542,7 +49662,7 @@ function registerAgentCommand(program) {
49542
49662
  console.log(r.systemRole);
49543
49663
  }
49544
49664
  });
49545
- agent.command("create").description("Create a new agent").option("-t, --title <title>", "Agent title").option("-d, --description <desc>", "Agent description").option("-m, --model <model>", "Model ID").option("-p, --provider <provider>", "Provider ID").option("-s, --system-role <role>", "System role prompt").option("--group <groupId>", "Group ID").addOption(new Option("--visibility <visibility>", "Who can see the agent in a workspace: `private` (only you) or `public` (workspace members). Omit to use the server default").choices(AGENT_VISIBILITIES)).option("--json [fields]", "Output the created agent as JSON, optionally selecting fields").action(async (options) => {
49665
+ agent.command("create").description("Create a new agent").option("-t, --title <title>", "Agent title").option("-d, --description <desc>", "Agent description").option("-m, --model <model>", "Model ID").option("-p, --provider <provider>", "Provider ID").option("-s, --system-role <role>", "System role prompt").option("--group <groupId>", "Group ID").option("--tag <tag>", "Tag the agent (repeatable), e.g. so an app can find the agents it created", (tag, tags = []) => [...tags, tag]).addOption(new Option("--visibility <visibility>", "Who can see the agent in a workspace: `private` (only you) or `public` (workspace members). Omit to use the server default").choices(AGENT_VISIBILITIES)).option("--json [fields]", "Output the created agent as JSON, optionally selecting fields").action(async (options) => {
49546
49666
  const client = await getTrpcClient();
49547
49667
  const buildUrl = await resolveAppUrlBuilder(client);
49548
49668
  const config = {};
@@ -49551,6 +49671,8 @@ function registerAgentCommand(program) {
49551
49671
  if (options.model) config.model = options.model;
49552
49672
  if (options.provider) config.provider = options.provider;
49553
49673
  if (options.systemRole) config.systemRole = options.systemRole;
49674
+ const tags = [...new Set((options.tag ?? []).map((t) => t.trim()).filter(Boolean))];
49675
+ if (tags.length > 0) config.tags = tags;
49554
49676
  const input = { config };
49555
49677
  if (options.group) input.groupId = options.group;
49556
49678
  if (options.visibility) input.visibility = options.visibility;
@@ -306637,9 +306759,9 @@ const getSubprocessResult = ({ stdout }) => {
306637
306759
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
306638
306760
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
306639
306761
  const STANDARD_STREAMS = [
306640
- _w.stdin,
306641
- _w.stdout,
306642
- _w.stderr
306762
+ process$1.stdin,
306763
+ process$1.stdout,
306764
+ process$1.stderr
306643
306765
  ];
306644
306766
  const STANDARD_STREAMS_ALIASES = [
306645
306767
  "stdin",
@@ -306764,9 +306886,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
306764
306886
  //#endregion
306765
306887
  //#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
306766
306888
  function isUnicodeSupported() {
306767
- const { env } = _w;
306889
+ const { env } = process$1;
306768
306890
  const { TERM, TERM_PROGRAM } = env;
306769
- if (_w.platform !== "win32") return TERM !== "linux";
306891
+ if (process$1.platform !== "win32") return TERM !== "linux";
306770
306892
  return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
306771
306893
  }
306772
306894
 
@@ -307711,7 +307833,7 @@ function traversePathUp(startPath) {
307711
307833
 
307712
307834
  //#endregion
307713
307835
  //#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
307714
- const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
307836
+ const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
307715
307837
  const cwdPath = path.resolve(toPath(cwd));
307716
307838
  const result = [];
307717
307839
  const pathParts = pathOption.split(path.delimiter);
@@ -307729,7 +307851,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
307729
307851
  const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
307730
307852
  if (!pathParts.includes(pathPart)) result.push(pathPart);
307731
307853
  };
307732
- const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
307854
+ const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
307733
307855
  env = { ...env };
307734
307856
  const pathName = pathKey({ env });
307735
307857
  options.path = env[pathName];
@@ -308864,7 +308986,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
308864
308986
  };
308865
308987
  const getDefaultCwd = () => {
308866
308988
  try {
308867
- return _w.cwd();
308989
+ return process$1.cwd();
308868
308990
  } catch (error) {
308869
308991
  error.message = `The current directory does not exist.\n${error.message}`;
308870
308992
  throw error;
@@ -308899,7 +309021,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
308899
309021
  options.killSignal = normalizeKillSignal(options.killSignal);
308900
309022
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
308901
309023
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
308902
- if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
309024
+ if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
308903
309025
  return {
308904
309026
  file,
308905
309027
  commandArguments,
@@ -308926,7 +309048,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
308926
309048
  });
308927
309049
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
308928
309050
  const env = extendEnv ? {
308929
- ..._w.env,
309051
+ ...process$1.env,
308930
309052
  ...envOption
308931
309053
  } : envOption;
308932
309054
  if (preferLocal || node) return npmRunPathEnv({
@@ -309928,12 +310050,12 @@ const guessStreamDirection = {
309928
310050
  }
309929
310051
  };
309930
310052
  const getStandardStreamDirection = (value) => {
309931
- if ([0, _w.stdin].includes(value)) return "input";
310053
+ if ([0, process$1.stdin].includes(value)) return "input";
309932
310054
  if ([
309933
310055
  1,
309934
310056
  2,
309935
- _w.stdout,
309936
- _w.stderr
310057
+ process$1.stdout,
310058
+ process$1.stderr
309937
310059
  ].includes(value)) return "output";
309938
310060
  };
309939
310061
  const DEFAULT_DIRECTION = "output";
@@ -310997,9 +311119,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
310997
311119
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
310998
311120
  };
310999
311121
  const getIpcExport = () => {
311000
- const anyProcess = _w;
311122
+ const anyProcess = process$1;
311001
311123
  const isSubprocess = true;
311002
- const ipc = _w.channel !== void 0;
311124
+ const ipc = process$1.channel !== void 0;
311003
311125
  return {
311004
311126
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
311005
311127
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -311476,7 +311598,7 @@ var SignalExitFallback = class extends SignalExitBase {
311476
311598
  };
311477
311599
  var SignalExit = class extends SignalExitBase {
311478
311600
  /* c8 ignore start */
311479
- #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
311601
+ #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
311480
311602
  /* c8 ignore stop */
311481
311603
  #emitter = new Emitter();
311482
311604
  #process;
@@ -311571,8 +311693,8 @@ var SignalExit = class extends SignalExitBase {
311571
311693
  } else return og.call(this.#process, ev, ...args);
311572
311694
  }
311573
311695
  };
311574
- const process$1 = globalThis.process;
311575
- const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
311696
+ const process$2 = globalThis.process;
311697
+ const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
311576
311698
 
311577
311699
  //#endregion
311578
311700
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/terminate/cleanup.js
@@ -551909,7 +552031,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
551909
552031
  function getDefaultEnvironment() {
551910
552032
  const env = {};
551911
552033
  for (const key of DEFAULT_INHERITED_ENV_VARS) {
551912
- const value = _w.env[key];
552034
+ const value = process$1.env[key];
551913
552035
  if (value === void 0) continue;
551914
552036
  if (value.startsWith("()")) continue;
551915
552037
  env[key] = value;
@@ -551920,7 +552042,7 @@ var import_cross_spawn, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
551920
552042
  var init_stdio = __esmMin((() => {
551921
552043
  init_src_CeKsbNLO();
551922
552044
  import_cross_spawn = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
551923
- DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
552045
+ DEFAULT_INHERITED_ENV_VARS = process$1.platform === "win32" ? [
551924
552046
  "APPDATA",
551925
552047
  "COMSPEC",
551926
552048
  "HOMEDRIVE",
@@ -551977,7 +552099,7 @@ var init_stdio = __esmMin((() => {
551977
552099
  this._serverParams.stderr ?? "inherit"
551978
552100
  ],
551979
552101
  shell: false,
551980
- windowsHide: _w.platform === "win32",
552102
+ windowsHide: process$1.platform === "win32",
551981
552103
  cwd: this._serverParams.cwd
551982
552104
  });
551983
552105
  this._process.on("error", (error) => {