@funnycode/myclaude 0.1.91 → 0.1.92

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.91",
8
- BUILD_TIME: "2026-07-17T20:20:49.267Z",
7
+ VERSION: "0.1.92",
8
+ BUILD_TIME: "2026-07-17T23:07:28.667Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117484,7 +117484,7 @@ var package_default;
117484
117484
  var init_package = __esm(() => {
117485
117485
  package_default = {
117486
117486
  name: "@funnycode/myclaude",
117487
- version: "0.1.91",
117487
+ version: "0.1.92",
117488
117488
  private: false,
117489
117489
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117490
117490
  license: "MIT",
@@ -210345,8 +210345,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210345
210345
  } else {
210346
210346
  data = await cloned.json();
210347
210347
  }
210348
- await fs11.appendFile(filePath, jsonStringify({ type: "response", timestamp, data }) + `
210349
- `);
210348
+ await appendToFile(filePath, [
210349
+ jsonStringify({ type: "response", timestamp, data })
210350
+ ]);
210350
210351
  } catch (err2) {
210351
210352
  try {
210352
210353
  logForDebugging(`dumpPrompts.response handler error: ${err2}`, { level: "error" });
@@ -301210,11 +301211,13 @@ async function isQualifiedForGrove() {
301210
301211
  return cachedEntry.grove_enabled;
301211
301212
  }
301212
301213
  async function fetchAndStoreGroveConfig(accountId) {
301214
+ const mapRelease = await groveConfigMapMutex.acquire();
301213
301215
  let mutex = groveConfigMutexes.get(accountId);
301214
301216
  if (!mutex) {
301215
301217
  mutex = new Mutex;
301216
301218
  groveConfigMutexes.set(accountId, mutex);
301217
301219
  }
301220
+ mapRelease();
301218
301221
  const release = await mutex.acquire();
301219
301222
  try {
301220
301223
  const result = await getGroveNoticeConfig();
@@ -301293,7 +301296,7 @@ An update to our Consumer Terms and Privacy Policy will take effect on October 8
301293
301296
  }
301294
301297
  }
301295
301298
  }
301296
- var groveConfigMutexes, GROVE_CACHE_EXPIRATION_MS, GROVE_API_TIMEOUT_MS, getGroveSettings, getGroveNoticeConfig;
301299
+ var groveConfigMutexes, groveConfigMapMutex, GROVE_CACHE_EXPIRATION_MS, GROVE_API_TIMEOUT_MS, getGroveSettings, getGroveNoticeConfig;
301297
301300
  var init_grove = __esm(() => {
301298
301301
  init_axios2();
301299
301302
  init_memoize();
@@ -301307,6 +301310,7 @@ var init_grove = __esm(() => {
301307
301310
  init_log3();
301308
301311
  init_async_mutex();
301309
301312
  groveConfigMutexes = new Map;
301313
+ groveConfigMapMutex = new Mutex;
301310
301314
  GROVE_CACHE_EXPIRATION_MS = 24 * 60 * 60 * 1000;
301311
301315
  GROVE_API_TIMEOUT_MS = parseInt(process.env.GROVE_API_TIMEOUT_MS ?? "3000", 10);
301312
301316
  getGroveSettings = memoizeWithTTL(async () => {
@@ -453850,14 +453854,16 @@ async function fetchAndStorePassesEligibility() {
453850
453854
  if (!orgId) {
453851
453855
  return null;
453852
453856
  }
453853
- if (fetchInProgress) {
453854
- logForDebugging("Passes: Reusing in-flight eligibility fetch");
453855
- return fetchInProgress;
453857
+ const existingPromise = fetchInProgressMap.get(orgId);
453858
+ if (existingPromise) {
453859
+ logForDebugging(`Passes: Reusing in-flight eligibility fetch for org ${orgId}`);
453860
+ return existingPromise;
453856
453861
  }
453857
453862
  let resolvePromise;
453858
- fetchInProgress = new Promise((resolve47) => {
453863
+ const promise3 = new Promise((resolve47) => {
453859
453864
  resolvePromise = resolve47;
453860
453865
  });
453866
+ fetchInProgressMap.set(orgId, promise3);
453861
453867
  (async () => {
453862
453868
  try {
453863
453869
  const response = await fetchReferralEligibility();
@@ -453879,10 +453885,10 @@ async function fetchAndStorePassesEligibility() {
453879
453885
  logError2(error49);
453880
453886
  resolvePromise(null);
453881
453887
  } finally {
453882
- fetchInProgress = null;
453888
+ fetchInProgressMap.delete(orgId);
453883
453889
  }
453884
453890
  })();
453885
- return fetchInProgress;
453891
+ return promise3;
453886
453892
  }
453887
453893
  async function getCachedOrFetchPassesEligibility() {
453888
453894
  if (!shouldCheckForPasses()) {
@@ -453916,7 +453922,7 @@ async function prefetchPassesEligibility() {
453916
453922
  }
453917
453923
  getCachedOrFetchPassesEligibility().catch(() => {});
453918
453924
  }
453919
- var CACHE_EXPIRATION_MS, fetchInProgress = null, CURRENCY_SYMBOLS;
453925
+ var CACHE_EXPIRATION_MS, fetchInProgressMap, CURRENCY_SYMBOLS;
453920
453926
  var init_referral = __esm(() => {
453921
453927
  init_axios2();
453922
453928
  init_oauth();
@@ -453926,6 +453932,7 @@ var init_referral = __esm(() => {
453926
453932
  init_log3();
453927
453933
  init_api2();
453928
453934
  CACHE_EXPIRATION_MS = 24 * 60 * 60 * 1000;
453935
+ fetchInProgressMap = new Map;
453929
453936
  CURRENCY_SYMBOLS = {
453930
453937
  USD: "$",
453931
453938
  EUR: "€",
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.91",
8
- BUILD_TIME: "2026-07-17T20:20:49.267Z",
7
+ VERSION: "0.1.92",
8
+ BUILD_TIME: "2026-07-17T23:07:28.667Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117484,7 +117484,7 @@ var package_default;
117484
117484
  var init_package = __esm(() => {
117485
117485
  package_default = {
117486
117486
  name: "@funnycode/myclaude",
117487
- version: "0.1.91",
117487
+ version: "0.1.92",
117488
117488
  private: false,
117489
117489
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117490
117490
  license: "MIT",
@@ -210345,8 +210345,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210345
210345
  } else {
210346
210346
  data = await cloned.json();
210347
210347
  }
210348
- await fs11.appendFile(filePath, jsonStringify({ type: "response", timestamp, data }) + `
210349
- `);
210348
+ await appendToFile(filePath, [
210349
+ jsonStringify({ type: "response", timestamp, data })
210350
+ ]);
210350
210351
  } catch (err2) {
210351
210352
  try {
210352
210353
  logForDebugging(`dumpPrompts.response handler error: ${err2}`, { level: "error" });
@@ -301210,11 +301211,13 @@ async function isQualifiedForGrove() {
301210
301211
  return cachedEntry.grove_enabled;
301211
301212
  }
301212
301213
  async function fetchAndStoreGroveConfig(accountId) {
301214
+ const mapRelease = await groveConfigMapMutex.acquire();
301213
301215
  let mutex = groveConfigMutexes.get(accountId);
301214
301216
  if (!mutex) {
301215
301217
  mutex = new Mutex;
301216
301218
  groveConfigMutexes.set(accountId, mutex);
301217
301219
  }
301220
+ mapRelease();
301218
301221
  const release = await mutex.acquire();
301219
301222
  try {
301220
301223
  const result = await getGroveNoticeConfig();
@@ -301293,7 +301296,7 @@ An update to our Consumer Terms and Privacy Policy will take effect on October 8
301293
301296
  }
301294
301297
  }
301295
301298
  }
301296
- var groveConfigMutexes, GROVE_CACHE_EXPIRATION_MS, GROVE_API_TIMEOUT_MS, getGroveSettings, getGroveNoticeConfig;
301299
+ var groveConfigMutexes, groveConfigMapMutex, GROVE_CACHE_EXPIRATION_MS, GROVE_API_TIMEOUT_MS, getGroveSettings, getGroveNoticeConfig;
301297
301300
  var init_grove = __esm(() => {
301298
301301
  init_axios2();
301299
301302
  init_memoize();
@@ -301307,6 +301310,7 @@ var init_grove = __esm(() => {
301307
301310
  init_log3();
301308
301311
  init_async_mutex();
301309
301312
  groveConfigMutexes = new Map;
301313
+ groveConfigMapMutex = new Mutex;
301310
301314
  GROVE_CACHE_EXPIRATION_MS = 24 * 60 * 60 * 1000;
301311
301315
  GROVE_API_TIMEOUT_MS = parseInt(process.env.GROVE_API_TIMEOUT_MS ?? "3000", 10);
301312
301316
  getGroveSettings = memoizeWithTTL(async () => {
@@ -453850,14 +453854,16 @@ async function fetchAndStorePassesEligibility() {
453850
453854
  if (!orgId) {
453851
453855
  return null;
453852
453856
  }
453853
- if (fetchInProgress) {
453854
- logForDebugging("Passes: Reusing in-flight eligibility fetch");
453855
- return fetchInProgress;
453857
+ const existingPromise = fetchInProgressMap.get(orgId);
453858
+ if (existingPromise) {
453859
+ logForDebugging(`Passes: Reusing in-flight eligibility fetch for org ${orgId}`);
453860
+ return existingPromise;
453856
453861
  }
453857
453862
  let resolvePromise;
453858
- fetchInProgress = new Promise((resolve47) => {
453863
+ const promise3 = new Promise((resolve47) => {
453859
453864
  resolvePromise = resolve47;
453860
453865
  });
453866
+ fetchInProgressMap.set(orgId, promise3);
453861
453867
  (async () => {
453862
453868
  try {
453863
453869
  const response = await fetchReferralEligibility();
@@ -453879,10 +453885,10 @@ async function fetchAndStorePassesEligibility() {
453879
453885
  logError2(error49);
453880
453886
  resolvePromise(null);
453881
453887
  } finally {
453882
- fetchInProgress = null;
453888
+ fetchInProgressMap.delete(orgId);
453883
453889
  }
453884
453890
  })();
453885
- return fetchInProgress;
453891
+ return promise3;
453886
453892
  }
453887
453893
  async function getCachedOrFetchPassesEligibility() {
453888
453894
  if (!shouldCheckForPasses()) {
@@ -453916,7 +453922,7 @@ async function prefetchPassesEligibility() {
453916
453922
  }
453917
453923
  getCachedOrFetchPassesEligibility().catch(() => {});
453918
453924
  }
453919
- var CACHE_EXPIRATION_MS, fetchInProgress = null, CURRENCY_SYMBOLS;
453925
+ var CACHE_EXPIRATION_MS, fetchInProgressMap, CURRENCY_SYMBOLS;
453920
453926
  var init_referral = __esm(() => {
453921
453927
  init_axios2();
453922
453928
  init_oauth();
@@ -453926,6 +453932,7 @@ var init_referral = __esm(() => {
453926
453932
  init_log3();
453927
453933
  init_api2();
453928
453934
  CACHE_EXPIRATION_MS = 24 * 60 * 60 * 1000;
453935
+ fetchInProgressMap = new Map;
453929
453936
  CURRENCY_SYMBOLS = {
453930
453937
  USD: "$",
453931
453938
  EUR: "€",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.91",
3
+ "version": "0.1.92",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",