feat: add mcp server to expose SDK_CONTEXT file#4036
Conversation
|
View your CI Pipeline Execution ↗ for commit afe442d
☁️ Nx Cloud last updated this comment at |
738fac0 to
7ba2f48
Compare
7ba2f48 to
559e903
Compare
75e0dda to
d531f8c
Compare
Codecov Report❌ Patch coverage is
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Nx Cloud is proposing a fix for your failed CI:
These changes fix the test failures in ama-mcp-sdk:test:ci by providing a default logger when registerSdkContextToolAndResources is called without one. The function was using a non-null assertion on options.logger!, causing tests to fail with TypeError: Cannot read properties of undefined (reading 'info') when no logger was provided. We've aligned the implementation with the pattern used in createSdkContextServer, ensuring the function works correctly whether a logger is supplied or not.
Tip
✅ We verified this fix by re-running ama-mcp-sdk:test:ci.
diff --git a/packages/@ama-mcp/sdk/src/server/mcp-server.ts b/packages/@ama-mcp/sdk/src/server/mcp-server.ts
index f8d4d7f72..af7e386e7 100644
--- a/packages/@ama-mcp/sdk/src/server/mcp-server.ts
+++ b/packages/@ama-mcp/sdk/src/server/mcp-server.ts
@@ -174,7 +174,7 @@ export const registerSdkContextToolAndResources = (
options: SdkContextOptions = {}
): void => {
const projectPath = options.projectPath ?? '.';
- const logger = options.logger!;
+ const logger = options.logger ?? new MCPLogger('@ama-mcp/sdk');
const sdkPackages = options.sdkPackages ?? loadSdkPackagesFromPackageJson(projectPath, logger);
const contexts = loadSdkContexts(sdkPackages, SDK_CONTEXT_FILENAME, logger);
🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.
Or Apply changes locally with:
npx nx-cloud apply-locally wuHh-BfTG
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
aa91b9f to
45937f0
Compare
45937f0 to
1aa3b32
Compare
8b7b337 to
f3713e5
Compare
f3713e5 to
5dfee4a
Compare
# Conflicts: # .yarn/sdks/eslint/package.json
5dfee4a to
afe442d
Compare
| logger, | ||
| { | ||
| name, | ||
| version: '0.0.0' |
There was a problem hiding this comment.
Shouldn't the version be aligned with the package version ?
Proposed change
Related issues
- No issue associated -