@funnycode/myclaude 0.1.84 → 0.1.86

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.84",
8
- BUILD_TIME: "2026-07-16T20:17:47.229Z",
7
+ VERSION: "0.1.86",
8
+ BUILD_TIME: "2026-07-17T00:07:06.766Z",
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.84",
117487
+ version: "0.1.86",
117488
117488
  private: false,
117489
117489
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117490
117490
  license: "MIT",
@@ -210237,7 +210237,11 @@ function dumpRequest(body, ts, state, filePath) {
210237
210237
  }
210238
210238
  for (const msg of messages.slice(state.messageCountSeen)) {
210239
210239
  if (msg.role === "user") {
210240
- entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
210240
+ try {
210241
+ entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
210242
+ } catch (err2) {
210243
+ logError2(`dumpPrompts.dumpRequest: failed to stringify message: ${err2}`);
210244
+ }
210241
210245
  }
210242
210246
  }
210243
210247
  if (shouldWriteInitData) {
@@ -210334,6 +210338,7 @@ var init_dumpPrompts = __esm(() => {
210334
210338
  init_envUtils();
210335
210339
  init_slowOperations();
210336
210340
  init_debug();
210341
+ init_log3();
210337
210342
  cachedApiRequests = [];
210338
210343
  dumpState = new Map;
210339
210344
  dumpRequestQueue = new Map;
@@ -300937,39 +300942,41 @@ async function isQualifiedForGrove() {
300937
300942
  return cachedEntry.grove_enabled;
300938
300943
  }
300939
300944
  async function fetchAndStoreGroveConfig(accountId) {
300940
- const existing = groveConfigLocks.get(accountId) ?? Promise.resolve();
300941
- const next = existing.then(async () => {
300942
- try {
300943
- const result = await getGroveNoticeConfig();
300944
- if (!result.success) {
300945
- return;
300946
- }
300947
- const groveEnabled = result.data.grove_enabled;
300948
- const cachedEntry = getGlobalConfig().groveConfigCache?.[accountId];
300949
- if (cachedEntry?.grove_enabled === groveEnabled && Date.now() - cachedEntry.timestamp <= GROVE_CACHE_EXPIRATION_MS) {
300950
- return;
300951
- }
300952
- saveGlobalConfig((current) => ({
300953
- ...current,
300954
- groveConfigCache: {
300955
- ...current.groveConfigCache,
300956
- [accountId]: {
300957
- grove_enabled: groveEnabled,
300958
- timestamp: Date.now()
300959
- }
300960
- }
300961
- }));
300962
- } catch (err2) {
300963
- logForDebugging(`Grove: Failed to fetch and store config: ${err2}`);
300964
- }
300945
+ let releaseLock;
300946
+ const lockPromise = new Promise((resolve28) => {
300947
+ releaseLock = resolve28;
300965
300948
  });
300966
- groveConfigLocks.set(accountId, next);
300967
- next.then(() => {
300968
- if (groveConfigLocks.get(accountId) === next) {
300949
+ const previous = groveConfigLocks.get(accountId) ?? Promise.resolve();
300950
+ groveConfigLocks.set(accountId, lockPromise);
300951
+ await previous;
300952
+ try {
300953
+ const result = await getGroveNoticeConfig();
300954
+ if (!result.success) {
300955
+ return;
300956
+ }
300957
+ const groveEnabled = result.data.grove_enabled;
300958
+ const cachedEntry = getGlobalConfig().groveConfigCache?.[accountId];
300959
+ if (cachedEntry?.grove_enabled === groveEnabled && Date.now() - cachedEntry.timestamp <= GROVE_CACHE_EXPIRATION_MS) {
300960
+ return;
300961
+ }
300962
+ saveGlobalConfig((current) => ({
300963
+ ...current,
300964
+ groveConfigCache: {
300965
+ ...current.groveConfigCache,
300966
+ [accountId]: {
300967
+ grove_enabled: groveEnabled,
300968
+ timestamp: Date.now()
300969
+ }
300970
+ }
300971
+ }));
300972
+ } catch (err2) {
300973
+ logForDebugging(`Grove: Failed to fetch and store config: ${err2}`);
300974
+ } finally {
300975
+ releaseLock();
300976
+ if (groveConfigLocks.get(accountId) === lockPromise) {
300969
300977
  groveConfigLocks.delete(accountId);
300970
300978
  }
300971
- });
300972
- await next;
300979
+ }
300973
300980
  }
300974
300981
  function calculateShouldShowGrove(settingsResult, configResult, showIfAlreadyViewed) {
300975
300982
  if (!settingsResult.success || !configResult.success) {
@@ -342261,7 +342268,13 @@ function findLastUuid(logs2) {
342261
342268
  if (!logs2) {
342262
342269
  return;
342263
342270
  }
342264
- const entry = logs2.findLast((e) => ("uuid" in e) && e.uuid);
342271
+ let entry;
342272
+ for (let i3 = logs2.length - 1;i3 >= 0; i3--) {
342273
+ if ("uuid" in logs2[i3] && logs2[i3].uuid) {
342274
+ entry = logs2[i3];
342275
+ break;
342276
+ }
342277
+ }
342265
342278
  return entry && "uuid" in entry ? entry.uuid : undefined;
342266
342279
  }
342267
342280
  function clearAllSessions() {
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.84",
8
- BUILD_TIME: "2026-07-16T20:17:47.229Z",
7
+ VERSION: "0.1.86",
8
+ BUILD_TIME: "2026-07-17T00:07:06.766Z",
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.84",
117487
+ version: "0.1.86",
117488
117488
  private: false,
117489
117489
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117490
117490
  license: "MIT",
@@ -210237,7 +210237,11 @@ function dumpRequest(body, ts, state, filePath) {
210237
210237
  }
210238
210238
  for (const msg of messages.slice(state.messageCountSeen)) {
210239
210239
  if (msg.role === "user") {
210240
- entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
210240
+ try {
210241
+ entries.push(jsonStringify({ type: "message", timestamp: ts, data: msg }));
210242
+ } catch (err2) {
210243
+ logError2(`dumpPrompts.dumpRequest: failed to stringify message: ${err2}`);
210244
+ }
210241
210245
  }
210242
210246
  }
210243
210247
  if (shouldWriteInitData) {
@@ -210334,6 +210338,7 @@ var init_dumpPrompts = __esm(() => {
210334
210338
  init_envUtils();
210335
210339
  init_slowOperations();
210336
210340
  init_debug();
210341
+ init_log3();
210337
210342
  cachedApiRequests = [];
210338
210343
  dumpState = new Map;
210339
210344
  dumpRequestQueue = new Map;
@@ -300937,39 +300942,41 @@ async function isQualifiedForGrove() {
300937
300942
  return cachedEntry.grove_enabled;
300938
300943
  }
300939
300944
  async function fetchAndStoreGroveConfig(accountId) {
300940
- const existing = groveConfigLocks.get(accountId) ?? Promise.resolve();
300941
- const next = existing.then(async () => {
300942
- try {
300943
- const result = await getGroveNoticeConfig();
300944
- if (!result.success) {
300945
- return;
300946
- }
300947
- const groveEnabled = result.data.grove_enabled;
300948
- const cachedEntry = getGlobalConfig().groveConfigCache?.[accountId];
300949
- if (cachedEntry?.grove_enabled === groveEnabled && Date.now() - cachedEntry.timestamp <= GROVE_CACHE_EXPIRATION_MS) {
300950
- return;
300951
- }
300952
- saveGlobalConfig((current) => ({
300953
- ...current,
300954
- groveConfigCache: {
300955
- ...current.groveConfigCache,
300956
- [accountId]: {
300957
- grove_enabled: groveEnabled,
300958
- timestamp: Date.now()
300959
- }
300960
- }
300961
- }));
300962
- } catch (err2) {
300963
- logForDebugging(`Grove: Failed to fetch and store config: ${err2}`);
300964
- }
300945
+ let releaseLock;
300946
+ const lockPromise = new Promise((resolve28) => {
300947
+ releaseLock = resolve28;
300965
300948
  });
300966
- groveConfigLocks.set(accountId, next);
300967
- next.then(() => {
300968
- if (groveConfigLocks.get(accountId) === next) {
300949
+ const previous = groveConfigLocks.get(accountId) ?? Promise.resolve();
300950
+ groveConfigLocks.set(accountId, lockPromise);
300951
+ await previous;
300952
+ try {
300953
+ const result = await getGroveNoticeConfig();
300954
+ if (!result.success) {
300955
+ return;
300956
+ }
300957
+ const groveEnabled = result.data.grove_enabled;
300958
+ const cachedEntry = getGlobalConfig().groveConfigCache?.[accountId];
300959
+ if (cachedEntry?.grove_enabled === groveEnabled && Date.now() - cachedEntry.timestamp <= GROVE_CACHE_EXPIRATION_MS) {
300960
+ return;
300961
+ }
300962
+ saveGlobalConfig((current) => ({
300963
+ ...current,
300964
+ groveConfigCache: {
300965
+ ...current.groveConfigCache,
300966
+ [accountId]: {
300967
+ grove_enabled: groveEnabled,
300968
+ timestamp: Date.now()
300969
+ }
300970
+ }
300971
+ }));
300972
+ } catch (err2) {
300973
+ logForDebugging(`Grove: Failed to fetch and store config: ${err2}`);
300974
+ } finally {
300975
+ releaseLock();
300976
+ if (groveConfigLocks.get(accountId) === lockPromise) {
300969
300977
  groveConfigLocks.delete(accountId);
300970
300978
  }
300971
- });
300972
- await next;
300979
+ }
300973
300980
  }
300974
300981
  function calculateShouldShowGrove(settingsResult, configResult, showIfAlreadyViewed) {
300975
300982
  if (!settingsResult.success || !configResult.success) {
@@ -342261,7 +342268,13 @@ function findLastUuid(logs2) {
342261
342268
  if (!logs2) {
342262
342269
  return;
342263
342270
  }
342264
- const entry = logs2.findLast((e) => ("uuid" in e) && e.uuid);
342271
+ let entry;
342272
+ for (let i3 = logs2.length - 1;i3 >= 0; i3--) {
342273
+ if ("uuid" in logs2[i3] && logs2[i3].uuid) {
342274
+ entry = logs2[i3];
342275
+ break;
342276
+ }
342277
+ }
342265
342278
  return entry && "uuid" in entry ? entry.uuid : undefined;
342266
342279
  }
342267
342280
  function clearAllSessions() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",