@funnycode/myclaude 0.1.109 → 0.1.110

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.109",
8
- BUILD_TIME: "2026-07-20T08:41:51.210Z",
7
+ VERSION: "0.1.110",
8
+ BUILD_TIME: "2026-07-20T12:13:39.137Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117491,7 +117491,7 @@ var package_default;
117491
117491
  var init_package = __esm(() => {
117492
117492
  package_default = {
117493
117493
  name: "@funnycode/myclaude",
117494
- version: "0.1.109",
117494
+ version: "0.1.110",
117495
117495
  private: false,
117496
117496
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117497
117497
  license: "MIT",
@@ -301206,50 +301206,54 @@ function memoizeWithTTL(fn, ttlMs) {
301206
301206
  const memoized = memoize_default(fn);
301207
301207
  const originalClear = memoized.cache.clear.bind(memoized.cache);
301208
301208
  const pendingRefreshes = new Map;
301209
+ const refreshMutex = new Mutex;
301209
301210
  const wrapped = async (...args) => {
301210
301211
  const now2 = Date.now();
301211
301212
  const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
301212
301213
  if (cacheExpired) {
301213
301214
  const key2 = String(args[0] ?? "_default");
301214
- const existing = pendingRefreshes.get(key2);
301215
- if (existing) {
301216
- return existing;
301217
- }
301218
- const refreshPromise = (async () => {
301219
- try {
301220
- const now22 = Date.now();
301221
- if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
301222
- return memoized(...args);
301223
- }
301215
+ const release = await refreshMutex.acquire();
301216
+ try {
301217
+ const existing = pendingRefreshes.get(key2);
301218
+ if (existing) {
301219
+ return existing;
301220
+ }
301221
+ const refreshPromise = (async () => {
301224
301222
  try {
301225
- const freshResult = await fn(...args);
301226
- if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
301227
- originalClear();
301228
- memoized.cache.set(args[0], freshResult);
301229
- lastCachedAt = Date.now();
301230
- return freshResult;
301223
+ const now22 = Date.now();
301224
+ if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
301225
+ return memoized(...args);
301231
301226
  }
301232
- return memoized(...args);
301233
- } catch (error49) {
301234
- return memoized(...args);
301227
+ try {
301228
+ const freshResult = await fn(...args);
301229
+ if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
301230
+ originalClear();
301231
+ memoized.cache.set(args[0], freshResult);
301232
+ lastCachedAt = Date.now();
301233
+ return freshResult;
301234
+ }
301235
+ return memoized(...args);
301236
+ } catch (error49) {
301237
+ return memoized(...args);
301238
+ }
301239
+ } finally {
301240
+ pendingRefreshes.delete(key2);
301235
301241
  }
301236
- } finally {
301237
- pendingRefreshes.delete(key2);
301238
- }
301239
- })();
301240
- pendingRefreshes.set(key2, refreshPromise);
301241
- return refreshPromise;
301242
+ })();
301243
+ pendingRefreshes.set(key2, refreshPromise);
301244
+ return refreshPromise;
301245
+ } finally {
301246
+ release();
301247
+ }
301242
301248
  }
301243
301249
  try {
301244
301250
  const result = await memoized(...args);
301245
301251
  if (result && typeof result === "object" && "success" in result && result.success === true) {
301246
301252
  lastCachedAt = Date.now();
301247
- } else if (result && typeof result === "object" && "success" in result && result.success === false) {
301248
- lastCachedAt = Date.now();
301249
- }
301253
+ } else if (result && typeof result === "object" && "success" in result && result.success === false) {}
301250
301254
  return result;
301251
301255
  } catch (error49) {
301252
- lastCachedAt = Date.now();
301256
+ logError2(error49);
301253
301257
  return { success: false };
301254
301258
  }
301255
301259
  };
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.109",
8
- BUILD_TIME: "2026-07-20T08:41:51.210Z",
7
+ VERSION: "0.1.110",
8
+ BUILD_TIME: "2026-07-20T12:13:39.137Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117491,7 +117491,7 @@ var package_default;
117491
117491
  var init_package = __esm(() => {
117492
117492
  package_default = {
117493
117493
  name: "@funnycode/myclaude",
117494
- version: "0.1.109",
117494
+ version: "0.1.110",
117495
117495
  private: false,
117496
117496
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117497
117497
  license: "MIT",
@@ -301206,50 +301206,54 @@ function memoizeWithTTL(fn, ttlMs) {
301206
301206
  const memoized = memoize_default(fn);
301207
301207
  const originalClear = memoized.cache.clear.bind(memoized.cache);
301208
301208
  const pendingRefreshes = new Map;
301209
+ const refreshMutex = new Mutex;
301209
301210
  const wrapped = async (...args) => {
301210
301211
  const now2 = Date.now();
301211
301212
  const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
301212
301213
  if (cacheExpired) {
301213
301214
  const key2 = String(args[0] ?? "_default");
301214
- const existing = pendingRefreshes.get(key2);
301215
- if (existing) {
301216
- return existing;
301217
- }
301218
- const refreshPromise = (async () => {
301219
- try {
301220
- const now22 = Date.now();
301221
- if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
301222
- return memoized(...args);
301223
- }
301215
+ const release = await refreshMutex.acquire();
301216
+ try {
301217
+ const existing = pendingRefreshes.get(key2);
301218
+ if (existing) {
301219
+ return existing;
301220
+ }
301221
+ const refreshPromise = (async () => {
301224
301222
  try {
301225
- const freshResult = await fn(...args);
301226
- if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
301227
- originalClear();
301228
- memoized.cache.set(args[0], freshResult);
301229
- lastCachedAt = Date.now();
301230
- return freshResult;
301223
+ const now22 = Date.now();
301224
+ if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
301225
+ return memoized(...args);
301231
301226
  }
301232
- return memoized(...args);
301233
- } catch (error49) {
301234
- return memoized(...args);
301227
+ try {
301228
+ const freshResult = await fn(...args);
301229
+ if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
301230
+ originalClear();
301231
+ memoized.cache.set(args[0], freshResult);
301232
+ lastCachedAt = Date.now();
301233
+ return freshResult;
301234
+ }
301235
+ return memoized(...args);
301236
+ } catch (error49) {
301237
+ return memoized(...args);
301238
+ }
301239
+ } finally {
301240
+ pendingRefreshes.delete(key2);
301235
301241
  }
301236
- } finally {
301237
- pendingRefreshes.delete(key2);
301238
- }
301239
- })();
301240
- pendingRefreshes.set(key2, refreshPromise);
301241
- return refreshPromise;
301242
+ })();
301243
+ pendingRefreshes.set(key2, refreshPromise);
301244
+ return refreshPromise;
301245
+ } finally {
301246
+ release();
301247
+ }
301242
301248
  }
301243
301249
  try {
301244
301250
  const result = await memoized(...args);
301245
301251
  if (result && typeof result === "object" && "success" in result && result.success === true) {
301246
301252
  lastCachedAt = Date.now();
301247
- } else if (result && typeof result === "object" && "success" in result && result.success === false) {
301248
- lastCachedAt = Date.now();
301249
- }
301253
+ } else if (result && typeof result === "object" && "success" in result && result.success === false) {}
301250
301254
  return result;
301251
301255
  } catch (error49) {
301252
- lastCachedAt = Date.now();
301256
+ logError2(error49);
301253
301257
  return { success: false };
301254
301258
  }
301255
301259
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.109",
3
+ "version": "0.1.110",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",