theus-cli 0.2.47 → 0.2.49
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 +234 -150
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -58324,7 +58324,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
|
|
|
58324
58324
|
if (isApiKeyHelperFromProjectOrLocalSettings()) {
|
|
58325
58325
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58326
58326
|
if (!hasTrust && !isNonInteractiveSession) {
|
|
58327
|
-
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58327
|
+
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
58328
58328
|
logAntError("apiKeyHelper invoked before trust check", error40);
|
|
58329
58329
|
logEvent("tengu_apiKeyHelper_missing_trust11", {});
|
|
58330
58330
|
return null;
|
|
@@ -58368,7 +58368,7 @@ async function runAwsAuthRefresh() {
|
|
|
58368
58368
|
if (isAwsAuthRefreshFromProjectSettings()) {
|
|
58369
58369
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58370
58370
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58371
|
-
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58371
|
+
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
58372
58372
|
logAntError("awsAuthRefresh invoked before trust check", error40);
|
|
58373
58373
|
logEvent("tengu_awsAuthRefresh_missing_trust", {});
|
|
58374
58374
|
return false;
|
|
@@ -58428,7 +58428,7 @@ async function getAwsCredsFromCredentialExport() {
|
|
|
58428
58428
|
if (isAwsCredentialExportFromProjectSettings()) {
|
|
58429
58429
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58430
58430
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58431
|
-
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58431
|
+
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
58432
58432
|
logAntError("awsCredentialExport invoked before trust check", error40);
|
|
58433
58433
|
logEvent("tengu_awsCredentialExport_missing_trust", {});
|
|
58434
58434
|
return null;
|
|
@@ -58513,7 +58513,7 @@ async function runGcpAuthRefresh() {
|
|
|
58513
58513
|
if (isGcpAuthRefreshFromProjectSettings()) {
|
|
58514
58514
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58515
58515
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58516
|
-
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58516
|
+
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
58517
58517
|
logAntError("gcpAuthRefresh invoked before trust check", error40);
|
|
58518
58518
|
logEvent("tengu_gcpAuthRefresh_missing_trust", {});
|
|
58519
58519
|
return false;
|
|
@@ -59208,7 +59208,7 @@ var init_auth = __esm(() => {
|
|
|
59208
59208
|
|
|
59209
59209
|
// utils/userAgent.ts
|
|
59210
59210
|
function getTheusCodeUserAgent() {
|
|
59211
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59211
|
+
return `theus-code/${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
59212
59212
|
}
|
|
59213
59213
|
|
|
59214
59214
|
// utils/workloadContext.ts
|
|
@@ -59230,7 +59230,7 @@ function getUserAgent() {
|
|
|
59230
59230
|
const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
|
|
59231
59231
|
const workload = getWorkload();
|
|
59232
59232
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
59233
|
-
return `theus-cli/${{ VERSION: "0.2.
|
|
59233
|
+
return `theus-cli/${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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})`;
|
|
59234
59234
|
}
|
|
59235
59235
|
function getMCPUserAgent() {
|
|
59236
59236
|
const parts = [];
|
|
@@ -59244,7 +59244,7 @@ function getMCPUserAgent() {
|
|
|
59244
59244
|
parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
|
|
59245
59245
|
}
|
|
59246
59246
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
59247
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59247
|
+
return `theus-code/${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
59248
59248
|
}
|
|
59249
59249
|
function getWebFetchUserAgent() {
|
|
59250
59250
|
return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
|
|
@@ -59382,7 +59382,7 @@ var init_user = __esm(() => {
|
|
|
59382
59382
|
deviceId,
|
|
59383
59383
|
sessionId: getSessionId(),
|
|
59384
59384
|
email: getEmail(),
|
|
59385
|
-
appVersion: { VERSION: "0.2.
|
|
59385
|
+
appVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
59386
59386
|
platform: getHostPlatformForAnalytics(),
|
|
59387
59387
|
organizationUuid,
|
|
59388
59388
|
accountUuid,
|
|
@@ -61097,7 +61097,7 @@ var init_metadata = __esm(() => {
|
|
|
61097
61097
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
61098
61098
|
WHITESPACE_REGEX = /\s+/;
|
|
61099
61099
|
getVersionBase = memoize_default(() => {
|
|
61100
|
-
const match = { VERSION: "0.2.
|
|
61100
|
+
const match = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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]+)?/);
|
|
61101
61101
|
return match ? match[0] : undefined;
|
|
61102
61102
|
});
|
|
61103
61103
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -61137,9 +61137,9 @@ var init_metadata = __esm(() => {
|
|
|
61137
61137
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
61138
61138
|
isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
|
|
61139
61139
|
isTheusAiAuth: isTheusAISubscriber(),
|
|
61140
|
-
version: { VERSION: "0.2.
|
|
61140
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
61141
61141
|
versionBase: getVersionBase(),
|
|
61142
|
-
buildTime: { VERSION: "0.2.
|
|
61142
|
+
buildTime: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
61143
61143
|
deploymentEnvironment: env3.detectDeploymentEnvironment(),
|
|
61144
61144
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
61145
61145
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -61805,7 +61805,7 @@ function initialize1PEventLogging() {
|
|
|
61805
61805
|
const platform2 = getPlatform();
|
|
61806
61806
|
const attributes = {
|
|
61807
61807
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
61808
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
61808
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
61809
61809
|
};
|
|
61810
61810
|
if (platform2 === "wsl") {
|
|
61811
61811
|
const wslVersion = getWslVersion();
|
|
@@ -61832,7 +61832,7 @@ function initialize1PEventLogging() {
|
|
|
61832
61832
|
})
|
|
61833
61833
|
]
|
|
61834
61834
|
});
|
|
61835
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
61835
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
61836
61836
|
}
|
|
61837
61837
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
61838
61838
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -63703,7 +63703,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
63703
63703
|
if (!isAttributionHeaderEnabled()) {
|
|
63704
63704
|
return "";
|
|
63705
63705
|
}
|
|
63706
|
-
const version2 = `${{ VERSION: "0.2.
|
|
63706
|
+
const version2 = `${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
63707
63707
|
const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
|
|
63708
63708
|
const cch = "";
|
|
63709
63709
|
const workload = getWorkload();
|
|
@@ -107814,7 +107814,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
|
|
|
107814
107814
|
}
|
|
107815
107815
|
function getFeedbackGuideline() {
|
|
107816
107816
|
if (isUsing3PServices()) {
|
|
107817
|
-
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.
|
|
107817
|
+
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
107818
107818
|
}
|
|
107819
107819
|
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";
|
|
107820
107820
|
}
|
|
@@ -116229,7 +116229,7 @@ function hashString2(str) {
|
|
|
116229
116229
|
}
|
|
116230
116230
|
return hash >>> 0;
|
|
116231
116231
|
}
|
|
116232
|
-
async function
|
|
116232
|
+
async function maybeResizeAndDownsampleImageBuffer2(imageBuffer, originalSize, ext) {
|
|
116233
116233
|
if (imageBuffer.length === 0) {
|
|
116234
116234
|
throw new ImageResizeError("Image file is empty (0 bytes)");
|
|
116235
116235
|
}
|
|
@@ -116407,7 +116407,7 @@ async function maybeResizeAndDownsampleImageBlock(imageBlock) {
|
|
|
116407
116407
|
const originalSize = imageBuffer.length;
|
|
116408
116408
|
const mediaType = imageBlock.source.media_type;
|
|
116409
116409
|
const ext = mediaType?.split("/")[1] || "png";
|
|
116410
|
-
const resized = await
|
|
116410
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, originalSize, ext);
|
|
116411
116411
|
return {
|
|
116412
116412
|
block: {
|
|
116413
116413
|
type: "image",
|
|
@@ -166523,7 +166523,7 @@ function getTelemetryAttributes() {
|
|
|
166523
166523
|
attributes["session.id"] = sessionId;
|
|
166524
166524
|
}
|
|
166525
166525
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
166526
|
-
attributes["app.version"] = { VERSION: "0.2.
|
|
166526
|
+
attributes["app.version"] = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
166527
166527
|
}
|
|
166528
166528
|
const oauthAccount = getOauthAccountInfo();
|
|
166529
166529
|
if (oauthAccount) {
|
|
@@ -183732,13 +183732,17 @@ var PROVIDER_TOOL_NAME = "Provider", DESCRIPTION8 = `Route a request to one or m
|
|
|
183732
183732
|
|
|
183733
183733
|
Use this when a turn needs a NON-TEXT capability or several capabilities at once:
|
|
183734
183734
|
- "genera una imagen de X" \u2192 capability: ["image"] (REAL generation)
|
|
183735
|
+
- "edita/retoca/cambia esta imagen" \u2192 capability: ["image"] + editarImagenes: [ruta o enlace]
|
|
183735
183736
|
- "genera un video de X" \u2192 capability: ["video"] (REAL generation)
|
|
183737
|
+
- "anima esta imagen" \u2192 capability: ["video"] + imagenUrl: ruta o enlace
|
|
183736
183738
|
- "chart this dataset" \u2192 capability: ["chart"], pass rows in \`data\`
|
|
183737
183739
|
- "write a report on Y" \u2192 capability: ["report"], pass sections in \`data\`
|
|
183738
183740
|
- "answer AND chart the numbers" \u2192 capability: ["text","chart"]
|
|
183739
183741
|
|
|
183740
183742
|
Capabilities: text | video | image | report | chart | embedding.
|
|
183741
183743
|
|
|
183744
|
+
EDITING an image: pass \`editarImagenes\` (local paths and/or links, up to 14) and the model TRANSFORMS what you give it instead of starting from scratch \u2014 retouch, recolor, replace the background, or merge several. Write the prompt as the CHANGE you want ("ponle fondo transparente"), not as a full scene description. A local file works directly: it travels embedded, nothing gets published anywhere.
|
|
183745
|
+
|
|
183742
183746
|
Image and video generation are REAL: they run against the user's Theus subscription gateway (configured automatically by \`theus login\`). The generated PNG/MP4 is saved under <cwd>/theus-media/ and the fused answer includes the relative file path \u2014 share that path with the user. Video generation can take up to a few minutes (the tool waits and downloads the result). If the user has no active session, the result explains (in Spanish) how to enable it with \`theus login\`.
|
|
183743
183747
|
|
|
183744
183748
|
The router picks the best enabled provider per capability (or all of them when \`combine\` is true), runs them in parallel, and returns one fused message with a provenance/cost summary.
|
|
@@ -202608,7 +202612,7 @@ function getInstallationEnv() {
|
|
|
202608
202612
|
return;
|
|
202609
202613
|
}
|
|
202610
202614
|
function getTheusCodeVersion() {
|
|
202611
|
-
return { VERSION: "0.2.
|
|
202615
|
+
return { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
202612
202616
|
}
|
|
202613
202617
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
202614
202618
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -204126,7 +204130,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
|
|
|
204126
204130
|
if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
|
|
204127
204131
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
204128
204132
|
if (!hasTrust) {
|
|
204129
|
-
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.
|
|
204133
|
+
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.49", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
204130
204134
|
logAntError("MCP headersHelper invoked before trust check", error40);
|
|
204131
204135
|
logEvent("tengu_mcp_headersHelper_missing_trust", {});
|
|
204132
204136
|
return null;
|
|
@@ -204903,7 +204907,7 @@ async function transformResultContent(resultContent, serverName) {
|
|
|
204903
204907
|
case "image": {
|
|
204904
204908
|
const imageBuffer = Buffer.from(String(resultContent.data), "base64");
|
|
204905
204909
|
const ext = resultContent.mimeType?.split("/")[1] || "png";
|
|
204906
|
-
const resized = await
|
|
204910
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, ext);
|
|
204907
204911
|
return [
|
|
204908
204912
|
{
|
|
204909
204913
|
type: "image",
|
|
@@ -204930,7 +204934,7 @@ async function transformResultContent(resultContent, serverName) {
|
|
|
204930
204934
|
if (isImage) {
|
|
204931
204935
|
const imageBuffer = Buffer.from(resource.blob, "base64");
|
|
204932
204936
|
const ext = resource.mimeType?.split("/")[1] || "png";
|
|
204933
|
-
const resized = await
|
|
204937
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, ext);
|
|
204934
204938
|
const content = [];
|
|
204935
204939
|
if (prefix) {
|
|
204936
204940
|
content.push({
|
|
@@ -205336,7 +205340,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
205336
205340
|
const client2 = new Client({
|
|
205337
205341
|
name: "theus-code",
|
|
205338
205342
|
title: "Theus",
|
|
205339
|
-
version: { VERSION: "0.2.
|
|
205343
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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",
|
|
205340
205344
|
description: "Theus's agentic coding tool",
|
|
205341
205345
|
websiteUrl: PRODUCT_URL
|
|
205342
205346
|
}, {
|
|
@@ -205690,7 +205694,7 @@ var init_client5 = __esm(() => {
|
|
|
205690
205694
|
const client2 = new Client({
|
|
205691
205695
|
name: "theus-code",
|
|
205692
205696
|
title: "Theus",
|
|
205693
|
-
version: { VERSION: "0.2.
|
|
205697
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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",
|
|
205694
205698
|
description: "Theus's agentic coding tool",
|
|
205695
205699
|
websiteUrl: PRODUCT_URL
|
|
205696
205700
|
}, {
|
|
@@ -210513,7 +210517,7 @@ async function getImageFromClipboard() {
|
|
|
210513
210517
|
const sharp = await getImageProcessor();
|
|
210514
210518
|
imageBuffer = await sharp(imageBuffer).png().toBuffer();
|
|
210515
210519
|
}
|
|
210516
|
-
const resized = await
|
|
210520
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, "png");
|
|
210517
210521
|
const base64Image = resized.buffer.toString("base64");
|
|
210518
210522
|
const mediaType = detectImageFormatFromBase64(base64Image);
|
|
210519
210523
|
execa(commands.deleteFile, { shell: true, reject: false });
|
|
@@ -210604,7 +210608,7 @@ async function tryReadImageFromPath(text) {
|
|
|
210604
210608
|
imageBuffer = await sharp(imageBuffer).png().toBuffer();
|
|
210605
210609
|
}
|
|
210606
210610
|
const ext = extname7(imagePath).slice(1).toLowerCase() || "png";
|
|
210607
|
-
const resized = await
|
|
210611
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, ext);
|
|
210608
210612
|
const base64Image = resized.buffer.toString("base64");
|
|
210609
210613
|
const mediaType = detectImageFormatFromBase64(base64Image);
|
|
210610
210614
|
return {
|
|
@@ -216268,7 +216272,7 @@ async function initializeBetaTracing(resource) {
|
|
|
216268
216272
|
});
|
|
216269
216273
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216270
216274
|
setLoggerProvider(loggerProvider);
|
|
216271
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216275
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
216272
216276
|
setEventLogger(eventLogger);
|
|
216273
216277
|
process.on("beforeExit", async () => {
|
|
216274
216278
|
await loggerProvider?.forceFlush();
|
|
@@ -216308,7 +216312,7 @@ async function initializeTelemetry() {
|
|
|
216308
216312
|
const platform4 = getPlatform();
|
|
216309
216313
|
const baseAttributes = {
|
|
216310
216314
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
216311
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
216315
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
216312
216316
|
};
|
|
216313
216317
|
if (platform4 === "wsl") {
|
|
216314
216318
|
const wslVersion = getWslVersion();
|
|
@@ -216353,7 +216357,7 @@ async function initializeTelemetry() {
|
|
|
216353
216357
|
} catch {}
|
|
216354
216358
|
};
|
|
216355
216359
|
registerCleanup(shutdownTelemetry2);
|
|
216356
|
-
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216360
|
+
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
216357
216361
|
}
|
|
216358
216362
|
const meterProvider = new MeterProvider({
|
|
216359
216363
|
resource,
|
|
@@ -216373,7 +216377,7 @@ async function initializeTelemetry() {
|
|
|
216373
216377
|
});
|
|
216374
216378
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216375
216379
|
setLoggerProvider(loggerProvider);
|
|
216376
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216380
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
216377
216381
|
setEventLogger(eventLogger);
|
|
216378
216382
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
216379
216383
|
process.on("beforeExit", async () => {
|
|
@@ -216435,7 +216439,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
216435
216439
|
}
|
|
216436
216440
|
};
|
|
216437
216441
|
registerCleanup(shutdownTelemetry);
|
|
216438
|
-
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216442
|
+
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
216439
216443
|
}
|
|
216440
216444
|
async function flushTelemetry() {
|
|
216441
216445
|
const meterProvider = getMeterProvider();
|
|
@@ -216975,7 +216979,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
|
|
|
216975
216979
|
return "install_failed";
|
|
216976
216980
|
}
|
|
216977
216981
|
const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
|
|
216978
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.
|
|
216982
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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 });
|
|
216979
216983
|
if (result.code !== 0) {
|
|
216980
216984
|
const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
|
|
216981
216985
|
logError2(error40);
|
|
@@ -217121,9 +217125,9 @@ async function assertMinVersion() {
|
|
|
217121
217125
|
if (false) {}
|
|
217122
217126
|
try {
|
|
217123
217127
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
217124
|
-
if (versionConfig.minVersion && lt({ VERSION: "0.2.
|
|
217128
|
+
if (versionConfig.minVersion && lt({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
217125
217129
|
console.error(`
|
|
217126
|
-
It looks like your version of Theus (${{ VERSION: "0.2.
|
|
217130
|
+
It looks like your version of Theus (${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.
|
|
217127
217131
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
217128
217132
|
|
|
217129
217133
|
To update, please run:
|
|
@@ -217264,7 +217268,7 @@ async function getInstallationPrefix() {
|
|
|
217264
217268
|
return prefixResult.stdout.trim();
|
|
217265
217269
|
}
|
|
217266
217270
|
function getGlobalInstallPackageManager() {
|
|
217267
|
-
if ({ VERSION: "0.2.
|
|
217271
|
+
if ({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217268
217272
|
return "npm";
|
|
217269
217273
|
}
|
|
217270
217274
|
return env3.isRunningWithBun() ? "bun" : "npm";
|
|
@@ -217289,7 +217293,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
217289
217293
|
}
|
|
217290
217294
|
async function getLatestVersion(channel2) {
|
|
217291
217295
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
217292
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.
|
|
217296
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217293
217297
|
if (result.code !== 0) {
|
|
217294
217298
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
217295
217299
|
if (result.stderr) {
|
|
@@ -217305,7 +217309,7 @@ async function getLatestVersion(channel2) {
|
|
|
217305
217309
|
return result.stdout.trim();
|
|
217306
217310
|
}
|
|
217307
217311
|
async function getNpmDistTags() {
|
|
217308
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.
|
|
217312
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217309
217313
|
if (result.code !== 0) {
|
|
217310
217314
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
217311
217315
|
return { latest: null, stable: null };
|
|
@@ -217345,7 +217349,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217345
217349
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
217346
217350
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
217347
217351
|
pid: process.pid,
|
|
217348
|
-
currentVersion: { VERSION: "0.2.
|
|
217352
|
+
currentVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
217349
217353
|
});
|
|
217350
217354
|
return "in_progress";
|
|
217351
217355
|
}
|
|
@@ -217354,7 +217358,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217354
217358
|
if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
|
|
217355
217359
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
217356
217360
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
217357
|
-
currentVersion: { VERSION: "0.2.
|
|
217361
|
+
currentVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
217358
217362
|
});
|
|
217359
217363
|
console.error(`
|
|
217360
217364
|
Error: Windows NPM detected in WSL
|
|
@@ -217373,7 +217377,7 @@ To fix this issue:
|
|
|
217373
217377
|
if (!hasPermissions) {
|
|
217374
217378
|
return "no_permissions";
|
|
217375
217379
|
}
|
|
217376
|
-
const packageSpec = specificVersion ? `${{ VERSION: "0.2.
|
|
217380
|
+
const packageSpec = specificVersion ? `${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
217377
217381
|
const packageManager = getGlobalInstallPackageManager();
|
|
217378
217382
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
217379
217383
|
if (installResult.code !== 0) {
|
|
@@ -217701,8 +217705,8 @@ async function detectMultipleInstallations() {
|
|
|
217701
217705
|
installations.push({ type: "npm-local", path: localPath });
|
|
217702
217706
|
}
|
|
217703
217707
|
const packagesToCheck = ["@theus-ai/theus-code"];
|
|
217704
|
-
if ({ VERSION: "0.2.
|
|
217705
|
-
packagesToCheck.push({ VERSION: "0.2.
|
|
217708
|
+
if ({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217709
|
+
packagesToCheck.push({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
217706
217710
|
}
|
|
217707
217711
|
const npmResult = await execFileNoThrow("npm", [
|
|
217708
217712
|
"-g",
|
|
@@ -217885,7 +217889,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
217885
217889
|
}
|
|
217886
217890
|
async function getDoctorDiagnostic() {
|
|
217887
217891
|
const installationType = await getCurrentInstallationType();
|
|
217888
|
-
const version2 = { VERSION: "0.2.
|
|
217892
|
+
const version2 = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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";
|
|
217889
217893
|
const installationPath = await getInstallationPath();
|
|
217890
217894
|
const invokedBinary = getInvokedBinary();
|
|
217891
217895
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -217897,8 +217901,8 @@ async function getDoctorDiagnostic() {
|
|
|
217897
217901
|
for (const install of npmInstalls) {
|
|
217898
217902
|
if (install.type === "npm-global") {
|
|
217899
217903
|
let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
|
|
217900
|
-
if ({ VERSION: "0.2.
|
|
217901
|
-
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.
|
|
217904
|
+
if ({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217905
|
+
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
217902
217906
|
}
|
|
217903
217907
|
warnings.push({
|
|
217904
217908
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -218010,7 +218014,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218010
218014
|
const startTime2 = Date.now();
|
|
218011
218015
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
218012
218016
|
"view",
|
|
218013
|
-
`${{ VERSION: "0.2.
|
|
218017
|
+
`${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`,
|
|
218014
218018
|
"version",
|
|
218015
218019
|
"--prefer-online",
|
|
218016
218020
|
"--registry",
|
|
@@ -218034,7 +218038,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218034
218038
|
latency_ms: latencyMs,
|
|
218035
218039
|
source_npm: true
|
|
218036
218040
|
});
|
|
218037
|
-
logForDebugging(`npm view ${{ VERSION: "0.2.
|
|
218041
|
+
logForDebugging(`npm view ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218038
218042
|
const latestVersion = stdout.trim();
|
|
218039
218043
|
return latestVersion;
|
|
218040
218044
|
}
|
|
@@ -218090,7 +218094,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218090
218094
|
const fs3 = getFsImplementation();
|
|
218091
218095
|
await fs3.rm(stagingPath, { recursive: true, force: true });
|
|
218092
218096
|
const platform4 = getPlatform2();
|
|
218093
|
-
const platformPackageName = `${{ VERSION: "0.2.
|
|
218097
|
+
const platformPackageName = `${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
218094
218098
|
logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
|
|
218095
218099
|
const {
|
|
218096
218100
|
stdout: integrityOutput,
|
|
@@ -218119,7 +218123,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218119
218123
|
name: "theus-native-installer",
|
|
218120
218124
|
version: "0.0.1",
|
|
218121
218125
|
dependencies: {
|
|
218122
|
-
[{ VERSION: "0.2.
|
|
218126
|
+
[{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
218123
218127
|
}
|
|
218124
218128
|
};
|
|
218125
218129
|
const packageLock = {
|
|
@@ -218132,10 +218136,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218132
218136
|
name: "theus-native-installer",
|
|
218133
218137
|
version: "0.0.1",
|
|
218134
218138
|
dependencies: {
|
|
218135
|
-
[{ VERSION: "0.2.
|
|
218139
|
+
[{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
218136
218140
|
}
|
|
218137
218141
|
},
|
|
218138
|
-
[`node_modules/${{ VERSION: "0.2.
|
|
218142
|
+
[`node_modules/${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
|
|
218139
218143
|
version: version2,
|
|
218140
218144
|
optionalDependencies: {
|
|
218141
218145
|
[platformPackageName]: version2
|
|
@@ -218157,7 +218161,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218157
218161
|
if (result.code !== 0) {
|
|
218158
218162
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
218159
218163
|
}
|
|
218160
|
-
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.
|
|
218164
|
+
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218161
218165
|
}
|
|
218162
218166
|
function getStallTimeoutMs() {
|
|
218163
218167
|
return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -218820,8 +218824,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
218820
218824
|
const maxVersion = await getMaxVersion();
|
|
218821
218825
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
218822
218826
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
218823
|
-
if (gte({ VERSION: "0.2.
|
|
218824
|
-
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.
|
|
218827
|
+
if (gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
218828
|
+
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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`);
|
|
218825
218829
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
218826
218830
|
latency_ms: Date.now() - startTime2,
|
|
218827
218831
|
max_version: maxVersion,
|
|
@@ -218832,7 +218836,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
218832
218836
|
version2 = maxVersion;
|
|
218833
218837
|
}
|
|
218834
218838
|
}
|
|
218835
|
-
if (!forceReinstall && version2 === { VERSION: "0.2.
|
|
218839
|
+
if (!forceReinstall && version2 === { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
218836
218840
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
218837
218841
|
logEvent("tengu_native_update_complete", {
|
|
218838
218842
|
latency_ms: Date.now() - startTime2,
|
|
@@ -219582,8 +219586,8 @@ async function cleanupNpmInstallations() {
|
|
|
219582
219586
|
} else if (codePackageResult.error) {
|
|
219583
219587
|
errors4.push(codePackageResult.error);
|
|
219584
219588
|
}
|
|
219585
|
-
if ({ VERSION: "0.2.
|
|
219586
|
-
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.
|
|
219589
|
+
if ({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
219590
|
+
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
219587
219591
|
if (macroPackageResult.success) {
|
|
219588
219592
|
removed++;
|
|
219589
219593
|
if (macroPackageResult.warning) {
|
|
@@ -230069,6 +230073,27 @@ var init_ConsoleOAuthFlow = __esm(() => {
|
|
|
230069
230073
|
var NOVEDADES;
|
|
230070
230074
|
var init_data = __esm(() => {
|
|
230071
230075
|
NOVEDADES = [
|
|
230076
|
+
{
|
|
230077
|
+
version: "v0.2.49",
|
|
230078
|
+
fecha: "2026-07-24",
|
|
230079
|
+
titulo: "Editar im\xE1genes, no solo crearlas",
|
|
230080
|
+
puntos: [
|
|
230081
|
+
"Ya puedes pedirle que retoque una imagen: cambiar el fondo, recolorear, quitar algo o combinar varias. Le describes el cambio y \xE9l transforma la que le diste, en vez de empezar de cero.",
|
|
230082
|
+
"Vale una imagen de tu disco \u2014incluida la que Theus acaba de generar\u2014 o un enlace. La local viaja embebida en la petici\xF3n: no se publica en ning\xFAn sitio.",
|
|
230083
|
+
"Puedes partir de hasta 14 im\xE1genes a la vez para combinarlas."
|
|
230084
|
+
]
|
|
230085
|
+
},
|
|
230086
|
+
{
|
|
230087
|
+
version: "v0.2.48",
|
|
230088
|
+
fecha: "2026-07-24",
|
|
230089
|
+
titulo: "El Teletransportador funciona, y la caja de texto va abajo",
|
|
230090
|
+
puntos: [
|
|
230091
|
+
"El Teletransportador ya lee tus sesiones: antes fallaba siempre y te ped\xEDa iniciar sesi\xF3n aunque acabaras de hacerlo, porque exig\xEDa un tipo de credencial que Theus no usa. Ahora usa la misma con la que ya entraste.",
|
|
230092
|
+
"Puedes escribir \xAB/teletransportador\xBB, que es como se llama en el producto; antes solo respond\xEDa a \xAB/teleport\xBB.",
|
|
230093
|
+
"Si algo falla, te dice el motivo real en vez de un mensaje gen\xE9rico que no ayudaba.",
|
|
230094
|
+
"La caja de texto es ahora el elemento m\xE1s bajo de la ventana y las novedades quedan encima, as\xED el orden se mantiene al redimensionar la terminal."
|
|
230095
|
+
]
|
|
230096
|
+
},
|
|
230072
230097
|
{
|
|
230073
230098
|
version: "v0.2.47",
|
|
230074
230099
|
fecha: "2026-07-24",
|
|
@@ -231156,13 +231181,13 @@ async function axiosGetWithRetry(url3, config2) {
|
|
|
231156
231181
|
throw lastError;
|
|
231157
231182
|
}
|
|
231158
231183
|
async function prepareApiRequest() {
|
|
231159
|
-
const accessToken = getTheusAIOAuthTokens()?.accessToken;
|
|
231160
|
-
if (accessToken
|
|
231161
|
-
throw new Error("
|
|
231184
|
+
const accessToken = getTheusAIOAuthTokens()?.accessToken ?? getApiKeyFromConfigOrMacOSKeychain()?.key;
|
|
231185
|
+
if (!accessToken) {
|
|
231186
|
+
throw new Error("No encuentro credenciales de Theus. Inicia sesi\xF3n con `theus login`.");
|
|
231162
231187
|
}
|
|
231163
231188
|
const orgUUID = await getOrganizationUUID();
|
|
231164
231189
|
if (!orgUUID) {
|
|
231165
|
-
throw new Error("
|
|
231190
|
+
throw new Error("No pude determinar tu organizaci\xF3n. Vuelve a iniciar sesi\xF3n con `theus login`.");
|
|
231166
231191
|
}
|
|
231167
231192
|
return { accessToken, orgUUID };
|
|
231168
231193
|
}
|
|
@@ -231182,7 +231207,8 @@ async function fetchCodeSessionsFromSessionsAPI() {
|
|
|
231182
231207
|
throw new Error(`Failed to fetch code sessions: ${response.statusText}`);
|
|
231183
231208
|
}
|
|
231184
231209
|
const sessions = response.data.data.map((session) => {
|
|
231185
|
-
const
|
|
231210
|
+
const sources = session.session_context?.sources;
|
|
231211
|
+
const gitSource = Array.isArray(sources) ? sources.find((source) => source.type === "git_repository") : undefined;
|
|
231186
231212
|
let repo = null;
|
|
231187
231213
|
if (gitSource?.url) {
|
|
231188
231214
|
const repoPath = parseGitHubRepository(gitSource.url);
|
|
@@ -242958,6 +242984,47 @@ async function publicarImagenLocal(ruta, gateway, signal) {
|
|
|
242958
242984
|
}
|
|
242959
242985
|
return { url: json2.url };
|
|
242960
242986
|
}
|
|
242987
|
+
async function construirReferencias(entradas) {
|
|
242988
|
+
if (entradas.length > MAX_REFERENCIAS) {
|
|
242989
|
+
return {
|
|
242990
|
+
error: `Puedo usar como m\xE1ximo ${MAX_REFERENCIAS} im\xE1genes de referencia y me pasaste ${entradas.length}.`
|
|
242991
|
+
};
|
|
242992
|
+
}
|
|
242993
|
+
const refs = [];
|
|
242994
|
+
for (const bruto of entradas) {
|
|
242995
|
+
const entrada = bruto.trim();
|
|
242996
|
+
if (!entrada)
|
|
242997
|
+
continue;
|
|
242998
|
+
if (/^https?:\/\//i.test(entrada) || entrada.startsWith("data:")) {
|
|
242999
|
+
refs.push({ type: "image_url", image_url: { url: entrada } });
|
|
243000
|
+
continue;
|
|
243001
|
+
}
|
|
243002
|
+
const abs = isAbsolute14(entrada) ? entrada : join69(process.cwd(), entrada);
|
|
243003
|
+
if (!existsSync5(abs)) {
|
|
243004
|
+
return {
|
|
243005
|
+
error: `No encuentro la imagen \xAB${entrada}\xBB. P\xE1same una ruta que exista o un enlace.`
|
|
243006
|
+
};
|
|
243007
|
+
}
|
|
243008
|
+
let datos;
|
|
243009
|
+
try {
|
|
243010
|
+
datos = readFileSync13(abs);
|
|
243011
|
+
} catch (err2) {
|
|
243012
|
+
return { error: `No pude leer \xAB${entrada}\xBB: ${err2.message}` };
|
|
243013
|
+
}
|
|
243014
|
+
let base643 = datos.toString("base64");
|
|
243015
|
+
let mime = MIME_POR_EXT[(abs.split(".").pop() ?? "").toLowerCase()] ?? "image/png";
|
|
243016
|
+
try {
|
|
243017
|
+
const r = await maybeResizeAndDownsampleImageBuffer(datos, datos.length, (abs.split(".").pop() ?? "png").toLowerCase());
|
|
243018
|
+
base643 = r.buffer.toString("base64");
|
|
243019
|
+
mime = `image/${r.mediaType}`;
|
|
243020
|
+
} catch {}
|
|
243021
|
+
refs.push({
|
|
243022
|
+
type: "image_url",
|
|
243023
|
+
image_url: { url: `data:${mime};base64,${base643}` }
|
|
243024
|
+
});
|
|
243025
|
+
}
|
|
243026
|
+
return { refs };
|
|
243027
|
+
}
|
|
242961
243028
|
async function writeMedia(fileName, bytes) {
|
|
242962
243029
|
const cwd2 = process.cwd();
|
|
242963
243030
|
const dir = join69(cwd2, MEDIA_DIR);
|
|
@@ -242990,6 +243057,15 @@ function createTheusMediaAdapter(options2 = {}) {
|
|
|
242990
243057
|
const size = request.params?.size;
|
|
242991
243058
|
if (typeof size === "string" && size)
|
|
242992
243059
|
body.size = size;
|
|
243060
|
+
const refsIn = request.params?.inputImages;
|
|
243061
|
+
if (Array.isArray(refsIn) && refsIn.length) {
|
|
243062
|
+
const construidas = await construirReferencias(refsIn.filter((x2) => typeof x2 === "string"));
|
|
243063
|
+
if ("error" in construidas) {
|
|
243064
|
+
return respond("image", construidas.error, start, imageModel);
|
|
243065
|
+
}
|
|
243066
|
+
if (construidas.refs.length)
|
|
243067
|
+
body.input_references = construidas.refs;
|
|
243068
|
+
}
|
|
242993
243069
|
const res = await fetch(`${gateway.baseURL}/images/generations`, {
|
|
242994
243070
|
method: "POST",
|
|
242995
243071
|
headers: headersFor(gateway),
|
|
@@ -243137,7 +243213,7 @@ Para verla: \`open ${rel}\` (no la leas al contexto).`, start, imageModel, { gat
|
|
|
243137
243213
|
}
|
|
243138
243214
|
};
|
|
243139
243215
|
}
|
|
243140
|
-
var OFFICIAL_PROVIDER_ID = "theus-official", MEDIA_DIR = "theus-media", DEFAULT_IMAGE_MODEL = "theus-image-flash", DEFAULT_VIDEO_MODEL = "theus-video", VIDEO_POLL_MS = 5000, VIDEO_TIMEOUT_MS, PREVIEW_TOKEN_BUDGET = 700, LOGIN_HINT = "Inicia sesi\xF3n con `theus login` para generar im\xE1genes/video con tu suscripci\xF3n.", CAPS3, MIME_POR_EXT;
|
|
243216
|
+
var OFFICIAL_PROVIDER_ID = "theus-official", MEDIA_DIR = "theus-media", DEFAULT_IMAGE_MODEL = "theus-image-flash", DEFAULT_VIDEO_MODEL = "theus-video", VIDEO_POLL_MS = 5000, VIDEO_TIMEOUT_MS, PREVIEW_TOKEN_BUDGET = 700, LOGIN_HINT = "Inicia sesi\xF3n con `theus login` para generar im\xE1genes/video con tu suscripci\xF3n.", CAPS3, MIME_POR_EXT, MAX_REFERENCIAS = 14;
|
|
243141
243217
|
var init_media = __esm(() => {
|
|
243142
243218
|
init_imageResizer();
|
|
243143
243219
|
init_entryApiKey();
|
|
@@ -261721,7 +261797,7 @@ async function resizeShellImageOutput(stdout, outputFilePath, outputFileSize) {
|
|
|
261721
261797
|
return null;
|
|
261722
261798
|
const buf = Buffer.from(parsed.data, "base64");
|
|
261723
261799
|
const ext = parsed.mediaType.split("/")[1] || "png";
|
|
261724
|
-
const resized = await
|
|
261800
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(buf, buf.length, ext);
|
|
261725
261801
|
return `data:image/${resized.mediaType};base64,${resized.buffer.toString("base64")}`;
|
|
261726
261802
|
}
|
|
261727
261803
|
function formatOutput(content) {
|
|
@@ -278486,7 +278562,8 @@ var init_ProviderTool = __esm(() => {
|
|
|
278486
278562
|
combine: exports_external.boolean().optional().describe("Run EVERY enabled provider per capability and fuse them (default: pick the single best)."),
|
|
278487
278563
|
size: exports_external.string().optional().describe('Imagen: resoluci\xF3n/relaci\xF3n como "1024x1024", "1024x1792" (vertical 9:16) o "1792x1024" (horizontal 16:9). Omite para el default del modelo.'),
|
|
278488
278564
|
durationSec: exports_external.number().int().positive().optional().describe("Video: duraci\xF3n del clip en segundos (p.ej. 4, 6, 8). Omite para el default del modelo."),
|
|
278489
|
-
imagenUrl: exports_external.string().optional().describe("Video a partir de una IMAGEN: la imagen que se usar\xE1 como primer fotograma. Acepta un enlace https o la RUTA LOCAL de un archivo (p. ej. la imagen que acabas de generar en theus-media/); en ese caso se publica sola con una URL temporal.")
|
|
278565
|
+
imagenUrl: exports_external.string().optional().describe("Video a partir de una IMAGEN: la imagen que se usar\xE1 como primer fotograma. Acepta un enlace https o la RUTA LOCAL de un archivo (p. ej. la imagen que acabas de generar en theus-media/); en ese caso se publica sola con una URL temporal."),
|
|
278566
|
+
editarImagenes: exports_external.array(exports_external.string()).max(14).optional().describe("EDITAR imagen: rutas locales o enlaces de las im\xE1genes de partida (hasta 14). Con esto el modelo TRANSFORMA lo que le das \u2014retocar, recolorear, cambiar el fondo, combinar varias\u2014 en vez de crear desde cero. El prompt debe describir el CAMBIO que quieres, no la escena entera.")
|
|
278490
278567
|
}));
|
|
278491
278568
|
ProviderTool = buildTool({
|
|
278492
278569
|
name: PROVIDER_TOOL_NAME,
|
|
@@ -278520,8 +278597,11 @@ var init_ProviderTool = __esm(() => {
|
|
|
278520
278597
|
async call(input, context2) {
|
|
278521
278598
|
const router = new Router(getRegistry());
|
|
278522
278599
|
const params = {};
|
|
278523
|
-
if (typeof input.size === "string" && input.size) {
|
|
278524
|
-
params.image = {
|
|
278600
|
+
if (typeof input.size === "string" && input.size || input.editarImagenes?.length) {
|
|
278601
|
+
params.image = {
|
|
278602
|
+
...typeof input.size === "string" && input.size ? { size: input.size } : {},
|
|
278603
|
+
...input.editarImagenes?.length ? { inputImages: input.editarImagenes } : {}
|
|
278604
|
+
};
|
|
278525
278605
|
}
|
|
278526
278606
|
if (typeof input.durationSec === "number" || input.imagenUrl) {
|
|
278527
278607
|
params.video = {
|
|
@@ -279394,7 +279474,7 @@ async function captura() {
|
|
|
279394
279474
|
await writeFile27(ruta, bruto);
|
|
279395
279475
|
setEstadoNavegador({ estado: "listo", capturaPath: ruta, mensaje: undefined });
|
|
279396
279476
|
try {
|
|
279397
|
-
const r = await
|
|
279477
|
+
const r = await maybeResizeAndDownsampleImageBuffer2(bruto, bruto.length, "png");
|
|
279398
279478
|
return {
|
|
279399
279479
|
ruta,
|
|
279400
279480
|
base64: r.buffer.toString("base64"),
|
|
@@ -304861,9 +304941,9 @@ function getTheusEnvMetadata() {
|
|
|
304861
304941
|
};
|
|
304862
304942
|
}
|
|
304863
304943
|
function getBuildAgeMinutes() {
|
|
304864
|
-
if (!{ VERSION: "0.2.
|
|
304944
|
+
if (!{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)
|
|
304865
304945
|
return;
|
|
304866
|
-
const buildTime = new Date({ VERSION: "0.2.
|
|
304946
|
+
const buildTime = new Date({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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();
|
|
304867
304947
|
if (isNaN(buildTime))
|
|
304868
304948
|
return;
|
|
304869
304949
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -309735,7 +309815,7 @@ async function callInner(file_path, fullFilePath, resolvedFilePath, ext, offset,
|
|
|
309735
309815
|
const imageBlocks = await Promise.all(imageFiles.map(async (f) => {
|
|
309736
309816
|
const imgPath = path14.join(extractResult.data.file.outputDir, f);
|
|
309737
309817
|
const imgBuffer = await readFileAsync(imgPath);
|
|
309738
|
-
const resized = await
|
|
309818
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imgBuffer, imgBuffer.length, "jpeg");
|
|
309739
309819
|
return {
|
|
309740
309820
|
type: "image",
|
|
309741
309821
|
source: {
|
|
@@ -309870,7 +309950,7 @@ async function readImageWithTokenBudget(filePath, maxTokens = getDefaultFileRead
|
|
|
309870
309950
|
const detectedFormat = detectedMediaType.split("/")[1] || "png";
|
|
309871
309951
|
let result;
|
|
309872
309952
|
try {
|
|
309873
|
-
const resized = await
|
|
309953
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, originalSize, detectedFormat);
|
|
309874
309954
|
result = createImageResponse(resized.buffer, resized.mediaType, originalSize, resized.dimensions);
|
|
309875
309955
|
} catch (e) {
|
|
309876
309956
|
if (e instanceof ImageResizeError)
|
|
@@ -321511,7 +321591,7 @@ function getAssistantMessageFromError(error40, model, options2) {
|
|
|
321511
321591
|
if (process.env.USER_TYPE === "ant") {
|
|
321512
321592
|
const baseMessage = `API Error: 400 ${error40.message}
|
|
321513
321593
|
|
|
321514
|
-
Run /share and post the JSON file to ${{ VERSION: "0.2.
|
|
321594
|
+
Run /share and post the JSON file to ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
|
|
321515
321595
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
321516
321596
|
return createAssistantAPIErrorMessage({
|
|
321517
321597
|
content: baseMessage + rewindInstruction,
|
|
@@ -321547,7 +321627,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.47", BUILD_TIME: "1970-01
|
|
|
321547
321627
|
if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
|
|
321548
321628
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
321549
321629
|
const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
321550
|
-
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.
|
|
321630
|
+
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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.`;
|
|
321551
321631
|
return createAssistantAPIErrorMessage({
|
|
321552
321632
|
content: msg,
|
|
321553
321633
|
error: "invalid_request"
|
|
@@ -331720,7 +331800,7 @@ function buildPrimarySection() {
|
|
|
331720
331800
|
});
|
|
331721
331801
|
return [{
|
|
331722
331802
|
label: "Version",
|
|
331723
|
-
value: { VERSION: "0.2.
|
|
331803
|
+
value: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
331724
331804
|
}, {
|
|
331725
331805
|
label: "Session name",
|
|
331726
331806
|
value: nameValue
|
|
@@ -335536,7 +335616,7 @@ function Config({
|
|
|
335536
335616
|
}
|
|
335537
335617
|
})
|
|
335538
335618
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime188.jsx(ChannelDowngradeDialog, {
|
|
335539
|
-
currentVersion: { VERSION: "0.2.
|
|
335619
|
+
currentVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
335540
335620
|
onChoice: (choice) => {
|
|
335541
335621
|
setShowSubmenu(null);
|
|
335542
335622
|
setTabsHidden(false);
|
|
@@ -335548,7 +335628,7 @@ function Config({
|
|
|
335548
335628
|
autoUpdatesChannel: "stable"
|
|
335549
335629
|
};
|
|
335550
335630
|
if (choice === "stay") {
|
|
335551
|
-
newSettings.minimumVersion = { VERSION: "0.2.
|
|
335631
|
+
newSettings.minimumVersion = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
335552
335632
|
}
|
|
335553
335633
|
updateSettingsForSource("userSettings", newSettings);
|
|
335554
335634
|
setSettingsData((prev_27) => ({
|
|
@@ -343582,7 +343662,7 @@ function HelpV2(t0) {
|
|
|
343582
343662
|
let t6;
|
|
343583
343663
|
if ($2[31] !== tabs) {
|
|
343584
343664
|
t6 = /* @__PURE__ */ jsx_runtime215.jsx(Tabs, {
|
|
343585
|
-
title: `Theus v${{ VERSION: "0.2.
|
|
343665
|
+
title: `Theus v${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`,
|
|
343586
343666
|
color: "professionalBlue",
|
|
343587
343667
|
defaultTab: "general",
|
|
343588
343668
|
children: tabs
|
|
@@ -361706,7 +361786,7 @@ function Onboarding({
|
|
|
361706
361786
|
flexDirection: "column",
|
|
361707
361787
|
children: [
|
|
361708
361788
|
/* @__PURE__ */ jsx_runtime248.jsx(TheusBanner, {
|
|
361709
|
-
version: { VERSION: "0.2.
|
|
361789
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
361710
361790
|
}),
|
|
361711
361791
|
/* @__PURE__ */ jsx_runtime248.jsxs(ThemedBox_default, {
|
|
361712
361792
|
flexDirection: "column",
|
|
@@ -362207,9 +362287,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
362207
362287
|
return [];
|
|
362208
362288
|
}
|
|
362209
362289
|
}
|
|
362210
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.
|
|
362290
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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) {
|
|
362211
362291
|
if (process.env.USER_TYPE === "ant") {
|
|
362212
|
-
const changelog = { VERSION: "0.2.
|
|
362292
|
+
const changelog = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
362213
362293
|
if (changelog) {
|
|
362214
362294
|
const commits = changelog.trim().split(`
|
|
362215
362295
|
`).filter(Boolean);
|
|
@@ -366411,7 +366491,7 @@ var init_Messages = __esm(() => {
|
|
|
366411
366491
|
let t1;
|
|
366412
366492
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
366413
366493
|
t1 = /* @__PURE__ */ jsx_runtime260.jsx(TheusSessionHeader, {
|
|
366414
|
-
version: { VERSION: "0.2.
|
|
366494
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
366415
366495
|
});
|
|
366416
366496
|
$2[0] = t1;
|
|
366417
366497
|
} else {
|
|
@@ -381007,10 +381087,13 @@ var call38 = async () => {
|
|
|
381007
381087
|
try {
|
|
381008
381088
|
const { fetchCodeSessionsFromSessionsAPI: fetchCodeSessionsFromSessionsAPI2 } = await Promise.resolve().then(() => (init_api3(), exports_api));
|
|
381009
381089
|
sessions = await fetchCodeSessionsFromSessionsAPI2();
|
|
381010
|
-
} catch {
|
|
381090
|
+
} catch (err2) {
|
|
381091
|
+
const detalle = err2 instanceof Error ? err2.message : String(err2);
|
|
381011
381092
|
return {
|
|
381012
381093
|
type: "text",
|
|
381013
|
-
value:
|
|
381094
|
+
value: `No pude leer tus sesiones remotas.
|
|
381095
|
+
|
|
381096
|
+
${detalle}`
|
|
381014
381097
|
};
|
|
381015
381098
|
}
|
|
381016
381099
|
if (!sessions.length) {
|
|
@@ -381039,6 +381122,7 @@ var init_teleport2 = __esm(() => {
|
|
|
381039
381122
|
teleport = {
|
|
381040
381123
|
type: "local",
|
|
381041
381124
|
name: "teleport",
|
|
381125
|
+
aliases: ["teletransportador"],
|
|
381042
381126
|
description: "Lista tus sesiones remotas de c\xF3digo y c\xF3mo reanudarlas",
|
|
381043
381127
|
isEnabled: () => true,
|
|
381044
381128
|
isHidden: false,
|
|
@@ -394883,7 +394967,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
394883
394967
|
smapsRollup,
|
|
394884
394968
|
platform: process.platform,
|
|
394885
394969
|
nodeVersion: process.version,
|
|
394886
|
-
ccVersion: { VERSION: "0.2.
|
|
394970
|
+
ccVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
394887
394971
|
};
|
|
394888
394972
|
}
|
|
394889
394973
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -395469,7 +395553,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
395469
395553
|
var call58 = async () => {
|
|
395470
395554
|
return {
|
|
395471
395555
|
type: "text",
|
|
395472
|
-
value: { VERSION: "0.2.
|
|
395556
|
+
value: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
395473
395557
|
};
|
|
395474
395558
|
}, version2, version_default;
|
|
395475
395559
|
var init_version = __esm(() => {
|
|
@@ -399911,13 +399995,13 @@ async function updateReleaseBundle() {
|
|
|
399911
399995
|
await gracefulShutdown(1);
|
|
399912
399996
|
return;
|
|
399913
399997
|
}
|
|
399914
|
-
if (gte({ VERSION: "0.2.
|
|
399915
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
399998
|
+
if (gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
399999
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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})`) + `
|
|
399916
400000
|
`);
|
|
399917
400001
|
await gracefulShutdown(0);
|
|
399918
400002
|
return;
|
|
399919
400003
|
}
|
|
399920
|
-
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.
|
|
400004
|
+
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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})
|
|
399921
400005
|
`);
|
|
399922
400006
|
writeToStdout(`Installing update from theus.pe/dl...
|
|
399923
400007
|
`);
|
|
@@ -399951,7 +400035,7 @@ async function updateReleaseBundle() {
|
|
|
399951
400035
|
return;
|
|
399952
400036
|
}
|
|
399953
400037
|
cpSync(staged, bundleDir, { recursive: true, force: true });
|
|
399954
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400038
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`) + `
|
|
399955
400039
|
`);
|
|
399956
400040
|
await regenerateCompletionCache();
|
|
399957
400041
|
} finally {
|
|
@@ -399964,7 +400048,7 @@ async function updateReleaseBundle() {
|
|
|
399964
400048
|
async function update() {
|
|
399965
400049
|
logEvent("tengu_update_check", {});
|
|
399966
400050
|
await updateNaupa();
|
|
399967
|
-
writeToStdout(`Current version: ${{ VERSION: "0.2.
|
|
400051
|
+
writeToStdout(`Current version: ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
399968
400052
|
`);
|
|
399969
400053
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
399970
400054
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -400043,8 +400127,8 @@ async function update() {
|
|
|
400043
400127
|
writeToStdout(`Theus is managed by Homebrew.
|
|
400044
400128
|
`);
|
|
400045
400129
|
const latest = await getLatestVersion(channel2);
|
|
400046
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400047
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
400130
|
+
if (latest && !gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
400131
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400048
400132
|
`);
|
|
400049
400133
|
writeToStdout(`
|
|
400050
400134
|
`);
|
|
@@ -400060,8 +400144,8 @@ async function update() {
|
|
|
400060
400144
|
writeToStdout(`Theus is managed by winget.
|
|
400061
400145
|
`);
|
|
400062
400146
|
const latest = await getLatestVersion(channel2);
|
|
400063
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400064
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
400147
|
+
if (latest && !gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
400148
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400065
400149
|
`);
|
|
400066
400150
|
writeToStdout(`
|
|
400067
400151
|
`);
|
|
@@ -400077,8 +400161,8 @@ async function update() {
|
|
|
400077
400161
|
writeToStdout(`Theus is managed by apk.
|
|
400078
400162
|
`);
|
|
400079
400163
|
const latest = await getLatestVersion(channel2);
|
|
400080
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400081
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
400164
|
+
if (latest && !gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
400165
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400082
400166
|
`);
|
|
400083
400167
|
writeToStdout(`
|
|
400084
400168
|
`);
|
|
@@ -400143,11 +400227,11 @@ async function update() {
|
|
|
400143
400227
|
`);
|
|
400144
400228
|
await gracefulShutdown(1);
|
|
400145
400229
|
}
|
|
400146
|
-
if (result.latestVersion === { VERSION: "0.2.
|
|
400147
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
400230
|
+
if (result.latestVersion === { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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) {
|
|
400231
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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})`) + `
|
|
400148
400232
|
`);
|
|
400149
400233
|
} else {
|
|
400150
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400234
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`) + `
|
|
400151
400235
|
`);
|
|
400152
400236
|
await regenerateCompletionCache();
|
|
400153
400237
|
}
|
|
@@ -400166,9 +400250,9 @@ async function update() {
|
|
|
400166
400250
|
await removeInstalledSymlink();
|
|
400167
400251
|
}
|
|
400168
400252
|
logForDebugging("update: Checking npm registry for latest version");
|
|
400169
|
-
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.
|
|
400253
|
+
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
400170
400254
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
400171
|
-
const npmCommand = `npm view ${{ VERSION: "0.2.
|
|
400255
|
+
const npmCommand = `npm view ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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`;
|
|
400172
400256
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
400173
400257
|
const latestVersion = await getLatestVersion(channel2);
|
|
400174
400258
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -400188,7 +400272,7 @@ async function update() {
|
|
|
400188
400272
|
`);
|
|
400189
400273
|
process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
|
|
400190
400274
|
`);
|
|
400191
|
-
if ({ VERSION: "0.2.
|
|
400275
|
+
if ({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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")) {
|
|
400192
400276
|
process.stderr.write(` \u2022 Internal/development build not published to npm
|
|
400193
400277
|
`);
|
|
400194
400278
|
}
|
|
@@ -400200,19 +400284,19 @@ async function update() {
|
|
|
400200
400284
|
`);
|
|
400201
400285
|
process.stderr.write(` \u2022 Run with --debug flag for more details
|
|
400202
400286
|
`);
|
|
400203
|
-
const packageName = { VERSION: "0.2.
|
|
400287
|
+
const packageName = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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");
|
|
400204
400288
|
process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
|
|
400205
400289
|
`);
|
|
400206
400290
|
process.stderr.write(` \u2022 Check if you need to login: npm whoami
|
|
400207
400291
|
`);
|
|
400208
400292
|
await gracefulShutdown(1);
|
|
400209
400293
|
}
|
|
400210
|
-
if (gte({ VERSION: "0.2.
|
|
400211
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
400294
|
+
if (gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
400295
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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})`) + `
|
|
400212
400296
|
`);
|
|
400213
400297
|
await gracefulShutdown(0);
|
|
400214
400298
|
}
|
|
400215
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.
|
|
400299
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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})
|
|
400216
400300
|
`);
|
|
400217
400301
|
writeToStdout(`Installing update...
|
|
400218
400302
|
`);
|
|
@@ -400257,7 +400341,7 @@ async function update() {
|
|
|
400257
400341
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
400258
400342
|
switch (status2) {
|
|
400259
400343
|
case "success":
|
|
400260
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400344
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`) + `
|
|
400261
400345
|
`);
|
|
400262
400346
|
await regenerateCompletionCache();
|
|
400263
400347
|
break;
|
|
@@ -400267,7 +400351,7 @@ async function update() {
|
|
|
400267
400351
|
if (useLocalUpdate) {
|
|
400268
400352
|
process.stderr.write(`Try manually updating with:
|
|
400269
400353
|
`);
|
|
400270
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
400354
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400271
400355
|
`);
|
|
400272
400356
|
} else {
|
|
400273
400357
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -400283,7 +400367,7 @@ async function update() {
|
|
|
400283
400367
|
if (useLocalUpdate) {
|
|
400284
400368
|
process.stderr.write(`Try manually updating with:
|
|
400285
400369
|
`);
|
|
400286
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
400370
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400287
400371
|
`);
|
|
400288
400372
|
} else {
|
|
400289
400373
|
process.stderr.write(`Or consider using native installation with: theus install
|
|
@@ -409366,7 +409450,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
409366
409450
|
init_settings2();
|
|
409367
409451
|
init_slowOperations();
|
|
409368
409452
|
init_uuid();
|
|
409369
|
-
VERSION4 = { VERSION: "0.2.
|
|
409453
|
+
VERSION4 = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
409370
409454
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
409371
409455
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
409372
409456
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -410571,7 +410655,7 @@ var init_filesystem = __esm(() => {
|
|
|
410571
410655
|
});
|
|
410572
410656
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
410573
410657
|
const nonce = randomBytes21(16).toString("hex");
|
|
410574
|
-
return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.
|
|
410658
|
+
return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
410575
410659
|
});
|
|
410576
410660
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
410577
410661
|
});
|
|
@@ -415750,7 +415834,7 @@ function getSimpleDoingTasksSection() {
|
|
|
415750
415834
|
];
|
|
415751
415835
|
const userHelpSubitems = [
|
|
415752
415836
|
`/help: Get help with using Theus`,
|
|
415753
|
-
`To give feedback, users should ${{ VERSION: "0.2.
|
|
415837
|
+
`To give feedback, users should ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
415754
415838
|
];
|
|
415755
415839
|
const items = [
|
|
415756
415840
|
`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.`,
|
|
@@ -416650,7 +416734,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
416650
416734
|
}
|
|
416651
416735
|
function computeFingerprintFromMessages(messages) {
|
|
416652
416736
|
const firstMessageText = extractFirstMessageText(messages);
|
|
416653
|
-
return computeFingerprint(firstMessageText, { VERSION: "0.2.
|
|
416737
|
+
return computeFingerprint(firstMessageText, { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
416654
416738
|
}
|
|
416655
416739
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
416656
416740
|
var init_fingerprint = () => {};
|
|
@@ -419210,7 +419294,7 @@ async function sideQuery(opts) {
|
|
|
419210
419294
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
419211
419295
|
}
|
|
419212
419296
|
const messageText = extractFirstUserMessageText(messages);
|
|
419213
|
-
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.
|
|
419297
|
+
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
419214
419298
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
419215
419299
|
const systemBlocks = [
|
|
419216
419300
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -420513,7 +420597,7 @@ async function handleMemories(state) {
|
|
|
420513
420597
|
async function runProjectContextMcpServer() {
|
|
420514
420598
|
const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
|
|
420515
420599
|
const state = new ProjectContextState(projectRoot);
|
|
420516
|
-
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.
|
|
420600
|
+
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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: {} } });
|
|
420517
420601
|
server2.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
420518
420602
|
tools: TOOL_DEFINITIONS.map((t) => ({
|
|
420519
420603
|
name: t.name,
|
|
@@ -422493,7 +422577,7 @@ function createBridgeLogger(options2) {
|
|
|
422493
422577
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
422494
422578
|
regenerateQr(connectUrl);
|
|
422495
422579
|
if (verbose) {
|
|
422496
|
-
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.
|
|
422580
|
+
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
422497
422581
|
`);
|
|
422498
422582
|
}
|
|
422499
422583
|
if (verbose) {
|
|
@@ -423466,7 +423550,7 @@ function appendToLog(path19, message) {
|
|
|
423466
423550
|
cwd: getFsImplementation().cwd(),
|
|
423467
423551
|
userType: process.env.USER_TYPE,
|
|
423468
423552
|
sessionId: getSessionId(),
|
|
423469
|
-
version: { VERSION: "0.2.
|
|
423553
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
423470
423554
|
};
|
|
423471
423555
|
getLogWriter(path19).write(messageWithTimestamp);
|
|
423472
423556
|
}
|
|
@@ -424736,7 +424820,7 @@ Spawn mode for this project:
|
|
|
424736
424820
|
const api2 = createBridgeApiClient({
|
|
424737
424821
|
baseUrl,
|
|
424738
424822
|
getAccessToken: getBridgeAccessToken2,
|
|
424739
|
-
runnerVersion: { VERSION: "0.2.
|
|
424823
|
+
runnerVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
424740
424824
|
onDebug: logForDebugging,
|
|
424741
424825
|
onAuth401: handleOAuth401Error2,
|
|
424742
424826
|
getTrustedDeviceToken
|
|
@@ -424974,7 +425058,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
424974
425058
|
const api2 = createBridgeApiClient({
|
|
424975
425059
|
baseUrl,
|
|
424976
425060
|
getAccessToken: opts.getAccessToken,
|
|
424977
|
-
runnerVersion: { VERSION: "0.2.
|
|
425061
|
+
runnerVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
424978
425062
|
onDebug: log2,
|
|
424979
425063
|
onAuth401: opts.onAuth401,
|
|
424980
425064
|
getTrustedDeviceToken
|
|
@@ -429038,7 +429122,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
429038
429122
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
429039
429123
|
apiKeySource: getTheusApiKeyWithSource().source,
|
|
429040
429124
|
betas: getSdkBetas(),
|
|
429041
|
-
theus_code_version: { VERSION: "0.2.
|
|
429125
|
+
theus_code_version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
429042
429126
|
output_style: outputStyle2,
|
|
429043
429127
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
429044
429128
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -429078,8 +429162,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
429078
429162
|
}
|
|
429079
429163
|
async function checkEnvLessBridgeMinVersion() {
|
|
429080
429164
|
const cfg = await getEnvLessBridgeConfig();
|
|
429081
|
-
if (cfg.min_version && lt({ VERSION: "0.2.
|
|
429082
|
-
return `Your version of Theus (${{ VERSION: "0.2.
|
|
429165
|
+
if (cfg.min_version && lt({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
429166
|
+
return `Your version of Theus (${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.
|
|
429083
429167
|
Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
|
|
429084
429168
|
}
|
|
429085
429169
|
return null;
|
|
@@ -431402,7 +431486,7 @@ async function initBridgeCore(params) {
|
|
|
431402
431486
|
const rawApi = createBridgeApiClient({
|
|
431403
431487
|
baseUrl,
|
|
431404
431488
|
getAccessToken,
|
|
431405
|
-
runnerVersion: { VERSION: "0.2.
|
|
431489
|
+
runnerVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
431406
431490
|
onDebug: logForDebugging,
|
|
431407
431491
|
onAuth401,
|
|
431408
431492
|
getTrustedDeviceToken
|
|
@@ -448143,7 +448227,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
448143
448227
|
function getSemverPart(version3) {
|
|
448144
448228
|
return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
|
|
448145
448229
|
}
|
|
448146
|
-
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.
|
|
448230
|
+
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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) {
|
|
448147
448231
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react231.useState(() => getSemverPart(initialVersion));
|
|
448148
448232
|
if (!updatedVersion) {
|
|
448149
448233
|
return null;
|
|
@@ -448183,7 +448267,7 @@ function AutoUpdater({
|
|
|
448183
448267
|
return;
|
|
448184
448268
|
}
|
|
448185
448269
|
if (false) {}
|
|
448186
|
-
const currentVersion = { VERSION: "0.2.
|
|
448270
|
+
const currentVersion = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
448187
448271
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
448188
448272
|
let latestVersion = await getLatestVersion(channel2);
|
|
448189
448273
|
const isDisabled2 = isAutoUpdaterDisabled();
|
|
@@ -448319,7 +448403,7 @@ function AutoUpdater({
|
|
|
448319
448403
|
" ",
|
|
448320
448404
|
/* @__PURE__ */ jsx_runtime405.jsx(ThemedText, {
|
|
448321
448405
|
bold: true,
|
|
448322
|
-
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
448406
|
+
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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.49", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
448323
448407
|
})
|
|
448324
448408
|
]
|
|
448325
448409
|
})
|
|
@@ -448396,12 +448480,12 @@ function NativeAutoUpdater({
|
|
|
448396
448480
|
logEvent("tengu_native_auto_updater_start", {});
|
|
448397
448481
|
try {
|
|
448398
448482
|
const maxVersion = await getMaxVersion();
|
|
448399
|
-
if (maxVersion && gt({ VERSION: "0.2.
|
|
448483
|
+
if (maxVersion && gt({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
448400
448484
|
const msg = await getMaxVersionMessage();
|
|
448401
448485
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
448402
448486
|
}
|
|
448403
448487
|
const result = await installLatest(channel2);
|
|
448404
|
-
const currentVersion = { VERSION: "0.2.
|
|
448488
|
+
const currentVersion = { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
448405
448489
|
const latencyMs = Date.now() - startTime2;
|
|
448406
448490
|
if (result.lockFailed) {
|
|
448407
448491
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -448538,17 +448622,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448538
448622
|
const maxVersion = await getMaxVersion();
|
|
448539
448623
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
448540
448624
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
448541
|
-
if (gte({ VERSION: "0.2.
|
|
448542
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.
|
|
448625
|
+
if (gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)) {
|
|
448626
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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`);
|
|
448543
448627
|
setUpdateAvailable(false);
|
|
448544
448628
|
return;
|
|
448545
448629
|
}
|
|
448546
448630
|
latest = maxVersion;
|
|
448547
448631
|
}
|
|
448548
|
-
const hasUpdate = latest && !gte({ VERSION: "0.2.
|
|
448632
|
+
const hasUpdate = latest && !gte({ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
448549
448633
|
setUpdateAvailable(!!hasUpdate);
|
|
448550
448634
|
if (hasUpdate) {
|
|
448551
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.
|
|
448635
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
448552
448636
|
}
|
|
448553
448637
|
};
|
|
448554
448638
|
$2[0] = t1;
|
|
@@ -448582,7 +448666,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448582
448666
|
wrap: "truncate",
|
|
448583
448667
|
children: [
|
|
448584
448668
|
"currentVersion: ",
|
|
448585
|
-
{ VERSION: "0.2.
|
|
448669
|
+
{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
448586
448670
|
]
|
|
448587
448671
|
});
|
|
448588
448672
|
$2[3] = verbose;
|
|
@@ -456455,7 +456539,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
456455
456539
|
project_dir: getOriginalCwd(),
|
|
456456
456540
|
added_dirs: addedDirs
|
|
456457
456541
|
},
|
|
456458
|
-
version: { VERSION: "0.2.
|
|
456542
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
456459
456543
|
output_style: {
|
|
456460
456544
|
name: outputStyleName
|
|
456461
456545
|
},
|
|
@@ -458231,13 +458315,6 @@ function PromptInputFooter({
|
|
|
458231
458315
|
})
|
|
458232
458316
|
]
|
|
458233
458317
|
}),
|
|
458234
|
-
mode === "prompt" && !isShort && !isSearching && /* @__PURE__ */ jsx_runtime433.jsx(ThemedBox_default, {
|
|
458235
|
-
marginTop: 1,
|
|
458236
|
-
width: "100%",
|
|
458237
|
-
children: /* @__PURE__ */ jsx_runtime433.jsx(TheusEditorialRail, {
|
|
458238
|
-
compact: columns < 118
|
|
458239
|
-
})
|
|
458240
|
-
}),
|
|
458241
458318
|
false
|
|
458242
458319
|
]
|
|
458243
458320
|
});
|
|
@@ -458293,7 +458370,6 @@ var init_PromptInputFooter = __esm(() => {
|
|
|
458293
458370
|
init_PromptInputFooterLeftSide();
|
|
458294
458371
|
init_PromptInputFooterSuggestions();
|
|
458295
458372
|
init_PromptInputHelpMenu();
|
|
458296
|
-
init_TheusEditorialRail();
|
|
458297
458373
|
import_react259 = __toESM(require_react(), 1);
|
|
458298
458374
|
jsx_runtime433 = __toESM(require_jsx_runtime(), 1);
|
|
458299
458375
|
PromptInputFooter_default = import_react259.memo(PromptInputFooter);
|
|
@@ -460548,6 +460624,13 @@ function PromptInput({
|
|
|
460548
460624
|
marginTop: briefOwnsGap ? 0 : 1,
|
|
460549
460625
|
children: [
|
|
460550
460626
|
!isFullscreenEnvEnabled() && /* @__PURE__ */ jsx_runtime437.jsx(PromptInputQueuedCommands, {}),
|
|
460627
|
+
mode === "prompt" && !isSearchingHistory && /* @__PURE__ */ jsx_runtime437.jsx(ThemedBox_default, {
|
|
460628
|
+
marginBottom: 1,
|
|
460629
|
+
width: "100%",
|
|
460630
|
+
children: /* @__PURE__ */ jsx_runtime437.jsx(TheusEditorialRail, {
|
|
460631
|
+
compact: columns < 118
|
|
460632
|
+
})
|
|
460633
|
+
}),
|
|
460551
460634
|
hasSuppressedDialogs && /* @__PURE__ */ jsx_runtime437.jsx(ThemedBox_default, {
|
|
460552
460635
|
marginTop: 1,
|
|
460553
460636
|
marginLeft: 2,
|
|
@@ -460811,6 +460894,7 @@ var init_PromptInput = __esm(() => {
|
|
|
460811
460894
|
init_TeamsDialog();
|
|
460812
460895
|
init_VimTextInput();
|
|
460813
460896
|
init_Notifications();
|
|
460897
|
+
init_TheusEditorialRail();
|
|
460814
460898
|
init_PromptInputFooter();
|
|
460815
460899
|
init_PromptInputModeIndicator();
|
|
460816
460900
|
init_PromptInputQueuedCommands();
|
|
@@ -467875,7 +467959,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
467875
467959
|
} catch {}
|
|
467876
467960
|
const data = {
|
|
467877
467961
|
trigger,
|
|
467878
|
-
version: { VERSION: "0.2.
|
|
467962
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
467879
467963
|
platform: process.platform,
|
|
467880
467964
|
transcript,
|
|
467881
467965
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -480882,7 +480966,7 @@ function completeOnboarding() {
|
|
|
480882
480966
|
saveGlobalConfig((current) => ({
|
|
480883
480967
|
...current,
|
|
480884
480968
|
hasCompletedOnboarding: true,
|
|
480885
|
-
lastOnboardingVersion: { VERSION: "0.2.
|
|
480969
|
+
lastOnboardingVersion: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
480886
480970
|
}));
|
|
480887
480971
|
}
|
|
480888
480972
|
function showDialog(root2, renderer) {
|
|
@@ -491880,7 +491964,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
|
|
|
491880
491964
|
setCwd(cwd3);
|
|
491881
491965
|
const server2 = new Server({
|
|
491882
491966
|
name: "theus/tengu",
|
|
491883
|
-
version: { VERSION: "0.2.
|
|
491967
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
491884
491968
|
}, {
|
|
491885
491969
|
capabilities: {
|
|
491886
491970
|
tools: {}
|
|
@@ -493322,7 +493406,7 @@ async function setupTokenHandler(root2) {
|
|
|
493322
493406
|
gap: 1,
|
|
493323
493407
|
children: [
|
|
493324
493408
|
/* @__PURE__ */ jsx_runtime492.jsx(TheusBanner, {
|
|
493325
|
-
version: { VERSION: "0.2.
|
|
493409
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
493326
493410
|
}),
|
|
493327
493411
|
showAuthWarning && /* @__PURE__ */ jsx_runtime492.jsxs(ThemedBox_default, {
|
|
493328
493412
|
flexDirection: "column",
|
|
@@ -494804,7 +494888,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
494804
494888
|
}
|
|
494805
494889
|
}
|
|
494806
494890
|
logForDiagnosticsNoPII("info", "started", {
|
|
494807
|
-
version: { VERSION: "0.2.
|
|
494891
|
+
version: { VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
494808
494892
|
is_native_binary: isInBundledMode()
|
|
494809
494893
|
});
|
|
494810
494894
|
registerCleanup(async () => {
|
|
@@ -495672,7 +495756,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
495672
495756
|
pendingHookMessages
|
|
495673
495757
|
}, renderAndRun);
|
|
495674
495758
|
}
|
|
495675
|
-
}).version(`${{ VERSION: "0.2.
|
|
495759
|
+
}).version(`${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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");
|
|
495676
495760
|
program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
|
|
495677
495761
|
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.");
|
|
495678
495762
|
if (canUserConfigureAdvisor()) {
|
|
@@ -496224,7 +496308,7 @@ if (false) {}
|
|
|
496224
496308
|
async function main2() {
|
|
496225
496309
|
const args = process.argv.slice(2);
|
|
496226
496310
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
496227
|
-
console.log(`${{ VERSION: "0.2.
|
|
496311
|
+
console.log(`${{ VERSION: "0.2.49", BUILD_TIME: "1970-01-01T00:00:00.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)`);
|
|
496228
496312
|
return;
|
|
496229
496313
|
}
|
|
496230
496314
|
const {
|