@funnycode/myclaude 0.1.269 → 0.1.270
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 +39 -15
- package/dist/myclaude.mjs +39 -15
- 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-08-17T03:
|
|
7
|
+
VERSION: "0.1.270",
|
|
8
|
+
BUILD_TIME: "2026-08-17T03:53:05.312Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -120027,7 +120027,7 @@ var package_default;
|
|
|
120027
120027
|
var init_package = __esm(() => {
|
|
120028
120028
|
package_default = {
|
|
120029
120029
|
name: "@funnycode/myclaude",
|
|
120030
|
-
version: "0.1.
|
|
120030
|
+
version: "0.1.270",
|
|
120031
120031
|
private: false,
|
|
120032
120032
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
120033
120033
|
license: "MIT",
|
|
@@ -303915,6 +303915,20 @@ var init_grove = __esm(() => {
|
|
|
303915
303915
|
});
|
|
303916
303916
|
|
|
303917
303917
|
// src/services/policyLimits/index.ts
|
|
303918
|
+
var exports_policyLimits = {};
|
|
303919
|
+
__export(exports_policyLimits, {
|
|
303920
|
+
waitForPolicyLimitsToLoad: () => waitForPolicyLimitsToLoad,
|
|
303921
|
+
stopBackgroundPolling: () => stopBackgroundPolling,
|
|
303922
|
+
startBackgroundPolling: () => startBackgroundPolling,
|
|
303923
|
+
refreshPolicyLimits: () => refreshPolicyLimits,
|
|
303924
|
+
loadPolicyLimits: () => loadPolicyLimits,
|
|
303925
|
+
isPolicyLimitsEligible: () => isPolicyLimitsEligible,
|
|
303926
|
+
isPolicyAllowed: () => isPolicyAllowed,
|
|
303927
|
+
initializePolicyLimitsLoadingPromise: () => initializePolicyLimitsLoadingPromise,
|
|
303928
|
+
clearPolicyLimitsCache: () => clearPolicyLimitsCache,
|
|
303929
|
+
_resetPolicyLimitsForTesting: () => _resetPolicyLimitsForTesting
|
|
303930
|
+
});
|
|
303931
|
+
function _resetPolicyLimitsForTesting() {}
|
|
303918
303932
|
function initializePolicyLimitsLoadingPromise() {}
|
|
303919
303933
|
function isPolicyLimitsEligible() {
|
|
303920
303934
|
return false;
|
|
@@ -303926,6 +303940,8 @@ function isPolicyAllowed(_policy) {
|
|
|
303926
303940
|
async function loadPolicyLimits() {}
|
|
303927
303941
|
async function refreshPolicyLimits() {}
|
|
303928
303942
|
async function clearPolicyLimitsCache() {}
|
|
303943
|
+
function startBackgroundPolling() {}
|
|
303944
|
+
function stopBackgroundPolling() {}
|
|
303929
303945
|
|
|
303930
303946
|
// src/services/remoteManagedSettings/index.ts
|
|
303931
303947
|
function initializeRemoteManagedSettingsLoadingPromise() {}
|
|
@@ -582669,6 +582685,17 @@ async function initReplBridge(options) {
|
|
|
582669
582685
|
tags
|
|
582670
582686
|
} = options ?? {};
|
|
582671
582687
|
setCseShimGate(isCseShimEnabled);
|
|
582688
|
+
const [
|
|
582689
|
+
{ getFeatureValue_CACHED_WITH_REFRESH: getFeatureValue_CACHED_WITH_REFRESH4 },
|
|
582690
|
+
{ getOrganizationUUID: getOrganizationUUID2 },
|
|
582691
|
+
{ isPolicyAllowed: isPolicyAllowed2, waitForPolicyLimitsToLoad: waitForPolicyLimitsToLoad2 },
|
|
582692
|
+
{ checkAndRefreshOAuthTokenIfNeeded: checkAndRefreshOAuthTokenIfNeeded2, getClaudeAIOAuthTokens: getClaudeAIOAuthTokens2, handleOAuth401Error: handleOAuth401Error2 }
|
|
582693
|
+
] = await Promise.all([
|
|
582694
|
+
Promise.resolve().then(() => (init_growthbook(), exports_growthbook)),
|
|
582695
|
+
Promise.resolve().then(() => (init_client2(), exports_client)),
|
|
582696
|
+
Promise.resolve().then(() => exports_policyLimits),
|
|
582697
|
+
Promise.resolve().then(() => (init_auth(), exports_auth))
|
|
582698
|
+
]);
|
|
582672
582699
|
if (!await isBridgeEnabledBlocking()) {
|
|
582673
582700
|
logBridgeSkip("not_enabled", "[bridge:repl] Skipping: bridge not enabled");
|
|
582674
582701
|
return null;
|
|
@@ -582678,26 +582705,26 @@ async function initReplBridge(options) {
|
|
|
582678
582705
|
onStateChange?.("failed", "/login");
|
|
582679
582706
|
return null;
|
|
582680
582707
|
}
|
|
582681
|
-
await
|
|
582682
|
-
if (!
|
|
582708
|
+
await waitForPolicyLimitsToLoad2();
|
|
582709
|
+
if (!isPolicyAllowed2("allow_remote_control")) {
|
|
582683
582710
|
logBridgeSkip("policy_denied", "[bridge:repl] Skipping: allow_remote_control policy not allowed");
|
|
582684
582711
|
onStateChange?.("failed", "disabled by your organization's policy");
|
|
582685
582712
|
return null;
|
|
582686
582713
|
}
|
|
582687
582714
|
if (!getBridgeTokenOverride()) {
|
|
582688
582715
|
const cfg = getGlobalConfig();
|
|
582689
|
-
if (cfg.bridgeOauthDeadExpiresAt != null && (cfg.bridgeOauthDeadFailCount ?? 0) >= 3 &&
|
|
582716
|
+
if (cfg.bridgeOauthDeadExpiresAt != null && (cfg.bridgeOauthDeadFailCount ?? 0) >= 3 && getClaudeAIOAuthTokens2()?.expiresAt === cfg.bridgeOauthDeadExpiresAt) {
|
|
582690
582717
|
logForDebugging(`[bridge:repl] Skipping: cross-process backoff (dead token seen ${cfg.bridgeOauthDeadFailCount} times)`);
|
|
582691
582718
|
return null;
|
|
582692
582719
|
}
|
|
582693
582720
|
try {
|
|
582694
|
-
await
|
|
582721
|
+
await checkAndRefreshOAuthTokenIfNeeded2();
|
|
582695
582722
|
} catch (error52) {
|
|
582696
582723
|
logBridgeSkip("oauth_refresh_failed", `[bridge:repl] Skipping: OAuth token refresh failed - ${errorMessage(error52)}`);
|
|
582697
582724
|
onStateChange?.("failed", errorMessage(error52));
|
|
582698
582725
|
return null;
|
|
582699
582726
|
}
|
|
582700
|
-
const tokens =
|
|
582727
|
+
const tokens = getClaudeAIOAuthTokens2();
|
|
582701
582728
|
if (tokens && tokens.expiresAt !== null && tokens.expiresAt <= Date.now()) {
|
|
582702
582729
|
logBridgeSkip("oauth_expired_unrefreshable", "[bridge:repl] Skipping: OAuth token expired and refresh failed (re-login required)");
|
|
582703
582730
|
onStateChange?.("failed", "/login");
|
|
@@ -582784,10 +582811,10 @@ async function initReplBridge(options) {
|
|
|
582784
582811
|
}
|
|
582785
582812
|
return userMessageCount >= 3;
|
|
582786
582813
|
};
|
|
582787
|
-
const initialHistoryCap =
|
|
582814
|
+
const initialHistoryCap = getFeatureValue_CACHED_WITH_REFRESH4("tengu_bridge_initial_history_cap", 200, 5 * 60 * 1000);
|
|
582788
582815
|
let orgUUID;
|
|
582789
582816
|
try {
|
|
582790
|
-
orgUUID = await
|
|
582817
|
+
orgUUID = await getOrganizationUUID2();
|
|
582791
582818
|
} catch (error52) {
|
|
582792
582819
|
logBridgeSkip("get_org_uuid_failed", `[bridge:repl] Skipping: failed to get organization UUID - ${errorMessage(error52)}`);
|
|
582793
582820
|
onStateChange?.("failed", errorMessage(error52));
|
|
@@ -582812,7 +582839,7 @@ async function initReplBridge(options) {
|
|
|
582812
582839
|
orgUUID,
|
|
582813
582840
|
title,
|
|
582814
582841
|
getAccessToken: getBridgeAccessToken,
|
|
582815
|
-
onAuth401:
|
|
582842
|
+
onAuth401: handleOAuth401Error2,
|
|
582816
582843
|
toSDKMessages,
|
|
582817
582844
|
initialHistoryCap,
|
|
582818
582845
|
initialMessages,
|
|
@@ -582865,7 +582892,7 @@ async function initReplBridge(options) {
|
|
|
582865
582892
|
getCurrentTitle: () => getCurrentSessionTitle(getSessionId()) ?? title,
|
|
582866
582893
|
onUserMessage,
|
|
582867
582894
|
toSDKMessages,
|
|
582868
|
-
onAuth401:
|
|
582895
|
+
onAuth401: handleOAuth401Error2,
|
|
582869
582896
|
getPollIntervalConfig,
|
|
582870
582897
|
initialHistoryCap,
|
|
582871
582898
|
initialMessages,
|
|
@@ -582891,9 +582918,6 @@ function deriveTitle(raw) {
|
|
|
582891
582918
|
var TITLE_MAX_LEN = 50;
|
|
582892
582919
|
var init_initReplBridge = __esm(() => {
|
|
582893
582920
|
init_state();
|
|
582894
|
-
init_growthbook();
|
|
582895
|
-
init_client2();
|
|
582896
|
-
init_auth();
|
|
582897
582921
|
init_config();
|
|
582898
582922
|
init_debug();
|
|
582899
582923
|
init_displayTags();
|
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-08-17T03:
|
|
7
|
+
VERSION: "0.1.270",
|
|
8
|
+
BUILD_TIME: "2026-08-17T03:53:05.312Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -120027,7 +120027,7 @@ var package_default;
|
|
|
120027
120027
|
var init_package = __esm(() => {
|
|
120028
120028
|
package_default = {
|
|
120029
120029
|
name: "@funnycode/myclaude",
|
|
120030
|
-
version: "0.1.
|
|
120030
|
+
version: "0.1.270",
|
|
120031
120031
|
private: false,
|
|
120032
120032
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
120033
120033
|
license: "MIT",
|
|
@@ -303915,6 +303915,20 @@ var init_grove = __esm(() => {
|
|
|
303915
303915
|
});
|
|
303916
303916
|
|
|
303917
303917
|
// src/services/policyLimits/index.ts
|
|
303918
|
+
var exports_policyLimits = {};
|
|
303919
|
+
__export(exports_policyLimits, {
|
|
303920
|
+
waitForPolicyLimitsToLoad: () => waitForPolicyLimitsToLoad,
|
|
303921
|
+
stopBackgroundPolling: () => stopBackgroundPolling,
|
|
303922
|
+
startBackgroundPolling: () => startBackgroundPolling,
|
|
303923
|
+
refreshPolicyLimits: () => refreshPolicyLimits,
|
|
303924
|
+
loadPolicyLimits: () => loadPolicyLimits,
|
|
303925
|
+
isPolicyLimitsEligible: () => isPolicyLimitsEligible,
|
|
303926
|
+
isPolicyAllowed: () => isPolicyAllowed,
|
|
303927
|
+
initializePolicyLimitsLoadingPromise: () => initializePolicyLimitsLoadingPromise,
|
|
303928
|
+
clearPolicyLimitsCache: () => clearPolicyLimitsCache,
|
|
303929
|
+
_resetPolicyLimitsForTesting: () => _resetPolicyLimitsForTesting
|
|
303930
|
+
});
|
|
303931
|
+
function _resetPolicyLimitsForTesting() {}
|
|
303918
303932
|
function initializePolicyLimitsLoadingPromise() {}
|
|
303919
303933
|
function isPolicyLimitsEligible() {
|
|
303920
303934
|
return false;
|
|
@@ -303926,6 +303940,8 @@ function isPolicyAllowed(_policy) {
|
|
|
303926
303940
|
async function loadPolicyLimits() {}
|
|
303927
303941
|
async function refreshPolicyLimits() {}
|
|
303928
303942
|
async function clearPolicyLimitsCache() {}
|
|
303943
|
+
function startBackgroundPolling() {}
|
|
303944
|
+
function stopBackgroundPolling() {}
|
|
303929
303945
|
|
|
303930
303946
|
// src/services/remoteManagedSettings/index.ts
|
|
303931
303947
|
function initializeRemoteManagedSettingsLoadingPromise() {}
|
|
@@ -582669,6 +582685,17 @@ async function initReplBridge(options) {
|
|
|
582669
582685
|
tags
|
|
582670
582686
|
} = options ?? {};
|
|
582671
582687
|
setCseShimGate(isCseShimEnabled);
|
|
582688
|
+
const [
|
|
582689
|
+
{ getFeatureValue_CACHED_WITH_REFRESH: getFeatureValue_CACHED_WITH_REFRESH4 },
|
|
582690
|
+
{ getOrganizationUUID: getOrganizationUUID2 },
|
|
582691
|
+
{ isPolicyAllowed: isPolicyAllowed2, waitForPolicyLimitsToLoad: waitForPolicyLimitsToLoad2 },
|
|
582692
|
+
{ checkAndRefreshOAuthTokenIfNeeded: checkAndRefreshOAuthTokenIfNeeded2, getClaudeAIOAuthTokens: getClaudeAIOAuthTokens2, handleOAuth401Error: handleOAuth401Error2 }
|
|
582693
|
+
] = await Promise.all([
|
|
582694
|
+
Promise.resolve().then(() => (init_growthbook(), exports_growthbook)),
|
|
582695
|
+
Promise.resolve().then(() => (init_client2(), exports_client)),
|
|
582696
|
+
Promise.resolve().then(() => exports_policyLimits),
|
|
582697
|
+
Promise.resolve().then(() => (init_auth(), exports_auth))
|
|
582698
|
+
]);
|
|
582672
582699
|
if (!await isBridgeEnabledBlocking()) {
|
|
582673
582700
|
logBridgeSkip("not_enabled", "[bridge:repl] Skipping: bridge not enabled");
|
|
582674
582701
|
return null;
|
|
@@ -582678,26 +582705,26 @@ async function initReplBridge(options) {
|
|
|
582678
582705
|
onStateChange?.("failed", "/login");
|
|
582679
582706
|
return null;
|
|
582680
582707
|
}
|
|
582681
|
-
await
|
|
582682
|
-
if (!
|
|
582708
|
+
await waitForPolicyLimitsToLoad2();
|
|
582709
|
+
if (!isPolicyAllowed2("allow_remote_control")) {
|
|
582683
582710
|
logBridgeSkip("policy_denied", "[bridge:repl] Skipping: allow_remote_control policy not allowed");
|
|
582684
582711
|
onStateChange?.("failed", "disabled by your organization's policy");
|
|
582685
582712
|
return null;
|
|
582686
582713
|
}
|
|
582687
582714
|
if (!getBridgeTokenOverride()) {
|
|
582688
582715
|
const cfg = getGlobalConfig();
|
|
582689
|
-
if (cfg.bridgeOauthDeadExpiresAt != null && (cfg.bridgeOauthDeadFailCount ?? 0) >= 3 &&
|
|
582716
|
+
if (cfg.bridgeOauthDeadExpiresAt != null && (cfg.bridgeOauthDeadFailCount ?? 0) >= 3 && getClaudeAIOAuthTokens2()?.expiresAt === cfg.bridgeOauthDeadExpiresAt) {
|
|
582690
582717
|
logForDebugging(`[bridge:repl] Skipping: cross-process backoff (dead token seen ${cfg.bridgeOauthDeadFailCount} times)`);
|
|
582691
582718
|
return null;
|
|
582692
582719
|
}
|
|
582693
582720
|
try {
|
|
582694
|
-
await
|
|
582721
|
+
await checkAndRefreshOAuthTokenIfNeeded2();
|
|
582695
582722
|
} catch (error52) {
|
|
582696
582723
|
logBridgeSkip("oauth_refresh_failed", `[bridge:repl] Skipping: OAuth token refresh failed - ${errorMessage(error52)}`);
|
|
582697
582724
|
onStateChange?.("failed", errorMessage(error52));
|
|
582698
582725
|
return null;
|
|
582699
582726
|
}
|
|
582700
|
-
const tokens =
|
|
582727
|
+
const tokens = getClaudeAIOAuthTokens2();
|
|
582701
582728
|
if (tokens && tokens.expiresAt !== null && tokens.expiresAt <= Date.now()) {
|
|
582702
582729
|
logBridgeSkip("oauth_expired_unrefreshable", "[bridge:repl] Skipping: OAuth token expired and refresh failed (re-login required)");
|
|
582703
582730
|
onStateChange?.("failed", "/login");
|
|
@@ -582784,10 +582811,10 @@ async function initReplBridge(options) {
|
|
|
582784
582811
|
}
|
|
582785
582812
|
return userMessageCount >= 3;
|
|
582786
582813
|
};
|
|
582787
|
-
const initialHistoryCap =
|
|
582814
|
+
const initialHistoryCap = getFeatureValue_CACHED_WITH_REFRESH4("tengu_bridge_initial_history_cap", 200, 5 * 60 * 1000);
|
|
582788
582815
|
let orgUUID;
|
|
582789
582816
|
try {
|
|
582790
|
-
orgUUID = await
|
|
582817
|
+
orgUUID = await getOrganizationUUID2();
|
|
582791
582818
|
} catch (error52) {
|
|
582792
582819
|
logBridgeSkip("get_org_uuid_failed", `[bridge:repl] Skipping: failed to get organization UUID - ${errorMessage(error52)}`);
|
|
582793
582820
|
onStateChange?.("failed", errorMessage(error52));
|
|
@@ -582812,7 +582839,7 @@ async function initReplBridge(options) {
|
|
|
582812
582839
|
orgUUID,
|
|
582813
582840
|
title,
|
|
582814
582841
|
getAccessToken: getBridgeAccessToken,
|
|
582815
|
-
onAuth401:
|
|
582842
|
+
onAuth401: handleOAuth401Error2,
|
|
582816
582843
|
toSDKMessages,
|
|
582817
582844
|
initialHistoryCap,
|
|
582818
582845
|
initialMessages,
|
|
@@ -582865,7 +582892,7 @@ async function initReplBridge(options) {
|
|
|
582865
582892
|
getCurrentTitle: () => getCurrentSessionTitle(getSessionId()) ?? title,
|
|
582866
582893
|
onUserMessage,
|
|
582867
582894
|
toSDKMessages,
|
|
582868
|
-
onAuth401:
|
|
582895
|
+
onAuth401: handleOAuth401Error2,
|
|
582869
582896
|
getPollIntervalConfig,
|
|
582870
582897
|
initialHistoryCap,
|
|
582871
582898
|
initialMessages,
|
|
@@ -582891,9 +582918,6 @@ function deriveTitle(raw) {
|
|
|
582891
582918
|
var TITLE_MAX_LEN = 50;
|
|
582892
582919
|
var init_initReplBridge = __esm(() => {
|
|
582893
582920
|
init_state();
|
|
582894
|
-
init_growthbook();
|
|
582895
|
-
init_client2();
|
|
582896
|
-
init_auth();
|
|
582897
582921
|
init_config();
|
|
582898
582922
|
init_debug();
|
|
582899
582923
|
init_displayTags();
|