feat: Enhance Task Master CLI with Testing Framework, Perplexity AI Integration, and Refactored Core Logic
This commit introduces significant enhancements and refactoring to the Task Master CLI, focusing on improved testing, integration with Perplexity AI for research-backed task updates, and core logic refactoring for better maintainability and functionality.
**Testing Infrastructure Setup:**
- Implemented Jest as the primary testing framework, setting up a comprehensive testing environment.
- Added new test scripts to including , , and for streamlined testing workflows.
- Integrated necessary devDependencies for testing, such as , , , , and , to support unit, integration, and end-to-end testing.
**Dependency Updates:**
- Updated and to reflect the latest dependency versions, ensuring project stability and access to the newest features and security patches.
- Upgraded to version 0.9.16 and usage: openai [-h] [-v] [-b API_BASE] [-k API_KEY] [-p PROXY [PROXY ...]]
[-o ORGANIZATION] [-t {openai,azure}]
[--api-version API_VERSION] [--azure-endpoint AZURE_ENDPOINT]
[--azure-ad-token AZURE_AD_TOKEN] [-V]
{api,tools,migrate,grit} ...
positional arguments:
{api,tools,migrate,grit}
api Direct API calls
tools Client side tools for convenience
options:
-h, --help show this help message and exit
-v, --verbose Set verbosity.
-b, --api-base API_BASE
What API base url to use.
-k, --api-key API_KEY
What API key to use.
-p, --proxy PROXY [PROXY ...]
What proxy to use.
-o, --organization ORGANIZATION
Which organization to run as (will use your default
organization if not specified)
-t, --api-type {openai,azure}
The backend API to call, must be `openai` or `azure`
--api-version API_VERSION
The Azure API version, e.g.
'https://learn.microsoft.com/en-us/azure/ai-
services/openai/reference#rest-api-versioning'
--azure-endpoint AZURE_ENDPOINT
The Azure endpoint, e.g.
'https://endpoint.openai.azure.com'
--azure-ad-token AZURE_AD_TOKEN
A token from Azure Active Directory,
https://www.microsoft.com/en-
us/security/business/identity-access/microsoft-entra-
id
-V, --version show program's version number and exit to 4.89.0.
- Added dependency (version 2.3.0) and updated related dependencies to their latest versions.
**Perplexity AI Integration for Research-Backed Updates:**
- Introduced an option to leverage Perplexity AI for task updates, enabling research-backed enhancements to task details.
- Implemented logic to initialize a Perplexity AI client if the environment variable is available.
- Modified the function to accept a parameter, allowing dynamic selection between Perplexity AI and Claude AI for task updates based on API key availability and user preference.
- Enhanced to handle responses from Perplexity AI and update tasks accordingly, including improved error handling and logging for robust operation.
**Core Logic Refactoring and Improvements:**
- Refactored the function to utilize task IDs instead of dependency IDs, ensuring consistency and clarity in dependency management.
- Implemented a new function to rigorously check for both circular dependencies and self-dependencies within tasks, improving task relationship integrity.
- Enhanced UI elements in :
- Refactored to incorporate icons for different task statuses and utilize a object for color mapping, improving visual representation of task status.
- Updated to display colored complexity scores with emojis, providing a more intuitive and visually appealing representation of task complexity.
- Refactored the task data structure creation and validation process:
- Updated the JSON Schema for to reflect a more streamlined and efficient task structure.
- Implemented Task Model Classes for better data modeling and type safety.
- Improved File System Operations for task data management.
- Developed robust Validation Functions and an Error Handling System to ensure data integrity and application stability.
**Testing Guidelines Implementation:**
- Implemented guidelines for writing testable code when developing new features, promoting a test-driven development approach.
- Added testing requirements and best practices for unit, integration, and edge case testing to ensure comprehensive test coverage.
- Updated the development workflow to mandate writing tests before proceeding with configuration and documentation updates, reinforcing the importance of testing throughout the development lifecycle.
This commit collectively enhances the Task Master CLI's reliability, functionality, and developer experience through improved testing practices, AI-powered research capabilities, and a more robust and maintainable codebase.
2025-03-24 13:28:08 -04:00
|
|
|
/**
|
|
|
|
* Commands module tests
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { jest } from '@jest/globals';
|
|
|
|
|
|
|
|
// Mock modules
|
|
|
|
jest.mock('commander');
|
|
|
|
jest.mock('fs');
|
|
|
|
jest.mock('path');
|
|
|
|
jest.mock('../../scripts/modules/ui.js', () => ({
|
|
|
|
displayBanner: jest.fn(),
|
|
|
|
displayHelp: jest.fn()
|
|
|
|
}));
|
|
|
|
jest.mock('../../scripts/modules/task-manager.js');
|
|
|
|
jest.mock('../../scripts/modules/dependency-manager.js');
|
|
|
|
jest.mock('../../scripts/modules/utils.js', () => ({
|
|
|
|
CONFIG: {
|
|
|
|
projectVersion: '1.5.0'
|
|
|
|
},
|
2025-03-25 17:20:09 -04:00
|
|
|
log: jest.fn(),
|
|
|
|
detectCamelCaseFlags: jest.fn().mockImplementation((args) => {
|
|
|
|
const camelCaseRegex = /--([a-z]+[A-Z][a-zA-Z]+)/;
|
|
|
|
const flags = [];
|
|
|
|
for (const arg of args) {
|
|
|
|
const match = camelCaseRegex.exec(arg);
|
|
|
|
if (match) {
|
|
|
|
const original = match[1];
|
|
|
|
const kebabCase = original.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
|
|
flags.push({ original, kebabCase });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return flags;
|
|
|
|
})
|
feat: Enhance Task Master CLI with Testing Framework, Perplexity AI Integration, and Refactored Core Logic
This commit introduces significant enhancements and refactoring to the Task Master CLI, focusing on improved testing, integration with Perplexity AI for research-backed task updates, and core logic refactoring for better maintainability and functionality.
**Testing Infrastructure Setup:**
- Implemented Jest as the primary testing framework, setting up a comprehensive testing environment.
- Added new test scripts to including , , and for streamlined testing workflows.
- Integrated necessary devDependencies for testing, such as , , , , and , to support unit, integration, and end-to-end testing.
**Dependency Updates:**
- Updated and to reflect the latest dependency versions, ensuring project stability and access to the newest features and security patches.
- Upgraded to version 0.9.16 and usage: openai [-h] [-v] [-b API_BASE] [-k API_KEY] [-p PROXY [PROXY ...]]
[-o ORGANIZATION] [-t {openai,azure}]
[--api-version API_VERSION] [--azure-endpoint AZURE_ENDPOINT]
[--azure-ad-token AZURE_AD_TOKEN] [-V]
{api,tools,migrate,grit} ...
positional arguments:
{api,tools,migrate,grit}
api Direct API calls
tools Client side tools for convenience
options:
-h, --help show this help message and exit
-v, --verbose Set verbosity.
-b, --api-base API_BASE
What API base url to use.
-k, --api-key API_KEY
What API key to use.
-p, --proxy PROXY [PROXY ...]
What proxy to use.
-o, --organization ORGANIZATION
Which organization to run as (will use your default
organization if not specified)
-t, --api-type {openai,azure}
The backend API to call, must be `openai` or `azure`
--api-version API_VERSION
The Azure API version, e.g.
'https://learn.microsoft.com/en-us/azure/ai-
services/openai/reference#rest-api-versioning'
--azure-endpoint AZURE_ENDPOINT
The Azure endpoint, e.g.
'https://endpoint.openai.azure.com'
--azure-ad-token AZURE_AD_TOKEN
A token from Azure Active Directory,
https://www.microsoft.com/en-
us/security/business/identity-access/microsoft-entra-
id
-V, --version show program's version number and exit to 4.89.0.
- Added dependency (version 2.3.0) and updated related dependencies to their latest versions.
**Perplexity AI Integration for Research-Backed Updates:**
- Introduced an option to leverage Perplexity AI for task updates, enabling research-backed enhancements to task details.
- Implemented logic to initialize a Perplexity AI client if the environment variable is available.
- Modified the function to accept a parameter, allowing dynamic selection between Perplexity AI and Claude AI for task updates based on API key availability and user preference.
- Enhanced to handle responses from Perplexity AI and update tasks accordingly, including improved error handling and logging for robust operation.
**Core Logic Refactoring and Improvements:**
- Refactored the function to utilize task IDs instead of dependency IDs, ensuring consistency and clarity in dependency management.
- Implemented a new function to rigorously check for both circular dependencies and self-dependencies within tasks, improving task relationship integrity.
- Enhanced UI elements in :
- Refactored to incorporate icons for different task statuses and utilize a object for color mapping, improving visual representation of task status.
- Updated to display colored complexity scores with emojis, providing a more intuitive and visually appealing representation of task complexity.
- Refactored the task data structure creation and validation process:
- Updated the JSON Schema for to reflect a more streamlined and efficient task structure.
- Implemented Task Model Classes for better data modeling and type safety.
- Improved File System Operations for task data management.
- Developed robust Validation Functions and an Error Handling System to ensure data integrity and application stability.
**Testing Guidelines Implementation:**
- Implemented guidelines for writing testable code when developing new features, promoting a test-driven development approach.
- Added testing requirements and best practices for unit, integration, and edge case testing to ensure comprehensive test coverage.
- Updated the development workflow to mandate writing tests before proceeding with configuration and documentation updates, reinforcing the importance of testing throughout the development lifecycle.
This commit collectively enhances the Task Master CLI's reliability, functionality, and developer experience through improved testing practices, AI-powered research capabilities, and a more robust and maintainable codebase.
2025-03-24 13:28:08 -04:00
|
|
|
}));
|
|
|
|
|
|
|
|
// Import after mocking
|
|
|
|
import { setupCLI } from '../../scripts/modules/commands.js';
|
|
|
|
import { program } from 'commander';
|
|
|
|
import fs from 'fs';
|
|
|
|
import path from 'path';
|
2025-03-25 17:20:09 -04:00
|
|
|
import { detectCamelCaseFlags } from '../../scripts/modules/utils.js';
|
feat: Enhance Task Master CLI with Testing Framework, Perplexity AI Integration, and Refactored Core Logic
This commit introduces significant enhancements and refactoring to the Task Master CLI, focusing on improved testing, integration with Perplexity AI for research-backed task updates, and core logic refactoring for better maintainability and functionality.
**Testing Infrastructure Setup:**
- Implemented Jest as the primary testing framework, setting up a comprehensive testing environment.
- Added new test scripts to including , , and for streamlined testing workflows.
- Integrated necessary devDependencies for testing, such as , , , , and , to support unit, integration, and end-to-end testing.
**Dependency Updates:**
- Updated and to reflect the latest dependency versions, ensuring project stability and access to the newest features and security patches.
- Upgraded to version 0.9.16 and usage: openai [-h] [-v] [-b API_BASE] [-k API_KEY] [-p PROXY [PROXY ...]]
[-o ORGANIZATION] [-t {openai,azure}]
[--api-version API_VERSION] [--azure-endpoint AZURE_ENDPOINT]
[--azure-ad-token AZURE_AD_TOKEN] [-V]
{api,tools,migrate,grit} ...
positional arguments:
{api,tools,migrate,grit}
api Direct API calls
tools Client side tools for convenience
options:
-h, --help show this help message and exit
-v, --verbose Set verbosity.
-b, --api-base API_BASE
What API base url to use.
-k, --api-key API_KEY
What API key to use.
-p, --proxy PROXY [PROXY ...]
What proxy to use.
-o, --organization ORGANIZATION
Which organization to run as (will use your default
organization if not specified)
-t, --api-type {openai,azure}
The backend API to call, must be `openai` or `azure`
--api-version API_VERSION
The Azure API version, e.g.
'https://learn.microsoft.com/en-us/azure/ai-
services/openai/reference#rest-api-versioning'
--azure-endpoint AZURE_ENDPOINT
The Azure endpoint, e.g.
'https://endpoint.openai.azure.com'
--azure-ad-token AZURE_AD_TOKEN
A token from Azure Active Directory,
https://www.microsoft.com/en-
us/security/business/identity-access/microsoft-entra-
id
-V, --version show program's version number and exit to 4.89.0.
- Added dependency (version 2.3.0) and updated related dependencies to their latest versions.
**Perplexity AI Integration for Research-Backed Updates:**
- Introduced an option to leverage Perplexity AI for task updates, enabling research-backed enhancements to task details.
- Implemented logic to initialize a Perplexity AI client if the environment variable is available.
- Modified the function to accept a parameter, allowing dynamic selection between Perplexity AI and Claude AI for task updates based on API key availability and user preference.
- Enhanced to handle responses from Perplexity AI and update tasks accordingly, including improved error handling and logging for robust operation.
**Core Logic Refactoring and Improvements:**
- Refactored the function to utilize task IDs instead of dependency IDs, ensuring consistency and clarity in dependency management.
- Implemented a new function to rigorously check for both circular dependencies and self-dependencies within tasks, improving task relationship integrity.
- Enhanced UI elements in :
- Refactored to incorporate icons for different task statuses and utilize a object for color mapping, improving visual representation of task status.
- Updated to display colored complexity scores with emojis, providing a more intuitive and visually appealing representation of task complexity.
- Refactored the task data structure creation and validation process:
- Updated the JSON Schema for to reflect a more streamlined and efficient task structure.
- Implemented Task Model Classes for better data modeling and type safety.
- Improved File System Operations for task data management.
- Developed robust Validation Functions and an Error Handling System to ensure data integrity and application stability.
**Testing Guidelines Implementation:**
- Implemented guidelines for writing testable code when developing new features, promoting a test-driven development approach.
- Added testing requirements and best practices for unit, integration, and edge case testing to ensure comprehensive test coverage.
- Updated the development workflow to mandate writing tests before proceeding with configuration and documentation updates, reinforcing the importance of testing throughout the development lifecycle.
This commit collectively enhances the Task Master CLI's reliability, functionality, and developer experience through improved testing practices, AI-powered research capabilities, and a more robust and maintainable codebase.
2025-03-24 13:28:08 -04:00
|
|
|
|
|
|
|
describe('Commands Module', () => {
|
|
|
|
// Set up spies on the mocked modules
|
|
|
|
const mockName = jest.spyOn(program, 'name').mockReturnValue(program);
|
|
|
|
const mockDescription = jest.spyOn(program, 'description').mockReturnValue(program);
|
|
|
|
const mockVersion = jest.spyOn(program, 'version').mockReturnValue(program);
|
|
|
|
const mockHelpOption = jest.spyOn(program, 'helpOption').mockReturnValue(program);
|
|
|
|
const mockAddHelpCommand = jest.spyOn(program, 'addHelpCommand').mockReturnValue(program);
|
|
|
|
const mockOn = jest.spyOn(program, 'on').mockReturnValue(program);
|
|
|
|
const mockExistsSync = jest.spyOn(fs, 'existsSync');
|
|
|
|
const mockReadFileSync = jest.spyOn(fs, 'readFileSync');
|
|
|
|
const mockJoin = jest.spyOn(path, 'join');
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
jest.clearAllMocks();
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('setupCLI function', () => {
|
|
|
|
test('should return Commander program instance', () => {
|
|
|
|
const result = setupCLI();
|
|
|
|
|
|
|
|
// Verify the program was properly configured
|
|
|
|
expect(mockName).toHaveBeenCalledWith('dev');
|
|
|
|
expect(mockDescription).toHaveBeenCalledWith('AI-driven development task management');
|
|
|
|
expect(mockVersion).toHaveBeenCalled();
|
|
|
|
expect(mockHelpOption).toHaveBeenCalledWith('-h, --help', 'Display help');
|
|
|
|
expect(mockAddHelpCommand).toHaveBeenCalledWith(false);
|
|
|
|
expect(mockOn).toHaveBeenCalled();
|
|
|
|
expect(result).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should read version from package.json when available', () => {
|
|
|
|
// Setup mock for package.json existence and content
|
|
|
|
mockExistsSync.mockReturnValue(true);
|
|
|
|
mockReadFileSync.mockReturnValue(JSON.stringify({ version: '2.0.0' }));
|
|
|
|
mockJoin.mockReturnValue('/mock/path/package.json');
|
|
|
|
|
|
|
|
// Call the setup function
|
|
|
|
setupCLI();
|
|
|
|
|
|
|
|
// Get the version callback function
|
|
|
|
const versionCallback = mockVersion.mock.calls[0][0];
|
|
|
|
expect(typeof versionCallback).toBe('function');
|
|
|
|
|
|
|
|
// Execute the callback and check the result
|
|
|
|
const result = versionCallback();
|
|
|
|
expect(result).toBe('2.0.0');
|
|
|
|
|
|
|
|
// Verify the correct functions were called
|
|
|
|
expect(mockExistsSync).toHaveBeenCalled();
|
|
|
|
expect(mockReadFileSync).toHaveBeenCalled();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should use default version when package.json is not available', () => {
|
|
|
|
// Setup mock for package.json absence
|
|
|
|
mockExistsSync.mockReturnValue(false);
|
|
|
|
|
|
|
|
// Call the setup function
|
|
|
|
setupCLI();
|
|
|
|
|
|
|
|
// Get the version callback function
|
|
|
|
const versionCallback = mockVersion.mock.calls[0][0];
|
|
|
|
expect(typeof versionCallback).toBe('function');
|
|
|
|
|
|
|
|
// Execute the callback and check the result
|
|
|
|
const result = versionCallback();
|
|
|
|
expect(result).toBe('1.5.0'); // Updated to match the actual CONFIG.projectVersion
|
|
|
|
|
|
|
|
expect(mockExistsSync).toHaveBeenCalled();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should use default version when package.json reading throws an error', () => {
|
|
|
|
// Setup mock for package.json reading error
|
|
|
|
mockExistsSync.mockReturnValue(true);
|
|
|
|
mockReadFileSync.mockImplementation(() => {
|
|
|
|
throw new Error('Read error');
|
|
|
|
});
|
|
|
|
|
|
|
|
// Call the setup function
|
|
|
|
setupCLI();
|
|
|
|
|
|
|
|
// Get the version callback function
|
|
|
|
const versionCallback = mockVersion.mock.calls[0][0];
|
|
|
|
expect(typeof versionCallback).toBe('function');
|
|
|
|
|
|
|
|
// Execute the callback and check the result
|
|
|
|
const result = versionCallback();
|
|
|
|
expect(result).toBe('1.5.0'); // Updated to match the actual CONFIG.projectVersion
|
|
|
|
});
|
|
|
|
});
|
2025-03-25 17:20:09 -04:00
|
|
|
|
|
|
|
// Add a new describe block for kebab-case validation tests
|
|
|
|
describe('Kebab Case Validation', () => {
|
|
|
|
// Save the original process.argv
|
|
|
|
const originalArgv = process.argv;
|
|
|
|
|
|
|
|
// Reset process.argv after each test
|
|
|
|
afterEach(() => {
|
|
|
|
process.argv = originalArgv;
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should detect camelCase flags correctly', () => {
|
|
|
|
// Set up process.argv with a camelCase flag
|
|
|
|
process.argv = ['node', 'task-master', 'add-task', '--promptText=test'];
|
|
|
|
|
|
|
|
// Mock process.exit to prevent the test from actually exiting
|
|
|
|
const mockExit = jest.spyOn(process, 'exit').mockImplementation(() => {});
|
|
|
|
|
|
|
|
// Mock console.error to capture the error message
|
|
|
|
const mockConsoleError = jest.spyOn(console, 'error').mockImplementation(() => {});
|
|
|
|
|
|
|
|
// Create an action function similar to what's in task-master.js
|
|
|
|
const action = () => {
|
|
|
|
const camelCaseFlags = detectCamelCaseFlags(process.argv);
|
|
|
|
if (camelCaseFlags.length > 0) {
|
|
|
|
console.error('\nError: Please use kebab-case for CLI flags:');
|
|
|
|
camelCaseFlags.forEach(flag => {
|
|
|
|
console.error(` Instead of: --${flag.original}`);
|
|
|
|
console.error(` Use: --${flag.kebabCase}`);
|
|
|
|
});
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// Call the action function
|
|
|
|
action();
|
|
|
|
|
|
|
|
// Verify that process.exit was called with 1
|
|
|
|
expect(mockExit).toHaveBeenCalledWith(1);
|
|
|
|
|
|
|
|
// Verify console.error messages
|
|
|
|
expect(mockConsoleError).toHaveBeenCalledWith(
|
|
|
|
expect.stringContaining('Please use kebab-case for CLI flags')
|
|
|
|
);
|
|
|
|
expect(mockConsoleError).toHaveBeenCalledWith(
|
|
|
|
expect.stringContaining('Instead of: --promptText')
|
|
|
|
);
|
|
|
|
expect(mockConsoleError).toHaveBeenCalledWith(
|
|
|
|
expect.stringContaining('Use: --prompt-text')
|
|
|
|
);
|
|
|
|
|
|
|
|
// Clean up
|
|
|
|
mockExit.mockRestore();
|
|
|
|
mockConsoleError.mockRestore();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should accept kebab-case flags correctly', () => {
|
|
|
|
// Import the function we're testing
|
|
|
|
jest.resetModules();
|
|
|
|
|
|
|
|
// Mock process.exit to prevent the test from actually exiting
|
|
|
|
const mockExit = jest.spyOn(process, 'exit').mockImplementation(() => {});
|
|
|
|
|
|
|
|
// Mock console.error to verify it's not called with kebab-case error
|
|
|
|
const mockConsoleError = jest.spyOn(console, 'error').mockImplementation(() => {});
|
|
|
|
|
|
|
|
// Set up process.argv with a valid kebab-case flag
|
|
|
|
process.argv = ['node', 'task-master', 'add-task', '--prompt-text=test'];
|
|
|
|
|
|
|
|
// Mock the runDevScript function to prevent actual execution
|
|
|
|
jest.doMock('../../bin/task-master.js', () => {
|
|
|
|
const actual = jest.requireActual('../../bin/task-master.js');
|
|
|
|
return {
|
|
|
|
...actual,
|
|
|
|
runDevScript: jest.fn()
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
// Run the module which should not error for kebab-case
|
|
|
|
try {
|
|
|
|
require('../../bin/task-master.js');
|
|
|
|
} catch (e) {
|
|
|
|
// Ignore any errors from the module
|
|
|
|
}
|
|
|
|
|
|
|
|
// Verify that process.exit was not called with error code 1
|
|
|
|
// Note: It might be called for other reasons so we just check it's not called with 1
|
|
|
|
expect(mockExit).not.toHaveBeenCalledWith(1);
|
|
|
|
|
|
|
|
// Verify that console.error was not called with kebab-case error message
|
|
|
|
expect(mockConsoleError).not.toHaveBeenCalledWith(
|
|
|
|
expect.stringContaining('Please use kebab-case for CLI flags')
|
|
|
|
);
|
|
|
|
|
|
|
|
// Clean up
|
|
|
|
mockExit.mockRestore();
|
|
|
|
mockConsoleError.mockRestore();
|
|
|
|
});
|
|
|
|
});
|
feat: Enhance Task Master CLI with Testing Framework, Perplexity AI Integration, and Refactored Core Logic
This commit introduces significant enhancements and refactoring to the Task Master CLI, focusing on improved testing, integration with Perplexity AI for research-backed task updates, and core logic refactoring for better maintainability and functionality.
**Testing Infrastructure Setup:**
- Implemented Jest as the primary testing framework, setting up a comprehensive testing environment.
- Added new test scripts to including , , and for streamlined testing workflows.
- Integrated necessary devDependencies for testing, such as , , , , and , to support unit, integration, and end-to-end testing.
**Dependency Updates:**
- Updated and to reflect the latest dependency versions, ensuring project stability and access to the newest features and security patches.
- Upgraded to version 0.9.16 and usage: openai [-h] [-v] [-b API_BASE] [-k API_KEY] [-p PROXY [PROXY ...]]
[-o ORGANIZATION] [-t {openai,azure}]
[--api-version API_VERSION] [--azure-endpoint AZURE_ENDPOINT]
[--azure-ad-token AZURE_AD_TOKEN] [-V]
{api,tools,migrate,grit} ...
positional arguments:
{api,tools,migrate,grit}
api Direct API calls
tools Client side tools for convenience
options:
-h, --help show this help message and exit
-v, --verbose Set verbosity.
-b, --api-base API_BASE
What API base url to use.
-k, --api-key API_KEY
What API key to use.
-p, --proxy PROXY [PROXY ...]
What proxy to use.
-o, --organization ORGANIZATION
Which organization to run as (will use your default
organization if not specified)
-t, --api-type {openai,azure}
The backend API to call, must be `openai` or `azure`
--api-version API_VERSION
The Azure API version, e.g.
'https://learn.microsoft.com/en-us/azure/ai-
services/openai/reference#rest-api-versioning'
--azure-endpoint AZURE_ENDPOINT
The Azure endpoint, e.g.
'https://endpoint.openai.azure.com'
--azure-ad-token AZURE_AD_TOKEN
A token from Azure Active Directory,
https://www.microsoft.com/en-
us/security/business/identity-access/microsoft-entra-
id
-V, --version show program's version number and exit to 4.89.0.
- Added dependency (version 2.3.0) and updated related dependencies to their latest versions.
**Perplexity AI Integration for Research-Backed Updates:**
- Introduced an option to leverage Perplexity AI for task updates, enabling research-backed enhancements to task details.
- Implemented logic to initialize a Perplexity AI client if the environment variable is available.
- Modified the function to accept a parameter, allowing dynamic selection between Perplexity AI and Claude AI for task updates based on API key availability and user preference.
- Enhanced to handle responses from Perplexity AI and update tasks accordingly, including improved error handling and logging for robust operation.
**Core Logic Refactoring and Improvements:**
- Refactored the function to utilize task IDs instead of dependency IDs, ensuring consistency and clarity in dependency management.
- Implemented a new function to rigorously check for both circular dependencies and self-dependencies within tasks, improving task relationship integrity.
- Enhanced UI elements in :
- Refactored to incorporate icons for different task statuses and utilize a object for color mapping, improving visual representation of task status.
- Updated to display colored complexity scores with emojis, providing a more intuitive and visually appealing representation of task complexity.
- Refactored the task data structure creation and validation process:
- Updated the JSON Schema for to reflect a more streamlined and efficient task structure.
- Implemented Task Model Classes for better data modeling and type safety.
- Improved File System Operations for task data management.
- Developed robust Validation Functions and an Error Handling System to ensure data integrity and application stability.
**Testing Guidelines Implementation:**
- Implemented guidelines for writing testable code when developing new features, promoting a test-driven development approach.
- Added testing requirements and best practices for unit, integration, and edge case testing to ensure comprehensive test coverage.
- Updated the development workflow to mandate writing tests before proceeding with configuration and documentation updates, reinforcing the importance of testing throughout the development lifecycle.
This commit collectively enhances the Task Master CLI's reliability, functionality, and developer experience through improved testing practices, AI-powered research capabilities, and a more robust and maintainable codebase.
2025-03-24 13:28:08 -04:00
|
|
|
});
|