From 3fa3be4e1b35b2932f7525fe2237f04e09947312 Mon Sep 17 00:00:00 2001 From: Eyal Toledano Date: Wed, 4 Jun 2025 19:03:47 -0400 Subject: [PATCH] chore: fix user email, telemetryEnabled by default --- .taskmasterconfig | 19 +++++++++--------- assets/.taskmasterconfig | 31 ------------------------------ scripts/modules/user-management.js | 19 ++---------------- tests/fixtures/.taskmasterconfig | 16 --------------- 4 files changed, 11 insertions(+), 74 deletions(-) delete mode 100644 assets/.taskmasterconfig delete mode 100644 tests/fixtures/.taskmasterconfig diff --git a/.taskmasterconfig b/.taskmasterconfig index f6793052..c73b0015 100644 --- a/.taskmasterconfig +++ b/.taskmasterconfig @@ -2,8 +2,8 @@ "models": { "main": { "provider": "anthropic", - "modelId": "claude-sonnet-4-20250514", - "maxTokens": 50000, + "modelId": "claude-3-7-sonnet-20250219", + "maxTokens": 64000, "temperature": 0.2 }, "research": { @@ -14,8 +14,8 @@ }, "fallback": { "provider": "anthropic", - "modelId": "claude-3-7-sonnet-20250219", - "maxTokens": 128000, + "modelId": "claude-3-5-sonnet", + "maxTokens": 64000, "temperature": 0.2 } }, @@ -26,13 +26,12 @@ "defaultPriority": "medium", "projectName": "Taskmaster", "ollamaBaseURL": "http://localhost:11434/api", - "azureBaseURL": "https://your-endpoint.azure.com/", - "ollamaBaseUrl": "http://localhost:11434/api" + "azureBaseURL": "https://your-endpoint.azure.com/" }, "account": { - "userId": "1234567890", - "email": "", - "mode": "hosted", + "userId": "2e8d1938-b65d-4b3d-b480-efb488284fe3", + "email": "anon-2e8d1938-b65d-4b3d-b480-efb488284fe3@taskmaster.temp", + "mode": "byok", "telemetryEnabled": true } -} +} \ No newline at end of file diff --git a/assets/.taskmasterconfig b/assets/.taskmasterconfig deleted file mode 100644 index 907f4290..00000000 --- a/assets/.taskmasterconfig +++ /dev/null @@ -1,31 +0,0 @@ -{ - "models": { - "main": { - "provider": "anthropic", - "modelId": "claude-3-7-sonnet-20250219", - "maxTokens": 120000, - "temperature": 0.2 - }, - "research": { - "provider": "perplexity", - "modelId": "sonar-pro", - "maxTokens": 8700, - "temperature": 0.1 - }, - "fallback": { - "provider": "anthropic", - "modelId": "claude-3-5-sonnet-20240620", - "maxTokens": 8192, - "temperature": 0.1 - } - }, - "global": { - "logLevel": "info", - "debug": false, - "defaultSubtasks": 5, - "defaultPriority": "medium", - "projectName": "Taskmaster", - "ollamaBaseURL": "http://localhost:11434/api", - "azureOpenaiBaseURL": "https://your-endpoint.openai.azure.com/" - } -} diff --git a/scripts/modules/user-management.js b/scripts/modules/user-management.js index 17c7e920..f7e9bf51 100644 --- a/scripts/modules/user-management.js +++ b/scripts/modules/user-management.js @@ -187,7 +187,6 @@ function writeApiKeyToEnv(token, explicitRoot = null) { // Write updated content fs.writeFileSync(envPath, envContent); - log("info", "User authentication token written to .env file"); } catch (error) { log("error", `Failed to write user token to .env: ${error.message}`); } @@ -321,10 +320,6 @@ async function initializeBYOKUser(projectRoot) { // If we have an existing anonymous user ID, try to reuse it if (existingAnonymousUserId && existingAnonymousUserId !== "1234567890") { headers["X-Anonymous-User-ID"] = existingAnonymousUserId; - log( - "info", - `Attempting to reuse existing anonymous user: ${existingAnonymousUserId}` - ); } // Call gateway /auth/anonymous to create or reuse a user account @@ -338,16 +333,6 @@ async function initializeBYOKUser(projectRoot) { if (response.ok) { const result = await response.json(); - // Log whether user was reused or newly created - if (result.isReused) { - log( - "info", - `Successfully reused existing anonymous user: ${result.anonymousUserId}` - ); - } else { - log("info", `Created new anonymous user: ${result.anonymousUserId}`); - } - // Store the user token (same as hosted users) // BYOK users won't use this for AI calls, but will have it for potential mode switch if (result.session && result.session.access_token) { @@ -360,10 +345,10 @@ async function initializeBYOKUser(projectRoot) { } config.account.userId = result.anonymousUserId || result.user.id; config.account.mode = "byok"; - config.account.userEmail = + config.account.email = result.user.email || `anon-${result.anonymousUserId || result.user.id}@taskmaster.temp`; - config.account.telemetryEnabled = false; // BYOK users don't send telemetry by default + config.account.telemetryEnabled = true; writeConfig(config, projectRoot); diff --git a/tests/fixtures/.taskmasterconfig b/tests/fixtures/.taskmasterconfig deleted file mode 100644 index 66662c33..00000000 --- a/tests/fixtures/.taskmasterconfig +++ /dev/null @@ -1,16 +0,0 @@ -{ - "models": { - "main": { - "provider": "openai", - "modelId": "gpt-4o" - }, - "research": { - "provider": "perplexity", - "modelId": "sonar-pro" - }, - "fallback": { - "provider": "anthropic", - "modelId": "claude-3-haiku-20240307" - } - } -} \ No newline at end of file