@funnycode/myclaude 0.1.108 → 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 +38 -33
- package/dist/myclaude.mjs +38 -33
- package/package.json +1 -1
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.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
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.
|
|
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",
|
|
@@ -210202,12 +210202,13 @@ async function processQueue(agentIdOrSessionId) {
|
|
|
210202
210202
|
logForDebugging(`dumpPrompts.processQueue: callback threw: ${err2}`, { level: "error" });
|
|
210203
210203
|
}
|
|
210204
210204
|
}
|
|
210205
|
+
processingFlags.delete(agentIdOrSessionId);
|
|
210205
210206
|
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210206
210207
|
if (!queue || queue.length === 0) {
|
|
210207
210208
|
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210208
|
-
processingFlags.delete(agentIdOrSessionId);
|
|
210209
210209
|
return;
|
|
210210
210210
|
}
|
|
210211
|
+
return;
|
|
210211
210212
|
}
|
|
210212
210213
|
} catch (err2) {
|
|
210213
210214
|
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
@@ -301205,50 +301206,54 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301205
301206
|
const memoized = memoize_default(fn);
|
|
301206
301207
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301207
301208
|
const pendingRefreshes = new Map;
|
|
301209
|
+
const refreshMutex = new Mutex;
|
|
301208
301210
|
const wrapped = async (...args) => {
|
|
301209
301211
|
const now2 = Date.now();
|
|
301210
301212
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301211
301213
|
if (cacheExpired) {
|
|
301212
301214
|
const key2 = String(args[0] ?? "_default");
|
|
301213
|
-
const
|
|
301214
|
-
|
|
301215
|
-
|
|
301216
|
-
|
|
301217
|
-
|
|
301218
|
-
|
|
301219
|
-
|
|
301220
|
-
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301221
|
-
return memoized(...args);
|
|
301222
|
-
}
|
|
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 () => {
|
|
301223
301222
|
try {
|
|
301224
|
-
const
|
|
301225
|
-
if (
|
|
301226
|
-
|
|
301227
|
-
memoized.cache.set(args[0], freshResult);
|
|
301228
|
-
lastCachedAt = Date.now();
|
|
301229
|
-
return freshResult;
|
|
301223
|
+
const now22 = Date.now();
|
|
301224
|
+
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301225
|
+
return memoized(...args);
|
|
301230
301226
|
}
|
|
301231
|
-
|
|
301232
|
-
|
|
301233
|
-
|
|
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);
|
|
301234
301241
|
}
|
|
301235
|
-
}
|
|
301236
|
-
|
|
301237
|
-
|
|
301238
|
-
}
|
|
301239
|
-
|
|
301240
|
-
|
|
301242
|
+
})();
|
|
301243
|
+
pendingRefreshes.set(key2, refreshPromise);
|
|
301244
|
+
return refreshPromise;
|
|
301245
|
+
} finally {
|
|
301246
|
+
release();
|
|
301247
|
+
}
|
|
301241
301248
|
}
|
|
301242
301249
|
try {
|
|
301243
301250
|
const result = await memoized(...args);
|
|
301244
301251
|
if (result && typeof result === "object" && "success" in result && result.success === true) {
|
|
301245
301252
|
lastCachedAt = Date.now();
|
|
301246
|
-
} else if (result && typeof result === "object" && "success" in result && result.success === false) {
|
|
301247
|
-
lastCachedAt = Date.now();
|
|
301248
|
-
}
|
|
301253
|
+
} else if (result && typeof result === "object" && "success" in result && result.success === false) {}
|
|
301249
301254
|
return result;
|
|
301250
301255
|
} catch (error49) {
|
|
301251
|
-
|
|
301256
|
+
logError2(error49);
|
|
301252
301257
|
return { success: false };
|
|
301253
301258
|
}
|
|
301254
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.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
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.
|
|
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",
|
|
@@ -210202,12 +210202,13 @@ async function processQueue(agentIdOrSessionId) {
|
|
|
210202
210202
|
logForDebugging(`dumpPrompts.processQueue: callback threw: ${err2}`, { level: "error" });
|
|
210203
210203
|
}
|
|
210204
210204
|
}
|
|
210205
|
+
processingFlags.delete(agentIdOrSessionId);
|
|
210205
210206
|
const queue = dumpRequestQueue.get(agentIdOrSessionId);
|
|
210206
210207
|
if (!queue || queue.length === 0) {
|
|
210207
210208
|
dumpRequestQueue.delete(agentIdOrSessionId);
|
|
210208
|
-
processingFlags.delete(agentIdOrSessionId);
|
|
210209
210209
|
return;
|
|
210210
210210
|
}
|
|
210211
|
+
return;
|
|
210211
210212
|
}
|
|
210212
210213
|
} catch (err2) {
|
|
210213
210214
|
logError2(`processQueue: failed for ${agentIdOrSessionId}`, err2);
|
|
@@ -301205,50 +301206,54 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301205
301206
|
const memoized = memoize_default(fn);
|
|
301206
301207
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301207
301208
|
const pendingRefreshes = new Map;
|
|
301209
|
+
const refreshMutex = new Mutex;
|
|
301208
301210
|
const wrapped = async (...args) => {
|
|
301209
301211
|
const now2 = Date.now();
|
|
301210
301212
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301211
301213
|
if (cacheExpired) {
|
|
301212
301214
|
const key2 = String(args[0] ?? "_default");
|
|
301213
|
-
const
|
|
301214
|
-
|
|
301215
|
-
|
|
301216
|
-
|
|
301217
|
-
|
|
301218
|
-
|
|
301219
|
-
|
|
301220
|
-
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301221
|
-
return memoized(...args);
|
|
301222
|
-
}
|
|
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 () => {
|
|
301223
301222
|
try {
|
|
301224
|
-
const
|
|
301225
|
-
if (
|
|
301226
|
-
|
|
301227
|
-
memoized.cache.set(args[0], freshResult);
|
|
301228
|
-
lastCachedAt = Date.now();
|
|
301229
|
-
return freshResult;
|
|
301223
|
+
const now22 = Date.now();
|
|
301224
|
+
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301225
|
+
return memoized(...args);
|
|
301230
301226
|
}
|
|
301231
|
-
|
|
301232
|
-
|
|
301233
|
-
|
|
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);
|
|
301234
301241
|
}
|
|
301235
|
-
}
|
|
301236
|
-
|
|
301237
|
-
|
|
301238
|
-
}
|
|
301239
|
-
|
|
301240
|
-
|
|
301242
|
+
})();
|
|
301243
|
+
pendingRefreshes.set(key2, refreshPromise);
|
|
301244
|
+
return refreshPromise;
|
|
301245
|
+
} finally {
|
|
301246
|
+
release();
|
|
301247
|
+
}
|
|
301241
301248
|
}
|
|
301242
301249
|
try {
|
|
301243
301250
|
const result = await memoized(...args);
|
|
301244
301251
|
if (result && typeof result === "object" && "success" in result && result.success === true) {
|
|
301245
301252
|
lastCachedAt = Date.now();
|
|
301246
|
-
} else if (result && typeof result === "object" && "success" in result && result.success === false) {
|
|
301247
|
-
lastCachedAt = Date.now();
|
|
301248
|
-
}
|
|
301253
|
+
} else if (result && typeof result === "object" && "success" in result && result.success === false) {}
|
|
301249
301254
|
return result;
|
|
301250
301255
|
} catch (error49) {
|
|
301251
|
-
|
|
301256
|
+
logError2(error49);
|
|
301252
301257
|
return { success: false };
|
|
301253
301258
|
}
|
|
301254
301259
|
};
|