-
Notifications
You must be signed in to change notification settings - Fork 0
Return raw component responses #8
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: main
Are you sure you want to change the base?
Conversation
…PI format; refactor response handling
… new tools and parameters
…etadata.ts chore: update yarn.lock with new dependencies and versions for rollup plugins and related packages
…handling and prevent CJS/ESM interop issues
… improving artifact uploads
…tLocationByRefTool
…ing Corepack setup steps
…n matrix and consolidating Corepack setup steps
- Made the `type` parameter in `add_location.tool.ts` optional. - Updated test files for `get_entities`, `get_entities_by_query`, `get_entities_by_refs`, `get_entity_ancestors`, `get_entity_by_ref`, `get_entity_facets`, `get_location_by_entity`, `get_location_by_ref`, `refresh_entity`, `remove_entity_by_uid`, and `remove_location_by_id` to use `ApiStatus` for status checks instead of string literals. - Changed mock implementations in tests to use `mockResolvedValueOnce` for better isolation of test cases. - Introduced new constants in `constants.ts` for content types and common field names used in API responses. - Enhanced tool metadata validation in `tool-validator.ts` and `validate-tool-metadata.ts` to provide better type safety and error handling. - Updated `tools-manifest.json` to ensure consistent parameter formatting.
…er flexibility in tests
…gies, middleware, and factory patterns - Added common imports for tool utilities. - Introduced execution strategies: Standard, Cached, and Batched. - Created a generic tool factory for flexible tool creation. - Developed middleware pipeline for tool execution with authentication, validation, and caching middleware. - Implemented an advanced tool builder with fluent API for tool configuration. - Enhanced tool metadata handling to support factory-created tools. - Updated tool registrar to register tools with the MCP server using modern SDK. - Established a tool registry for managing registered tools and their metadata. - Updated dependencies to ensure compatibility with new features.
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.
Pull Request Overview
This pull request refactors the project from a decorator-based tool architecture to an advanced factory pattern approach, providing better extensibility and maintainability. The main changes involve converting tools to use the new ToolFactory pattern, updating validation systems to handle both raw and runtime metadata schemas, and adding copyright headers throughout the codebase.
- Refactoring from decorator-based to factory pattern tool architecture
- Enhanced validation system supporting both raw and runtime metadata schemas
- Complete copyright header standardization across all TypeScript files
- Generation of comprehensive tools manifest for improved tooling support
Reviewed Changes
Copilot reviewed 166 out of 172 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tools-manifest.json | Generated comprehensive tools manifest with all available tools and their parameters |
| src/utils/tools/*.ts | Refactored validation system to support both raw and runtime metadata with factory patterns |
| src/tools/*.ts | Converted all tools from decorator-based to factory pattern architecture |
| src/types/tools.ts | Extended tool metadata interface with additional configuration options |
| src/utils/formatting/entity-ref.ts | Fixed case sensitivity issue in entity kind parsing |
| scripts/*.sh | Added enhanced build validation and copyright management scripts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (source.includes(':')) { | ||
| const [kindPart, maybeRest] = partsAfter(source, ':'); | ||
| const kind = assertKind(kindPart); | ||
| const kind = assertKind(kindPart.toLowerCase()); // Convert to lowercase for case-insensitive matching |
Copilot
AI
Sep 20, 2025
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.
Converting entity kind to lowercase changes the semantic meaning. Entity kinds like 'Component' should preserve their original case as they are standardized identifiers in Backstage. This could break entity references that expect proper casing.
| const kind = assertKind(kindPart.toLowerCase()); // Convert to lowercase for case-insensitive matching | |
| const kind = assertKind(kindPart); // Preserve original case for Backstage entity kind |
- Deleted tool-metadata.ts and tool-metadata.test.ts files as part of the refactor. - Removed tool-registrar.ts and tool-registrar.test.ts files to streamline tool registration process. - Eliminated tool-registry.ts and tool-validator.ts files to simplify tool validation logic. - Updated tools-manifest.json to remove unnecessary whitespace and ensure consistent formatting. - Added tsconfig.test.json for better test configuration management. - Updated tsconfig.json to enable downlevel iteration for improved compatibility. - Updated yarn.lock to include new dependencies and ensure consistent package versions.
1716c3c to
8bb7bc6
Compare
This pull request introduces significant improvements to the project's CI/CD pipeline and package publishing process. The main changes include restructuring the GitHub Actions workflow for building, testing, and validating the project, adding a new release workflow for automated publishing to NPM and GitHub Releases, and refining package contents with a
.npmignorefile. Additionally, several Yarn SDK-generated files have been removed, simplifying the repository.CI/CD and Release Automation:
.github/workflows/ci.ymlto include build validation, artifact uploads, and a dry-run publish test, improving confidence in release readiness and ensuring build outputs are properly validated. [1] [2] [3].github/workflows/release.ymlto automate publishing to NPM and creating GitHub Releases on tag pushes, streamlining the release process and reducing manual steps.Package and Build Management:
.npmignorefile to exclude source, development, and unnecessary files from the published NPM package, ensuring a clean and minimal package..vscode/mcp.jsonto provide a VSCode server launch configuration for local development and testing.Repository Cleanup: