Compare commits
2 Commits
feat/imple
...
fix/bedroc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4121c92031 | ||
|
|
dbe5e899cc |
5
.changeset/curly-months-go.md
Normal file
5
.changeset/curly-months-go.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix bedrock issues
|
||||||
5
.changeset/loud-dolls-yell.md
Normal file
5
.changeset/loud-dolls-yell.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update rules for new directory structure
|
||||||
5
.changeset/tall-symbols-call.md
Normal file
5
.changeset/tall-symbols-call.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix MCP crashing after certain commands due to console logs
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
"defaultPriority": "medium",
|
"defaultPriority": "medium",
|
||||||
"projectName": "Taskmaster",
|
"projectName": "Taskmaster",
|
||||||
"ollamaBaseURL": "http://localhost:11434/api",
|
"ollamaBaseURL": "http://localhost:11434/api",
|
||||||
|
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com",
|
||||||
"userId": "1234567890",
|
"userId": "1234567890",
|
||||||
"azureBaseURL": "https://your-endpoint.azure.com/"
|
"azureBaseURL": "https://your-endpoint.azure.com/"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"models": {
|
|
||||||
"main": {
|
|
||||||
"provider": "anthropic",
|
|
||||||
"modelId": "claude-sonnet-4-20250514",
|
|
||||||
"maxTokens": 50000,
|
|
||||||
"temperature": 0.2
|
|
||||||
},
|
|
||||||
"research": {
|
|
||||||
"provider": "perplexity",
|
|
||||||
"modelId": "sonar-pro",
|
|
||||||
"maxTokens": 8700,
|
|
||||||
"temperature": 0.1
|
|
||||||
},
|
|
||||||
"fallback": {
|
|
||||||
"provider": "anthropic",
|
|
||||||
"modelId": "claude-3-7-sonnet-20250219",
|
|
||||||
"maxTokens": 128000,
|
|
||||||
"temperature": 0.2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"global": {
|
|
||||||
"logLevel": "info",
|
|
||||||
"debug": false,
|
|
||||||
"defaultSubtasks": 5,
|
|
||||||
"defaultPriority": "medium",
|
|
||||||
"projectName": "Taskmaster",
|
|
||||||
"ollamaBaseURL": "http://localhost:11434/api",
|
|
||||||
"userId": "1234567890",
|
|
||||||
"azureBaseURL": "https://your-endpoint.azure.com/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -56,17 +56,21 @@ task-master generate # Update task markd
|
|||||||
|
|
||||||
```
|
```
|
||||||
project/
|
project/
|
||||||
├── tasks/
|
├── .taskmaster/
|
||||||
│ ├── tasks.json # Main task database
|
│ ├── tasks/ # Task files directory
|
||||||
│ ├── task-1.md # Individual task files
|
│ │ ├── tasks.json # Main task database
|
||||||
│ └── task-2.md
|
│ │ ├── task-1.md # Individual task files
|
||||||
├── scripts/
|
│ │ └── task-2.md
|
||||||
│ ├── prd.txt # Product requirements
|
│ ├── docs/ # Documentation directory
|
||||||
│ └── task-complexity-report.json
|
│ │ ├── prd.txt # Product requirements
|
||||||
|
│ ├── reports/ # Analysis reports directory
|
||||||
|
│ │ └── task-complexity-report.json
|
||||||
|
│ ├── templates/ # Template files
|
||||||
|
│ │ └── example_prd.txt # Example PRD template
|
||||||
|
│ └── config.json # AI models & settings
|
||||||
├── .claude/
|
├── .claude/
|
||||||
│ ├── settings.json # Claude Code configuration
|
│ ├── settings.json # Claude Code configuration
|
||||||
│ └── commands/ # Custom slash commands
|
│ └── commands/ # Custom slash commands
|
||||||
├── .taskmasterconfig # AI models & settings
|
|
||||||
├── .env # API keys
|
├── .env # API keys
|
||||||
├── .mcp.json # MCP configuration
|
├── .mcp.json # MCP configuration
|
||||||
└── CLAUDE.md # This file - auto-loaded by Claude Code
|
└── CLAUDE.md # This file - auto-loaded by Claude Code
|
||||||
@@ -384,7 +388,7 @@ These commands make AI calls and may take up to a minute:
|
|||||||
### File Management
|
### File Management
|
||||||
|
|
||||||
- Never manually edit `tasks.json` - use commands instead
|
- Never manually edit `tasks.json` - use commands instead
|
||||||
- Never manually edit `.taskmasterconfig` - use `task-master models`
|
- Never manually edit `.taskmaster/config.json` - use `task-master models`
|
||||||
- Task markdown files in `tasks/` are auto-generated
|
- Task markdown files in `tasks/` are auto-generated
|
||||||
- Run `task-master generate` after manual changes to tasks.json
|
- Run `task-master generate` after manual changes to tasks.json
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"defaultPriority": "medium",
|
"defaultPriority": "medium",
|
||||||
"projectName": "Taskmaster",
|
"projectName": "Taskmaster",
|
||||||
"ollamaBaseURL": "http://localhost:11434/api",
|
"ollamaBaseURL": "http://localhost:11434/api",
|
||||||
"azureOpenaiBaseURL": "https://your-endpoint.openai.azure.com/"
|
"azureOpenaiBaseURL": "https://your-endpoint.openai.azure.com/",
|
||||||
|
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,5 +5,5 @@ OPENAI_API_KEY="your_openai_api_key_here" # Optional, for OpenAI/Ope
|
|||||||
GOOGLE_API_KEY="your_google_api_key_here" # Optional, for Google Gemini models.
|
GOOGLE_API_KEY="your_google_api_key_here" # Optional, for Google Gemini models.
|
||||||
MISTRAL_API_KEY="your_mistral_key_here" # Optional, for Mistral AI models.
|
MISTRAL_API_KEY="your_mistral_key_here" # Optional, for Mistral AI models.
|
||||||
XAI_API_KEY="YOUR_XAI_KEY_HERE" # Optional, for xAI AI models.
|
XAI_API_KEY="YOUR_XAI_KEY_HERE" # Optional, for xAI AI models.
|
||||||
AZURE_OPENAI_API_KEY="your_azure_key_here" # Optional, for Azure OpenAI models (requires endpoint in .taskmasterconfig).
|
AZURE_OPENAI_API_KEY="your_azure_key_here" # Optional, for Azure OpenAI models (requires endpoint in .taskmaster/config.json).
|
||||||
OLLAMA_API_KEY="your_ollama_api_key_here" # Optional: For remote Ollama servers that require authentication.
|
OLLAMA_API_KEY="your_ollama_api_key_here" # Optional: For remote Ollama servers that require authentication.
|
||||||
@@ -20,7 +20,7 @@ In an AI-driven development process—particularly with tools like [Cursor](http
|
|||||||
|
|
||||||
Task Master configuration is now managed through two primary methods:
|
Task Master configuration is now managed through two primary methods:
|
||||||
|
|
||||||
1. **`.taskmasterconfig` File (Project Root - Primary)**
|
1. **`.taskmaster/config.json` File (Project Root - Primary)**
|
||||||
|
|
||||||
- Stores AI model selections (`main`, `research`, `fallback`), model parameters (`maxTokens`, `temperature`), `logLevel`, `defaultSubtasks`, `defaultPriority`, `projectName`, etc.
|
- Stores AI model selections (`main`, `research`, `fallback`), model parameters (`maxTokens`, `temperature`), `logLevel`, `defaultSubtasks`, `defaultPriority`, `projectName`, etc.
|
||||||
- Managed using the `task-master models --setup` command or the `models` MCP tool.
|
- Managed using the `task-master models --setup` command or the `models` MCP tool.
|
||||||
@@ -192,7 +192,7 @@ Notes:
|
|||||||
## AI Integration (Updated)
|
## AI Integration (Updated)
|
||||||
|
|
||||||
- The script now uses a unified AI service layer (`ai-services-unified.js`).
|
- The script now uses a unified AI service layer (`ai-services-unified.js`).
|
||||||
- Model selection (e.g., Claude vs. Perplexity for `--research`) is determined by the configuration in `.taskmasterconfig` based on the requested `role` (`main` or `research`).
|
- Model selection (e.g., Claude vs. Perplexity for `--research`) is determined by the configuration in `.taskmaster/config.json` based on the requested `role` (`main` or `research`).
|
||||||
- API keys are automatically resolved from your `.env` file (for CLI) or MCP session environment.
|
- API keys are automatically resolved from your `.env` file (for CLI) or MCP session environment.
|
||||||
- To use the research capabilities (e.g., `expand --research`), ensure you have:
|
- To use the research capabilities (e.g., `expand --research`), ensure you have:
|
||||||
1. Configured a model for the `research` role using `task-master models --setup` (Perplexity models are recommended).
|
1. Configured a model for the `research` role using `task-master models --setup` (Perplexity models are recommended).
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ export function registerModelsTool(server) {
|
|||||||
),
|
),
|
||||||
projectRoot: z
|
projectRoot: z
|
||||||
.string()
|
.string()
|
||||||
.optional()
|
|
||||||
.describe('The directory of the project. Must be an absolute path.'),
|
.describe('The directory of the project. Must be an absolute path.'),
|
||||||
openrouter: z
|
openrouter: z
|
||||||
.boolean()
|
.boolean()
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ export function registerParsePRDTool(server) {
|
|||||||
.describe('Absolute path to the PRD document file (.txt, .md, etc.)'),
|
.describe('Absolute path to the PRD document file (.txt, .md, etc.)'),
|
||||||
projectRoot: z
|
projectRoot: z
|
||||||
.string()
|
.string()
|
||||||
.optional()
|
|
||||||
.describe('The directory of the project. Must be an absolute path.'),
|
.describe('The directory of the project. Must be an absolute path.'),
|
||||||
output: z
|
output: z
|
||||||
.string()
|
.string()
|
||||||
|
|||||||
@@ -509,9 +509,9 @@ function createProjectStructure(addAliases, dryRun, options) {
|
|||||||
replacements
|
replacements
|
||||||
);
|
);
|
||||||
|
|
||||||
// Copy .taskmasterconfig with project name to NEW location
|
// Copy config.json with project name to NEW location
|
||||||
copyTemplateFile(
|
copyTemplateFile(
|
||||||
'.taskmasterconfig',
|
'config.json',
|
||||||
path.join(targetDir, TASKMASTER_CONFIG_FILE),
|
path.join(targetDir, TASKMASTER_CONFIG_FILE),
|
||||||
{
|
{
|
||||||
...replacements
|
...replacements
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {
|
|||||||
isApiKeySet,
|
isApiKeySet,
|
||||||
getOllamaBaseURL,
|
getOllamaBaseURL,
|
||||||
getAzureBaseURL,
|
getAzureBaseURL,
|
||||||
|
getBedrockBaseURL,
|
||||||
getVertexProjectId,
|
getVertexProjectId,
|
||||||
getVertexLocation
|
getVertexLocation
|
||||||
} from './config-manager.js';
|
} from './config-manager.js';
|
||||||
@@ -410,6 +411,10 @@ async function _unifiedServiceRunner(serviceType, params) {
|
|||||||
// For Ollama, use the global Ollama base URL if role-specific URL is not configured
|
// For Ollama, use the global Ollama base URL if role-specific URL is not configured
|
||||||
baseURL = getOllamaBaseURL(effectiveProjectRoot);
|
baseURL = getOllamaBaseURL(effectiveProjectRoot);
|
||||||
log('debug', `Using global Ollama base URL: ${baseURL}`);
|
log('debug', `Using global Ollama base URL: ${baseURL}`);
|
||||||
|
} else if (providerName?.toLowerCase() === 'bedrock' && !baseURL) {
|
||||||
|
// For Bedrock, use the global Bedrock base URL if role-specific URL is not configured
|
||||||
|
baseURL = getBedrockBaseURL(effectiveProjectRoot);
|
||||||
|
log('debug', `Using global Bedrock base URL: ${baseURL}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get AI parameters for the current role
|
// Get AI parameters for the current role
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ const DEFAULTS = {
|
|||||||
defaultSubtasks: 5,
|
defaultSubtasks: 5,
|
||||||
defaultPriority: 'medium',
|
defaultPriority: 'medium',
|
||||||
projectName: 'Task Master',
|
projectName: 'Task Master',
|
||||||
ollamaBaseURL: 'http://localhost:11434/api'
|
ollamaBaseURL: 'http://localhost:11434/api',
|
||||||
|
bedrockBaseURL: 'https://bedrock.us-east-1.amazonaws.com'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -382,6 +383,11 @@ function getAzureBaseURL(explicitRoot = null) {
|
|||||||
return getGlobalConfig(explicitRoot).azureBaseURL;
|
return getGlobalConfig(explicitRoot).azureBaseURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBedrockBaseURL(explicitRoot = null) {
|
||||||
|
// Directly return value from config
|
||||||
|
return getGlobalConfig(explicitRoot).bedrockBaseURL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Google Cloud project ID for Vertex AI from configuration
|
* Gets the Google Cloud project ID for Vertex AI from configuration
|
||||||
* @param {string|null} explicitRoot - Optional explicit path to the project root.
|
* @param {string|null} explicitRoot - Optional explicit path to the project root.
|
||||||
@@ -779,6 +785,7 @@ export {
|
|||||||
getProjectName,
|
getProjectName,
|
||||||
getOllamaBaseURL,
|
getOllamaBaseURL,
|
||||||
getAzureBaseURL,
|
getAzureBaseURL,
|
||||||
|
getBedrockBaseURL,
|
||||||
getParametersForRole,
|
getParametersForRole,
|
||||||
getUserId,
|
getUserId,
|
||||||
// API Key Checkers (still relevant)
|
// API Key Checkers (still relevant)
|
||||||
|
|||||||
@@ -482,6 +482,11 @@ async function setModel(role, modelId, options = {}) {
|
|||||||
`Model ID "${modelId}" not found in the Ollama instance. Please verify the model is pulled and available. You can check available models with: curl ${tagsUrl}`
|
`Model ID "${modelId}" not found in the Ollama instance. Please verify the model is pulled and available. You can check available models with: curl ${tagsUrl}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} else if (providerHint === 'bedrock') {
|
||||||
|
// Set provider without model validation since Bedrock models are managed by AWS
|
||||||
|
determinedProvider = 'bedrock';
|
||||||
|
warningMessage = `Warning: Custom Bedrock model '${modelId}' set. Please ensure the model ID is valid and accessible in your AWS account.`;
|
||||||
|
report('warn', warningMessage);
|
||||||
} else {
|
} else {
|
||||||
// Invalid provider hint - should not happen
|
// Invalid provider hint - should not happen
|
||||||
throw new Error(`Invalid provider hint received: ${providerHint}`);
|
throw new Error(`Invalid provider hint received: ${providerHint}`);
|
||||||
|
|||||||
@@ -24,7 +24,10 @@ import {
|
|||||||
} from './task-manager.js';
|
} from './task-manager.js';
|
||||||
import { getProjectName, getDefaultSubtasks } from './config-manager.js';
|
import { getProjectName, getDefaultSubtasks } from './config-manager.js';
|
||||||
import { TASK_STATUS_OPTIONS } from '../../src/constants/task-status.js';
|
import { TASK_STATUS_OPTIONS } from '../../src/constants/task-status.js';
|
||||||
import { TASKMASTER_TASKS_FILE } from '../../src/constants/paths.js';
|
import {
|
||||||
|
TASKMASTER_CONFIG_FILE,
|
||||||
|
TASKMASTER_TASKS_FILE
|
||||||
|
} from '../../src/constants/paths.js';
|
||||||
import { getTaskMasterVersion } from '../../src/utils/getVersion.js';
|
import { getTaskMasterVersion } from '../../src/utils/getVersion.js';
|
||||||
|
|
||||||
// Create a color gradient for the banner
|
// Create a color gradient for the banner
|
||||||
@@ -687,7 +690,7 @@ function displayHelp() {
|
|||||||
|
|
||||||
configTable.push(
|
configTable.push(
|
||||||
[
|
[
|
||||||
`${chalk.yellow('.taskmasterconfig')}${chalk.reset('')}`,
|
`${chalk.yellow(TASKMASTER_CONFIG_FILE)}${chalk.reset('')}`,
|
||||||
`${chalk.white('AI model configuration file (project root)')}${chalk.reset('')}`,
|
`${chalk.white('AI model configuration file (project root)')}${chalk.reset('')}`,
|
||||||
`${chalk.dim('Managed by models cmd')}${chalk.reset('')}`
|
`${chalk.dim('Managed by models cmd')}${chalk.reset('')}`
|
||||||
],
|
],
|
||||||
@@ -1851,7 +1854,7 @@ function displayApiKeyStatus(statusReport) {
|
|||||||
console.log(table.toString());
|
console.log(table.toString());
|
||||||
console.log(
|
console.log(
|
||||||
chalk.gray(
|
chalk.gray(
|
||||||
' Note: Some providers (e.g., Azure, Ollama) may require additional endpoint configuration in .taskmasterconfig.'
|
` Note: Some providers (e.g., Azure, Ollama) may require additional endpoint configuration in ${TASKMASTER_CONFIG_FILE}.`
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
31
src/utils/logger-utils.js
Normal file
31
src/utils/logger-utils.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* Logger utility functions for Task Master
|
||||||
|
* Provides standardized logging patterns for both CLI and utility contexts
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { log as utilLog } from '../../scripts/modules/utils.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a standard logger object that wraps the utility log function
|
||||||
|
* This provides a consistent logger interface across different parts of the application
|
||||||
|
* @returns {Object} A logger object with standard logging methods (info, warn, error, debug, success)
|
||||||
|
*/
|
||||||
|
export function createStandardLogger() {
|
||||||
|
return {
|
||||||
|
info: (msg, ...args) => utilLog('info', msg, ...args),
|
||||||
|
warn: (msg, ...args) => utilLog('warn', msg, ...args),
|
||||||
|
error: (msg, ...args) => utilLog('error', msg, ...args),
|
||||||
|
debug: (msg, ...args) => utilLog('debug', msg, ...args),
|
||||||
|
success: (msg, ...args) => utilLog('success', msg, ...args)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a logger using either the provided logger or a default standard logger
|
||||||
|
* This is the recommended pattern for functions that accept an optional logger parameter
|
||||||
|
* @param {Object|null} providedLogger - Optional logger object passed from caller
|
||||||
|
* @returns {Object} A logger object with standard logging methods
|
||||||
|
*/
|
||||||
|
export function getLoggerOrDefault(providedLogger = null) {
|
||||||
|
return providedLogger || createStandardLogger();
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
TASKMASTER_CONFIG_FILE,
|
TASKMASTER_CONFIG_FILE,
|
||||||
LEGACY_CONFIG_FILE
|
LEGACY_CONFIG_FILE
|
||||||
} from '../constants/paths.js';
|
} from '../constants/paths.js';
|
||||||
|
import { getLoggerOrDefault } from './logger-utils.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the project root directory by looking for project markers
|
* Find the project root directory by looking for project markers
|
||||||
@@ -59,7 +60,8 @@ export function findProjectRoot(startDir = process.cwd()) {
|
|||||||
* @returns {string|null} - Resolved tasks.json path or null if not found
|
* @returns {string|null} - Resolved tasks.json path or null if not found
|
||||||
*/
|
*/
|
||||||
export function findTasksPath(explicitPath = null, args = null, log = null) {
|
export function findTasksPath(explicitPath = null, args = null, log = null) {
|
||||||
const logger = log || console;
|
// Use the passed logger if available, otherwise use the default logger
|
||||||
|
const logger = getLoggerOrDefault(log);
|
||||||
|
|
||||||
// 1. If explicit path is provided, use it (highest priority)
|
// 1. If explicit path is provided, use it (highest priority)
|
||||||
if (explicitPath) {
|
if (explicitPath) {
|
||||||
@@ -130,7 +132,7 @@ export function findTasksPath(explicitPath = null, args = null, log = null) {
|
|||||||
* @returns {string|null} - Resolved PRD document path or null if not found
|
* @returns {string|null} - Resolved PRD document path or null if not found
|
||||||
*/
|
*/
|
||||||
export function findPRDPath(explicitPath = null, args = null, log = null) {
|
export function findPRDPath(explicitPath = null, args = null, log = null) {
|
||||||
const logger = log || console;
|
const logger = getLoggerOrDefault(log);
|
||||||
|
|
||||||
// 1. If explicit path is provided, use it (highest priority)
|
// 1. If explicit path is provided, use it (highest priority)
|
||||||
if (explicitPath) {
|
if (explicitPath) {
|
||||||
@@ -199,7 +201,7 @@ export function findComplexityReportPath(
|
|||||||
args = null,
|
args = null,
|
||||||
log = null
|
log = null
|
||||||
) {
|
) {
|
||||||
const logger = log || console;
|
const logger = getLoggerOrDefault(log);
|
||||||
|
|
||||||
// 1. If explicit path is provided, use it (highest priority)
|
// 1. If explicit path is provided, use it (highest priority)
|
||||||
if (explicitPath) {
|
if (explicitPath) {
|
||||||
@@ -268,7 +270,7 @@ export function resolveTasksOutputPath(
|
|||||||
args = null,
|
args = null,
|
||||||
log = null
|
log = null
|
||||||
) {
|
) {
|
||||||
const logger = log || console;
|
const logger = getLoggerOrDefault(log);
|
||||||
|
|
||||||
// 1. If explicit path is provided, use it
|
// 1. If explicit path is provided, use it
|
||||||
if (explicitPath) {
|
if (explicitPath) {
|
||||||
@@ -309,7 +311,7 @@ export function resolveComplexityReportOutputPath(
|
|||||||
args = null,
|
args = null,
|
||||||
log = null
|
log = null
|
||||||
) {
|
) {
|
||||||
const logger = log || console;
|
const logger = getLoggerOrDefault(log);
|
||||||
|
|
||||||
// 1. If explicit path is provided, use it
|
// 1. If explicit path is provided, use it
|
||||||
if (explicitPath) {
|
if (explicitPath) {
|
||||||
@@ -348,7 +350,7 @@ export function resolveComplexityReportOutputPath(
|
|||||||
* @returns {string|null} - Resolved config file path or null if not found
|
* @returns {string|null} - Resolved config file path or null if not found
|
||||||
*/
|
*/
|
||||||
export function findConfigPath(explicitPath = null, args = null, log = null) {
|
export function findConfigPath(explicitPath = null, args = null, log = null) {
|
||||||
const logger = log || console;
|
const logger = getLoggerOrDefault(log);
|
||||||
|
|
||||||
// 1. If explicit path is provided, use it (highest priority)
|
// 1. If explicit path is provided, use it (highest priority)
|
||||||
if (explicitPath) {
|
if (explicitPath) {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ const mockGetBaseUrlForRole = jest.fn();
|
|||||||
const mockGetAllProviders = jest.fn();
|
const mockGetAllProviders = jest.fn();
|
||||||
const mockGetOllamaBaseURL = jest.fn();
|
const mockGetOllamaBaseURL = jest.fn();
|
||||||
const mockGetAzureBaseURL = jest.fn();
|
const mockGetAzureBaseURL = jest.fn();
|
||||||
|
const mockGetBedrockBaseURL = jest.fn();
|
||||||
const mockGetVertexProjectId = jest.fn();
|
const mockGetVertexProjectId = jest.fn();
|
||||||
const mockGetVertexLocation = jest.fn();
|
const mockGetVertexLocation = jest.fn();
|
||||||
const mockGetAvailableModels = jest.fn();
|
const mockGetAvailableModels = jest.fn();
|
||||||
@@ -113,6 +114,7 @@ jest.unstable_mockModule('../../scripts/modules/config-manager.js', () => ({
|
|||||||
getAllProviders: mockGetAllProviders,
|
getAllProviders: mockGetAllProviders,
|
||||||
getOllamaBaseURL: mockGetOllamaBaseURL,
|
getOllamaBaseURL: mockGetOllamaBaseURL,
|
||||||
getAzureBaseURL: mockGetAzureBaseURL,
|
getAzureBaseURL: mockGetAzureBaseURL,
|
||||||
|
getBedrockBaseURL: mockGetBedrockBaseURL,
|
||||||
getVertexProjectId: mockGetVertexProjectId,
|
getVertexProjectId: mockGetVertexProjectId,
|
||||||
getVertexLocation: mockGetVertexLocation,
|
getVertexLocation: mockGetVertexLocation,
|
||||||
getMcpApiKeyStatus: mockGetMcpApiKeyStatus
|
getMcpApiKeyStatus: mockGetMcpApiKeyStatus
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ const DEFAULT_CONFIG = {
|
|||||||
defaultSubtasks: 5,
|
defaultSubtasks: 5,
|
||||||
defaultPriority: 'medium',
|
defaultPriority: 'medium',
|
||||||
projectName: 'Task Master',
|
projectName: 'Task Master',
|
||||||
ollamaBaseURL: 'http://localhost:11434/api'
|
ollamaBaseURL: 'http://localhost:11434/api',
|
||||||
|
bedrockBaseURL: 'https://bedrock.us-east-1.amazonaws.com'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ jest.unstable_mockModule(
|
|||||||
getProjectName: jest.fn(() => 'Test Project'),
|
getProjectName: jest.fn(() => 'Test Project'),
|
||||||
getOllamaBaseURL: jest.fn(() => 'http://localhost:11434/api'),
|
getOllamaBaseURL: jest.fn(() => 'http://localhost:11434/api'),
|
||||||
getAzureBaseURL: jest.fn(() => undefined),
|
getAzureBaseURL: jest.fn(() => undefined),
|
||||||
|
getBedrockBaseURL: jest.fn(() => undefined),
|
||||||
getParametersForRole: jest.fn(() => ({
|
getParametersForRole: jest.fn(() => ({
|
||||||
maxTokens: 4000,
|
maxTokens: 4000,
|
||||||
temperature: 0.7
|
temperature: 0.7
|
||||||
|
|||||||
Reference in New Issue
Block a user