@funnycode/myclaude 0.1.119 → 0.1.120
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 +18 -11
- package/dist/myclaude.mjs +18 -11
- 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.120",
|
|
8
|
+
BUILD_TIME: "2026-07-22T22:27:16.931Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117790,7 +117790,7 @@ var package_default;
|
|
|
117790
117790
|
var init_package = __esm(() => {
|
|
117791
117791
|
package_default = {
|
|
117792
117792
|
name: "@funnycode/myclaude",
|
|
117793
|
-
version: "0.1.
|
|
117793
|
+
version: "0.1.120",
|
|
117794
117794
|
private: false,
|
|
117795
117795
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117796
117796
|
license: "MIT",
|
|
@@ -301606,13 +301606,18 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301606
301606
|
return existing;
|
|
301607
301607
|
}
|
|
301608
301608
|
const refreshPromise = (async () => {
|
|
301609
|
+
let timeoutId = null;
|
|
301609
301610
|
try {
|
|
301611
|
+
const timeoutMs = 1e4;
|
|
301612
|
+
const timeoutPromise = new Promise((_2, reject2) => {
|
|
301613
|
+
timeoutId = setTimeout(() => reject2(new Error(`Refresh timeout after ${timeoutMs}ms for key: ${key2}`)), timeoutMs);
|
|
301614
|
+
});
|
|
301610
301615
|
const now22 = Date.now();
|
|
301611
301616
|
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301612
301617
|
return memoized(...args);
|
|
301613
301618
|
}
|
|
301614
301619
|
try {
|
|
301615
|
-
const freshResult = await fn(...args);
|
|
301620
|
+
const freshResult = await Promise.race([fn(...args), timeoutPromise]);
|
|
301616
301621
|
if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
|
|
301617
301622
|
originalClear();
|
|
301618
301623
|
memoized.cache.set(args[0], freshResult);
|
|
@@ -301630,10 +301635,15 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301630
301635
|
return { success: false };
|
|
301631
301636
|
}
|
|
301632
301637
|
} finally {
|
|
301633
|
-
|
|
301638
|
+
if (timeoutId) {
|
|
301639
|
+
clearTimeout(timeoutId);
|
|
301640
|
+
}
|
|
301634
301641
|
}
|
|
301635
301642
|
})();
|
|
301636
301643
|
pendingRefreshes.set(key2, refreshPromise);
|
|
301644
|
+
refreshPromise.finally(() => {
|
|
301645
|
+
pendingRefreshes.delete(key2);
|
|
301646
|
+
});
|
|
301637
301647
|
return refreshPromise;
|
|
301638
301648
|
} finally {
|
|
301639
301649
|
release();
|
|
@@ -342881,7 +342891,7 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
|
|
|
342881
342891
|
} else {
|
|
342882
342892
|
let logs2 = null;
|
|
342883
342893
|
try {
|
|
342884
|
-
logs2 = await
|
|
342894
|
+
logs2 = await fetchSessionLogsFromUrl(sessionId, url3, headers);
|
|
342885
342895
|
} catch (fetchError) {
|
|
342886
342896
|
logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
|
|
342887
342897
|
logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
|
|
@@ -343051,7 +343061,7 @@ async function getTeleportEvents(sessionId, accessToken, orgUUID) {
|
|
|
343051
343061
|
}
|
|
343052
343062
|
}
|
|
343053
343063
|
pages++;
|
|
343054
|
-
if (next_cursor == null) {
|
|
343064
|
+
if (next_cursor == null || typeof next_cursor !== "string" || next_cursor === "") {
|
|
343055
343065
|
break;
|
|
343056
343066
|
}
|
|
343057
343067
|
previousCursor = cursor;
|
|
@@ -343064,7 +343074,7 @@ async function getTeleportEvents(sessionId, accessToken, orgUUID) {
|
|
|
343064
343074
|
logForDebugging(`[teleport] Fetched ${all4.length} events over ${pages} page(s) for ${sessionId}`);
|
|
343065
343075
|
return all4;
|
|
343066
343076
|
}
|
|
343067
|
-
async function
|
|
343077
|
+
async function fetchSessionLogsFromUrl(sessionId, url3, headers) {
|
|
343068
343078
|
try {
|
|
343069
343079
|
const response = await axios_default.get(url3, {
|
|
343070
343080
|
headers,
|
|
@@ -343107,9 +343117,6 @@ async function fetchSessionLogsFromUrlRaw(sessionId, url3, headers) {
|
|
|
343107
343117
|
return null;
|
|
343108
343118
|
}
|
|
343109
343119
|
}
|
|
343110
|
-
async function fetchSessionLogsFromUrl(sessionId, url3, headers) {
|
|
343111
|
-
return fetchSessionLogsFromUrlRaw(sessionId, url3, headers);
|
|
343112
|
-
}
|
|
343113
343120
|
function findLastUuid(logs2) {
|
|
343114
343121
|
if (!logs2) {
|
|
343115
343122
|
return;
|
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.120",
|
|
8
|
+
BUILD_TIME: "2026-07-22T22:27:16.931Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117790,7 +117790,7 @@ var package_default;
|
|
|
117790
117790
|
var init_package = __esm(() => {
|
|
117791
117791
|
package_default = {
|
|
117792
117792
|
name: "@funnycode/myclaude",
|
|
117793
|
-
version: "0.1.
|
|
117793
|
+
version: "0.1.120",
|
|
117794
117794
|
private: false,
|
|
117795
117795
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117796
117796
|
license: "MIT",
|
|
@@ -301606,13 +301606,18 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301606
301606
|
return existing;
|
|
301607
301607
|
}
|
|
301608
301608
|
const refreshPromise = (async () => {
|
|
301609
|
+
let timeoutId = null;
|
|
301609
301610
|
try {
|
|
301611
|
+
const timeoutMs = 1e4;
|
|
301612
|
+
const timeoutPromise = new Promise((_2, reject2) => {
|
|
301613
|
+
timeoutId = setTimeout(() => reject2(new Error(`Refresh timeout after ${timeoutMs}ms for key: ${key2}`)), timeoutMs);
|
|
301614
|
+
});
|
|
301610
301615
|
const now22 = Date.now();
|
|
301611
301616
|
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301612
301617
|
return memoized(...args);
|
|
301613
301618
|
}
|
|
301614
301619
|
try {
|
|
301615
|
-
const freshResult = await fn(...args);
|
|
301620
|
+
const freshResult = await Promise.race([fn(...args), timeoutPromise]);
|
|
301616
301621
|
if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
|
|
301617
301622
|
originalClear();
|
|
301618
301623
|
memoized.cache.set(args[0], freshResult);
|
|
@@ -301630,10 +301635,15 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301630
301635
|
return { success: false };
|
|
301631
301636
|
}
|
|
301632
301637
|
} finally {
|
|
301633
|
-
|
|
301638
|
+
if (timeoutId) {
|
|
301639
|
+
clearTimeout(timeoutId);
|
|
301640
|
+
}
|
|
301634
301641
|
}
|
|
301635
301642
|
})();
|
|
301636
301643
|
pendingRefreshes.set(key2, refreshPromise);
|
|
301644
|
+
refreshPromise.finally(() => {
|
|
301645
|
+
pendingRefreshes.delete(key2);
|
|
301646
|
+
});
|
|
301637
301647
|
return refreshPromise;
|
|
301638
301648
|
} finally {
|
|
301639
301649
|
release();
|
|
@@ -342881,7 +342891,7 @@ async function appendSessionLogImpl(sessionId, entry, url3, headers) {
|
|
|
342881
342891
|
} else {
|
|
342882
342892
|
let logs2 = null;
|
|
342883
342893
|
try {
|
|
342884
|
-
logs2 = await
|
|
342894
|
+
logs2 = await fetchSessionLogsFromUrl(sessionId, url3, headers);
|
|
342885
342895
|
} catch (fetchError) {
|
|
342886
342896
|
logError2(new Error(`Session 409: fetch failed for session ${sessionId}, entry ${entry.uuid}: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`));
|
|
342887
342897
|
logForDiagnosticsNoPII("error", "session_persist_409_fetch_fail");
|
|
@@ -343051,7 +343061,7 @@ async function getTeleportEvents(sessionId, accessToken, orgUUID) {
|
|
|
343051
343061
|
}
|
|
343052
343062
|
}
|
|
343053
343063
|
pages++;
|
|
343054
|
-
if (next_cursor == null) {
|
|
343064
|
+
if (next_cursor == null || typeof next_cursor !== "string" || next_cursor === "") {
|
|
343055
343065
|
break;
|
|
343056
343066
|
}
|
|
343057
343067
|
previousCursor = cursor;
|
|
@@ -343064,7 +343074,7 @@ async function getTeleportEvents(sessionId, accessToken, orgUUID) {
|
|
|
343064
343074
|
logForDebugging(`[teleport] Fetched ${all4.length} events over ${pages} page(s) for ${sessionId}`);
|
|
343065
343075
|
return all4;
|
|
343066
343076
|
}
|
|
343067
|
-
async function
|
|
343077
|
+
async function fetchSessionLogsFromUrl(sessionId, url3, headers) {
|
|
343068
343078
|
try {
|
|
343069
343079
|
const response = await axios_default.get(url3, {
|
|
343070
343080
|
headers,
|
|
@@ -343107,9 +343117,6 @@ async function fetchSessionLogsFromUrlRaw(sessionId, url3, headers) {
|
|
|
343107
343117
|
return null;
|
|
343108
343118
|
}
|
|
343109
343119
|
}
|
|
343110
|
-
async function fetchSessionLogsFromUrl(sessionId, url3, headers) {
|
|
343111
|
-
return fetchSessionLogsFromUrlRaw(sessionId, url3, headers);
|
|
343112
|
-
}
|
|
343113
343120
|
function findLastUuid(logs2) {
|
|
343114
343121
|
if (!logs2) {
|
|
343115
343122
|
return;
|