theus-cli 0.2.48 → 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 +203 -135
- 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,16 @@ 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
|
+
},
|
|
230072
230086
|
{
|
|
230073
230087
|
version: "v0.2.48",
|
|
230074
230088
|
fecha: "2026-07-24",
|
|
@@ -242970,6 +242984,47 @@ async function publicarImagenLocal(ruta, gateway, signal) {
|
|
|
242970
242984
|
}
|
|
242971
242985
|
return { url: json2.url };
|
|
242972
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
|
+
}
|
|
242973
243028
|
async function writeMedia(fileName, bytes) {
|
|
242974
243029
|
const cwd2 = process.cwd();
|
|
242975
243030
|
const dir = join69(cwd2, MEDIA_DIR);
|
|
@@ -243002,6 +243057,15 @@ function createTheusMediaAdapter(options2 = {}) {
|
|
|
243002
243057
|
const size = request.params?.size;
|
|
243003
243058
|
if (typeof size === "string" && size)
|
|
243004
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
|
+
}
|
|
243005
243069
|
const res = await fetch(`${gateway.baseURL}/images/generations`, {
|
|
243006
243070
|
method: "POST",
|
|
243007
243071
|
headers: headersFor(gateway),
|
|
@@ -243149,7 +243213,7 @@ Para verla: \`open ${rel}\` (no la leas al contexto).`, start, imageModel, { gat
|
|
|
243149
243213
|
}
|
|
243150
243214
|
};
|
|
243151
243215
|
}
|
|
243152
|
-
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;
|
|
243153
243217
|
var init_media = __esm(() => {
|
|
243154
243218
|
init_imageResizer();
|
|
243155
243219
|
init_entryApiKey();
|
|
@@ -261733,7 +261797,7 @@ async function resizeShellImageOutput(stdout, outputFilePath, outputFileSize) {
|
|
|
261733
261797
|
return null;
|
|
261734
261798
|
const buf = Buffer.from(parsed.data, "base64");
|
|
261735
261799
|
const ext = parsed.mediaType.split("/")[1] || "png";
|
|
261736
|
-
const resized = await
|
|
261800
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(buf, buf.length, ext);
|
|
261737
261801
|
return `data:image/${resized.mediaType};base64,${resized.buffer.toString("base64")}`;
|
|
261738
261802
|
}
|
|
261739
261803
|
function formatOutput(content) {
|
|
@@ -278498,7 +278562,8 @@ var init_ProviderTool = __esm(() => {
|
|
|
278498
278562
|
combine: exports_external.boolean().optional().describe("Run EVERY enabled provider per capability and fuse them (default: pick the single best)."),
|
|
278499
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.'),
|
|
278500
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."),
|
|
278501
|
-
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.")
|
|
278502
278567
|
}));
|
|
278503
278568
|
ProviderTool = buildTool({
|
|
278504
278569
|
name: PROVIDER_TOOL_NAME,
|
|
@@ -278532,8 +278597,11 @@ var init_ProviderTool = __esm(() => {
|
|
|
278532
278597
|
async call(input, context2) {
|
|
278533
278598
|
const router = new Router(getRegistry());
|
|
278534
278599
|
const params = {};
|
|
278535
|
-
if (typeof input.size === "string" && input.size) {
|
|
278536
|
-
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
|
+
};
|
|
278537
278605
|
}
|
|
278538
278606
|
if (typeof input.durationSec === "number" || input.imagenUrl) {
|
|
278539
278607
|
params.video = {
|
|
@@ -279406,7 +279474,7 @@ async function captura() {
|
|
|
279406
279474
|
await writeFile27(ruta, bruto);
|
|
279407
279475
|
setEstadoNavegador({ estado: "listo", capturaPath: ruta, mensaje: undefined });
|
|
279408
279476
|
try {
|
|
279409
|
-
const r = await
|
|
279477
|
+
const r = await maybeResizeAndDownsampleImageBuffer2(bruto, bruto.length, "png");
|
|
279410
279478
|
return {
|
|
279411
279479
|
ruta,
|
|
279412
279480
|
base64: r.buffer.toString("base64"),
|
|
@@ -304873,9 +304941,9 @@ function getTheusEnvMetadata() {
|
|
|
304873
304941
|
};
|
|
304874
304942
|
}
|
|
304875
304943
|
function getBuildAgeMinutes() {
|
|
304876
|
-
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)
|
|
304877
304945
|
return;
|
|
304878
|
-
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();
|
|
304879
304947
|
if (isNaN(buildTime))
|
|
304880
304948
|
return;
|
|
304881
304949
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -309747,7 +309815,7 @@ async function callInner(file_path, fullFilePath, resolvedFilePath, ext, offset,
|
|
|
309747
309815
|
const imageBlocks = await Promise.all(imageFiles.map(async (f) => {
|
|
309748
309816
|
const imgPath = path14.join(extractResult.data.file.outputDir, f);
|
|
309749
309817
|
const imgBuffer = await readFileAsync(imgPath);
|
|
309750
|
-
const resized = await
|
|
309818
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imgBuffer, imgBuffer.length, "jpeg");
|
|
309751
309819
|
return {
|
|
309752
309820
|
type: "image",
|
|
309753
309821
|
source: {
|
|
@@ -309882,7 +309950,7 @@ async function readImageWithTokenBudget(filePath, maxTokens = getDefaultFileRead
|
|
|
309882
309950
|
const detectedFormat = detectedMediaType.split("/")[1] || "png";
|
|
309883
309951
|
let result;
|
|
309884
309952
|
try {
|
|
309885
|
-
const resized = await
|
|
309953
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, originalSize, detectedFormat);
|
|
309886
309954
|
result = createImageResponse(resized.buffer, resized.mediaType, originalSize, resized.dimensions);
|
|
309887
309955
|
} catch (e) {
|
|
309888
309956
|
if (e instanceof ImageResizeError)
|
|
@@ -321523,7 +321591,7 @@ function getAssistantMessageFromError(error40, model, options2) {
|
|
|
321523
321591
|
if (process.env.USER_TYPE === "ant") {
|
|
321524
321592
|
const baseMessage = `API Error: 400 ${error40.message}
|
|
321525
321593
|
|
|
321526
|
-
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}.`;
|
|
321527
321595
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
321528
321596
|
return createAssistantAPIErrorMessage({
|
|
321529
321597
|
content: baseMessage + rewindInstruction,
|
|
@@ -321559,7 +321627,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.48", BUILD_TIME: "1970-01
|
|
|
321559
321627
|
if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
|
|
321560
321628
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
321561
321629
|
const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
321562
|
-
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.`;
|
|
321563
321631
|
return createAssistantAPIErrorMessage({
|
|
321564
321632
|
content: msg,
|
|
321565
321633
|
error: "invalid_request"
|
|
@@ -331732,7 +331800,7 @@ function buildPrimarySection() {
|
|
|
331732
331800
|
});
|
|
331733
331801
|
return [{
|
|
331734
331802
|
label: "Version",
|
|
331735
|
-
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
|
|
331736
331804
|
}, {
|
|
331737
331805
|
label: "Session name",
|
|
331738
331806
|
value: nameValue
|
|
@@ -335548,7 +335616,7 @@ function Config({
|
|
|
335548
335616
|
}
|
|
335549
335617
|
})
|
|
335550
335618
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime188.jsx(ChannelDowngradeDialog, {
|
|
335551
|
-
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,
|
|
335552
335620
|
onChoice: (choice) => {
|
|
335553
335621
|
setShowSubmenu(null);
|
|
335554
335622
|
setTabsHidden(false);
|
|
@@ -335560,7 +335628,7 @@ function Config({
|
|
|
335560
335628
|
autoUpdatesChannel: "stable"
|
|
335561
335629
|
};
|
|
335562
335630
|
if (choice === "stay") {
|
|
335563
|
-
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;
|
|
335564
335632
|
}
|
|
335565
335633
|
updateSettingsForSource("userSettings", newSettings);
|
|
335566
335634
|
setSettingsData((prev_27) => ({
|
|
@@ -343594,7 +343662,7 @@ function HelpV2(t0) {
|
|
|
343594
343662
|
let t6;
|
|
343595
343663
|
if ($2[31] !== tabs) {
|
|
343596
343664
|
t6 = /* @__PURE__ */ jsx_runtime215.jsx(Tabs, {
|
|
343597
|
-
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}`,
|
|
343598
343666
|
color: "professionalBlue",
|
|
343599
343667
|
defaultTab: "general",
|
|
343600
343668
|
children: tabs
|
|
@@ -361718,7 +361786,7 @@ function Onboarding({
|
|
|
361718
361786
|
flexDirection: "column",
|
|
361719
361787
|
children: [
|
|
361720
361788
|
/* @__PURE__ */ jsx_runtime248.jsx(TheusBanner, {
|
|
361721
|
-
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
|
|
361722
361790
|
}),
|
|
361723
361791
|
/* @__PURE__ */ jsx_runtime248.jsxs(ThemedBox_default, {
|
|
361724
361792
|
flexDirection: "column",
|
|
@@ -362219,9 +362287,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
362219
362287
|
return [];
|
|
362220
362288
|
}
|
|
362221
362289
|
}
|
|
362222
|
-
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) {
|
|
362223
362291
|
if (process.env.USER_TYPE === "ant") {
|
|
362224
|
-
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;
|
|
362225
362293
|
if (changelog) {
|
|
362226
362294
|
const commits = changelog.trim().split(`
|
|
362227
362295
|
`).filter(Boolean);
|
|
@@ -366423,7 +366491,7 @@ var init_Messages = __esm(() => {
|
|
|
366423
366491
|
let t1;
|
|
366424
366492
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
366425
366493
|
t1 = /* @__PURE__ */ jsx_runtime260.jsx(TheusSessionHeader, {
|
|
366426
|
-
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
|
|
366427
366495
|
});
|
|
366428
366496
|
$2[0] = t1;
|
|
366429
366497
|
} else {
|
|
@@ -394899,7 +394967,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
394899
394967
|
smapsRollup,
|
|
394900
394968
|
platform: process.platform,
|
|
394901
394969
|
nodeVersion: process.version,
|
|
394902
|
-
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
|
|
394903
394971
|
};
|
|
394904
394972
|
}
|
|
394905
394973
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -395485,7 +395553,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
395485
395553
|
var call58 = async () => {
|
|
395486
395554
|
return {
|
|
395487
395555
|
type: "text",
|
|
395488
|
-
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
|
|
395489
395557
|
};
|
|
395490
395558
|
}, version2, version_default;
|
|
395491
395559
|
var init_version = __esm(() => {
|
|
@@ -399927,13 +399995,13 @@ async function updateReleaseBundle() {
|
|
|
399927
399995
|
await gracefulShutdown(1);
|
|
399928
399996
|
return;
|
|
399929
399997
|
}
|
|
399930
|
-
if (gte({ VERSION: "0.2.
|
|
399931
|
-
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})`) + `
|
|
399932
400000
|
`);
|
|
399933
400001
|
await gracefulShutdown(0);
|
|
399934
400002
|
return;
|
|
399935
400003
|
}
|
|
399936
|
-
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})
|
|
399937
400005
|
`);
|
|
399938
400006
|
writeToStdout(`Installing update from theus.pe/dl...
|
|
399939
400007
|
`);
|
|
@@ -399967,7 +400035,7 @@ async function updateReleaseBundle() {
|
|
|
399967
400035
|
return;
|
|
399968
400036
|
}
|
|
399969
400037
|
cpSync(staged, bundleDir, { recursive: true, force: true });
|
|
399970
|
-
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}`) + `
|
|
399971
400039
|
`);
|
|
399972
400040
|
await regenerateCompletionCache();
|
|
399973
400041
|
} finally {
|
|
@@ -399980,7 +400048,7 @@ async function updateReleaseBundle() {
|
|
|
399980
400048
|
async function update() {
|
|
399981
400049
|
logEvent("tengu_update_check", {});
|
|
399982
400050
|
await updateNaupa();
|
|
399983
|
-
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}
|
|
399984
400052
|
`);
|
|
399985
400053
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
399986
400054
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -400059,8 +400127,8 @@ async function update() {
|
|
|
400059
400127
|
writeToStdout(`Theus is managed by Homebrew.
|
|
400060
400128
|
`);
|
|
400061
400129
|
const latest = await getLatestVersion(channel2);
|
|
400062
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400063
|
-
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}
|
|
400064
400132
|
`);
|
|
400065
400133
|
writeToStdout(`
|
|
400066
400134
|
`);
|
|
@@ -400076,8 +400144,8 @@ async function update() {
|
|
|
400076
400144
|
writeToStdout(`Theus is managed by winget.
|
|
400077
400145
|
`);
|
|
400078
400146
|
const latest = await getLatestVersion(channel2);
|
|
400079
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400080
|
-
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}
|
|
400081
400149
|
`);
|
|
400082
400150
|
writeToStdout(`
|
|
400083
400151
|
`);
|
|
@@ -400093,8 +400161,8 @@ async function update() {
|
|
|
400093
400161
|
writeToStdout(`Theus is managed by apk.
|
|
400094
400162
|
`);
|
|
400095
400163
|
const latest = await getLatestVersion(channel2);
|
|
400096
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400097
|
-
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}
|
|
400098
400166
|
`);
|
|
400099
400167
|
writeToStdout(`
|
|
400100
400168
|
`);
|
|
@@ -400159,11 +400227,11 @@ async function update() {
|
|
|
400159
400227
|
`);
|
|
400160
400228
|
await gracefulShutdown(1);
|
|
400161
400229
|
}
|
|
400162
|
-
if (result.latestVersion === { VERSION: "0.2.
|
|
400163
|
-
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})`) + `
|
|
400164
400232
|
`);
|
|
400165
400233
|
} else {
|
|
400166
|
-
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}`) + `
|
|
400167
400235
|
`);
|
|
400168
400236
|
await regenerateCompletionCache();
|
|
400169
400237
|
}
|
|
@@ -400182,9 +400250,9 @@ async function update() {
|
|
|
400182
400250
|
await removeInstalledSymlink();
|
|
400183
400251
|
}
|
|
400184
400252
|
logForDebugging("update: Checking npm registry for latest version");
|
|
400185
|
-
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}`);
|
|
400186
400254
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
400187
|
-
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`;
|
|
400188
400256
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
400189
400257
|
const latestVersion = await getLatestVersion(channel2);
|
|
400190
400258
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -400204,7 +400272,7 @@ async function update() {
|
|
|
400204
400272
|
`);
|
|
400205
400273
|
process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
|
|
400206
400274
|
`);
|
|
400207
|
-
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")) {
|
|
400208
400276
|
process.stderr.write(` \u2022 Internal/development build not published to npm
|
|
400209
400277
|
`);
|
|
400210
400278
|
}
|
|
@@ -400216,19 +400284,19 @@ async function update() {
|
|
|
400216
400284
|
`);
|
|
400217
400285
|
process.stderr.write(` \u2022 Run with --debug flag for more details
|
|
400218
400286
|
`);
|
|
400219
|
-
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");
|
|
400220
400288
|
process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
|
|
400221
400289
|
`);
|
|
400222
400290
|
process.stderr.write(` \u2022 Check if you need to login: npm whoami
|
|
400223
400291
|
`);
|
|
400224
400292
|
await gracefulShutdown(1);
|
|
400225
400293
|
}
|
|
400226
|
-
if (gte({ VERSION: "0.2.
|
|
400227
|
-
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})`) + `
|
|
400228
400296
|
`);
|
|
400229
400297
|
await gracefulShutdown(0);
|
|
400230
400298
|
}
|
|
400231
|
-
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})
|
|
400232
400300
|
`);
|
|
400233
400301
|
writeToStdout(`Installing update...
|
|
400234
400302
|
`);
|
|
@@ -400273,7 +400341,7 @@ async function update() {
|
|
|
400273
400341
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
400274
400342
|
switch (status2) {
|
|
400275
400343
|
case "success":
|
|
400276
|
-
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}`) + `
|
|
400277
400345
|
`);
|
|
400278
400346
|
await regenerateCompletionCache();
|
|
400279
400347
|
break;
|
|
@@ -400283,7 +400351,7 @@ async function update() {
|
|
|
400283
400351
|
if (useLocalUpdate) {
|
|
400284
400352
|
process.stderr.write(`Try manually updating with:
|
|
400285
400353
|
`);
|
|
400286
|
-
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}
|
|
400287
400355
|
`);
|
|
400288
400356
|
} else {
|
|
400289
400357
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -400299,7 +400367,7 @@ async function update() {
|
|
|
400299
400367
|
if (useLocalUpdate) {
|
|
400300
400368
|
process.stderr.write(`Try manually updating with:
|
|
400301
400369
|
`);
|
|
400302
|
-
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}
|
|
400303
400371
|
`);
|
|
400304
400372
|
} else {
|
|
400305
400373
|
process.stderr.write(`Or consider using native installation with: theus install
|
|
@@ -409382,7 +409450,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
409382
409450
|
init_settings2();
|
|
409383
409451
|
init_slowOperations();
|
|
409384
409452
|
init_uuid();
|
|
409385
|
-
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;
|
|
409386
409454
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
409387
409455
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
409388
409456
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -410587,7 +410655,7 @@ var init_filesystem = __esm(() => {
|
|
|
410587
410655
|
});
|
|
410588
410656
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
410589
410657
|
const nonce = randomBytes21(16).toString("hex");
|
|
410590
|
-
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);
|
|
410591
410659
|
});
|
|
410592
410660
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
410593
410661
|
});
|
|
@@ -415766,7 +415834,7 @@ function getSimpleDoingTasksSection() {
|
|
|
415766
415834
|
];
|
|
415767
415835
|
const userHelpSubitems = [
|
|
415768
415836
|
`/help: Get help with using Theus`,
|
|
415769
|
-
`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}`
|
|
415770
415838
|
];
|
|
415771
415839
|
const items = [
|
|
415772
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.`,
|
|
@@ -416666,7 +416734,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
416666
416734
|
}
|
|
416667
416735
|
function computeFingerprintFromMessages(messages) {
|
|
416668
416736
|
const firstMessageText = extractFirstMessageText(messages);
|
|
416669
|
-
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);
|
|
416670
416738
|
}
|
|
416671
416739
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
416672
416740
|
var init_fingerprint = () => {};
|
|
@@ -419226,7 +419294,7 @@ async function sideQuery(opts) {
|
|
|
419226
419294
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
419227
419295
|
}
|
|
419228
419296
|
const messageText = extractFirstUserMessageText(messages);
|
|
419229
|
-
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);
|
|
419230
419298
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
419231
419299
|
const systemBlocks = [
|
|
419232
419300
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -420529,7 +420597,7 @@ async function handleMemories(state) {
|
|
|
420529
420597
|
async function runProjectContextMcpServer() {
|
|
420530
420598
|
const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
|
|
420531
420599
|
const state = new ProjectContextState(projectRoot);
|
|
420532
|
-
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: {} } });
|
|
420533
420601
|
server2.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
420534
420602
|
tools: TOOL_DEFINITIONS.map((t) => ({
|
|
420535
420603
|
name: t.name,
|
|
@@ -422509,7 +422577,7 @@ function createBridgeLogger(options2) {
|
|
|
422509
422577
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
422510
422578
|
regenerateQr(connectUrl);
|
|
422511
422579
|
if (verbose) {
|
|
422512
|
-
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}
|
|
422513
422581
|
`);
|
|
422514
422582
|
}
|
|
422515
422583
|
if (verbose) {
|
|
@@ -423482,7 +423550,7 @@ function appendToLog(path19, message) {
|
|
|
423482
423550
|
cwd: getFsImplementation().cwd(),
|
|
423483
423551
|
userType: process.env.USER_TYPE,
|
|
423484
423552
|
sessionId: getSessionId(),
|
|
423485
|
-
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
|
|
423486
423554
|
};
|
|
423487
423555
|
getLogWriter(path19).write(messageWithTimestamp);
|
|
423488
423556
|
}
|
|
@@ -424752,7 +424820,7 @@ Spawn mode for this project:
|
|
|
424752
424820
|
const api2 = createBridgeApiClient({
|
|
424753
424821
|
baseUrl,
|
|
424754
424822
|
getAccessToken: getBridgeAccessToken2,
|
|
424755
|
-
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,
|
|
424756
424824
|
onDebug: logForDebugging,
|
|
424757
424825
|
onAuth401: handleOAuth401Error2,
|
|
424758
424826
|
getTrustedDeviceToken
|
|
@@ -424990,7 +425058,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
424990
425058
|
const api2 = createBridgeApiClient({
|
|
424991
425059
|
baseUrl,
|
|
424992
425060
|
getAccessToken: opts.getAccessToken,
|
|
424993
|
-
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,
|
|
424994
425062
|
onDebug: log2,
|
|
424995
425063
|
onAuth401: opts.onAuth401,
|
|
424996
425064
|
getTrustedDeviceToken
|
|
@@ -429054,7 +429122,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
429054
429122
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
429055
429123
|
apiKeySource: getTheusApiKeyWithSource().source,
|
|
429056
429124
|
betas: getSdkBetas(),
|
|
429057
|
-
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,
|
|
429058
429126
|
output_style: outputStyle2,
|
|
429059
429127
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
429060
429128
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -429094,8 +429162,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
429094
429162
|
}
|
|
429095
429163
|
async function checkEnvLessBridgeMinVersion() {
|
|
429096
429164
|
const cfg = await getEnvLessBridgeConfig();
|
|
429097
|
-
if (cfg.min_version && lt({ VERSION: "0.2.
|
|
429098
|
-
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.
|
|
429099
429167
|
Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
|
|
429100
429168
|
}
|
|
429101
429169
|
return null;
|
|
@@ -431418,7 +431486,7 @@ async function initBridgeCore(params) {
|
|
|
431418
431486
|
const rawApi = createBridgeApiClient({
|
|
431419
431487
|
baseUrl,
|
|
431420
431488
|
getAccessToken,
|
|
431421
|
-
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,
|
|
431422
431490
|
onDebug: logForDebugging,
|
|
431423
431491
|
onAuth401,
|
|
431424
431492
|
getTrustedDeviceToken
|
|
@@ -448159,7 +448227,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
448159
448227
|
function getSemverPart(version3) {
|
|
448160
448228
|
return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
|
|
448161
448229
|
}
|
|
448162
|
-
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) {
|
|
448163
448231
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react231.useState(() => getSemverPart(initialVersion));
|
|
448164
448232
|
if (!updatedVersion) {
|
|
448165
448233
|
return null;
|
|
@@ -448199,7 +448267,7 @@ function AutoUpdater({
|
|
|
448199
448267
|
return;
|
|
448200
448268
|
}
|
|
448201
448269
|
if (false) {}
|
|
448202
|
-
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;
|
|
448203
448271
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
448204
448272
|
let latestVersion = await getLatestVersion(channel2);
|
|
448205
448273
|
const isDisabled2 = isAutoUpdaterDisabled();
|
|
@@ -448335,7 +448403,7 @@ function AutoUpdater({
|
|
|
448335
448403
|
" ",
|
|
448336
448404
|
/* @__PURE__ */ jsx_runtime405.jsx(ThemedText, {
|
|
448337
448405
|
bold: true,
|
|
448338
|
-
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}`
|
|
448339
448407
|
})
|
|
448340
448408
|
]
|
|
448341
448409
|
})
|
|
@@ -448412,12 +448480,12 @@ function NativeAutoUpdater({
|
|
|
448412
448480
|
logEvent("tengu_native_auto_updater_start", {});
|
|
448413
448481
|
try {
|
|
448414
448482
|
const maxVersion = await getMaxVersion();
|
|
448415
|
-
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)) {
|
|
448416
448484
|
const msg = await getMaxVersionMessage();
|
|
448417
448485
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
448418
448486
|
}
|
|
448419
448487
|
const result = await installLatest(channel2);
|
|
448420
|
-
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;
|
|
448421
448489
|
const latencyMs = Date.now() - startTime2;
|
|
448422
448490
|
if (result.lockFailed) {
|
|
448423
448491
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -448554,17 +448622,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448554
448622
|
const maxVersion = await getMaxVersion();
|
|
448555
448623
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
448556
448624
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
448557
|
-
if (gte({ VERSION: "0.2.
|
|
448558
|
-
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`);
|
|
448559
448627
|
setUpdateAvailable(false);
|
|
448560
448628
|
return;
|
|
448561
448629
|
}
|
|
448562
448630
|
latest = maxVersion;
|
|
448563
448631
|
}
|
|
448564
|
-
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);
|
|
448565
448633
|
setUpdateAvailable(!!hasUpdate);
|
|
448566
448634
|
if (hasUpdate) {
|
|
448567
|
-
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}`);
|
|
448568
448636
|
}
|
|
448569
448637
|
};
|
|
448570
448638
|
$2[0] = t1;
|
|
@@ -448598,7 +448666,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448598
448666
|
wrap: "truncate",
|
|
448599
448667
|
children: [
|
|
448600
448668
|
"currentVersion: ",
|
|
448601
|
-
{ 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
|
|
448602
448670
|
]
|
|
448603
448671
|
});
|
|
448604
448672
|
$2[3] = verbose;
|
|
@@ -456471,7 +456539,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
456471
456539
|
project_dir: getOriginalCwd(),
|
|
456472
456540
|
added_dirs: addedDirs
|
|
456473
456541
|
},
|
|
456474
|
-
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,
|
|
456475
456543
|
output_style: {
|
|
456476
456544
|
name: outputStyleName
|
|
456477
456545
|
},
|
|
@@ -467891,7 +467959,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
467891
467959
|
} catch {}
|
|
467892
467960
|
const data = {
|
|
467893
467961
|
trigger,
|
|
467894
|
-
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,
|
|
467895
467963
|
platform: process.platform,
|
|
467896
467964
|
transcript,
|
|
467897
467965
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -480898,7 +480966,7 @@ function completeOnboarding() {
|
|
|
480898
480966
|
saveGlobalConfig((current) => ({
|
|
480899
480967
|
...current,
|
|
480900
480968
|
hasCompletedOnboarding: true,
|
|
480901
|
-
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
|
|
480902
480970
|
}));
|
|
480903
480971
|
}
|
|
480904
480972
|
function showDialog(root2, renderer) {
|
|
@@ -491896,7 +491964,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
|
|
|
491896
491964
|
setCwd(cwd3);
|
|
491897
491965
|
const server2 = new Server({
|
|
491898
491966
|
name: "theus/tengu",
|
|
491899
|
-
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
|
|
491900
491968
|
}, {
|
|
491901
491969
|
capabilities: {
|
|
491902
491970
|
tools: {}
|
|
@@ -493338,7 +493406,7 @@ async function setupTokenHandler(root2) {
|
|
|
493338
493406
|
gap: 1,
|
|
493339
493407
|
children: [
|
|
493340
493408
|
/* @__PURE__ */ jsx_runtime492.jsx(TheusBanner, {
|
|
493341
|
-
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
|
|
493342
493410
|
}),
|
|
493343
493411
|
showAuthWarning && /* @__PURE__ */ jsx_runtime492.jsxs(ThemedBox_default, {
|
|
493344
493412
|
flexDirection: "column",
|
|
@@ -494820,7 +494888,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
494820
494888
|
}
|
|
494821
494889
|
}
|
|
494822
494890
|
logForDiagnosticsNoPII("info", "started", {
|
|
494823
|
-
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,
|
|
494824
494892
|
is_native_binary: isInBundledMode()
|
|
494825
494893
|
});
|
|
494826
494894
|
registerCleanup(async () => {
|
|
@@ -495688,7 +495756,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
495688
495756
|
pendingHookMessages
|
|
495689
495757
|
}, renderAndRun);
|
|
495690
495758
|
}
|
|
495691
|
-
}).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");
|
|
495692
495760
|
program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
|
|
495693
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.");
|
|
495694
495762
|
if (canUserConfigureAdvisor()) {
|
|
@@ -496240,7 +496308,7 @@ if (false) {}
|
|
|
496240
496308
|
async function main2() {
|
|
496241
496309
|
const args = process.argv.slice(2);
|
|
496242
496310
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
496243
|
-
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)`);
|
|
496244
496312
|
return;
|
|
496245
496313
|
}
|
|
496246
496314
|
const {
|