@funnycode/myclaude 0.1.103 → 0.1.104
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 +15 -4
- package/dist/myclaude.mjs +15 -4
- 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.104",
|
|
8
|
+
BUILD_TIME: "2026-07-19T15:30:42.756Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -38380,6 +38380,7 @@ var init_log3 = __esm(() => {
|
|
|
38380
38380
|
function sequential(fn) {
|
|
38381
38381
|
const queue = [];
|
|
38382
38382
|
let processing = false;
|
|
38383
|
+
let reentrantCount = 0;
|
|
38383
38384
|
async function processQueue() {
|
|
38384
38385
|
if (processing)
|
|
38385
38386
|
return;
|
|
@@ -38389,10 +38390,13 @@ function sequential(fn) {
|
|
|
38389
38390
|
while (queue.length > 0) {
|
|
38390
38391
|
const { args, resolve: resolve5, reject, context } = queue.shift();
|
|
38391
38392
|
try {
|
|
38393
|
+
reentrantCount++;
|
|
38392
38394
|
const result = await fn.apply(context, args);
|
|
38393
38395
|
resolve5(result);
|
|
38394
38396
|
} catch (error49) {
|
|
38395
38397
|
reject(error49);
|
|
38398
|
+
} finally {
|
|
38399
|
+
reentrantCount--;
|
|
38396
38400
|
}
|
|
38397
38401
|
}
|
|
38398
38402
|
processing = false;
|
|
@@ -38401,6 +38405,9 @@ function sequential(fn) {
|
|
|
38401
38405
|
}
|
|
38402
38406
|
}
|
|
38403
38407
|
return function(...args) {
|
|
38408
|
+
if (reentrantCount > 0) {
|
|
38409
|
+
return fn.apply(this, args);
|
|
38410
|
+
}
|
|
38404
38411
|
return new Promise((resolve5, reject) => {
|
|
38405
38412
|
queue.push({ args, resolve: resolve5, reject, context: this });
|
|
38406
38413
|
processQueue();
|
|
@@ -117484,7 +117491,7 @@ var package_default;
|
|
|
117484
117491
|
var init_package = __esm(() => {
|
|
117485
117492
|
package_default = {
|
|
117486
117493
|
name: "@funnycode/myclaude",
|
|
117487
|
-
version: "0.1.
|
|
117494
|
+
version: "0.1.104",
|
|
117488
117495
|
private: false,
|
|
117489
117496
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117490
117497
|
license: "MIT",
|
|
@@ -301159,16 +301166,19 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301159
301166
|
const memoized = memoize_default(fn);
|
|
301160
301167
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301161
301168
|
const refreshMutexes = new Map;
|
|
301169
|
+
const refreshMapMutex = new Mutex;
|
|
301162
301170
|
const wrapped = async (...args) => {
|
|
301163
301171
|
const now2 = Date.now();
|
|
301164
301172
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301165
301173
|
if (cacheExpired) {
|
|
301166
301174
|
const key2 = String(args[0] ?? "_default");
|
|
301175
|
+
const mapRelease = await refreshMapMutex.acquire();
|
|
301167
301176
|
let mutex = refreshMutexes.get(key2);
|
|
301168
301177
|
if (!mutex) {
|
|
301169
301178
|
mutex = new Mutex;
|
|
301170
301179
|
refreshMutexes.set(key2, mutex);
|
|
301171
301180
|
}
|
|
301181
|
+
mapRelease();
|
|
301172
301182
|
const release = await mutex.acquire();
|
|
301173
301183
|
try {
|
|
301174
301184
|
const now22 = Date.now();
|
|
@@ -342433,7 +342443,8 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
|
|
|
342433
342443
|
} else {
|
|
342434
342444
|
let logs2 = null;
|
|
342435
342445
|
try {
|
|
342436
|
-
|
|
342446
|
+
const sequentialWrapper = getOrCreateSequential(sessionId);
|
|
342447
|
+
logs2 = await sequentialWrapper(sessionId, url3, headers, true);
|
|
342437
342448
|
} catch (fetchError) {
|
|
342438
342449
|
logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
|
|
342439
342450
|
logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
|
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.104",
|
|
8
|
+
BUILD_TIME: "2026-07-19T15:30:42.756Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -38380,6 +38380,7 @@ var init_log3 = __esm(() => {
|
|
|
38380
38380
|
function sequential(fn) {
|
|
38381
38381
|
const queue = [];
|
|
38382
38382
|
let processing = false;
|
|
38383
|
+
let reentrantCount = 0;
|
|
38383
38384
|
async function processQueue() {
|
|
38384
38385
|
if (processing)
|
|
38385
38386
|
return;
|
|
@@ -38389,10 +38390,13 @@ function sequential(fn) {
|
|
|
38389
38390
|
while (queue.length > 0) {
|
|
38390
38391
|
const { args, resolve: resolve5, reject, context } = queue.shift();
|
|
38391
38392
|
try {
|
|
38393
|
+
reentrantCount++;
|
|
38392
38394
|
const result = await fn.apply(context, args);
|
|
38393
38395
|
resolve5(result);
|
|
38394
38396
|
} catch (error49) {
|
|
38395
38397
|
reject(error49);
|
|
38398
|
+
} finally {
|
|
38399
|
+
reentrantCount--;
|
|
38396
38400
|
}
|
|
38397
38401
|
}
|
|
38398
38402
|
processing = false;
|
|
@@ -38401,6 +38405,9 @@ function sequential(fn) {
|
|
|
38401
38405
|
}
|
|
38402
38406
|
}
|
|
38403
38407
|
return function(...args) {
|
|
38408
|
+
if (reentrantCount > 0) {
|
|
38409
|
+
return fn.apply(this, args);
|
|
38410
|
+
}
|
|
38404
38411
|
return new Promise((resolve5, reject) => {
|
|
38405
38412
|
queue.push({ args, resolve: resolve5, reject, context: this });
|
|
38406
38413
|
processQueue();
|
|
@@ -117484,7 +117491,7 @@ var package_default;
|
|
|
117484
117491
|
var init_package = __esm(() => {
|
|
117485
117492
|
package_default = {
|
|
117486
117493
|
name: "@funnycode/myclaude",
|
|
117487
|
-
version: "0.1.
|
|
117494
|
+
version: "0.1.104",
|
|
117488
117495
|
private: false,
|
|
117489
117496
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117490
117497
|
license: "MIT",
|
|
@@ -301159,16 +301166,19 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301159
301166
|
const memoized = memoize_default(fn);
|
|
301160
301167
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301161
301168
|
const refreshMutexes = new Map;
|
|
301169
|
+
const refreshMapMutex = new Mutex;
|
|
301162
301170
|
const wrapped = async (...args) => {
|
|
301163
301171
|
const now2 = Date.now();
|
|
301164
301172
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301165
301173
|
if (cacheExpired) {
|
|
301166
301174
|
const key2 = String(args[0] ?? "_default");
|
|
301175
|
+
const mapRelease = await refreshMapMutex.acquire();
|
|
301167
301176
|
let mutex = refreshMutexes.get(key2);
|
|
301168
301177
|
if (!mutex) {
|
|
301169
301178
|
mutex = new Mutex;
|
|
301170
301179
|
refreshMutexes.set(key2, mutex);
|
|
301171
301180
|
}
|
|
301181
|
+
mapRelease();
|
|
301172
301182
|
const release = await mutex.acquire();
|
|
301173
301183
|
try {
|
|
301174
301184
|
const now22 = Date.now();
|
|
@@ -342433,7 +342443,8 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
|
|
|
342433
342443
|
} else {
|
|
342434
342444
|
let logs2 = null;
|
|
342435
342445
|
try {
|
|
342436
|
-
|
|
342446
|
+
const sequentialWrapper = getOrCreateSequential(sessionId);
|
|
342447
|
+
logs2 = await sequentialWrapper(sessionId, url3, headers, true);
|
|
342437
342448
|
} catch (fetchError) {
|
|
342438
342449
|
logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
|
|
342439
342450
|
logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
|