theus-cli 0.2.54 → 0.2.56
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 +329 -144
- 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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.56", 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
|
}
|
|
@@ -167334,7 +167334,7 @@ function getTelemetryAttributes() {
|
|
|
167334
167334
|
attributes["session.id"] = sessionId;
|
|
167335
167335
|
}
|
|
167336
167336
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
167337
|
-
attributes["app.version"] = { VERSION: "0.2.
|
|
167337
|
+
attributes["app.version"] = { VERSION: "0.2.56", 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;
|
|
167338
167338
|
}
|
|
167339
167339
|
const oauthAccount = getOauthAccountInfo();
|
|
167340
167340
|
if (oauthAccount) {
|
|
@@ -203218,7 +203218,7 @@ function getInstallationEnv() {
|
|
|
203218
203218
|
return;
|
|
203219
203219
|
}
|
|
203220
203220
|
function getTheusCodeVersion() {
|
|
203221
|
-
return { VERSION: "0.2.
|
|
203221
|
+
return { VERSION: "0.2.56", 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;
|
|
203222
203222
|
}
|
|
203223
203223
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
203224
203224
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -204736,7 +204736,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
|
|
|
204736
204736
|
if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
|
|
204737
204737
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
204738
204738
|
if (!hasTrust) {
|
|
204739
|
-
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.
|
|
204739
|
+
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.56", 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}.`);
|
|
204740
204740
|
logAntError("MCP headersHelper invoked before trust check", error40);
|
|
204741
204741
|
logEvent("tengu_mcp_headersHelper_missing_trust", {});
|
|
204742
204742
|
return null;
|
|
@@ -205946,7 +205946,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
205946
205946
|
const client2 = new Client({
|
|
205947
205947
|
name: "theus-code",
|
|
205948
205948
|
title: "Theus",
|
|
205949
|
-
version: { VERSION: "0.2.
|
|
205949
|
+
version: { VERSION: "0.2.56", 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",
|
|
205950
205950
|
description: "Theus's agentic coding tool",
|
|
205951
205951
|
websiteUrl: PRODUCT_URL
|
|
205952
205952
|
}, {
|
|
@@ -206300,7 +206300,7 @@ var init_client5 = __esm(() => {
|
|
|
206300
206300
|
const client2 = new Client({
|
|
206301
206301
|
name: "theus-code",
|
|
206302
206302
|
title: "Theus",
|
|
206303
|
-
version: { VERSION: "0.2.
|
|
206303
|
+
version: { VERSION: "0.2.56", 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",
|
|
206304
206304
|
description: "Theus's agentic coding tool",
|
|
206305
206305
|
websiteUrl: PRODUCT_URL
|
|
206306
206306
|
}, {
|
|
@@ -216879,7 +216879,7 @@ async function initializeBetaTracing(resource) {
|
|
|
216879
216879
|
});
|
|
216880
216880
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216881
216881
|
setLoggerProvider(loggerProvider);
|
|
216882
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216882
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.56", 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);
|
|
216883
216883
|
setEventLogger(eventLogger);
|
|
216884
216884
|
process.on("beforeExit", async () => {
|
|
216885
216885
|
await loggerProvider?.forceFlush();
|
|
@@ -216919,7 +216919,7 @@ async function initializeTelemetry() {
|
|
|
216919
216919
|
const platform4 = getPlatform();
|
|
216920
216920
|
const baseAttributes = {
|
|
216921
216921
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
216922
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
216922
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.56", 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
|
|
216923
216923
|
};
|
|
216924
216924
|
if (platform4 === "wsl") {
|
|
216925
216925
|
const wslVersion = getWslVersion();
|
|
@@ -216964,7 +216964,7 @@ async function initializeTelemetry() {
|
|
|
216964
216964
|
} catch {}
|
|
216965
216965
|
};
|
|
216966
216966
|
registerCleanup(shutdownTelemetry2);
|
|
216967
|
-
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216967
|
+
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.56", 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);
|
|
216968
216968
|
}
|
|
216969
216969
|
const meterProvider = new MeterProvider({
|
|
216970
216970
|
resource,
|
|
@@ -216984,7 +216984,7 @@ async function initializeTelemetry() {
|
|
|
216984
216984
|
});
|
|
216985
216985
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216986
216986
|
setLoggerProvider(loggerProvider);
|
|
216987
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216987
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.56", 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);
|
|
216988
216988
|
setEventLogger(eventLogger);
|
|
216989
216989
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
216990
216990
|
process.on("beforeExit", async () => {
|
|
@@ -217046,7 +217046,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
217046
217046
|
}
|
|
217047
217047
|
};
|
|
217048
217048
|
registerCleanup(shutdownTelemetry);
|
|
217049
|
-
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
217049
|
+
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.56", 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);
|
|
217050
217050
|
}
|
|
217051
217051
|
async function flushTelemetry() {
|
|
217052
217052
|
const meterProvider = getMeterProvider();
|
|
@@ -217586,7 +217586,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
|
|
|
217586
217586
|
return "install_failed";
|
|
217587
217587
|
}
|
|
217588
217588
|
const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
|
|
217589
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.
|
|
217589
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.56", 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 });
|
|
217590
217590
|
if (result.code !== 0) {
|
|
217591
217591
|
const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
|
|
217592
217592
|
logError2(error40);
|
|
@@ -217732,9 +217732,9 @@ async function assertMinVersion() {
|
|
|
217732
217732
|
if (false) {}
|
|
217733
217733
|
try {
|
|
217734
217734
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
217735
|
-
if (versionConfig.minVersion && lt({ VERSION: "0.2.
|
|
217735
|
+
if (versionConfig.minVersion && lt({ VERSION: "0.2.56", 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)) {
|
|
217736
217736
|
console.error(`
|
|
217737
|
-
It looks like your version of Theus (${{ VERSION: "0.2.
|
|
217737
|
+
It looks like your version of Theus (${{ VERSION: "0.2.56", 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.
|
|
217738
217738
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
217739
217739
|
|
|
217740
217740
|
To update, please run:
|
|
@@ -217875,7 +217875,7 @@ async function getInstallationPrefix() {
|
|
|
217875
217875
|
return prefixResult.stdout.trim();
|
|
217876
217876
|
}
|
|
217877
217877
|
function getGlobalInstallPackageManager() {
|
|
217878
|
-
if ({ VERSION: "0.2.
|
|
217878
|
+
if ({ VERSION: "0.2.56", 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") {
|
|
217879
217879
|
return "npm";
|
|
217880
217880
|
}
|
|
217881
217881
|
return env3.isRunningWithBun() ? "bun" : "npm";
|
|
@@ -217900,7 +217900,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
217900
217900
|
}
|
|
217901
217901
|
async function getLatestVersion(channel2) {
|
|
217902
217902
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
217903
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.
|
|
217903
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.56", 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() });
|
|
217904
217904
|
if (result.code !== 0) {
|
|
217905
217905
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
217906
217906
|
if (result.stderr) {
|
|
@@ -217916,7 +217916,7 @@ async function getLatestVersion(channel2) {
|
|
|
217916
217916
|
return result.stdout.trim();
|
|
217917
217917
|
}
|
|
217918
217918
|
async function getNpmDistTags() {
|
|
217919
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.
|
|
217919
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.56", 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() });
|
|
217920
217920
|
if (result.code !== 0) {
|
|
217921
217921
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
217922
217922
|
return { latest: null, stable: null };
|
|
@@ -217956,7 +217956,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217956
217956
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
217957
217957
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
217958
217958
|
pid: process.pid,
|
|
217959
|
-
currentVersion: { VERSION: "0.2.
|
|
217959
|
+
currentVersion: { VERSION: "0.2.56", 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
|
|
217960
217960
|
});
|
|
217961
217961
|
return "in_progress";
|
|
217962
217962
|
}
|
|
@@ -217965,7 +217965,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217965
217965
|
if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
|
|
217966
217966
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
217967
217967
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
217968
|
-
currentVersion: { VERSION: "0.2.
|
|
217968
|
+
currentVersion: { VERSION: "0.2.56", 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
|
|
217969
217969
|
});
|
|
217970
217970
|
console.error(`
|
|
217971
217971
|
Error: Windows NPM detected in WSL
|
|
@@ -217984,7 +217984,7 @@ To fix this issue:
|
|
|
217984
217984
|
if (!hasPermissions) {
|
|
217985
217985
|
return "no_permissions";
|
|
217986
217986
|
}
|
|
217987
|
-
const packageSpec = specificVersion ? `${{ VERSION: "0.2.
|
|
217987
|
+
const packageSpec = specificVersion ? `${{ VERSION: "0.2.56", 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.56", 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;
|
|
217988
217988
|
const packageManager = getGlobalInstallPackageManager();
|
|
217989
217989
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
217990
217990
|
if (installResult.code !== 0) {
|
|
@@ -218312,8 +218312,8 @@ async function detectMultipleInstallations() {
|
|
|
218312
218312
|
installations.push({ type: "npm-local", path: localPath });
|
|
218313
218313
|
}
|
|
218314
218314
|
const packagesToCheck = ["@theus-ai/theus-code"];
|
|
218315
|
-
if ({ VERSION: "0.2.
|
|
218316
|
-
packagesToCheck.push({ VERSION: "0.2.
|
|
218315
|
+
if ({ VERSION: "0.2.56", 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.56", 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") {
|
|
218316
|
+
packagesToCheck.push({ VERSION: "0.2.56", 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);
|
|
218317
218317
|
}
|
|
218318
218318
|
const npmResult = await execFileNoThrow("npm", [
|
|
218319
218319
|
"-g",
|
|
@@ -218496,7 +218496,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
218496
218496
|
}
|
|
218497
218497
|
async function getDoctorDiagnostic() {
|
|
218498
218498
|
const installationType = await getCurrentInstallationType();
|
|
218499
|
-
const version2 = { VERSION: "0.2.
|
|
218499
|
+
const version2 = { VERSION: "0.2.56", 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.56", 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";
|
|
218500
218500
|
const installationPath = await getInstallationPath();
|
|
218501
218501
|
const invokedBinary = getInvokedBinary();
|
|
218502
218502
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -218508,8 +218508,8 @@ async function getDoctorDiagnostic() {
|
|
|
218508
218508
|
for (const install of npmInstalls) {
|
|
218509
218509
|
if (install.type === "npm-global") {
|
|
218510
218510
|
let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
|
|
218511
|
-
if ({ VERSION: "0.2.
|
|
218512
|
-
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.
|
|
218511
|
+
if ({ VERSION: "0.2.56", 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.56", 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") {
|
|
218512
|
+
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.56", 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}`;
|
|
218513
218513
|
}
|
|
218514
218514
|
warnings.push({
|
|
218515
218515
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -218621,7 +218621,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218621
218621
|
const startTime2 = Date.now();
|
|
218622
218622
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
218623
218623
|
"view",
|
|
218624
|
-
`${{ VERSION: "0.2.
|
|
218624
|
+
`${{ VERSION: "0.2.56", 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}`,
|
|
218625
218625
|
"version",
|
|
218626
218626
|
"--prefer-online",
|
|
218627
218627
|
"--registry",
|
|
@@ -218645,7 +218645,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218645
218645
|
latency_ms: latencyMs,
|
|
218646
218646
|
source_npm: true
|
|
218647
218647
|
});
|
|
218648
|
-
logForDebugging(`npm view ${{ VERSION: "0.2.
|
|
218648
|
+
logForDebugging(`npm view ${{ VERSION: "0.2.56", 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}`);
|
|
218649
218649
|
const latestVersion = stdout.trim();
|
|
218650
218650
|
return latestVersion;
|
|
218651
218651
|
}
|
|
@@ -218701,7 +218701,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218701
218701
|
const fs3 = getFsImplementation();
|
|
218702
218702
|
await fs3.rm(stagingPath, { recursive: true, force: true });
|
|
218703
218703
|
const platform4 = getPlatform2();
|
|
218704
|
-
const platformPackageName = `${{ VERSION: "0.2.
|
|
218704
|
+
const platformPackageName = `${{ VERSION: "0.2.56", 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}`;
|
|
218705
218705
|
logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
|
|
218706
218706
|
const {
|
|
218707
218707
|
stdout: integrityOutput,
|
|
@@ -218730,7 +218730,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218730
218730
|
name: "theus-native-installer",
|
|
218731
218731
|
version: "0.0.1",
|
|
218732
218732
|
dependencies: {
|
|
218733
|
-
[{ VERSION: "0.2.
|
|
218733
|
+
[{ VERSION: "0.2.56", 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
|
|
218734
218734
|
}
|
|
218735
218735
|
};
|
|
218736
218736
|
const packageLock = {
|
|
@@ -218743,10 +218743,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218743
218743
|
name: "theus-native-installer",
|
|
218744
218744
|
version: "0.0.1",
|
|
218745
218745
|
dependencies: {
|
|
218746
|
-
[{ VERSION: "0.2.
|
|
218746
|
+
[{ VERSION: "0.2.56", 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
|
|
218747
218747
|
}
|
|
218748
218748
|
},
|
|
218749
|
-
[`node_modules/${{ VERSION: "0.2.
|
|
218749
|
+
[`node_modules/${{ VERSION: "0.2.56", 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}`]: {
|
|
218750
218750
|
version: version2,
|
|
218751
218751
|
optionalDependencies: {
|
|
218752
218752
|
[platformPackageName]: version2
|
|
@@ -218768,7 +218768,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218768
218768
|
if (result.code !== 0) {
|
|
218769
218769
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
218770
218770
|
}
|
|
218771
|
-
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.
|
|
218771
|
+
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.56", 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}`);
|
|
218772
218772
|
}
|
|
218773
218773
|
function getStallTimeoutMs() {
|
|
218774
218774
|
return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -219431,8 +219431,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
219431
219431
|
const maxVersion = await getMaxVersion();
|
|
219432
219432
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
219433
219433
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
219434
|
-
if (gte({ VERSION: "0.2.
|
|
219435
|
-
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.
|
|
219434
|
+
if (gte({ VERSION: "0.2.56", 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)) {
|
|
219435
|
+
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.56", 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`);
|
|
219436
219436
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
219437
219437
|
latency_ms: Date.now() - startTime2,
|
|
219438
219438
|
max_version: maxVersion,
|
|
@@ -219443,7 +219443,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
219443
219443
|
version2 = maxVersion;
|
|
219444
219444
|
}
|
|
219445
219445
|
}
|
|
219446
|
-
if (!forceReinstall && version2 === { VERSION: "0.2.
|
|
219446
|
+
if (!forceReinstall && version2 === { VERSION: "0.2.56", 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)) {
|
|
219447
219447
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
219448
219448
|
logEvent("tengu_native_update_complete", {
|
|
219449
219449
|
latency_ms: Date.now() - startTime2,
|
|
@@ -220193,8 +220193,8 @@ async function cleanupNpmInstallations() {
|
|
|
220193
220193
|
} else if (codePackageResult.error) {
|
|
220194
220194
|
errors4.push(codePackageResult.error);
|
|
220195
220195
|
}
|
|
220196
|
-
if ({ VERSION: "0.2.
|
|
220197
|
-
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.
|
|
220196
|
+
if ({ VERSION: "0.2.56", 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.56", 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") {
|
|
220197
|
+
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.56", 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);
|
|
220198
220198
|
if (macroPackageResult.success) {
|
|
220199
220199
|
removed++;
|
|
220200
220200
|
if (macroPackageResult.warning) {
|
|
@@ -230683,6 +230683,26 @@ var init_ConsoleOAuthFlow = __esm(() => {
|
|
|
230683
230683
|
var NOVEDADES;
|
|
230684
230684
|
var init_data = __esm(() => {
|
|
230685
230685
|
NOVEDADES = [
|
|
230686
|
+
{
|
|
230687
|
+
version: "v0.2.56",
|
|
230688
|
+
fecha: "2026-07-26",
|
|
230689
|
+
titulo: "La recarga te dice qu\xE9 pasa cuando algo falla",
|
|
230690
|
+
puntos: [
|
|
230691
|
+
"Si tu sesi\xF3n hab\xEDa caducado, \xAB/recarga\xBB te dejaba elegir el pack, confirmar la compra y reci\xE9n entonces respond\xEDa \xABno pude abrir el checkout, int\xE9ntalo en unos minutos\xBB \u2014 reintentar no lo iba a arreglar nunca.",
|
|
230692
|
+
"Ahora refresca tu sesi\xF3n antes de empezar y, si no puede, te lo dice de entrada: \xABTu sesi\xF3n caduc\xF3, entra con /login\xBB. Y cuando el servidor rechaza la compra por otro motivo (alcanzaste el tope de packs del ciclo, la recarga no est\xE1 disponible), muestra ese motivo en vez de un mensaje gen\xE9rico.",
|
|
230693
|
+
"En todos los casos se sigue diciendo lo importante: no se cobr\xF3 nada."
|
|
230694
|
+
]
|
|
230695
|
+
},
|
|
230696
|
+
{
|
|
230697
|
+
version: "v0.2.55",
|
|
230698
|
+
fecha: "2026-07-26",
|
|
230699
|
+
titulo: "La actualizaci\xF3n del motor de c\xF3digo llega a su sitio",
|
|
230700
|
+
puntos: [
|
|
230701
|
+
"El motor de c\xF3digo (\xD1aupa) se actualiza junto con Theus, pero su actualizador escrib\xEDa siempre en una carpeta fija. Si lo ten\xEDas instalado en otra \u2014en Windows, la del instalador\u2014 la versi\xF3n nueva acababa donde nadie la usaba: dec\xEDa \xABlisto\xBB y segu\xEDas con la vieja.",
|
|
230702
|
+
"Ya est\xE1 corregido en el motor (versi\xF3n 1.2.4), y adem\xE1s Theus lo comprueba despu\xE9s de actualizar: si encuentra la versi\xF3n nueva en la carpeta equivocada, la copia al binario que de verdad usa, con respaldo. As\xED el arreglo tambi\xE9n alcanza a quien todav\xEDa tiene la versi\xF3n antigua.",
|
|
230703
|
+
"Con esto, \xABtheus update\xBB deja Theus y el motor al d\xEDa de una sola vez, en Windows igual que en macOS y Linux. El mapa 3D del proyecto estrena adem\xE1s la identidad Theus."
|
|
230704
|
+
]
|
|
230705
|
+
},
|
|
230686
230706
|
{
|
|
230687
230707
|
version: "v0.2.54",
|
|
230688
230708
|
fecha: "2026-07-26",
|
|
@@ -305672,9 +305692,9 @@ function getTheusEnvMetadata() {
|
|
|
305672
305692
|
};
|
|
305673
305693
|
}
|
|
305674
305694
|
function getBuildAgeMinutes() {
|
|
305675
|
-
if (!{ VERSION: "0.2.
|
|
305695
|
+
if (!{ VERSION: "0.2.56", 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)
|
|
305676
305696
|
return;
|
|
305677
|
-
const buildTime = new Date({ VERSION: "0.2.
|
|
305697
|
+
const buildTime = new Date({ VERSION: "0.2.56", 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();
|
|
305678
305698
|
if (isNaN(buildTime))
|
|
305679
305699
|
return;
|
|
305680
305700
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -322329,7 +322349,7 @@ function getAssistantMessageFromError(error40, model, options2) {
|
|
|
322329
322349
|
if (process.env.USER_TYPE === "ant") {
|
|
322330
322350
|
const baseMessage = `API Error: 400 ${error40.message}
|
|
322331
322351
|
|
|
322332
|
-
Run /share and post the JSON file to ${{ VERSION: "0.2.
|
|
322352
|
+
Run /share and post the JSON file to ${{ VERSION: "0.2.56", 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}.`;
|
|
322333
322353
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
322334
322354
|
return createAssistantAPIErrorMessage({
|
|
322335
322355
|
content: baseMessage + rewindInstruction,
|
|
@@ -322365,7 +322385,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.54", BUILD_TIME: "1970-01
|
|
|
322365
322385
|
if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
|
|
322366
322386
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
322367
322387
|
const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
322368
|
-
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.
|
|
322388
|
+
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.56", 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.56", 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.`;
|
|
322369
322389
|
return createAssistantAPIErrorMessage({
|
|
322370
322390
|
content: msg,
|
|
322371
322391
|
error: "invalid_request"
|
|
@@ -330289,7 +330309,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
330289
330309
|
} catch {}
|
|
330290
330310
|
const data = {
|
|
330291
330311
|
trigger,
|
|
330292
|
-
version: { VERSION: "0.2.
|
|
330312
|
+
version: { VERSION: "0.2.56", 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,
|
|
330293
330313
|
platform: process.platform,
|
|
330294
330314
|
transcript,
|
|
330295
330315
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -330494,10 +330514,10 @@ Si el usuario indic\xF3 una duraci\xF3n, p\xE1sala en el par\xE1metro \`duration
|
|
|
330494
330514
|
|
|
330495
330515
|
// commands/issue/index.ts
|
|
330496
330516
|
function getCliVersion() {
|
|
330497
|
-
return { VERSION: "0.2.
|
|
330517
|
+
return { VERSION: "0.2.56", 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.56", 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";
|
|
330498
330518
|
}
|
|
330499
330519
|
function getIssuesExplainer() {
|
|
330500
|
-
return { VERSION: "0.2.
|
|
330520
|
+
return { VERSION: "0.2.56", 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.56", 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";
|
|
330501
330521
|
}
|
|
330502
330522
|
function getActiveModelLabel() {
|
|
330503
330523
|
try {
|
|
@@ -333330,7 +333350,7 @@ function buildPrimarySection() {
|
|
|
333330
333350
|
});
|
|
333331
333351
|
return [{
|
|
333332
333352
|
label: "Version",
|
|
333333
|
-
value: { VERSION: "0.2.
|
|
333353
|
+
value: { VERSION: "0.2.56", 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
|
|
333334
333354
|
}, {
|
|
333335
333355
|
label: "Session name",
|
|
333336
333356
|
value: nameValue
|
|
@@ -337146,7 +337166,7 @@ function Config({
|
|
|
337146
337166
|
}
|
|
337147
337167
|
})
|
|
337148
337168
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime189.jsx(ChannelDowngradeDialog, {
|
|
337149
|
-
currentVersion: { VERSION: "0.2.
|
|
337169
|
+
currentVersion: { VERSION: "0.2.56", 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,
|
|
337150
337170
|
onChoice: (choice) => {
|
|
337151
337171
|
setShowSubmenu(null);
|
|
337152
337172
|
setTabsHidden(false);
|
|
@@ -337158,7 +337178,7 @@ function Config({
|
|
|
337158
337178
|
autoUpdatesChannel: "stable"
|
|
337159
337179
|
};
|
|
337160
337180
|
if (choice === "stay") {
|
|
337161
|
-
newSettings.minimumVersion = { VERSION: "0.2.
|
|
337181
|
+
newSettings.minimumVersion = { VERSION: "0.2.56", 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;
|
|
337162
337182
|
}
|
|
337163
337183
|
updateSettingsForSource("userSettings", newSettings);
|
|
337164
337184
|
setSettingsData((prev_27) => ({
|
|
@@ -345403,7 +345423,7 @@ function HelpV2(t0) {
|
|
|
345403
345423
|
let t6;
|
|
345404
345424
|
if ($2[31] !== tabs) {
|
|
345405
345425
|
t6 = /* @__PURE__ */ jsx_runtime217.jsx(Tabs, {
|
|
345406
|
-
title: `Theus v${{ VERSION: "0.2.
|
|
345426
|
+
title: `Theus v${{ VERSION: "0.2.56", 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}`,
|
|
345407
345427
|
color: "professionalBlue",
|
|
345408
345428
|
defaultTab: "general",
|
|
345409
345429
|
children: tabs
|
|
@@ -363655,7 +363675,7 @@ function Onboarding({
|
|
|
363655
363675
|
flexDirection: "column",
|
|
363656
363676
|
children: [
|
|
363657
363677
|
/* @__PURE__ */ jsx_runtime250.jsx(TheusBanner, {
|
|
363658
|
-
version: { VERSION: "0.2.
|
|
363678
|
+
version: { VERSION: "0.2.56", 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
|
|
363659
363679
|
}),
|
|
363660
363680
|
/* @__PURE__ */ jsx_runtime250.jsxs(ThemedBox_default, {
|
|
363661
363681
|
flexDirection: "column",
|
|
@@ -363886,6 +363906,26 @@ function safeAccessToken() {
|
|
|
363886
363906
|
return;
|
|
363887
363907
|
}
|
|
363888
363908
|
}
|
|
363909
|
+
async function freshAccessToken() {
|
|
363910
|
+
try {
|
|
363911
|
+
await checkAndRefreshOAuthTokenIfNeeded();
|
|
363912
|
+
} catch {}
|
|
363913
|
+
const tokens = (() => {
|
|
363914
|
+
try {
|
|
363915
|
+
return getTheusAIOAuthTokens();
|
|
363916
|
+
} catch {
|
|
363917
|
+
return null;
|
|
363918
|
+
}
|
|
363919
|
+
})();
|
|
363920
|
+
const token = tokens?.accessToken;
|
|
363921
|
+
if (!token)
|
|
363922
|
+
return;
|
|
363923
|
+
const exp = tokens?.expiresAt;
|
|
363924
|
+
if (typeof exp === "number" && Number.isFinite(exp) && exp <= Date.now()) {
|
|
363925
|
+
return;
|
|
363926
|
+
}
|
|
363927
|
+
return token;
|
|
363928
|
+
}
|
|
363889
363929
|
function safeIsSubscriber() {
|
|
363890
363930
|
try {
|
|
363891
363931
|
return isTheusAISubscriber();
|
|
@@ -363947,12 +363987,57 @@ async function fetchCheckoutUrl(token, pack) {
|
|
|
363947
363987
|
},
|
|
363948
363988
|
body: JSON.stringify({ pack })
|
|
363949
363989
|
});
|
|
363950
|
-
|
|
363951
|
-
|
|
363952
|
-
|
|
363953
|
-
|
|
363990
|
+
const cuerpo = await res.json().catch(() => null);
|
|
363991
|
+
if (res.ok) {
|
|
363992
|
+
const url3 = cuerpo?.checkout_url;
|
|
363993
|
+
if (typeof url3 === "string" && url3.length > 0)
|
|
363994
|
+
return { ok: true, url: url3 };
|
|
363995
|
+
return {
|
|
363996
|
+
ok: false,
|
|
363997
|
+
motivo: "El servidor no devolvi\xF3 un enlace de pago.",
|
|
363998
|
+
reintentable: true,
|
|
363999
|
+
requiereLogin: false
|
|
364000
|
+
};
|
|
364001
|
+
}
|
|
364002
|
+
const codigo = String(cuerpo?.error ?? "");
|
|
364003
|
+
const detalle = String(cuerpo?.error_description ?? "").trim();
|
|
364004
|
+
if (res.status === 401 || codigo === "login_required") {
|
|
364005
|
+
return {
|
|
364006
|
+
ok: false,
|
|
364007
|
+
motivo: "Tu sesi\xF3n caduc\xF3. Vuelve a iniciar sesi\xF3n con /login y reintenta.",
|
|
364008
|
+
reintentable: false,
|
|
364009
|
+
requiereLogin: true
|
|
364010
|
+
};
|
|
364011
|
+
}
|
|
364012
|
+
if (res.status === 409) {
|
|
364013
|
+
return {
|
|
364014
|
+
ok: false,
|
|
364015
|
+
motivo: detalle || "Alcanzaste el m\xE1ximo de packs de este ciclo.",
|
|
364016
|
+
reintentable: false,
|
|
364017
|
+
requiereLogin: false
|
|
364018
|
+
};
|
|
364019
|
+
}
|
|
364020
|
+
if (res.status === 503) {
|
|
364021
|
+
return {
|
|
364022
|
+
ok: false,
|
|
364023
|
+
motivo: detalle || "La recarga no est\xE1 disponible ahora mismo.",
|
|
364024
|
+
reintentable: false,
|
|
364025
|
+
requiereLogin: false
|
|
364026
|
+
};
|
|
364027
|
+
}
|
|
364028
|
+
return {
|
|
364029
|
+
ok: false,
|
|
364030
|
+
motivo: detalle || `El servidor respondi\xF3 ${res.status}.`,
|
|
364031
|
+
reintentable: res.status >= 500,
|
|
364032
|
+
requiereLogin: false
|
|
364033
|
+
};
|
|
363954
364034
|
} catch {
|
|
363955
|
-
return
|
|
364035
|
+
return {
|
|
364036
|
+
ok: false,
|
|
364037
|
+
motivo: "No pude contactar con el servidor. Comprueba tu conexi\xF3n.",
|
|
364038
|
+
reintentable: true,
|
|
364039
|
+
requiereLogin: false
|
|
364040
|
+
};
|
|
363956
364041
|
}
|
|
363957
364042
|
}
|
|
363958
364043
|
function formatCreditos(n2) {
|
|
@@ -364155,7 +364240,7 @@ function RecargaUI({
|
|
|
364155
364240
|
import_react149.useEffect(() => {
|
|
364156
364241
|
let vivo = true;
|
|
364157
364242
|
(async () => {
|
|
364158
|
-
const token =
|
|
364243
|
+
const token = await freshAccessToken();
|
|
364159
364244
|
if (!token) {
|
|
364160
364245
|
if (vivo)
|
|
364161
364246
|
setFase({ t: "sin-sesion" });
|
|
@@ -364191,25 +364276,28 @@ function RecargaUI({
|
|
|
364191
364276
|
const pack = estado.packs[index];
|
|
364192
364277
|
if (!pack)
|
|
364193
364278
|
return;
|
|
364194
|
-
const token =
|
|
364279
|
+
const token = await freshAccessToken();
|
|
364195
364280
|
if (!token) {
|
|
364196
364281
|
setFase({ t: "sin-sesion" });
|
|
364197
364282
|
return;
|
|
364198
364283
|
}
|
|
364284
|
+
if (cancelRef.current)
|
|
364285
|
+
return;
|
|
364199
364286
|
setFase({ t: "abriendo" });
|
|
364200
364287
|
try {
|
|
364201
364288
|
logEvent("tengu_recarga_checkout_abierto", { pack: pack.id });
|
|
364202
364289
|
} catch {}
|
|
364203
|
-
const
|
|
364290
|
+
const res = await fetchCheckoutUrl(token, pack.id);
|
|
364204
364291
|
if (cancelRef.current)
|
|
364205
364292
|
return;
|
|
364206
|
-
if (!
|
|
364293
|
+
if (!res.ok) {
|
|
364207
364294
|
setFase({
|
|
364208
364295
|
t: "error",
|
|
364209
|
-
mensaje:
|
|
364296
|
+
mensaje: `${res.motivo} No se cobr\xF3 nada.` + (res.reintentable ? " Puedes reintentarlo." : "")
|
|
364210
364297
|
});
|
|
364211
364298
|
return;
|
|
364212
364299
|
}
|
|
364300
|
+
const url3 = res.url;
|
|
364213
364301
|
const abierto = await openBrowser(url3);
|
|
364214
364302
|
if (cancelRef.current)
|
|
364215
364303
|
return;
|
|
@@ -364307,17 +364395,58 @@ function RecargaUI({
|
|
|
364307
364395
|
});
|
|
364308
364396
|
}
|
|
364309
364397
|
if (fase.t === "sin-sesion") {
|
|
364398
|
+
const caducada = safeAccessToken() !== undefined;
|
|
364310
364399
|
return /* @__PURE__ */ jsx_runtime253.jsxs(ThemedBox_default, {
|
|
364311
364400
|
flexDirection: "column",
|
|
364312
364401
|
marginTop: 1,
|
|
364313
364402
|
paddingLeft: 1,
|
|
364314
364403
|
children: [
|
|
364315
|
-
/* @__PURE__ */ jsx_runtime253.
|
|
364316
|
-
children:
|
|
364404
|
+
/* @__PURE__ */ jsx_runtime253.jsxs(ThemedBox_default, {
|
|
364405
|
+
children: [
|
|
364406
|
+
/* @__PURE__ */ jsx_runtime253.jsxs(ThemedText, {
|
|
364407
|
+
color: "warning",
|
|
364408
|
+
bold: true,
|
|
364409
|
+
children: [
|
|
364410
|
+
"\xB7",
|
|
364411
|
+
" "
|
|
364412
|
+
]
|
|
364413
|
+
}),
|
|
364414
|
+
/* @__PURE__ */ jsx_runtime253.jsx(ThemedText, {
|
|
364415
|
+
bold: true,
|
|
364416
|
+
children: caducada ? "Tu sesi\xF3n caduc\xF3" : "A\xFAn no has iniciado sesi\xF3n"
|
|
364417
|
+
})
|
|
364418
|
+
]
|
|
364317
364419
|
}),
|
|
364318
|
-
/* @__PURE__ */ jsx_runtime253.jsx(
|
|
364319
|
-
|
|
364320
|
-
children:
|
|
364420
|
+
/* @__PURE__ */ jsx_runtime253.jsx(ThemedBox_default, {
|
|
364421
|
+
marginTop: 1,
|
|
364422
|
+
children: /* @__PURE__ */ jsx_runtime253.jsx(ThemedText, {
|
|
364423
|
+
dimColor: true,
|
|
364424
|
+
children: caducada ? "Para comprar cr\xE9ditos hace falta una sesi\xF3n v\xE1lida. No se cobr\xF3 nada." : "Para recargar cr\xE9ditos necesitas una sesi\xF3n de Theus."
|
|
364425
|
+
})
|
|
364426
|
+
}),
|
|
364427
|
+
/* @__PURE__ */ jsx_runtime253.jsx(ThemedBox_default, {
|
|
364428
|
+
marginTop: 1,
|
|
364429
|
+
children: /* @__PURE__ */ jsx_runtime253.jsxs(ThemedText, {
|
|
364430
|
+
children: [
|
|
364431
|
+
" ",
|
|
364432
|
+
/* @__PURE__ */ jsx_runtime253.jsx(ThemedText, {
|
|
364433
|
+
color: VIOLETA,
|
|
364434
|
+
bold: true,
|
|
364435
|
+
children: "/login"
|
|
364436
|
+
}),
|
|
364437
|
+
/* @__PURE__ */ jsx_runtime253.jsx(ThemedText, {
|
|
364438
|
+
dimColor: true,
|
|
364439
|
+
children: " (o: theus auth login)"
|
|
364440
|
+
})
|
|
364441
|
+
]
|
|
364442
|
+
})
|
|
364443
|
+
}),
|
|
364444
|
+
/* @__PURE__ */ jsx_runtime253.jsx(ThemedBox_default, {
|
|
364445
|
+
marginTop: 1,
|
|
364446
|
+
children: /* @__PURE__ */ jsx_runtime253.jsx(ThemedText, {
|
|
364447
|
+
dimColor: true,
|
|
364448
|
+
children: "Despu\xE9s vuelve a ejecutar /recarga. Esc para cerrar."
|
|
364449
|
+
})
|
|
364321
364450
|
})
|
|
364322
364451
|
]
|
|
364323
364452
|
});
|
|
@@ -364648,11 +364777,18 @@ function parseArgs2(raw) {
|
|
|
364648
364777
|
return { packId, confirmar };
|
|
364649
364778
|
}
|
|
364650
364779
|
var call33 = async (args) => {
|
|
364651
|
-
const token =
|
|
364780
|
+
const token = await freshAccessToken();
|
|
364652
364781
|
if (!token) {
|
|
364782
|
+
const caducada = safeAccessToken() !== undefined;
|
|
364653
364783
|
return {
|
|
364654
364784
|
type: "text",
|
|
364655
|
-
value: [
|
|
364785
|
+
value: [
|
|
364786
|
+
caducada ? "Tu sesi\xF3n caduc\xF3. Para comprar cr\xE9ditos hace falta una sesi\xF3n v\xE1lida (no se cobr\xF3 nada)." : "A\xFAn no has iniciado sesi\xF3n.",
|
|
364787
|
+
"",
|
|
364788
|
+
" theus auth login",
|
|
364789
|
+
"",
|
|
364790
|
+
"Despu\xE9s vuelve a ejecutar la recarga."
|
|
364791
|
+
].join(`
|
|
364656
364792
|
`)
|
|
364657
364793
|
};
|
|
364658
364794
|
}
|
|
@@ -364712,13 +364848,20 @@ var call33 = async (args) => {
|
|
|
364712
364848
|
`)
|
|
364713
364849
|
};
|
|
364714
364850
|
}
|
|
364715
|
-
const
|
|
364716
|
-
if (!
|
|
364851
|
+
const res = await fetchCheckoutUrl(token, packId);
|
|
364852
|
+
if (!res.ok) {
|
|
364717
364853
|
return {
|
|
364718
364854
|
type: "text",
|
|
364719
|
-
value:
|
|
364855
|
+
value: [
|
|
364856
|
+
`No pude generar el pago de ${pack.nombre}. No se cobr\xF3 nada.`,
|
|
364857
|
+
"",
|
|
364858
|
+
res.motivo,
|
|
364859
|
+
...res.requiereLogin ? ["", " theus auth login"] : []
|
|
364860
|
+
].join(`
|
|
364861
|
+
`)
|
|
364720
364862
|
};
|
|
364721
364863
|
}
|
|
364864
|
+
const checkoutUrl = res.url;
|
|
364722
364865
|
const opened = await openBrowser(checkoutUrl);
|
|
364723
364866
|
return {
|
|
364724
364867
|
type: "text",
|
|
@@ -364884,9 +365027,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
364884
365027
|
return [];
|
|
364885
365028
|
}
|
|
364886
365029
|
}
|
|
364887
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.
|
|
365030
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.56", 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) {
|
|
364888
365031
|
if (process.env.USER_TYPE === "ant") {
|
|
364889
|
-
const changelog = { VERSION: "0.2.
|
|
365032
|
+
const changelog = { VERSION: "0.2.56", 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;
|
|
364890
365033
|
if (changelog) {
|
|
364891
365034
|
const commits = changelog.trim().split(`
|
|
364892
365035
|
`).filter(Boolean);
|
|
@@ -369088,7 +369231,7 @@ var init_Messages = __esm(() => {
|
|
|
369088
369231
|
let t1;
|
|
369089
369232
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
369090
369233
|
t1 = /* @__PURE__ */ jsx_runtime263.jsx(TheusSessionHeader, {
|
|
369091
|
-
version: { VERSION: "0.2.
|
|
369234
|
+
version: { VERSION: "0.2.56", 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
|
|
369092
369235
|
});
|
|
369093
369236
|
$2[0] = t1;
|
|
369094
369237
|
} else {
|
|
@@ -397912,7 +398055,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
397912
398055
|
smapsRollup,
|
|
397913
398056
|
platform: process.platform,
|
|
397914
398057
|
nodeVersion: process.version,
|
|
397915
|
-
ccVersion: { VERSION: "0.2.
|
|
398058
|
+
ccVersion: { VERSION: "0.2.56", 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
|
|
397916
398059
|
};
|
|
397917
398060
|
}
|
|
397918
398061
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -398731,7 +398874,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
398731
398874
|
var call65 = async () => {
|
|
398732
398875
|
return {
|
|
398733
398876
|
type: "text",
|
|
398734
|
-
value: { VERSION: "0.2.
|
|
398877
|
+
value: { VERSION: "0.2.56", 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.56", 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.56", 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.56", 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
|
|
398735
398878
|
};
|
|
398736
398879
|
}, version2, version_default;
|
|
398737
398880
|
var init_version = __esm(() => {
|
|
@@ -401332,7 +401475,7 @@ var SECRET_NAME_PATTERN, EXTRA_ENV_ALLOWLIST, REDACTED2 = "\u2039oculto\u203A",
|
|
|
401332
401475
|
const lines = [];
|
|
401333
401476
|
lines.push("## Entorno de ejecuci\xF3n");
|
|
401334
401477
|
lines.push("");
|
|
401335
|
-
const version3 = { VERSION: "0.2.
|
|
401478
|
+
const version3 = { VERSION: "0.2.56", 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.56", 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";
|
|
401336
401479
|
lines.push(`- Versi\xF3n de Theus: ${version3}`);
|
|
401337
401480
|
lines.push(`- Directorio de trabajo: ${getCwd()}`);
|
|
401338
401481
|
lines.push(`- \xBFRepositorio git?: ${isGit ? "s\xED" : "no"}`);
|
|
@@ -403702,6 +403845,47 @@ import {
|
|
|
403702
403845
|
} from "fs";
|
|
403703
403846
|
import { tmpdir as tmpdir10 } from "os";
|
|
403704
403847
|
import { dirname as dirname59, join as join143 } from "path";
|
|
403848
|
+
function naupaVersionOf(bin) {
|
|
403849
|
+
try {
|
|
403850
|
+
const out = spawnSync8(bin, ["--version"], {
|
|
403851
|
+
encoding: "utf8",
|
|
403852
|
+
timeout: 1e4
|
|
403853
|
+
});
|
|
403854
|
+
const m = /(\d+\.\d+\.\d+)/.exec(`${out.stdout ?? ""}${out.stderr ?? ""}`);
|
|
403855
|
+
return m?.[1] ?? null;
|
|
403856
|
+
} catch {
|
|
403857
|
+
return null;
|
|
403858
|
+
}
|
|
403859
|
+
}
|
|
403860
|
+
function rescatarNaupaMalUbicado(binEnUso) {
|
|
403861
|
+
try {
|
|
403862
|
+
const home = process.env.HOME ?? process.env.USERPROFILE;
|
|
403863
|
+
if (!home)
|
|
403864
|
+
return;
|
|
403865
|
+
const nombre = process.platform === "win32" ? "naupa.exe" : "naupa";
|
|
403866
|
+
const rutaFija = join143(home, ".local", "bin", nombre);
|
|
403867
|
+
if (!existsSync18(rutaFija))
|
|
403868
|
+
return;
|
|
403869
|
+
try {
|
|
403870
|
+
if (realpathSync4(rutaFija) === realpathSync4(binEnUso))
|
|
403871
|
+
return;
|
|
403872
|
+
} catch {}
|
|
403873
|
+
const vUso = naupaVersionOf(binEnUso);
|
|
403874
|
+
const vFija = naupaVersionOf(rutaFija);
|
|
403875
|
+
if (!vUso || !vFija || vUso === vFija)
|
|
403876
|
+
return;
|
|
403877
|
+
if (!gte(vFija, vUso))
|
|
403878
|
+
return;
|
|
403879
|
+
cpSync(binEnUso, `${binEnUso}.bak`, { force: true });
|
|
403880
|
+
cpSync(rutaFija, binEnUso, { force: true });
|
|
403881
|
+
writeToStdout(source_default.green(`\xD1aupa: la actualizaci\xF3n se hab\xEDa instalado en otra ruta (${rutaFija}); ` + `la copi\xE9 al binario que usa Theus (${vUso} \u2192 ${vFija}).`) + `
|
|
403882
|
+
`);
|
|
403883
|
+
logEvent("tengu_naupa_update_rescued", {
|
|
403884
|
+
from: vUso,
|
|
403885
|
+
to: vFija
|
|
403886
|
+
});
|
|
403887
|
+
} catch {}
|
|
403888
|
+
}
|
|
403705
403889
|
async function updateNaupa() {
|
|
403706
403890
|
if (process.env.THEUS_NO_NAUPA_UPDATE === "1")
|
|
403707
403891
|
return;
|
|
@@ -403743,6 +403927,7 @@ async function updateNaupa() {
|
|
|
403743
403927
|
writeToStdout(source_default.yellow(`Aviso: \xD1aupa update termin\xF3 con c\xF3digo ${code}. ` + "Puedes reintentar a mano: naupa update --ui") + `
|
|
403744
403928
|
`);
|
|
403745
403929
|
}
|
|
403930
|
+
rescatarNaupaMalUbicado(bin);
|
|
403746
403931
|
done();
|
|
403747
403932
|
});
|
|
403748
403933
|
});
|
|
@@ -403801,13 +403986,13 @@ async function updateReleaseBundle() {
|
|
|
403801
403986
|
await gracefulShutdown(1);
|
|
403802
403987
|
return;
|
|
403803
403988
|
}
|
|
403804
|
-
if (gte({ VERSION: "0.2.
|
|
403805
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
403989
|
+
if (gte({ VERSION: "0.2.56", 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)) {
|
|
403990
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.56", 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})`) + `
|
|
403806
403991
|
`);
|
|
403807
403992
|
await gracefulShutdown(0);
|
|
403808
403993
|
return;
|
|
403809
403994
|
}
|
|
403810
|
-
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.
|
|
403995
|
+
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.56", 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})
|
|
403811
403996
|
`);
|
|
403812
403997
|
writeToStdout(`Installing update from theus.pe/dl...
|
|
403813
403998
|
`);
|
|
@@ -403841,7 +404026,7 @@ async function updateReleaseBundle() {
|
|
|
403841
404026
|
return;
|
|
403842
404027
|
}
|
|
403843
404028
|
cpSync(staged, bundleDir, { recursive: true, force: true });
|
|
403844
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
404029
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.56", 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}`) + `
|
|
403845
404030
|
`);
|
|
403846
404031
|
await regenerateCompletionCache();
|
|
403847
404032
|
} finally {
|
|
@@ -403854,7 +404039,7 @@ async function updateReleaseBundle() {
|
|
|
403854
404039
|
async function update() {
|
|
403855
404040
|
logEvent("tengu_update_check", {});
|
|
403856
404041
|
await updateNaupa();
|
|
403857
|
-
writeToStdout(`Current version: ${{ VERSION: "0.2.
|
|
404042
|
+
writeToStdout(`Current version: ${{ VERSION: "0.2.56", 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}
|
|
403858
404043
|
`);
|
|
403859
404044
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
403860
404045
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -403933,8 +404118,8 @@ async function update() {
|
|
|
403933
404118
|
writeToStdout(`Theus is managed by Homebrew.
|
|
403934
404119
|
`);
|
|
403935
404120
|
const latest = await getLatestVersion(channel2);
|
|
403936
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
403937
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
404121
|
+
if (latest && !gte({ VERSION: "0.2.56", 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)) {
|
|
404122
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.56", 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}
|
|
403938
404123
|
`);
|
|
403939
404124
|
writeToStdout(`
|
|
403940
404125
|
`);
|
|
@@ -403950,8 +404135,8 @@ async function update() {
|
|
|
403950
404135
|
writeToStdout(`Theus is managed by winget.
|
|
403951
404136
|
`);
|
|
403952
404137
|
const latest = await getLatestVersion(channel2);
|
|
403953
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
403954
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
404138
|
+
if (latest && !gte({ VERSION: "0.2.56", 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)) {
|
|
404139
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.56", 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}
|
|
403955
404140
|
`);
|
|
403956
404141
|
writeToStdout(`
|
|
403957
404142
|
`);
|
|
@@ -403967,8 +404152,8 @@ async function update() {
|
|
|
403967
404152
|
writeToStdout(`Theus is managed by apk.
|
|
403968
404153
|
`);
|
|
403969
404154
|
const latest = await getLatestVersion(channel2);
|
|
403970
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
403971
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
404155
|
+
if (latest && !gte({ VERSION: "0.2.56", 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)) {
|
|
404156
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.56", 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}
|
|
403972
404157
|
`);
|
|
403973
404158
|
writeToStdout(`
|
|
403974
404159
|
`);
|
|
@@ -404033,11 +404218,11 @@ async function update() {
|
|
|
404033
404218
|
`);
|
|
404034
404219
|
await gracefulShutdown(1);
|
|
404035
404220
|
}
|
|
404036
|
-
if (result.latestVersion === { VERSION: "0.2.
|
|
404037
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
404221
|
+
if (result.latestVersion === { VERSION: "0.2.56", 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) {
|
|
404222
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.56", 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})`) + `
|
|
404038
404223
|
`);
|
|
404039
404224
|
} else {
|
|
404040
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
404225
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.56", 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}`) + `
|
|
404041
404226
|
`);
|
|
404042
404227
|
await regenerateCompletionCache();
|
|
404043
404228
|
}
|
|
@@ -404056,9 +404241,9 @@ async function update() {
|
|
|
404056
404241
|
await removeInstalledSymlink();
|
|
404057
404242
|
}
|
|
404058
404243
|
logForDebugging("update: Checking npm registry for latest version");
|
|
404059
|
-
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.
|
|
404244
|
+
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.56", 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}`);
|
|
404060
404245
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
404061
|
-
const npmCommand = `npm view ${{ VERSION: "0.2.
|
|
404246
|
+
const npmCommand = `npm view ${{ VERSION: "0.2.56", 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`;
|
|
404062
404247
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
404063
404248
|
const latestVersion = await getLatestVersion(channel2);
|
|
404064
404249
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -404078,7 +404263,7 @@ async function update() {
|
|
|
404078
404263
|
`);
|
|
404079
404264
|
process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
|
|
404080
404265
|
`);
|
|
404081
|
-
if ({ VERSION: "0.2.
|
|
404266
|
+
if ({ VERSION: "0.2.56", 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.56", 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")) {
|
|
404082
404267
|
process.stderr.write(` \u2022 Internal/development build not published to npm
|
|
404083
404268
|
`);
|
|
404084
404269
|
}
|
|
@@ -404090,19 +404275,19 @@ async function update() {
|
|
|
404090
404275
|
`);
|
|
404091
404276
|
process.stderr.write(` \u2022 Run with --debug flag for more details
|
|
404092
404277
|
`);
|
|
404093
|
-
const packageName = { VERSION: "0.2.
|
|
404278
|
+
const packageName = { VERSION: "0.2.56", 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");
|
|
404094
404279
|
process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
|
|
404095
404280
|
`);
|
|
404096
404281
|
process.stderr.write(` \u2022 Check if you need to login: npm whoami
|
|
404097
404282
|
`);
|
|
404098
404283
|
await gracefulShutdown(1);
|
|
404099
404284
|
}
|
|
404100
|
-
if (gte({ VERSION: "0.2.
|
|
404101
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
404285
|
+
if (gte({ VERSION: "0.2.56", 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)) {
|
|
404286
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.56", 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})`) + `
|
|
404102
404287
|
`);
|
|
404103
404288
|
await gracefulShutdown(0);
|
|
404104
404289
|
}
|
|
404105
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.
|
|
404290
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.56", 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})
|
|
404106
404291
|
`);
|
|
404107
404292
|
writeToStdout(`Installing update...
|
|
404108
404293
|
`);
|
|
@@ -404147,7 +404332,7 @@ async function update() {
|
|
|
404147
404332
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
404148
404333
|
switch (status2) {
|
|
404149
404334
|
case "success":
|
|
404150
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
404335
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.56", 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}`) + `
|
|
404151
404336
|
`);
|
|
404152
404337
|
await regenerateCompletionCache();
|
|
404153
404338
|
break;
|
|
@@ -404157,7 +404342,7 @@ async function update() {
|
|
|
404157
404342
|
if (useLocalUpdate) {
|
|
404158
404343
|
process.stderr.write(`Try manually updating with:
|
|
404159
404344
|
`);
|
|
404160
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
404345
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.56", 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}
|
|
404161
404346
|
`);
|
|
404162
404347
|
} else {
|
|
404163
404348
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -404173,7 +404358,7 @@ async function update() {
|
|
|
404173
404358
|
if (useLocalUpdate) {
|
|
404174
404359
|
process.stderr.write(`Try manually updating with:
|
|
404175
404360
|
`);
|
|
404176
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
404361
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.56", 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}
|
|
404177
404362
|
`);
|
|
404178
404363
|
} else {
|
|
404179
404364
|
process.stderr.write(`Or consider using native installation with: theus install
|
|
@@ -414013,7 +414198,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
414013
414198
|
init_settings2();
|
|
414014
414199
|
init_slowOperations();
|
|
414015
414200
|
init_uuid();
|
|
414016
|
-
VERSION4 = { VERSION: "0.2.
|
|
414201
|
+
VERSION4 = { VERSION: "0.2.56", 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;
|
|
414017
414202
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
414018
414203
|
SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
414019
414204
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -415218,7 +415403,7 @@ var init_filesystem = __esm(() => {
|
|
|
415218
415403
|
});
|
|
415219
415404
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
415220
415405
|
const nonce = randomBytes21(16).toString("hex");
|
|
415221
|
-
return join150(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.
|
|
415406
|
+
return join150(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.56", 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);
|
|
415222
415407
|
});
|
|
415223
415408
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
415224
415409
|
});
|
|
@@ -420397,7 +420582,7 @@ function getSimpleDoingTasksSection() {
|
|
|
420397
420582
|
];
|
|
420398
420583
|
const userHelpSubitems = [
|
|
420399
420584
|
`/help: Get help with using Theus`,
|
|
420400
|
-
`To give feedback, users should ${{ VERSION: "0.2.
|
|
420585
|
+
`To give feedback, users should ${{ VERSION: "0.2.56", 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}`
|
|
420401
420586
|
];
|
|
420402
420587
|
const items = [
|
|
420403
420588
|
`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.`,
|
|
@@ -421297,7 +421482,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
421297
421482
|
}
|
|
421298
421483
|
function computeFingerprintFromMessages(messages) {
|
|
421299
421484
|
const firstMessageText = extractFirstMessageText(messages);
|
|
421300
|
-
return computeFingerprint(firstMessageText, { VERSION: "0.2.
|
|
421485
|
+
return computeFingerprint(firstMessageText, { VERSION: "0.2.56", 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);
|
|
421301
421486
|
}
|
|
421302
421487
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
421303
421488
|
var init_fingerprint = () => {};
|
|
@@ -423920,7 +424105,7 @@ async function sideQuery(opts) {
|
|
|
423920
424105
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
423921
424106
|
}
|
|
423922
424107
|
const messageText = extractFirstUserMessageText(messages);
|
|
423923
|
-
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.
|
|
424108
|
+
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.56", 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);
|
|
423924
424109
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
423925
424110
|
const systemBlocks = [
|
|
423926
424111
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -425223,7 +425408,7 @@ async function handleMemories(state) {
|
|
|
425223
425408
|
async function runProjectContextMcpServer() {
|
|
425224
425409
|
const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
|
|
425225
425410
|
const state = new ProjectContextState(projectRoot);
|
|
425226
|
-
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.
|
|
425411
|
+
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.56", 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: {} } });
|
|
425227
425412
|
server2.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
425228
425413
|
tools: TOOL_DEFINITIONS.map((t) => ({
|
|
425229
425414
|
name: t.name,
|
|
@@ -427205,7 +427390,7 @@ function createBridgeLogger(options2) {
|
|
|
427205
427390
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
427206
427391
|
regenerateQr(connectUrl);
|
|
427207
427392
|
if (verbose) {
|
|
427208
|
-
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.
|
|
427393
|
+
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.56", 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}
|
|
427209
427394
|
`);
|
|
427210
427395
|
}
|
|
427211
427396
|
if (verbose) {
|
|
@@ -428178,7 +428363,7 @@ function appendToLog(path19, message) {
|
|
|
428178
428363
|
cwd: getFsImplementation().cwd(),
|
|
428179
428364
|
userType: process.env.USER_TYPE,
|
|
428180
428365
|
sessionId: getSessionId(),
|
|
428181
|
-
version: { VERSION: "0.2.
|
|
428366
|
+
version: { VERSION: "0.2.56", 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
|
|
428182
428367
|
};
|
|
428183
428368
|
getLogWriter(path19).write(messageWithTimestamp);
|
|
428184
428369
|
}
|
|
@@ -429448,7 +429633,7 @@ Spawn mode for this project:
|
|
|
429448
429633
|
const api2 = createBridgeApiClient({
|
|
429449
429634
|
baseUrl,
|
|
429450
429635
|
getAccessToken: getBridgeAccessToken2,
|
|
429451
|
-
runnerVersion: { VERSION: "0.2.
|
|
429636
|
+
runnerVersion: { VERSION: "0.2.56", 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,
|
|
429452
429637
|
onDebug: logForDebugging,
|
|
429453
429638
|
onAuth401: handleOAuth401Error2,
|
|
429454
429639
|
getTrustedDeviceToken
|
|
@@ -429686,7 +429871,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
429686
429871
|
const api2 = createBridgeApiClient({
|
|
429687
429872
|
baseUrl,
|
|
429688
429873
|
getAccessToken: opts.getAccessToken,
|
|
429689
|
-
runnerVersion: { VERSION: "0.2.
|
|
429874
|
+
runnerVersion: { VERSION: "0.2.56", 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,
|
|
429690
429875
|
onDebug: log2,
|
|
429691
429876
|
onAuth401: opts.onAuth401,
|
|
429692
429877
|
getTrustedDeviceToken
|
|
@@ -433752,7 +433937,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
433752
433937
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
433753
433938
|
apiKeySource: getTheusApiKeyWithSource().source,
|
|
433754
433939
|
betas: getSdkBetas(),
|
|
433755
|
-
theus_code_version: { VERSION: "0.2.
|
|
433940
|
+
theus_code_version: { VERSION: "0.2.56", 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,
|
|
433756
433941
|
output_style: outputStyle2,
|
|
433757
433942
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
433758
433943
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -433792,8 +433977,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
433792
433977
|
}
|
|
433793
433978
|
async function checkEnvLessBridgeMinVersion() {
|
|
433794
433979
|
const cfg = await getEnvLessBridgeConfig();
|
|
433795
|
-
if (cfg.min_version && lt({ VERSION: "0.2.
|
|
433796
|
-
return `Your version of Theus (${{ VERSION: "0.2.
|
|
433980
|
+
if (cfg.min_version && lt({ VERSION: "0.2.56", 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)) {
|
|
433981
|
+
return `Your version of Theus (${{ VERSION: "0.2.56", 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.
|
|
433797
433982
|
Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
|
|
433798
433983
|
}
|
|
433799
433984
|
return null;
|
|
@@ -436117,7 +436302,7 @@ async function initBridgeCore(params) {
|
|
|
436117
436302
|
const rawApi = createBridgeApiClient({
|
|
436118
436303
|
baseUrl,
|
|
436119
436304
|
getAccessToken,
|
|
436120
|
-
runnerVersion: { VERSION: "0.2.
|
|
436305
|
+
runnerVersion: { VERSION: "0.2.56", 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,
|
|
436121
436306
|
onDebug: logForDebugging,
|
|
436122
436307
|
onAuth401,
|
|
436123
436308
|
getTrustedDeviceToken
|
|
@@ -452860,7 +453045,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
452860
453045
|
function getSemverPart(version3) {
|
|
452861
453046
|
return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
|
|
452862
453047
|
}
|
|
452863
|
-
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.
|
|
453048
|
+
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.56", 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) {
|
|
452864
453049
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react233.useState(() => getSemverPart(initialVersion));
|
|
452865
453050
|
if (!updatedVersion) {
|
|
452866
453051
|
return null;
|
|
@@ -452900,7 +453085,7 @@ function AutoUpdater({
|
|
|
452900
453085
|
return;
|
|
452901
453086
|
}
|
|
452902
453087
|
if (false) {}
|
|
452903
|
-
const currentVersion = { VERSION: "0.2.
|
|
453088
|
+
const currentVersion = { VERSION: "0.2.56", 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;
|
|
452904
453089
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
452905
453090
|
let latestVersion = await getLatestVersion(channel2);
|
|
452906
453091
|
const isDisabled2 = isAutoUpdaterDisabled();
|
|
@@ -453036,7 +453221,7 @@ function AutoUpdater({
|
|
|
453036
453221
|
" ",
|
|
453037
453222
|
/* @__PURE__ */ jsx_runtime409.jsx(ThemedText, {
|
|
453038
453223
|
bold: true,
|
|
453039
|
-
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
453224
|
+
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.56", 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.56", 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}`
|
|
453040
453225
|
})
|
|
453041
453226
|
]
|
|
453042
453227
|
})
|
|
@@ -453113,12 +453298,12 @@ function NativeAutoUpdater({
|
|
|
453113
453298
|
logEvent("tengu_native_auto_updater_start", {});
|
|
453114
453299
|
try {
|
|
453115
453300
|
const maxVersion = await getMaxVersion();
|
|
453116
|
-
if (maxVersion && gt({ VERSION: "0.2.
|
|
453301
|
+
if (maxVersion && gt({ VERSION: "0.2.56", 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)) {
|
|
453117
453302
|
const msg = await getMaxVersionMessage();
|
|
453118
453303
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
453119
453304
|
}
|
|
453120
453305
|
const result = await installLatest(channel2);
|
|
453121
|
-
const currentVersion = { VERSION: "0.2.
|
|
453306
|
+
const currentVersion = { VERSION: "0.2.56", 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;
|
|
453122
453307
|
const latencyMs = Date.now() - startTime2;
|
|
453123
453308
|
if (result.lockFailed) {
|
|
453124
453309
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -453255,17 +453440,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
453255
453440
|
const maxVersion = await getMaxVersion();
|
|
453256
453441
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
453257
453442
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
453258
|
-
if (gte({ VERSION: "0.2.
|
|
453259
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.
|
|
453443
|
+
if (gte({ VERSION: "0.2.56", 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)) {
|
|
453444
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.56", 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`);
|
|
453260
453445
|
setUpdateAvailable(false);
|
|
453261
453446
|
return;
|
|
453262
453447
|
}
|
|
453263
453448
|
latest = maxVersion;
|
|
453264
453449
|
}
|
|
453265
|
-
const hasUpdate = latest && !gte({ VERSION: "0.2.
|
|
453450
|
+
const hasUpdate = latest && !gte({ VERSION: "0.2.56", 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);
|
|
453266
453451
|
setUpdateAvailable(!!hasUpdate);
|
|
453267
453452
|
if (hasUpdate) {
|
|
453268
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.
|
|
453453
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.56", 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}`);
|
|
453269
453454
|
}
|
|
453270
453455
|
};
|
|
453271
453456
|
$2[0] = t1;
|
|
@@ -453299,7 +453484,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
453299
453484
|
wrap: "truncate",
|
|
453300
453485
|
children: [
|
|
453301
453486
|
"currentVersion: ",
|
|
453302
|
-
{ VERSION: "0.2.
|
|
453487
|
+
{ VERSION: "0.2.56", 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
|
|
453303
453488
|
]
|
|
453304
453489
|
});
|
|
453305
453490
|
$2[3] = verbose;
|
|
@@ -461173,7 +461358,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
461173
461358
|
project_dir: getOriginalCwd(),
|
|
461174
461359
|
added_dirs: addedDirs
|
|
461175
461360
|
},
|
|
461176
|
-
version: { VERSION: "0.2.
|
|
461361
|
+
version: { VERSION: "0.2.56", 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,
|
|
461177
461362
|
output_style: {
|
|
461178
461363
|
name: outputStyleName
|
|
461179
461364
|
},
|
|
@@ -485453,7 +485638,7 @@ function completeOnboarding() {
|
|
|
485453
485638
|
saveGlobalConfig((current) => ({
|
|
485454
485639
|
...current,
|
|
485455
485640
|
hasCompletedOnboarding: true,
|
|
485456
|
-
lastOnboardingVersion: { VERSION: "0.2.
|
|
485641
|
+
lastOnboardingVersion: { VERSION: "0.2.56", 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
|
|
485457
485642
|
}));
|
|
485458
485643
|
}
|
|
485459
485644
|
function showDialog(root2, renderer) {
|
|
@@ -496404,7 +496589,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
|
|
|
496404
496589
|
setCwd(cwd3);
|
|
496405
496590
|
const server2 = new Server({
|
|
496406
496591
|
name: "theus/tengu",
|
|
496407
|
-
version: { VERSION: "0.2.
|
|
496592
|
+
version: { VERSION: "0.2.56", 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
|
|
496408
496593
|
}, {
|
|
496409
496594
|
capabilities: {
|
|
496410
496595
|
tools: {}
|
|
@@ -497846,7 +498031,7 @@ async function setupTokenHandler(root2) {
|
|
|
497846
498031
|
gap: 1,
|
|
497847
498032
|
children: [
|
|
497848
498033
|
/* @__PURE__ */ jsx_runtime495.jsx(TheusBanner, {
|
|
497849
|
-
version: { VERSION: "0.2.
|
|
498034
|
+
version: { VERSION: "0.2.56", 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
|
|
497850
498035
|
}),
|
|
497851
498036
|
showAuthWarning && /* @__PURE__ */ jsx_runtime495.jsxs(ThemedBox_default, {
|
|
497852
498037
|
flexDirection: "column",
|
|
@@ -499328,7 +499513,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
499328
499513
|
}
|
|
499329
499514
|
}
|
|
499330
499515
|
logForDiagnosticsNoPII("info", "started", {
|
|
499331
|
-
version: { VERSION: "0.2.
|
|
499516
|
+
version: { VERSION: "0.2.56", 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,
|
|
499332
499517
|
is_native_binary: isInBundledMode()
|
|
499333
499518
|
});
|
|
499334
499519
|
registerCleanup(async () => {
|
|
@@ -500196,7 +500381,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
500196
500381
|
pendingHookMessages
|
|
500197
500382
|
}, renderAndRun);
|
|
500198
500383
|
}
|
|
500199
|
-
}).version(`${{ VERSION: "0.2.
|
|
500384
|
+
}).version(`${{ VERSION: "0.2.56", 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");
|
|
500200
500385
|
program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
|
|
500201
500386
|
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.");
|
|
500202
500387
|
if (canUserConfigureAdvisor()) {
|
|
@@ -500748,7 +500933,7 @@ if (false) {}
|
|
|
500748
500933
|
async function main2() {
|
|
500749
500934
|
const args = process.argv.slice(2);
|
|
500750
500935
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
500751
|
-
console.log(`${{ VERSION: "0.2.
|
|
500936
|
+
console.log(`${{ VERSION: "0.2.56", 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)`);
|
|
500752
500937
|
return;
|
|
500753
500938
|
}
|
|
500754
500939
|
const {
|