@funnycode/myclaude 0.1.114 → 0.1.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/myclaude.js CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.114",
8
- BUILD_TIME: "2026-07-21T15:25:32.406Z",
7
+ VERSION: "0.1.115",
8
+ BUILD_TIME: "2026-07-21T18:00:14.161Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -15247,9 +15247,9 @@ var init_startupProfiler = __esm(() => {
15247
15247
  }
15248
15248
  });
15249
15249
 
15250
- // node_modules/@ant/claude-for-chrome-mcp/index.ts
15251
- var exports_claude_for_chrome_mcp = {};
15252
- __export(exports_claude_for_chrome_mcp, {
15250
+ // shims/ant-claude-for-chrome-mcp/index.ts
15251
+ var exports_ant_claude_for_chrome_mcp = {};
15252
+ __export(exports_ant_claude_for_chrome_mcp, {
15253
15253
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer,
15254
15254
  BROWSER_TOOLS: () => BROWSER_TOOLS
15255
15255
  });
@@ -15261,7 +15261,7 @@ function createClaudeForChromeMcpServer(_context) {
15261
15261
  };
15262
15262
  }
15263
15263
  var BROWSER_TOOLS;
15264
- var init_claude_for_chrome_mcp = __esm(() => {
15264
+ var init_ant_claude_for_chrome_mcp = __esm(() => {
15265
15265
  BROWSER_TOOLS = [];
15266
15266
  });
15267
15267
 
@@ -117115,7 +117115,7 @@ var package_default;
117115
117115
  var init_package = __esm(() => {
117116
117116
  package_default = {
117117
117117
  name: "@funnycode/myclaude",
117118
- version: "0.1.114",
117118
+ version: "0.1.115",
117119
117119
  private: false,
117120
117120
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117121
117121
  license: "MIT",
@@ -149731,7 +149731,7 @@ async function initialize() {
149731
149731
  return true;
149732
149732
  },
149733
149733
  ignorePermissionErrors: true,
149734
- usePolling: false,
149734
+ usePolling: USE_POLLING,
149735
149735
  atomic: true
149736
149736
  });
149737
149737
  watcher.on("change", handleChange);
@@ -149927,7 +149927,7 @@ function resetForTesting(overrides) {
149927
149927
  watcher = null;
149928
149928
  return w ? w.close() : Promise.resolve();
149929
149929
  }
149930
- var FILE_STABILITY_THRESHOLD_MS = 1000, FILE_STABILITY_POLL_INTERVAL_MS = 500, INTERNAL_WRITE_WINDOW_MS = 5000, MDM_POLL_INTERVAL_MS, DELETION_GRACE_MS, watcher = null, mdmPollTimer = null, lastMdmSnapshot = null, initialized = false, disposed = false, pendingDeletions, settingsChanged, testOverrides = null, subscribe, settingsChangeDetector;
149930
+ var USE_POLLING, FILE_STABILITY_THRESHOLD_MS = 1000, FILE_STABILITY_POLL_INTERVAL_MS = 500, INTERNAL_WRITE_WINDOW_MS = 5000, MDM_POLL_INTERVAL_MS, DELETION_GRACE_MS, watcher = null, mdmPollTimer = null, lastMdmSnapshot = null, initialized = false, disposed = false, pendingDeletions, settingsChanged, testOverrides = null, subscribe, settingsChangeDetector;
149931
149931
  var init_changeDetector = __esm(() => {
149932
149932
  init_chokidar();
149933
149933
  init_state();
@@ -149942,6 +149942,7 @@ var init_changeDetector = __esm(() => {
149942
149942
  init_settings();
149943
149943
  init_settings2();
149944
149944
  init_settingsCache();
149945
+ USE_POLLING = typeof Bun !== "undefined" || process.platform === "win32";
149945
149946
  MDM_POLL_INTERVAL_MS = 30 * 60 * 1000;
149946
149947
  DELETION_GRACE_MS = FILE_STABILITY_THRESHOLD_MS + FILE_STABILITY_POLL_INTERVAL_MS + 200;
149947
149948
  pendingDeletions = new Map;
@@ -296438,7 +296439,7 @@ var init_client6 = __esm(() => {
296438
296439
  logMCPDebug(name, `claude.ai proxy transport created successfully`);
296439
296440
  } else if ((serverRef.type === "stdio" || !serverRef.type) && isClaudeInChromeMCPServer(name)) {
296440
296441
  const { createChromeContext } = await Promise.resolve().then(() => (init_mcpServer(), exports_mcpServer));
296441
- const { createClaudeForChromeMcpServer: createClaudeForChromeMcpServer2 } = await Promise.resolve().then(() => (init_claude_for_chrome_mcp(), exports_claude_for_chrome_mcp));
296442
+ const { createClaudeForChromeMcpServer: createClaudeForChromeMcpServer2 } = await Promise.resolve().then(() => (init_ant_claude_for_chrome_mcp(), exports_ant_claude_for_chrome_mcp));
296442
296443
  const { createLinkedTransportPair: createLinkedTransportPair2 } = await Promise.resolve().then(() => exports_InProcessTransport);
296443
296444
  const context = createChromeContext(serverRef.env);
296444
296445
  inProcessServer = createClaudeForChromeMcpServer2(context);
@@ -342102,7 +342103,8 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
342102
342103
  } else {
342103
342104
  let logs2 = null;
342104
342105
  try {
342105
- logs2 = await fetchSessionLogsFromUrl(sessionId, url3, headers);
342106
+ const seq = getOrCreateSequential(sessionId);
342107
+ logs2 = await seq(sessionId, url3, headers, true);
342106
342108
  } catch (fetchError) {
342107
342109
  logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
342108
342110
  logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
@@ -363354,7 +363356,7 @@ var init_color_diff = __esm(() => {
363354
363356
  };
363355
363357
  });
363356
363358
 
363357
- // node_modules/color-diff-napi/index.ts
363359
+ // shims/color-diff-napi/index.ts
363358
363360
  var init_color_diff_napi = __esm(() => {
363359
363361
  init_color_diff();
363360
363362
  });
@@ -409202,7 +409204,7 @@ function prewarm() {
409202
409204
  var cachedModule = null;
409203
409205
  var init_modifiers_napi_src = () => {};
409204
409206
 
409205
- // node_modules/modifiers-napi/index.ts
409207
+ // shims/modifiers-napi/index.ts
409206
409208
  var exports_modifiers_napi = {};
409207
409209
  __export(exports_modifiers_napi, {
409208
409210
  prewarm: () => prewarm,
@@ -483868,7 +483870,7 @@ async function isChromeExtensionInstalled() {
483868
483870
  }
483869
483871
  var CHROME_EXTENSION_RECONNECT_URL = "https://clau.de/chrome/reconnect", NATIVE_HOST_IDENTIFIER = "com.anthropic.claude_code_browser_extension", NATIVE_HOST_MANIFEST_NAME, shouldAutoEnable = undefined;
483870
483872
  var init_setup2 = __esm(() => {
483871
- init_claude_for_chrome_mcp();
483873
+ init_ant_claude_for_chrome_mcp();
483872
483874
  init_state();
483873
483875
  init_growthbook();
483874
483876
  init_config();
@@ -505925,7 +505927,7 @@ class DebugLogger {
505925
505927
  }
505926
505928
  var EXTENSION_DOWNLOAD_URL = "https://claude.ai/chrome", BUG_REPORT_URL = "https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome", SAFE_BRIDGE_STRING_KEYS, PERMISSION_MODES4;
505927
505929
  var init_mcpServer = __esm(() => {
505928
- init_claude_for_chrome_mcp();
505930
+ init_ant_claude_for_chrome_mcp();
505929
505931
  init_stdio2();
505930
505932
  init_datadog();
505931
505933
  init_firstPartyEventLogger();
@@ -506367,7 +506369,7 @@ var require_argument = __commonJS((exports) => {
506367
506369
  this._name = name;
506368
506370
  break;
506369
506371
  }
506370
- if (this._name.length > 3 && this._name.slice(-3) === "...") {
506372
+ if (this._name.endsWith("...")) {
506371
506373
  this.variadic = true;
506372
506374
  this._name = this._name.slice(0, -3);
506373
506375
  }
@@ -506375,11 +506377,12 @@ var require_argument = __commonJS((exports) => {
506375
506377
  name() {
506376
506378
  return this._name;
506377
506379
  }
506378
- _concatValue(value, previous) {
506380
+ _collectValue(value, previous) {
506379
506381
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506380
506382
  return [value];
506381
506383
  }
506382
- return previous.concat(value);
506384
+ previous.push(value);
506385
+ return previous;
506383
506386
  }
506384
506387
  default(value, description) {
506385
506388
  this.defaultValue = value;
@@ -506397,7 +506400,7 @@ var require_argument = __commonJS((exports) => {
506397
506400
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506398
506401
  }
506399
506402
  if (this.variadic) {
506400
- return this._concatValue(arg, previous);
506403
+ return this._collectValue(arg, previous);
506401
506404
  }
506402
506405
  return arg;
506403
506406
  };
@@ -506562,7 +506565,11 @@ var require_help = __commonJS((exports) => {
506562
506565
  extraInfo.push(`env: ${option.envVar}`);
506563
506566
  }
506564
506567
  if (extraInfo.length > 0) {
506565
- return `${option.description} (${extraInfo.join(", ")})`;
506568
+ const extraDescription = `(${extraInfo.join(", ")})`;
506569
+ if (option.description) {
506570
+ return `${option.description} ${extraDescription}`;
506571
+ }
506572
+ return extraDescription;
506566
506573
  }
506567
506574
  return option.description;
506568
506575
  }
@@ -506583,6 +506590,27 @@ var require_help = __commonJS((exports) => {
506583
506590
  }
506584
506591
  return argument.description;
506585
506592
  }
506593
+ formatItemList(heading, items, helper) {
506594
+ if (items.length === 0)
506595
+ return [];
506596
+ return [helper.styleTitle(heading), ...items, ""];
506597
+ }
506598
+ groupItems(unsortedItems, visibleItems, getGroup) {
506599
+ const result = new Map;
506600
+ unsortedItems.forEach((item) => {
506601
+ const group = getGroup(item);
506602
+ if (!result.has(group))
506603
+ result.set(group, []);
506604
+ });
506605
+ visibleItems.forEach((item) => {
506606
+ const group = getGroup(item);
506607
+ if (!result.has(group)) {
506608
+ result.set(group, []);
506609
+ }
506610
+ result.get(group).push(item);
506611
+ });
506612
+ return result;
506613
+ }
506586
506614
  formatHelp(cmd, helper) {
506587
506615
  const termWidth = helper.padWidth(cmd, helper);
506588
506616
  const helpWidth = helper.helpWidth ?? 80;
@@ -506603,45 +506631,27 @@ var require_help = __commonJS((exports) => {
506603
506631
  const argumentList = helper.visibleArguments(cmd).map((argument) => {
506604
506632
  return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
506605
506633
  });
506606
- if (argumentList.length > 0) {
506607
- output = output.concat([
506608
- helper.styleTitle("Arguments:"),
506609
- ...argumentList,
506610
- ""
506611
- ]);
506612
- }
506613
- const optionList = helper.visibleOptions(cmd).map((option) => {
506614
- return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506634
+ output = output.concat(this.formatItemList("Arguments:", argumentList, helper));
506635
+ const optionGroups = this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => option.helpGroupHeading ?? "Options:");
506636
+ optionGroups.forEach((options, group) => {
506637
+ const optionList = options.map((option) => {
506638
+ return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506639
+ });
506640
+ output = output.concat(this.formatItemList(group, optionList, helper));
506615
506641
  });
506616
- if (optionList.length > 0) {
506617
- output = output.concat([
506618
- helper.styleTitle("Options:"),
506619
- ...optionList,
506620
- ""
506621
- ]);
506622
- }
506623
506642
  if (helper.showGlobalOptions) {
506624
506643
  const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
506625
506644
  return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506626
506645
  });
506627
- if (globalOptionList.length > 0) {
506628
- output = output.concat([
506629
- helper.styleTitle("Global Options:"),
506630
- ...globalOptionList,
506631
- ""
506632
- ]);
506633
- }
506646
+ output = output.concat(this.formatItemList("Global Options:", globalOptionList, helper));
506634
506647
  }
506635
- const commandList = helper.visibleCommands(cmd).map((cmd2) => {
506636
- return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(cmd2)), helper.styleSubcommandDescription(helper.subcommandDescription(cmd2)));
506648
+ const commandGroups = this.groupItems(cmd.commands, helper.visibleCommands(cmd), (sub) => sub.helpGroup() || "Commands:");
506649
+ commandGroups.forEach((commands, group) => {
506650
+ const commandList = commands.map((sub) => {
506651
+ return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(sub)), helper.styleSubcommandDescription(helper.subcommandDescription(sub)));
506652
+ });
506653
+ output = output.concat(this.formatItemList(group, commandList, helper));
506637
506654
  });
506638
- if (commandList.length > 0) {
506639
- output = output.concat([
506640
- helper.styleTitle("Commands:"),
506641
- ...commandList,
506642
- ""
506643
- ]);
506644
- }
506645
506655
  return output.join(`
506646
506656
  `);
506647
506657
  }
@@ -506798,6 +506808,7 @@ var require_option = __commonJS((exports) => {
506798
506808
  this.argChoices = undefined;
506799
506809
  this.conflictsWith = [];
506800
506810
  this.implied = undefined;
506811
+ this.helpGroupHeading = undefined;
506801
506812
  }
506802
506813
  default(value, description) {
506803
506814
  this.defaultValue = value;
@@ -506836,11 +506847,12 @@ var require_option = __commonJS((exports) => {
506836
506847
  this.hidden = !!hide;
506837
506848
  return this;
506838
506849
  }
506839
- _concatValue(value, previous) {
506850
+ _collectValue(value, previous) {
506840
506851
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506841
506852
  return [value];
506842
506853
  }
506843
- return previous.concat(value);
506854
+ previous.push(value);
506855
+ return previous;
506844
506856
  }
506845
506857
  choices(values3) {
506846
506858
  this.argChoices = values3.slice();
@@ -506849,7 +506861,7 @@ var require_option = __commonJS((exports) => {
506849
506861
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506850
506862
  }
506851
506863
  if (this.variadic) {
506852
- return this._concatValue(arg, previous);
506864
+ return this._collectValue(arg, previous);
506853
506865
  }
506854
506866
  return arg;
506855
506867
  };
@@ -506867,6 +506879,10 @@ var require_option = __commonJS((exports) => {
506867
506879
  }
506868
506880
  return camelcase(this.name());
506869
506881
  }
506882
+ helpGroup(heading) {
506883
+ this.helpGroupHeading = heading;
506884
+ return this;
506885
+ }
506870
506886
  is(arg) {
506871
506887
  return this.short === arg || this.long === arg;
506872
506888
  }
@@ -507084,6 +507100,9 @@ var require_command = __commonJS((exports) => {
507084
507100
  this._addImplicitHelpCommand = undefined;
507085
507101
  this._helpCommand = undefined;
507086
507102
  this._helpConfiguration = {};
507103
+ this._helpGroupHeading = undefined;
507104
+ this._defaultCommandGroup = undefined;
507105
+ this._defaultOptionGroup = undefined;
507087
507106
  }
507088
507107
  copyInheritedSettings(sourceCommand) {
507089
507108
  this._outputConfiguration = sourceCommand._outputConfiguration;
@@ -507148,7 +507167,10 @@ var require_command = __commonJS((exports) => {
507148
507167
  configureOutput(configuration) {
507149
507168
  if (configuration === undefined)
507150
507169
  return this._outputConfiguration;
507151
- Object.assign(this._outputConfiguration, configuration);
507170
+ this._outputConfiguration = {
507171
+ ...this._outputConfiguration,
507172
+ ...configuration
507173
+ };
507152
507174
  return this;
507153
507175
  }
507154
507176
  showHelpAfterError(displayHelp = true) {
@@ -507179,12 +507201,12 @@ var require_command = __commonJS((exports) => {
507179
507201
  createArgument(name, description) {
507180
507202
  return new Argument(name, description);
507181
507203
  }
507182
- argument(name, description, fn, defaultValue) {
507204
+ argument(name, description, parseArg, defaultValue) {
507183
507205
  const argument = this.createArgument(name, description);
507184
- if (typeof fn === "function") {
507185
- argument.default(defaultValue).argParser(fn);
507206
+ if (typeof parseArg === "function") {
507207
+ argument.default(defaultValue).argParser(parseArg);
507186
507208
  } else {
507187
- argument.default(fn);
507209
+ argument.default(parseArg);
507188
507210
  }
507189
507211
  this.addArgument(argument);
507190
507212
  return this;
@@ -507197,7 +507219,7 @@ var require_command = __commonJS((exports) => {
507197
507219
  }
507198
507220
  addArgument(argument) {
507199
507221
  const previousArgument = this.registeredArguments.slice(-1)[0];
507200
- if (previousArgument && previousArgument.variadic) {
507222
+ if (previousArgument?.variadic) {
507201
507223
  throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
507202
507224
  }
507203
507225
  if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
@@ -507209,10 +507231,13 @@ var require_command = __commonJS((exports) => {
507209
507231
  helpCommand(enableOrNameAndArgs, description) {
507210
507232
  if (typeof enableOrNameAndArgs === "boolean") {
507211
507233
  this._addImplicitHelpCommand = enableOrNameAndArgs;
507234
+ if (enableOrNameAndArgs && this._defaultCommandGroup) {
507235
+ this._initCommandGroup(this._getHelpCommand());
507236
+ }
507212
507237
  return this;
507213
507238
  }
507214
- enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
507215
- const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
507239
+ const nameAndArgs = enableOrNameAndArgs ?? "help [command]";
507240
+ const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);
507216
507241
  const helpDescription = description ?? "display help for command";
507217
507242
  const helpCommand = this.createCommand(helpName);
507218
507243
  helpCommand.helpOption(false);
@@ -507222,6 +507247,8 @@ var require_command = __commonJS((exports) => {
507222
507247
  helpCommand.description(helpDescription);
507223
507248
  this._addImplicitHelpCommand = true;
507224
507249
  this._helpCommand = helpCommand;
507250
+ if (enableOrNameAndArgs || description)
507251
+ this._initCommandGroup(helpCommand);
507225
507252
  return this;
507226
507253
  }
507227
507254
  addHelpCommand(helpCommand, deprecatedDescription) {
@@ -507231,6 +507258,7 @@ var require_command = __commonJS((exports) => {
507231
507258
  }
507232
507259
  this._addImplicitHelpCommand = true;
507233
507260
  this._helpCommand = helpCommand;
507261
+ this._initCommandGroup(helpCommand);
507234
507262
  return this;
507235
507263
  }
507236
507264
  _getHelpCommand() {
@@ -507310,6 +507338,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507310
507338
  throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
507311
507339
  - already used by option '${matchingOption.flags}'`);
507312
507340
  }
507341
+ this._initOptionGroup(option);
507313
507342
  this.options.push(option);
507314
507343
  }
507315
507344
  _registerCommand(command8) {
@@ -507322,6 +507351,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507322
507351
  const newCmd = knownBy(command8).join("|");
507323
507352
  throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
507324
507353
  }
507354
+ this._initCommandGroup(command8);
507325
507355
  this.commands.push(command8);
507326
507356
  }
507327
507357
  addOption(option) {
@@ -507344,7 +507374,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507344
507374
  if (val !== null && option.parseArg) {
507345
507375
  val = this._callParseArg(option, val, oldValue, invalidValueMessage);
507346
507376
  } else if (val !== null && option.variadic) {
507347
- val = option._concatValue(val, oldValue);
507377
+ val = option._collectValue(val, oldValue);
507348
507378
  }
507349
507379
  if (val == null) {
507350
507380
  if (option.negate) {
@@ -507719,7 +507749,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507719
507749
  this.processedArgs = processedArgs;
507720
507750
  }
507721
507751
  _chainOrCall(promise3, fn) {
507722
- if (promise3 && promise3.then && typeof promise3.then === "function") {
507752
+ if (promise3?.then && typeof promise3.then === "function") {
507723
507753
  return promise3.then(() => fn());
507724
507754
  }
507725
507755
  return fn();
@@ -507796,7 +507826,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507796
507826
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
507797
507827
  return promiseChain;
507798
507828
  }
507799
- if (this.parent && this.parent.listenerCount(commandEvent)) {
507829
+ if (this.parent?.listenerCount(commandEvent)) {
507800
507830
  checkForUnknownOptions();
507801
507831
  this._processArguments();
507802
507832
  this.parent.emit(commandEvent, operands, unknown3);
@@ -507858,24 +507888,31 @@ Expecting one of '${allowedValues.join("', '")}'`);
507858
507888
  cmd._checkForConflictingLocalOptions();
507859
507889
  });
507860
507890
  }
507861
- parseOptions(argv) {
507891
+ parseOptions(args) {
507862
507892
  const operands = [];
507863
507893
  const unknown3 = [];
507864
507894
  let dest = operands;
507865
- const args = argv.slice();
507866
507895
  function maybeOption(arg) {
507867
507896
  return arg.length > 1 && arg[0] === "-";
507868
507897
  }
507898
+ const negativeNumberArg = (arg) => {
507899
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg))
507900
+ return false;
507901
+ return !this._getCommandAndAncestors().some((cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short)));
507902
+ };
507869
507903
  let activeVariadicOption = null;
507870
- while (args.length) {
507871
- const arg = args.shift();
507904
+ let activeGroup = null;
507905
+ let i3 = 0;
507906
+ while (i3 < args.length || activeGroup) {
507907
+ const arg = activeGroup ?? args[i3++];
507908
+ activeGroup = null;
507872
507909
  if (arg === "--") {
507873
507910
  if (dest === unknown3)
507874
507911
  dest.push(arg);
507875
- dest.push(...args);
507912
+ dest.push(...args.slice(i3));
507876
507913
  break;
507877
507914
  }
507878
- if (activeVariadicOption && !maybeOption(arg)) {
507915
+ if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
507879
507916
  this.emit(`option:${activeVariadicOption.name()}`, arg);
507880
507917
  continue;
507881
507918
  }
@@ -507884,14 +507921,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
507884
507921
  const option = this._findOption(arg);
507885
507922
  if (option) {
507886
507923
  if (option.required) {
507887
- const value = args.shift();
507924
+ const value = args[i3++];
507888
507925
  if (value === undefined)
507889
507926
  this.optionMissingArgument(option);
507890
507927
  this.emit(`option:${option.name()}`, value);
507891
507928
  } else if (option.optional) {
507892
507929
  let value = null;
507893
- if (args.length > 0 && !maybeOption(args[0])) {
507894
- value = args.shift();
507930
+ if (i3 < args.length && (!maybeOption(args[i3]) || negativeNumberArg(args[i3]))) {
507931
+ value = args[i3++];
507895
507932
  }
507896
507933
  this.emit(`option:${option.name()}`, value);
507897
507934
  } else {
@@ -507908,7 +507945,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507908
507945
  this.emit(`option:${option.name()}`, arg.slice(2));
507909
507946
  } else {
507910
507947
  this.emit(`option:${option.name()}`);
507911
- args.unshift(`-${arg.slice(2)}`);
507948
+ activeGroup = `-${arg.slice(2)}`;
507912
507949
  }
507913
507950
  continue;
507914
507951
  }
@@ -507921,31 +507958,24 @@ Expecting one of '${allowedValues.join("', '")}'`);
507921
507958
  continue;
507922
507959
  }
507923
507960
  }
507924
- if (maybeOption(arg)) {
507961
+ if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
507925
507962
  dest = unknown3;
507926
507963
  }
507927
507964
  if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown3.length === 0) {
507928
507965
  if (this._findCommand(arg)) {
507929
507966
  operands.push(arg);
507930
- if (args.length > 0)
507931
- unknown3.push(...args);
507967
+ unknown3.push(...args.slice(i3));
507932
507968
  break;
507933
507969
  } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
507934
- operands.push(arg);
507935
- if (args.length > 0)
507936
- operands.push(...args);
507970
+ operands.push(arg, ...args.slice(i3));
507937
507971
  break;
507938
507972
  } else if (this._defaultCommandName) {
507939
- unknown3.push(arg);
507940
- if (args.length > 0)
507941
- unknown3.push(...args);
507973
+ unknown3.push(arg, ...args.slice(i3));
507942
507974
  break;
507943
507975
  }
507944
507976
  }
507945
507977
  if (this._passThroughOptions) {
507946
- dest.push(arg);
507947
- if (args.length > 0)
507948
- dest.push(...args);
507978
+ dest.push(arg, ...args.slice(i3));
507949
507979
  break;
507950
507980
  }
507951
507981
  dest.push(arg);
@@ -508156,6 +508186,32 @@ Expecting one of '${allowedValues.join("', '")}'`);
508156
508186
  this._name = str2;
508157
508187
  return this;
508158
508188
  }
508189
+ helpGroup(heading) {
508190
+ if (heading === undefined)
508191
+ return this._helpGroupHeading ?? "";
508192
+ this._helpGroupHeading = heading;
508193
+ return this;
508194
+ }
508195
+ commandsGroup(heading) {
508196
+ if (heading === undefined)
508197
+ return this._defaultCommandGroup ?? "";
508198
+ this._defaultCommandGroup = heading;
508199
+ return this;
508200
+ }
508201
+ optionsGroup(heading) {
508202
+ if (heading === undefined)
508203
+ return this._defaultOptionGroup ?? "";
508204
+ this._defaultOptionGroup = heading;
508205
+ return this;
508206
+ }
508207
+ _initOptionGroup(option) {
508208
+ if (this._defaultOptionGroup && !option.helpGroupHeading)
508209
+ option.helpGroup(this._defaultOptionGroup);
508210
+ }
508211
+ _initCommandGroup(cmd) {
508212
+ if (this._defaultCommandGroup && !cmd.helpGroup())
508213
+ cmd.helpGroup(this._defaultCommandGroup);
508214
+ }
508159
508215
  nameFromFilename(filename) {
508160
508216
  this._name = path25.basename(filename, path25.extname(filename));
508161
508217
  return this;
@@ -508232,15 +508288,19 @@ Expecting one of '${allowedValues.join("', '")}'`);
508232
508288
  helpOption(flags, description) {
508233
508289
  if (typeof flags === "boolean") {
508234
508290
  if (flags) {
508235
- this._helpOption = this._helpOption ?? undefined;
508291
+ if (this._helpOption === null)
508292
+ this._helpOption = undefined;
508293
+ if (this._defaultOptionGroup) {
508294
+ this._initOptionGroup(this._getHelpOption());
508295
+ }
508236
508296
  } else {
508237
508297
  this._helpOption = null;
508238
508298
  }
508239
508299
  return this;
508240
508300
  }
508241
- flags = flags ?? "-h, --help";
508242
- description = description ?? "display help for command";
508243
- this._helpOption = this.createOption(flags, description);
508301
+ this._helpOption = this.createOption(flags ?? "-h, --help", description ?? "display help for command");
508302
+ if (flags || description)
508303
+ this._initOptionGroup(this._helpOption);
508244
508304
  return this;
508245
508305
  }
508246
508306
  _getHelpOption() {
@@ -508251,6 +508311,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
508251
508311
  }
508252
508312
  addHelpOption(option) {
508253
508313
  this._helpOption = option;
508314
+ this._initOptionGroup(option);
508254
508315
  return this;
508255
508316
  }
508256
508317
  help(contextOptions) {
@@ -542613,7 +542674,7 @@ async function initialize4() {
542613
542674
  return path27.split(platformPath2.sep).some((dir) => dir === ".git");
542614
542675
  },
542615
542676
  ignorePermissionErrors: true,
542616
- usePolling: USE_POLLING,
542677
+ usePolling: USE_POLLING2,
542617
542678
  interval: testOverrides2?.chokidarInterval ?? POLLING_INTERVAL_MS,
542618
542679
  atomic: true
542619
542680
  });
@@ -542726,7 +542787,7 @@ async function resetForTesting2(overrides) {
542726
542787
  disposed3 = false;
542727
542788
  testOverrides2 = overrides ?? null;
542728
542789
  }
542729
- var FILE_STABILITY_THRESHOLD_MS3 = 1000, FILE_STABILITY_POLL_INTERVAL_MS3 = 500, RELOAD_DEBOUNCE_MS = 300, POLLING_INTERVAL_MS = 2000, USE_POLLING, watcher4 = null, reloadTimer = null, pendingChangedPaths, initialized4 = false, disposed3 = false, dynamicSkillsCallbackRegistered = false, unregisterCleanup = null, skillsChanged, testOverrides2 = null, subscribe2, skillChangeDetector;
542790
+ var FILE_STABILITY_THRESHOLD_MS3 = 1000, FILE_STABILITY_POLL_INTERVAL_MS3 = 500, RELOAD_DEBOUNCE_MS = 300, POLLING_INTERVAL_MS = 2000, USE_POLLING2, watcher4 = null, reloadTimer = null, pendingChangedPaths, initialized4 = false, disposed3 = false, dynamicSkillsCallbackRegistered = false, unregisterCleanup = null, skillsChanged, testOverrides2 = null, subscribe2, skillChangeDetector;
542730
542791
  var init_skillChangeDetector = __esm(() => {
542731
542792
  init_chokidar();
542732
542793
  init_state();
@@ -542738,7 +542799,7 @@ var init_skillChangeDetector = __esm(() => {
542738
542799
  init_debug();
542739
542800
  init_fsOperations();
542740
542801
  init_hooks5();
542741
- USE_POLLING = typeof Bun !== "undefined";
542802
+ USE_POLLING2 = typeof Bun !== "undefined" || process.platform === "win32";
542742
542803
  pendingChangedPaths = new Set;
542743
542804
  skillsChanged = createSignal();
542744
542805
  subscribe2 = skillsChanged.subscribe;
@@ -561199,7 +561260,7 @@ Now that this skill is invoked, you have access to Chrome browser automation too
561199
561260
  IMPORTANT: Start by calling mcp__claude-in-chrome__tabs_context_mcp to get information about the user's current browser tabs.
561200
561261
  `;
561201
561262
  var init_claudeInChrome = __esm(() => {
561202
- init_claude_for_chrome_mcp();
561263
+ init_ant_claude_for_chrome_mcp();
561203
561264
  init_setup2();
561204
561265
  init_bundledSkills();
561205
561266
  CLAUDE_IN_CHROME_MCP_TOOLS = BROWSER_TOOLS.map((tool) => `mcp__claude-in-chrome__${tool.name}`);
package/dist/myclaude.mjs CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.114",
8
- BUILD_TIME: "2026-07-21T15:25:32.406Z",
7
+ VERSION: "0.1.115",
8
+ BUILD_TIME: "2026-07-21T18:00:14.161Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -15247,9 +15247,9 @@ var init_startupProfiler = __esm(() => {
15247
15247
  }
15248
15248
  });
15249
15249
 
15250
- // node_modules/@ant/claude-for-chrome-mcp/index.ts
15251
- var exports_claude_for_chrome_mcp = {};
15252
- __export(exports_claude_for_chrome_mcp, {
15250
+ // shims/ant-claude-for-chrome-mcp/index.ts
15251
+ var exports_ant_claude_for_chrome_mcp = {};
15252
+ __export(exports_ant_claude_for_chrome_mcp, {
15253
15253
  createClaudeForChromeMcpServer: () => createClaudeForChromeMcpServer,
15254
15254
  BROWSER_TOOLS: () => BROWSER_TOOLS
15255
15255
  });
@@ -15261,7 +15261,7 @@ function createClaudeForChromeMcpServer(_context) {
15261
15261
  };
15262
15262
  }
15263
15263
  var BROWSER_TOOLS;
15264
- var init_claude_for_chrome_mcp = __esm(() => {
15264
+ var init_ant_claude_for_chrome_mcp = __esm(() => {
15265
15265
  BROWSER_TOOLS = [];
15266
15266
  });
15267
15267
 
@@ -117115,7 +117115,7 @@ var package_default;
117115
117115
  var init_package = __esm(() => {
117116
117116
  package_default = {
117117
117117
  name: "@funnycode/myclaude",
117118
- version: "0.1.114",
117118
+ version: "0.1.115",
117119
117119
  private: false,
117120
117120
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117121
117121
  license: "MIT",
@@ -149731,7 +149731,7 @@ async function initialize() {
149731
149731
  return true;
149732
149732
  },
149733
149733
  ignorePermissionErrors: true,
149734
- usePolling: false,
149734
+ usePolling: USE_POLLING,
149735
149735
  atomic: true
149736
149736
  });
149737
149737
  watcher.on("change", handleChange);
@@ -149927,7 +149927,7 @@ function resetForTesting(overrides) {
149927
149927
  watcher = null;
149928
149928
  return w ? w.close() : Promise.resolve();
149929
149929
  }
149930
- var FILE_STABILITY_THRESHOLD_MS = 1000, FILE_STABILITY_POLL_INTERVAL_MS = 500, INTERNAL_WRITE_WINDOW_MS = 5000, MDM_POLL_INTERVAL_MS, DELETION_GRACE_MS, watcher = null, mdmPollTimer = null, lastMdmSnapshot = null, initialized = false, disposed = false, pendingDeletions, settingsChanged, testOverrides = null, subscribe, settingsChangeDetector;
149930
+ var USE_POLLING, FILE_STABILITY_THRESHOLD_MS = 1000, FILE_STABILITY_POLL_INTERVAL_MS = 500, INTERNAL_WRITE_WINDOW_MS = 5000, MDM_POLL_INTERVAL_MS, DELETION_GRACE_MS, watcher = null, mdmPollTimer = null, lastMdmSnapshot = null, initialized = false, disposed = false, pendingDeletions, settingsChanged, testOverrides = null, subscribe, settingsChangeDetector;
149931
149931
  var init_changeDetector = __esm(() => {
149932
149932
  init_chokidar();
149933
149933
  init_state();
@@ -149942,6 +149942,7 @@ var init_changeDetector = __esm(() => {
149942
149942
  init_settings();
149943
149943
  init_settings2();
149944
149944
  init_settingsCache();
149945
+ USE_POLLING = typeof Bun !== "undefined" || process.platform === "win32";
149945
149946
  MDM_POLL_INTERVAL_MS = 30 * 60 * 1000;
149946
149947
  DELETION_GRACE_MS = FILE_STABILITY_THRESHOLD_MS + FILE_STABILITY_POLL_INTERVAL_MS + 200;
149947
149948
  pendingDeletions = new Map;
@@ -296438,7 +296439,7 @@ var init_client6 = __esm(() => {
296438
296439
  logMCPDebug(name, `claude.ai proxy transport created successfully`);
296439
296440
  } else if ((serverRef.type === "stdio" || !serverRef.type) && isClaudeInChromeMCPServer(name)) {
296440
296441
  const { createChromeContext } = await Promise.resolve().then(() => (init_mcpServer(), exports_mcpServer));
296441
- const { createClaudeForChromeMcpServer: createClaudeForChromeMcpServer2 } = await Promise.resolve().then(() => (init_claude_for_chrome_mcp(), exports_claude_for_chrome_mcp));
296442
+ const { createClaudeForChromeMcpServer: createClaudeForChromeMcpServer2 } = await Promise.resolve().then(() => (init_ant_claude_for_chrome_mcp(), exports_ant_claude_for_chrome_mcp));
296442
296443
  const { createLinkedTransportPair: createLinkedTransportPair2 } = await Promise.resolve().then(() => exports_InProcessTransport);
296443
296444
  const context = createChromeContext(serverRef.env);
296444
296445
  inProcessServer = createClaudeForChromeMcpServer2(context);
@@ -342102,7 +342103,8 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
342102
342103
  } else {
342103
342104
  let logs2 = null;
342104
342105
  try {
342105
- logs2 = await fetchSessionLogsFromUrl(sessionId, url3, headers);
342106
+ const seq = getOrCreateSequential(sessionId);
342107
+ logs2 = await seq(sessionId, url3, headers, true);
342106
342108
  } catch (fetchError) {
342107
342109
  logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
342108
342110
  logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
@@ -363354,7 +363356,7 @@ var init_color_diff = __esm(() => {
363354
363356
  };
363355
363357
  });
363356
363358
 
363357
- // node_modules/color-diff-napi/index.ts
363359
+ // shims/color-diff-napi/index.ts
363358
363360
  var init_color_diff_napi = __esm(() => {
363359
363361
  init_color_diff();
363360
363362
  });
@@ -409202,7 +409204,7 @@ function prewarm() {
409202
409204
  var cachedModule = null;
409203
409205
  var init_modifiers_napi_src = () => {};
409204
409206
 
409205
- // node_modules/modifiers-napi/index.ts
409207
+ // shims/modifiers-napi/index.ts
409206
409208
  var exports_modifiers_napi = {};
409207
409209
  __export(exports_modifiers_napi, {
409208
409210
  prewarm: () => prewarm,
@@ -483868,7 +483870,7 @@ async function isChromeExtensionInstalled() {
483868
483870
  }
483869
483871
  var CHROME_EXTENSION_RECONNECT_URL = "https://clau.de/chrome/reconnect", NATIVE_HOST_IDENTIFIER = "com.anthropic.claude_code_browser_extension", NATIVE_HOST_MANIFEST_NAME, shouldAutoEnable = undefined;
483870
483872
  var init_setup2 = __esm(() => {
483871
- init_claude_for_chrome_mcp();
483873
+ init_ant_claude_for_chrome_mcp();
483872
483874
  init_state();
483873
483875
  init_growthbook();
483874
483876
  init_config();
@@ -505925,7 +505927,7 @@ class DebugLogger {
505925
505927
  }
505926
505928
  var EXTENSION_DOWNLOAD_URL = "https://claude.ai/chrome", BUG_REPORT_URL = "https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome", SAFE_BRIDGE_STRING_KEYS, PERMISSION_MODES4;
505927
505929
  var init_mcpServer = __esm(() => {
505928
- init_claude_for_chrome_mcp();
505930
+ init_ant_claude_for_chrome_mcp();
505929
505931
  init_stdio2();
505930
505932
  init_datadog();
505931
505933
  init_firstPartyEventLogger();
@@ -506367,7 +506369,7 @@ var require_argument = __commonJS((exports) => {
506367
506369
  this._name = name;
506368
506370
  break;
506369
506371
  }
506370
- if (this._name.length > 3 && this._name.slice(-3) === "...") {
506372
+ if (this._name.endsWith("...")) {
506371
506373
  this.variadic = true;
506372
506374
  this._name = this._name.slice(0, -3);
506373
506375
  }
@@ -506375,11 +506377,12 @@ var require_argument = __commonJS((exports) => {
506375
506377
  name() {
506376
506378
  return this._name;
506377
506379
  }
506378
- _concatValue(value, previous) {
506380
+ _collectValue(value, previous) {
506379
506381
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506380
506382
  return [value];
506381
506383
  }
506382
- return previous.concat(value);
506384
+ previous.push(value);
506385
+ return previous;
506383
506386
  }
506384
506387
  default(value, description) {
506385
506388
  this.defaultValue = value;
@@ -506397,7 +506400,7 @@ var require_argument = __commonJS((exports) => {
506397
506400
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506398
506401
  }
506399
506402
  if (this.variadic) {
506400
- return this._concatValue(arg, previous);
506403
+ return this._collectValue(arg, previous);
506401
506404
  }
506402
506405
  return arg;
506403
506406
  };
@@ -506562,7 +506565,11 @@ var require_help = __commonJS((exports) => {
506562
506565
  extraInfo.push(`env: ${option.envVar}`);
506563
506566
  }
506564
506567
  if (extraInfo.length > 0) {
506565
- return `${option.description} (${extraInfo.join(", ")})`;
506568
+ const extraDescription = `(${extraInfo.join(", ")})`;
506569
+ if (option.description) {
506570
+ return `${option.description} ${extraDescription}`;
506571
+ }
506572
+ return extraDescription;
506566
506573
  }
506567
506574
  return option.description;
506568
506575
  }
@@ -506583,6 +506590,27 @@ var require_help = __commonJS((exports) => {
506583
506590
  }
506584
506591
  return argument.description;
506585
506592
  }
506593
+ formatItemList(heading, items, helper) {
506594
+ if (items.length === 0)
506595
+ return [];
506596
+ return [helper.styleTitle(heading), ...items, ""];
506597
+ }
506598
+ groupItems(unsortedItems, visibleItems, getGroup) {
506599
+ const result = new Map;
506600
+ unsortedItems.forEach((item) => {
506601
+ const group = getGroup(item);
506602
+ if (!result.has(group))
506603
+ result.set(group, []);
506604
+ });
506605
+ visibleItems.forEach((item) => {
506606
+ const group = getGroup(item);
506607
+ if (!result.has(group)) {
506608
+ result.set(group, []);
506609
+ }
506610
+ result.get(group).push(item);
506611
+ });
506612
+ return result;
506613
+ }
506586
506614
  formatHelp(cmd, helper) {
506587
506615
  const termWidth = helper.padWidth(cmd, helper);
506588
506616
  const helpWidth = helper.helpWidth ?? 80;
@@ -506603,45 +506631,27 @@ var require_help = __commonJS((exports) => {
506603
506631
  const argumentList = helper.visibleArguments(cmd).map((argument) => {
506604
506632
  return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
506605
506633
  });
506606
- if (argumentList.length > 0) {
506607
- output = output.concat([
506608
- helper.styleTitle("Arguments:"),
506609
- ...argumentList,
506610
- ""
506611
- ]);
506612
- }
506613
- const optionList = helper.visibleOptions(cmd).map((option) => {
506614
- return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506634
+ output = output.concat(this.formatItemList("Arguments:", argumentList, helper));
506635
+ const optionGroups = this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => option.helpGroupHeading ?? "Options:");
506636
+ optionGroups.forEach((options, group) => {
506637
+ const optionList = options.map((option) => {
506638
+ return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506639
+ });
506640
+ output = output.concat(this.formatItemList(group, optionList, helper));
506615
506641
  });
506616
- if (optionList.length > 0) {
506617
- output = output.concat([
506618
- helper.styleTitle("Options:"),
506619
- ...optionList,
506620
- ""
506621
- ]);
506622
- }
506623
506642
  if (helper.showGlobalOptions) {
506624
506643
  const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
506625
506644
  return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506626
506645
  });
506627
- if (globalOptionList.length > 0) {
506628
- output = output.concat([
506629
- helper.styleTitle("Global Options:"),
506630
- ...globalOptionList,
506631
- ""
506632
- ]);
506633
- }
506646
+ output = output.concat(this.formatItemList("Global Options:", globalOptionList, helper));
506634
506647
  }
506635
- const commandList = helper.visibleCommands(cmd).map((cmd2) => {
506636
- return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(cmd2)), helper.styleSubcommandDescription(helper.subcommandDescription(cmd2)));
506648
+ const commandGroups = this.groupItems(cmd.commands, helper.visibleCommands(cmd), (sub) => sub.helpGroup() || "Commands:");
506649
+ commandGroups.forEach((commands, group) => {
506650
+ const commandList = commands.map((sub) => {
506651
+ return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(sub)), helper.styleSubcommandDescription(helper.subcommandDescription(sub)));
506652
+ });
506653
+ output = output.concat(this.formatItemList(group, commandList, helper));
506637
506654
  });
506638
- if (commandList.length > 0) {
506639
- output = output.concat([
506640
- helper.styleTitle("Commands:"),
506641
- ...commandList,
506642
- ""
506643
- ]);
506644
- }
506645
506655
  return output.join(`
506646
506656
  `);
506647
506657
  }
@@ -506798,6 +506808,7 @@ var require_option = __commonJS((exports) => {
506798
506808
  this.argChoices = undefined;
506799
506809
  this.conflictsWith = [];
506800
506810
  this.implied = undefined;
506811
+ this.helpGroupHeading = undefined;
506801
506812
  }
506802
506813
  default(value, description) {
506803
506814
  this.defaultValue = value;
@@ -506836,11 +506847,12 @@ var require_option = __commonJS((exports) => {
506836
506847
  this.hidden = !!hide;
506837
506848
  return this;
506838
506849
  }
506839
- _concatValue(value, previous) {
506850
+ _collectValue(value, previous) {
506840
506851
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506841
506852
  return [value];
506842
506853
  }
506843
- return previous.concat(value);
506854
+ previous.push(value);
506855
+ return previous;
506844
506856
  }
506845
506857
  choices(values3) {
506846
506858
  this.argChoices = values3.slice();
@@ -506849,7 +506861,7 @@ var require_option = __commonJS((exports) => {
506849
506861
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506850
506862
  }
506851
506863
  if (this.variadic) {
506852
- return this._concatValue(arg, previous);
506864
+ return this._collectValue(arg, previous);
506853
506865
  }
506854
506866
  return arg;
506855
506867
  };
@@ -506867,6 +506879,10 @@ var require_option = __commonJS((exports) => {
506867
506879
  }
506868
506880
  return camelcase(this.name());
506869
506881
  }
506882
+ helpGroup(heading) {
506883
+ this.helpGroupHeading = heading;
506884
+ return this;
506885
+ }
506870
506886
  is(arg) {
506871
506887
  return this.short === arg || this.long === arg;
506872
506888
  }
@@ -507084,6 +507100,9 @@ var require_command = __commonJS((exports) => {
507084
507100
  this._addImplicitHelpCommand = undefined;
507085
507101
  this._helpCommand = undefined;
507086
507102
  this._helpConfiguration = {};
507103
+ this._helpGroupHeading = undefined;
507104
+ this._defaultCommandGroup = undefined;
507105
+ this._defaultOptionGroup = undefined;
507087
507106
  }
507088
507107
  copyInheritedSettings(sourceCommand) {
507089
507108
  this._outputConfiguration = sourceCommand._outputConfiguration;
@@ -507148,7 +507167,10 @@ var require_command = __commonJS((exports) => {
507148
507167
  configureOutput(configuration) {
507149
507168
  if (configuration === undefined)
507150
507169
  return this._outputConfiguration;
507151
- Object.assign(this._outputConfiguration, configuration);
507170
+ this._outputConfiguration = {
507171
+ ...this._outputConfiguration,
507172
+ ...configuration
507173
+ };
507152
507174
  return this;
507153
507175
  }
507154
507176
  showHelpAfterError(displayHelp = true) {
@@ -507179,12 +507201,12 @@ var require_command = __commonJS((exports) => {
507179
507201
  createArgument(name, description) {
507180
507202
  return new Argument(name, description);
507181
507203
  }
507182
- argument(name, description, fn, defaultValue) {
507204
+ argument(name, description, parseArg, defaultValue) {
507183
507205
  const argument = this.createArgument(name, description);
507184
- if (typeof fn === "function") {
507185
- argument.default(defaultValue).argParser(fn);
507206
+ if (typeof parseArg === "function") {
507207
+ argument.default(defaultValue).argParser(parseArg);
507186
507208
  } else {
507187
- argument.default(fn);
507209
+ argument.default(parseArg);
507188
507210
  }
507189
507211
  this.addArgument(argument);
507190
507212
  return this;
@@ -507197,7 +507219,7 @@ var require_command = __commonJS((exports) => {
507197
507219
  }
507198
507220
  addArgument(argument) {
507199
507221
  const previousArgument = this.registeredArguments.slice(-1)[0];
507200
- if (previousArgument && previousArgument.variadic) {
507222
+ if (previousArgument?.variadic) {
507201
507223
  throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
507202
507224
  }
507203
507225
  if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
@@ -507209,10 +507231,13 @@ var require_command = __commonJS((exports) => {
507209
507231
  helpCommand(enableOrNameAndArgs, description) {
507210
507232
  if (typeof enableOrNameAndArgs === "boolean") {
507211
507233
  this._addImplicitHelpCommand = enableOrNameAndArgs;
507234
+ if (enableOrNameAndArgs && this._defaultCommandGroup) {
507235
+ this._initCommandGroup(this._getHelpCommand());
507236
+ }
507212
507237
  return this;
507213
507238
  }
507214
- enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
507215
- const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
507239
+ const nameAndArgs = enableOrNameAndArgs ?? "help [command]";
507240
+ const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);
507216
507241
  const helpDescription = description ?? "display help for command";
507217
507242
  const helpCommand = this.createCommand(helpName);
507218
507243
  helpCommand.helpOption(false);
@@ -507222,6 +507247,8 @@ var require_command = __commonJS((exports) => {
507222
507247
  helpCommand.description(helpDescription);
507223
507248
  this._addImplicitHelpCommand = true;
507224
507249
  this._helpCommand = helpCommand;
507250
+ if (enableOrNameAndArgs || description)
507251
+ this._initCommandGroup(helpCommand);
507225
507252
  return this;
507226
507253
  }
507227
507254
  addHelpCommand(helpCommand, deprecatedDescription) {
@@ -507231,6 +507258,7 @@ var require_command = __commonJS((exports) => {
507231
507258
  }
507232
507259
  this._addImplicitHelpCommand = true;
507233
507260
  this._helpCommand = helpCommand;
507261
+ this._initCommandGroup(helpCommand);
507234
507262
  return this;
507235
507263
  }
507236
507264
  _getHelpCommand() {
@@ -507310,6 +507338,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507310
507338
  throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
507311
507339
  - already used by option '${matchingOption.flags}'`);
507312
507340
  }
507341
+ this._initOptionGroup(option);
507313
507342
  this.options.push(option);
507314
507343
  }
507315
507344
  _registerCommand(command8) {
@@ -507322,6 +507351,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507322
507351
  const newCmd = knownBy(command8).join("|");
507323
507352
  throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
507324
507353
  }
507354
+ this._initCommandGroup(command8);
507325
507355
  this.commands.push(command8);
507326
507356
  }
507327
507357
  addOption(option) {
@@ -507344,7 +507374,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507344
507374
  if (val !== null && option.parseArg) {
507345
507375
  val = this._callParseArg(option, val, oldValue, invalidValueMessage);
507346
507376
  } else if (val !== null && option.variadic) {
507347
- val = option._concatValue(val, oldValue);
507377
+ val = option._collectValue(val, oldValue);
507348
507378
  }
507349
507379
  if (val == null) {
507350
507380
  if (option.negate) {
@@ -507719,7 +507749,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507719
507749
  this.processedArgs = processedArgs;
507720
507750
  }
507721
507751
  _chainOrCall(promise3, fn) {
507722
- if (promise3 && promise3.then && typeof promise3.then === "function") {
507752
+ if (promise3?.then && typeof promise3.then === "function") {
507723
507753
  return promise3.then(() => fn());
507724
507754
  }
507725
507755
  return fn();
@@ -507796,7 +507826,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507796
507826
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
507797
507827
  return promiseChain;
507798
507828
  }
507799
- if (this.parent && this.parent.listenerCount(commandEvent)) {
507829
+ if (this.parent?.listenerCount(commandEvent)) {
507800
507830
  checkForUnknownOptions();
507801
507831
  this._processArguments();
507802
507832
  this.parent.emit(commandEvent, operands, unknown3);
@@ -507858,24 +507888,31 @@ Expecting one of '${allowedValues.join("', '")}'`);
507858
507888
  cmd._checkForConflictingLocalOptions();
507859
507889
  });
507860
507890
  }
507861
- parseOptions(argv) {
507891
+ parseOptions(args) {
507862
507892
  const operands = [];
507863
507893
  const unknown3 = [];
507864
507894
  let dest = operands;
507865
- const args = argv.slice();
507866
507895
  function maybeOption(arg) {
507867
507896
  return arg.length > 1 && arg[0] === "-";
507868
507897
  }
507898
+ const negativeNumberArg = (arg) => {
507899
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg))
507900
+ return false;
507901
+ return !this._getCommandAndAncestors().some((cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short)));
507902
+ };
507869
507903
  let activeVariadicOption = null;
507870
- while (args.length) {
507871
- const arg = args.shift();
507904
+ let activeGroup = null;
507905
+ let i3 = 0;
507906
+ while (i3 < args.length || activeGroup) {
507907
+ const arg = activeGroup ?? args[i3++];
507908
+ activeGroup = null;
507872
507909
  if (arg === "--") {
507873
507910
  if (dest === unknown3)
507874
507911
  dest.push(arg);
507875
- dest.push(...args);
507912
+ dest.push(...args.slice(i3));
507876
507913
  break;
507877
507914
  }
507878
- if (activeVariadicOption && !maybeOption(arg)) {
507915
+ if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
507879
507916
  this.emit(`option:${activeVariadicOption.name()}`, arg);
507880
507917
  continue;
507881
507918
  }
@@ -507884,14 +507921,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
507884
507921
  const option = this._findOption(arg);
507885
507922
  if (option) {
507886
507923
  if (option.required) {
507887
- const value = args.shift();
507924
+ const value = args[i3++];
507888
507925
  if (value === undefined)
507889
507926
  this.optionMissingArgument(option);
507890
507927
  this.emit(`option:${option.name()}`, value);
507891
507928
  } else if (option.optional) {
507892
507929
  let value = null;
507893
- if (args.length > 0 && !maybeOption(args[0])) {
507894
- value = args.shift();
507930
+ if (i3 < args.length && (!maybeOption(args[i3]) || negativeNumberArg(args[i3]))) {
507931
+ value = args[i3++];
507895
507932
  }
507896
507933
  this.emit(`option:${option.name()}`, value);
507897
507934
  } else {
@@ -507908,7 +507945,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507908
507945
  this.emit(`option:${option.name()}`, arg.slice(2));
507909
507946
  } else {
507910
507947
  this.emit(`option:${option.name()}`);
507911
- args.unshift(`-${arg.slice(2)}`);
507948
+ activeGroup = `-${arg.slice(2)}`;
507912
507949
  }
507913
507950
  continue;
507914
507951
  }
@@ -507921,31 +507958,24 @@ Expecting one of '${allowedValues.join("', '")}'`);
507921
507958
  continue;
507922
507959
  }
507923
507960
  }
507924
- if (maybeOption(arg)) {
507961
+ if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
507925
507962
  dest = unknown3;
507926
507963
  }
507927
507964
  if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown3.length === 0) {
507928
507965
  if (this._findCommand(arg)) {
507929
507966
  operands.push(arg);
507930
- if (args.length > 0)
507931
- unknown3.push(...args);
507967
+ unknown3.push(...args.slice(i3));
507932
507968
  break;
507933
507969
  } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
507934
- operands.push(arg);
507935
- if (args.length > 0)
507936
- operands.push(...args);
507970
+ operands.push(arg, ...args.slice(i3));
507937
507971
  break;
507938
507972
  } else if (this._defaultCommandName) {
507939
- unknown3.push(arg);
507940
- if (args.length > 0)
507941
- unknown3.push(...args);
507973
+ unknown3.push(arg, ...args.slice(i3));
507942
507974
  break;
507943
507975
  }
507944
507976
  }
507945
507977
  if (this._passThroughOptions) {
507946
- dest.push(arg);
507947
- if (args.length > 0)
507948
- dest.push(...args);
507978
+ dest.push(arg, ...args.slice(i3));
507949
507979
  break;
507950
507980
  }
507951
507981
  dest.push(arg);
@@ -508156,6 +508186,32 @@ Expecting one of '${allowedValues.join("', '")}'`);
508156
508186
  this._name = str2;
508157
508187
  return this;
508158
508188
  }
508189
+ helpGroup(heading) {
508190
+ if (heading === undefined)
508191
+ return this._helpGroupHeading ?? "";
508192
+ this._helpGroupHeading = heading;
508193
+ return this;
508194
+ }
508195
+ commandsGroup(heading) {
508196
+ if (heading === undefined)
508197
+ return this._defaultCommandGroup ?? "";
508198
+ this._defaultCommandGroup = heading;
508199
+ return this;
508200
+ }
508201
+ optionsGroup(heading) {
508202
+ if (heading === undefined)
508203
+ return this._defaultOptionGroup ?? "";
508204
+ this._defaultOptionGroup = heading;
508205
+ return this;
508206
+ }
508207
+ _initOptionGroup(option) {
508208
+ if (this._defaultOptionGroup && !option.helpGroupHeading)
508209
+ option.helpGroup(this._defaultOptionGroup);
508210
+ }
508211
+ _initCommandGroup(cmd) {
508212
+ if (this._defaultCommandGroup && !cmd.helpGroup())
508213
+ cmd.helpGroup(this._defaultCommandGroup);
508214
+ }
508159
508215
  nameFromFilename(filename) {
508160
508216
  this._name = path25.basename(filename, path25.extname(filename));
508161
508217
  return this;
@@ -508232,15 +508288,19 @@ Expecting one of '${allowedValues.join("', '")}'`);
508232
508288
  helpOption(flags, description) {
508233
508289
  if (typeof flags === "boolean") {
508234
508290
  if (flags) {
508235
- this._helpOption = this._helpOption ?? undefined;
508291
+ if (this._helpOption === null)
508292
+ this._helpOption = undefined;
508293
+ if (this._defaultOptionGroup) {
508294
+ this._initOptionGroup(this._getHelpOption());
508295
+ }
508236
508296
  } else {
508237
508297
  this._helpOption = null;
508238
508298
  }
508239
508299
  return this;
508240
508300
  }
508241
- flags = flags ?? "-h, --help";
508242
- description = description ?? "display help for command";
508243
- this._helpOption = this.createOption(flags, description);
508301
+ this._helpOption = this.createOption(flags ?? "-h, --help", description ?? "display help for command");
508302
+ if (flags || description)
508303
+ this._initOptionGroup(this._helpOption);
508244
508304
  return this;
508245
508305
  }
508246
508306
  _getHelpOption() {
@@ -508251,6 +508311,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
508251
508311
  }
508252
508312
  addHelpOption(option) {
508253
508313
  this._helpOption = option;
508314
+ this._initOptionGroup(option);
508254
508315
  return this;
508255
508316
  }
508256
508317
  help(contextOptions) {
@@ -542613,7 +542674,7 @@ async function initialize4() {
542613
542674
  return path27.split(platformPath2.sep).some((dir) => dir === ".git");
542614
542675
  },
542615
542676
  ignorePermissionErrors: true,
542616
- usePolling: USE_POLLING,
542677
+ usePolling: USE_POLLING2,
542617
542678
  interval: testOverrides2?.chokidarInterval ?? POLLING_INTERVAL_MS,
542618
542679
  atomic: true
542619
542680
  });
@@ -542726,7 +542787,7 @@ async function resetForTesting2(overrides) {
542726
542787
  disposed3 = false;
542727
542788
  testOverrides2 = overrides ?? null;
542728
542789
  }
542729
- var FILE_STABILITY_THRESHOLD_MS3 = 1000, FILE_STABILITY_POLL_INTERVAL_MS3 = 500, RELOAD_DEBOUNCE_MS = 300, POLLING_INTERVAL_MS = 2000, USE_POLLING, watcher4 = null, reloadTimer = null, pendingChangedPaths, initialized4 = false, disposed3 = false, dynamicSkillsCallbackRegistered = false, unregisterCleanup = null, skillsChanged, testOverrides2 = null, subscribe2, skillChangeDetector;
542790
+ var FILE_STABILITY_THRESHOLD_MS3 = 1000, FILE_STABILITY_POLL_INTERVAL_MS3 = 500, RELOAD_DEBOUNCE_MS = 300, POLLING_INTERVAL_MS = 2000, USE_POLLING2, watcher4 = null, reloadTimer = null, pendingChangedPaths, initialized4 = false, disposed3 = false, dynamicSkillsCallbackRegistered = false, unregisterCleanup = null, skillsChanged, testOverrides2 = null, subscribe2, skillChangeDetector;
542730
542791
  var init_skillChangeDetector = __esm(() => {
542731
542792
  init_chokidar();
542732
542793
  init_state();
@@ -542738,7 +542799,7 @@ var init_skillChangeDetector = __esm(() => {
542738
542799
  init_debug();
542739
542800
  init_fsOperations();
542740
542801
  init_hooks5();
542741
- USE_POLLING = typeof Bun !== "undefined";
542802
+ USE_POLLING2 = typeof Bun !== "undefined" || process.platform === "win32";
542742
542803
  pendingChangedPaths = new Set;
542743
542804
  skillsChanged = createSignal();
542744
542805
  subscribe2 = skillsChanged.subscribe;
@@ -561199,7 +561260,7 @@ Now that this skill is invoked, you have access to Chrome browser automation too
561199
561260
  IMPORTANT: Start by calling mcp__claude-in-chrome__tabs_context_mcp to get information about the user's current browser tabs.
561200
561261
  `;
561201
561262
  var init_claudeInChrome = __esm(() => {
561202
- init_claude_for_chrome_mcp();
561263
+ init_ant_claude_for_chrome_mcp();
561203
561264
  init_setup2();
561204
561265
  init_bundledSkills();
561205
561266
  CLAUDE_IN_CHROME_MCP_TOOLS = BROWSER_TOOLS.map((tool) => `mcp__claude-in-chrome__${tool.name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.114",
3
+ "version": "0.1.115",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",