@funnycode/myclaude 0.1.114 → 0.1.116

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.116",
8
+ BUILD_TIME: "2026-07-21T19:45:42.352Z",
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.116",
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);
@@ -300857,6 +300858,7 @@ function memoizeWithTTL(fn, ttlMs) {
300857
300858
  return refreshPromise;
300858
300859
  } finally {
300859
300860
  release();
300861
+ keyMutexes.delete(key2);
300860
300862
  }
300861
300863
  }
300862
300864
  try {
@@ -300874,6 +300876,7 @@ function memoizeWithTTL(fn, ttlMs) {
300874
300876
  clear: () => {
300875
300877
  originalClear();
300876
300878
  lastCachedAt = 0;
300879
+ keyMutexes.clear();
300877
300880
  }
300878
300881
  };
300879
300882
  return wrapped;
@@ -342102,7 +342105,8 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
342102
342105
  } else {
342103
342106
  let logs2 = null;
342104
342107
  try {
342105
- logs2 = await fetchSessionLogsFromUrl(sessionId, url3, headers);
342108
+ const seq = getOrCreateSequential(sessionId);
342109
+ logs2 = await seq(sessionId, url3, headers, true);
342106
342110
  } catch (fetchError) {
342107
342111
  logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
342108
342112
  logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
@@ -363354,7 +363358,7 @@ var init_color_diff = __esm(() => {
363354
363358
  };
363355
363359
  });
363356
363360
 
363357
- // node_modules/color-diff-napi/index.ts
363361
+ // shims/color-diff-napi/index.ts
363358
363362
  var init_color_diff_napi = __esm(() => {
363359
363363
  init_color_diff();
363360
363364
  });
@@ -409202,7 +409206,7 @@ function prewarm() {
409202
409206
  var cachedModule = null;
409203
409207
  var init_modifiers_napi_src = () => {};
409204
409208
 
409205
- // node_modules/modifiers-napi/index.ts
409209
+ // shims/modifiers-napi/index.ts
409206
409210
  var exports_modifiers_napi = {};
409207
409211
  __export(exports_modifiers_napi, {
409208
409212
  prewarm: () => prewarm,
@@ -483868,7 +483872,7 @@ async function isChromeExtensionInstalled() {
483868
483872
  }
483869
483873
  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
483874
  var init_setup2 = __esm(() => {
483871
- init_claude_for_chrome_mcp();
483875
+ init_ant_claude_for_chrome_mcp();
483872
483876
  init_state();
483873
483877
  init_growthbook();
483874
483878
  init_config();
@@ -505925,7 +505929,7 @@ class DebugLogger {
505925
505929
  }
505926
505930
  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
505931
  var init_mcpServer = __esm(() => {
505928
- init_claude_for_chrome_mcp();
505932
+ init_ant_claude_for_chrome_mcp();
505929
505933
  init_stdio2();
505930
505934
  init_datadog();
505931
505935
  init_firstPartyEventLogger();
@@ -506367,7 +506371,7 @@ var require_argument = __commonJS((exports) => {
506367
506371
  this._name = name;
506368
506372
  break;
506369
506373
  }
506370
- if (this._name.length > 3 && this._name.slice(-3) === "...") {
506374
+ if (this._name.endsWith("...")) {
506371
506375
  this.variadic = true;
506372
506376
  this._name = this._name.slice(0, -3);
506373
506377
  }
@@ -506375,11 +506379,12 @@ var require_argument = __commonJS((exports) => {
506375
506379
  name() {
506376
506380
  return this._name;
506377
506381
  }
506378
- _concatValue(value, previous) {
506382
+ _collectValue(value, previous) {
506379
506383
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506380
506384
  return [value];
506381
506385
  }
506382
- return previous.concat(value);
506386
+ previous.push(value);
506387
+ return previous;
506383
506388
  }
506384
506389
  default(value, description) {
506385
506390
  this.defaultValue = value;
@@ -506397,7 +506402,7 @@ var require_argument = __commonJS((exports) => {
506397
506402
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506398
506403
  }
506399
506404
  if (this.variadic) {
506400
- return this._concatValue(arg, previous);
506405
+ return this._collectValue(arg, previous);
506401
506406
  }
506402
506407
  return arg;
506403
506408
  };
@@ -506562,7 +506567,11 @@ var require_help = __commonJS((exports) => {
506562
506567
  extraInfo.push(`env: ${option.envVar}`);
506563
506568
  }
506564
506569
  if (extraInfo.length > 0) {
506565
- return `${option.description} (${extraInfo.join(", ")})`;
506570
+ const extraDescription = `(${extraInfo.join(", ")})`;
506571
+ if (option.description) {
506572
+ return `${option.description} ${extraDescription}`;
506573
+ }
506574
+ return extraDescription;
506566
506575
  }
506567
506576
  return option.description;
506568
506577
  }
@@ -506583,6 +506592,27 @@ var require_help = __commonJS((exports) => {
506583
506592
  }
506584
506593
  return argument.description;
506585
506594
  }
506595
+ formatItemList(heading, items, helper) {
506596
+ if (items.length === 0)
506597
+ return [];
506598
+ return [helper.styleTitle(heading), ...items, ""];
506599
+ }
506600
+ groupItems(unsortedItems, visibleItems, getGroup) {
506601
+ const result = new Map;
506602
+ unsortedItems.forEach((item) => {
506603
+ const group = getGroup(item);
506604
+ if (!result.has(group))
506605
+ result.set(group, []);
506606
+ });
506607
+ visibleItems.forEach((item) => {
506608
+ const group = getGroup(item);
506609
+ if (!result.has(group)) {
506610
+ result.set(group, []);
506611
+ }
506612
+ result.get(group).push(item);
506613
+ });
506614
+ return result;
506615
+ }
506586
506616
  formatHelp(cmd, helper) {
506587
506617
  const termWidth = helper.padWidth(cmd, helper);
506588
506618
  const helpWidth = helper.helpWidth ?? 80;
@@ -506603,45 +506633,27 @@ var require_help = __commonJS((exports) => {
506603
506633
  const argumentList = helper.visibleArguments(cmd).map((argument) => {
506604
506634
  return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
506605
506635
  });
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)));
506636
+ output = output.concat(this.formatItemList("Arguments:", argumentList, helper));
506637
+ const optionGroups = this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => option.helpGroupHeading ?? "Options:");
506638
+ optionGroups.forEach((options, group) => {
506639
+ const optionList = options.map((option) => {
506640
+ return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506641
+ });
506642
+ output = output.concat(this.formatItemList(group, optionList, helper));
506615
506643
  });
506616
- if (optionList.length > 0) {
506617
- output = output.concat([
506618
- helper.styleTitle("Options:"),
506619
- ...optionList,
506620
- ""
506621
- ]);
506622
- }
506623
506644
  if (helper.showGlobalOptions) {
506624
506645
  const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
506625
506646
  return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506626
506647
  });
506627
- if (globalOptionList.length > 0) {
506628
- output = output.concat([
506629
- helper.styleTitle("Global Options:"),
506630
- ...globalOptionList,
506631
- ""
506632
- ]);
506633
- }
506648
+ output = output.concat(this.formatItemList("Global Options:", globalOptionList, helper));
506634
506649
  }
506635
- const commandList = helper.visibleCommands(cmd).map((cmd2) => {
506636
- return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(cmd2)), helper.styleSubcommandDescription(helper.subcommandDescription(cmd2)));
506650
+ const commandGroups = this.groupItems(cmd.commands, helper.visibleCommands(cmd), (sub) => sub.helpGroup() || "Commands:");
506651
+ commandGroups.forEach((commands, group) => {
506652
+ const commandList = commands.map((sub) => {
506653
+ return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(sub)), helper.styleSubcommandDescription(helper.subcommandDescription(sub)));
506654
+ });
506655
+ output = output.concat(this.formatItemList(group, commandList, helper));
506637
506656
  });
506638
- if (commandList.length > 0) {
506639
- output = output.concat([
506640
- helper.styleTitle("Commands:"),
506641
- ...commandList,
506642
- ""
506643
- ]);
506644
- }
506645
506657
  return output.join(`
506646
506658
  `);
506647
506659
  }
@@ -506798,6 +506810,7 @@ var require_option = __commonJS((exports) => {
506798
506810
  this.argChoices = undefined;
506799
506811
  this.conflictsWith = [];
506800
506812
  this.implied = undefined;
506813
+ this.helpGroupHeading = undefined;
506801
506814
  }
506802
506815
  default(value, description) {
506803
506816
  this.defaultValue = value;
@@ -506836,11 +506849,12 @@ var require_option = __commonJS((exports) => {
506836
506849
  this.hidden = !!hide;
506837
506850
  return this;
506838
506851
  }
506839
- _concatValue(value, previous) {
506852
+ _collectValue(value, previous) {
506840
506853
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506841
506854
  return [value];
506842
506855
  }
506843
- return previous.concat(value);
506856
+ previous.push(value);
506857
+ return previous;
506844
506858
  }
506845
506859
  choices(values3) {
506846
506860
  this.argChoices = values3.slice();
@@ -506849,7 +506863,7 @@ var require_option = __commonJS((exports) => {
506849
506863
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506850
506864
  }
506851
506865
  if (this.variadic) {
506852
- return this._concatValue(arg, previous);
506866
+ return this._collectValue(arg, previous);
506853
506867
  }
506854
506868
  return arg;
506855
506869
  };
@@ -506867,6 +506881,10 @@ var require_option = __commonJS((exports) => {
506867
506881
  }
506868
506882
  return camelcase(this.name());
506869
506883
  }
506884
+ helpGroup(heading) {
506885
+ this.helpGroupHeading = heading;
506886
+ return this;
506887
+ }
506870
506888
  is(arg) {
506871
506889
  return this.short === arg || this.long === arg;
506872
506890
  }
@@ -507084,6 +507102,9 @@ var require_command = __commonJS((exports) => {
507084
507102
  this._addImplicitHelpCommand = undefined;
507085
507103
  this._helpCommand = undefined;
507086
507104
  this._helpConfiguration = {};
507105
+ this._helpGroupHeading = undefined;
507106
+ this._defaultCommandGroup = undefined;
507107
+ this._defaultOptionGroup = undefined;
507087
507108
  }
507088
507109
  copyInheritedSettings(sourceCommand) {
507089
507110
  this._outputConfiguration = sourceCommand._outputConfiguration;
@@ -507148,7 +507169,10 @@ var require_command = __commonJS((exports) => {
507148
507169
  configureOutput(configuration) {
507149
507170
  if (configuration === undefined)
507150
507171
  return this._outputConfiguration;
507151
- Object.assign(this._outputConfiguration, configuration);
507172
+ this._outputConfiguration = {
507173
+ ...this._outputConfiguration,
507174
+ ...configuration
507175
+ };
507152
507176
  return this;
507153
507177
  }
507154
507178
  showHelpAfterError(displayHelp = true) {
@@ -507179,12 +507203,12 @@ var require_command = __commonJS((exports) => {
507179
507203
  createArgument(name, description) {
507180
507204
  return new Argument(name, description);
507181
507205
  }
507182
- argument(name, description, fn, defaultValue) {
507206
+ argument(name, description, parseArg, defaultValue) {
507183
507207
  const argument = this.createArgument(name, description);
507184
- if (typeof fn === "function") {
507185
- argument.default(defaultValue).argParser(fn);
507208
+ if (typeof parseArg === "function") {
507209
+ argument.default(defaultValue).argParser(parseArg);
507186
507210
  } else {
507187
- argument.default(fn);
507211
+ argument.default(parseArg);
507188
507212
  }
507189
507213
  this.addArgument(argument);
507190
507214
  return this;
@@ -507197,7 +507221,7 @@ var require_command = __commonJS((exports) => {
507197
507221
  }
507198
507222
  addArgument(argument) {
507199
507223
  const previousArgument = this.registeredArguments.slice(-1)[0];
507200
- if (previousArgument && previousArgument.variadic) {
507224
+ if (previousArgument?.variadic) {
507201
507225
  throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
507202
507226
  }
507203
507227
  if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
@@ -507209,10 +507233,13 @@ var require_command = __commonJS((exports) => {
507209
507233
  helpCommand(enableOrNameAndArgs, description) {
507210
507234
  if (typeof enableOrNameAndArgs === "boolean") {
507211
507235
  this._addImplicitHelpCommand = enableOrNameAndArgs;
507236
+ if (enableOrNameAndArgs && this._defaultCommandGroup) {
507237
+ this._initCommandGroup(this._getHelpCommand());
507238
+ }
507212
507239
  return this;
507213
507240
  }
507214
- enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
507215
- const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
507241
+ const nameAndArgs = enableOrNameAndArgs ?? "help [command]";
507242
+ const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);
507216
507243
  const helpDescription = description ?? "display help for command";
507217
507244
  const helpCommand = this.createCommand(helpName);
507218
507245
  helpCommand.helpOption(false);
@@ -507222,6 +507249,8 @@ var require_command = __commonJS((exports) => {
507222
507249
  helpCommand.description(helpDescription);
507223
507250
  this._addImplicitHelpCommand = true;
507224
507251
  this._helpCommand = helpCommand;
507252
+ if (enableOrNameAndArgs || description)
507253
+ this._initCommandGroup(helpCommand);
507225
507254
  return this;
507226
507255
  }
507227
507256
  addHelpCommand(helpCommand, deprecatedDescription) {
@@ -507231,6 +507260,7 @@ var require_command = __commonJS((exports) => {
507231
507260
  }
507232
507261
  this._addImplicitHelpCommand = true;
507233
507262
  this._helpCommand = helpCommand;
507263
+ this._initCommandGroup(helpCommand);
507234
507264
  return this;
507235
507265
  }
507236
507266
  _getHelpCommand() {
@@ -507310,6 +507340,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507310
507340
  throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
507311
507341
  - already used by option '${matchingOption.flags}'`);
507312
507342
  }
507343
+ this._initOptionGroup(option);
507313
507344
  this.options.push(option);
507314
507345
  }
507315
507346
  _registerCommand(command8) {
@@ -507322,6 +507353,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507322
507353
  const newCmd = knownBy(command8).join("|");
507323
507354
  throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
507324
507355
  }
507356
+ this._initCommandGroup(command8);
507325
507357
  this.commands.push(command8);
507326
507358
  }
507327
507359
  addOption(option) {
@@ -507344,7 +507376,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507344
507376
  if (val !== null && option.parseArg) {
507345
507377
  val = this._callParseArg(option, val, oldValue, invalidValueMessage);
507346
507378
  } else if (val !== null && option.variadic) {
507347
- val = option._concatValue(val, oldValue);
507379
+ val = option._collectValue(val, oldValue);
507348
507380
  }
507349
507381
  if (val == null) {
507350
507382
  if (option.negate) {
@@ -507719,7 +507751,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507719
507751
  this.processedArgs = processedArgs;
507720
507752
  }
507721
507753
  _chainOrCall(promise3, fn) {
507722
- if (promise3 && promise3.then && typeof promise3.then === "function") {
507754
+ if (promise3?.then && typeof promise3.then === "function") {
507723
507755
  return promise3.then(() => fn());
507724
507756
  }
507725
507757
  return fn();
@@ -507796,7 +507828,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507796
507828
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
507797
507829
  return promiseChain;
507798
507830
  }
507799
- if (this.parent && this.parent.listenerCount(commandEvent)) {
507831
+ if (this.parent?.listenerCount(commandEvent)) {
507800
507832
  checkForUnknownOptions();
507801
507833
  this._processArguments();
507802
507834
  this.parent.emit(commandEvent, operands, unknown3);
@@ -507858,24 +507890,31 @@ Expecting one of '${allowedValues.join("', '")}'`);
507858
507890
  cmd._checkForConflictingLocalOptions();
507859
507891
  });
507860
507892
  }
507861
- parseOptions(argv) {
507893
+ parseOptions(args) {
507862
507894
  const operands = [];
507863
507895
  const unknown3 = [];
507864
507896
  let dest = operands;
507865
- const args = argv.slice();
507866
507897
  function maybeOption(arg) {
507867
507898
  return arg.length > 1 && arg[0] === "-";
507868
507899
  }
507900
+ const negativeNumberArg = (arg) => {
507901
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg))
507902
+ return false;
507903
+ return !this._getCommandAndAncestors().some((cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short)));
507904
+ };
507869
507905
  let activeVariadicOption = null;
507870
- while (args.length) {
507871
- const arg = args.shift();
507906
+ let activeGroup = null;
507907
+ let i3 = 0;
507908
+ while (i3 < args.length || activeGroup) {
507909
+ const arg = activeGroup ?? args[i3++];
507910
+ activeGroup = null;
507872
507911
  if (arg === "--") {
507873
507912
  if (dest === unknown3)
507874
507913
  dest.push(arg);
507875
- dest.push(...args);
507914
+ dest.push(...args.slice(i3));
507876
507915
  break;
507877
507916
  }
507878
- if (activeVariadicOption && !maybeOption(arg)) {
507917
+ if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
507879
507918
  this.emit(`option:${activeVariadicOption.name()}`, arg);
507880
507919
  continue;
507881
507920
  }
@@ -507884,14 +507923,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
507884
507923
  const option = this._findOption(arg);
507885
507924
  if (option) {
507886
507925
  if (option.required) {
507887
- const value = args.shift();
507926
+ const value = args[i3++];
507888
507927
  if (value === undefined)
507889
507928
  this.optionMissingArgument(option);
507890
507929
  this.emit(`option:${option.name()}`, value);
507891
507930
  } else if (option.optional) {
507892
507931
  let value = null;
507893
- if (args.length > 0 && !maybeOption(args[0])) {
507894
- value = args.shift();
507932
+ if (i3 < args.length && (!maybeOption(args[i3]) || negativeNumberArg(args[i3]))) {
507933
+ value = args[i3++];
507895
507934
  }
507896
507935
  this.emit(`option:${option.name()}`, value);
507897
507936
  } else {
@@ -507908,7 +507947,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507908
507947
  this.emit(`option:${option.name()}`, arg.slice(2));
507909
507948
  } else {
507910
507949
  this.emit(`option:${option.name()}`);
507911
- args.unshift(`-${arg.slice(2)}`);
507950
+ activeGroup = `-${arg.slice(2)}`;
507912
507951
  }
507913
507952
  continue;
507914
507953
  }
@@ -507921,31 +507960,24 @@ Expecting one of '${allowedValues.join("', '")}'`);
507921
507960
  continue;
507922
507961
  }
507923
507962
  }
507924
- if (maybeOption(arg)) {
507963
+ if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
507925
507964
  dest = unknown3;
507926
507965
  }
507927
507966
  if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown3.length === 0) {
507928
507967
  if (this._findCommand(arg)) {
507929
507968
  operands.push(arg);
507930
- if (args.length > 0)
507931
- unknown3.push(...args);
507969
+ unknown3.push(...args.slice(i3));
507932
507970
  break;
507933
507971
  } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
507934
- operands.push(arg);
507935
- if (args.length > 0)
507936
- operands.push(...args);
507972
+ operands.push(arg, ...args.slice(i3));
507937
507973
  break;
507938
507974
  } else if (this._defaultCommandName) {
507939
- unknown3.push(arg);
507940
- if (args.length > 0)
507941
- unknown3.push(...args);
507975
+ unknown3.push(arg, ...args.slice(i3));
507942
507976
  break;
507943
507977
  }
507944
507978
  }
507945
507979
  if (this._passThroughOptions) {
507946
- dest.push(arg);
507947
- if (args.length > 0)
507948
- dest.push(...args);
507980
+ dest.push(arg, ...args.slice(i3));
507949
507981
  break;
507950
507982
  }
507951
507983
  dest.push(arg);
@@ -508156,6 +508188,32 @@ Expecting one of '${allowedValues.join("', '")}'`);
508156
508188
  this._name = str2;
508157
508189
  return this;
508158
508190
  }
508191
+ helpGroup(heading) {
508192
+ if (heading === undefined)
508193
+ return this._helpGroupHeading ?? "";
508194
+ this._helpGroupHeading = heading;
508195
+ return this;
508196
+ }
508197
+ commandsGroup(heading) {
508198
+ if (heading === undefined)
508199
+ return this._defaultCommandGroup ?? "";
508200
+ this._defaultCommandGroup = heading;
508201
+ return this;
508202
+ }
508203
+ optionsGroup(heading) {
508204
+ if (heading === undefined)
508205
+ return this._defaultOptionGroup ?? "";
508206
+ this._defaultOptionGroup = heading;
508207
+ return this;
508208
+ }
508209
+ _initOptionGroup(option) {
508210
+ if (this._defaultOptionGroup && !option.helpGroupHeading)
508211
+ option.helpGroup(this._defaultOptionGroup);
508212
+ }
508213
+ _initCommandGroup(cmd) {
508214
+ if (this._defaultCommandGroup && !cmd.helpGroup())
508215
+ cmd.helpGroup(this._defaultCommandGroup);
508216
+ }
508159
508217
  nameFromFilename(filename) {
508160
508218
  this._name = path25.basename(filename, path25.extname(filename));
508161
508219
  return this;
@@ -508232,15 +508290,19 @@ Expecting one of '${allowedValues.join("', '")}'`);
508232
508290
  helpOption(flags, description) {
508233
508291
  if (typeof flags === "boolean") {
508234
508292
  if (flags) {
508235
- this._helpOption = this._helpOption ?? undefined;
508293
+ if (this._helpOption === null)
508294
+ this._helpOption = undefined;
508295
+ if (this._defaultOptionGroup) {
508296
+ this._initOptionGroup(this._getHelpOption());
508297
+ }
508236
508298
  } else {
508237
508299
  this._helpOption = null;
508238
508300
  }
508239
508301
  return this;
508240
508302
  }
508241
- flags = flags ?? "-h, --help";
508242
- description = description ?? "display help for command";
508243
- this._helpOption = this.createOption(flags, description);
508303
+ this._helpOption = this.createOption(flags ?? "-h, --help", description ?? "display help for command");
508304
+ if (flags || description)
508305
+ this._initOptionGroup(this._helpOption);
508244
508306
  return this;
508245
508307
  }
508246
508308
  _getHelpOption() {
@@ -508251,6 +508313,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
508251
508313
  }
508252
508314
  addHelpOption(option) {
508253
508315
  this._helpOption = option;
508316
+ this._initOptionGroup(option);
508254
508317
  return this;
508255
508318
  }
508256
508319
  help(contextOptions) {
@@ -542613,7 +542676,7 @@ async function initialize4() {
542613
542676
  return path27.split(platformPath2.sep).some((dir) => dir === ".git");
542614
542677
  },
542615
542678
  ignorePermissionErrors: true,
542616
- usePolling: USE_POLLING,
542679
+ usePolling: USE_POLLING2,
542617
542680
  interval: testOverrides2?.chokidarInterval ?? POLLING_INTERVAL_MS,
542618
542681
  atomic: true
542619
542682
  });
@@ -542726,7 +542789,7 @@ async function resetForTesting2(overrides) {
542726
542789
  disposed3 = false;
542727
542790
  testOverrides2 = overrides ?? null;
542728
542791
  }
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;
542792
+ 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
542793
  var init_skillChangeDetector = __esm(() => {
542731
542794
  init_chokidar();
542732
542795
  init_state();
@@ -542738,7 +542801,7 @@ var init_skillChangeDetector = __esm(() => {
542738
542801
  init_debug();
542739
542802
  init_fsOperations();
542740
542803
  init_hooks5();
542741
- USE_POLLING = typeof Bun !== "undefined";
542804
+ USE_POLLING2 = typeof Bun !== "undefined" || process.platform === "win32";
542742
542805
  pendingChangedPaths = new Set;
542743
542806
  skillsChanged = createSignal();
542744
542807
  subscribe2 = skillsChanged.subscribe;
@@ -561199,7 +561262,7 @@ Now that this skill is invoked, you have access to Chrome browser automation too
561199
561262
  IMPORTANT: Start by calling mcp__claude-in-chrome__tabs_context_mcp to get information about the user's current browser tabs.
561200
561263
  `;
561201
561264
  var init_claudeInChrome = __esm(() => {
561202
- init_claude_for_chrome_mcp();
561265
+ init_ant_claude_for_chrome_mcp();
561203
561266
  init_setup2();
561204
561267
  init_bundledSkills();
561205
561268
  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.116",
8
+ BUILD_TIME: "2026-07-21T19:45:42.352Z",
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.116",
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);
@@ -300857,6 +300858,7 @@ function memoizeWithTTL(fn, ttlMs) {
300857
300858
  return refreshPromise;
300858
300859
  } finally {
300859
300860
  release();
300861
+ keyMutexes.delete(key2);
300860
300862
  }
300861
300863
  }
300862
300864
  try {
@@ -300874,6 +300876,7 @@ function memoizeWithTTL(fn, ttlMs) {
300874
300876
  clear: () => {
300875
300877
  originalClear();
300876
300878
  lastCachedAt = 0;
300879
+ keyMutexes.clear();
300877
300880
  }
300878
300881
  };
300879
300882
  return wrapped;
@@ -342102,7 +342105,8 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
342102
342105
  } else {
342103
342106
  let logs2 = null;
342104
342107
  try {
342105
- logs2 = await fetchSessionLogsFromUrl(sessionId, url3, headers);
342108
+ const seq = getOrCreateSequential(sessionId);
342109
+ logs2 = await seq(sessionId, url3, headers, true);
342106
342110
  } catch (fetchError) {
342107
342111
  logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
342108
342112
  logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
@@ -363354,7 +363358,7 @@ var init_color_diff = __esm(() => {
363354
363358
  };
363355
363359
  });
363356
363360
 
363357
- // node_modules/color-diff-napi/index.ts
363361
+ // shims/color-diff-napi/index.ts
363358
363362
  var init_color_diff_napi = __esm(() => {
363359
363363
  init_color_diff();
363360
363364
  });
@@ -409202,7 +409206,7 @@ function prewarm() {
409202
409206
  var cachedModule = null;
409203
409207
  var init_modifiers_napi_src = () => {};
409204
409208
 
409205
- // node_modules/modifiers-napi/index.ts
409209
+ // shims/modifiers-napi/index.ts
409206
409210
  var exports_modifiers_napi = {};
409207
409211
  __export(exports_modifiers_napi, {
409208
409212
  prewarm: () => prewarm,
@@ -483868,7 +483872,7 @@ async function isChromeExtensionInstalled() {
483868
483872
  }
483869
483873
  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
483874
  var init_setup2 = __esm(() => {
483871
- init_claude_for_chrome_mcp();
483875
+ init_ant_claude_for_chrome_mcp();
483872
483876
  init_state();
483873
483877
  init_growthbook();
483874
483878
  init_config();
@@ -505925,7 +505929,7 @@ class DebugLogger {
505925
505929
  }
505926
505930
  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
505931
  var init_mcpServer = __esm(() => {
505928
- init_claude_for_chrome_mcp();
505932
+ init_ant_claude_for_chrome_mcp();
505929
505933
  init_stdio2();
505930
505934
  init_datadog();
505931
505935
  init_firstPartyEventLogger();
@@ -506367,7 +506371,7 @@ var require_argument = __commonJS((exports) => {
506367
506371
  this._name = name;
506368
506372
  break;
506369
506373
  }
506370
- if (this._name.length > 3 && this._name.slice(-3) === "...") {
506374
+ if (this._name.endsWith("...")) {
506371
506375
  this.variadic = true;
506372
506376
  this._name = this._name.slice(0, -3);
506373
506377
  }
@@ -506375,11 +506379,12 @@ var require_argument = __commonJS((exports) => {
506375
506379
  name() {
506376
506380
  return this._name;
506377
506381
  }
506378
- _concatValue(value, previous) {
506382
+ _collectValue(value, previous) {
506379
506383
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506380
506384
  return [value];
506381
506385
  }
506382
- return previous.concat(value);
506386
+ previous.push(value);
506387
+ return previous;
506383
506388
  }
506384
506389
  default(value, description) {
506385
506390
  this.defaultValue = value;
@@ -506397,7 +506402,7 @@ var require_argument = __commonJS((exports) => {
506397
506402
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506398
506403
  }
506399
506404
  if (this.variadic) {
506400
- return this._concatValue(arg, previous);
506405
+ return this._collectValue(arg, previous);
506401
506406
  }
506402
506407
  return arg;
506403
506408
  };
@@ -506562,7 +506567,11 @@ var require_help = __commonJS((exports) => {
506562
506567
  extraInfo.push(`env: ${option.envVar}`);
506563
506568
  }
506564
506569
  if (extraInfo.length > 0) {
506565
- return `${option.description} (${extraInfo.join(", ")})`;
506570
+ const extraDescription = `(${extraInfo.join(", ")})`;
506571
+ if (option.description) {
506572
+ return `${option.description} ${extraDescription}`;
506573
+ }
506574
+ return extraDescription;
506566
506575
  }
506567
506576
  return option.description;
506568
506577
  }
@@ -506583,6 +506592,27 @@ var require_help = __commonJS((exports) => {
506583
506592
  }
506584
506593
  return argument.description;
506585
506594
  }
506595
+ formatItemList(heading, items, helper) {
506596
+ if (items.length === 0)
506597
+ return [];
506598
+ return [helper.styleTitle(heading), ...items, ""];
506599
+ }
506600
+ groupItems(unsortedItems, visibleItems, getGroup) {
506601
+ const result = new Map;
506602
+ unsortedItems.forEach((item) => {
506603
+ const group = getGroup(item);
506604
+ if (!result.has(group))
506605
+ result.set(group, []);
506606
+ });
506607
+ visibleItems.forEach((item) => {
506608
+ const group = getGroup(item);
506609
+ if (!result.has(group)) {
506610
+ result.set(group, []);
506611
+ }
506612
+ result.get(group).push(item);
506613
+ });
506614
+ return result;
506615
+ }
506586
506616
  formatHelp(cmd, helper) {
506587
506617
  const termWidth = helper.padWidth(cmd, helper);
506588
506618
  const helpWidth = helper.helpWidth ?? 80;
@@ -506603,45 +506633,27 @@ var require_help = __commonJS((exports) => {
506603
506633
  const argumentList = helper.visibleArguments(cmd).map((argument) => {
506604
506634
  return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
506605
506635
  });
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)));
506636
+ output = output.concat(this.formatItemList("Arguments:", argumentList, helper));
506637
+ const optionGroups = this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => option.helpGroupHeading ?? "Options:");
506638
+ optionGroups.forEach((options, group) => {
506639
+ const optionList = options.map((option) => {
506640
+ return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506641
+ });
506642
+ output = output.concat(this.formatItemList(group, optionList, helper));
506615
506643
  });
506616
- if (optionList.length > 0) {
506617
- output = output.concat([
506618
- helper.styleTitle("Options:"),
506619
- ...optionList,
506620
- ""
506621
- ]);
506622
- }
506623
506644
  if (helper.showGlobalOptions) {
506624
506645
  const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
506625
506646
  return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
506626
506647
  });
506627
- if (globalOptionList.length > 0) {
506628
- output = output.concat([
506629
- helper.styleTitle("Global Options:"),
506630
- ...globalOptionList,
506631
- ""
506632
- ]);
506633
- }
506648
+ output = output.concat(this.formatItemList("Global Options:", globalOptionList, helper));
506634
506649
  }
506635
- const commandList = helper.visibleCommands(cmd).map((cmd2) => {
506636
- return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(cmd2)), helper.styleSubcommandDescription(helper.subcommandDescription(cmd2)));
506650
+ const commandGroups = this.groupItems(cmd.commands, helper.visibleCommands(cmd), (sub) => sub.helpGroup() || "Commands:");
506651
+ commandGroups.forEach((commands, group) => {
506652
+ const commandList = commands.map((sub) => {
506653
+ return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(sub)), helper.styleSubcommandDescription(helper.subcommandDescription(sub)));
506654
+ });
506655
+ output = output.concat(this.formatItemList(group, commandList, helper));
506637
506656
  });
506638
- if (commandList.length > 0) {
506639
- output = output.concat([
506640
- helper.styleTitle("Commands:"),
506641
- ...commandList,
506642
- ""
506643
- ]);
506644
- }
506645
506657
  return output.join(`
506646
506658
  `);
506647
506659
  }
@@ -506798,6 +506810,7 @@ var require_option = __commonJS((exports) => {
506798
506810
  this.argChoices = undefined;
506799
506811
  this.conflictsWith = [];
506800
506812
  this.implied = undefined;
506813
+ this.helpGroupHeading = undefined;
506801
506814
  }
506802
506815
  default(value, description) {
506803
506816
  this.defaultValue = value;
@@ -506836,11 +506849,12 @@ var require_option = __commonJS((exports) => {
506836
506849
  this.hidden = !!hide;
506837
506850
  return this;
506838
506851
  }
506839
- _concatValue(value, previous) {
506852
+ _collectValue(value, previous) {
506840
506853
  if (previous === this.defaultValue || !Array.isArray(previous)) {
506841
506854
  return [value];
506842
506855
  }
506843
- return previous.concat(value);
506856
+ previous.push(value);
506857
+ return previous;
506844
506858
  }
506845
506859
  choices(values3) {
506846
506860
  this.argChoices = values3.slice();
@@ -506849,7 +506863,7 @@ var require_option = __commonJS((exports) => {
506849
506863
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
506850
506864
  }
506851
506865
  if (this.variadic) {
506852
- return this._concatValue(arg, previous);
506866
+ return this._collectValue(arg, previous);
506853
506867
  }
506854
506868
  return arg;
506855
506869
  };
@@ -506867,6 +506881,10 @@ var require_option = __commonJS((exports) => {
506867
506881
  }
506868
506882
  return camelcase(this.name());
506869
506883
  }
506884
+ helpGroup(heading) {
506885
+ this.helpGroupHeading = heading;
506886
+ return this;
506887
+ }
506870
506888
  is(arg) {
506871
506889
  return this.short === arg || this.long === arg;
506872
506890
  }
@@ -507084,6 +507102,9 @@ var require_command = __commonJS((exports) => {
507084
507102
  this._addImplicitHelpCommand = undefined;
507085
507103
  this._helpCommand = undefined;
507086
507104
  this._helpConfiguration = {};
507105
+ this._helpGroupHeading = undefined;
507106
+ this._defaultCommandGroup = undefined;
507107
+ this._defaultOptionGroup = undefined;
507087
507108
  }
507088
507109
  copyInheritedSettings(sourceCommand) {
507089
507110
  this._outputConfiguration = sourceCommand._outputConfiguration;
@@ -507148,7 +507169,10 @@ var require_command = __commonJS((exports) => {
507148
507169
  configureOutput(configuration) {
507149
507170
  if (configuration === undefined)
507150
507171
  return this._outputConfiguration;
507151
- Object.assign(this._outputConfiguration, configuration);
507172
+ this._outputConfiguration = {
507173
+ ...this._outputConfiguration,
507174
+ ...configuration
507175
+ };
507152
507176
  return this;
507153
507177
  }
507154
507178
  showHelpAfterError(displayHelp = true) {
@@ -507179,12 +507203,12 @@ var require_command = __commonJS((exports) => {
507179
507203
  createArgument(name, description) {
507180
507204
  return new Argument(name, description);
507181
507205
  }
507182
- argument(name, description, fn, defaultValue) {
507206
+ argument(name, description, parseArg, defaultValue) {
507183
507207
  const argument = this.createArgument(name, description);
507184
- if (typeof fn === "function") {
507185
- argument.default(defaultValue).argParser(fn);
507208
+ if (typeof parseArg === "function") {
507209
+ argument.default(defaultValue).argParser(parseArg);
507186
507210
  } else {
507187
- argument.default(fn);
507211
+ argument.default(parseArg);
507188
507212
  }
507189
507213
  this.addArgument(argument);
507190
507214
  return this;
@@ -507197,7 +507221,7 @@ var require_command = __commonJS((exports) => {
507197
507221
  }
507198
507222
  addArgument(argument) {
507199
507223
  const previousArgument = this.registeredArguments.slice(-1)[0];
507200
- if (previousArgument && previousArgument.variadic) {
507224
+ if (previousArgument?.variadic) {
507201
507225
  throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
507202
507226
  }
507203
507227
  if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
@@ -507209,10 +507233,13 @@ var require_command = __commonJS((exports) => {
507209
507233
  helpCommand(enableOrNameAndArgs, description) {
507210
507234
  if (typeof enableOrNameAndArgs === "boolean") {
507211
507235
  this._addImplicitHelpCommand = enableOrNameAndArgs;
507236
+ if (enableOrNameAndArgs && this._defaultCommandGroup) {
507237
+ this._initCommandGroup(this._getHelpCommand());
507238
+ }
507212
507239
  return this;
507213
507240
  }
507214
- enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
507215
- const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
507241
+ const nameAndArgs = enableOrNameAndArgs ?? "help [command]";
507242
+ const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);
507216
507243
  const helpDescription = description ?? "display help for command";
507217
507244
  const helpCommand = this.createCommand(helpName);
507218
507245
  helpCommand.helpOption(false);
@@ -507222,6 +507249,8 @@ var require_command = __commonJS((exports) => {
507222
507249
  helpCommand.description(helpDescription);
507223
507250
  this._addImplicitHelpCommand = true;
507224
507251
  this._helpCommand = helpCommand;
507252
+ if (enableOrNameAndArgs || description)
507253
+ this._initCommandGroup(helpCommand);
507225
507254
  return this;
507226
507255
  }
507227
507256
  addHelpCommand(helpCommand, deprecatedDescription) {
@@ -507231,6 +507260,7 @@ var require_command = __commonJS((exports) => {
507231
507260
  }
507232
507261
  this._addImplicitHelpCommand = true;
507233
507262
  this._helpCommand = helpCommand;
507263
+ this._initCommandGroup(helpCommand);
507234
507264
  return this;
507235
507265
  }
507236
507266
  _getHelpCommand() {
@@ -507310,6 +507340,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507310
507340
  throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
507311
507341
  - already used by option '${matchingOption.flags}'`);
507312
507342
  }
507343
+ this._initOptionGroup(option);
507313
507344
  this.options.push(option);
507314
507345
  }
507315
507346
  _registerCommand(command8) {
@@ -507322,6 +507353,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507322
507353
  const newCmd = knownBy(command8).join("|");
507323
507354
  throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
507324
507355
  }
507356
+ this._initCommandGroup(command8);
507325
507357
  this.commands.push(command8);
507326
507358
  }
507327
507359
  addOption(option) {
@@ -507344,7 +507376,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507344
507376
  if (val !== null && option.parseArg) {
507345
507377
  val = this._callParseArg(option, val, oldValue, invalidValueMessage);
507346
507378
  } else if (val !== null && option.variadic) {
507347
- val = option._concatValue(val, oldValue);
507379
+ val = option._collectValue(val, oldValue);
507348
507380
  }
507349
507381
  if (val == null) {
507350
507382
  if (option.negate) {
@@ -507719,7 +507751,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507719
507751
  this.processedArgs = processedArgs;
507720
507752
  }
507721
507753
  _chainOrCall(promise3, fn) {
507722
- if (promise3 && promise3.then && typeof promise3.then === "function") {
507754
+ if (promise3?.then && typeof promise3.then === "function") {
507723
507755
  return promise3.then(() => fn());
507724
507756
  }
507725
507757
  return fn();
@@ -507796,7 +507828,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507796
507828
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
507797
507829
  return promiseChain;
507798
507830
  }
507799
- if (this.parent && this.parent.listenerCount(commandEvent)) {
507831
+ if (this.parent?.listenerCount(commandEvent)) {
507800
507832
  checkForUnknownOptions();
507801
507833
  this._processArguments();
507802
507834
  this.parent.emit(commandEvent, operands, unknown3);
@@ -507858,24 +507890,31 @@ Expecting one of '${allowedValues.join("', '")}'`);
507858
507890
  cmd._checkForConflictingLocalOptions();
507859
507891
  });
507860
507892
  }
507861
- parseOptions(argv) {
507893
+ parseOptions(args) {
507862
507894
  const operands = [];
507863
507895
  const unknown3 = [];
507864
507896
  let dest = operands;
507865
- const args = argv.slice();
507866
507897
  function maybeOption(arg) {
507867
507898
  return arg.length > 1 && arg[0] === "-";
507868
507899
  }
507900
+ const negativeNumberArg = (arg) => {
507901
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg))
507902
+ return false;
507903
+ return !this._getCommandAndAncestors().some((cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short)));
507904
+ };
507869
507905
  let activeVariadicOption = null;
507870
- while (args.length) {
507871
- const arg = args.shift();
507906
+ let activeGroup = null;
507907
+ let i3 = 0;
507908
+ while (i3 < args.length || activeGroup) {
507909
+ const arg = activeGroup ?? args[i3++];
507910
+ activeGroup = null;
507872
507911
  if (arg === "--") {
507873
507912
  if (dest === unknown3)
507874
507913
  dest.push(arg);
507875
- dest.push(...args);
507914
+ dest.push(...args.slice(i3));
507876
507915
  break;
507877
507916
  }
507878
- if (activeVariadicOption && !maybeOption(arg)) {
507917
+ if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
507879
507918
  this.emit(`option:${activeVariadicOption.name()}`, arg);
507880
507919
  continue;
507881
507920
  }
@@ -507884,14 +507923,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
507884
507923
  const option = this._findOption(arg);
507885
507924
  if (option) {
507886
507925
  if (option.required) {
507887
- const value = args.shift();
507926
+ const value = args[i3++];
507888
507927
  if (value === undefined)
507889
507928
  this.optionMissingArgument(option);
507890
507929
  this.emit(`option:${option.name()}`, value);
507891
507930
  } else if (option.optional) {
507892
507931
  let value = null;
507893
- if (args.length > 0 && !maybeOption(args[0])) {
507894
- value = args.shift();
507932
+ if (i3 < args.length && (!maybeOption(args[i3]) || negativeNumberArg(args[i3]))) {
507933
+ value = args[i3++];
507895
507934
  }
507896
507935
  this.emit(`option:${option.name()}`, value);
507897
507936
  } else {
@@ -507908,7 +507947,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
507908
507947
  this.emit(`option:${option.name()}`, arg.slice(2));
507909
507948
  } else {
507910
507949
  this.emit(`option:${option.name()}`);
507911
- args.unshift(`-${arg.slice(2)}`);
507950
+ activeGroup = `-${arg.slice(2)}`;
507912
507951
  }
507913
507952
  continue;
507914
507953
  }
@@ -507921,31 +507960,24 @@ Expecting one of '${allowedValues.join("', '")}'`);
507921
507960
  continue;
507922
507961
  }
507923
507962
  }
507924
- if (maybeOption(arg)) {
507963
+ if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
507925
507964
  dest = unknown3;
507926
507965
  }
507927
507966
  if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown3.length === 0) {
507928
507967
  if (this._findCommand(arg)) {
507929
507968
  operands.push(arg);
507930
- if (args.length > 0)
507931
- unknown3.push(...args);
507969
+ unknown3.push(...args.slice(i3));
507932
507970
  break;
507933
507971
  } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
507934
- operands.push(arg);
507935
- if (args.length > 0)
507936
- operands.push(...args);
507972
+ operands.push(arg, ...args.slice(i3));
507937
507973
  break;
507938
507974
  } else if (this._defaultCommandName) {
507939
- unknown3.push(arg);
507940
- if (args.length > 0)
507941
- unknown3.push(...args);
507975
+ unknown3.push(arg, ...args.slice(i3));
507942
507976
  break;
507943
507977
  }
507944
507978
  }
507945
507979
  if (this._passThroughOptions) {
507946
- dest.push(arg);
507947
- if (args.length > 0)
507948
- dest.push(...args);
507980
+ dest.push(arg, ...args.slice(i3));
507949
507981
  break;
507950
507982
  }
507951
507983
  dest.push(arg);
@@ -508156,6 +508188,32 @@ Expecting one of '${allowedValues.join("', '")}'`);
508156
508188
  this._name = str2;
508157
508189
  return this;
508158
508190
  }
508191
+ helpGroup(heading) {
508192
+ if (heading === undefined)
508193
+ return this._helpGroupHeading ?? "";
508194
+ this._helpGroupHeading = heading;
508195
+ return this;
508196
+ }
508197
+ commandsGroup(heading) {
508198
+ if (heading === undefined)
508199
+ return this._defaultCommandGroup ?? "";
508200
+ this._defaultCommandGroup = heading;
508201
+ return this;
508202
+ }
508203
+ optionsGroup(heading) {
508204
+ if (heading === undefined)
508205
+ return this._defaultOptionGroup ?? "";
508206
+ this._defaultOptionGroup = heading;
508207
+ return this;
508208
+ }
508209
+ _initOptionGroup(option) {
508210
+ if (this._defaultOptionGroup && !option.helpGroupHeading)
508211
+ option.helpGroup(this._defaultOptionGroup);
508212
+ }
508213
+ _initCommandGroup(cmd) {
508214
+ if (this._defaultCommandGroup && !cmd.helpGroup())
508215
+ cmd.helpGroup(this._defaultCommandGroup);
508216
+ }
508159
508217
  nameFromFilename(filename) {
508160
508218
  this._name = path25.basename(filename, path25.extname(filename));
508161
508219
  return this;
@@ -508232,15 +508290,19 @@ Expecting one of '${allowedValues.join("', '")}'`);
508232
508290
  helpOption(flags, description) {
508233
508291
  if (typeof flags === "boolean") {
508234
508292
  if (flags) {
508235
- this._helpOption = this._helpOption ?? undefined;
508293
+ if (this._helpOption === null)
508294
+ this._helpOption = undefined;
508295
+ if (this._defaultOptionGroup) {
508296
+ this._initOptionGroup(this._getHelpOption());
508297
+ }
508236
508298
  } else {
508237
508299
  this._helpOption = null;
508238
508300
  }
508239
508301
  return this;
508240
508302
  }
508241
- flags = flags ?? "-h, --help";
508242
- description = description ?? "display help for command";
508243
- this._helpOption = this.createOption(flags, description);
508303
+ this._helpOption = this.createOption(flags ?? "-h, --help", description ?? "display help for command");
508304
+ if (flags || description)
508305
+ this._initOptionGroup(this._helpOption);
508244
508306
  return this;
508245
508307
  }
508246
508308
  _getHelpOption() {
@@ -508251,6 +508313,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
508251
508313
  }
508252
508314
  addHelpOption(option) {
508253
508315
  this._helpOption = option;
508316
+ this._initOptionGroup(option);
508254
508317
  return this;
508255
508318
  }
508256
508319
  help(contextOptions) {
@@ -542613,7 +542676,7 @@ async function initialize4() {
542613
542676
  return path27.split(platformPath2.sep).some((dir) => dir === ".git");
542614
542677
  },
542615
542678
  ignorePermissionErrors: true,
542616
- usePolling: USE_POLLING,
542679
+ usePolling: USE_POLLING2,
542617
542680
  interval: testOverrides2?.chokidarInterval ?? POLLING_INTERVAL_MS,
542618
542681
  atomic: true
542619
542682
  });
@@ -542726,7 +542789,7 @@ async function resetForTesting2(overrides) {
542726
542789
  disposed3 = false;
542727
542790
  testOverrides2 = overrides ?? null;
542728
542791
  }
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;
542792
+ 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
542793
  var init_skillChangeDetector = __esm(() => {
542731
542794
  init_chokidar();
542732
542795
  init_state();
@@ -542738,7 +542801,7 @@ var init_skillChangeDetector = __esm(() => {
542738
542801
  init_debug();
542739
542802
  init_fsOperations();
542740
542803
  init_hooks5();
542741
- USE_POLLING = typeof Bun !== "undefined";
542804
+ USE_POLLING2 = typeof Bun !== "undefined" || process.platform === "win32";
542742
542805
  pendingChangedPaths = new Set;
542743
542806
  skillsChanged = createSignal();
542744
542807
  subscribe2 = skillsChanged.subscribe;
@@ -561199,7 +561262,7 @@ Now that this skill is invoked, you have access to Chrome browser automation too
561199
561262
  IMPORTANT: Start by calling mcp__claude-in-chrome__tabs_context_mcp to get information about the user's current browser tabs.
561200
561263
  `;
561201
561264
  var init_claudeInChrome = __esm(() => {
561202
- init_claude_for_chrome_mcp();
561265
+ init_ant_claude_for_chrome_mcp();
561203
561266
  init_setup2();
561204
561267
  init_bundledSkills();
561205
561268
  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.116",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",