visionclaw 0.1.195-dev.simplify-google-client-setup.2 → 0.1.195-dev.simplify-google-client-setup.3

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.
@@ -16090,12 +16090,12 @@ var require_prompt = __commonJS({
16090
16090
  "use strict";
16091
16091
  var readline13 = require("readline");
16092
16092
  var _require = require_util();
16093
- var action = _require.action;
16093
+ var action2 = _require.action;
16094
16094
  var EventEmitter7 = require("events");
16095
16095
  var _require2 = require_src();
16096
16096
  var beep = _require2.beep;
16097
16097
  var cursor2 = _require2.cursor;
16098
- var color = require_kleur();
16098
+ var color3 = require_kleur();
16099
16099
  var Prompt = class extends EventEmitter7 {
16100
16100
  constructor(opts = {}) {
16101
16101
  super();
@@ -16111,7 +16111,7 @@ var require_prompt = __commonJS({
16111
16111
  if (this.in.isTTY) this.in.setRawMode(true);
16112
16112
  const isSelect = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1;
16113
16113
  const keypress = (str3, key) => {
16114
- let a11 = action(key, isSelect);
16114
+ let a11 = action2(key, isSelect);
16115
16115
  if (a11 === false) {
16116
16116
  this._ && this._(str3, key);
16117
16117
  } else if (typeof this[a11] === "function") {
@@ -16141,7 +16141,7 @@ var require_prompt = __commonJS({
16141
16141
  this.out.write(beep);
16142
16142
  }
16143
16143
  render() {
16144
- this.onRender(color);
16144
+ this.onRender(color3);
16145
16145
  if (this.firstRender) this.firstRender = false;
16146
16146
  }
16147
16147
  };
@@ -16182,7 +16182,7 @@ var require_text = __commonJS({
16182
16182
  });
16183
16183
  };
16184
16184
  }
16185
- var color = require_kleur();
16185
+ var color3 = require_kleur();
16186
16186
  var Prompt = require_prompt();
16187
16187
  var _require = require_src();
16188
16188
  var erase = _require.erase;
@@ -16210,7 +16210,7 @@ var require_text = __commonJS({
16210
16210
  set value(v15) {
16211
16211
  if (!v15 && this.initial) {
16212
16212
  this.placeholder = true;
16213
- this.rendered = color.gray(this.transform.render(this.initial));
16213
+ this.rendered = color3.gray(this.transform.render(this.initial));
16214
16214
  } else {
16215
16215
  this.placeholder = false;
16216
16216
  this.rendered = this.transform.render(v15);
@@ -16352,11 +16352,11 @@ var require_text = __commonJS({
16352
16352
  }
16353
16353
  super.render();
16354
16354
  this.outputError = "";
16355
- this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.red ? color.red(this.rendered) : this.rendered].join(` `);
16355
+ this.outputText = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(this.done), this.red ? color3.red(this.rendered) : this.rendered].join(` `);
16356
16356
  if (this.error) {
16357
16357
  this.outputError += this.errorMsg.split(`
16358
16358
  `).reduce((a11, l11, i12) => a11 + `
16359
- ${i12 ? " " : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
16359
+ ${i12 ? " " : figures.pointerSmall} ${color3.red().italic(l11)}`, ``);
16360
16360
  }
16361
16361
  this.out.write(erase.line + cursor2.to(0) + this.outputText + cursor2.save + this.outputError + cursor2.restore + cursor2.move(this.cursorOffset, 0));
16362
16362
  }
@@ -16369,7 +16369,7 @@ ${i12 ? " " : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
16369
16369
  var require_select = __commonJS({
16370
16370
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/select.js"(exports2, module2) {
16371
16371
  "use strict";
16372
- var color = require_kleur();
16372
+ var color3 = require_kleur();
16373
16373
  var Prompt = require_prompt();
16374
16374
  var _require = require_util();
16375
16375
  var style = _require.style;
@@ -16474,7 +16474,7 @@ var require_select = __commonJS({
16474
16474
  else this.out.write(clear(this.outputText, this.out.columns));
16475
16475
  super.render();
16476
16476
  let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
16477
- this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(" ");
16477
+ this.outputText = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color3.yellow(this.warn) : color3.gray(this.hint)].join(" ");
16478
16478
  if (!this.done) {
16479
16479
  this.outputText += "\n";
16480
16480
  for (let i12 = startIndex; i12 < endIndex; i12++) {
@@ -16487,11 +16487,11 @@ var require_select = __commonJS({
16487
16487
  prefix = " ";
16488
16488
  }
16489
16489
  if (v15.disabled) {
16490
- title = this.cursor === i12 ? color.gray().underline(v15.title) : color.strikethrough().gray(v15.title);
16491
- prefix = (this.cursor === i12 ? color.bold().gray(figures.pointer) + " " : " ") + prefix;
16490
+ title = this.cursor === i12 ? color3.gray().underline(v15.title) : color3.strikethrough().gray(v15.title);
16491
+ prefix = (this.cursor === i12 ? color3.bold().gray(figures.pointer) + " " : " ") + prefix;
16492
16492
  } else {
16493
- title = this.cursor === i12 ? color.cyan().underline(v15.title) : v15.title;
16494
- prefix = (this.cursor === i12 ? color.cyan(figures.pointer) + " " : " ") + prefix;
16493
+ title = this.cursor === i12 ? color3.cyan().underline(v15.title) : v15.title;
16494
+ prefix = (this.cursor === i12 ? color3.cyan(figures.pointer) + " " : " ") + prefix;
16495
16495
  if (v15.description && this.cursor === i12) {
16496
16496
  desc = ` - ${v15.description}`;
16497
16497
  if (prefix.length + title.length + desc.length >= this.out.columns || v15.description.split(/\r?\n/).length > 1) {
@@ -16502,7 +16502,7 @@ var require_select = __commonJS({
16502
16502
  }
16503
16503
  }
16504
16504
  }
16505
- this.outputText += `${prefix} ${title}${color.gray(desc)}
16505
+ this.outputText += `${prefix} ${title}${color3.gray(desc)}
16506
16506
  `;
16507
16507
  }
16508
16508
  }
@@ -16517,7 +16517,7 @@ var require_select = __commonJS({
16517
16517
  var require_toggle = __commonJS({
16518
16518
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/toggle.js"(exports2, module2) {
16519
16519
  "use strict";
16520
- var color = require_kleur();
16520
+ var color3 = require_kleur();
16521
16521
  var Prompt = require_prompt();
16522
16522
  var _require = require_util();
16523
16523
  var style = _require.style;
@@ -16603,7 +16603,7 @@ var require_toggle = __commonJS({
16603
16603
  if (this.firstRender) this.out.write(cursor2.hide);
16604
16604
  else this.out.write(clear(this.outputText, this.out.columns));
16605
16605
  super.render();
16606
- this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color.cyan().underline(this.inactive), color.gray("/"), this.value ? color.cyan().underline(this.active) : this.active].join(" ");
16606
+ this.outputText = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color3.cyan().underline(this.inactive), color3.gray("/"), this.value ? color3.cyan().underline(this.active) : this.active].join(" ");
16607
16607
  this.out.write(erase.line + cursor2.to(0) + this.outputText);
16608
16608
  }
16609
16609
  };
@@ -16921,7 +16921,7 @@ var require_date = __commonJS({
16921
16921
  });
16922
16922
  };
16923
16923
  }
16924
- var color = require_kleur();
16924
+ var color3 = require_kleur();
16925
16925
  var Prompt = require_prompt();
16926
16926
  var _require = require_util();
16927
16927
  var style = _require.style;
@@ -17102,10 +17102,10 @@ var require_date = __commonJS({
17102
17102
  if (this.firstRender) this.out.write(cursor2.hide);
17103
17103
  else this.out.write(clear(this.outputText, this.out.columns));
17104
17104
  super.render();
17105
- this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p10, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p10.toString()) : p10), []).join("")].join(" ");
17105
+ this.outputText = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p10, idx) => arr.concat(idx === this.cursor && !this.done ? color3.cyan().underline(p10.toString()) : p10), []).join("")].join(" ");
17106
17106
  if (this.error) {
17107
17107
  this.outputText += this.errorMsg.split("\n").reduce((a11, l11, i12) => a11 + `
17108
- ${i12 ? ` ` : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
17108
+ ${i12 ? ` ` : figures.pointerSmall} ${color3.red().italic(l11)}`, ``);
17109
17109
  }
17110
17110
  this.out.write(erase.line + cursor2.to(0) + this.outputText);
17111
17111
  }
@@ -17147,7 +17147,7 @@ var require_number = __commonJS({
17147
17147
  });
17148
17148
  };
17149
17149
  }
17150
- var color = require_kleur();
17150
+ var color3 = require_kleur();
17151
17151
  var Prompt = require_prompt();
17152
17152
  var _require = require_src();
17153
17153
  var cursor2 = _require.cursor;
@@ -17185,7 +17185,7 @@ var require_number = __commonJS({
17185
17185
  set value(v15) {
17186
17186
  if (!v15 && v15 !== 0) {
17187
17187
  this.placeholder = true;
17188
- this.rendered = color.gray(this.transform.render(`${this.initial}`));
17188
+ this.rendered = color3.gray(this.transform.render(`${this.initial}`));
17189
17189
  this._value = ``;
17190
17190
  } else {
17191
17191
  this.placeholder = false;
@@ -17316,11 +17316,11 @@ var require_number = __commonJS({
17316
17316
  }
17317
17317
  super.render();
17318
17318
  this.outputError = "";
17319
- this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered].join(` `);
17319
+ this.outputText = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(this.done), !this.done || !this.done && !this.placeholder ? color3[this.color]().underline(this.rendered) : this.rendered].join(` `);
17320
17320
  if (this.error) {
17321
17321
  this.outputError += this.errorMsg.split(`
17322
17322
  `).reduce((a11, l11, i12) => a11 + `
17323
- ${i12 ? ` ` : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
17323
+ ${i12 ? ` ` : figures.pointerSmall} ${color3.red().italic(l11)}`, ``);
17324
17324
  }
17325
17325
  this.out.write(erase.line + cursor2.to(0) + this.outputText + cursor2.save + this.outputError + cursor2.restore);
17326
17326
  }
@@ -17333,7 +17333,7 @@ ${i12 ? ` ` : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
17333
17333
  var require_multiselect = __commonJS({
17334
17334
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/multiselect.js"(exports2, module2) {
17335
17335
  "use strict";
17336
- var color = require_kleur();
17336
+ var color3 = require_kleur();
17337
17337
  var _require = require_src();
17338
17338
  var cursor2 = _require.cursor;
17339
17339
  var Prompt = require_prompt();
@@ -17488,12 +17488,12 @@ Instructions:
17488
17488
  return "";
17489
17489
  }
17490
17490
  renderOption(cursor3, v15, i12, arrowIndicator) {
17491
- const prefix = (v15.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + arrowIndicator + " ";
17491
+ const prefix = (v15.selected ? color3.green(figures.radioOn) : figures.radioOff) + " " + arrowIndicator + " ";
17492
17492
  let title, desc;
17493
17493
  if (v15.disabled) {
17494
- title = cursor3 === i12 ? color.gray().underline(v15.title) : color.strikethrough().gray(v15.title);
17494
+ title = cursor3 === i12 ? color3.gray().underline(v15.title) : color3.strikethrough().gray(v15.title);
17495
17495
  } else {
17496
- title = cursor3 === i12 ? color.cyan().underline(v15.title) : v15.title;
17496
+ title = cursor3 === i12 ? color3.cyan().underline(v15.title) : v15.title;
17497
17497
  if (cursor3 === i12 && v15.description) {
17498
17498
  desc = ` - ${v15.description}`;
17499
17499
  if (prefix.length + title.length + desc.length >= this.out.columns || v15.description.split(/\r?\n/).length > 1) {
@@ -17504,12 +17504,12 @@ Instructions:
17504
17504
  }
17505
17505
  }
17506
17506
  }
17507
- return prefix + title + color.gray(desc || "");
17507
+ return prefix + title + color3.gray(desc || "");
17508
17508
  }
17509
17509
  // shared with autocompleteMultiselect
17510
17510
  paginateOptions(options3) {
17511
17511
  if (options3.length === 0) {
17512
- return color.red("No matches for this query.");
17512
+ return color3.red("No matches for this query.");
17513
17513
  }
17514
17514
  let _entriesToDisplay = entriesToDisplay(this.cursor, options3.length, this.optionsPerPage), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
17515
17515
  let prefix, styledOptions = [];
@@ -17536,9 +17536,9 @@ Instructions:
17536
17536
  if (this.done) {
17537
17537
  return this.value.filter((e11) => e11.selected).map((v15) => v15.title).join(", ");
17538
17538
  }
17539
- const output2 = [color.gray(this.hint), this.renderInstructions()];
17539
+ const output2 = [color3.gray(this.hint), this.renderInstructions()];
17540
17540
  if (this.value[this.cursor].disabled) {
17541
- output2.push(color.yellow(this.warn));
17541
+ output2.push(color3.yellow(this.warn));
17542
17542
  }
17543
17543
  return output2.join(" ");
17544
17544
  }
@@ -17546,9 +17546,9 @@ Instructions:
17546
17546
  if (this.closed) return;
17547
17547
  if (this.firstRender) this.out.write(cursor2.hide);
17548
17548
  super.render();
17549
- let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
17549
+ let prompt = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
17550
17550
  if (this.showMinError) {
17551
- prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
17551
+ prompt += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
17552
17552
  this.showMinError = false;
17553
17553
  }
17554
17554
  prompt += this.renderOptions(this.value);
@@ -17593,7 +17593,7 @@ var require_autocomplete = __commonJS({
17593
17593
  });
17594
17594
  };
17595
17595
  }
17596
- var color = require_kleur();
17596
+ var color3 = require_kleur();
17597
17597
  var Prompt = require_prompt();
17598
17598
  var _require = require_src();
17599
17599
  var erase = _require.erase;
@@ -17783,8 +17783,8 @@ var require_autocomplete = __commonJS({
17783
17783
  renderOption(v15, hovered, isStart, isEnd) {
17784
17784
  let desc;
17785
17785
  let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : " ";
17786
- let title = hovered ? color.cyan().underline(v15.title) : v15.title;
17787
- prefix = (hovered ? color.cyan(figures.pointer) + " " : " ") + prefix;
17786
+ let title = hovered ? color3.cyan().underline(v15.title) : v15.title;
17787
+ prefix = (hovered ? color3.cyan(figures.pointer) + " " : " ") + prefix;
17788
17788
  if (v15.description) {
17789
17789
  desc = ` - ${v15.description}`;
17790
17790
  if (prefix.length + title.length + desc.length >= this.out.columns || v15.description.split(/\r?\n/).length > 1) {
@@ -17794,7 +17794,7 @@ var require_autocomplete = __commonJS({
17794
17794
  });
17795
17795
  }
17796
17796
  }
17797
- return prefix + " " + title + color.gray(desc || "");
17797
+ return prefix + " " + title + color3.gray(desc || "");
17798
17798
  }
17799
17799
  render() {
17800
17800
  if (this.closed) return;
@@ -17802,11 +17802,11 @@ var require_autocomplete = __commonJS({
17802
17802
  else this.out.write(clear(this.outputText, this.out.columns));
17803
17803
  super.render();
17804
17804
  let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
17805
- this.outputText = [style.symbol(this.done, this.aborted, this.exited), color.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(" ");
17805
+ this.outputText = [style.symbol(this.done, this.aborted, this.exited), color3.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(" ");
17806
17806
  if (!this.done) {
17807
17807
  const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i12) => this.renderOption(item, this.select === i12 + startIndex, i12 === 0 && startIndex > 0, i12 + startIndex === endIndex - 1 && endIndex < this.choices.length)).join("\n");
17808
17808
  this.outputText += `
17809
- ` + (suggestions || color.gray(this.fallback.title));
17809
+ ` + (suggestions || color3.gray(this.fallback.title));
17810
17810
  }
17811
17811
  this.out.write(erase.line + cursor2.to(0) + this.outputText);
17812
17812
  }
@@ -17819,7 +17819,7 @@ var require_autocomplete = __commonJS({
17819
17819
  var require_autocompleteMultiselect = __commonJS({
17820
17820
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocompleteMultiselect.js"(exports2, module2) {
17821
17821
  "use strict";
17822
- var color = require_kleur();
17822
+ var color3 = require_kleur();
17823
17823
  var _require = require_src();
17824
17824
  var cursor2 = _require.cursor;
17825
17825
  var MultiselectPrompt = require_multiselect();
@@ -17937,22 +17937,22 @@ Instructions:
17937
17937
  }
17938
17938
  renderCurrentInput() {
17939
17939
  return `
17940
- Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
17940
+ Filtered results for: ${this.inputValue ? this.inputValue : color3.gray("Enter something to filter")}
17941
17941
  `;
17942
17942
  }
17943
17943
  renderOption(cursor3, v15, i12) {
17944
17944
  let title;
17945
- if (v15.disabled) title = cursor3 === i12 ? color.gray().underline(v15.title) : color.strikethrough().gray(v15.title);
17946
- else title = cursor3 === i12 ? color.cyan().underline(v15.title) : v15.title;
17947
- return (v15.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + title;
17945
+ if (v15.disabled) title = cursor3 === i12 ? color3.gray().underline(v15.title) : color3.strikethrough().gray(v15.title);
17946
+ else title = cursor3 === i12 ? color3.cyan().underline(v15.title) : v15.title;
17947
+ return (v15.selected ? color3.green(figures.radioOn) : figures.radioOff) + " " + title;
17948
17948
  }
17949
17949
  renderDoneOrInstructions() {
17950
17950
  if (this.done) {
17951
17951
  return this.value.filter((e11) => e11.selected).map((v15) => v15.title).join(", ");
17952
17952
  }
17953
- const output2 = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
17953
+ const output2 = [color3.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
17954
17954
  if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {
17955
- output2.push(color.yellow(this.warn));
17955
+ output2.push(color3.yellow(this.warn));
17956
17956
  }
17957
17957
  return output2.join(" ");
17958
17958
  }
@@ -17960,9 +17960,9 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
17960
17960
  if (this.closed) return;
17961
17961
  if (this.firstRender) this.out.write(cursor2.hide);
17962
17962
  super.render();
17963
- let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
17963
+ let prompt = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
17964
17964
  if (this.showMinError) {
17965
- prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
17965
+ prompt += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
17966
17966
  this.showMinError = false;
17967
17967
  }
17968
17968
  prompt += this.renderOptions(this.filteredOptions);
@@ -17978,7 +17978,7 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
17978
17978
  var require_confirm = __commonJS({
17979
17979
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/confirm.js"(exports2, module2) {
17980
17980
  "use strict";
17981
- var color = require_kleur();
17981
+ var color3 = require_kleur();
17982
17982
  var Prompt = require_prompt();
17983
17983
  var _require = require_util();
17984
17984
  var style = _require.style;
@@ -18038,7 +18038,7 @@ var require_confirm = __commonJS({
18038
18038
  if (this.firstRender) this.out.write(cursor2.hide);
18039
18039
  else this.out.write(clear(this.outputText, this.out.columns));
18040
18040
  super.render();
18041
- this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)].join(" ");
18041
+ this.outputText = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : color3.gray(this.initialValue ? this.yesOption : this.noOption)].join(" ");
18042
18042
  this.out.write(erase.line + cursor2.to(0) + this.outputText);
18043
18043
  }
18044
18044
  };
@@ -18555,10 +18555,10 @@ var require_prompt2 = __commonJS({
18555
18555
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js"(exports2, module2) {
18556
18556
  "use strict";
18557
18557
  var readline13 = require("readline");
18558
- var { action } = require_util2();
18558
+ var { action: action2 } = require_util2();
18559
18559
  var EventEmitter7 = require("events");
18560
18560
  var { beep, cursor: cursor2 } = require_src();
18561
- var color = require_kleur();
18561
+ var color3 = require_kleur();
18562
18562
  var Prompt = class extends EventEmitter7 {
18563
18563
  constructor(opts = {}) {
18564
18564
  super();
@@ -18571,7 +18571,7 @@ var require_prompt2 = __commonJS({
18571
18571
  if (this.in.isTTY) this.in.setRawMode(true);
18572
18572
  const isSelect = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1;
18573
18573
  const keypress = (str3, key) => {
18574
- let a11 = action(key, isSelect);
18574
+ let a11 = action2(key, isSelect);
18575
18575
  if (a11 === false) {
18576
18576
  this._ && this._(str3, key);
18577
18577
  } else if (typeof this[a11] === "function") {
@@ -18601,7 +18601,7 @@ var require_prompt2 = __commonJS({
18601
18601
  this.out.write(beep);
18602
18602
  }
18603
18603
  render() {
18604
- this.onRender(color);
18604
+ this.onRender(color3);
18605
18605
  if (this.firstRender) this.firstRender = false;
18606
18606
  }
18607
18607
  };
@@ -18612,7 +18612,7 @@ var require_prompt2 = __commonJS({
18612
18612
  // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js
18613
18613
  var require_text2 = __commonJS({
18614
18614
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js"(exports2, module2) {
18615
- var color = require_kleur();
18615
+ var color3 = require_kleur();
18616
18616
  var Prompt = require_prompt2();
18617
18617
  var { erase, cursor: cursor2 } = require_src();
18618
18618
  var { style, clear, lines, figures } = require_util2();
@@ -18634,7 +18634,7 @@ var require_text2 = __commonJS({
18634
18634
  set value(v15) {
18635
18635
  if (!v15 && this.initial) {
18636
18636
  this.placeholder = true;
18637
- this.rendered = color.gray(this.transform.render(this.initial));
18637
+ this.rendered = color3.gray(this.transform.render(this.initial));
18638
18638
  } else {
18639
18639
  this.placeholder = false;
18640
18640
  this.rendered = this.transform.render(v15);
@@ -18773,14 +18773,14 @@ var require_text2 = __commonJS({
18773
18773
  this.outputError = "";
18774
18774
  this.outputText = [
18775
18775
  style.symbol(this.done, this.aborted),
18776
- color.bold(this.msg),
18776
+ color3.bold(this.msg),
18777
18777
  style.delimiter(this.done),
18778
- this.red ? color.red(this.rendered) : this.rendered
18778
+ this.red ? color3.red(this.rendered) : this.rendered
18779
18779
  ].join(` `);
18780
18780
  if (this.error) {
18781
18781
  this.outputError += this.errorMsg.split(`
18782
18782
  `).reduce((a11, l11, i12) => a11 + `
18783
- ${i12 ? " " : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
18783
+ ${i12 ? " " : figures.pointerSmall} ${color3.red().italic(l11)}`, ``);
18784
18784
  }
18785
18785
  this.out.write(erase.line + cursor2.to(0) + this.outputText + cursor2.save + this.outputError + cursor2.restore + cursor2.move(this.cursorOffset, 0));
18786
18786
  }
@@ -18793,7 +18793,7 @@ ${i12 ? " " : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
18793
18793
  var require_select2 = __commonJS({
18794
18794
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js"(exports2, module2) {
18795
18795
  "use strict";
18796
- var color = require_kleur();
18796
+ var color3 = require_kleur();
18797
18797
  var Prompt = require_prompt2();
18798
18798
  var { style, clear, figures, wrap, entriesToDisplay } = require_util2();
18799
18799
  var { cursor: cursor2 } = require_src();
@@ -18893,9 +18893,9 @@ var require_select2 = __commonJS({
18893
18893
  let { startIndex, endIndex } = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage);
18894
18894
  this.outputText = [
18895
18895
  style.symbol(this.done, this.aborted),
18896
- color.bold(this.msg),
18896
+ color3.bold(this.msg),
18897
18897
  style.delimiter(false),
18898
- this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)
18898
+ this.done ? this.selection.title : this.selection.disabled ? color3.yellow(this.warn) : color3.gray(this.hint)
18899
18899
  ].join(" ");
18900
18900
  if (!this.done) {
18901
18901
  this.outputText += "\n";
@@ -18909,11 +18909,11 @@ var require_select2 = __commonJS({
18909
18909
  prefix = " ";
18910
18910
  }
18911
18911
  if (v15.disabled) {
18912
- title = this.cursor === i12 ? color.gray().underline(v15.title) : color.strikethrough().gray(v15.title);
18913
- prefix = (this.cursor === i12 ? color.bold().gray(figures.pointer) + " " : " ") + prefix;
18912
+ title = this.cursor === i12 ? color3.gray().underline(v15.title) : color3.strikethrough().gray(v15.title);
18913
+ prefix = (this.cursor === i12 ? color3.bold().gray(figures.pointer) + " " : " ") + prefix;
18914
18914
  } else {
18915
- title = this.cursor === i12 ? color.cyan().underline(v15.title) : v15.title;
18916
- prefix = (this.cursor === i12 ? color.cyan(figures.pointer) + " " : " ") + prefix;
18915
+ title = this.cursor === i12 ? color3.cyan().underline(v15.title) : v15.title;
18916
+ prefix = (this.cursor === i12 ? color3.cyan(figures.pointer) + " " : " ") + prefix;
18917
18917
  if (v15.description && this.cursor === i12) {
18918
18918
  desc = ` - ${v15.description}`;
18919
18919
  if (prefix.length + title.length + desc.length >= this.out.columns || v15.description.split(/\r?\n/).length > 1) {
@@ -18921,7 +18921,7 @@ var require_select2 = __commonJS({
18921
18921
  }
18922
18922
  }
18923
18923
  }
18924
- this.outputText += `${prefix} ${title}${color.gray(desc)}
18924
+ this.outputText += `${prefix} ${title}${color3.gray(desc)}
18925
18925
  `;
18926
18926
  }
18927
18927
  }
@@ -18935,7 +18935,7 @@ var require_select2 = __commonJS({
18935
18935
  // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js
18936
18936
  var require_toggle2 = __commonJS({
18937
18937
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js"(exports2, module2) {
18938
- var color = require_kleur();
18938
+ var color3 = require_kleur();
18939
18939
  var Prompt = require_prompt2();
18940
18940
  var { style, clear } = require_util2();
18941
18941
  var { cursor: cursor2, erase } = require_src();
@@ -19019,11 +19019,11 @@ var require_toggle2 = __commonJS({
19019
19019
  super.render();
19020
19020
  this.outputText = [
19021
19021
  style.symbol(this.done, this.aborted),
19022
- color.bold(this.msg),
19022
+ color3.bold(this.msg),
19023
19023
  style.delimiter(this.done),
19024
- this.value ? this.inactive : color.cyan().underline(this.inactive),
19025
- color.gray("/"),
19026
- this.value ? color.cyan().underline(this.active) : this.active
19024
+ this.value ? this.inactive : color3.cyan().underline(this.inactive),
19025
+ color3.gray("/"),
19026
+ this.value ? color3.cyan().underline(this.active) : this.active
19027
19027
  ].join(" ");
19028
19028
  this.out.write(erase.line + cursor2.to(0) + this.outputText);
19029
19029
  }
@@ -19309,7 +19309,7 @@ var require_dateparts2 = __commonJS({
19309
19309
  var require_date2 = __commonJS({
19310
19310
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js"(exports2, module2) {
19311
19311
  "use strict";
19312
- var color = require_kleur();
19312
+ var color3 = require_kleur();
19313
19313
  var Prompt = require_prompt2();
19314
19314
  var { style, clear, figures } = require_util2();
19315
19315
  var { erase, cursor: cursor2 } = require_src();
@@ -19466,14 +19466,14 @@ var require_date2 = __commonJS({
19466
19466
  super.render();
19467
19467
  this.outputText = [
19468
19468
  style.symbol(this.done, this.aborted),
19469
- color.bold(this.msg),
19469
+ color3.bold(this.msg),
19470
19470
  style.delimiter(false),
19471
- this.parts.reduce((arr, p10, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p10.toString()) : p10), []).join("")
19471
+ this.parts.reduce((arr, p10, idx) => arr.concat(idx === this.cursor && !this.done ? color3.cyan().underline(p10.toString()) : p10), []).join("")
19472
19472
  ].join(" ");
19473
19473
  if (this.error) {
19474
19474
  this.outputText += this.errorMsg.split("\n").reduce(
19475
19475
  (a11, l11, i12) => a11 + `
19476
- ${i12 ? ` ` : figures.pointerSmall} ${color.red().italic(l11)}`,
19476
+ ${i12 ? ` ` : figures.pointerSmall} ${color3.red().italic(l11)}`,
19477
19477
  ``
19478
19478
  );
19479
19479
  }
@@ -19487,7 +19487,7 @@ ${i12 ? ` ` : figures.pointerSmall} ${color.red().italic(l11)}`,
19487
19487
  // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js
19488
19488
  var require_number2 = __commonJS({
19489
19489
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js"(exports2, module2) {
19490
- var color = require_kleur();
19490
+ var color3 = require_kleur();
19491
19491
  var Prompt = require_prompt2();
19492
19492
  var { cursor: cursor2, erase } = require_src();
19493
19493
  var { style, figures, clear, lines } = require_util2();
@@ -19519,7 +19519,7 @@ var require_number2 = __commonJS({
19519
19519
  set value(v15) {
19520
19520
  if (!v15 && v15 !== 0) {
19521
19521
  this.placeholder = true;
19522
- this.rendered = color.gray(this.transform.render(`${this.initial}`));
19522
+ this.rendered = color3.gray(this.transform.render(`${this.initial}`));
19523
19523
  this._value = ``;
19524
19524
  } else {
19525
19525
  this.placeholder = false;
@@ -19647,14 +19647,14 @@ var require_number2 = __commonJS({
19647
19647
  this.outputError = "";
19648
19648
  this.outputText = [
19649
19649
  style.symbol(this.done, this.aborted),
19650
- color.bold(this.msg),
19650
+ color3.bold(this.msg),
19651
19651
  style.delimiter(this.done),
19652
- !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered
19652
+ !this.done || !this.done && !this.placeholder ? color3[this.color]().underline(this.rendered) : this.rendered
19653
19653
  ].join(` `);
19654
19654
  if (this.error) {
19655
19655
  this.outputError += this.errorMsg.split(`
19656
19656
  `).reduce((a11, l11, i12) => a11 + `
19657
- ${i12 ? ` ` : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
19657
+ ${i12 ? ` ` : figures.pointerSmall} ${color3.red().italic(l11)}`, ``);
19658
19658
  }
19659
19659
  this.out.write(erase.line + cursor2.to(0) + this.outputText + cursor2.save + this.outputError + cursor2.restore);
19660
19660
  }
@@ -19667,7 +19667,7 @@ ${i12 ? ` ` : figures.pointerSmall} ${color.red().italic(l11)}`, ``);
19667
19667
  var require_multiselect2 = __commonJS({
19668
19668
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js"(exports2, module2) {
19669
19669
  "use strict";
19670
- var color = require_kleur();
19670
+ var color3 = require_kleur();
19671
19671
  var { cursor: cursor2 } = require_src();
19672
19672
  var Prompt = require_prompt2();
19673
19673
  var { clear, figures, style, wrap, entriesToDisplay } = require_util2();
@@ -19814,12 +19814,12 @@ Instructions:
19814
19814
  return "";
19815
19815
  }
19816
19816
  renderOption(cursor3, v15, i12, arrowIndicator) {
19817
- const prefix = (v15.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + arrowIndicator + " ";
19817
+ const prefix = (v15.selected ? color3.green(figures.radioOn) : figures.radioOff) + " " + arrowIndicator + " ";
19818
19818
  let title, desc;
19819
19819
  if (v15.disabled) {
19820
- title = cursor3 === i12 ? color.gray().underline(v15.title) : color.strikethrough().gray(v15.title);
19820
+ title = cursor3 === i12 ? color3.gray().underline(v15.title) : color3.strikethrough().gray(v15.title);
19821
19821
  } else {
19822
- title = cursor3 === i12 ? color.cyan().underline(v15.title) : v15.title;
19822
+ title = cursor3 === i12 ? color3.cyan().underline(v15.title) : v15.title;
19823
19823
  if (cursor3 === i12 && v15.description) {
19824
19824
  desc = ` - ${v15.description}`;
19825
19825
  if (prefix.length + title.length + desc.length >= this.out.columns || v15.description.split(/\r?\n/).length > 1) {
@@ -19827,12 +19827,12 @@ Instructions:
19827
19827
  }
19828
19828
  }
19829
19829
  }
19830
- return prefix + title + color.gray(desc || "");
19830
+ return prefix + title + color3.gray(desc || "");
19831
19831
  }
19832
19832
  // shared with autocompleteMultiselect
19833
19833
  paginateOptions(options3) {
19834
19834
  if (options3.length === 0) {
19835
- return color.red("No matches for this query.");
19835
+ return color3.red("No matches for this query.");
19836
19836
  }
19837
19837
  let { startIndex, endIndex } = entriesToDisplay(this.cursor, options3.length, this.optionsPerPage);
19838
19838
  let prefix, styledOptions = [];
@@ -19859,9 +19859,9 @@ Instructions:
19859
19859
  if (this.done) {
19860
19860
  return this.value.filter((e11) => e11.selected).map((v15) => v15.title).join(", ");
19861
19861
  }
19862
- const output2 = [color.gray(this.hint), this.renderInstructions()];
19862
+ const output2 = [color3.gray(this.hint), this.renderInstructions()];
19863
19863
  if (this.value[this.cursor].disabled) {
19864
- output2.push(color.yellow(this.warn));
19864
+ output2.push(color3.yellow(this.warn));
19865
19865
  }
19866
19866
  return output2.join(" ");
19867
19867
  }
@@ -19871,12 +19871,12 @@ Instructions:
19871
19871
  super.render();
19872
19872
  let prompt = [
19873
19873
  style.symbol(this.done, this.aborted),
19874
- color.bold(this.msg),
19874
+ color3.bold(this.msg),
19875
19875
  style.delimiter(false),
19876
19876
  this.renderDoneOrInstructions()
19877
19877
  ].join(" ");
19878
19878
  if (this.showMinError) {
19879
- prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
19879
+ prompt += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
19880
19880
  this.showMinError = false;
19881
19881
  }
19882
19882
  prompt += this.renderOptions(this.value);
@@ -19892,7 +19892,7 @@ Instructions:
19892
19892
  var require_autocomplete2 = __commonJS({
19893
19893
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js"(exports2, module2) {
19894
19894
  "use strict";
19895
- var color = require_kleur();
19895
+ var color3 = require_kleur();
19896
19896
  var Prompt = require_prompt2();
19897
19897
  var { erase, cursor: cursor2 } = require_src();
19898
19898
  var { style, clear, figures, wrap, entriesToDisplay } = require_util2();
@@ -20065,15 +20065,15 @@ var require_autocomplete2 = __commonJS({
20065
20065
  renderOption(v15, hovered, isStart, isEnd) {
20066
20066
  let desc;
20067
20067
  let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : " ";
20068
- let title = hovered ? color.cyan().underline(v15.title) : v15.title;
20069
- prefix = (hovered ? color.cyan(figures.pointer) + " " : " ") + prefix;
20068
+ let title = hovered ? color3.cyan().underline(v15.title) : v15.title;
20069
+ prefix = (hovered ? color3.cyan(figures.pointer) + " " : " ") + prefix;
20070
20070
  if (v15.description) {
20071
20071
  desc = ` - ${v15.description}`;
20072
20072
  if (prefix.length + title.length + desc.length >= this.out.columns || v15.description.split(/\r?\n/).length > 1) {
20073
20073
  desc = "\n" + wrap(v15.description, { margin: 3, width: this.out.columns });
20074
20074
  }
20075
20075
  }
20076
- return prefix + " " + title + color.gray(desc || "");
20076
+ return prefix + " " + title + color3.gray(desc || "");
20077
20077
  }
20078
20078
  render() {
20079
20079
  if (this.closed) return;
@@ -20083,7 +20083,7 @@ var require_autocomplete2 = __commonJS({
20083
20083
  let { startIndex, endIndex } = entriesToDisplay(this.select, this.choices.length, this.limit);
20084
20084
  this.outputText = [
20085
20085
  style.symbol(this.done, this.aborted, this.exited),
20086
- color.bold(this.msg),
20086
+ color3.bold(this.msg),
20087
20087
  style.delimiter(this.completing),
20088
20088
  this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
20089
20089
  ].join(" ");
@@ -20095,7 +20095,7 @@ var require_autocomplete2 = __commonJS({
20095
20095
  i12 + startIndex === endIndex - 1 && endIndex < this.choices.length
20096
20096
  )).join("\n");
20097
20097
  this.outputText += `
20098
- ` + (suggestions || color.gray(this.fallback.title));
20098
+ ` + (suggestions || color3.gray(this.fallback.title));
20099
20099
  }
20100
20100
  this.out.write(erase.line + cursor2.to(0) + this.outputText);
20101
20101
  }
@@ -20108,7 +20108,7 @@ var require_autocomplete2 = __commonJS({
20108
20108
  var require_autocompleteMultiselect2 = __commonJS({
20109
20109
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js"(exports2, module2) {
20110
20110
  "use strict";
20111
- var color = require_kleur();
20111
+ var color3 = require_kleur();
20112
20112
  var { cursor: cursor2 } = require_src();
20113
20113
  var MultiselectPrompt = require_multiselect2();
20114
20114
  var { clear, style, figures } = require_util2();
@@ -20222,22 +20222,22 @@ Instructions:
20222
20222
  }
20223
20223
  renderCurrentInput() {
20224
20224
  return `
20225
- Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
20225
+ Filtered results for: ${this.inputValue ? this.inputValue : color3.gray("Enter something to filter")}
20226
20226
  `;
20227
20227
  }
20228
20228
  renderOption(cursor3, v15, i12) {
20229
20229
  let title;
20230
- if (v15.disabled) title = cursor3 === i12 ? color.gray().underline(v15.title) : color.strikethrough().gray(v15.title);
20231
- else title = cursor3 === i12 ? color.cyan().underline(v15.title) : v15.title;
20232
- return (v15.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + title;
20230
+ if (v15.disabled) title = cursor3 === i12 ? color3.gray().underline(v15.title) : color3.strikethrough().gray(v15.title);
20231
+ else title = cursor3 === i12 ? color3.cyan().underline(v15.title) : v15.title;
20232
+ return (v15.selected ? color3.green(figures.radioOn) : figures.radioOff) + " " + title;
20233
20233
  }
20234
20234
  renderDoneOrInstructions() {
20235
20235
  if (this.done) {
20236
20236
  return this.value.filter((e11) => e11.selected).map((v15) => v15.title).join(", ");
20237
20237
  }
20238
- const output2 = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
20238
+ const output2 = [color3.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
20239
20239
  if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {
20240
- output2.push(color.yellow(this.warn));
20240
+ output2.push(color3.yellow(this.warn));
20241
20241
  }
20242
20242
  return output2.join(" ");
20243
20243
  }
@@ -20247,12 +20247,12 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
20247
20247
  super.render();
20248
20248
  let prompt = [
20249
20249
  style.symbol(this.done, this.aborted),
20250
- color.bold(this.msg),
20250
+ color3.bold(this.msg),
20251
20251
  style.delimiter(false),
20252
20252
  this.renderDoneOrInstructions()
20253
20253
  ].join(" ");
20254
20254
  if (this.showMinError) {
20255
- prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
20255
+ prompt += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
20256
20256
  this.showMinError = false;
20257
20257
  }
20258
20258
  prompt += this.renderOptions(this.filteredOptions);
@@ -20267,7 +20267,7 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
20267
20267
  // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js
20268
20268
  var require_confirm2 = __commonJS({
20269
20269
  "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js"(exports2, module2) {
20270
- var color = require_kleur();
20270
+ var color3 = require_kleur();
20271
20271
  var Prompt = require_prompt2();
20272
20272
  var { style, clear } = require_util2();
20273
20273
  var { erase, cursor: cursor2 } = require_src();
@@ -20325,9 +20325,9 @@ var require_confirm2 = __commonJS({
20325
20325
  super.render();
20326
20326
  this.outputText = [
20327
20327
  style.symbol(this.done, this.aborted),
20328
- color.bold(this.msg),
20328
+ color3.bold(this.msg),
20329
20329
  style.delimiter(this.done),
20330
- this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)
20330
+ this.done ? this.value ? this.yesMsg : this.noMsg : color3.gray(this.initialValue ? this.yesOption : this.noOption)
20331
20331
  ].join(" ");
20332
20332
  this.out.write(erase.line + cursor2.to(0) + this.outputText);
20333
20333
  }
@@ -20512,7 +20512,7 @@ var require_prompts3 = __commonJS({
20512
20512
 
20513
20513
  // dist/utils/version-check.js
20514
20514
  function isBundled() {
20515
- const v15 = "0.1.195-dev.simplify-google-client-setup.2";
20515
+ const v15 = "0.1.195-dev.simplify-google-client-setup.3";
20516
20516
  return typeof v15 === "string" && v15 !== "undefined";
20517
20517
  }
20518
20518
  function getPackageRoot() {
@@ -20529,7 +20529,7 @@ function getInstallationInfo() {
20529
20529
  };
20530
20530
  }
20531
20531
  function getCurrentVersion() {
20532
- const bundledVersion = "0.1.195-dev.simplify-google-client-setup.2";
20532
+ const bundledVersion = "0.1.195-dev.simplify-google-client-setup.3";
20533
20533
  if (bundledVersion && bundledVersion !== "undefined") {
20534
20534
  return bundledVersion;
20535
20535
  }
@@ -21090,6 +21090,24 @@ __export(macos_permissions_exports, {
21090
21090
  repairTccPathsIfChanged: () => repairTccPathsIfChanged,
21091
21091
  saveTccPaths: () => saveTccPaths
21092
21092
  });
21093
+ function color(text, code) {
21094
+ return `${code}${text}${ANSI_RESET}`;
21095
+ }
21096
+ function okText(text) {
21097
+ return color(text, ANSI_GREEN);
21098
+ }
21099
+ function warnText(text) {
21100
+ return color(text, ANSI_YELLOW);
21101
+ }
21102
+ function errorText(text) {
21103
+ return color(text, ANSI_RED);
21104
+ }
21105
+ function infoText(text) {
21106
+ return color(text, ANSI_CYAN);
21107
+ }
21108
+ function boldText(text) {
21109
+ return color(text, ANSI_BOLD);
21110
+ }
21093
21111
  function resolveNodeBinaryPath() {
21094
21112
  try {
21095
21113
  const whichPath = (0, import_node_child_process.execSync)("which node", { encoding: "utf-8" }).trim();
@@ -21515,8 +21533,8 @@ async function checkDownloadsFolderPermission() {
21515
21533
  return false;
21516
21534
  }
21517
21535
  }
21518
- async function runSwiftCheck(label, code) {
21519
- const base = (0, import_node_path6.join)((0, import_node_os2.tmpdir)(), `visionclaw-perm-check-${label}`);
21536
+ async function runSwiftCheck(label2, code) {
21537
+ const base = (0, import_node_path6.join)((0, import_node_os2.tmpdir)(), `visionclaw-perm-check-${label2}`);
21520
21538
  const src = `${base}.swift`;
21521
21539
  const bin = base;
21522
21540
  try {
@@ -21573,8 +21591,9 @@ async function checkMacOSPermissions() {
21573
21591
  if (process.platform !== "darwin") {
21574
21592
  return true;
21575
21593
  }
21576
- console.log("--- macOS Permissions Check ---\n");
21577
- console.log(` Terminal: ${TERMINAL_NAME} (${TERMINAL_BUNDLE_ID})
21594
+ console.log(`${boldText("--- macOS Permissions Check ---")}
21595
+ `);
21596
+ console.log(` ${infoText("Terminal:")} ${TERMINAL_NAME} (${TERMINAL_BUNDLE_ID})
21578
21597
  `);
21579
21598
  let allGranted = true;
21580
21599
  const permChecks = [
@@ -21594,14 +21613,14 @@ async function checkMacOSPermissions() {
21594
21613
  { label: "Documents Folder", check: checkDocumentsFolderPermission, permType: "documents-folder" },
21595
21614
  { label: "Downloads Folder", check: checkDownloadsFolderPermission, permType: "downloads-folder" }
21596
21615
  ];
21597
- for (const { label, check: check2, permType } of permChecks) {
21598
- const padded = `${label}:`.padEnd(22);
21616
+ for (const { label: label2, check: check2, permType } of permChecks) {
21617
+ const padded = `${label2}:`.padEnd(22);
21599
21618
  process.stdout.write(` ${padded} `);
21600
21619
  const granted = await check2();
21601
21620
  if (granted) {
21602
- console.log("Granted");
21621
+ console.log(okText("Granted"));
21603
21622
  } else {
21604
- console.log("NOT GRANTED");
21623
+ console.log(errorText("NOT GRANTED"));
21605
21624
  printPermissionInstructions(permType);
21606
21625
  allGranted = false;
21607
21626
  }
@@ -21609,27 +21628,27 @@ async function checkMacOSPermissions() {
21609
21628
  process.stdout.write(" cliclick: ");
21610
21629
  const cliclickOk = await checkCliclickInstalled();
21611
21630
  if (cliclickOk) {
21612
- console.log("Installed");
21631
+ console.log(okText("Installed"));
21613
21632
  } else {
21614
- console.log("NOT INSTALLED");
21633
+ console.log(errorText("NOT INSTALLED"));
21615
21634
  console.log("\n To install cliclick: brew install cliclick");
21616
21635
  allGranted = false;
21617
21636
  }
21618
21637
  process.stdout.write(" ffmpeg: ");
21619
21638
  const ffmpegOk = await checkFfmpegInstalled();
21620
21639
  if (ffmpegOk) {
21621
- console.log("Installed");
21640
+ console.log(okText("Installed"));
21622
21641
  } else {
21623
- console.log("NOT INSTALLED");
21642
+ console.log(errorText("NOT INSTALLED"));
21624
21643
  console.log("\n To install ffmpeg: brew install ffmpeg");
21625
21644
  allGranted = false;
21626
21645
  }
21627
21646
  process.stdout.write(" Chrome: ");
21628
21647
  const chromeOk = await checkChromeInstalled();
21629
21648
  if (chromeOk) {
21630
- console.log("Found");
21649
+ console.log(okText("Found"));
21631
21650
  } else {
21632
- console.log("NOT FOUND");
21651
+ console.log(errorText("NOT FOUND"));
21633
21652
  console.log("\n Install Google Chrome from https://www.google.com/chrome/");
21634
21653
  allGranted = false;
21635
21654
  }
@@ -21638,31 +21657,31 @@ async function checkMacOSPermissions() {
21638
21657
  if (ghOk) {
21639
21658
  const ghAuth = await checkGhAuthenticated();
21640
21659
  if (ghAuth) {
21641
- console.log("Installed & Authenticated");
21660
+ console.log(okText("Installed & Authenticated"));
21642
21661
  } else {
21643
- console.log("Installed; not authenticated yet");
21662
+ console.log(warnText("Installed; not authenticated yet"));
21644
21663
  console.log(" Setup can authenticate gh using a server-delivered GitHub PAT when GitHub is enabled.");
21645
21664
  }
21646
21665
  } else {
21647
- console.log("NOT INSTALLED");
21666
+ console.log(errorText("NOT INSTALLED"));
21648
21667
  console.log("\n To install: brew install gh");
21649
21668
  allGranted = false;
21650
21669
  }
21651
21670
  process.stdout.write(" whisper-cli: ");
21652
21671
  const whisperOk = await checkWhisperCppInstalled();
21653
21672
  if (whisperOk) {
21654
- console.log("Installed");
21673
+ console.log(okText("Installed"));
21655
21674
  } else {
21656
- console.log("NOT INSTALLED");
21675
+ console.log(errorText("NOT INSTALLED"));
21657
21676
  console.log("\n To install: brew install whisper-cpp (binary is whisper-cli)");
21658
21677
  allGranted = false;
21659
21678
  }
21660
21679
  process.stdout.write(" Whisper model: ");
21661
21680
  const modelStatus = checkWhisperModelIntegrity();
21662
21681
  if (modelStatus === "valid") {
21663
- console.log("Found");
21682
+ console.log(okText("Found"));
21664
21683
  } else {
21665
- console.log(modelStatus === "incomplete" ? "INCOMPLETE (bad download)" : "NOT FOUND");
21684
+ console.log(errorText(modelStatus === "incomplete" ? "INCOMPLETE (bad download)" : "NOT FOUND"));
21666
21685
  console.log(`
21667
21686
  Download the model (1.5GB, one-time):`);
21668
21687
  console.log(` mkdir -p ${WHISPER_MODEL_DIR} && curl -L -o ${WHISPER_MODEL_PATH} '${WHISPER_MODEL_URL}'`);
@@ -21671,19 +21690,21 @@ async function checkMacOSPermissions() {
21671
21690
  process.stdout.write(" pm2: ");
21672
21691
  const pm2Ok = await checkPm2Installed();
21673
21692
  if (pm2Ok) {
21674
- console.log("Installed");
21693
+ console.log(okText("Installed"));
21675
21694
  } else {
21676
- console.log("NOT INSTALLED");
21695
+ console.log(errorText("NOT INSTALLED"));
21677
21696
  console.log("\n To install: npm install -g pm2");
21678
21697
  allGranted = false;
21679
21698
  }
21680
21699
  console.log("");
21681
21700
  if (!allGranted) {
21682
- console.log(" Some permissions are missing. VisionClaw needs these to control the desktop.");
21683
- console.log(" You can continue setup now and grant them later, but the agent will");
21684
- console.log(" not be fully functional until all permissions are granted.\n");
21701
+ console.log(warnText(" Some permissions or prerequisites are missing. VisionClaw needs these to control the desktop."));
21702
+ console.log(warnText(" You can continue setup now and grant them later, but the agent will"));
21703
+ console.log(`${warnText(" not be fully functional until all required items are ready.")}
21704
+ `);
21685
21705
  } else {
21686
- console.log(" All permissions granted!\n");
21706
+ console.log(`${okText(" All permissions granted!")}
21707
+ `);
21687
21708
  }
21688
21709
  return allGranted;
21689
21710
  }
@@ -21758,7 +21779,7 @@ function pinHomebrewBinaries() {
21758
21779
  }
21759
21780
  }
21760
21781
  }
21761
- var import_node_child_process, import_node_fs6, import_node_os2, import_node_path6, import_node_util, execAsync, TERMINAL_BUNDLE_ID, TERMINAL_NAME, cachedNodePath, cachedCliclickPath, TCC_SERVICES, SYSTEM_TCC_SERVICES, WHISPER_MODEL_DIR, WHISPER_MODEL_FILENAME, WHISPER_MODEL_PATH, WHISPER_MODEL_URL, _cachedRemoteSize, TCC_PATHS_FILE;
21782
+ var import_node_child_process, import_node_fs6, import_node_os2, import_node_path6, import_node_util, execAsync, ANSI_RESET, ANSI_BOLD, ANSI_GREEN, ANSI_YELLOW, ANSI_RED, ANSI_CYAN, TERMINAL_BUNDLE_ID, TERMINAL_NAME, cachedNodePath, cachedCliclickPath, TCC_SERVICES, SYSTEM_TCC_SERVICES, WHISPER_MODEL_DIR, WHISPER_MODEL_FILENAME, WHISPER_MODEL_PATH, WHISPER_MODEL_URL, _cachedRemoteSize, TCC_PATHS_FILE;
21762
21783
  var init_macos_permissions = __esm({
21763
21784
  "dist/onboarding/macos-permissions.js"() {
21764
21785
  "use strict";
@@ -21768,6 +21789,12 @@ var init_macos_permissions = __esm({
21768
21789
  import_node_path6 = require("node:path");
21769
21790
  import_node_util = require("node:util");
21770
21791
  execAsync = (0, import_node_util.promisify)(import_node_child_process.exec);
21792
+ ANSI_RESET = "\x1B[0m";
21793
+ ANSI_BOLD = "\x1B[1m";
21794
+ ANSI_GREEN = "\x1B[32m";
21795
+ ANSI_YELLOW = "\x1B[33m";
21796
+ ANSI_RED = "\x1B[31m";
21797
+ ANSI_CYAN = "\x1B[36m";
21771
21798
  TERMINAL_BUNDLE_ID = "com.apple.Terminal";
21772
21799
  TERMINAL_NAME = "Terminal";
21773
21800
  TCC_SERVICES = {
@@ -30782,7 +30809,7 @@ async function warnIfPermissionsLookWrong() {
30782
30809
  ["Accessibility", await checkAccessibilityPermission()],
30783
30810
  ["Input Monitoring", await checkInputMonitoringPermission()]
30784
30811
  ];
30785
- const missing = checks.filter(([, granted]) => !granted).map(([label]) => label);
30812
+ const missing = checks.filter(([, granted]) => !granted).map(([label2]) => label2);
30786
30813
  if (missing.length > 0) {
30787
30814
  warn2(`Some macOS permissions appear missing: ${missing.join(", ")}`);
30788
30815
  console.log(` Run ${DIM3}visionclaw prepare-mac${RESET3} if desktop automation does not work.`);
@@ -32478,8 +32505,8 @@ function getXcrunSdkPath() {
32478
32505
  return null;
32479
32506
  }
32480
32507
  }
32481
- function compileAndRunSwift(label, code) {
32482
- const base = (0, import_node_path12.join)((0, import_node_os7.tmpdir)(), `visionclaw-perm-${label}`);
32508
+ function compileAndRunSwift(label2, code) {
32509
+ const base = (0, import_node_path12.join)((0, import_node_os7.tmpdir)(), `visionclaw-perm-${label2}`);
32483
32510
  const src = `${base}.swift`;
32484
32511
  const bin = base;
32485
32512
  try {
@@ -33562,25 +33589,25 @@ var require_tr46 = __commonJS({
33562
33589
  };
33563
33590
  }
33564
33591
  var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;
33565
- function validateLabel(label, processing_option) {
33566
- if (label.substr(0, 4) === "xn--") {
33567
- label = punycode.toUnicode(label);
33592
+ function validateLabel(label2, processing_option) {
33593
+ if (label2.substr(0, 4) === "xn--") {
33594
+ label2 = punycode.toUnicode(label2);
33568
33595
  processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
33569
33596
  }
33570
33597
  var error49 = false;
33571
- if (normalize(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) {
33598
+ if (normalize(label2) !== label2 || label2[3] === "-" && label2[4] === "-" || label2[0] === "-" || label2[label2.length - 1] === "-" || label2.indexOf(".") !== -1 || label2.search(combiningMarksRegex) === 0) {
33572
33599
  error49 = true;
33573
33600
  }
33574
- var len = countSymbols(label);
33601
+ var len = countSymbols(label2);
33575
33602
  for (var i12 = 0; i12 < len; ++i12) {
33576
- var status = findStatus(label.codePointAt(i12));
33603
+ var status = findStatus(label2.codePointAt(i12));
33577
33604
  if (processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid" || processing === PROCESSING_OPTIONS.NONTRANSITIONAL && status[1] !== "valid" && status[1] !== "deviation") {
33578
33605
  error49 = true;
33579
33606
  break;
33580
33607
  }
33581
33608
  }
33582
33609
  return {
33583
- label,
33610
+ label: label2,
33584
33611
  error: error49
33585
33612
  };
33586
33613
  }
@@ -688393,6 +688420,21 @@ function findChromePath2() {
688393
688420
  }
688394
688421
  return candidates[0];
688395
688422
  }
688423
+ function color2(text, code) {
688424
+ return `${code}${text}${ANSI_RESET2}`;
688425
+ }
688426
+ function success2(text) {
688427
+ return color2(text, ANSI_GREEN2);
688428
+ }
688429
+ function action(text) {
688430
+ return color2(text, ANSI_YELLOW2);
688431
+ }
688432
+ function label(text) {
688433
+ return color2(text, ANSI_CYAN2);
688434
+ }
688435
+ function strong(text) {
688436
+ return color2(text, ANSI_BOLD2);
688437
+ }
688396
688438
  function resolveSetupSource(commandArgs) {
688397
688439
  for (let i12 = 0; i12 < commandArgs.length; i12++) {
688398
688440
  const arg = commandArgs[i12];
@@ -688448,14 +688490,16 @@ Chrome opened with the VisionClaw Playwright profile for ${gmail}.`);
688448
688490
  async function ensureGoogleBrowserLogin(context, gmail, password) {
688449
688491
  const page = await getPrimaryPage(context);
688450
688492
  await page.goto(`https://accounts.google.com/signin/v2/identifier?service=mail&flowName=GlifWebSignIn&flowEntry=ServiceLogin&Email=${encodeURIComponent(gmail)}`, { waitUntil: "domcontentloaded" });
688451
- console.log("\nGoogle sign-in is manual.");
688452
- console.log("Use the opened Chrome window in the VisionClaw Playwright profile to complete sign-in.");
688453
- console.log("Google may request phone number, recovery, or other verification steps.");
688454
- console.log("\nCredentials for operator use:");
688455
- console.log(` Email: ${gmail}`);
688456
- console.log(` Password: ${password}`);
688457
688493
  console.log(`
688458
- Complete any remaining Google sign-in steps for ${gmail} in the opened Chrome window.`);
688494
+ ${action(strong("Google sign-in is manual."))}`);
688495
+ console.log(action("Use the opened Chrome window in the VisionClaw Playwright profile to complete sign-in."));
688496
+ console.log(action("Google may request phone number, recovery, or other verification steps."));
688497
+ console.log(`
688498
+ ${strong("Credentials for operator use:")}`);
688499
+ console.log(` ${label("Email:")} ${strong(gmail)}`);
688500
+ console.log(` ${label("Password:")} ${strong(password)}`);
688501
+ console.log(`
688502
+ ${action(`Complete any remaining Google sign-in steps for ${gmail} in the opened Chrome window.`)}`);
688459
688503
  await waitForOperator("Press Enter after Google sign-in is complete.");
688460
688504
  }
688461
688505
  async function maybeSetupGithub(context, spec, state2) {
@@ -688510,7 +688554,8 @@ async function maybeSetupGithub(context, spec, state2) {
688510
688554
  }
688511
688555
  async function runSetup(commandArgs = []) {
688512
688556
  ensureConfigDir();
688513
- console.log("=== VisionClaw Manufacturer Setup ===\n");
688557
+ console.log(`${strong("=== VisionClaw Manufacturer Setup ===")}
688558
+ `);
688514
688559
  const source = resolveSetupSource(commandArgs);
688515
688560
  const { spec, setupCode } = await loadProvisioningSpec(source);
688516
688561
  if (configExists()) {
@@ -688545,13 +688590,13 @@ async function runSetup(commandArgs = []) {
688545
688590
  existed: true
688546
688591
  };
688547
688592
  console.log(`
688548
- Workspace account is activated on the server (${workspaceAccount.email}).`);
688593
+ ${success2(`Workspace account is activated on the server (${workspaceAccount.email}).`)}`);
688549
688594
  state2 = updateSetupState({
688550
688595
  gmail: workspaceAccount.email,
688551
688596
  gmailPassword: workspaceAccount.password
688552
688597
  });
688553
688598
  console.log(`
688554
- Workspace account ready: ${workspaceAccount.email}`);
688599
+ ${success2(`Workspace account ready: ${workspaceAccount.email}`)}`);
688555
688600
  const context = await launchPersistentChrome();
688556
688601
  try {
688557
688602
  await ensureGoogleBrowserLogin(context, workspaceAccount.email, workspaceAccount.password);
@@ -688669,7 +688714,7 @@ Workspace account ready: ${workspaceAccount.email}`);
688669
688714
  Onboarding link: ${onboardingLink}`);
688670
688715
  }
688671
688716
  }
688672
- var import_node_fs17, import_node_path16, import_prompts, import_playwright, CHROME_PATH;
688717
+ var import_node_fs17, import_node_path16, import_prompts, import_playwright, CHROME_PATH, ANSI_RESET2, ANSI_BOLD2, ANSI_GREEN2, ANSI_YELLOW2, ANSI_CYAN2;
688673
688718
  var init_onboarding = __esm({
688674
688719
  "dist/onboarding/index.js"() {
688675
688720
  "use strict";
@@ -688691,6 +688736,11 @@ var init_onboarding = __esm({
688691
688736
  init_prepare_mac();
688692
688737
  init_setup_shared();
688693
688738
  CHROME_PATH = findChromePath2();
688739
+ ANSI_RESET2 = "\x1B[0m";
688740
+ ANSI_BOLD2 = "\x1B[1m";
688741
+ ANSI_GREEN2 = "\x1B[32m";
688742
+ ANSI_YELLOW2 = "\x1B[33m";
688743
+ ANSI_CYAN2 = "\x1B[36m";
688694
688744
  }
688695
688745
  });
688696
688746
 
@@ -702817,8 +702867,8 @@ var require_dist_cjs32 = __commonJS({
702817
702867
  return VALID_HOST_LABEL_REGEX.test(value);
702818
702868
  }
702819
702869
  const labels = value.split(".");
702820
- for (const label of labels) {
702821
- if (!isValidHostLabel(label)) {
702870
+ for (const label2 of labels) {
702871
+ if (!isValidHostLabel(label2)) {
702822
702872
  return false;
702823
702873
  }
702824
702874
  }
@@ -703210,8 +703260,8 @@ var require_dist_cjs33 = __commonJS({
703210
703260
  var urlParser = require_dist_cjs30();
703211
703261
  var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
703212
703262
  if (allowSubDomains) {
703213
- for (const label of value.split(".")) {
703214
- if (!isVirtualHostableS3Bucket(label)) {
703263
+ for (const label2 of value.split(".")) {
703264
+ if (!isVirtualHostableS3Bucket(label2)) {
703215
703265
  return false;
703216
703266
  }
703217
703267
  }
@@ -711413,8 +711463,8 @@ var init_AwsQueryProtocol = __esm({
711413
711463
  if (deref(operationSchema.input) === "unit" || !request.body) {
711414
711464
  request.body = "";
711415
711465
  }
711416
- const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
711417
- request.body = `Action=${action}&Version=${this.options.version}` + request.body;
711466
+ const action2 = operationSchema.name.split("#")[1] ?? operationSchema.name;
711467
+ request.body = `Action=${action2}&Version=${this.options.version}` + request.body;
711418
711468
  if (request.body.endsWith("&")) {
711419
711469
  request.body = request.body.slice(-1);
711420
711470
  }
@@ -718712,8 +718762,8 @@ var require_dist_cjs67 = __commonJS({
718712
718762
  var urlParser = require_dist_cjs30();
718713
718763
  var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
718714
718764
  if (allowSubDomains) {
718715
- for (const label of value.split(".")) {
718716
- if (!isVirtualHostableS3Bucket(label)) {
718765
+ for (const label2 of value.split(".")) {
718766
+ if (!isVirtualHostableS3Bucket(label2)) {
718717
718767
  return false;
718718
718768
  }
718719
718769
  }
@@ -720843,13 +720893,13 @@ var require_dist_cjs69 = __commonJS({
720843
720893
  };
720844
720894
  });
720845
720895
  }
720846
- withObjectStore(mode, action) {
720896
+ withObjectStore(mode, action2) {
720847
720897
  return this.getDb().then((db3) => {
720848
720898
  const tx = db3.transaction(STORE_NAME, mode);
720849
720899
  tx.oncomplete = () => db3.close();
720850
720900
  return new Promise((resolve, reject) => {
720851
720901
  tx.onerror = () => reject(tx.error);
720852
- resolve(action(tx.objectStore(STORE_NAME)));
720902
+ resolve(action2(tx.objectStore(STORE_NAME)));
720853
720903
  }).catch((err7) => {
720854
720904
  db3.close();
720855
720905
  throw err7;
@@ -721299,8 +721349,8 @@ var require_dist_cjs70 = __commonJS({
721299
721349
  var urlParser = require_dist_cjs30();
721300
721350
  var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
721301
721351
  if (allowSubDomains) {
721302
- for (const label of value.split(".")) {
721303
- if (!isVirtualHostableS3Bucket(label)) {
721352
+ for (const label2 of value.split(".")) {
721353
+ if (!isVirtualHostableS3Bucket(label2)) {
721304
721354
  return false;
721305
721355
  }
721306
721356
  }
@@ -735246,10 +735296,10 @@ var init_workload_identity_auth = __esm({
735246
735296
  })
735247
735297
  });
735248
735298
  if (!response.ok) {
735249
- const errorText = await response.text();
735299
+ const errorText2 = await response.text();
735250
735300
  let body = void 0;
735251
735301
  try {
735252
- body = JSON.parse(errorText);
735302
+ body = JSON.parse(errorText2);
735253
735303
  } catch {
735254
735304
  }
735255
735305
  if (response.status === 400 || response.status === 401 || response.status === 403) {
@@ -753442,9 +753492,9 @@ var require_codegen = __commonJS({
753442
753492
  }
753443
753493
  };
753444
753494
  var Label = class extends Node {
753445
- constructor(label) {
753495
+ constructor(label2) {
753446
753496
  super();
753447
- this.label = label;
753497
+ this.label = label2;
753448
753498
  this.names = {};
753449
753499
  }
753450
753500
  render({ _n: _n2 }) {
@@ -753452,14 +753502,14 @@ var require_codegen = __commonJS({
753452
753502
  }
753453
753503
  };
753454
753504
  var Break = class extends Node {
753455
- constructor(label) {
753505
+ constructor(label2) {
753456
753506
  super();
753457
- this.label = label;
753507
+ this.label = label2;
753458
753508
  this.names = {};
753459
753509
  }
753460
753510
  render({ _n: _n2 }) {
753461
- const label = this.label ? ` ${this.label}` : "";
753462
- return `break${label};` + _n2;
753511
+ const label2 = this.label ? ` ${this.label}` : "";
753512
+ return `break${label2};` + _n2;
753463
753513
  }
753464
753514
  };
753465
753515
  var Throw = class extends Node {
@@ -753871,12 +753921,12 @@ var require_codegen = __commonJS({
753871
753921
  return this._endBlockNode(For);
753872
753922
  }
753873
753923
  // `label` statement
753874
- label(label) {
753875
- return this._leafNode(new Label(label));
753924
+ label(label2) {
753925
+ return this._leafNode(new Label(label2));
753876
753926
  }
753877
753927
  // `break` statement
753878
- break(label) {
753879
- return this._leafNode(new Break(label));
753928
+ break(label2) {
753929
+ return this._leafNode(new Break(label2));
753880
753930
  }
753881
753931
  // `return` statement
753882
753932
  return(value) {
@@ -770126,37 +770176,37 @@ async function runApprovedFunctionTool(deps, toolRun) {
770126
770176
  });
770127
770177
  }
770128
770178
  async function _runComputerActionAndScreenshot(computer, toolCall, runContext) {
770129
- for (const action of getComputerToolActions(toolCall)) {
770130
- switch (action.type) {
770179
+ for (const action2 of getComputerToolActions(toolCall)) {
770180
+ switch (action2.type) {
770131
770181
  case "click":
770132
- await computer.click(action.x, action.y, action.button, runContext);
770182
+ await computer.click(action2.x, action2.y, action2.button, runContext);
770133
770183
  break;
770134
770184
  case "double_click":
770135
- await computer.doubleClick(action.x, action.y, runContext);
770185
+ await computer.doubleClick(action2.x, action2.y, runContext);
770136
770186
  break;
770137
770187
  case "drag":
770138
- await computer.drag(action.path.map((p10) => [p10.x, p10.y]), runContext);
770188
+ await computer.drag(action2.path.map((p10) => [p10.x, p10.y]), runContext);
770139
770189
  break;
770140
770190
  case "keypress":
770141
- await computer.keypress(action.keys, runContext);
770191
+ await computer.keypress(action2.keys, runContext);
770142
770192
  break;
770143
770193
  case "move":
770144
- await computer.move(action.x, action.y, runContext);
770194
+ await computer.move(action2.x, action2.y, runContext);
770145
770195
  break;
770146
770196
  case "screenshot":
770147
770197
  await computer.screenshot(runContext);
770148
770198
  break;
770149
770199
  case "scroll":
770150
- await computer.scroll(action.x, action.y, action.scroll_x, action.scroll_y, runContext);
770200
+ await computer.scroll(action2.x, action2.y, action2.scroll_x, action2.scroll_y, runContext);
770151
770201
  break;
770152
770202
  case "type":
770153
- await computer.type(action.text, runContext);
770203
+ await computer.type(action2.text, runContext);
770154
770204
  break;
770155
770205
  case "wait":
770156
770206
  await computer.wait(runContext);
770157
770207
  break;
770158
770208
  default:
770159
- action;
770209
+ action2;
770160
770210
  break;
770161
770211
  }
770162
770212
  }
@@ -770249,9 +770299,9 @@ function emitToolEnd(runner, runContext, agent, tool2, output2, toolCall) {
770249
770299
  async function executeShellActions(agent, actions, runner, runContext, customLogger = void 0, toolErrorFormatter) {
770250
770300
  const _logger = customLogger ?? logger_default;
770251
770301
  const results = [];
770252
- for (const action of actions) {
770253
- const shellTool2 = action.shell;
770254
- const toolCall = action.toolCall;
770302
+ for (const action2 of actions) {
770303
+ const shellTool2 = action2.shell;
770304
+ const toolCall = action2.toolCall;
770255
770305
  if (!shellTool2.shell) {
770256
770306
  _logger.warn(`Skipping shell action for tool "${shellTool2.name}" because no local shell implementation is configured.`);
770257
770307
  continue;
@@ -770306,12 +770356,12 @@ async function executeShellActions(agent, actions, runner, runContext, customLog
770306
770356
  maxOutputLength = shellResult.maxOutputLength;
770307
770357
  }
770308
770358
  } catch (err7) {
770309
- const errorText = toErrorMessage2(err7);
770310
- const traceError = getTraceToolError(runner.config.traceIncludeSensitiveData, errorText);
770359
+ const errorText2 = toErrorMessage2(err7);
770360
+ const traceError = getTraceToolError(runner.config.traceIncludeSensitiveData, errorText2);
770311
770361
  shellOutputs = [
770312
770362
  {
770313
770363
  stdout: "",
770314
- stderr: errorText,
770364
+ stderr: errorText2,
770315
770365
  outcome: { type: "exit", exitCode: null }
770316
770366
  }
770317
770367
  ];
@@ -770350,9 +770400,9 @@ async function executeShellActions(agent, actions, runner, runContext, customLog
770350
770400
  async function executeApplyPatchOperations(agent, actions, runner, runContext, customLogger = void 0, toolErrorFormatter) {
770351
770401
  const _logger = customLogger ?? logger_default;
770352
770402
  const results = [];
770353
- for (const action of actions) {
770354
- const applyPatchTool2 = action.applyPatch;
770355
- const toolCall = action.toolCall;
770403
+ for (const action2 of actions) {
770404
+ const applyPatchTool2 = action2.applyPatch;
770405
+ const toolCall = action2.toolCall;
770356
770406
  const editorContext = { runContext };
770357
770407
  const approvalItem = new RunToolApprovalItem(toolCall, agent, applyPatchTool2.name);
770358
770408
  const approvalDecision = await handleToolApprovalDecision({
@@ -770444,9 +770494,9 @@ async function executeApplyPatchOperations(agent, actions, runner, runContext, c
770444
770494
  async function executeComputerActions(agent, actions, runner, runContext, customLogger = void 0, toolErrorFormatter) {
770445
770495
  const _logger = customLogger ?? logger_default;
770446
770496
  const results = [];
770447
- for (const action of actions) {
770448
- const toolCall = action.toolCall;
770449
- const computerTool2 = action.computer;
770497
+ for (const action2 of actions) {
770498
+ const toolCall = action2.toolCall;
770499
+ const computerTool2 = action2.computer;
770450
770500
  const computerActions2 = getComputerToolActions(toolCall);
770451
770501
  let cachedRejectionMessage;
770452
770502
  const getRejectionMessage = async () => {
@@ -770522,8 +770572,8 @@ async function executeComputerActions(agent, actions, runner, runContext, custom
770522
770572
  } catch (err7) {
770523
770573
  _logger.error("Failed to execute computer action:", err7);
770524
770574
  output2 = "";
770525
- const errorText = toErrorMessage2(err7);
770526
- const traceError = getTraceToolError(runner.config.traceIncludeSensitiveData, errorText);
770575
+ const errorText2 = toErrorMessage2(err7);
770576
+ const traceError = getTraceToolError(runner.config.traceIncludeSensitiveData, errorText2);
770527
770577
  span?.setError({
770528
770578
  message: "Error running tool",
770529
770579
  data: {
@@ -771253,11 +771303,11 @@ function filterActionsByApproval(preStepItems, actions, type) {
771253
771303
  if (allowedCallIds.size === 0) {
771254
771304
  return [];
771255
771305
  }
771256
- return actions.filter((action) => typeof action.toolCall.callId === "string" && allowedCallIds.has(action.toolCall.callId));
771306
+ return actions.filter((action2) => typeof action2.toolCall.callId === "string" && allowedCallIds.has(action2.toolCall.callId));
771257
771307
  }
771258
771308
  function filterPendingActions(actions, options3) {
771259
- return actions.filter((action) => {
771260
- const callId = action.toolCall.callId;
771309
+ return actions.filter((action2) => {
771310
+ const callId = action2.toolCall.callId;
771261
771311
  const hasCallId = typeof callId === "string";
771262
771312
  if (options3.allowedCallIds && options3.allowedCallIds.size > 0) {
771263
771313
  if (!hasCallId || !options3.allowedCallIds.has(callId)) {
@@ -773489,11 +773539,11 @@ var init_agent = __esm({
773489
773539
  });
773490
773540
 
773491
773541
  // node_modules/.pnpm/@openai+agents-core@0.6.0_ws@8.20.0_zod@4.3.6/node_modules/@openai/agents-core/dist/mcpServers.mjs
773492
- function createTimeoutError(action, server, timeoutMs) {
773542
+ function createTimeoutError(action2, server, timeoutMs) {
773493
773543
  if (timeoutMs === null) {
773494
- return new Error(`MCP server ${action} timed out.`);
773544
+ return new Error(`MCP server ${action2} timed out.`);
773495
773545
  }
773496
- const error49 = new Error(`MCP server ${action} timed out after ${timeoutMs}ms for '${server.name}'.`);
773546
+ const error49 = new Error(`MCP server ${action2} timed out after ${timeoutMs}ms for '${server.name}'.`);
773497
773547
  error49.name = "TimeoutError";
773498
773548
  return error49;
773499
773549
  }
@@ -773607,12 +773657,12 @@ var init_mcpServers = __esm({
773607
773657
  close() {
773608
773658
  return this.submit("close", this.closeTimeoutMs);
773609
773659
  }
773610
- submit(action, timeoutMs) {
773660
+ submit(action2, timeoutMs) {
773611
773661
  if (this.done) {
773612
773662
  return Promise.reject(createClosedError(this.server));
773613
773663
  }
773614
773664
  if (this.closeResult || this.closing) {
773615
- if (action === "close" && this.closeResult) {
773665
+ if (action2 === "close" && this.closeResult) {
773616
773666
  return this.closeResult;
773617
773667
  }
773618
773668
  return Promise.reject(createClosingError(this.server));
@@ -773624,12 +773674,12 @@ var init_mcpServers = __esm({
773624
773674
  rejectCommand = reject;
773625
773675
  });
773626
773676
  const command = {
773627
- action,
773677
+ action: action2,
773628
773678
  timeoutMs,
773629
773679
  resolve: resolveCommand,
773630
773680
  reject: rejectCommand
773631
773681
  };
773632
- if (action === "close") {
773682
+ if (action2 === "close") {
773633
773683
  this.closeResult = promise3;
773634
773684
  }
773635
773685
  this.queue.push(command);
@@ -775857,7 +775907,7 @@ function getInputItems(input) {
775857
775907
  return entry;
775858
775908
  }
775859
775909
  if (item.type === "shell_call") {
775860
- const action = {
775910
+ const action2 = {
775861
775911
  commands: item.action.commands,
775862
775912
  timeout_ms: typeof item.action.timeoutMs === "number" ? item.action.timeoutMs : null,
775863
775913
  max_output_length: typeof item.action.maxOutputLength === "number" ? item.action.maxOutputLength : null
@@ -775868,7 +775918,7 @@ function getInputItems(input) {
775868
775918
  id: item.id,
775869
775919
  call_id: item.callId,
775870
775920
  status: item.status ?? "in_progress",
775871
- action,
775921
+ action: action2,
775872
775922
  ...shellProviderData
775873
775923
  };
775874
775924
  return entry;
@@ -776151,9 +776201,9 @@ function convertToOutputItem(items) {
776151
776201
  };
776152
776202
  return output2;
776153
776203
  } else if (item.type === "computer_call") {
776154
- const { call_id, status, action, actions, ...providerData } = item;
776204
+ const { call_id, status, action: action2, actions, ...providerData } = item;
776155
776205
  const normalizedActions = Array.isArray(actions) && actions.length > 0 ? actions : void 0;
776156
- if (!normalizedActions && !action) {
776206
+ if (!normalizedActions && !action2) {
776157
776207
  throw new UserError(`Unsupported computer call item without an action or actions: ${JSON.stringify(item)}`);
776158
776208
  }
776159
776209
  const output2 = {
@@ -776161,21 +776211,21 @@ function convertToOutputItem(items) {
776161
776211
  id: item.id,
776162
776212
  callId: call_id,
776163
776213
  status,
776164
- action: action ?? normalizedActions?.[0],
776214
+ action: action2 ?? normalizedActions?.[0],
776165
776215
  ...normalizedActions ? { actions: normalizedActions } : {},
776166
776216
  providerData
776167
776217
  };
776168
776218
  return output2;
776169
776219
  } else if (item.type === "shell_call") {
776170
- const { call_id, status, action, ...providerData } = item;
776220
+ const { call_id, status, action: action2, ...providerData } = item;
776171
776221
  const shellAction = {
776172
- commands: Array.isArray(action?.commands) ? action.commands : []
776222
+ commands: Array.isArray(action2?.commands) ? action2.commands : []
776173
776223
  };
776174
- const timeout = action?.timeout_ms;
776224
+ const timeout = action2?.timeout_ms;
776175
776225
  if (typeof timeout === "number") {
776176
776226
  shellAction.timeoutMs = timeout;
776177
776227
  }
776178
- const maxOutputLength = action?.max_output_length;
776228
+ const maxOutputLength = action2?.max_output_length;
776179
776229
  if (typeof maxOutputLength === "number") {
776180
776230
  shellAction.maxOutputLength = maxOutputLength;
776181
776231
  }
@@ -804217,14 +804267,14 @@ async function execSudo(args, options3 = {}) {
804217
804267
  child.stdin.end();
804218
804268
  });
804219
804269
  }
804220
- async function withTimeout2(promise3, timeoutMs, label) {
804270
+ async function withTimeout2(promise3, timeoutMs, label2) {
804221
804271
  let timer2;
804222
804272
  try {
804223
804273
  return await Promise.race([
804224
804274
  promise3,
804225
804275
  new Promise((_resolve, reject) => {
804226
804276
  timer2 = setTimeout(() => {
804227
- reject(new Error(`${label} timed out after ${timeoutMs}ms`));
804277
+ reject(new Error(`${label2} timed out after ${timeoutMs}ms`));
804228
804278
  }, timeoutMs);
804229
804279
  })
804230
804280
  ]);
@@ -806089,9 +806139,9 @@ ${lines.join("\n")}`
806089
806139
  };
806090
806140
  }
806091
806141
  default: {
806092
- const action = args.action;
806142
+ const action2 = args.action;
806093
806143
  return {
806094
- content: [{ type: "text", text: `Unknown action: ${action}` }],
806144
+ content: [{ type: "text", text: `Unknown action: ${action2}` }],
806095
806145
  isError: true
806096
806146
  };
806097
806147
  }
@@ -806319,7 +806369,7 @@ var init_gmail_email = __esm({
806319
806369
  this.gmail = createGmailClient(config2);
806320
806370
  }
806321
806371
  async listEmails(options3 = {}) {
806322
- const label = options3.label ?? "INBOX";
806372
+ const label2 = options3.label ?? "INBOX";
806323
806373
  const maxResults = options3.maxResults ?? 10;
806324
806374
  const unreadOnly = options3.unreadOnly ?? false;
806325
806375
  const qParts = [];
@@ -806329,7 +806379,7 @@ var init_gmail_email = __esm({
806329
806379
  qParts.push("is:unread");
806330
806380
  const res = await this.gmail.users.messages.list({
806331
806381
  userId: "me",
806332
- labelIds: [label],
806382
+ labelIds: [label2],
806333
806383
  q: qParts.length ? qParts.join(" ") : void 0,
806334
806384
  maxResults
806335
806385
  });
@@ -807404,9 +807454,9 @@ ID: ${folder.id}${link}`
807404
807454
  };
807405
807455
  }
807406
807456
  default: {
807407
- const action = args.action;
807457
+ const action2 = args.action;
807408
807458
  return {
807409
- content: [{ type: "text", text: `Unknown action: ${action}` }],
807459
+ content: [{ type: "text", text: `Unknown action: ${action2}` }],
807410
807460
  isError: true
807411
807461
  };
807412
807462
  }
@@ -808330,9 +808380,9 @@ function isArrayOf(isString, arr) {
808330
808380
  return arr.every((item) => Number.isSafeInteger(item));
808331
808381
  }
808332
808382
  }
808333
- function astr(label, input) {
808383
+ function astr(label2, input) {
808334
808384
  if (typeof input !== "string")
808335
- throw new Error(`${label}: string expected`);
808385
+ throw new Error(`${label2}: string expected`);
808336
808386
  return true;
808337
808387
  }
808338
808388
  function anumber(n6) {
@@ -808343,13 +808393,13 @@ function aArr(input) {
808343
808393
  if (!Array.isArray(input))
808344
808394
  throw new Error("array expected");
808345
808395
  }
808346
- function astrArr(label, input) {
808396
+ function astrArr(label2, input) {
808347
808397
  if (!isArrayOf(true, input))
808348
- throw new Error(`${label}: array of strings expected`);
808398
+ throw new Error(`${label2}: array of strings expected`);
808349
808399
  }
808350
- function anumArr(label, input) {
808400
+ function anumArr(label2, input) {
808351
808401
  if (!isArrayOf(false, input))
808352
- throw new Error(`${label}: array of numbers expected`);
808402
+ throw new Error(`${label2}: array of numbers expected`);
808353
808403
  }
808354
808404
  // @__NO_SIDE_EFFECTS__
808355
808405
  function chain(...args) {
@@ -819409,15 +819459,15 @@ function parseOtpauthURI(uri) {
819409
819459
  const secret = url2.searchParams.get("secret");
819410
819460
  if (!secret)
819411
819461
  return null;
819412
- const label = decodeURIComponent(url2.pathname.replace(/^\/\/totp\//, "").replace(/^\//, ""));
819462
+ const label2 = decodeURIComponent(url2.pathname.replace(/^\/\/totp\//, "").replace(/^\//, ""));
819413
819463
  let issuer = url2.searchParams.get("issuer") ?? void 0;
819414
819464
  let account;
819415
- if (label.includes(":")) {
819416
- const [labelIssuer, labelAccount] = label.split(":", 2);
819465
+ if (label2.includes(":")) {
819466
+ const [labelIssuer, labelAccount] = label2.split(":", 2);
819417
819467
  issuer = issuer ?? labelIssuer;
819418
819468
  account = labelAccount;
819419
- } else if (label) {
819420
- account = label;
819469
+ } else if (label2) {
819470
+ account = label2;
819421
819471
  }
819422
819472
  const digits = url2.searchParams.get("digits");
819423
819473
  const period = url2.searchParams.get("period");
@@ -819474,7 +819524,7 @@ function handleStore(args) {
819474
819524
  secrets.push(fullEntry);
819475
819525
  }
819476
819526
  saveTOTPSecrets(secrets);
819477
- const action = isUpdate ? "Updated" : "Stored new";
819527
+ const action2 = isUpdate ? "Updated" : "Stored new";
819478
819528
  try {
819479
819529
  const token = h13({
819480
819530
  secret: entry.secret,
@@ -819483,9 +819533,9 @@ function handleStore(args) {
819483
819533
  algorithm: normalizeAlgorithm(entry.algorithm),
819484
819534
  guardrails: lenientGuardrails
819485
819535
  });
819486
- return ok7(`${action} TOTP secret for "${entry.service}". Current code: ${token} (valid for ~${entry.period ?? 30}s)`);
819536
+ return ok7(`${action2} TOTP secret for "${entry.service}". Current code: ${token} (valid for ~${entry.period ?? 30}s)`);
819487
819537
  } catch (e11) {
819488
- return ok7(`${action} TOTP secret for "${entry.service}", but code generation failed: ${e11 instanceof Error ? e11.message : String(e11)}. The secret may be invalid.`);
819538
+ return ok7(`${action2} TOTP secret for "${entry.service}", but code generation failed: ${e11 instanceof Error ? e11.message : String(e11)}. The secret may be invalid.`);
819489
819539
  }
819490
819540
  }
819491
819541
  function handleGenerate(args) {
@@ -823171,7 +823221,7 @@ var require_ponyfill_es2018 = __commonJS({
823171
823221
  return promiseResolvedWith(void 0);
823172
823222
  });
823173
823223
  }
823174
- shutdownWithAction(() => Promise.all(actions.map((action) => action())), true, error49);
823224
+ shutdownWithAction(() => Promise.all(actions.map((action2) => action2())), true, error49);
823175
823225
  };
823176
823226
  if (signal.aborted) {
823177
823227
  abortAlgorithm();
@@ -823245,21 +823295,21 @@ var require_ponyfill_es2018 = __commonJS({
823245
823295
  const oldCurrentWrite = currentWrite;
823246
823296
  return PerformPromiseThen(currentWrite, () => oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : void 0);
823247
823297
  }
823248
- function isOrBecomesErrored(stream, promise3, action) {
823298
+ function isOrBecomesErrored(stream, promise3, action2) {
823249
823299
  if (stream._state === "errored") {
823250
- action(stream._storedError);
823300
+ action2(stream._storedError);
823251
823301
  } else {
823252
- uponRejection(promise3, action);
823302
+ uponRejection(promise3, action2);
823253
823303
  }
823254
823304
  }
823255
- function isOrBecomesClosed(stream, promise3, action) {
823305
+ function isOrBecomesClosed(stream, promise3, action2) {
823256
823306
  if (stream._state === "closed") {
823257
- action();
823307
+ action2();
823258
823308
  } else {
823259
- uponFulfillment(promise3, action);
823309
+ uponFulfillment(promise3, action2);
823260
823310
  }
823261
823311
  }
823262
- function shutdownWithAction(action, originalIsError, originalError) {
823312
+ function shutdownWithAction(action2, originalIsError, originalError) {
823263
823313
  if (shuttingDown) {
823264
823314
  return;
823265
823315
  }
@@ -823270,7 +823320,7 @@ var require_ponyfill_es2018 = __commonJS({
823270
823320
  doTheRest();
823271
823321
  }
823272
823322
  function doTheRest() {
823273
- uponPromise(action(), () => finalize2(originalIsError, originalError), (newError) => finalize2(true, newError));
823323
+ uponPromise(action2(), () => finalize2(originalIsError, originalError), (newError) => finalize2(true, newError));
823274
823324
  return null;
823275
823325
  }
823276
823326
  }
@@ -860394,7 +860444,7 @@ var require_streams2 = __commonJS({
860394
860444
  readAll() {
860395
860445
  return new Promise((resolve, reject) => {
860396
860446
  const chunks = [];
860397
- const action = () => {
860447
+ const action2 = () => {
860398
860448
  if (__classPrivateFieldGet9(this, _BufferStreamReader_error, "f")) {
860399
860449
  reject(__classPrivateFieldGet9(this, _BufferStreamReader_error, "f"));
860400
860450
  return;
@@ -860402,20 +860452,20 @@ var require_streams2 = __commonJS({
860402
860452
  const buffer = __classPrivateFieldGet9(this, _BufferStreamReader_stream, "f").read();
860403
860453
  if (buffer != null) {
860404
860454
  chunks.push(buffer);
860405
- __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").push(action);
860455
+ __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").push(action2);
860406
860456
  } else if (__classPrivateFieldGet9(this, _BufferStreamReader_ended, "f")) {
860407
860457
  const result = Buffer.concat(chunks);
860408
860458
  resolve(result);
860409
860459
  } else {
860410
- __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").push(action);
860460
+ __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").push(action2);
860411
860461
  }
860412
860462
  };
860413
- action();
860463
+ action2();
860414
860464
  });
860415
860465
  }
860416
860466
  read(p10) {
860417
860467
  return new Promise((resolve, reject) => {
860418
- const action = () => {
860468
+ const action2 = () => {
860419
860469
  if (__classPrivateFieldGet9(this, _BufferStreamReader_error, "f")) {
860420
860470
  reject(__classPrivateFieldGet9(this, _BufferStreamReader_error, "f"));
860421
860471
  return;
@@ -860429,19 +860479,19 @@ var require_streams2 = __commonJS({
860429
860479
  if (__classPrivateFieldGet9(this, _BufferStreamReader_ended, "f")) {
860430
860480
  resolve(null);
860431
860481
  } else {
860432
- __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").push(action);
860482
+ __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").push(action2);
860433
860483
  }
860434
860484
  };
860435
- action();
860485
+ action2();
860436
860486
  });
860437
860487
  }
860438
860488
  };
860439
860489
  exports2.BufferStreamReader = BufferStreamReader;
860440
860490
  _BufferStreamReader_stream = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_error = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_ended = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_pendingActions = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_instances = /* @__PURE__ */ new WeakSet(), _BufferStreamReader_runPendingActions = function _BufferStreamReader_runPendingActions2() {
860441
860491
  const errors2 = [];
860442
- for (const action of __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").splice(0)) {
860492
+ for (const action2 of __classPrivateFieldGet9(this, _BufferStreamReader_pendingActions, "f").splice(0)) {
860443
860493
  try {
860444
- action();
860494
+ action2();
860445
860495
  } catch (err7) {
860446
860496
  errors2.push(err7);
860447
860497
  }
@@ -860646,9 +860696,9 @@ var require_run2 = __commonJS({
860646
860696
  const [receivedCode, signalName] = await __classPrivateFieldGet9(this, _Process_status, "f");
860647
860697
  const signal = signalName ? os_1.default.constants.signals[signalName] : receivedCode > 128 ? receivedCode - 128 : void 0;
860648
860698
  const code = receivedCode != null ? receivedCode : signal != null ? 128 + signal : void 0;
860649
- const success2 = code === 0;
860699
+ const success3 = code === 0;
860650
860700
  __classPrivateFieldSet8(this, _Process_receivedStatus, true, "f");
860651
- return { code, signal, success: success2 };
860701
+ return { code, signal, success: success3 };
860652
860702
  }
860653
860703
  async output() {
860654
860704
  if (!__classPrivateFieldGet9(this, _Process_stdout, "f")) {
@@ -861848,16 +861898,16 @@ function createMergeProxy(baseObj, extObj) {
861848
861898
  return true;
861849
861899
  },
861850
861900
  deleteProperty(_target, prop) {
861851
- let success2 = false;
861901
+ let success3 = false;
861852
861902
  if (prop in extObj) {
861853
861903
  delete extObj[prop];
861854
- success2 = true;
861904
+ success3 = true;
861855
861905
  }
861856
861906
  if (prop in baseObj) {
861857
861907
  delete baseObj[prop];
861858
- success2 = true;
861908
+ success3 = true;
861859
861909
  }
861860
- return success2;
861910
+ return success3;
861861
861911
  },
861862
861912
  ownKeys(_target) {
861863
861913
  const baseKeys = Reflect.ownKeys(baseObj);
@@ -895352,8 +895402,8 @@ async function handleSearch(keyword, forcedMarket, limit2) {
895352
895402
  }
895353
895403
  }
895354
895404
  async function queryStockData(args) {
895355
- const { action } = args;
895356
- switch (action) {
895405
+ const { action: action2 } = args;
895406
+ switch (action2) {
895357
895407
  case "quote": {
895358
895408
  if (!args.symbols) {
895359
895409
  return makeError2("'symbols' is required for quote action");
@@ -895383,7 +895433,7 @@ async function queryStockData(args) {
895383
895433
  return handleSearch(args.keyword, marketArg ?? "all", args.limit ?? 20);
895384
895434
  }
895385
895435
  default:
895386
- return makeError2(`unknown action '${String(action)}'`);
895436
+ return makeError2(`unknown action '${String(action2)}'`);
895387
895437
  }
895388
895438
  }
895389
895439
  var sdk, yf, stockDataTool;
@@ -903315,8 +903365,8 @@ var require_debuggability = __commonJS({
903315
903365
  };
903316
903366
  if (util2.isNode && process.stderr.isTTY) {
903317
903367
  printWarning = function(message, isSoft) {
903318
- var color = isSoft ? "\x1B[33m" : "\x1B[31m";
903319
- console.warn(color + message + "\x1B[0m\n");
903368
+ var color3 = isSoft ? "\x1B[33m" : "\x1B[31m";
903369
+ console.warn(color3 + message + "\x1B[0m\n");
903320
903370
  };
903321
903371
  } else if (!util2.isNode && typeof new Error().stack === "string") {
903322
903372
  printWarning = function(message, isSoft) {
@@ -903501,10 +903551,10 @@ var require_finally = __commonJS({
903501
903551
  return reasonOrValue;
903502
903552
  }
903503
903553
  }
903504
- Promise2.prototype._passThrough = function(handler, type, success2, fail5) {
903554
+ Promise2.prototype._passThrough = function(handler, type, success3, fail5) {
903505
903555
  if (typeof handler !== "function") return this.then();
903506
903556
  return this._then(
903507
- success2,
903557
+ success3,
903508
903558
  fail5,
903509
903559
  void 0,
903510
903560
  new PassThroughHandlerContext(this, type, handler),
@@ -906797,15 +906847,15 @@ var require_plumbing = __commonJS({
906797
906847
  var isString = require_isString();
906798
906848
  var isUndefined = require_isUndefined();
906799
906849
  module2.exports = function(options3) {
906800
- var errorText = "Please verify options";
906850
+ var errorText2 = "Please verify options";
906801
906851
  if (!isObjectLike(options3)) {
906802
- throw new TypeError(errorText);
906852
+ throw new TypeError(errorText2);
906803
906853
  }
906804
906854
  if (!isFunction(options3.PromiseImpl)) {
906805
- throw new TypeError(errorText + ".PromiseImpl");
906855
+ throw new TypeError(errorText2 + ".PromiseImpl");
906806
906856
  }
906807
906857
  if (!isUndefined(options3.constructorMixin) && !isFunction(options3.constructorMixin)) {
906808
- throw new TypeError(errorText + ".PromiseImpl");
906858
+ throw new TypeError(errorText2 + ".PromiseImpl");
906809
906859
  }
906810
906860
  var PromiseImpl = options3.PromiseImpl;
906811
906861
  var constructorMixin = options3.constructorMixin;
@@ -906916,15 +906966,15 @@ var require_request2 = __commonJS({
906916
906966
  var isFunction = require_isFunction();
906917
906967
  var isObjectLike = require_isObjectLike();
906918
906968
  module2.exports = function(options3) {
906919
- var errorText = "Please verify options";
906969
+ var errorText2 = "Please verify options";
906920
906970
  if (!isObjectLike(options3)) {
906921
- throw new TypeError(errorText);
906971
+ throw new TypeError(errorText2);
906922
906972
  }
906923
906973
  if (!isFunction(options3.request)) {
906924
- throw new TypeError(errorText + ".request");
906974
+ throw new TypeError(errorText2 + ".request");
906925
906975
  }
906926
906976
  if (!isArray6(options3.expose) || options3.expose.length === 0) {
906927
- throw new TypeError(errorText + ".expose");
906977
+ throw new TypeError(errorText2 + ".expose");
906928
906978
  }
906929
906979
  var plumbing = core({
906930
906980
  PromiseImpl: options3.PromiseImpl,
@@ -939308,10 +939358,10 @@ var require_telegram = __commonJS({
939308
939358
  */
939309
939359
  }, {
939310
939360
  key: "sendChatAction",
939311
- value: function sendChatAction(chatId, action) {
939361
+ value: function sendChatAction(chatId, action2) {
939312
939362
  var form = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
939313
939363
  form.chat_id = chatId;
939314
- form.action = action;
939364
+ form.action = action2;
939315
939365
  return this._request("sendChatAction", { form });
939316
939366
  }
939317
939367
  /**
@@ -943610,9 +943660,9 @@ var require_telegram2 = __commonJS({
943610
943660
  * @return {Promise} True on success
943611
943661
  * @see https://core.telegram.org/bots/api#sendchataction
943612
943662
  */
943613
- sendChatAction(chatId, action, form = {}) {
943663
+ sendChatAction(chatId, action2, form = {}) {
943614
943664
  form.chat_id = chatId;
943615
- form.action = action;
943665
+ form.action = action2;
943616
943666
  return this._request("sendChatAction", { form });
943617
943667
  }
943618
943668
  /**
@@ -946635,9 +946685,9 @@ var init_telegram = __esm({
946635
946685
  await this.answerCallbackQuery(callbackId, "Unknown action.");
946636
946686
  return;
946637
946687
  }
946638
- const action = match[1];
946688
+ const action2 = match[1];
946639
946689
  const entryId = match[2];
946640
- if (action === "approve") {
946690
+ if (action2 === "approve") {
946641
946691
  const result2 = await this.approveEntry(entryId, messageChatId, { suppressReply: true });
946642
946692
  await this.answerCallbackQuery(callbackId, result2);
946643
946693
  await this.clearCallbackButtons(query);
@@ -947158,9 +947208,9 @@ ${messageText}` : messageText,
947158
947208
  if (url2) {
947159
947209
  try {
947160
947210
  const transcript = await transcribeAudioFile(url2);
947161
- const label = "[Voice message transcription]";
947162
- commandMessage.text = commandMessage.text ? `${label}: ${transcript}
947163
- ${commandMessage.text}` : `${label}: ${transcript}`;
947211
+ const label2 = "[Voice message transcription]";
947212
+ commandMessage.text = commandMessage.text ? `${label2}: ${transcript}
947213
+ ${commandMessage.text}` : `${label2}: ${transcript}`;
947164
947214
  } catch (err7) {
947165
947215
  logger.warn(`Telegram: Voice pre-transcription failed: ${err7 instanceof Error ? err7.message : String(err7)}`);
947166
947216
  }
@@ -952787,7 +952837,7 @@ var require_body = __commonJS({
952787
952837
  });
952788
952838
  }
952789
952839
  assert4(isReadableStreamLike(stream));
952790
- let action = null;
952840
+ let action2 = null;
952791
952841
  let source = null;
952792
952842
  let length = null;
952793
952843
  let type = null;
@@ -952840,7 +952890,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
952840
952890
  length = null;
952841
952891
  }
952842
952892
  source = object5;
952843
- action = async function* () {
952893
+ action2 = async function* () {
952844
952894
  for (const part of blobParts) {
952845
952895
  if (part.stream) {
952846
952896
  yield* part.stream();
@@ -952870,11 +952920,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r
952870
952920
  if (typeof source === "string" || util2.isBuffer(source)) {
952871
952921
  length = Buffer.byteLength(source);
952872
952922
  }
952873
- if (action != null) {
952923
+ if (action2 != null) {
952874
952924
  let iterator;
952875
952925
  stream = new ReadableStream({
952876
952926
  async start() {
952877
- iterator = action(object5)[Symbol.asyncIterator]();
952927
+ iterator = action2(object5)[Symbol.asyncIterator]();
952878
952928
  },
952879
952929
  async pull(controller) {
952880
952930
  const { value, done } = await iterator.next();
@@ -961765,11 +961815,11 @@ var require_progressevent = __commonJS({
961765
961815
  var require_encoding = __commonJS({
961766
961816
  "node_modules/.pnpm/undici@6.24.1/node_modules/undici/lib/web/fileapi/encoding.js"(exports2, module2) {
961767
961817
  "use strict";
961768
- function getEncoding(label) {
961769
- if (!label) {
961818
+ function getEncoding(label2) {
961819
+ if (!label2) {
961770
961820
  return "failure";
961771
961821
  }
961772
- switch (label.trim().toLowerCase()) {
961822
+ switch (label2.trim().toLowerCase()) {
961773
961823
  case "unicode-1-1-utf-8":
961774
961824
  case "unicode11utf8":
961775
961825
  case "unicode20utf8":
@@ -976349,7 +976399,7 @@ var require_Messages = __commonJS({
976349
976399
  [DjsErrorCodes.ClientInvalidOption]: (prop, must) => `The ${prop} option must be ${must}`,
976350
976400
  [DjsErrorCodes.ClientInvalidProvidedShards]: "None of the provided shards were valid.",
976351
976401
  [DjsErrorCodes.ClientMissingIntents]: "Valid intents must be provided for the Client.",
976352
- [DjsErrorCodes.ClientNotReady]: (action) => `The client needs to be logged in to ${action}.`,
976402
+ [DjsErrorCodes.ClientNotReady]: (action2) => `The client needs to be logged in to ${action2}.`,
976353
976403
  [DjsErrorCodes.TokenInvalid]: "An invalid token was provided.",
976354
976404
  [DjsErrorCodes.TokenMissing]: "Request to use token, but token was unavailable to the client.",
976355
976405
  [DjsErrorCodes.ApplicationCommandPermissionsTokenMissing]: "Editing application command permissions requires an OAuth2 bearer token, but none was provided.",
@@ -976375,7 +976425,7 @@ var require_Messages = __commonJS({
976375
976425
  [DjsErrorCodes.ShardingNoChildExists]: (id2) => `Shard ${id2} has no active process or worker.`,
976376
976426
  [DjsErrorCodes.ShardingShardMiscalculation]: (shard, guild, count) => `Calculated invalid shard ${shard} for guild ${guild} with ${count} shards.`,
976377
976427
  [DjsErrorCodes.ColorRange]: "Color must be within the range 0 - 16777215 (0xFFFFFF).",
976378
- [DjsErrorCodes.ColorConvert]: (color) => `Unable to convert "${color}" to a number.`,
976428
+ [DjsErrorCodes.ColorConvert]: (color3) => `Unable to convert "${color3}" to a number.`,
976379
976429
  [DjsErrorCodes.InviteOptionsMissingChannel]: "A valid guild channel must be provided when GuildScheduledEvent is EXTERNAL.",
976380
976430
  [DjsErrorCodes.ButtonLabel]: "MessageButton label must be a string",
976381
976431
  [DjsErrorCodes.ButtonURL]: "MessageButton URL must be a string",
@@ -976432,7 +976482,7 @@ var require_Messages = __commonJS({
976432
976482
  `Client must have Create Guild Expressions or Manage Guild Expressions permission in guild ${guild} to see emoji authors.`
976433
976483
  ),
976434
976484
  [DjsErrorCodes.MissingManageEmojisAndStickersPermission]: (guild) => `Client must have Manage Emojis and Stickers permission in guild ${guild} to see emoji authors.`,
976435
- [DjsErrorCodes.NotGuildSoundboardSound]: (action) => `Soundboard sound is a default (non-guild) soundboard sound and can't be ${action}.`,
976485
+ [DjsErrorCodes.NotGuildSoundboardSound]: (action2) => `Soundboard sound is a default (non-guild) soundboard sound and can't be ${action2}.`,
976436
976486
  [DjsErrorCodes.NotGuildSticker]: "Sticker is a standard (non-guild) sticker and has no author.",
976437
976487
  [DjsErrorCodes.ReactionResolveUser]: "Couldn't resolve the user id to remove from the reaction.",
976438
976488
  [DjsErrorCodes.VanityURL]: "This guild does not have the vanity URL feature enabled.",
@@ -979031,8 +979081,8 @@ var require_Role = __commonJS({
979031
979081
  * @returns {Promise<Role>}
979032
979082
  * @deprecated Use {@link Role#setColors} instead.
979033
979083
  */
979034
- async setColor(color, reason) {
979035
- return this.edit({ color, reason });
979084
+ async setColor(color3, reason) {
979085
+ return this.edit({ color: color3, reason });
979036
979086
  }
979037
979087
  /**
979038
979088
  * Sets new colors for the role.
@@ -980013,20 +980063,20 @@ var require_Util = __commonJS({
980013
980063
  if (!allowEmpty && data2.length === 0) throw new error49(errorMessage);
980014
980064
  return data2;
980015
980065
  }
980016
- function resolveColor(color) {
980066
+ function resolveColor(color3) {
980017
980067
  let resolvedColor;
980018
- if (typeof color === "string") {
980019
- if (color === "Random") return Math.floor(Math.random() * (16777215 + 1));
980020
- if (color === "Default") return 0;
980021
- if (/^#?[\da-f]{6}$/i.test(color)) return parseInt(color.replace("#", ""), 16);
980022
- resolvedColor = Colors[color];
980023
- } else if (Array.isArray(color)) {
980024
- resolvedColor = (color[0] << 16) + (color[1] << 8) + color[2];
980068
+ if (typeof color3 === "string") {
980069
+ if (color3 === "Random") return Math.floor(Math.random() * (16777215 + 1));
980070
+ if (color3 === "Default") return 0;
980071
+ if (/^#?[\da-f]{6}$/i.test(color3)) return parseInt(color3.replace("#", ""), 16);
980072
+ resolvedColor = Colors[color3];
980073
+ } else if (Array.isArray(color3)) {
980074
+ resolvedColor = (color3[0] << 16) + (color3[1] << 8) + color3[2];
980025
980075
  } else {
980026
- resolvedColor = color;
980076
+ resolvedColor = color3;
980027
980077
  }
980028
980078
  if (!Number.isInteger(resolvedColor)) {
980029
- throw new DiscordjsTypeError2(ErrorCodes2.ColorConvert, color);
980079
+ throw new DiscordjsTypeError2(ErrorCodes2.ColorConvert, color3);
980030
980080
  }
980031
980081
  if (resolvedColor < 0 || resolvedColor > 16777215) {
980032
980082
  throw new DiscordjsRangeError2(ErrorCodes2.ColorRange);
@@ -986674,9 +986724,9 @@ ${givenBlock}`;
986674
986724
  __name(_ExpectedConstraintError, "ExpectedConstraintError");
986675
986725
  var ExpectedConstraintError = _ExpectedConstraintError;
986676
986726
  var _Result = class _Result2 {
986677
- constructor(success2, value, error49) {
986678
- this.success = success2;
986679
- if (success2) {
986727
+ constructor(success3, value, error49) {
986728
+ this.success = success3;
986729
+ if (success3) {
986680
986730
  this.value = value;
986681
986731
  } else {
986682
986732
  this.error = error49;
@@ -989667,14 +989717,14 @@ var require_dist14 = __commonJS({
989667
989717
  *
989668
989718
  * @param color - The color to use
989669
989719
  */
989670
- setColor(color) {
989671
- colorPredicate.parse(color);
989672
- if (Array.isArray(color)) {
989673
- const [red, green, blue] = color;
989720
+ setColor(color3) {
989721
+ colorPredicate.parse(color3);
989722
+ if (Array.isArray(color3)) {
989723
+ const [red, green, blue] = color3;
989674
989724
  this.data.color = (red << 16) + (green << 8) + blue;
989675
989725
  return this;
989676
989726
  }
989677
- this.data.color = color ?? void 0;
989727
+ this.data.color = color3 ?? void 0;
989678
989728
  return this;
989679
989729
  }
989680
989730
  /**
@@ -989821,8 +989871,8 @@ var require_dist14 = __commonJS({
989821
989871
  *
989822
989872
  * @param label - The label to use
989823
989873
  */
989824
- setLabel(label) {
989825
- this.data.label = labelValueDescriptionValidator.parse(label);
989874
+ setLabel(label2) {
989875
+ this.data.label = labelValueDescriptionValidator.parse(label2);
989826
989876
  return this;
989827
989877
  }
989828
989878
  /**
@@ -989900,8 +989950,8 @@ var require_dist14 = __commonJS({
989900
989950
  }
989901
989951
  __name(validateRequiredSelectMenuParameters, "validateRequiredSelectMenuParameters");
989902
989952
  var defaultValidator = import_shapeshift2.s.boolean();
989903
- function validateRequiredSelectMenuOptionParameters(label, value) {
989904
- labelValueDescriptionValidator.parse(label);
989953
+ function validateRequiredSelectMenuOptionParameters(label2, value) {
989954
+ labelValueDescriptionValidator.parse(label2);
989905
989955
  labelValueDescriptionValidator.parse(value);
989906
989956
  }
989907
989957
  __name(validateRequiredSelectMenuOptionParameters, "validateRequiredSelectMenuOptionParameters");
@@ -989909,12 +989959,12 @@ var require_dist14 = __commonJS({
989909
989959
  var urlValidator = import_shapeshift2.s.string().url({
989910
989960
  allowedProtocols: ["http:", "https:", "discord:"]
989911
989961
  }).setValidationEnabled(isValidationEnabled);
989912
- function validateRequiredButtonParameters(style, label, emoji3, customId, skuId, url2) {
989962
+ function validateRequiredButtonParameters(style, label2, emoji3, customId, skuId, url2) {
989913
989963
  if (style === import_v10.ButtonStyle.Premium) {
989914
989964
  if (!skuId) {
989915
989965
  throw new RangeError("Premium buttons must have an SKU id.");
989916
989966
  }
989917
- if (customId || label || url2 || emoji3) {
989967
+ if (customId || label2 || url2 || emoji3) {
989918
989968
  throw new RangeError("Premium buttons cannot have a custom id, label, URL, or emoji.");
989919
989969
  }
989920
989970
  } else {
@@ -989924,7 +989974,7 @@ var require_dist14 = __commonJS({
989924
989974
  if (url2 && customId) {
989925
989975
  throw new RangeError("URL and custom id are mutually exclusive.");
989926
989976
  }
989927
- if (!label && !emoji3) {
989977
+ if (!label2 && !emoji3) {
989928
989978
  throw new RangeError("Non-premium buttons must have a label and/or an emoji.");
989929
989979
  }
989930
989980
  if (style === import_v10.ButtonStyle.Link) {
@@ -990073,8 +990123,8 @@ var require_dist14 = __commonJS({
990073
990123
  *
990074
990124
  * @param label - The label to use
990075
990125
  */
990076
- setLabel(label) {
990077
- this.data.label = buttonLabelValidator.parse(label);
990126
+ setLabel(label2) {
990127
+ this.data.label = buttonLabelValidator.parse(label2);
990078
990128
  return this;
990079
990129
  }
990080
990130
  /**
@@ -990256,8 +990306,8 @@ var require_dist14 = __commonJS({
990256
990306
  *
990257
990307
  * @param label - The label to use
990258
990308
  */
990259
- setLabel(label) {
990260
- this.data.label = label;
990309
+ setLabel(label2) {
990310
+ this.data.label = label2;
990261
990311
  return this;
990262
990312
  }
990263
990313
  /**
@@ -990471,8 +990521,8 @@ var require_dist14 = __commonJS({
990471
990521
  *
990472
990522
  * @param label - The label to use
990473
990523
  */
990474
- setLabel(label) {
990475
- this.data.label = label;
990524
+ setLabel(label2) {
990525
+ this.data.label = label2;
990476
990526
  return this;
990477
990527
  }
990478
990528
  /**
@@ -991377,8 +991427,8 @@ var require_dist14 = __commonJS({
991377
991427
  * @param label - The label to use
991378
991428
  * @deprecated Use a label builder to create a label (and optionally a description) instead.
991379
991429
  */
991380
- setLabel(label) {
991381
- this.data.label = labelValidator.parse(label);
991430
+ setLabel(label2) {
991431
+ this.data.label = labelValidator.parse(label2);
991382
991432
  return this;
991383
991433
  }
991384
991434
  /**
@@ -991521,8 +991571,8 @@ var require_dist14 = __commonJS({
991521
991571
  *
991522
991572
  * @param label - The label to use
991523
991573
  */
991524
- setLabel(label) {
991525
- this.data.label = label;
991574
+ setLabel(label2) {
991575
+ this.data.label = label2;
991526
991576
  return this;
991527
991577
  }
991528
991578
  /**
@@ -991984,14 +992034,14 @@ var require_dist14 = __commonJS({
991984
992034
  *
991985
992035
  * @param color - The color to use
991986
992036
  */
991987
- setAccentColor(color) {
991988
- containerColorPredicate.parse(color);
991989
- if (Array.isArray(color)) {
991990
- const [red, green, blue] = color;
992037
+ setAccentColor(color3) {
992038
+ containerColorPredicate.parse(color3);
992039
+ if (Array.isArray(color3)) {
992040
+ const [red, green, blue] = color3;
991991
992041
  this.data.accent_color = (red << 16) + (green << 8) + blue;
991992
992042
  return this;
991993
992043
  }
991994
- this.data.accent_color = color;
992044
+ this.data.accent_color = color3;
991995
992045
  return this;
991996
992046
  }
991997
992047
  /**
@@ -992624,7 +992674,7 @@ var require_dist14 = __commonJS({
992624
992674
  */
992625
992675
  addLabelComponents(...components) {
992626
992676
  const normalized = normalizeArray(components);
992627
- const resolved = normalized.map((label) => resolveBuilder(label, LabelBuilder));
992677
+ const resolved = normalized.map((label2) => resolveBuilder(label2, LabelBuilder));
992628
992678
  this.components.push(...resolved);
992629
992679
  return this;
992630
992680
  }
@@ -992691,7 +992741,7 @@ var require_dist14 = __commonJS({
992691
992741
  * @param labels - The replacing label objects
992692
992742
  */
992693
992743
  spliceLabelComponents(index, deleteCount, ...labels) {
992694
- const resolved = labels.map((label) => resolveBuilder(label, LabelBuilder));
992744
+ const resolved = labels.map((label2) => resolveBuilder(label2, LabelBuilder));
992695
992745
  this.components.splice(index, deleteCount, ...resolved);
992696
992746
  return this;
992697
992747
  }
@@ -1002594,7 +1002644,7 @@ var require_AutoModerationRule = __commonJS({
1002594
1002644
  };
1002595
1002645
  }
1002596
1002646
  if ("actions" in data2) {
1002597
- this.actions = data2.actions.map((action) => _transformAPIAutoModerationAction(action));
1002647
+ this.actions = data2.actions.map((action2) => _transformAPIAutoModerationAction(action2));
1002598
1002648
  }
1002599
1002649
  if ("enabled" in data2) {
1002600
1002650
  this.enabled = data2.enabled;
@@ -1003299,7 +1003349,7 @@ var require_GuildAuditLogsEntry = __commonJS({
1003299
1003349
  * @param {AuditLogEvent} action The action target
1003300
1003350
  * @returns {AuditLogActionType}
1003301
1003351
  */
1003302
- static actionType(action) {
1003352
+ static actionType(action2) {
1003303
1003353
  if ([
1003304
1003354
  AuditLogEvent.ChannelCreate,
1003305
1003355
  AuditLogEvent.ChannelOverwriteCreate,
@@ -1003320,7 +1003370,7 @@ var require_GuildAuditLogsEntry = __commonJS({
1003320
1003370
  AuditLogEvent.AutoModerationBlockMessage,
1003321
1003371
  AuditLogEvent.OnboardingPromptCreate,
1003322
1003372
  AuditLogEvent.OnboardingCreate
1003323
- ].includes(action)) {
1003373
+ ].includes(action2)) {
1003324
1003374
  return "Create";
1003325
1003375
  }
1003326
1003376
  if ([
@@ -1003345,7 +1003395,7 @@ var require_GuildAuditLogsEntry = __commonJS({
1003345
1003395
  AuditLogEvent.SoundboardSoundDelete,
1003346
1003396
  AuditLogEvent.AutoModerationRuleDelete,
1003347
1003397
  AuditLogEvent.OnboardingPromptDelete
1003348
- ].includes(action)) {
1003398
+ ].includes(action2)) {
1003349
1003399
  return "Delete";
1003350
1003400
  }
1003351
1003401
  if ([
@@ -1003372,7 +1003422,7 @@ var require_GuildAuditLogsEntry = __commonJS({
1003372
1003422
  AuditLogEvent.AutoModerationUserCommunicationDisabled,
1003373
1003423
  AuditLogEvent.OnboardingPromptUpdate,
1003374
1003424
  AuditLogEvent.OnboardingUpdate
1003375
- ].includes(action)) {
1003425
+ ].includes(action2)) {
1003376
1003426
  return "Update";
1003377
1003427
  }
1003378
1003428
  return "All";
@@ -1010720,12 +1010770,12 @@ var require_AutoModerationRuleManager = __commonJS({
1010720
1010770
  mention_total_limit: triggerMetadata.mentionTotalLimit,
1010721
1010771
  mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled
1010722
1010772
  },
1010723
- actions: actions.map((action) => ({
1010724
- type: action.type,
1010773
+ actions: actions.map((action2) => ({
1010774
+ type: action2.type,
1010725
1010775
  metadata: {
1010726
- duration_seconds: action.metadata?.durationSeconds,
1010727
- channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel),
1010728
- custom_message: action.metadata?.customMessage
1010776
+ duration_seconds: action2.metadata?.durationSeconds,
1010777
+ channel_id: action2.metadata?.channel && this.guild.channels.resolveId(action2.metadata.channel),
1010778
+ custom_message: action2.metadata?.customMessage
1010729
1010779
  }
1010730
1010780
  })),
1010731
1010781
  enabled,
@@ -1010771,12 +1010821,12 @@ var require_AutoModerationRuleManager = __commonJS({
1010771
1010821
  mention_total_limit: triggerMetadata.mentionTotalLimit,
1010772
1010822
  mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled
1010773
1010823
  },
1010774
- actions: actions?.map((action) => ({
1010775
- type: action.type,
1010824
+ actions: actions?.map((action2) => ({
1010825
+ type: action2.type,
1010776
1010826
  metadata: {
1010777
- duration_seconds: action.metadata?.durationSeconds,
1010778
- channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel),
1010779
- custom_message: action.metadata?.customMessage
1010827
+ duration_seconds: action2.metadata?.durationSeconds,
1010828
+ channel_id: action2.metadata?.channel && this.guild.channels.resolveId(action2.metadata.channel),
1010829
+ custom_message: action2.metadata?.customMessage
1010780
1010830
  }
1010781
1010831
  })),
1010782
1010832
  enabled,
@@ -1013603,7 +1013653,7 @@ var require_RoleManager = __commonJS({
1013603
1013653
  */
1013604
1013654
  async create(options3 = {}) {
1013605
1013655
  let { permissions, icon } = options3;
1013606
- const { name, color, hoist, position, mentionable, reason, unicodeEmoji } = options3;
1013656
+ const { name, color: color3, hoist, position, mentionable, reason, unicodeEmoji } = options3;
1013607
1013657
  if (permissions !== void 0) permissions = new PermissionsBitField2(permissions);
1013608
1013658
  if (icon) {
1013609
1013659
  const guildEmojiURL = this.guild.emojis.resolve(icon)?.imageURL();
@@ -1013615,13 +1013665,13 @@ var require_RoleManager = __commonJS({
1013615
1013665
  secondary_color: options3.colors.secondaryColor && resolveColor(options3.colors.secondaryColor),
1013616
1013666
  tertiary_color: options3.colors.tertiaryColor && resolveColor(options3.colors.tertiaryColor)
1013617
1013667
  };
1013618
- if (color !== void 0) {
1013668
+ if (color3 !== void 0) {
1013619
1013669
  if (!deprecationEmittedForCreate) {
1013620
1013670
  process11.emitWarning(`Passing "color" to RoleManager#create() is deprecated. Use "colors" instead.`);
1013621
1013671
  }
1013622
1013672
  deprecationEmittedForCreate = true;
1013623
1013673
  colors = {
1013624
- primary_color: resolveColor(color),
1013674
+ primary_color: resolveColor(color3),
1013625
1013675
  secondary_color: null,
1013626
1013676
  tertiary_color: null
1013627
1013677
  };
@@ -1015363,9 +1015413,9 @@ var require_GuildManager = __commonJS({
1015363
1015413
  verification_level: verificationLevel,
1015364
1015414
  default_message_notifications: defaultMessageNotifications,
1015365
1015415
  explicit_content_filter: explicitContentFilter,
1015366
- roles: roles.map(({ color, permissions, ...options3 }) => ({
1015416
+ roles: roles.map(({ color: color3, permissions, ...options3 }) => ({
1015367
1015417
  ...options3,
1015368
- color: color && resolveColor(color),
1015418
+ color: color3 && resolveColor(color3),
1015369
1015419
  permissions: permissions === void 0 ? void 0 : PermissionsBitField2.resolve(permissions).toString()
1015370
1015420
  })),
1015371
1015421
  channels: channels.map(
@@ -1017656,8 +1017706,8 @@ var require_EmbedBuilder = __commonJS({
1017656
1017706
  * @param {?ColorResolvable} color The color of the embed
1017657
1017707
  * @returns {EmbedBuilder}
1017658
1017708
  */
1017659
- setColor(color) {
1017660
- return super.setColor(color && resolveColor(color));
1017709
+ setColor(color3) {
1017710
+ return super.setColor(color3 && resolveColor(color3));
1017661
1017711
  }
1017662
1017712
  /**
1017663
1017713
  * Creates a new embed builder from JSON data
@@ -1019160,7 +1019210,7 @@ var init_cdn_url = __esm({
1019160
1019210
 
1019161
1019211
  // node_modules/.pnpm/@tencent-weixin+openclaw-weixin@2.4.3/node_modules/@tencent-weixin/openclaw-weixin/src/cdn/cdn-upload.ts
1019162
1019212
  async function uploadBufferToCdn(params) {
1019163
- const { buf, uploadFullUrl, uploadParam, filekey, cdnBaseUrl, label, aeskey } = params;
1019213
+ const { buf, uploadFullUrl, uploadParam, filekey, cdnBaseUrl, label: label2, aeskey } = params;
1019164
1019214
  const ciphertext = encryptAesEcb(buf, aeskey);
1019165
1019215
  const trimmedFull = uploadFullUrl?.trim();
1019166
1019216
  let cdnUrl;
@@ -1019169,9 +1019219,9 @@ async function uploadBufferToCdn(params) {
1019169
1019219
  } else if (uploadParam) {
1019170
1019220
  cdnUrl = buildCdnUploadUrl({ cdnBaseUrl, uploadParam, filekey });
1019171
1019221
  } else {
1019172
- throw new Error(`${label}: CDN upload URL missing (need upload_full_url or upload_param)`);
1019222
+ throw new Error(`${label2}: CDN upload URL missing (need upload_full_url or upload_param)`);
1019173
1019223
  }
1019174
- logger8.debug(`${label}: CDN POST url=${redactUrl(cdnUrl)} ciphertextSize=${ciphertext.length}`);
1019224
+ logger8.debug(`${label2}: CDN POST url=${redactUrl(cdnUrl)} ciphertextSize=${ciphertext.length}`);
1019175
1019225
  let downloadParam;
1019176
1019226
  let lastError;
1019177
1019227
  for (let attempt = 1; attempt <= UPLOAD_MAX_RETRIES; attempt++) {
@@ -1019184,33 +1019234,33 @@ async function uploadBufferToCdn(params) {
1019184
1019234
  if (res.status >= 400 && res.status < 500) {
1019185
1019235
  const errMsg = res.headers.get("x-error-message") ?? await res.text();
1019186
1019236
  logger8.error(
1019187
- `${label}: CDN client error attempt=${attempt} status=${res.status} errMsg=${errMsg}`
1019237
+ `${label2}: CDN client error attempt=${attempt} status=${res.status} errMsg=${errMsg}`
1019188
1019238
  );
1019189
1019239
  throw new Error(`CDN upload client error ${res.status}: ${errMsg}`);
1019190
1019240
  }
1019191
1019241
  if (res.status !== 200) {
1019192
1019242
  const errMsg = res.headers.get("x-error-message") ?? `status ${res.status}`;
1019193
1019243
  logger8.error(
1019194
- `${label}: CDN server error attempt=${attempt} status=${res.status} errMsg=${errMsg}`
1019244
+ `${label2}: CDN server error attempt=${attempt} status=${res.status} errMsg=${errMsg}`
1019195
1019245
  );
1019196
1019246
  throw new Error(`CDN upload server error: ${errMsg}`);
1019197
1019247
  }
1019198
1019248
  downloadParam = res.headers.get("x-encrypted-param") ?? void 0;
1019199
1019249
  if (!downloadParam) {
1019200
1019250
  logger8.error(
1019201
- `${label}: CDN response missing x-encrypted-param header attempt=${attempt}`
1019251
+ `${label2}: CDN response missing x-encrypted-param header attempt=${attempt}`
1019202
1019252
  );
1019203
1019253
  throw new Error("CDN upload response missing x-encrypted-param header");
1019204
1019254
  }
1019205
- logger8.debug(`${label}: CDN upload success attempt=${attempt}`);
1019255
+ logger8.debug(`${label2}: CDN upload success attempt=${attempt}`);
1019206
1019256
  break;
1019207
1019257
  } catch (err7) {
1019208
1019258
  lastError = err7;
1019209
1019259
  if (err7 instanceof Error && err7.message.includes("client error")) throw err7;
1019210
1019260
  if (attempt < UPLOAD_MAX_RETRIES) {
1019211
- logger8.error(`${label}: attempt ${attempt} failed, retrying... err=${String(err7)}`);
1019261
+ logger8.error(`${label2}: attempt ${attempt} failed, retrying... err=${String(err7)}`);
1019212
1019262
  } else {
1019213
- logger8.error(`${label}: all ${UPLOAD_MAX_RETRIES} attempts failed err=${String(err7)}`);
1019263
+ logger8.error(`${label2}: all ${UPLOAD_MAX_RETRIES} attempts failed err=${String(err7)}`);
1019214
1019264
  }
1019215
1019265
  }
1019216
1019266
  }
@@ -1019339,7 +1019389,7 @@ async function downloadRemoteImageToTemp(url2, destDir) {
1019339
1019389
  return filePath;
1019340
1019390
  }
1019341
1019391
  async function uploadMediaToCdn(params) {
1019342
- const { filePath, toUserId, opts, cdnBaseUrl, mediaType, label } = params;
1019392
+ const { filePath, toUserId, opts, cdnBaseUrl, mediaType, label: label2 } = params;
1019343
1019393
  const plaintext = await import_promises21.default.readFile(filePath);
1019344
1019394
  const rawsize = plaintext.length;
1019345
1019395
  const rawfilemd5 = import_node_crypto12.default.createHash("md5").update(plaintext).digest("hex");
@@ -1019347,7 +1019397,7 @@ async function uploadMediaToCdn(params) {
1019347
1019397
  const filekey = import_node_crypto12.default.randomBytes(16).toString("hex");
1019348
1019398
  const aeskey = import_node_crypto12.default.randomBytes(16);
1019349
1019399
  logger8.debug(
1019350
- `${label}: file=${filePath} rawsize=${rawsize} filesize=${filesize} md5=${rawfilemd5} filekey=${filekey}`
1019400
+ `${label2}: file=${filePath} rawsize=${rawsize} filesize=${filesize} md5=${rawfilemd5} filekey=${filekey}`
1019351
1019401
  );
1019352
1019402
  const uploadUrlResp = await getUploadUrl({
1019353
1019403
  ...opts,
@@ -1019364,9 +1019414,9 @@ async function uploadMediaToCdn(params) {
1019364
1019414
  const uploadParam = uploadUrlResp.upload_param;
1019365
1019415
  if (!uploadFullUrl && !uploadParam) {
1019366
1019416
  logger8.error(
1019367
- `${label}: getUploadUrl returned no upload URL (need upload_full_url or upload_param), resp=${JSON.stringify(uploadUrlResp)}`
1019417
+ `${label2}: getUploadUrl returned no upload URL (need upload_full_url or upload_param), resp=${JSON.stringify(uploadUrlResp)}`
1019368
1019418
  );
1019369
- throw new Error(`${label}: getUploadUrl returned no upload URL`);
1019419
+ throw new Error(`${label2}: getUploadUrl returned no upload URL`);
1019370
1019420
  }
1019371
1019421
  const { downloadParam: downloadEncryptedQueryParam } = await uploadBufferToCdn({
1019372
1019422
  buf: plaintext,
@@ -1019375,7 +1019425,7 @@ async function uploadMediaToCdn(params) {
1019375
1019425
  filekey,
1019376
1019426
  cdnBaseUrl,
1019377
1019427
  aeskey,
1019378
- label: `${label}[orig filekey=${filekey}]`
1019428
+ label: `${label2}[orig filekey=${filekey}]`
1019379
1019429
  });
1019380
1019430
  return {
1019381
1019431
  filekey,
@@ -1019423,27 +1019473,27 @@ var init_upload = __esm({
1019423
1019473
  });
1019424
1019474
 
1019425
1019475
  // node_modules/.pnpm/@tencent-weixin+openclaw-weixin@2.4.3/node_modules/@tencent-weixin/openclaw-weixin/src/cdn/pic-decrypt.ts
1019426
- async function fetchCdnBytes(url2, label) {
1019476
+ async function fetchCdnBytes(url2, label2) {
1019427
1019477
  let res;
1019428
1019478
  try {
1019429
1019479
  res = await fetch(url2);
1019430
1019480
  } catch (err7) {
1019431
1019481
  const cause = err7.cause ?? err7.code ?? "(no cause)";
1019432
1019482
  logger8.error(
1019433
- `${label}: fetch network error url=${url2} err=${String(err7)} cause=${String(cause)}`
1019483
+ `${label2}: fetch network error url=${url2} err=${String(err7)} cause=${String(cause)}`
1019434
1019484
  );
1019435
1019485
  throw err7;
1019436
1019486
  }
1019437
- logger8.debug(`${label}: response status=${res.status} ok=${res.ok}`);
1019487
+ logger8.debug(`${label2}: response status=${res.status} ok=${res.ok}`);
1019438
1019488
  if (!res.ok) {
1019439
1019489
  const body = await res.text().catch(() => "(unreadable)");
1019440
- const msg = `${label}: CDN download ${res.status} ${res.statusText} body=${body}`;
1019490
+ const msg = `${label2}: CDN download ${res.status} ${res.statusText} body=${body}`;
1019441
1019491
  logger8.error(msg);
1019442
1019492
  throw new Error(msg);
1019443
1019493
  }
1019444
1019494
  return Buffer.from(await res.arrayBuffer());
1019445
1019495
  }
1019446
- function parseAesKey(aesKeyBase64, label) {
1019496
+ function parseAesKey(aesKeyBase64, label2) {
1019447
1019497
  const decoded = Buffer.from(aesKeyBase64, "base64");
1019448
1019498
  if (decoded.length === 16) {
1019449
1019499
  return decoded;
@@ -1019451,38 +1019501,38 @@ function parseAesKey(aesKeyBase64, label) {
1019451
1019501
  if (decoded.length === 32 && /^[0-9a-fA-F]{32}$/.test(decoded.toString("ascii"))) {
1019452
1019502
  return Buffer.from(decoded.toString("ascii"), "hex");
1019453
1019503
  }
1019454
- const msg = `${label}: aes_key must decode to 16 raw bytes or 32-char hex string, got ${decoded.length} bytes (base64="${aesKeyBase64}")`;
1019504
+ const msg = `${label2}: aes_key must decode to 16 raw bytes or 32-char hex string, got ${decoded.length} bytes (base64="${aesKeyBase64}")`;
1019455
1019505
  logger8.error(msg);
1019456
1019506
  throw new Error(msg);
1019457
1019507
  }
1019458
- async function downloadAndDecryptBuffer(encryptedQueryParam, aesKeyBase64, cdnBaseUrl, label, fullUrl) {
1019459
- const key = parseAesKey(aesKeyBase64, label);
1019508
+ async function downloadAndDecryptBuffer(encryptedQueryParam, aesKeyBase64, cdnBaseUrl, label2, fullUrl) {
1019509
+ const key = parseAesKey(aesKeyBase64, label2);
1019460
1019510
  let url2;
1019461
1019511
  if (fullUrl) {
1019462
1019512
  url2 = fullUrl;
1019463
1019513
  } else if (ENABLE_CDN_URL_FALLBACK) {
1019464
1019514
  url2 = buildCdnDownloadUrl(encryptedQueryParam, cdnBaseUrl);
1019465
1019515
  } else {
1019466
- throw new Error(`${label}: fullUrl is required (CDN URL fallback is disabled)`);
1019516
+ throw new Error(`${label2}: fullUrl is required (CDN URL fallback is disabled)`);
1019467
1019517
  }
1019468
- logger8.debug(`${label}: fetching url=${url2}`);
1019469
- const encrypted = await fetchCdnBytes(url2, label);
1019470
- logger8.debug(`${label}: downloaded ${encrypted.byteLength} bytes, decrypting`);
1019518
+ logger8.debug(`${label2}: fetching url=${url2}`);
1019519
+ const encrypted = await fetchCdnBytes(url2, label2);
1019520
+ logger8.debug(`${label2}: downloaded ${encrypted.byteLength} bytes, decrypting`);
1019471
1019521
  const decrypted = decryptAesEcb(encrypted, key);
1019472
- logger8.debug(`${label}: decrypted ${decrypted.length} bytes`);
1019522
+ logger8.debug(`${label2}: decrypted ${decrypted.length} bytes`);
1019473
1019523
  return decrypted;
1019474
1019524
  }
1019475
- async function downloadPlainCdnBuffer(encryptedQueryParam, cdnBaseUrl, label, fullUrl) {
1019525
+ async function downloadPlainCdnBuffer(encryptedQueryParam, cdnBaseUrl, label2, fullUrl) {
1019476
1019526
  let url2;
1019477
1019527
  if (fullUrl) {
1019478
1019528
  url2 = fullUrl;
1019479
1019529
  } else if (ENABLE_CDN_URL_FALLBACK) {
1019480
1019530
  url2 = buildCdnDownloadUrl(encryptedQueryParam, cdnBaseUrl);
1019481
1019531
  } else {
1019482
- throw new Error(`${label}: fullUrl is required (CDN URL fallback is disabled)`);
1019532
+ throw new Error(`${label2}: fullUrl is required (CDN URL fallback is disabled)`);
1019483
1019533
  }
1019484
- logger8.debug(`${label}: fetching url=${url2}`);
1019485
- return fetchCdnBytes(url2, label);
1019534
+ logger8.debug(`${label2}: fetching url=${url2}`);
1019535
+ return fetchCdnBytes(url2, label2);
1019486
1019536
  }
1019487
1019537
  var init_pic_decrypt = __esm({
1019488
1019538
  "node_modules/.pnpm/@tencent-weixin+openclaw-weixin@2.4.3/node_modules/@tencent-weixin/openclaw-weixin/src/cdn/pic-decrypt.ts"() {
@@ -1019553,34 +1019603,34 @@ var init_silk_transcode = __esm({
1019553
1019603
 
1019554
1019604
  // node_modules/.pnpm/@tencent-weixin+openclaw-weixin@2.4.3/node_modules/@tencent-weixin/openclaw-weixin/src/media/media-download.ts
1019555
1019605
  async function downloadMediaFromItem(item, deps) {
1019556
- const { cdnBaseUrl, saveMedia, log, errLog, label } = deps;
1019606
+ const { cdnBaseUrl, saveMedia, log, errLog, label: label2 } = deps;
1019557
1019607
  const result = {};
1019558
1019608
  if (item.type === MessageItemType.IMAGE) {
1019559
1019609
  const img = item.image_item;
1019560
1019610
  if (!img?.media?.encrypt_query_param && !img?.media?.full_url) return result;
1019561
1019611
  const aesKeyBase64 = img.aeskey ? Buffer.from(img.aeskey, "hex").toString("base64") : img.media.aes_key;
1019562
1019612
  logger8.debug(
1019563
- `${label} image: encrypt_query_param=${(img.media.encrypt_query_param ?? "").slice(0, 40)}... hasAesKey=${Boolean(aesKeyBase64)} aeskeySource=${img.aeskey ? "image_item.aeskey" : "media.aes_key"} full_url=${Boolean(img.media.full_url)}`
1019613
+ `${label2} image: encrypt_query_param=${(img.media.encrypt_query_param ?? "").slice(0, 40)}... hasAesKey=${Boolean(aesKeyBase64)} aeskeySource=${img.aeskey ? "image_item.aeskey" : "media.aes_key"} full_url=${Boolean(img.media.full_url)}`
1019564
1019614
  );
1019565
1019615
  try {
1019566
1019616
  const buf = aesKeyBase64 ? await downloadAndDecryptBuffer(
1019567
1019617
  img.media.encrypt_query_param ?? "",
1019568
1019618
  aesKeyBase64,
1019569
1019619
  cdnBaseUrl,
1019570
- `${label} image`,
1019620
+ `${label2} image`,
1019571
1019621
  img.media.full_url
1019572
1019622
  ) : await downloadPlainCdnBuffer(
1019573
1019623
  img.media.encrypt_query_param ?? "",
1019574
1019624
  cdnBaseUrl,
1019575
- `${label} image-plain`,
1019625
+ `${label2} image-plain`,
1019576
1019626
  img.media.full_url
1019577
1019627
  );
1019578
1019628
  const saved = await saveMedia(buf, void 0, "inbound", WEIXIN_MEDIA_MAX_BYTES);
1019579
1019629
  result.decryptedPicPath = saved.path;
1019580
- logger8.debug(`${label} image saved: ${saved.path}`);
1019630
+ logger8.debug(`${label2} image saved: ${saved.path}`);
1019581
1019631
  } catch (err7) {
1019582
- logger8.error(`${label} image download/decrypt failed: ${String(err7)}`);
1019583
- errLog(`weixin ${label} image download/decrypt failed: ${String(err7)}`);
1019632
+ logger8.error(`${label2} image download/decrypt failed: ${String(err7)}`);
1019633
+ errLog(`weixin ${label2} image download/decrypt failed: ${String(err7)}`);
1019584
1019634
  }
1019585
1019635
  } else if (item.type === MessageItemType.VOICE) {
1019586
1019636
  const voice = item.voice_item;
@@ -1019591,25 +1019641,25 @@ async function downloadMediaFromItem(item, deps) {
1019591
1019641
  voice.media.encrypt_query_param ?? "",
1019592
1019642
  voice.media.aes_key,
1019593
1019643
  cdnBaseUrl,
1019594
- `${label} voice`,
1019644
+ `${label2} voice`,
1019595
1019645
  voice.media.full_url
1019596
1019646
  );
1019597
- logger8.debug(`${label} voice: decrypted ${silkBuf.length} bytes, attempting silk transcode`);
1019647
+ logger8.debug(`${label2} voice: decrypted ${silkBuf.length} bytes, attempting silk transcode`);
1019598
1019648
  const wavBuf = await silkToWav(silkBuf);
1019599
1019649
  if (wavBuf) {
1019600
1019650
  const saved = await saveMedia(wavBuf, "audio/wav", "inbound", WEIXIN_MEDIA_MAX_BYTES);
1019601
1019651
  result.decryptedVoicePath = saved.path;
1019602
1019652
  result.voiceMediaType = "audio/wav";
1019603
- logger8.debug(`${label} voice: saved WAV to ${saved.path}`);
1019653
+ logger8.debug(`${label2} voice: saved WAV to ${saved.path}`);
1019604
1019654
  } else {
1019605
1019655
  const saved = await saveMedia(silkBuf, "audio/silk", "inbound", WEIXIN_MEDIA_MAX_BYTES);
1019606
1019656
  result.decryptedVoicePath = saved.path;
1019607
1019657
  result.voiceMediaType = "audio/silk";
1019608
- logger8.debug(`${label} voice: silk transcode unavailable, saved raw SILK to ${saved.path}`);
1019658
+ logger8.debug(`${label2} voice: silk transcode unavailable, saved raw SILK to ${saved.path}`);
1019609
1019659
  }
1019610
1019660
  } catch (err7) {
1019611
- logger8.error(`${label} voice download/transcode failed: ${String(err7)}`);
1019612
- errLog(`weixin ${label} voice download/transcode failed: ${String(err7)}`);
1019661
+ logger8.error(`${label2} voice download/transcode failed: ${String(err7)}`);
1019662
+ errLog(`weixin ${label2} voice download/transcode failed: ${String(err7)}`);
1019613
1019663
  }
1019614
1019664
  } else if (item.type === MessageItemType.FILE) {
1019615
1019665
  const fileItem = item.file_item;
@@ -1019620,7 +1019670,7 @@ async function downloadMediaFromItem(item, deps) {
1019620
1019670
  fileItem.media.encrypt_query_param ?? "",
1019621
1019671
  fileItem.media.aes_key,
1019622
1019672
  cdnBaseUrl,
1019623
- `${label} file`,
1019673
+ `${label2} file`,
1019624
1019674
  fileItem.media.full_url
1019625
1019675
  );
1019626
1019676
  const mime = getMimeFromFilename(fileItem.file_name ?? "file.bin");
@@ -1019633,10 +1019683,10 @@ async function downloadMediaFromItem(item, deps) {
1019633
1019683
  );
1019634
1019684
  result.decryptedFilePath = saved.path;
1019635
1019685
  result.fileMediaType = mime;
1019636
- logger8.debug(`${label} file: saved to ${saved.path} mime=${mime}`);
1019686
+ logger8.debug(`${label2} file: saved to ${saved.path} mime=${mime}`);
1019637
1019687
  } catch (err7) {
1019638
- logger8.error(`${label} file download failed: ${String(err7)}`);
1019639
- errLog(`weixin ${label} file download failed: ${String(err7)}`);
1019688
+ logger8.error(`${label2} file download failed: ${String(err7)}`);
1019689
+ errLog(`weixin ${label2} file download failed: ${String(err7)}`);
1019640
1019690
  }
1019641
1019691
  } else if (item.type === MessageItemType.VIDEO) {
1019642
1019692
  const videoItem = item.video_item;
@@ -1019647,15 +1019697,15 @@ async function downloadMediaFromItem(item, deps) {
1019647
1019697
  videoItem.media.encrypt_query_param ?? "",
1019648
1019698
  videoItem.media.aes_key,
1019649
1019699
  cdnBaseUrl,
1019650
- `${label} video`,
1019700
+ `${label2} video`,
1019651
1019701
  videoItem.media.full_url
1019652
1019702
  );
1019653
1019703
  const saved = await saveMedia(buf, "video/mp4", "inbound", WEIXIN_MEDIA_MAX_BYTES);
1019654
1019704
  result.decryptedVideoPath = saved.path;
1019655
- logger8.debug(`${label} video: saved to ${saved.path}`);
1019705
+ logger8.debug(`${label2} video: saved to ${saved.path}`);
1019656
1019706
  } catch (err7) {
1019657
- logger8.error(`${label} video download failed: ${String(err7)}`);
1019658
- errLog(`weixin ${label} video download failed: ${String(err7)}`);
1019707
+ logger8.error(`${label2} video download failed: ${String(err7)}`);
1019708
+ errLog(`weixin ${label2} video download failed: ${String(err7)}`);
1019659
1019709
  }
1019660
1019710
  }
1019661
1019711
  return result;
@@ -1020120,7 +1020170,7 @@ async function sendMessageWeixin(params) {
1020120
1020170
  return { messageId: clientId };
1020121
1020171
  }
1020122
1020172
  async function sendMediaItems(params) {
1020123
- const { to, text, mediaItem, opts, label } = params;
1020173
+ const { to, text, mediaItem, opts, label: label2 } = params;
1020124
1020174
  const items = [];
1020125
1020175
  if (text) {
1020126
1020176
  items.push({ type: MessageItemType.TEXT, text_item: { text } });
@@ -1020149,12 +1020199,12 @@ async function sendMediaItems(params) {
1020149
1020199
  });
1020150
1020200
  } catch (err7) {
1020151
1020201
  logger8.error(
1020152
- `${label}: failed to=${to} clientId=${lastClientId} err=${String(err7)}`
1020202
+ `${label2}: failed to=${to} clientId=${lastClientId} err=${String(err7)}`
1020153
1020203
  );
1020154
1020204
  throw err7;
1020155
1020205
  }
1020156
1020206
  }
1020157
- logger8.info(`${label}: success to=${to} clientId=${lastClientId}`);
1020207
+ logger8.info(`${label2}: success to=${to} clientId=${lastClientId}`);
1020158
1020208
  return { messageId: lastClientId };
1020159
1020209
  }
1020160
1020210
  async function sendImageMessageWeixin(params) {
@@ -1022015,10 +1022065,10 @@ var require_main4 = __commonJS({
1022015
1022065
  var toCell = function(isBlack) {
1022016
1022066
  return isBlack ? black : white;
1022017
1022067
  };
1022018
- var repeat = function(color) {
1022068
+ var repeat = function(color3) {
1022019
1022069
  return {
1022020
1022070
  times: function(count) {
1022021
- return new Array(count).join(color);
1022071
+ return new Array(count).join(color3);
1022022
1022072
  }
1022023
1022073
  };
1022024
1022074
  };
@@ -1026697,12 +1026747,12 @@ var require_format_normaliser = __commonJS({
1026697
1026747
  let pxPos = 0;
1026698
1026748
  for (let y12 = 0; y12 < height; y12++) {
1026699
1026749
  for (let x14 = 0; x14 < width; x14++) {
1026700
- let color = palette[indata[pxPos]];
1026701
- if (!color) {
1026750
+ let color3 = palette[indata[pxPos]];
1026751
+ if (!color3) {
1026702
1026752
  throw new Error("index " + indata[pxPos] + " not in palette");
1026703
1026753
  }
1026704
1026754
  for (let i12 = 0; i12 < 4; i12++) {
1026705
- outdata[pxPos + i12] = color[i12];
1026755
+ outdata[pxPos + i12] = color3[i12];
1026706
1026756
  }
1026707
1026757
  pxPos += 4;
1026708
1026758
  }
@@ -1028131,9 +1028181,9 @@ var require_terminal2 = __commonJS({
1028131
1028181
  var require_svg_tag = __commonJS({
1028132
1028182
  "node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js"(exports2) {
1028133
1028183
  var Utils = require_utils12();
1028134
- function getColorAttrib(color, attrib) {
1028135
- const alpha = color.a / 255;
1028136
- const str3 = attrib + '="' + color.hex + '"';
1028184
+ function getColorAttrib(color3, attrib) {
1028185
+ const alpha = color3.a / 255;
1028186
+ const str3 = attrib + '="' + color3.hex + '"';
1028137
1028187
  return alpha < 1 ? str3 + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str3;
1028138
1028188
  }
1028139
1028189
  function svgCmd(cmd, x14, y12) {
@@ -1028586,7 +1028636,7 @@ function formatReport(grand, dateLabel, prevCounts, prevTotal, prevTime) {
1028586
1028636
  L9.push("");
1028587
1028637
  for (const cat of catOrder) {
1028588
1028638
  const items = byCat.get(cat) ?? [];
1028589
- const [emoji3, label] = CAT_INFO[cat] ?? ["\u{1F4E6}", cat.charAt(0).toUpperCase() + cat.slice(1)];
1028639
+ const [emoji3, label2] = CAT_INFO[cat] ?? ["\u{1F4E6}", cat.charAt(0).toUpperCase() + cat.slice(1)];
1028590
1028640
  const catTotal = items.reduce((s11, [, v15]) => s11 + v15, 0);
1028591
1028641
  const pct2 = (catTotal / total * 100).toFixed(0);
1028592
1028642
  const prevCatTotal = items.reduce((s11, [n6]) => s11 + (prevCounts[n6] ?? 0), 0);
@@ -1028595,7 +1028645,7 @@ function formatReport(grand, dateLabel, prevCounts, prevTotal, prevTime) {
1028595
1028645
  if (hasPrev && catDiff !== 0) {
1028596
1028646
  catDelta = catDiff > 0 ? ` +${catDiff}` : ` ${catDiff}`;
1028597
1028647
  }
1028598
- L9.push(`${emoji3} ${label} \u2014 ${catTotal} (${pct2}%)${catDelta}`);
1028648
+ L9.push(`${emoji3} ${label2} \u2014 ${catTotal} (${pct2}%)${catDelta}`);
1028599
1028649
  const sorted = [...items].sort((a11, b12) => b12[1] - a11[1]);
1028600
1028650
  for (const [name, cnt] of sorted) {
1028601
1028651
  const b12 = bar(cnt, mx);
@@ -1033994,14 +1034044,14 @@ async function processCycles(cycles, sdkTurnIndex, hasTranscript, sidecarIndex,
1033994
1034044
  }
1033995
1034045
  return { records, matched, unmatched, recoveryStats };
1033996
1034046
  }
1033997
- function printRecordStats(label, records, matched, unmatched, hasTranscript, filterStats) {
1034047
+ function printRecordStats(label2, records, matched, unmatched, hasTranscript, filterStats) {
1033998
1034048
  if (records.length === 0 && filterStats.input === 0)
1033999
1034049
  return;
1034000
1034050
  const totalTraj = records.reduce((sum, r12) => sum + r12.trajectory.length, 0);
1034001
1034051
  const withPrompts = records.filter((r12) => r12.prompt !== "heartbeat").length;
1034002
1034052
  const withInterrupts = records.filter((r12) => r12.has_interrupts).length;
1034003
1034053
  console.log(`
1034004
- ${label}:`);
1034054
+ ${label2}:`);
1034005
1034055
  console.log(` Records: ${records.length}`);
1034006
1034056
  if (filterStats.compactionOnly > 0) {
1034007
1034057
  console.log(` Compaction-only (filtered): ${filterStats.compactionOnly}`);
@@ -1034969,15 +1035019,15 @@ async function gunzipFile(gzPath) {
1034969
1035019
  await (0, import_promises27.pipeline)(input, (0, import_node_zlib7.createGunzip)(), output2);
1034970
1035020
  import_node_fs83.default.unlinkSync(gzPath);
1034971
1035021
  }
1034972
- async function gunzipDir(dir, label) {
1035022
+ async function gunzipDir(dir, label2) {
1034973
1035023
  for (const entry of import_node_fs83.default.readdirSync(dir, { withFileTypes: true })) {
1034974
1035024
  if (entry.isFile() && entry.name.endsWith(".jsonl.gz")) {
1034975
- console.log(` GUNZIP ${entry.name}${label ? ` in ${label}` : ""}`);
1035025
+ console.log(` GUNZIP ${entry.name}${label2 ? ` in ${label2}` : ""}`);
1034976
1035026
  await gunzipFile(import_node_path82.default.join(dir, entry.name));
1034977
1035027
  }
1034978
1035028
  if (entry.isDirectory()) {
1034979
1035029
  const subDir = import_node_path82.default.join(dir, entry.name);
1034980
- await gunzipDir(subDir, `${label ? label + "/" : ""}${entry.name}`);
1035030
+ await gunzipDir(subDir, `${label2 ? label2 + "/" : ""}${entry.name}`);
1034981
1035031
  }
1034982
1035032
  }
1034983
1035033
  }
@@ -1035007,8 +1035057,8 @@ async function extractAgent(baseDir, agent, force) {
1035007
1035057
  console.log(` SKIP ${folder}/ (already extracted)`);
1035008
1035058
  stats.skipped++;
1035009
1035059
  } else {
1035010
- const label = hasExtractedFiles(folderPath) ? "RE-EXTRACT" : "EXTRACT";
1035011
- console.log(` ${label} ${file2} -> ${folder}/`);
1035060
+ const label2 = hasExtractedFiles(folderPath) ? "RE-EXTRACT" : "EXTRACT";
1035061
+ console.log(` ${label2} ${file2} -> ${folder}/`);
1035012
1035062
  (0, import_node_child_process35.execSync)(`tar xzf "${archivePath}" -C "${folderPath}/"`, {
1035013
1035063
  stdio: "pipe"
1035014
1035064
  });
@@ -1035142,23 +1035192,23 @@ function resolveCliEntry() {
1035142
1035192
  function resolveProjectRoot() {
1035143
1035193
  return import_node_path83.default.resolve(import_node_path83.default.dirname(new URL(__importMetaUrl).pathname), "../..");
1035144
1035194
  }
1035145
- function processDir(dataDir, label, options3) {
1035195
+ function processDir(dataDir, label2, options3) {
1035146
1035196
  const logsDir = import_node_path83.default.join(dataDir, "logs");
1035147
1035197
  if (!hasExtractedLogs(logsDir)) {
1035148
- console.log(`SKIP: ${label} (no extracted logs \u2014 run extract-data first)`);
1035149
- return { label, status: "skipped", reason: "no logs" };
1035198
+ console.log(`SKIP: ${label2} (no extracted logs \u2014 run extract-data first)`);
1035199
+ return { label: label2, status: "skipped", reason: "no logs" };
1035150
1035200
  }
1035151
1035201
  const outputDir = import_node_path83.default.join(dataDir, "output");
1035152
1035202
  if (import_node_fs84.default.existsSync(outputDir) && !options3.force) {
1035153
- console.log(`SKIP: ${label} (output/ exists, use --force to re-process)`);
1035154
- return { label, status: "skipped", reason: "output exists" };
1035203
+ console.log(`SKIP: ${label2} (output/ exists, use --force to re-process)`);
1035204
+ return { label: label2, status: "skipped", reason: "output exists" };
1035155
1035205
  }
1035156
1035206
  if (import_node_fs84.default.existsSync(outputDir) && options3.force) {
1035157
1035207
  import_node_fs84.default.rmSync(outputDir, { recursive: true, force: true });
1035158
1035208
  }
1035159
1035209
  console.log("");
1035160
1035210
  console.log("==========================================");
1035161
- console.log(`Processing: ${label}`);
1035211
+ console.log(`Processing: ${label2}`);
1035162
1035212
  console.log("==========================================");
1035163
1035213
  try {
1035164
1035214
  const sinceArg = options3.since ? ` --since ${options3.since}` : "";
@@ -1035198,10 +1035248,10 @@ function processDir(dataDir, label, options3) {
1035198
1035248
  } else {
1035199
1035249
  console.log(" SKIP convert-openai-chat (no system-prompt.md)");
1035200
1035250
  }
1035201
- return { label, status: "succeeded" };
1035251
+ return { label: label2, status: "succeeded" };
1035202
1035252
  } catch (err7) {
1035203
- console.error(`FAILED: ${label} \u2014 ${err7 instanceof Error ? err7.message : String(err7)}`);
1035204
- return { label, status: "failed" };
1035253
+ console.error(`FAILED: ${label2} \u2014 ${err7 instanceof Error ? err7.message : String(err7)}`);
1035254
+ return { label: label2, status: "failed" };
1035205
1035255
  }
1035206
1035256
  }
1035207
1035257
  function parseBatchProcessArgs(args) {
@@ -1035644,14 +1035694,14 @@ function convertSubAgentTranscript(transcriptPath, parentUid, subagentIndex, des
1035644
1035694
  }
1035645
1035695
  }
1035646
1035696
  const lastMsg = chatMessages[chatMessages.length - 1];
1035647
- const success2 = lastMsg.role === "assistant" && !!lastMsg.content;
1035697
+ const success3 = lastMsg.role === "assistant" && !!lastMsg.content;
1035648
1035698
  return {
1035649
1035699
  uid: (0, import_node_crypto21.randomUUID)(),
1035650
1035700
  agent_type: "subagent",
1035651
1035701
  subagent_index: subagentIndex,
1035652
1035702
  parent_uid: parentUid,
1035653
1035703
  prompt: description,
1035654
- success: success2,
1035704
+ success: success3,
1035655
1035705
  messages: chatMessages
1035656
1035706
  };
1035657
1035707
  }
@@ -1038473,8 +1038523,8 @@ function redactRealtimeToolPayload(toolName, value) {
1038473
1038523
  }
1038474
1038524
  async function manageCalendar(config2, args) {
1038475
1038525
  const cal = getCalendarClient(config2);
1038476
- const action = args.action ?? "list_events";
1038477
- switch (action) {
1038526
+ const action2 = args.action ?? "list_events";
1038527
+ switch (action2) {
1038478
1038528
  case "list_events": {
1038479
1038529
  const timeMin = args.start ? requireIsoDateTime(args.start, "start") : /* @__PURE__ */ new Date();
1038480
1038530
  const timeMax = args.end ? requireIsoDateTime(args.end, "end") : new Date(timeMin.getTime() + 7 * 864e5);
@@ -1038534,13 +1038584,13 @@ async function manageCalendar(config2, args) {
1038534
1038584
  return (await cal.findFreeTime(timeMin, timeMax)).slice(0, clampInt(args.max_results, 1, 10, 5));
1038535
1038585
  }
1038536
1038586
  default:
1038537
- return { error: `Unknown calendar action: ${action}` };
1038587
+ return { error: `Unknown calendar action: ${action2}` };
1038538
1038588
  }
1038539
1038589
  }
1038540
1038590
  async function manageEmail(config2, args) {
1038541
1038591
  const email3 = getEmailClient(config2);
1038542
- const action = args.action ?? "list";
1038543
- switch (action) {
1038592
+ const action2 = args.action ?? "list";
1038593
+ switch (action2) {
1038544
1038594
  case "list": {
1038545
1038595
  const maxResults = clampInt(args.num, 1, 10, 5);
1038546
1038596
  const messages2 = await email3.listEmails({ label: "INBOX", unreadOnly: args.unread_only ?? false, maxResults });
@@ -1038553,7 +1038603,7 @@ async function manageEmail(config2, args) {
1038553
1038603
  return { sent: true, messageId: result.id, to: args.to, subject: args.subject };
1038554
1038604
  }
1038555
1038605
  default:
1038556
- return { error: `Unknown email action: ${action}` };
1038606
+ return { error: `Unknown email action: ${action2}` };
1038557
1038607
  }
1038558
1038608
  }
1038559
1038609
  function memory(args) {
@@ -1044579,18 +1044629,18 @@ function extractUsageFromStream(stream) {
1044579
1044629
  }
1044580
1044630
  function buildResultMessage(stream, config2) {
1044581
1044631
  const usage = stream.rawResponses?.at(-1)?.usage;
1044582
- const errorText = stream.error instanceof Error ? stream.error.message : stream.error ? JSON.stringify(stream.error) : "";
1044632
+ const errorText2 = stream.error instanceof Error ? stream.error.message : stream.error ? JSON.stringify(stream.error) : "";
1044583
1044633
  return {
1044584
1044634
  type: "result",
1044585
- subtype: errorText ? "error" : "success",
1044635
+ subtype: errorText2 ? "error" : "success",
1044586
1044636
  num_turns: 1,
1044587
1044637
  usage: {
1044588
1044638
  input_tokens: usage?.inputTokens ?? 0,
1044589
1044639
  output_tokens: usage?.outputTokens ?? 0
1044590
1044640
  },
1044591
1044641
  total_cost_usd: 0,
1044592
- is_error: Boolean(errorText),
1044593
- errors: errorText ? [errorText] : [],
1044642
+ is_error: Boolean(errorText2),
1044643
+ errors: errorText2 ? [errorText2] : [],
1044594
1044644
  model: getModelId(config2)
1044595
1044645
  };
1044596
1044646
  }
@@ -1045455,11 +1045505,11 @@ var ActivityTracker = class {
1045455
1045505
  * see the parent Task block; callers should always `recordSubagentStarted`
1045456
1045506
  * first when possible.
1045457
1045507
  */
1045458
- recordSubagentActivity(toolUseId, label) {
1045508
+ recordSubagentActivity(toolUseId, label2) {
1045459
1045509
  const entry = this.subagents.get(toolUseId);
1045460
1045510
  if (entry?.status !== "running")
1045461
1045511
  return;
1045462
- const truncated = label.length > SUBAGENT_ACTIVITY_LIMIT ? label.substring(0, SUBAGENT_ACTIVITY_LIMIT) + "\u2026" : label;
1045512
+ const truncated = label2.length > SUBAGENT_ACTIVITY_LIMIT ? label2.substring(0, SUBAGENT_ACTIVITY_LIMIT) + "\u2026" : label2;
1045463
1045513
  entry.lastActivity = truncated;
1045464
1045514
  entry.actionCount += 1;
1045465
1045515
  }
@@ -1045479,9 +1045529,9 @@ var ActivityTracker = class {
1045479
1045529
  if (typeof info.toolUses === "number" && Number.isFinite(info.toolUses)) {
1045480
1045530
  entry.actionCount = Math.max(entry.actionCount, info.toolUses);
1045481
1045531
  }
1045482
- const label = info.lastToolName ?? info.description;
1045483
- if (label && label.length > 0) {
1045484
- const truncated = label.length > SUBAGENT_ACTIVITY_LIMIT ? label.substring(0, SUBAGENT_ACTIVITY_LIMIT) + "\u2026" : label;
1045532
+ const label2 = info.lastToolName ?? info.description;
1045533
+ if (label2 && label2.length > 0) {
1045534
+ const truncated = label2.length > SUBAGENT_ACTIVITY_LIMIT ? label2.substring(0, SUBAGENT_ACTIVITY_LIMIT) + "\u2026" : label2;
1045485
1045535
  entry.lastActivity = truncated;
1045486
1045536
  }
1045487
1045537
  }
@@ -1045585,8 +1045635,8 @@ var ActivityTracker = class {
1045585
1045635
  lines.push("", "Recent conversation:");
1045586
1045636
  for (const e11 of this.recentExchanges) {
1045587
1045637
  const preview = e11.text.length > EXCHANGE_TEXT_LIMIT ? e11.text.substring(0, EXCHANGE_TEXT_LIMIT) + "\u2026" : e11.text;
1045588
- const label = e11.role === "user" ? "User" : "Agent";
1045589
- lines.push(` ${label}: ${preview}`);
1045638
+ const label2 = e11.role === "user" ? "User" : "Agent";
1045639
+ lines.push(` ${label2}: ${preview}`);
1045590
1045640
  }
1045591
1045641
  }
1045592
1045642
  if (this.streamingActivity) {
@@ -1045654,9 +1045704,9 @@ var ActivityTracker = class {
1045654
1045704
  };
1045655
1045705
  function formatSubagentLine(progress) {
1045656
1045706
  const elapsedSec = Math.round(((progress.completedAt ?? Date.now()) - progress.startedAt) / 1e3);
1045657
- const label = progress.subagentType ?? "subagent";
1045707
+ const label2 = progress.subagentType ?? "subagent";
1045658
1045708
  const statusIcon = progress.status === "running" ? "\u{1F504}" : progress.status === "completed" ? "\u2705" : "\u274C";
1045659
- const parts = [`${statusIcon} ${label}`];
1045709
+ const parts = [`${statusIcon} ${label2}`];
1045660
1045710
  parts.push(`(${elapsedSec}s, ${progress.actionCount} step${progress.actionCount === 1 ? "" : "s"})`);
1045661
1045711
  if (progress.description) {
1045662
1045712
  const desc = progress.description.length > 80 ? progress.description.substring(0, 80) + "\u2026" : progress.description;
@@ -1046734,10 +1046784,10 @@ async function transcribeVoiceMessages(messages2) {
1046734
1046784
  for (const att of audioAttachments) {
1046735
1046785
  tasks.push(transcribeAudioAttachment(att).then((transcript) => {
1046736
1046786
  if (transcript) {
1046737
- const label = msg.text ? `${msg.text}
1046787
+ const label2 = msg.text ? `${msg.text}
1046738
1046788
 
1046739
1046789
  [Voice message transcription]: ${transcript}` : `[Voice message transcription]: ${transcript}`;
1046740
- msg.text = label;
1046790
+ msg.text = label2;
1046741
1046791
  logger.log("info", "transcribe", `Transcribed voice message from ${msg.sender}`, {
1046742
1046792
  channel: msg.channel,
1046743
1046793
  sender: msg.sender,
@@ -1047721,8 +1047771,8 @@ function registerCommandHandlers(deps) {
1047721
1047771
  channelManager.on("silent_mode_request", (req) => {
1047722
1047772
  ownerConfig.silentCompaction = req.enabled;
1047723
1047773
  saveOwnerConfig(ownerConfig);
1047724
- const label = req.enabled ? "on" : "off";
1047725
- logger.system(`Silent compaction mode set to ${label} by ${req.sender} via ${req.channel}`);
1047774
+ const label2 = req.enabled ? "on" : "off";
1047775
+ logger.system(`Silent compaction mode set to ${label2} by ${req.sender} via ${req.channel}`);
1047726
1047776
  channelManager.sendMessage(req.channel, req.sender, req.enabled ? t11("cmd.silent.on", getLocale()) : t11("cmd.silent.off", getLocale())).catch((err7) => {
1047727
1047777
  logger.warn(`Failed to send silent mode confirmation: ${err7 instanceof Error ? err7.message : String(err7)}`);
1047728
1047778
  });
@@ -1047994,8 +1048044,8 @@ ${portal.portalUrl}`);
1047994
1048044
  lines.push("");
1047995
1048045
  lines.push(t11("cmd.tasks.recent_steps", getLocale()));
1047996
1048046
  const last5 = recentActions.slice(-5);
1047997
- for (const action of last5) {
1047998
- lines.push(` ${action}`);
1048047
+ for (const action2 of last5) {
1048048
+ lines.push(` ${action2}`);
1047999
1048049
  }
1048000
1048050
  }
1048001
1048051
  if (subagents.length > 0) {
@@ -1048784,9 +1048834,9 @@ function createUpgradeBetaHandler() {
1048784
1048834
  }
1048785
1048835
  function createUpgradeHandlerWithOptions(defaults2) {
1048786
1048836
  return async (commandId, _payload) => {
1048787
- const label = defaults2?.beta ? "upgrade-beta" : defaults2?.tag ? `upgrade-${defaults2.tag}` : "upgrade";
1048837
+ const label2 = defaults2?.beta ? "upgrade-beta" : defaults2?.tag ? `upgrade-${defaults2.tag}` : "upgrade";
1048788
1048838
  try {
1048789
- logger.system(`[upgrade-handler] Received remote ${label} command`);
1048839
+ logger.system(`[upgrade-handler] Received remote ${label2} command`);
1048790
1048840
  const result = await performUpgrade(defaults2);
1048791
1048841
  logger.system(`[upgrade-handler] ${result.message}`);
1048792
1048842
  if (result.ok) {
@@ -1048798,7 +1048848,7 @@ function createUpgradeHandlerWithOptions(defaults2) {
1048798
1048848
  };
1048799
1048849
  } catch (err7) {
1048800
1048850
  const errMsg = err7 instanceof Error ? err7.message : String(err7);
1048801
- logger.err(`[upgrade-handler] ${label} failed: ${errMsg}`);
1048851
+ logger.err(`[upgrade-handler] ${label2} failed: ${errMsg}`);
1048802
1048852
  return {
1048803
1048853
  status: "failed",
1048804
1048854
  result: JSON.stringify({ error: errMsg })
@@ -1050623,8 +1050673,8 @@ async function processAgentStream(queryStream, session, activityTracker, session
1050623
1050673
  const evtType = evt.type;
1050624
1050674
  if (evtType === "content_block_start") {
1050625
1050675
  const cb2 = evt.content_block;
1050626
- const label = cb2?.type === "tool_use" ? cb2.name ?? "tool_use" : cb2?.type ?? "content";
1050627
- activityTracker.startStreamingBlock(label);
1050676
+ const label2 = cb2?.type === "tool_use" ? cb2.name ?? "tool_use" : cb2?.type ?? "content";
1050677
+ activityTracker.startStreamingBlock(label2);
1050628
1050678
  } else if (evtType === "content_block_delta") {
1050629
1050679
  const delta = evt.delta;
1050630
1050680
  const chars = (delta?.text ?? delta?.partial_json ?? "").length;
@@ -1050937,16 +1050987,16 @@ var WakeCycleRunner = class {
1050937
1050987
  lines.push("");
1050938
1050988
  lines.push(`Completed (${completed.length}):`);
1050939
1050989
  for (const s11 of completed) {
1050940
- const label = s11.description ?? s11.subagentType ?? s11.toolUseId;
1050990
+ const label2 = s11.description ?? s11.subagentType ?? s11.toolUseId;
1050941
1050991
  const icon = s11.status === "completed" ? "\u2705" : "\u274C";
1050942
- lines.push(` ${icon} ${label}`);
1050992
+ lines.push(` ${icon} ${label2}`);
1050943
1050993
  }
1050944
1050994
  }
1050945
1050995
  lines.push("");
1050946
1050996
  lines.push(`Still running (${stillRunning.length}):`);
1050947
1050997
  for (const s11 of stillRunning) {
1050948
- const label = s11.description ?? s11.subagentType ?? s11.toolUseId;
1050949
- lines.push(` \u23F3 ${label}`);
1050998
+ const label2 = s11.description ?? s11.subagentType ?? s11.toolUseId;
1050999
+ lines.push(` \u23F3 ${label2}`);
1050950
1051000
  }
1050951
1051001
  lines.push("");
1050952
1051002
  lines.push("The results may still arrive. You can ask me to check and compile them later.");
@@ -1053689,10 +1053739,10 @@ function startInjectorProcess(binPath, onExit) {
1053689
1053739
  });
1053690
1053740
  return proc;
1053691
1053741
  }
1053692
- function killProcess(proc, label) {
1053742
+ function killProcess(proc, label2) {
1053693
1053743
  if (!proc)
1053694
1053744
  return;
1053695
- logger.debug(`Stopping ${label}...`);
1053745
+ logger.debug(`Stopping ${label2}...`);
1053696
1053746
  proc.stdin?.end();
1053697
1053747
  proc.kill("SIGTERM");
1053698
1053748
  }
@@ -1054082,18 +1054132,18 @@ var StreamManager = class _StreamManager {
1054082
1054132
  handleAction(data2) {
1054083
1054133
  if (data2.length < 2)
1054084
1054134
  return;
1054085
- const action = data2.subarray(1).toString("utf-8");
1054086
- if (!_StreamManager.VALID_ACTIONS.has(action)) {
1054087
- logger.debug(`[rdp] Unknown action: ${action}`);
1054135
+ const action2 = data2.subarray(1).toString("utf-8");
1054136
+ if (!_StreamManager.VALID_ACTIONS.has(action2)) {
1054137
+ logger.debug(`[rdp] Unknown action: ${action2}`);
1054088
1054138
  return;
1054089
1054139
  }
1054090
- logger.system(`[rdp] Action: ${action}`);
1054140
+ logger.system(`[rdp] Action: ${action2}`);
1054091
1054141
  const stdin = this.injectorProc?.stdin;
1054092
1054142
  if (!stdin?.writable) {
1054093
1054143
  logger.err("[rdp] Cannot execute action: input-injector not running");
1054094
1054144
  return;
1054095
1054145
  }
1054096
- stdin.write(`action ${action}
1054146
+ stdin.write(`action ${action2}
1054097
1054147
  `);
1054098
1054148
  }
1054099
1054149
  // -------------------------------------------------------------------------