theus-cli 0.2.51 → 0.2.52
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/cli.js +441 -371
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -58896,7 +58896,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
|
|
|
58896
58896
|
if (isApiKeyHelperFromProjectOrLocalSettings()) {
|
|
58897
58897
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58898
58898
|
if (!hasTrust && !isNonInteractiveSession) {
|
|
58899
|
-
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58899
|
+
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
58900
58900
|
logAntError("apiKeyHelper invoked before trust check", error40);
|
|
58901
58901
|
logEvent("tengu_apiKeyHelper_missing_trust11", {});
|
|
58902
58902
|
return null;
|
|
@@ -58940,7 +58940,7 @@ async function runAwsAuthRefresh() {
|
|
|
58940
58940
|
if (isAwsAuthRefreshFromProjectSettings()) {
|
|
58941
58941
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58942
58942
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58943
|
-
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58943
|
+
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
58944
58944
|
logAntError("awsAuthRefresh invoked before trust check", error40);
|
|
58945
58945
|
logEvent("tengu_awsAuthRefresh_missing_trust", {});
|
|
58946
58946
|
return false;
|
|
@@ -59000,7 +59000,7 @@ async function getAwsCredsFromCredentialExport() {
|
|
|
59000
59000
|
if (isAwsCredentialExportFromProjectSettings()) {
|
|
59001
59001
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
59002
59002
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
59003
|
-
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
59003
|
+
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
59004
59004
|
logAntError("awsCredentialExport invoked before trust check", error40);
|
|
59005
59005
|
logEvent("tengu_awsCredentialExport_missing_trust", {});
|
|
59006
59006
|
return null;
|
|
@@ -59085,7 +59085,7 @@ async function runGcpAuthRefresh() {
|
|
|
59085
59085
|
if (isGcpAuthRefreshFromProjectSettings()) {
|
|
59086
59086
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
59087
59087
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
59088
|
-
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
59088
|
+
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
59089
59089
|
logAntError("gcpAuthRefresh invoked before trust check", error40);
|
|
59090
59090
|
logEvent("tengu_gcpAuthRefresh_missing_trust", {});
|
|
59091
59091
|
return false;
|
|
@@ -59780,7 +59780,7 @@ var init_auth = __esm(() => {
|
|
|
59780
59780
|
|
|
59781
59781
|
// utils/userAgent.ts
|
|
59782
59782
|
function getTheusCodeUserAgent() {
|
|
59783
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59783
|
+
return `theus-code/${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
|
|
59784
59784
|
}
|
|
59785
59785
|
|
|
59786
59786
|
// utils/workloadContext.ts
|
|
@@ -59802,7 +59802,7 @@ function getUserAgent() {
|
|
|
59802
59802
|
const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
|
|
59803
59803
|
const workload = getWorkload();
|
|
59804
59804
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
59805
|
-
return `theus-cli/${{ VERSION: "0.2.
|
|
59805
|
+
return `theus-cli/${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (${process.env.USER_TYPE}, ${process.env.THEUS_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
59806
59806
|
}
|
|
59807
59807
|
function getMCPUserAgent() {
|
|
59808
59808
|
const parts = [];
|
|
@@ -59816,7 +59816,7 @@ function getMCPUserAgent() {
|
|
|
59816
59816
|
parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
|
|
59817
59817
|
}
|
|
59818
59818
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
59819
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59819
|
+
return `theus-code/${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}${suffix}`;
|
|
59820
59820
|
}
|
|
59821
59821
|
function getWebFetchUserAgent() {
|
|
59822
59822
|
return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
|
|
@@ -59954,7 +59954,7 @@ var init_user = __esm(() => {
|
|
|
59954
59954
|
deviceId,
|
|
59955
59955
|
sessionId: getSessionId(),
|
|
59956
59956
|
email: getEmail(),
|
|
59957
|
-
appVersion: { VERSION: "0.2.
|
|
59957
|
+
appVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
59958
59958
|
platform: getHostPlatformForAnalytics(),
|
|
59959
59959
|
organizationUuid,
|
|
59960
59960
|
accountUuid,
|
|
@@ -61669,7 +61669,7 @@ var init_metadata = __esm(() => {
|
|
|
61669
61669
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
61670
61670
|
WHITESPACE_REGEX = /\s+/;
|
|
61671
61671
|
getVersionBase = memoize_default(() => {
|
|
61672
|
-
const match = { VERSION: "0.2.
|
|
61672
|
+
const match = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
61673
61673
|
return match ? match[0] : undefined;
|
|
61674
61674
|
});
|
|
61675
61675
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -61709,9 +61709,9 @@ var init_metadata = __esm(() => {
|
|
|
61709
61709
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
61710
61710
|
isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
|
|
61711
61711
|
isTheusAiAuth: isTheusAISubscriber(),
|
|
61712
|
-
version: { VERSION: "0.2.
|
|
61712
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
61713
61713
|
versionBase: getVersionBase(),
|
|
61714
|
-
buildTime: { VERSION: "0.2.
|
|
61714
|
+
buildTime: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME,
|
|
61715
61715
|
deploymentEnvironment: env3.detectDeploymentEnvironment(),
|
|
61716
61716
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
61717
61717
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -62377,7 +62377,7 @@ function initialize1PEventLogging() {
|
|
|
62377
62377
|
const platform2 = getPlatform();
|
|
62378
62378
|
const attributes = {
|
|
62379
62379
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
62380
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
62380
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
62381
62381
|
};
|
|
62382
62382
|
if (platform2 === "wsl") {
|
|
62383
62383
|
const wslVersion = getWslVersion();
|
|
@@ -62404,7 +62404,7 @@ function initialize1PEventLogging() {
|
|
|
62404
62404
|
})
|
|
62405
62405
|
]
|
|
62406
62406
|
});
|
|
62407
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
62407
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
62408
62408
|
}
|
|
62409
62409
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
62410
62410
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -64275,7 +64275,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
64275
64275
|
if (!isAttributionHeaderEnabled()) {
|
|
64276
64276
|
return "";
|
|
64277
64277
|
}
|
|
64278
|
-
const version2 = `${{ VERSION: "0.2.
|
|
64278
|
+
const version2 = `${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}.${fingerprint}`;
|
|
64279
64279
|
const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
|
|
64280
64280
|
const cch = "";
|
|
64281
64281
|
const workload = getWorkload();
|
|
@@ -108362,7 +108362,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
|
|
|
108362
108362
|
}
|
|
108363
108363
|
function getFeedbackGuideline() {
|
|
108364
108364
|
if (isUsing3PServices()) {
|
|
108365
|
-
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.
|
|
108365
|
+
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER}`;
|
|
108366
108366
|
}
|
|
108367
108367
|
return "- When you cannot find an answer or the feature doesn't exist, direct the user to use /feedback to report a feature request or bug";
|
|
108368
108368
|
}
|
|
@@ -116710,6 +116710,263 @@ var init_imageValidation = __esm(() => {
|
|
|
116710
116710
|
};
|
|
116711
116711
|
});
|
|
116712
116712
|
|
|
116713
|
+
// services/rateLimitMessages.ts
|
|
116714
|
+
function isRateLimitErrorMessage(text) {
|
|
116715
|
+
return RATE_LIMIT_ERROR_PREFIXES.some((prefix) => text.startsWith(prefix));
|
|
116716
|
+
}
|
|
116717
|
+
function getRateLimitMessage(limits, model) {
|
|
116718
|
+
if (limits.isUsingOverage) {
|
|
116719
|
+
if (limits.overageStatus === "allowed_warning") {
|
|
116720
|
+
return {
|
|
116721
|
+
message: "You're close to your extra usage spending limit",
|
|
116722
|
+
severity: "warning"
|
|
116723
|
+
};
|
|
116724
|
+
}
|
|
116725
|
+
return null;
|
|
116726
|
+
}
|
|
116727
|
+
if (limits.status === "rejected") {
|
|
116728
|
+
return { message: getLimitReachedText(limits, model), severity: "error" };
|
|
116729
|
+
}
|
|
116730
|
+
if (limits.status === "allowed_warning") {
|
|
116731
|
+
const WARNING_THRESHOLD = 0.7;
|
|
116732
|
+
if (limits.utilization !== undefined && limits.utilization < WARNING_THRESHOLD) {
|
|
116733
|
+
return null;
|
|
116734
|
+
}
|
|
116735
|
+
const subscriptionType = getSubscriptionType();
|
|
116736
|
+
const isTeamOrEnterprise = subscriptionType === "team" || subscriptionType === "enterprise";
|
|
116737
|
+
const hasExtraUsageEnabled = getOauthAccountInfo()?.hasExtraUsageEnabled === true;
|
|
116738
|
+
if (isTeamOrEnterprise && hasExtraUsageEnabled && !hasTheusAiBillingAccess()) {
|
|
116739
|
+
return null;
|
|
116740
|
+
}
|
|
116741
|
+
const text = getEarlyWarningText(limits);
|
|
116742
|
+
if (text) {
|
|
116743
|
+
return { message: text, severity: "warning" };
|
|
116744
|
+
}
|
|
116745
|
+
}
|
|
116746
|
+
return null;
|
|
116747
|
+
}
|
|
116748
|
+
function getRateLimitErrorMessage(limits, model) {
|
|
116749
|
+
const message = getRateLimitMessage(limits, model);
|
|
116750
|
+
if (message && message.severity === "error") {
|
|
116751
|
+
return message.message;
|
|
116752
|
+
}
|
|
116753
|
+
return null;
|
|
116754
|
+
}
|
|
116755
|
+
function getRateLimitWarning(limits, model) {
|
|
116756
|
+
const message = getRateLimitMessage(limits, model);
|
|
116757
|
+
if (message && message.severity === "warning") {
|
|
116758
|
+
return message.message;
|
|
116759
|
+
}
|
|
116760
|
+
return null;
|
|
116761
|
+
}
|
|
116762
|
+
function getLimitReachedText(limits, model) {
|
|
116763
|
+
const resetsAt = limits.resetsAt;
|
|
116764
|
+
const resetTime = resetsAt ? formatResetTime(resetsAt, true) : undefined;
|
|
116765
|
+
const overageResetTime = limits.overageResetsAt ? formatResetTime(limits.overageResetsAt, true) : undefined;
|
|
116766
|
+
const resetMessage = resetTime ? ` \xB7 resets ${resetTime}` : "";
|
|
116767
|
+
if (limits.overageStatus === "rejected") {
|
|
116768
|
+
let overageResetMessage = "";
|
|
116769
|
+
if (resetsAt && limits.overageResetsAt) {
|
|
116770
|
+
if (resetsAt < limits.overageResetsAt) {
|
|
116771
|
+
overageResetMessage = ` \xB7 resets ${resetTime}`;
|
|
116772
|
+
} else {
|
|
116773
|
+
overageResetMessage = ` \xB7 resets ${overageResetTime}`;
|
|
116774
|
+
}
|
|
116775
|
+
} else if (resetTime) {
|
|
116776
|
+
overageResetMessage = ` \xB7 resets ${resetTime}`;
|
|
116777
|
+
} else if (overageResetTime) {
|
|
116778
|
+
overageResetMessage = ` \xB7 resets ${overageResetTime}`;
|
|
116779
|
+
}
|
|
116780
|
+
if (limits.overageDisabledReason === "out_of_credits") {
|
|
116781
|
+
return `You're out of extra usage${overageResetMessage}`;
|
|
116782
|
+
}
|
|
116783
|
+
return formatLimitReachedText("limit", overageResetMessage, model);
|
|
116784
|
+
}
|
|
116785
|
+
if (limits.rateLimitType === "seven_day_sonnet") {
|
|
116786
|
+
const subscriptionType = getSubscriptionType();
|
|
116787
|
+
const isProOrEnterprise = subscriptionType === "pro" || subscriptionType === "enterprise";
|
|
116788
|
+
const limit = isProOrEnterprise ? "weekly limit" : "Sonnet limit";
|
|
116789
|
+
return formatLimitReachedText(limit, resetMessage, model);
|
|
116790
|
+
}
|
|
116791
|
+
if (limits.rateLimitType === "seven_day_opus") {
|
|
116792
|
+
return formatLimitReachedText("Opus limit", resetMessage, model);
|
|
116793
|
+
}
|
|
116794
|
+
if (limits.rateLimitType === "seven_day") {
|
|
116795
|
+
return formatLimitReachedText("weekly limit", resetMessage, model);
|
|
116796
|
+
}
|
|
116797
|
+
if (limits.rateLimitType === "five_hour") {
|
|
116798
|
+
return formatLimitReachedText("session limit", resetMessage, model);
|
|
116799
|
+
}
|
|
116800
|
+
return formatLimitReachedText("usage limit", resetMessage, model);
|
|
116801
|
+
}
|
|
116802
|
+
function getEarlyWarningText(limits) {
|
|
116803
|
+
let limitName = null;
|
|
116804
|
+
switch (limits.rateLimitType) {
|
|
116805
|
+
case "seven_day":
|
|
116806
|
+
limitName = "weekly limit";
|
|
116807
|
+
break;
|
|
116808
|
+
case "five_hour":
|
|
116809
|
+
limitName = "session limit";
|
|
116810
|
+
break;
|
|
116811
|
+
case "seven_day_opus":
|
|
116812
|
+
limitName = "Opus limit";
|
|
116813
|
+
break;
|
|
116814
|
+
case "seven_day_sonnet":
|
|
116815
|
+
limitName = "Sonnet limit";
|
|
116816
|
+
break;
|
|
116817
|
+
case "overage":
|
|
116818
|
+
limitName = "extra usage";
|
|
116819
|
+
break;
|
|
116820
|
+
case undefined:
|
|
116821
|
+
return null;
|
|
116822
|
+
}
|
|
116823
|
+
const used = limits.utilization ? Math.floor(limits.utilization * 100) : undefined;
|
|
116824
|
+
const resetTime = limits.resetsAt ? formatResetTime(limits.resetsAt, true) : undefined;
|
|
116825
|
+
const upsell = getWarningUpsellText(limits.rateLimitType);
|
|
116826
|
+
if (used && resetTime) {
|
|
116827
|
+
const base3 = `You've used ${used}% of your ${limitName} \xB7 resets ${resetTime}`;
|
|
116828
|
+
return upsell ? `${base3} \xB7 ${upsell}` : base3;
|
|
116829
|
+
}
|
|
116830
|
+
if (used) {
|
|
116831
|
+
const base3 = `You've used ${used}% of your ${limitName}`;
|
|
116832
|
+
return upsell ? `${base3} \xB7 ${upsell}` : base3;
|
|
116833
|
+
}
|
|
116834
|
+
if (limits.rateLimitType === "overage") {
|
|
116835
|
+
limitName += " limit";
|
|
116836
|
+
}
|
|
116837
|
+
if (resetTime) {
|
|
116838
|
+
const base3 = `Approaching ${limitName} \xB7 resets ${resetTime}`;
|
|
116839
|
+
return upsell ? `${base3} \xB7 ${upsell}` : base3;
|
|
116840
|
+
}
|
|
116841
|
+
const base2 = `Approaching ${limitName}`;
|
|
116842
|
+
return upsell ? `${base2} \xB7 ${upsell}` : base2;
|
|
116843
|
+
}
|
|
116844
|
+
function getWarningUpsellText(rateLimitType) {
|
|
116845
|
+
const subscriptionType = getSubscriptionType();
|
|
116846
|
+
const hasExtraUsageEnabled = getOauthAccountInfo()?.hasExtraUsageEnabled === true;
|
|
116847
|
+
if (rateLimitType === "five_hour") {
|
|
116848
|
+
if (subscriptionType === "team" || subscriptionType === "enterprise") {
|
|
116849
|
+
if (!hasExtraUsageEnabled && isOverageProvisioningAllowed()) {
|
|
116850
|
+
return "/extra-usage to request more";
|
|
116851
|
+
}
|
|
116852
|
+
return null;
|
|
116853
|
+
}
|
|
116854
|
+
if (subscriptionType === "pro" || subscriptionType === "max") {
|
|
116855
|
+
return "/upgrade to keep using Theus";
|
|
116856
|
+
}
|
|
116857
|
+
}
|
|
116858
|
+
if (rateLimitType === "overage") {
|
|
116859
|
+
if (subscriptionType === "team" || subscriptionType === "enterprise") {
|
|
116860
|
+
if (!hasExtraUsageEnabled && isOverageProvisioningAllowed()) {
|
|
116861
|
+
return "/extra-usage to request more";
|
|
116862
|
+
}
|
|
116863
|
+
}
|
|
116864
|
+
}
|
|
116865
|
+
return null;
|
|
116866
|
+
}
|
|
116867
|
+
function getUsingOverageText(limits) {
|
|
116868
|
+
const resetTime = limits.resetsAt ? formatResetTime(limits.resetsAt, true) : "";
|
|
116869
|
+
let limitName = "";
|
|
116870
|
+
if (limits.rateLimitType === "five_hour") {
|
|
116871
|
+
limitName = "session limit";
|
|
116872
|
+
} else if (limits.rateLimitType === "seven_day") {
|
|
116873
|
+
limitName = "weekly limit";
|
|
116874
|
+
} else if (limits.rateLimitType === "seven_day_opus") {
|
|
116875
|
+
limitName = "Opus limit";
|
|
116876
|
+
} else if (limits.rateLimitType === "seven_day_sonnet") {
|
|
116877
|
+
const subscriptionType = getSubscriptionType();
|
|
116878
|
+
const isProOrEnterprise = subscriptionType === "pro" || subscriptionType === "enterprise";
|
|
116879
|
+
limitName = isProOrEnterprise ? "weekly limit" : "Sonnet limit";
|
|
116880
|
+
}
|
|
116881
|
+
if (!limitName) {
|
|
116882
|
+
return "Now using extra usage";
|
|
116883
|
+
}
|
|
116884
|
+
const resetMessage = resetTime ? ` \xB7 Your ${limitName} resets ${resetTime}` : "";
|
|
116885
|
+
return `You're now using extra usage${resetMessage}`;
|
|
116886
|
+
}
|
|
116887
|
+
function formatLimitReachedText(limit, resetMessage, _model) {
|
|
116888
|
+
if (process.env.USER_TYPE === "ant") {
|
|
116889
|
+
return `You've hit your ${limit}${resetMessage}. If you have feedback about this limit, post in ${FEEDBACK_CHANNEL_ANT}. You can reset your limits with /reset-limits`;
|
|
116890
|
+
}
|
|
116891
|
+
return `You've hit your ${limit}${resetMessage}`;
|
|
116892
|
+
}
|
|
116893
|
+
function isGatewayQuotaExceededBody(body) {
|
|
116894
|
+
if (typeof body !== "object" || body === null)
|
|
116895
|
+
return false;
|
|
116896
|
+
const b = body;
|
|
116897
|
+
if (b.quota_exceeded === true)
|
|
116898
|
+
return true;
|
|
116899
|
+
const err2 = b.error;
|
|
116900
|
+
return typeof err2 === "object" && err2 !== null && err2.code === "quota_exceeded";
|
|
116901
|
+
}
|
|
116902
|
+
function asNonEmptyString(value) {
|
|
116903
|
+
if (typeof value === "string" && value.trim().length > 0)
|
|
116904
|
+
return value;
|
|
116905
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
116906
|
+
return String(value);
|
|
116907
|
+
return;
|
|
116908
|
+
}
|
|
116909
|
+
function isGatewayQuotaExceededMessage(text) {
|
|
116910
|
+
return text.startsWith(GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX);
|
|
116911
|
+
}
|
|
116912
|
+
function creditsFromBody(creditos, tt) {
|
|
116913
|
+
const direct = asNonEmptyString(creditos);
|
|
116914
|
+
if (direct)
|
|
116915
|
+
return direct;
|
|
116916
|
+
const ttStr = asNonEmptyString(tt);
|
|
116917
|
+
if (!ttStr)
|
|
116918
|
+
return;
|
|
116919
|
+
const ttNum = Number(ttStr);
|
|
116920
|
+
if (!Number.isFinite(ttNum))
|
|
116921
|
+
return;
|
|
116922
|
+
return String(Math.round(ttNum / 1000));
|
|
116923
|
+
}
|
|
116924
|
+
function getGatewayQuotaExceededMessage(body) {
|
|
116925
|
+
const pausePromise = "Sin sorpresas: al tope, Theus se pausa \u2014 jam\xE1s factura de m\xE1s.";
|
|
116926
|
+
const genericFallback = `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${THEUS_PRICING_URL} (anual = 2 meses gratis).`;
|
|
116927
|
+
if (!isGatewayQuotaExceededBody(body)) {
|
|
116928
|
+
return genericFallback;
|
|
116929
|
+
}
|
|
116930
|
+
const plan = asNonEmptyString(body.plan);
|
|
116931
|
+
const cuotaCreditos = creditsFromBody(body.creditos_cuota, body.cuota_tt);
|
|
116932
|
+
const reset3 = asNonEmptyString(body.reset);
|
|
116933
|
+
const url3 = asNonEmptyString(body.url) ?? THEUS_PRICING_URL;
|
|
116934
|
+
if (!plan || !cuotaCreditos || !reset3) {
|
|
116935
|
+
return `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
|
|
116936
|
+
}
|
|
116937
|
+
const base2 = `Llegaste al l\xEDmite de tu plan ${plan} (${cuotaCreditos} cr\xE9ditos) \xB7 se renueva ${reset3}. ${pausePromise}`;
|
|
116938
|
+
const upgradePlan = asNonEmptyString(body.upgrade?.plan);
|
|
116939
|
+
const upgradeCreditos = creditsFromBody(body.upgrade?.creditos, body.upgrade?.tt);
|
|
116940
|
+
const upgradePrecio = asNonEmptyString(body.upgrade?.precio);
|
|
116941
|
+
if (upgradePlan && upgradeCreditos && upgradePrecio) {
|
|
116942
|
+
return `${base2} \xBFNecesitas seguir hoy? ${upgradePlan} incluye ${upgradeCreditos} cr\xE9ditos por ${upgradePrecio} \u2192 ${url3} (anual = 2 meses gratis)`;
|
|
116943
|
+
}
|
|
116944
|
+
return `${base2} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
|
|
116945
|
+
}
|
|
116946
|
+
var FEEDBACK_CHANNEL_ANT = "#briarpatch-cc", RATE_LIMIT_ERROR_PREFIXES, THEUS_PRICING_URL = "https://theus.pe/precios", GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX = "Llegaste al l\xEDmite de tu plan", GatewayQuotaExceededError;
|
|
116947
|
+
var init_rateLimitMessages = __esm(() => {
|
|
116948
|
+
init_auth();
|
|
116949
|
+
init_billing();
|
|
116950
|
+
init_format();
|
|
116951
|
+
RATE_LIMIT_ERROR_PREFIXES = [
|
|
116952
|
+
"You've hit your",
|
|
116953
|
+
"You've used",
|
|
116954
|
+
"You're now using extra usage",
|
|
116955
|
+
"You're close to",
|
|
116956
|
+
"You're out of extra usage"
|
|
116957
|
+
];
|
|
116958
|
+
GatewayQuotaExceededError = class GatewayQuotaExceededError extends Error {
|
|
116959
|
+
status;
|
|
116960
|
+
body;
|
|
116961
|
+
constructor(body, status) {
|
|
116962
|
+
super(getGatewayQuotaExceededMessage(body));
|
|
116963
|
+
this.name = "GatewayQuotaExceededError";
|
|
116964
|
+
this.status = status;
|
|
116965
|
+
this.body = body;
|
|
116966
|
+
}
|
|
116967
|
+
};
|
|
116968
|
+
});
|
|
116969
|
+
|
|
116713
116970
|
// tools/FileReadTool/imageProcessor.ts
|
|
116714
116971
|
async function getImageProcessor() {
|
|
116715
116972
|
if (imageProcessorModule) {
|
|
@@ -167076,7 +167333,7 @@ function getTelemetryAttributes() {
|
|
|
167076
167333
|
attributes["session.id"] = sessionId;
|
|
167077
167334
|
}
|
|
167078
167335
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
167079
|
-
attributes["app.version"] = { VERSION: "0.2.
|
|
167336
|
+
attributes["app.version"] = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
167080
167337
|
}
|
|
167081
167338
|
const oauthAccount = getOauthAccountInfo();
|
|
167082
167339
|
if (oauthAccount) {
|
|
@@ -169819,253 +170076,6 @@ var init_vscodeSdkMcp = __esm(() => {
|
|
|
169819
170076
|
}));
|
|
169820
170077
|
});
|
|
169821
170078
|
|
|
169822
|
-
// services/rateLimitMessages.ts
|
|
169823
|
-
function isRateLimitErrorMessage(text) {
|
|
169824
|
-
return RATE_LIMIT_ERROR_PREFIXES.some((prefix) => text.startsWith(prefix));
|
|
169825
|
-
}
|
|
169826
|
-
function getRateLimitMessage(limits, model) {
|
|
169827
|
-
if (limits.isUsingOverage) {
|
|
169828
|
-
if (limits.overageStatus === "allowed_warning") {
|
|
169829
|
-
return {
|
|
169830
|
-
message: "You're close to your extra usage spending limit",
|
|
169831
|
-
severity: "warning"
|
|
169832
|
-
};
|
|
169833
|
-
}
|
|
169834
|
-
return null;
|
|
169835
|
-
}
|
|
169836
|
-
if (limits.status === "rejected") {
|
|
169837
|
-
return { message: getLimitReachedText(limits, model), severity: "error" };
|
|
169838
|
-
}
|
|
169839
|
-
if (limits.status === "allowed_warning") {
|
|
169840
|
-
const WARNING_THRESHOLD = 0.7;
|
|
169841
|
-
if (limits.utilization !== undefined && limits.utilization < WARNING_THRESHOLD) {
|
|
169842
|
-
return null;
|
|
169843
|
-
}
|
|
169844
|
-
const subscriptionType = getSubscriptionType();
|
|
169845
|
-
const isTeamOrEnterprise = subscriptionType === "team" || subscriptionType === "enterprise";
|
|
169846
|
-
const hasExtraUsageEnabled = getOauthAccountInfo()?.hasExtraUsageEnabled === true;
|
|
169847
|
-
if (isTeamOrEnterprise && hasExtraUsageEnabled && !hasTheusAiBillingAccess()) {
|
|
169848
|
-
return null;
|
|
169849
|
-
}
|
|
169850
|
-
const text = getEarlyWarningText(limits);
|
|
169851
|
-
if (text) {
|
|
169852
|
-
return { message: text, severity: "warning" };
|
|
169853
|
-
}
|
|
169854
|
-
}
|
|
169855
|
-
return null;
|
|
169856
|
-
}
|
|
169857
|
-
function getRateLimitErrorMessage(limits, model) {
|
|
169858
|
-
const message = getRateLimitMessage(limits, model);
|
|
169859
|
-
if (message && message.severity === "error") {
|
|
169860
|
-
return message.message;
|
|
169861
|
-
}
|
|
169862
|
-
return null;
|
|
169863
|
-
}
|
|
169864
|
-
function getRateLimitWarning(limits, model) {
|
|
169865
|
-
const message = getRateLimitMessage(limits, model);
|
|
169866
|
-
if (message && message.severity === "warning") {
|
|
169867
|
-
return message.message;
|
|
169868
|
-
}
|
|
169869
|
-
return null;
|
|
169870
|
-
}
|
|
169871
|
-
function getLimitReachedText(limits, model) {
|
|
169872
|
-
const resetsAt = limits.resetsAt;
|
|
169873
|
-
const resetTime = resetsAt ? formatResetTime(resetsAt, true) : undefined;
|
|
169874
|
-
const overageResetTime = limits.overageResetsAt ? formatResetTime(limits.overageResetsAt, true) : undefined;
|
|
169875
|
-
const resetMessage = resetTime ? ` \xB7 resets ${resetTime}` : "";
|
|
169876
|
-
if (limits.overageStatus === "rejected") {
|
|
169877
|
-
let overageResetMessage = "";
|
|
169878
|
-
if (resetsAt && limits.overageResetsAt) {
|
|
169879
|
-
if (resetsAt < limits.overageResetsAt) {
|
|
169880
|
-
overageResetMessage = ` \xB7 resets ${resetTime}`;
|
|
169881
|
-
} else {
|
|
169882
|
-
overageResetMessage = ` \xB7 resets ${overageResetTime}`;
|
|
169883
|
-
}
|
|
169884
|
-
} else if (resetTime) {
|
|
169885
|
-
overageResetMessage = ` \xB7 resets ${resetTime}`;
|
|
169886
|
-
} else if (overageResetTime) {
|
|
169887
|
-
overageResetMessage = ` \xB7 resets ${overageResetTime}`;
|
|
169888
|
-
}
|
|
169889
|
-
if (limits.overageDisabledReason === "out_of_credits") {
|
|
169890
|
-
return `You're out of extra usage${overageResetMessage}`;
|
|
169891
|
-
}
|
|
169892
|
-
return formatLimitReachedText("limit", overageResetMessage, model);
|
|
169893
|
-
}
|
|
169894
|
-
if (limits.rateLimitType === "seven_day_sonnet") {
|
|
169895
|
-
const subscriptionType = getSubscriptionType();
|
|
169896
|
-
const isProOrEnterprise = subscriptionType === "pro" || subscriptionType === "enterprise";
|
|
169897
|
-
const limit = isProOrEnterprise ? "weekly limit" : "Sonnet limit";
|
|
169898
|
-
return formatLimitReachedText(limit, resetMessage, model);
|
|
169899
|
-
}
|
|
169900
|
-
if (limits.rateLimitType === "seven_day_opus") {
|
|
169901
|
-
return formatLimitReachedText("Opus limit", resetMessage, model);
|
|
169902
|
-
}
|
|
169903
|
-
if (limits.rateLimitType === "seven_day") {
|
|
169904
|
-
return formatLimitReachedText("weekly limit", resetMessage, model);
|
|
169905
|
-
}
|
|
169906
|
-
if (limits.rateLimitType === "five_hour") {
|
|
169907
|
-
return formatLimitReachedText("session limit", resetMessage, model);
|
|
169908
|
-
}
|
|
169909
|
-
return formatLimitReachedText("usage limit", resetMessage, model);
|
|
169910
|
-
}
|
|
169911
|
-
function getEarlyWarningText(limits) {
|
|
169912
|
-
let limitName = null;
|
|
169913
|
-
switch (limits.rateLimitType) {
|
|
169914
|
-
case "seven_day":
|
|
169915
|
-
limitName = "weekly limit";
|
|
169916
|
-
break;
|
|
169917
|
-
case "five_hour":
|
|
169918
|
-
limitName = "session limit";
|
|
169919
|
-
break;
|
|
169920
|
-
case "seven_day_opus":
|
|
169921
|
-
limitName = "Opus limit";
|
|
169922
|
-
break;
|
|
169923
|
-
case "seven_day_sonnet":
|
|
169924
|
-
limitName = "Sonnet limit";
|
|
169925
|
-
break;
|
|
169926
|
-
case "overage":
|
|
169927
|
-
limitName = "extra usage";
|
|
169928
|
-
break;
|
|
169929
|
-
case undefined:
|
|
169930
|
-
return null;
|
|
169931
|
-
}
|
|
169932
|
-
const used = limits.utilization ? Math.floor(limits.utilization * 100) : undefined;
|
|
169933
|
-
const resetTime = limits.resetsAt ? formatResetTime(limits.resetsAt, true) : undefined;
|
|
169934
|
-
const upsell = getWarningUpsellText(limits.rateLimitType);
|
|
169935
|
-
if (used && resetTime) {
|
|
169936
|
-
const base3 = `You've used ${used}% of your ${limitName} \xB7 resets ${resetTime}`;
|
|
169937
|
-
return upsell ? `${base3} \xB7 ${upsell}` : base3;
|
|
169938
|
-
}
|
|
169939
|
-
if (used) {
|
|
169940
|
-
const base3 = `You've used ${used}% of your ${limitName}`;
|
|
169941
|
-
return upsell ? `${base3} \xB7 ${upsell}` : base3;
|
|
169942
|
-
}
|
|
169943
|
-
if (limits.rateLimitType === "overage") {
|
|
169944
|
-
limitName += " limit";
|
|
169945
|
-
}
|
|
169946
|
-
if (resetTime) {
|
|
169947
|
-
const base3 = `Approaching ${limitName} \xB7 resets ${resetTime}`;
|
|
169948
|
-
return upsell ? `${base3} \xB7 ${upsell}` : base3;
|
|
169949
|
-
}
|
|
169950
|
-
const base2 = `Approaching ${limitName}`;
|
|
169951
|
-
return upsell ? `${base2} \xB7 ${upsell}` : base2;
|
|
169952
|
-
}
|
|
169953
|
-
function getWarningUpsellText(rateLimitType) {
|
|
169954
|
-
const subscriptionType = getSubscriptionType();
|
|
169955
|
-
const hasExtraUsageEnabled = getOauthAccountInfo()?.hasExtraUsageEnabled === true;
|
|
169956
|
-
if (rateLimitType === "five_hour") {
|
|
169957
|
-
if (subscriptionType === "team" || subscriptionType === "enterprise") {
|
|
169958
|
-
if (!hasExtraUsageEnabled && isOverageProvisioningAllowed()) {
|
|
169959
|
-
return "/extra-usage to request more";
|
|
169960
|
-
}
|
|
169961
|
-
return null;
|
|
169962
|
-
}
|
|
169963
|
-
if (subscriptionType === "pro" || subscriptionType === "max") {
|
|
169964
|
-
return "/upgrade to keep using Theus";
|
|
169965
|
-
}
|
|
169966
|
-
}
|
|
169967
|
-
if (rateLimitType === "overage") {
|
|
169968
|
-
if (subscriptionType === "team" || subscriptionType === "enterprise") {
|
|
169969
|
-
if (!hasExtraUsageEnabled && isOverageProvisioningAllowed()) {
|
|
169970
|
-
return "/extra-usage to request more";
|
|
169971
|
-
}
|
|
169972
|
-
}
|
|
169973
|
-
}
|
|
169974
|
-
return null;
|
|
169975
|
-
}
|
|
169976
|
-
function getUsingOverageText(limits) {
|
|
169977
|
-
const resetTime = limits.resetsAt ? formatResetTime(limits.resetsAt, true) : "";
|
|
169978
|
-
let limitName = "";
|
|
169979
|
-
if (limits.rateLimitType === "five_hour") {
|
|
169980
|
-
limitName = "session limit";
|
|
169981
|
-
} else if (limits.rateLimitType === "seven_day") {
|
|
169982
|
-
limitName = "weekly limit";
|
|
169983
|
-
} else if (limits.rateLimitType === "seven_day_opus") {
|
|
169984
|
-
limitName = "Opus limit";
|
|
169985
|
-
} else if (limits.rateLimitType === "seven_day_sonnet") {
|
|
169986
|
-
const subscriptionType = getSubscriptionType();
|
|
169987
|
-
const isProOrEnterprise = subscriptionType === "pro" || subscriptionType === "enterprise";
|
|
169988
|
-
limitName = isProOrEnterprise ? "weekly limit" : "Sonnet limit";
|
|
169989
|
-
}
|
|
169990
|
-
if (!limitName) {
|
|
169991
|
-
return "Now using extra usage";
|
|
169992
|
-
}
|
|
169993
|
-
const resetMessage = resetTime ? ` \xB7 Your ${limitName} resets ${resetTime}` : "";
|
|
169994
|
-
return `You're now using extra usage${resetMessage}`;
|
|
169995
|
-
}
|
|
169996
|
-
function formatLimitReachedText(limit, resetMessage, _model) {
|
|
169997
|
-
if (process.env.USER_TYPE === "ant") {
|
|
169998
|
-
return `You've hit your ${limit}${resetMessage}. If you have feedback about this limit, post in ${FEEDBACK_CHANNEL_ANT}. You can reset your limits with /reset-limits`;
|
|
169999
|
-
}
|
|
170000
|
-
return `You've hit your ${limit}${resetMessage}`;
|
|
170001
|
-
}
|
|
170002
|
-
function isGatewayQuotaExceededBody(body) {
|
|
170003
|
-
if (typeof body !== "object" || body === null)
|
|
170004
|
-
return false;
|
|
170005
|
-
const b = body;
|
|
170006
|
-
if (b.quota_exceeded === true)
|
|
170007
|
-
return true;
|
|
170008
|
-
const err2 = b.error;
|
|
170009
|
-
return typeof err2 === "object" && err2 !== null && err2.code === "quota_exceeded";
|
|
170010
|
-
}
|
|
170011
|
-
function asNonEmptyString(value) {
|
|
170012
|
-
if (typeof value === "string" && value.trim().length > 0)
|
|
170013
|
-
return value;
|
|
170014
|
-
if (typeof value === "number" && Number.isFinite(value))
|
|
170015
|
-
return String(value);
|
|
170016
|
-
return;
|
|
170017
|
-
}
|
|
170018
|
-
function isGatewayQuotaExceededMessage(text) {
|
|
170019
|
-
return text.startsWith(GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX);
|
|
170020
|
-
}
|
|
170021
|
-
function creditsFromBody(creditos, tt) {
|
|
170022
|
-
const direct = asNonEmptyString(creditos);
|
|
170023
|
-
if (direct)
|
|
170024
|
-
return direct;
|
|
170025
|
-
const ttStr = asNonEmptyString(tt);
|
|
170026
|
-
if (!ttStr)
|
|
170027
|
-
return;
|
|
170028
|
-
const ttNum = Number(ttStr);
|
|
170029
|
-
if (!Number.isFinite(ttNum))
|
|
170030
|
-
return;
|
|
170031
|
-
return String(Math.round(ttNum / 1000));
|
|
170032
|
-
}
|
|
170033
|
-
function getGatewayQuotaExceededMessage(body) {
|
|
170034
|
-
const pausePromise = "Sin sorpresas: al tope, Theus se pausa \u2014 jam\xE1s factura de m\xE1s.";
|
|
170035
|
-
const genericFallback = `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${THEUS_PRICING_URL} (anual = 2 meses gratis).`;
|
|
170036
|
-
if (!isGatewayQuotaExceededBody(body)) {
|
|
170037
|
-
return genericFallback;
|
|
170038
|
-
}
|
|
170039
|
-
const plan = asNonEmptyString(body.plan);
|
|
170040
|
-
const cuotaCreditos = creditsFromBody(body.creditos_cuota, body.cuota_tt);
|
|
170041
|
-
const reset3 = asNonEmptyString(body.reset);
|
|
170042
|
-
const url3 = asNonEmptyString(body.url) ?? THEUS_PRICING_URL;
|
|
170043
|
-
if (!plan || !cuotaCreditos || !reset3) {
|
|
170044
|
-
return `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
|
|
170045
|
-
}
|
|
170046
|
-
const base2 = `Llegaste al l\xEDmite de tu plan ${plan} (${cuotaCreditos} cr\xE9ditos) \xB7 se renueva ${reset3}. ${pausePromise}`;
|
|
170047
|
-
const upgradePlan = asNonEmptyString(body.upgrade?.plan);
|
|
170048
|
-
const upgradeCreditos = creditsFromBody(body.upgrade?.creditos, body.upgrade?.tt);
|
|
170049
|
-
const upgradePrecio = asNonEmptyString(body.upgrade?.precio);
|
|
170050
|
-
if (upgradePlan && upgradeCreditos && upgradePrecio) {
|
|
170051
|
-
return `${base2} \xBFNecesitas seguir hoy? ${upgradePlan} incluye ${upgradeCreditos} cr\xE9ditos por ${upgradePrecio} \u2192 ${url3} (anual = 2 meses gratis)`;
|
|
170052
|
-
}
|
|
170053
|
-
return `${base2} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
|
|
170054
|
-
}
|
|
170055
|
-
var FEEDBACK_CHANNEL_ANT = "#briarpatch-cc", RATE_LIMIT_ERROR_PREFIXES, THEUS_PRICING_URL = "https://theus.pe/precios", GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX = "Llegaste al l\xEDmite de tu plan";
|
|
170056
|
-
var init_rateLimitMessages = __esm(() => {
|
|
170057
|
-
init_auth();
|
|
170058
|
-
init_billing();
|
|
170059
|
-
init_format();
|
|
170060
|
-
RATE_LIMIT_ERROR_PREFIXES = [
|
|
170061
|
-
"You've hit your",
|
|
170062
|
-
"You've used",
|
|
170063
|
-
"You're now using extra usage",
|
|
170064
|
-
"You're close to",
|
|
170065
|
-
"You're out of extra usage"
|
|
170066
|
-
];
|
|
170067
|
-
});
|
|
170068
|
-
|
|
170069
170079
|
// services/theusAiLimits.ts
|
|
170070
170080
|
function getRateLimitDisplayName(type) {
|
|
170071
170081
|
return RATE_LIMIT_DISPLAY_NAMES[type] || type;
|
|
@@ -203207,7 +203217,7 @@ function getInstallationEnv() {
|
|
|
203207
203217
|
return;
|
|
203208
203218
|
}
|
|
203209
203219
|
function getTheusCodeVersion() {
|
|
203210
|
-
return { VERSION: "0.2.
|
|
203220
|
+
return { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
203211
203221
|
}
|
|
203212
203222
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
203213
203223
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -204725,7 +204735,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
|
|
|
204725
204735
|
if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
|
|
204726
204736
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
204727
204737
|
if (!hasTrust) {
|
|
204728
|
-
const error40 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
204738
|
+
const error40 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
204729
204739
|
logAntError("MCP headersHelper invoked before trust check", error40);
|
|
204730
204740
|
logEvent("tengu_mcp_headersHelper_missing_trust", {});
|
|
204731
204741
|
return null;
|
|
@@ -205935,7 +205945,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
205935
205945
|
const client2 = new Client({
|
|
205936
205946
|
name: "theus-code",
|
|
205937
205947
|
title: "Theus",
|
|
205938
|
-
version: { VERSION: "0.2.
|
|
205948
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ?? "unknown",
|
|
205939
205949
|
description: "Theus's agentic coding tool",
|
|
205940
205950
|
websiteUrl: PRODUCT_URL
|
|
205941
205951
|
}, {
|
|
@@ -206289,7 +206299,7 @@ var init_client5 = __esm(() => {
|
|
|
206289
206299
|
const client2 = new Client({
|
|
206290
206300
|
name: "theus-code",
|
|
206291
206301
|
title: "Theus",
|
|
206292
|
-
version: { VERSION: "0.2.
|
|
206302
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ?? "unknown",
|
|
206293
206303
|
description: "Theus's agentic coding tool",
|
|
206294
206304
|
websiteUrl: PRODUCT_URL
|
|
206295
206305
|
}, {
|
|
@@ -216868,7 +216878,7 @@ async function initializeBetaTracing(resource) {
|
|
|
216868
216878
|
});
|
|
216869
216879
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216870
216880
|
setLoggerProvider(loggerProvider);
|
|
216871
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216881
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216872
216882
|
setEventLogger(eventLogger);
|
|
216873
216883
|
process.on("beforeExit", async () => {
|
|
216874
216884
|
await loggerProvider?.forceFlush();
|
|
@@ -216908,7 +216918,7 @@ async function initializeTelemetry() {
|
|
|
216908
216918
|
const platform4 = getPlatform();
|
|
216909
216919
|
const baseAttributes = {
|
|
216910
216920
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
216911
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
216921
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
216912
216922
|
};
|
|
216913
216923
|
if (platform4 === "wsl") {
|
|
216914
216924
|
const wslVersion = getWslVersion();
|
|
@@ -216953,7 +216963,7 @@ async function initializeTelemetry() {
|
|
|
216953
216963
|
} catch {}
|
|
216954
216964
|
};
|
|
216955
216965
|
registerCleanup(shutdownTelemetry2);
|
|
216956
|
-
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216966
|
+
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216957
216967
|
}
|
|
216958
216968
|
const meterProvider = new MeterProvider({
|
|
216959
216969
|
resource,
|
|
@@ -216973,7 +216983,7 @@ async function initializeTelemetry() {
|
|
|
216973
216983
|
});
|
|
216974
216984
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216975
216985
|
setLoggerProvider(loggerProvider);
|
|
216976
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216986
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216977
216987
|
setEventLogger(eventLogger);
|
|
216978
216988
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
216979
216989
|
process.on("beforeExit", async () => {
|
|
@@ -217035,7 +217045,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
217035
217045
|
}
|
|
217036
217046
|
};
|
|
217037
217047
|
registerCleanup(shutdownTelemetry);
|
|
217038
|
-
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
217048
|
+
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
217039
217049
|
}
|
|
217040
217050
|
async function flushTelemetry() {
|
|
217041
217051
|
const meterProvider = getMeterProvider();
|
|
@@ -217575,7 +217585,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
|
|
|
217575
217585
|
return "install_failed";
|
|
217576
217586
|
}
|
|
217577
217587
|
const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
|
|
217578
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.
|
|
217588
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
|
|
217579
217589
|
if (result.code !== 0) {
|
|
217580
217590
|
const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
|
|
217581
217591
|
logError2(error40);
|
|
@@ -217721,9 +217731,9 @@ async function assertMinVersion() {
|
|
|
217721
217731
|
if (false) {}
|
|
217722
217732
|
try {
|
|
217723
217733
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
217724
|
-
if (versionConfig.minVersion && lt({ VERSION: "0.2.
|
|
217734
|
+
if (versionConfig.minVersion && lt({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, versionConfig.minVersion)) {
|
|
217725
217735
|
console.error(`
|
|
217726
|
-
It looks like your version of Theus (${{ VERSION: "0.2.
|
|
217736
|
+
It looks like your version of Theus (${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}) needs an update.
|
|
217727
217737
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
217728
217738
|
|
|
217729
217739
|
To update, please run:
|
|
@@ -217864,7 +217874,7 @@ async function getInstallationPrefix() {
|
|
|
217864
217874
|
return prefixResult.stdout.trim();
|
|
217865
217875
|
}
|
|
217866
217876
|
function getGlobalInstallPackageManager() {
|
|
217867
|
-
if ({ VERSION: "0.2.
|
|
217877
|
+
if ({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL === "theus-cli") {
|
|
217868
217878
|
return "npm";
|
|
217869
217879
|
}
|
|
217870
217880
|
return env3.isRunningWithBun() ? "bun" : "npm";
|
|
@@ -217889,7 +217899,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
217889
217899
|
}
|
|
217890
217900
|
async function getLatestVersion(channel2) {
|
|
217891
217901
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
217892
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.
|
|
217902
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
|
|
217893
217903
|
if (result.code !== 0) {
|
|
217894
217904
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
217895
217905
|
if (result.stderr) {
|
|
@@ -217905,7 +217915,7 @@ async function getLatestVersion(channel2) {
|
|
|
217905
217915
|
return result.stdout.trim();
|
|
217906
217916
|
}
|
|
217907
217917
|
async function getNpmDistTags() {
|
|
217908
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.
|
|
217918
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
|
|
217909
217919
|
if (result.code !== 0) {
|
|
217910
217920
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
217911
217921
|
return { latest: null, stable: null };
|
|
@@ -217945,7 +217955,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217945
217955
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
217946
217956
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
217947
217957
|
pid: process.pid,
|
|
217948
|
-
currentVersion: { VERSION: "0.2.
|
|
217958
|
+
currentVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217949
217959
|
});
|
|
217950
217960
|
return "in_progress";
|
|
217951
217961
|
}
|
|
@@ -217954,7 +217964,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217954
217964
|
if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
|
|
217955
217965
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
217956
217966
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
217957
|
-
currentVersion: { VERSION: "0.2.
|
|
217967
|
+
currentVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217958
217968
|
});
|
|
217959
217969
|
console.error(`
|
|
217960
217970
|
Error: Windows NPM detected in WSL
|
|
@@ -217973,7 +217983,7 @@ To fix this issue:
|
|
|
217973
217983
|
if (!hasPermissions) {
|
|
217974
217984
|
return "no_permissions";
|
|
217975
217985
|
}
|
|
217976
|
-
const packageSpec = specificVersion ? `${{ VERSION: "0.2.
|
|
217986
|
+
const packageSpec = specificVersion ? `${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${specificVersion}` : { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL;
|
|
217977
217987
|
const packageManager = getGlobalInstallPackageManager();
|
|
217978
217988
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
217979
217989
|
if (installResult.code !== 0) {
|
|
@@ -218301,8 +218311,8 @@ async function detectMultipleInstallations() {
|
|
|
218301
218311
|
installations.push({ type: "npm-local", path: localPath });
|
|
218302
218312
|
}
|
|
218303
218313
|
const packagesToCheck = ["@theus-ai/theus-code"];
|
|
218304
|
-
if ({ VERSION: "0.2.
|
|
218305
|
-
packagesToCheck.push({ VERSION: "0.2.
|
|
218314
|
+
if ({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
|
|
218315
|
+
packagesToCheck.push({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL);
|
|
218306
218316
|
}
|
|
218307
218317
|
const npmResult = await execFileNoThrow("npm", [
|
|
218308
218318
|
"-g",
|
|
@@ -218485,7 +218495,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
218485
218495
|
}
|
|
218486
218496
|
async function getDoctorDiagnostic() {
|
|
218487
218497
|
const installationType = await getCurrentInstallationType();
|
|
218488
|
-
const version2 = { VERSION: "0.2.
|
|
218498
|
+
const version2 = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION : "unknown";
|
|
218489
218499
|
const installationPath = await getInstallationPath();
|
|
218490
218500
|
const invokedBinary = getInvokedBinary();
|
|
218491
218501
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -218497,8 +218507,8 @@ async function getDoctorDiagnostic() {
|
|
|
218497
218507
|
for (const install of npmInstalls) {
|
|
218498
218508
|
if (install.type === "npm-global") {
|
|
218499
218509
|
let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
|
|
218500
|
-
if ({ VERSION: "0.2.
|
|
218501
|
-
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.
|
|
218510
|
+
if ({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
|
|
218511
|
+
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`;
|
|
218502
218512
|
}
|
|
218503
218513
|
warnings.push({
|
|
218504
218514
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -218610,7 +218620,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218610
218620
|
const startTime2 = Date.now();
|
|
218611
218621
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
218612
218622
|
"view",
|
|
218613
|
-
`${{ VERSION: "0.2.
|
|
218623
|
+
`${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${tag2}`,
|
|
218614
218624
|
"version",
|
|
218615
218625
|
"--prefer-online",
|
|
218616
218626
|
"--registry",
|
|
@@ -218634,7 +218644,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218634
218644
|
latency_ms: latencyMs,
|
|
218635
218645
|
source_npm: true
|
|
218636
218646
|
});
|
|
218637
|
-
logForDebugging(`npm view ${{ VERSION: "0.2.
|
|
218647
|
+
logForDebugging(`npm view ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${tag2} version: ${stdout}`);
|
|
218638
218648
|
const latestVersion = stdout.trim();
|
|
218639
218649
|
return latestVersion;
|
|
218640
218650
|
}
|
|
@@ -218690,7 +218700,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218690
218700
|
const fs3 = getFsImplementation();
|
|
218691
218701
|
await fs3.rm(stagingPath, { recursive: true, force: true });
|
|
218692
218702
|
const platform4 = getPlatform2();
|
|
218693
|
-
const platformPackageName = `${{ VERSION: "0.2.
|
|
218703
|
+
const platformPackageName = `${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}-${platform4}`;
|
|
218694
218704
|
logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
|
|
218695
218705
|
const {
|
|
218696
218706
|
stdout: integrityOutput,
|
|
@@ -218719,7 +218729,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218719
218729
|
name: "theus-native-installer",
|
|
218720
218730
|
version: "0.0.1",
|
|
218721
218731
|
dependencies: {
|
|
218722
|
-
[{ VERSION: "0.2.
|
|
218732
|
+
[{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL]: version2
|
|
218723
218733
|
}
|
|
218724
218734
|
};
|
|
218725
218735
|
const packageLock = {
|
|
@@ -218732,10 +218742,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218732
218742
|
name: "theus-native-installer",
|
|
218733
218743
|
version: "0.0.1",
|
|
218734
218744
|
dependencies: {
|
|
218735
|
-
[{ VERSION: "0.2.
|
|
218745
|
+
[{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL]: version2
|
|
218736
218746
|
}
|
|
218737
218747
|
},
|
|
218738
|
-
[`node_modules/${{ VERSION: "0.2.
|
|
218748
|
+
[`node_modules/${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}`]: {
|
|
218739
218749
|
version: version2,
|
|
218740
218750
|
optionalDependencies: {
|
|
218741
218751
|
[platformPackageName]: version2
|
|
@@ -218757,7 +218767,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218757
218767
|
if (result.code !== 0) {
|
|
218758
218768
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
218759
218769
|
}
|
|
218760
|
-
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.
|
|
218770
|
+
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${version2}`);
|
|
218761
218771
|
}
|
|
218762
218772
|
function getStallTimeoutMs() {
|
|
218763
218773
|
return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -219420,8 +219430,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
219420
219430
|
const maxVersion = await getMaxVersion();
|
|
219421
219431
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
219422
219432
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
219423
|
-
if (gte({ VERSION: "0.2.
|
|
219424
|
-
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.
|
|
219433
|
+
if (gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
|
|
219434
|
+
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
219425
219435
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
219426
219436
|
latency_ms: Date.now() - startTime2,
|
|
219427
219437
|
max_version: maxVersion,
|
|
@@ -219432,7 +219442,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
219432
219442
|
version2 = maxVersion;
|
|
219433
219443
|
}
|
|
219434
219444
|
}
|
|
219435
|
-
if (!forceReinstall && version2 === { VERSION: "0.2.
|
|
219445
|
+
if (!forceReinstall && version2 === { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION && await versionIsAvailable(version2) && await isPossibleTheusBinary(executablePath)) {
|
|
219436
219446
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
219437
219447
|
logEvent("tengu_native_update_complete", {
|
|
219438
219448
|
latency_ms: Date.now() - startTime2,
|
|
@@ -220182,8 +220192,8 @@ async function cleanupNpmInstallations() {
|
|
|
220182
220192
|
} else if (codePackageResult.error) {
|
|
220183
220193
|
errors4.push(codePackageResult.error);
|
|
220184
220194
|
}
|
|
220185
|
-
if ({ VERSION: "0.2.
|
|
220186
|
-
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.
|
|
220195
|
+
if ({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
|
|
220196
|
+
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL);
|
|
220187
220197
|
if (macroPackageResult.success) {
|
|
220188
220198
|
removed++;
|
|
220189
220199
|
if (macroPackageResult.warning) {
|
|
@@ -230672,6 +230682,26 @@ var init_ConsoleOAuthFlow = __esm(() => {
|
|
|
230672
230682
|
var NOVEDADES;
|
|
230673
230683
|
var init_data = __esm(() => {
|
|
230674
230684
|
NOVEDADES = [
|
|
230685
|
+
{
|
|
230686
|
+
version: "v0.2.52",
|
|
230687
|
+
fecha: "2026-07-26",
|
|
230688
|
+
titulo: "Cuando se agota tu plan, ahora te lo decimos",
|
|
230689
|
+
puntos: [
|
|
230690
|
+
"Al llegar al tope de tu plan, Theus mostraba \xABRequest timed out\xBB despu\xE9s de varios minutos de espera. El servidor s\xED explicaba el motivo, pero el mensaje se perd\xEDa por el camino y el CLI segu\xEDa probando alternativas hasta rendirse por tiempo.",
|
|
230691
|
+
"Ahora corta al instante y te dice lo que pasa: tu plan, tus cr\xE9ditos, cu\xE1ndo se renueva y qu\xE9 opciones tienes. Sin esperas de siete minutos para acabar sin saber qu\xE9 fall\xF3.",
|
|
230692
|
+
"En el servidor: los cr\xE9ditos ya no cuentan igual lo que escribes que lo que el modelo responde (la entrada pondera menos, porque cuesta menos), y las respuestas que se interrumpen a mitad cierran con un error expl\xEDcito en vez de dejar la conexi\xF3n colgada."
|
|
230693
|
+
]
|
|
230694
|
+
},
|
|
230695
|
+
{
|
|
230696
|
+
version: "v0.2.51",
|
|
230697
|
+
fecha: "2026-07-24",
|
|
230698
|
+
titulo: "N\xFAcleo reconstruido: menos formas de que algo falle",
|
|
230699
|
+
puntos: [
|
|
230700
|
+
"Un release de robustez, no de novedades visibles: reconstruimos el n\xFAcleo del CLI y saldamos la deuda de tipos que arrastraba, miles de inconsistencias que el compilador nunca llegaba a verificar.",
|
|
230701
|
+
"Dos fallos salieron a la luz y quedaron corregidos: el manejo del correo de tu cuenta al iniciar sesi\xF3n ahora tolera que el servidor omita alg\xFAn dato, y un di\xE1logo interno que pod\xEDa dejar la caja de texto sin responder.",
|
|
230702
|
+
"Sin cambios en c\xF3mo usas Theus ni en lo que hace: las mismas funciones, con la bater\xEDa de pruebas en verde."
|
|
230703
|
+
]
|
|
230704
|
+
},
|
|
230675
230705
|
{
|
|
230676
230706
|
version: "v0.2.50",
|
|
230677
230707
|
fecha: "2026-07-24",
|
|
@@ -305118,6 +305148,14 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
305118
305148
|
});
|
|
305119
305149
|
return { reason: "image_error" };
|
|
305120
305150
|
}
|
|
305151
|
+
if (error40 instanceof GatewayQuotaExceededError) {
|
|
305152
|
+
yield* yieldMissingToolResultBlocks(assistantMessages, errorMessage2);
|
|
305153
|
+
yield createAssistantAPIErrorMessage({
|
|
305154
|
+
content: error40.message,
|
|
305155
|
+
error: "rate_limit"
|
|
305156
|
+
});
|
|
305157
|
+
return { reason: "model_error", error: error40 };
|
|
305158
|
+
}
|
|
305121
305159
|
yield* yieldMissingToolResultBlocks(assistantMessages, errorMessage2);
|
|
305122
305160
|
yield createAssistantAPIErrorMessage({
|
|
305123
305161
|
content: errorMessage2
|
|
@@ -305488,6 +305526,7 @@ var init_query = __esm(() => {
|
|
|
305488
305526
|
init_compact();
|
|
305489
305527
|
init_analytics();
|
|
305490
305528
|
init_imageValidation();
|
|
305529
|
+
init_rateLimitMessages();
|
|
305491
305530
|
init_imageResizer();
|
|
305492
305531
|
init_Tool();
|
|
305493
305532
|
init_log2();
|
|
@@ -305592,9 +305631,9 @@ function getTheusEnvMetadata() {
|
|
|
305592
305631
|
};
|
|
305593
305632
|
}
|
|
305594
305633
|
function getBuildAgeMinutes() {
|
|
305595
|
-
if (!{ VERSION: "0.2.
|
|
305634
|
+
if (!{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME)
|
|
305596
305635
|
return;
|
|
305597
|
-
const buildTime = new Date({ VERSION: "0.2.
|
|
305636
|
+
const buildTime = new Date({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME).getTime();
|
|
305598
305637
|
if (isNaN(buildTime))
|
|
305599
305638
|
return;
|
|
305600
305639
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -322103,6 +322142,12 @@ function logToolUseToolResultMismatch(toolUseId, messages, messagesForAPI) {
|
|
|
322103
322142
|
} catch (_) {}
|
|
322104
322143
|
}
|
|
322105
322144
|
function getAssistantMessageFromError(error40, model, options2) {
|
|
322145
|
+
if (error40 instanceof GatewayQuotaExceededError) {
|
|
322146
|
+
return createAssistantAPIErrorMessage({
|
|
322147
|
+
content: getGatewayQuotaExceededMessage(error40.body),
|
|
322148
|
+
error: "rate_limit"
|
|
322149
|
+
});
|
|
322150
|
+
}
|
|
322106
322151
|
if (error40 instanceof import_sdk10.APIConnectionTimeoutError || error40 instanceof import_sdk10.APIConnectionError && error40.message.toLowerCase().includes("timeout")) {
|
|
322107
322152
|
return createAssistantAPIErrorMessage({
|
|
322108
322153
|
content: API_TIMEOUT_ERROR_MESSAGE,
|
|
@@ -322243,7 +322288,7 @@ function getAssistantMessageFromError(error40, model, options2) {
|
|
|
322243
322288
|
if (process.env.USER_TYPE === "ant") {
|
|
322244
322289
|
const baseMessage = `API Error: 400 ${error40.message}
|
|
322245
322290
|
|
|
322246
|
-
Run /share and post the JSON file to ${{ VERSION: "0.2.
|
|
322291
|
+
Run /share and post the JSON file to ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`;
|
|
322247
322292
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
322248
322293
|
return createAssistantAPIErrorMessage({
|
|
322249
322294
|
content: baseMessage + rewindInstruction,
|
|
@@ -322279,7 +322324,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.51", BUILD_TIME: "1970-01
|
|
|
322279
322324
|
if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
|
|
322280
322325
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
322281
322326
|
const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
322282
|
-
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.
|
|
322327
|
+
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL} for help getting access.`;
|
|
322283
322328
|
return createAssistantAPIErrorMessage({
|
|
322284
322329
|
content: msg,
|
|
322285
322330
|
error: "invalid_request"
|
|
@@ -330203,7 +330248,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
330203
330248
|
} catch {}
|
|
330204
330249
|
const data = {
|
|
330205
330250
|
trigger,
|
|
330206
|
-
version: { VERSION: "0.2.
|
|
330251
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
330207
330252
|
platform: process.platform,
|
|
330208
330253
|
transcript,
|
|
330209
330254
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -330408,10 +330453,10 @@ Si el usuario indic\xF3 una duraci\xF3n, p\xE1sala en el par\xE1metro \`duration
|
|
|
330408
330453
|
|
|
330409
330454
|
// commands/issue/index.ts
|
|
330410
330455
|
function getCliVersion() {
|
|
330411
|
-
return { VERSION: "0.2.
|
|
330456
|
+
return { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION : "desconocida";
|
|
330412
330457
|
}
|
|
330413
330458
|
function getIssuesExplainer() {
|
|
330414
|
-
return { VERSION: "0.2.
|
|
330459
|
+
return { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER ? { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER : "report issues to the Theus maintainers";
|
|
330415
330460
|
}
|
|
330416
330461
|
function getActiveModelLabel() {
|
|
330417
330462
|
try {
|
|
@@ -333244,7 +333289,7 @@ function buildPrimarySection() {
|
|
|
333244
333289
|
});
|
|
333245
333290
|
return [{
|
|
333246
333291
|
label: "Version",
|
|
333247
|
-
value: { VERSION: "0.2.
|
|
333292
|
+
value: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
333248
333293
|
}, {
|
|
333249
333294
|
label: "Session name",
|
|
333250
333295
|
value: nameValue
|
|
@@ -337060,7 +337105,7 @@ function Config({
|
|
|
337060
337105
|
}
|
|
337061
337106
|
})
|
|
337062
337107
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime189.jsx(ChannelDowngradeDialog, {
|
|
337063
|
-
currentVersion: { VERSION: "0.2.
|
|
337108
|
+
currentVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
337064
337109
|
onChoice: (choice) => {
|
|
337065
337110
|
setShowSubmenu(null);
|
|
337066
337111
|
setTabsHidden(false);
|
|
@@ -337072,7 +337117,7 @@ function Config({
|
|
|
337072
337117
|
autoUpdatesChannel: "stable"
|
|
337073
337118
|
};
|
|
337074
337119
|
if (choice === "stay") {
|
|
337075
|
-
newSettings.minimumVersion = { VERSION: "0.2.
|
|
337120
|
+
newSettings.minimumVersion = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
337076
337121
|
}
|
|
337077
337122
|
updateSettingsForSource("userSettings", newSettings);
|
|
337078
337123
|
setSettingsData((prev_27) => ({
|
|
@@ -345317,7 +345362,7 @@ function HelpV2(t0) {
|
|
|
345317
345362
|
let t6;
|
|
345318
345363
|
if ($2[31] !== tabs) {
|
|
345319
345364
|
t6 = /* @__PURE__ */ jsx_runtime217.jsx(Tabs, {
|
|
345320
|
-
title: `Theus v${{ VERSION: "0.2.
|
|
345365
|
+
title: `Theus v${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
|
|
345321
345366
|
color: "professionalBlue",
|
|
345322
345367
|
defaultTab: "general",
|
|
345323
345368
|
children: tabs
|
|
@@ -363569,7 +363614,7 @@ function Onboarding({
|
|
|
363569
363614
|
flexDirection: "column",
|
|
363570
363615
|
children: [
|
|
363571
363616
|
/* @__PURE__ */ jsx_runtime250.jsx(TheusBanner, {
|
|
363572
|
-
version: { VERSION: "0.2.
|
|
363617
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
363573
363618
|
}),
|
|
363574
363619
|
/* @__PURE__ */ jsx_runtime250.jsxs(ThemedBox_default, {
|
|
363575
363620
|
flexDirection: "column",
|
|
@@ -364070,9 +364115,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
364070
364115
|
return [];
|
|
364071
364116
|
}
|
|
364072
364117
|
}
|
|
364073
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.
|
|
364118
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
364074
364119
|
if (process.env.USER_TYPE === "ant") {
|
|
364075
|
-
const changelog = { VERSION: "0.2.
|
|
364120
|
+
const changelog = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION_CHANGELOG;
|
|
364076
364121
|
if (changelog) {
|
|
364077
364122
|
const commits = changelog.trim().split(`
|
|
364078
364123
|
`).filter(Boolean);
|
|
@@ -368274,7 +368319,7 @@ var init_Messages = __esm(() => {
|
|
|
368274
368319
|
let t1;
|
|
368275
368320
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
368276
368321
|
t1 = /* @__PURE__ */ jsx_runtime262.jsx(TheusSessionHeader, {
|
|
368277
|
-
version: { VERSION: "0.2.
|
|
368322
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
368278
368323
|
});
|
|
368279
368324
|
$2[0] = t1;
|
|
368280
368325
|
} else {
|
|
@@ -397098,7 +397143,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
397098
397143
|
smapsRollup,
|
|
397099
397144
|
platform: process.platform,
|
|
397100
397145
|
nodeVersion: process.version,
|
|
397101
|
-
ccVersion: { VERSION: "0.2.
|
|
397146
|
+
ccVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
397102
397147
|
};
|
|
397103
397148
|
}
|
|
397104
397149
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -397917,7 +397962,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
397917
397962
|
var call64 = async () => {
|
|
397918
397963
|
return {
|
|
397919
397964
|
type: "text",
|
|
397920
|
-
value: { VERSION: "0.2.
|
|
397965
|
+
value: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME ? `${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (built ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME})` : { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
397921
397966
|
};
|
|
397922
397967
|
}, version2, version_default;
|
|
397923
397968
|
var init_version = __esm(() => {
|
|
@@ -400518,7 +400563,7 @@ var SECRET_NAME_PATTERN, EXTRA_ENV_ALLOWLIST, REDACTED2 = "\u2039oculto\u203A",
|
|
|
400518
400563
|
const lines = [];
|
|
400519
400564
|
lines.push("## Entorno de ejecuci\xF3n");
|
|
400520
400565
|
lines.push("");
|
|
400521
|
-
const version3 = { VERSION: "0.2.
|
|
400566
|
+
const version3 = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION : "desconocida";
|
|
400522
400567
|
lines.push(`- Versi\xF3n de Theus: ${version3}`);
|
|
400523
400568
|
lines.push(`- Directorio de trabajo: ${getCwd()}`);
|
|
400524
400569
|
lines.push(`- \xBFRepositorio git?: ${isGit ? "s\xED" : "no"}`);
|
|
@@ -402987,13 +403032,13 @@ async function updateReleaseBundle() {
|
|
|
402987
403032
|
await gracefulShutdown(1);
|
|
402988
403033
|
return;
|
|
402989
403034
|
}
|
|
402990
|
-
if (gte({ VERSION: "0.2.
|
|
402991
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
403035
|
+
if (gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
|
|
403036
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
402992
403037
|
`);
|
|
402993
403038
|
await gracefulShutdown(0);
|
|
402994
403039
|
return;
|
|
402995
403040
|
}
|
|
402996
|
-
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.
|
|
403041
|
+
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
402997
403042
|
`);
|
|
402998
403043
|
writeToStdout(`Installing update from theus.pe/dl...
|
|
402999
403044
|
`);
|
|
@@ -403027,7 +403072,7 @@ async function updateReleaseBundle() {
|
|
|
403027
403072
|
return;
|
|
403028
403073
|
}
|
|
403029
403074
|
cpSync(staged, bundleDir, { recursive: true, force: true });
|
|
403030
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
403075
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${latest}`) + `
|
|
403031
403076
|
`);
|
|
403032
403077
|
await regenerateCompletionCache();
|
|
403033
403078
|
} finally {
|
|
@@ -403040,7 +403085,7 @@ async function updateReleaseBundle() {
|
|
|
403040
403085
|
async function update() {
|
|
403041
403086
|
logEvent("tengu_update_check", {});
|
|
403042
403087
|
await updateNaupa();
|
|
403043
|
-
writeToStdout(`Current version: ${{ VERSION: "0.2.
|
|
403088
|
+
writeToStdout(`Current version: ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
403044
403089
|
`);
|
|
403045
403090
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
403046
403091
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -403119,8 +403164,8 @@ async function update() {
|
|
|
403119
403164
|
writeToStdout(`Theus is managed by Homebrew.
|
|
403120
403165
|
`);
|
|
403121
403166
|
const latest = await getLatestVersion(channel2);
|
|
403122
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
403123
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
403167
|
+
if (latest && !gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
|
|
403168
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
|
|
403124
403169
|
`);
|
|
403125
403170
|
writeToStdout(`
|
|
403126
403171
|
`);
|
|
@@ -403136,8 +403181,8 @@ async function update() {
|
|
|
403136
403181
|
writeToStdout(`Theus is managed by winget.
|
|
403137
403182
|
`);
|
|
403138
403183
|
const latest = await getLatestVersion(channel2);
|
|
403139
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
403140
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
403184
|
+
if (latest && !gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
|
|
403185
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
|
|
403141
403186
|
`);
|
|
403142
403187
|
writeToStdout(`
|
|
403143
403188
|
`);
|
|
@@ -403153,8 +403198,8 @@ async function update() {
|
|
|
403153
403198
|
writeToStdout(`Theus is managed by apk.
|
|
403154
403199
|
`);
|
|
403155
403200
|
const latest = await getLatestVersion(channel2);
|
|
403156
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
403157
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
403201
|
+
if (latest && !gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
|
|
403202
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
|
|
403158
403203
|
`);
|
|
403159
403204
|
writeToStdout(`
|
|
403160
403205
|
`);
|
|
@@ -403219,11 +403264,11 @@ async function update() {
|
|
|
403219
403264
|
`);
|
|
403220
403265
|
await gracefulShutdown(1);
|
|
403221
403266
|
}
|
|
403222
|
-
if (result.latestVersion === { VERSION: "0.2.
|
|
403223
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
403267
|
+
if (result.latestVersion === { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
403268
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
403224
403269
|
`);
|
|
403225
403270
|
} else {
|
|
403226
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
403271
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${result.latestVersion}`) + `
|
|
403227
403272
|
`);
|
|
403228
403273
|
await regenerateCompletionCache();
|
|
403229
403274
|
}
|
|
@@ -403242,9 +403287,9 @@ async function update() {
|
|
|
403242
403287
|
await removeInstalledSymlink();
|
|
403243
403288
|
}
|
|
403244
403289
|
logForDebugging("update: Checking npm registry for latest version");
|
|
403245
|
-
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.
|
|
403290
|
+
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`);
|
|
403246
403291
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
403247
|
-
const npmCommand = `npm view ${{ VERSION: "0.2.
|
|
403292
|
+
const npmCommand = `npm view ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${npmTag} version`;
|
|
403248
403293
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
403249
403294
|
const latestVersion = await getLatestVersion(channel2);
|
|
403250
403295
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -403264,7 +403309,7 @@ async function update() {
|
|
|
403264
403309
|
`);
|
|
403265
403310
|
process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
|
|
403266
403311
|
`);
|
|
403267
|
-
if ({ VERSION: "0.2.
|
|
403312
|
+
if ({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && !{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL.startsWith("@theus")) {
|
|
403268
403313
|
process.stderr.write(` \u2022 Internal/development build not published to npm
|
|
403269
403314
|
`);
|
|
403270
403315
|
}
|
|
@@ -403276,19 +403321,19 @@ async function update() {
|
|
|
403276
403321
|
`);
|
|
403277
403322
|
process.stderr.write(` \u2022 Run with --debug flag for more details
|
|
403278
403323
|
`);
|
|
403279
|
-
const packageName = { VERSION: "0.2.
|
|
403324
|
+
const packageName = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL || (process.env.USER_TYPE === "ant" ? "@theus-ai/theus-cli" : "@theus-ai/theus-code");
|
|
403280
403325
|
process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
|
|
403281
403326
|
`);
|
|
403282
403327
|
process.stderr.write(` \u2022 Check if you need to login: npm whoami
|
|
403283
403328
|
`);
|
|
403284
403329
|
await gracefulShutdown(1);
|
|
403285
403330
|
}
|
|
403286
|
-
if (gte({ VERSION: "0.2.
|
|
403287
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
403331
|
+
if (gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latestVersion)) {
|
|
403332
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
403288
403333
|
`);
|
|
403289
403334
|
await gracefulShutdown(0);
|
|
403290
403335
|
}
|
|
403291
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.
|
|
403336
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
403292
403337
|
`);
|
|
403293
403338
|
writeToStdout(`Installing update...
|
|
403294
403339
|
`);
|
|
@@ -403333,7 +403378,7 @@ async function update() {
|
|
|
403333
403378
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
403334
403379
|
switch (status2) {
|
|
403335
403380
|
case "success":
|
|
403336
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
403381
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${latestVersion}`) + `
|
|
403337
403382
|
`);
|
|
403338
403383
|
await regenerateCompletionCache();
|
|
403339
403384
|
break;
|
|
@@ -403343,7 +403388,7 @@ async function update() {
|
|
|
403343
403388
|
if (useLocalUpdate) {
|
|
403344
403389
|
process.stderr.write(`Try manually updating with:
|
|
403345
403390
|
`);
|
|
403346
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
403391
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}
|
|
403347
403392
|
`);
|
|
403348
403393
|
} else {
|
|
403349
403394
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -403359,7 +403404,7 @@ async function update() {
|
|
|
403359
403404
|
if (useLocalUpdate) {
|
|
403360
403405
|
process.stderr.write(`Try manually updating with:
|
|
403361
403406
|
`);
|
|
403362
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
403407
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}
|
|
403363
403408
|
`);
|
|
403364
403409
|
} else {
|
|
403365
403410
|
process.stderr.write(`Or consider using native installation with: theus install
|
|
@@ -413198,7 +413243,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
413198
413243
|
init_settings2();
|
|
413199
413244
|
init_slowOperations();
|
|
413200
413245
|
init_uuid();
|
|
413201
|
-
VERSION4 = { VERSION: "0.2.
|
|
413246
|
+
VERSION4 = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
413202
413247
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
413203
413248
|
SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
413204
413249
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -414403,7 +414448,7 @@ var init_filesystem = __esm(() => {
|
|
|
414403
414448
|
});
|
|
414404
414449
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
414405
414450
|
const nonce = randomBytes21(16).toString("hex");
|
|
414406
|
-
return join150(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.
|
|
414451
|
+
return join150(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, nonce);
|
|
414407
414452
|
});
|
|
414408
414453
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
414409
414454
|
});
|
|
@@ -419582,7 +419627,7 @@ function getSimpleDoingTasksSection() {
|
|
|
419582
419627
|
];
|
|
419583
419628
|
const userHelpSubitems = [
|
|
419584
419629
|
`/help: Get help with using Theus`,
|
|
419585
|
-
`To give feedback, users should ${{ VERSION: "0.2.
|
|
419630
|
+
`To give feedback, users should ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER}`
|
|
419586
419631
|
];
|
|
419587
419632
|
const items = [
|
|
419588
419633
|
`The user will primarily request you to perform software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks and the current working directory. For example, if the user asks you to change "methodName" to snake case, do not reply with just "method_name", instead find the method in the code and modify the code.`,
|
|
@@ -420482,7 +420527,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
420482
420527
|
}
|
|
420483
420528
|
function computeFingerprintFromMessages(messages) {
|
|
420484
420529
|
const firstMessageText = extractFirstMessageText(messages);
|
|
420485
|
-
return computeFingerprint(firstMessageText, { VERSION: "0.2.
|
|
420530
|
+
return computeFingerprint(firstMessageText, { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
420486
420531
|
}
|
|
420487
420532
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
420488
420533
|
var init_fingerprint = () => {};
|
|
@@ -422698,6 +422743,19 @@ function chatCompletionHeaders(provider) {
|
|
|
422698
422743
|
...provider.apiKey ? { authorization: `Bearer ${provider.apiKey}` } : {}
|
|
422699
422744
|
};
|
|
422700
422745
|
}
|
|
422746
|
+
function parseQuotaExceededBody(status2, detail) {
|
|
422747
|
+
if (status2 !== 429 && status2 !== 402)
|
|
422748
|
+
return;
|
|
422749
|
+
if (!detail)
|
|
422750
|
+
return;
|
|
422751
|
+
let body;
|
|
422752
|
+
try {
|
|
422753
|
+
body = JSON.parse(detail);
|
|
422754
|
+
} catch {
|
|
422755
|
+
return;
|
|
422756
|
+
}
|
|
422757
|
+
return isGatewayQuotaExceededBody(body) ? body : undefined;
|
|
422758
|
+
}
|
|
422701
422759
|
async function* callOpenAICompatible({
|
|
422702
422760
|
provider,
|
|
422703
422761
|
messages,
|
|
@@ -422731,6 +422789,10 @@ async function* callOpenAICompatible({
|
|
|
422731
422789
|
});
|
|
422732
422790
|
if (!response.ok) {
|
|
422733
422791
|
const streamDetail = await response.text().catch(() => "");
|
|
422792
|
+
const quotaBody = parseQuotaExceededBody(response.status, streamDetail);
|
|
422793
|
+
if (quotaBody !== undefined) {
|
|
422794
|
+
throw new GatewayQuotaExceededError(quotaBody, response.status);
|
|
422795
|
+
}
|
|
422734
422796
|
logError2(`[Theus router] El provider '${provider.id}' rechaz\xF3 el streaming (${response.status}); reintentando sin stream.`);
|
|
422735
422797
|
response = await fetch(url3, {
|
|
422736
422798
|
method: "POST",
|
|
@@ -422740,6 +422802,10 @@ async function* callOpenAICompatible({
|
|
|
422740
422802
|
});
|
|
422741
422803
|
if (!response.ok) {
|
|
422742
422804
|
const detail = await response.text().catch(() => "") || streamDetail;
|
|
422805
|
+
const retryQuota = parseQuotaExceededBody(response.status, detail);
|
|
422806
|
+
if (retryQuota !== undefined) {
|
|
422807
|
+
throw new GatewayQuotaExceededError(retryQuota, response.status);
|
|
422808
|
+
}
|
|
422743
422809
|
throw new Error(`${provider.id} ${response.status} ${response.statusText}${detail ? `: ${detail.slice(0, 500)}` : ""}`);
|
|
422744
422810
|
}
|
|
422745
422811
|
}
|
|
@@ -422992,6 +423058,9 @@ async function* queryModelWithTheusProviders({
|
|
|
422992
423058
|
if (signal.aborted) {
|
|
422993
423059
|
return;
|
|
422994
423060
|
}
|
|
423061
|
+
if (error40 instanceof GatewayQuotaExceededError) {
|
|
423062
|
+
throw error40;
|
|
423063
|
+
}
|
|
422995
423064
|
if (streamStarted && !streamEnded) {
|
|
422996
423065
|
for (const index of openBlocks) {
|
|
422997
423066
|
yield {
|
|
@@ -423040,6 +423109,7 @@ var init_theus2 = __esm(() => {
|
|
|
423040
423109
|
init_auth();
|
|
423041
423110
|
init_oauth();
|
|
423042
423111
|
init_emptyUsage();
|
|
423112
|
+
init_rateLimitMessages();
|
|
423043
423113
|
init_theusEngine();
|
|
423044
423114
|
});
|
|
423045
423115
|
|
|
@@ -423080,7 +423150,7 @@ async function sideQuery(opts) {
|
|
|
423080
423150
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
423081
423151
|
}
|
|
423082
423152
|
const messageText = extractFirstUserMessageText(messages);
|
|
423083
|
-
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.
|
|
423153
|
+
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
423084
423154
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
423085
423155
|
const systemBlocks = [
|
|
423086
423156
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -424383,7 +424453,7 @@ async function handleMemories(state) {
|
|
|
424383
424453
|
async function runProjectContextMcpServer() {
|
|
424384
424454
|
const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
|
|
424385
424455
|
const state = new ProjectContextState(projectRoot);
|
|
424386
|
-
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.
|
|
424456
|
+
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION }, { capabilities: { tools: {} } });
|
|
424387
424457
|
server2.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
424388
424458
|
tools: TOOL_DEFINITIONS.map((t) => ({
|
|
424389
424459
|
name: t.name,
|
|
@@ -426365,7 +426435,7 @@ function createBridgeLogger(options2) {
|
|
|
426365
426435
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
426366
426436
|
regenerateQr(connectUrl);
|
|
426367
426437
|
if (verbose) {
|
|
426368
|
-
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.
|
|
426438
|
+
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
426369
426439
|
`);
|
|
426370
426440
|
}
|
|
426371
426441
|
if (verbose) {
|
|
@@ -427338,7 +427408,7 @@ function appendToLog(path19, message) {
|
|
|
427338
427408
|
cwd: getFsImplementation().cwd(),
|
|
427339
427409
|
userType: process.env.USER_TYPE,
|
|
427340
427410
|
sessionId: getSessionId(),
|
|
427341
|
-
version: { VERSION: "0.2.
|
|
427411
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
427342
427412
|
};
|
|
427343
427413
|
getLogWriter(path19).write(messageWithTimestamp);
|
|
427344
427414
|
}
|
|
@@ -428608,7 +428678,7 @@ Spawn mode for this project:
|
|
|
428608
428678
|
const api2 = createBridgeApiClient({
|
|
428609
428679
|
baseUrl,
|
|
428610
428680
|
getAccessToken: getBridgeAccessToken2,
|
|
428611
|
-
runnerVersion: { VERSION: "0.2.
|
|
428681
|
+
runnerVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
428612
428682
|
onDebug: logForDebugging,
|
|
428613
428683
|
onAuth401: handleOAuth401Error2,
|
|
428614
428684
|
getTrustedDeviceToken
|
|
@@ -428846,7 +428916,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
428846
428916
|
const api2 = createBridgeApiClient({
|
|
428847
428917
|
baseUrl,
|
|
428848
428918
|
getAccessToken: opts.getAccessToken,
|
|
428849
|
-
runnerVersion: { VERSION: "0.2.
|
|
428919
|
+
runnerVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
428850
428920
|
onDebug: log2,
|
|
428851
428921
|
onAuth401: opts.onAuth401,
|
|
428852
428922
|
getTrustedDeviceToken
|
|
@@ -432912,7 +432982,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
432912
432982
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
432913
432983
|
apiKeySource: getTheusApiKeyWithSource().source,
|
|
432914
432984
|
betas: getSdkBetas(),
|
|
432915
|
-
theus_code_version: { VERSION: "0.2.
|
|
432985
|
+
theus_code_version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
432916
432986
|
output_style: outputStyle2,
|
|
432917
432987
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
432918
432988
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -432952,8 +433022,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
432952
433022
|
}
|
|
432953
433023
|
async function checkEnvLessBridgeMinVersion() {
|
|
432954
433024
|
const cfg = await getEnvLessBridgeConfig();
|
|
432955
|
-
if (cfg.min_version && lt({ VERSION: "0.2.
|
|
432956
|
-
return `Your version of Theus (${{ VERSION: "0.2.
|
|
433025
|
+
if (cfg.min_version && lt({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, cfg.min_version)) {
|
|
433026
|
+
return `Your version of Theus (${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}) is too old for Remote Control.
|
|
432957
433027
|
Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
|
|
432958
433028
|
}
|
|
432959
433029
|
return null;
|
|
@@ -435277,7 +435347,7 @@ async function initBridgeCore(params) {
|
|
|
435277
435347
|
const rawApi = createBridgeApiClient({
|
|
435278
435348
|
baseUrl,
|
|
435279
435349
|
getAccessToken,
|
|
435280
|
-
runnerVersion: { VERSION: "0.2.
|
|
435350
|
+
runnerVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
435281
435351
|
onDebug: logForDebugging,
|
|
435282
435352
|
onAuth401,
|
|
435283
435353
|
getTrustedDeviceToken
|
|
@@ -452020,7 +452090,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
452020
452090
|
function getSemverPart(version3) {
|
|
452021
452091
|
return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
|
|
452022
452092
|
}
|
|
452023
|
-
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.
|
|
452093
|
+
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
452024
452094
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react232.useState(() => getSemverPart(initialVersion));
|
|
452025
452095
|
if (!updatedVersion) {
|
|
452026
452096
|
return null;
|
|
@@ -452060,7 +452130,7 @@ function AutoUpdater({
|
|
|
452060
452130
|
return;
|
|
452061
452131
|
}
|
|
452062
452132
|
if (false) {}
|
|
452063
|
-
const currentVersion = { VERSION: "0.2.
|
|
452133
|
+
const currentVersion = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
452064
452134
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
452065
452135
|
let latestVersion = await getLatestVersion(channel2);
|
|
452066
452136
|
const isDisabled2 = isAutoUpdaterDisabled();
|
|
@@ -452196,7 +452266,7 @@ function AutoUpdater({
|
|
|
452196
452266
|
" ",
|
|
452197
452267
|
/* @__PURE__ */ jsx_runtime408.jsx(ThemedText, {
|
|
452198
452268
|
bold: true,
|
|
452199
|
-
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
452269
|
+
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}` : `npm i -g ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`
|
|
452200
452270
|
})
|
|
452201
452271
|
]
|
|
452202
452272
|
})
|
|
@@ -452273,12 +452343,12 @@ function NativeAutoUpdater({
|
|
|
452273
452343
|
logEvent("tengu_native_auto_updater_start", {});
|
|
452274
452344
|
try {
|
|
452275
452345
|
const maxVersion = await getMaxVersion();
|
|
452276
|
-
if (maxVersion && gt({ VERSION: "0.2.
|
|
452346
|
+
if (maxVersion && gt({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
|
|
452277
452347
|
const msg = await getMaxVersionMessage();
|
|
452278
452348
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
452279
452349
|
}
|
|
452280
452350
|
const result = await installLatest(channel2);
|
|
452281
|
-
const currentVersion = { VERSION: "0.2.
|
|
452351
|
+
const currentVersion = { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
452282
452352
|
const latencyMs = Date.now() - startTime2;
|
|
452283
452353
|
if (result.lockFailed) {
|
|
452284
452354
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -452415,17 +452485,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
452415
452485
|
const maxVersion = await getMaxVersion();
|
|
452416
452486
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
452417
452487
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
452418
|
-
if (gte({ VERSION: "0.2.
|
|
452419
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.
|
|
452488
|
+
if (gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
|
|
452489
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
452420
452490
|
setUpdateAvailable(false);
|
|
452421
452491
|
return;
|
|
452422
452492
|
}
|
|
452423
452493
|
latest = maxVersion;
|
|
452424
452494
|
}
|
|
452425
|
-
const hasUpdate = latest && !gte({ VERSION: "0.2.
|
|
452495
|
+
const hasUpdate = latest && !gte({ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest) && !shouldSkipVersion(latest);
|
|
452426
452496
|
setUpdateAvailable(!!hasUpdate);
|
|
452427
452497
|
if (hasUpdate) {
|
|
452428
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.
|
|
452498
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} -> ${latest}`);
|
|
452429
452499
|
}
|
|
452430
452500
|
};
|
|
452431
452501
|
$2[0] = t1;
|
|
@@ -452459,7 +452529,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
452459
452529
|
wrap: "truncate",
|
|
452460
452530
|
children: [
|
|
452461
452531
|
"currentVersion: ",
|
|
452462
|
-
{ VERSION: "0.2.
|
|
452532
|
+
{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
452463
452533
|
]
|
|
452464
452534
|
});
|
|
452465
452535
|
$2[3] = verbose;
|
|
@@ -460333,7 +460403,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
460333
460403
|
project_dir: getOriginalCwd(),
|
|
460334
460404
|
added_dirs: addedDirs
|
|
460335
460405
|
},
|
|
460336
|
-
version: { VERSION: "0.2.
|
|
460406
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
460337
460407
|
output_style: {
|
|
460338
460408
|
name: outputStyleName
|
|
460339
460409
|
},
|
|
@@ -484613,7 +484683,7 @@ function completeOnboarding() {
|
|
|
484613
484683
|
saveGlobalConfig((current) => ({
|
|
484614
484684
|
...current,
|
|
484615
484685
|
hasCompletedOnboarding: true,
|
|
484616
|
-
lastOnboardingVersion: { VERSION: "0.2.
|
|
484686
|
+
lastOnboardingVersion: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
484617
484687
|
}));
|
|
484618
484688
|
}
|
|
484619
484689
|
function showDialog(root2, renderer) {
|
|
@@ -495564,7 +495634,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
|
|
|
495564
495634
|
setCwd(cwd3);
|
|
495565
495635
|
const server2 = new Server({
|
|
495566
495636
|
name: "theus/tengu",
|
|
495567
|
-
version: { VERSION: "0.2.
|
|
495637
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
495568
495638
|
}, {
|
|
495569
495639
|
capabilities: {
|
|
495570
495640
|
tools: {}
|
|
@@ -497006,7 +497076,7 @@ async function setupTokenHandler(root2) {
|
|
|
497006
497076
|
gap: 1,
|
|
497007
497077
|
children: [
|
|
497008
497078
|
/* @__PURE__ */ jsx_runtime494.jsx(TheusBanner, {
|
|
497009
|
-
version: { VERSION: "0.2.
|
|
497079
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
497010
497080
|
}),
|
|
497011
497081
|
showAuthWarning && /* @__PURE__ */ jsx_runtime494.jsxs(ThemedBox_default, {
|
|
497012
497082
|
flexDirection: "column",
|
|
@@ -498488,7 +498558,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
498488
498558
|
}
|
|
498489
498559
|
}
|
|
498490
498560
|
logForDiagnosticsNoPII("info", "started", {
|
|
498491
|
-
version: { VERSION: "0.2.
|
|
498561
|
+
version: { VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
498492
498562
|
is_native_binary: isInBundledMode()
|
|
498493
498563
|
});
|
|
498494
498564
|
registerCleanup(async () => {
|
|
@@ -499356,7 +499426,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
499356
499426
|
pendingHookMessages
|
|
499357
499427
|
}, renderAndRun);
|
|
499358
499428
|
}
|
|
499359
|
-
}).version(`${{ VERSION: "0.2.
|
|
499429
|
+
}).version(`${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (Theus)`, "-v, --version", "Muestra el n\xFAmero de versi\xF3n");
|
|
499360
499430
|
program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
|
|
499361
499431
|
program2.option("--tmux", "Crea una sesi\xF3n de tmux para el worktree (requiere --worktree). Usa paneles nativos de iTerm2 cuando est\xE1n disponibles; usa --tmux=classic para tmux tradicional.");
|
|
499362
499432
|
if (canUserConfigureAdvisor()) {
|
|
@@ -499908,7 +499978,7 @@ if (false) {}
|
|
|
499908
499978
|
async function main2() {
|
|
499909
499979
|
const args = process.argv.slice(2);
|
|
499910
499980
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
499911
|
-
console.log(`${{ VERSION: "0.2.
|
|
499981
|
+
console.log(`${{ VERSION: "0.2.52", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (Theus)`);
|
|
499912
499982
|
return;
|
|
499913
499983
|
}
|
|
499914
499984
|
const {
|