-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: add context7 as an mcp tool to taskmaster ai sdk calls #1447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
feat: add context7 as an mcp tool to taskmaster ai sdk calls #1447
Conversation
|
WalkthroughThis PR introduces a new Changes
Sequence DiagramsequenceDiagram
participant Consumer
participant MCPMgr as MCP Tools Manager
participant C7 as Context7 Client
participant Transport
participant MCPClient as MCP Client
Consumer->>MCPMgr: createMCPTools(config?)
MCPMgr->>MCPMgr: probe isContext7Available()
alt Context7 Available
MCPMgr->>C7: createContext7Tools(options)
C7->>C7: getApiKey(config)
C7->>Transport: new Experimental_StdioMCPTransport
C7->>MCPClient: experimental_createMCPClient({transport})
MCPClient->>MCPClient: initialize & fetch tools
MCPClient-->>C7: return tools + close()
C7-->>MCPMgr: {tools, close()}
MCPMgr->>MCPMgr: merge tools into combined map
else Unavailable
MCPMgr->>MCPMgr: log warning, continue
end
MCPMgr-->>Consumer: {tools, close()}
Estimated code review effort๐ฏ 3 (Moderate) | โฑ๏ธ ~25 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touchesโ Passed checks (3 passed)
โจ Finishing touches
๐งช Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
๐งน Nitpick comments (3)
CHANGELOG.md (1)
3-18: 0.35.0 changelog entry is consistent; keep Context7 changes covered in a followโup entryThe new 0.35.0 section follows the existing format and correctly references past PRs. Just make sure the Context7 MCP tools work in this PR also get a changeset so they show up in the next version section rather than silently riding on 0.35.0.
packages/ai-sdk-tools/package.json (1)
1-37: Align internal package version handling with existing conventionThe manifest looks good overall and matches the internal
tm/*pattern (exports โ src, main โ dist). The only outlier is:
"version": ""โ other internal/private packages typically omitversionentirely to avoid changesets trying to publish them.To stay consistent and avoid potential tooling/validation issues, consider dropping the
versionfield instead of setting it to an empty string:- "author": "Task Master AI", - "version": "" + "author": "Task Master AI"packages/ai-sdk-tools/src/context7/client.ts (1)
1-94: Wire uponErrorincreateContext7Toolsso the option is meaningfulThe Context7 client setup and API key resolution look solid for a Node/stdio MCP wrapper. One small gap:
Context7ToolsOptionsexposes anonErrorcallback, butcreateContext7Toolsnever calls it, so the option is effectively dead.You can keep the current behavior (errors still propagate) and just invoke
onErroras a side effect when something goes wrong:-export async function createContext7Tools( - options?: Context7ToolsOptions -): Promise<Context7ToolsResult> { - const apiKey = getApiKey(options?.config); - - const transport = new Experimental_StdioMCPTransport({ - command: 'npx', - args: ['-y', '@upstash/context7-mcp', '--api-key', apiKey] - }); - - const client = await experimental_createMCPClient({ - transport - }); - - options?.onReady?.(); - - const tools = await client.tools(); - - return { - tools, - close: async () => { - await client.close(); - } - }; -} +export async function createContext7Tools( + options?: Context7ToolsOptions +): Promise<Context7ToolsResult> { + try { + const apiKey = getApiKey(options?.config); + + const transport = new Experimental_StdioMCPTransport({ + command: 'npx', + args: ['-y', '@upstash/context7-mcp', '--api-key', apiKey], + }); + + const client = await experimental_createMCPClient({ transport }); + + options?.onReady?.(); + + const tools = await client.tools(); + + return { + tools, + close: async () => { + await client.close(); + }, + }; + } catch (error) { + if (options?.onError && error instanceof Error) { + options.onError(error); + } + throw error; + } +}That keeps the API simple while making the callback genuinely useful for callers who want to hook into failures.
๐ Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
โ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
๐ Files selected for processing (17)
.changeset/calm-times-marry.md(0 hunks).changeset/dry-wombats-marry.md(0 hunks).changeset/gemini-cli-native-structured-output.md(0 hunks).changeset/modern-snakes-mate.md(0 hunks).changeset/native-structured-outputs.md(0 hunks).changeset/nine-worlds-deny.md(0 hunks).changeset/rich-kings-fold.md(0 hunks)CHANGELOG.md(1 hunks)package.json(1 hunks)packages/ai-sdk-tools/package.json(1 hunks)packages/ai-sdk-tools/src/context7/client.ts(1 hunks)packages/ai-sdk-tools/src/context7/index.ts(1 hunks)packages/ai-sdk-tools/src/context7/types.ts(1 hunks)packages/ai-sdk-tools/src/index.ts(1 hunks)packages/ai-sdk-tools/src/mcp-tools-manager.ts(1 hunks)packages/ai-sdk-tools/tsconfig.json(1 hunks)tsconfig.json(1 hunks)
๐ค Files with no reviewable changes (7)
- .changeset/rich-kings-fold.md
- .changeset/modern-snakes-mate.md
- .changeset/gemini-cli-native-structured-output.md
- .changeset/nine-worlds-deny.md
- .changeset/calm-times-marry.md
- .changeset/native-structured-outputs.md
- .changeset/dry-wombats-marry.md
๐งฐ Additional context used
๐ Path-based instructions (5)
package.json
๐ CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)
package.json scripts must include: 'test', 'test:watch', 'test:coverage', 'test:unit', 'test:integration', 'test:e2e', and 'test:ci' commands for testing framework integration
Files:
package.json
**/*.ts
๐ CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)
TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds
Files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/context7/types.tspackages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/context7/client.ts
**/*.{js,ts}
๐ CodeRabbit inference engine (.cursor/rules/utilities.mdc)
**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements
Files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/context7/types.tspackages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/context7/client.ts
**/*.{ts,tsx}
๐ CodeRabbit inference engine (CLAUDE.md)
Import modules with
.jsextension even in TypeScript source files for ESM compatibility
Files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/context7/types.tspackages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/context7/client.ts
**/*.md
๐ CodeRabbit inference engine (.cursor/rules/ai_providers.mdc)
Update relevant documentation (like
README.md) mentioning supported providers or configuration when adding a new AI provider
Files:
CHANGELOG.md
๐ง Learnings (56)
๐ Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-11-24T18:05:23.891Z
Learning: Applies to assets/.claude/settings.json : Configure Claude Code tool allowlist in `.claude/settings.json` to allow Task Master bash commands and MCP tools
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Use MCP tools (e.g., get_tasks, add_task) as the preferred method for programmatic interaction in integrated environments like Cursor, treating CLI commands as a fallback for direct user interaction and when MCP server is unavailable
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.390Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Pass the `session` object (from context parameter) to the AI service call when in MCP context
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to taskmaster.mdc for comprehensive reference of Taskmaster MCP tools and CLI commands with tagged task lists information
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to changeset.mdc for guidelines on using Changesets (npm run changeset) to manage versioning and changelogs
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-11-24T17:58:19.822Z
Learning: Run `npm run changeset` after staging a logical set of changes that should be communicated in the next release's `CHANGELOG.md` for new features, bug fixes, breaking changes, performance improvements, significant refactoring, user-facing documentation updates, dependency updates, or build/tooling changes
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/build-config/package.json:14-15
Timestamp: 2025-09-22T19:45:13.323Z
Learning: In the eyaltoledano/claude-task-master repository, Crunchyman-ralph intentionally omits version fields from internal packages (like tm/build-config) to prevent changesets from releasing new versions for these packages. This is the desired behavior for internal tooling packages that should not be published or versioned independently.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/tm-core/package.json:50-51
Timestamp: 2025-09-22T19:45:04.337Z
Learning: In the eyaltoledano/claude-task-master project, Crunchyman-ralph intentionally omits version fields from internal/private packages in package.json files to prevent changesets from releasing new versions of these packages while still allowing them to be processed for dependency updates. The changesets warnings about missing versions are acceptable as they don't break the process and achieve the desired behavior of only releasing public packages.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
๐ Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.
Applied to files:
packages/ai-sdk-tools/tsconfig.jsonpackage.jsontsconfig.jsonpackages/ai-sdk-tools/package.json
๐ Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.
Applied to files:
packages/ai-sdk-tools/tsconfig.jsonpackage.jsonpackages/ai-sdk-tools/src/index.tstsconfig.jsonpackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/package.json
๐ Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.
Applied to files:
packages/ai-sdk-tools/tsconfig.jsontsconfig.jsonpackages/ai-sdk-tools/package.json
๐ Learning: 2025-11-24T18:03:13.408Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.408Z
Learning: Applies to jest.config.js : Jest configuration must use ts-jest preset for TypeScript support, configure test environment as 'node', set roots to ['<rootDir>/src', '<rootDir>/tests'], and include testMatch patterns for both *.test.ts and *.spec.ts files with separate projects for unit, integration, and e2e tests
Applied to files:
packages/ai-sdk-tools/tsconfig.jsontsconfig.json
๐ Learning: 2025-09-17T19:09:08.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: jest.resolver.cjs:8-15
Timestamp: 2025-09-17T19:09:08.882Z
Learning: In the eyaltoledano/claude-task-master project, the team only uses .ts files and does not plan to use .tsx or .mts extensions, so Jest resolver and build tooling should focus on .js โ .ts mapping only.
Applied to files:
packages/ai-sdk-tools/tsconfig.jsontsconfig.json
๐ Learning: 2025-09-26T19:03:33.225Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.
Applied to files:
packages/ai-sdk-tools/tsconfig.jsonpackage.jsontsconfig.jsonpackages/ai-sdk-tools/package.json
๐ Learning: 2025-09-26T19:07:10.485Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.
Applied to files:
packages/ai-sdk-tools/tsconfig.jsontsconfig.jsonpackages/ai-sdk-tools/package.json
๐ Learning: 2025-11-24T22:09:45.426Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.426Z
Learning: Applies to **/*.{ts,tsx} : Import modules with `.js` extension even in TypeScript source files for ESM compatibility
Applied to files:
packages/ai-sdk-tools/tsconfig.jsontsconfig.json
๐ Learning: 2025-09-24T15:46:28.029Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1114
File: src/ai-providers/gemini-cli.js:12-12
Timestamp: 2025-09-24T15:46:28.029Z
Learning: When AI SDK provider packages are moved from optional dependencies to required dependencies in package.json, static imports should be used instead of dynamic imports with error handling, as the package is guaranteed to be available at runtime.
Applied to files:
packages/ai-sdk-tools/tsconfig.jsonpackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/package.json
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Export all utility functions explicitly in logical groups and include configuration constants from utility modules
Applied to files:
packages/ai-sdk-tools/tsconfig.jsonpackages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T18:03:13.408Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.408Z
Learning: Applies to src/**/*.ts : Source code must have corresponding test files either colocated (*.test.ts) or in tests/unit/ directory following established patterns from src/utils/auth.test.ts with proper mocking for external dependencies
Applied to files:
packages/ai-sdk-tools/tsconfig.json
๐ Learning: 2025-09-22T19:45:04.337Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/tm-core/package.json:50-51
Timestamp: 2025-09-22T19:45:04.337Z
Learning: In the eyaltoledano/claude-task-master project, Crunchyman-ralph intentionally omits version fields from internal/private packages in package.json files to prevent changesets from releasing new versions of these packages while still allowing them to be processed for dependency updates. The changesets warnings about missing versions are acceptable as they don't break the process and achieve the desired behavior of only releasing public packages.
Applied to files:
package.jsonpackages/ai-sdk-tools/package.json
๐ Learning: 2025-11-24T17:58:07.977Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: The Task Master CLI uses a modular architecture with distinct modules responsible for different aspects: commands.js (CLI command handling), task-manager.js (task data & core logic), dependency-manager.js (dependency management), ui.js (output formatting), ai-services-unified.js (unified AI service layer), config-manager.js (configuration management), utils.js (core utility functions), and mcp-server/ (MCP interface)
Applied to files:
package.jsonpackages/ai-sdk-tools/package.json
๐ Learning: 2025-11-24T17:56:52.238Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/GEMINI.md:0-0
Timestamp: 2025-11-24T17:56:52.238Z
Learning: Applies to assets/.gemini/settings.json : Configure Task Master MCP server in ~/.gemini/settings.json with the command 'npx' and args ['-y', 'task-master-ai']
Applied to files:
package.json
๐ Learning: 2025-11-24T18:05:02.103Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.103Z
Learning: Use the global CLI command `task-master` instead of `node scripts/dev.js` for all task management operations
Applied to files:
package.json
๐ Learning: 2025-11-24T17:58:07.977Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters
Applied to files:
package.json
๐ Learning: 2025-11-24T18:02:22.277Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-11-24T18:02:22.277Z
Learning: Applies to .taskmaster/config.json : The .taskmaster/config.json file stores AI model configuration (main, research, fallback models) managed via 'task-master models' command
Applied to files:
package.jsonpackages/ai-sdk-tools/package.json
๐ Learning: 2025-08-07T13:00:22.966Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1090
File: apps/extension/package.json:241-243
Timestamp: 2025-08-07T13:00:22.966Z
Learning: In monorepos, local packages should use "*" as the version constraint in package.json dependencies, as recommended by npm. This ensures the local version from within the same workspace is always used, rather than attempting to resolve from external registries. This applies to packages like task-master-ai within the eyaltoledano/claude-task-master monorepo.
Applied to files:
package.json
๐ Learning: 2025-09-22T19:45:13.323Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/build-config/package.json:14-15
Timestamp: 2025-09-22T19:45:13.323Z
Learning: In the eyaltoledano/claude-task-master repository, Crunchyman-ralph intentionally omits version fields from internal packages (like tm/build-config) to prevent changesets from releasing new versions for these packages. This is the desired behavior for internal tooling packages that should not be published or versioned independently.
Applied to files:
package.jsonCHANGELOG.md
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/index.js : Import and call tool registration functions in mcp-server/src/tools/index.js to register new MCP tools with the server
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/index.js : Register MCP tools by importing and calling registration functions in `mcp-server/src/tools/index.js`
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T17:58:07.977Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: New MCP tools should be imported and registered in mcp-server/src/tools/index.js and tool definitions should be added to mcp.json
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T22:09:45.426Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.426Z
Learning: Applies to apps/mcp/src/**/*.{ts,tsx} : MCP (tm/mcp) should be a thin presentation layer that calls tm-core methods and returns MCP-formatted responses; handle only MCP-specific concerns like tool schemas, parameter validation, and response formatting
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/*.js : Create MCP tool definitions in `mcp-server/src/tools/` using kebab-case naming; use zod for parameter validation; make projectRoot optional as the HOF handles fallback; wrap execute method with `withNormalizedProjectRoot`
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:02:49.769Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.769Z
Learning: Applies to mcp-server/src/tools/**/*.js : MCP tools in mcp-server/src/tools/ must call the corresponding direct function wrapper and pass the result object to handleApiResult(result, log) from mcp-server/src/tools/utils.js
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Access API keys for AI services via the session.env object in the MCP context rather than reading environment variables directly
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Use the AsyncOperationManager in the MCP tool layer for operations involving multiple steps or long waits beyond a single AI call; simple AI calls handled entirely within the *Direct function may not need it
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to mcp-server/src/tools/**/*.{js,ts} : Use the withNormalizedProjectRoot Higher-Order Function to wrap tool execute methods, ensuring normalized project root is injected into args
Applied to files:
packages/ai-sdk-tools/src/index.ts
๐ Learning: 2025-11-24T17:57:14.728Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.728Z
Learning: Use the `models` MCP tool or the `task-master models` CLI command to manage AI configurations
Applied to files:
packages/ai-sdk-tools/src/index.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to scripts/modules/*.js : Import context gathering utilities (`ContextGatherer`, `FuzzyTaskSearch`) for AI-powered commands; support multiple context types (tasks, files, custom text, project tree); implement detailed token breakdown display
Applied to files:
packages/ai-sdk-tools/src/index.tspackages/ai-sdk-tools/src/context7/types.tspackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Call the corresponding *Direct function wrapper from task-master-core.js within the execute method of each MCP tool, passing necessary arguments and the logger
Applied to files:
packages/ai-sdk-tools/src/index.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Applied to files:
packages/ai-sdk-tools/src/context7/types.tspackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : For context-aware AI commands: use ContextGatherer utility for multi-source context extraction, support task IDs/file paths/custom context, implement fuzzy search for task discovery, and display detailed token breakdown for transparency
Applied to files:
packages/ai-sdk-tools/src/context7/types.tspackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to .cursor/mcp.json : Add new tool definitions to the tools array in `.cursor/mcp.json`
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:02:22.277Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-11-24T18:02:22.277Z
Learning: Use MCP tools instead of CLI commands when available for better performance, structured data, and error handling
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Use createErrorResponse and createContentResponse utilities from tools/utils.js for formatting MCP responses
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T17:57:31.390Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.390Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js, scripts/modules/ai-services-unified.js : Do not import or call anything from deprecated AI service files (`ai-services.js`, `ai-client-factory.js`, `ai-client-utils.js`)
Applied to files:
tsconfig.json
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,ts} : Do not call AI-specific getters (like getMainModelId, getMainMaxTokens) from core logic functions in scripts/modules/task-manager/*. Instead, pass the role to the unified AI service
Applied to files:
tsconfig.json
๐ Learning: 2025-11-24T17:57:14.728Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.728Z
Learning: Applies to src/ai-providers/*.js : Provider modules in `src/ai-providers/` must import `generateText`, `streamText`, `generateObject` from the `ai` package, the provider's `create<ProviderName>` function from `ai-sdk/<provider-name>`, and the `log` utility from `../../scripts/modules/utils.js`
Applied to files:
tsconfig.jsonpackages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/package.json
๐ Learning: 2025-11-24T22:09:45.426Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.426Z
Learning: Applies to **/*.spec.ts : Place package and app test files in `packages/<package-name>/src/<module>/<file>.spec.ts` or `apps/<app-name>/src/<module>/<file>.spec.ts` alongside source files
Applied to files:
tsconfig.json
๐ Learning: 2025-10-08T19:57:00.982Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1282
File: packages/tm-core/src/utils/index.ts:16-34
Timestamp: 2025-10-08T19:57:00.982Z
Learning: For the tm-core package in the eyaltoledano/claude-task-master repository, the team prefers a minimal, need-based export strategy in index files rather than exposing all internal utilities. Exports should only be added when functions are actually consumed by other packages in the monorepo.
Applied to files:
packages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/package.json
๐ Learning: 2025-11-24T17:59:00.042Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.042Z
Learning: Applies to scripts/modules/utils/{contextGatherer,fuzzyTaskSearch}.js : Export utility modules using named exports: `ContextGatherer`, `createContextGatherer` from contextGatherer.js and `FuzzyTaskSearch`, `PURPOSE_CATEGORIES`, `RELEVANCE_THRESHOLDS` from fuzzyTaskSearch.js
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T17:59:00.042Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.042Z
Learning: Applies to scripts/**/*.js : Use the `ContextGatherer` class from `scripts/modules/utils/contextGatherer.js` to extract context from multiple sources (tasks, files, custom text, project tree) with token counting using `gpt-tokens` library
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-07-31T20:49:04.638Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 997
File: apps/extension/package.publish.json:2-8
Timestamp: 2025-07-31T20:49:04.638Z
Learning: In the eyaltoledano/claude-task-master repository, the VS Code extension uses a 3-file packaging system where package.json (with name "extension") is for development within the monorepo, while package.publish.json (with name "task-master-hamster") contains the clean manifest for VS Code marketplace publishing. The different names are intentional and serve distinct purposes in the build and publishing workflow.
Applied to files:
packages/ai-sdk-tools/package.json
๐ Learning: 2025-07-17T21:33:57.585Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.
Applied to files:
packages/ai-sdk-tools/package.jsonCHANGELOG.md
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : Direct functions should receive context containing only { session } when needed for AI keys or configuration; do not pass reportProgress to direct functions
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : For AI-powered commands that benefit from project context, use the ContextGatherer utility for multi-source context extraction, support task IDs, file paths, custom context, and project tree, implement fuzzy search for automatic task discovery, and display detailed token breakdown for transparency.
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T17:57:14.728Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.728Z
Learning: API keys are essential for most AI providers and must be configured correctly. Keys should be set in `.cursor/mcp.json` env section for MCP/Cursor, or in a `.env` file in the project root for CLI usage.
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:00:06.781Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:06.781Z
Learning: Applies to {.env,.cursor/mcp.json} : API keys for AI providers should be placed in `.env` file in project root for CLI usage, or in `env` section of `.cursor/mcp.json` for MCP/Cursor integration
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T17:57:31.390Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.390Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : API keys must be configured in `.env` (for CLI) or `.cursor/mcp.json` (for MCP); ensure they are correctly resolved via `session.env` in MCP contexts
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-10-10T16:52:51.399Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1286
File: apps/cli/src/utils/auto-update.ts:63-110
Timestamp: 2025-10-10T16:52:51.399Z
Learning: In the claude-task-master repository, the main branch always contains the latest released code due to automatic CI releases when changes are merged. The next branch contains unreleased changes. This means main branch = latest release.
Applied to files:
CHANGELOG.md
๐ Learning: 2025-11-24T18:00:32.587Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Applied to files:
CHANGELOG.md
๐ Learning: 2025-11-24T18:00:32.587Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to taskmaster.mdc for comprehensive reference of Taskmaster MCP tools and CLI commands with tagged task lists information
Applied to files:
CHANGELOG.md
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test
๐ Additional comments (12)
package.json (1)
3-3: Version bump looks fine; ensure itโs driven by your changeset/release flowThe 0.35.0 bump aligns with the new CHANGELOG section. Just confirm this PR is the one running
changeset version/ release so autoโupdate logic and tooling stay in sync.packages/ai-sdk-tools/src/context7/types.ts (1)
1-45: Context7 type surface is clear and matches the client usageThe config/options/result interfaces are well-scoped and documented, and they line up cleanly with how
createContext7ToolsandisContext7Availableare implemented.packages/ai-sdk-tools/tsconfig.json (1)
1-36: TS config is strict and consistent with NodeNext/ESM usageThis tsconfig is aligned with the repoโs NodeNext/ESM setup and uses a solid set of strict flags for the new package. Nothing blocking from here.
tsconfig.json (1)
32-34: LGTM!The path aliases follow the established pattern for internal packages, pointing to TypeScript source files as expected for build-time bundling with tsdown.
packages/ai-sdk-tools/src/index.ts (2)
1-14: LGTM!Clear documentation with helpful usage examples showing both direct imports and the MCP tools manager pattern.
16-25: LGTM!Export structure follows best practices with proper .js extensions for ESM compatibility.
packages/ai-sdk-tools/src/mcp-tools-manager.ts (5)
1-5: LGTM!Imports follow ESM conventions with proper .js extensions.
7-35: LGTM!Type definitions are well-structured with clear documentation. The
Record<string, unknown>type for tools is appropriate for aggregating heterogeneous tool sets from multiple MCP sources.
37-80: LGTM!Excellent documentation with clear usage examples. Function setup with separate tracking arrays for cleanup functions and enabled sources is well-organized.
81-104: Context7 initialization logic is sound.The availability check on line 94 is necessary for the explicit configuration case (when
config?.context7is a truthy value) and provides a safeguard in the auto-detect case. The error handling pattern (warn-and-continue) is appropriate for preventing single source failures from breaking the entire tool manager.
106-126: LGTM!Return structure is well-designed with proper async cleanup coordination. The
getAvailableMCPToolsutility function provides useful inspection capabilities without requiring initialization.packages/ai-sdk-tools/src/context7/index.ts (1)
1-11: LGTM!Clean barrel export pattern with proper .js extensions and good separation between runtime exports and type exports. The focused API surface aligns with the minimal export strategy for internal packages.
105bd7d to
d7e6396
Compare
Adds a new package @tm/ai-tools that provides AI SDK tool integrations
for Task Master. Starts with Context7 MCP support for documentation
lookup capabilities.
Package features:
- createContext7Tools() - Creates MCP client for Context7 documentation
- createMCPTools() - Auto-detects and combines available MCP tools
- isContext7Available() - Checks if CONTEXT7_API_KEY is configured
- getAvailableMCPTools() - Lists available MCP tool sources
Usage:
import { createContext7Tools } from '@tm/ai-tools/context7';
import { createMCPTools } from '@tm/ai-tools';
The package uses @ai-sdk/mcp for MCP client functionality.
d7e6396 to
5291993
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
๐งน Nitpick comments (1)
packages/ai-sdk-tools/src/mcp-tools-manager.ts (1)
74-104: Config and auto-detect logic work but could be simplifiedThe
context7enable/disable behavior is correct (explicitfalsedisables, otherwise auto-detects viaisContext7Available), and failures increateContext7Toolsare handled non-fatally, which is good. However,isContext7Available(context7Config)is evaluated both in theshouldEnableContext7logic (whenconfigis unset) and again in theifguard, and theContext7Config | booleanunion leads to slightly convoluted branching. If you touch this again, consider computing a singlecontext7Configand a singlecontext7Availableflag once, then using that in bothcreateMCPToolsandgetAvailableMCPToolsfor simpler control flow.
๐ Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
โ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
๐ Files selected for processing (8)
packages/ai-sdk-tools/package.json(1 hunks)packages/ai-sdk-tools/src/context7/client.ts(1 hunks)packages/ai-sdk-tools/src/context7/index.ts(1 hunks)packages/ai-sdk-tools/src/context7/types.ts(1 hunks)packages/ai-sdk-tools/src/index.ts(1 hunks)packages/ai-sdk-tools/src/mcp-tools-manager.ts(1 hunks)packages/ai-sdk-tools/tsconfig.json(1 hunks)tsconfig.json(1 hunks)
๐ง Files skipped from review as they are similar to previous changes (5)
- packages/ai-sdk-tools/package.json
- packages/ai-sdk-tools/src/context7/types.ts
- tsconfig.json
- packages/ai-sdk-tools/src/index.ts
- packages/ai-sdk-tools/tsconfig.json
๐งฐ Additional context used
๐ Path-based instructions (3)
**/*.ts
๐ CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)
TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds
Files:
packages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/client.ts
**/*.{js,ts}
๐ CodeRabbit inference engine (.cursor/rules/utilities.mdc)
**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements
Files:
packages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/client.ts
**/*.{ts,tsx}
๐ CodeRabbit inference engine (CLAUDE.md)
Import modules with
.jsextension even in TypeScript source files for ESM compatibility
Files:
packages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/client.ts
๐ง Learnings (31)
๐ Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-11-24T18:05:23.891Z
Learning: Applies to assets/.claude/settings.json : Configure Claude Code tool allowlist in `.claude/settings.json` to allow Task Master bash commands and MCP tools
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Use MCP tools (e.g., get_tasks, add_task) as the preferred method for programmatic interaction in integrated environments like Cursor, treating CLI commands as a fallback for direct user interaction and when MCP server is unavailable
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.390Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Pass the `session` object (from context parameter) to the AI service call when in MCP context
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to taskmaster.mdc for comprehensive reference of Taskmaster MCP tools and CLI commands with tagged task lists information
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: New MCP tools should be imported and registered in mcp-server/src/tools/index.js and tool definitions should be added to mcp.json
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.426Z
Learning: Applies to apps/mcp/src/**/*.{ts,tsx} : MCP (tm/mcp) should be a thin presentation layer that calls tm-core methods and returns MCP-formatted responses; handle only MCP-specific concerns like tool schemas, parameter validation, and response formatting
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Use the AsyncOperationManager in the MCP tool layer for operations involving multiple steps or long waits beyond a single AI call; simple AI calls handled entirely within the *Direct function may not need it
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/index.js : Import and call tool registration functions in mcp-server/src/tools/index.js to register new MCP tools with the server
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/*.js : In MCP tool registration, include optional tag parameter for multi-context support in the Zod schema
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/*.js : Create MCP tool definitions in `mcp-server/src/tools/` using kebab-case naming; use zod for parameter validation; make projectRoot optional as the HOF handles fallback; wrap execute method with `withNormalizedProjectRoot`
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/index.js : Register MCP tools by importing and calling registration functions in `mcp-server/src/tools/index.js`
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Include projectRoot as an optional parameter in tool definitions using zod schema
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to .cursor/mcp.json : Add new tool definitions to the tools array in `.cursor/mcp.json`
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
๐ Learning: 2025-10-08T19:57:00.982Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1282
File: packages/tm-core/src/utils/index.ts:16-34
Timestamp: 2025-10-08T19:57:00.982Z
Learning: For the tm-core package in the eyaltoledano/claude-task-master repository, the team prefers a minimal, need-based export strategy in index files rather than exposing all internal utilities. Exports should only be added when functions are actually consumed by other packages in the monorepo.
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to scripts/modules/*.js : Import context gathering utilities (`ContextGatherer`, `FuzzyTaskSearch`) for AI-powered commands; support multiple context types (tasks, files, custom text, project tree); implement detailed token breakdown display
Applied to files:
packages/ai-sdk-tools/src/context7/index.tspackages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T17:57:14.728Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.728Z
Learning: Applies to src/ai-providers/*.js : Provider modules in `src/ai-providers/` must import `generateText`, `streamText`, `generateObject` from the `ai` package, the provider's `create<ProviderName>` function from `ai-sdk/<provider-name>`, and the `log` utility from `../../scripts/modules/utils.js`
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T17:59:00.042Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.042Z
Learning: Applies to scripts/modules/utils/{contextGatherer,fuzzyTaskSearch}.js : Export utility modules using named exports: `ContextGatherer`, `createContextGatherer` from contextGatherer.js and `FuzzyTaskSearch`, `PURPOSE_CATEGORIES`, `RELEVANCE_THRESHOLDS` from fuzzyTaskSearch.js
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-09-24T15:46:28.029Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1114
File: src/ai-providers/gemini-cli.js:12-12
Timestamp: 2025-09-24T15:46:28.029Z
Learning: When AI SDK provider packages are moved from optional dependencies to required dependencies in package.json, static imports should be used instead of dynamic imports with error handling, as the package is guaranteed to be available at runtime.
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Export all utility functions explicitly in logical groups and include configuration constants from utility modules
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T17:59:00.042Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.042Z
Learning: Applies to scripts/**/*.js : Use the `ContextGatherer` class from `scripts/modules/utils/contextGatherer.js` to extract context from multiple sources (tasks, files, custom text, project tree) with token counting using `gpt-tokens` library
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Applied to files:
packages/ai-sdk-tools/src/context7/index.ts
๐ Learning: 2025-11-24T17:58:07.977Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: New MCP tools should be imported and registered in mcp-server/src/tools/index.js and tool definitions should be added to mcp.json
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/index.js : Import and call tool registration functions in mcp-server/src/tools/index.js to register new MCP tools with the server
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/index.js : Register MCP tools by importing and calling registration functions in `mcp-server/src/tools/index.js`
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Use the AsyncOperationManager in the MCP tool layer for operations involving multiple steps or long waits beyond a single AI call; simple AI calls handled entirely within the *Direct function may not need it
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T22:09:45.426Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.426Z
Learning: Applies to apps/mcp/src/**/*.{ts,tsx} : MCP (tm/mcp) should be a thin presentation layer that calls tm-core methods and returns MCP-formatted responses; handle only MCP-specific concerns like tool schemas, parameter validation, and response formatting
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to .cursor/mcp.json : Add new tool definitions to the tools array in `.cursor/mcp.json`
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/*.js : Create MCP tool definitions in `mcp-server/src/tools/` using kebab-case naming; use zod for parameter validation; make projectRoot optional as the HOF handles fallback; wrap execute method with `withNormalizedProjectRoot`
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:02:49.769Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.769Z
Learning: Applies to mcp-server/src/tools/**/*.js : MCP tools in mcp-server/src/tools/ must call the corresponding direct function wrapper and pass the result object to handleApiResult(result, log) from mcp-server/src/tools/utils.js
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/tools/*.js : In MCP tool registration, include optional tag parameter for multi-context support in the Zod schema
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Use camelCase with Tool suffix for tool registration functions (e.g., registerListTasksTool)
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Access API keys for AI services via the session.env object in the MCP context rather than reading environment variables directly
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.tspackages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:02:22.277Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-11-24T18:02:22.277Z
Learning: Use MCP tools instead of CLI commands when available for better performance, structured data, and error handling
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/tools/*.js : Use createErrorResponse and createContentResponse utilities from tools/utils.js for formatting MCP responses
Applied to files:
packages/ai-sdk-tools/src/mcp-tools-manager.ts
๐ Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : For context-aware AI commands: use ContextGatherer utility for multi-source context extraction, support task IDs/file paths/custom context, implement fuzzy search for task discovery, and display detailed token breakdown for transparency
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:01:06.046Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.046Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : Direct functions should receive context containing only { session } when needed for AI keys or configuration; do not pass reportProgress to direct functions
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : For AI-powered commands that benefit from project context, use the ContextGatherer utility for multi-source context extraction, support task IDs, file paths, custom context, and project tree, implement fuzzy search for automatic task discovery, and display detailed token breakdown for transparency.
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T17:57:14.728Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.728Z
Learning: API keys are essential for most AI providers and must be configured correctly. Keys should be set in `.cursor/mcp.json` env section for MCP/Cursor, or in a `.env` file in the project root for CLI usage.
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T18:00:06.781Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:06.781Z
Learning: Applies to {.env,.cursor/mcp.json} : API keys for AI providers should be placed in `.env` file in project root for CLI usage, or in `env` section of `.cursor/mcp.json` for MCP/Cursor integration
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐ Learning: 2025-11-24T17:57:31.390Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.390Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : API keys must be configured in `.env` (for CLI) or `.cursor/mcp.json` (for MCP); ensure they are correctly resolved via `session.env` in MCP contexts
Applied to files:
packages/ai-sdk-tools/src/context7/client.ts
๐งฌ Code graph analysis (1)
packages/ai-sdk-tools/src/mcp-tools-manager.ts (2)
packages/ai-sdk-tools/src/context7/types.ts (1)
Context7Config(4-10)packages/ai-sdk-tools/src/context7/client.ts (2)
isContext7Available(87-94)createContext7Tools(58-82)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test
๐ Additional comments (2)
packages/ai-sdk-tools/src/context7/client.ts (1)
9-30: API key handling and error surface look good
Context7ApiKeyErrorplusgetApiKeygive a clear, early failure mode and an explicit env/config contract for consumers; this is a sensible pattern for this package.packages/ai-sdk-tools/src/context7/index.ts (1)
1-11: Barrel exports are minimal and aligned with usageThe index keeps the public surface tight by re-exporting only the client functions and types actually intended for consumers, and uses .js extensions for ESM compatibility.
| } catch (error) { | ||
| // Log but don't fail if Context7 connection fails | ||
| console.warn('Failed to connect to Context7 MCP server:', error); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid direct console.warn in library code
The direct console.warn here bypasses the repoโs central logging approach; prefer routing this through whatever shared logger the rest of the codebase uses so consumers can control log levels and sinks consistently.
๐ค Prompt for AI Agents
In packages/ai-sdk-tools/src/mcp-tools-manager.ts around lines 100 to 103, the
catch block currently uses console.warn which bypasses the repo's central
logging; replace this with the shared/logger used across the codebase (e.g.,
module-level logger or the injected logger variable) and call its warn/error
method instead, passing a clear message and the caught error object so the
failure to connect to the Context7 MCP server is logged via the central logging
system without changing the existing non-failing behavior.
What type of PR is this?
Description
Related Issues
How to Test This
# Example commands or stepsExpected result:
Contributor Checklist
npm run changesetnpm testnpm run format-check(ornpm run formatto fix)Changelog Entry
For Maintainers
Summary by CodeRabbit
โ๏ธ Tip: You can customize this high-level summary in your review settings.