Skip to content

Conversation

@Coderrob
Copy link
Owner

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 .npmignore file. Additionally, several Yarn SDK-generated files have been removed, simplifying the repository.

CI/CD and Release Automation:

  • Updated .github/workflows/ci.yml to 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]
  • Added .github/workflows/release.yml to automate publishing to NPM and creating GitHub Releases on tag pushes, streamlining the release process and reducing manual steps.

Package and Build Management:

  • Added a .npmignore file to exclude source, development, and unnecessary files from the published NPM package, ensuring a clean and minimal package.
  • Added .vscode/mcp.json to provide a VSCode server launch configuration for local development and testing.

Repository Cleanup:

  • Removed Yarn SDK-generated files for ESLint, Prettier, and TypeScript, including their package descriptors and integration config, reducing repository clutter and potential confusion. [1] [2] [3] [4] [5] [6] [7] [8]

…etadata.ts

chore: update yarn.lock with new dependencies and versions for rollup plugins and related packages
…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.
…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.
Copilot AI review requested due to automatic review settings September 20, 2025 01:58
Copy link

Copilot AI left a 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
Copy link

Copilot AI Sep 20, 2025

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.

Suggested change
const kind = assertKind(kindPart.toLowerCase()); // Convert to lowercase for case-insensitive matching
const kind = assertKind(kindPart); // Preserve original case for Backstage entity kind

Copilot uses AI. Check for mistakes.
- 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.
@Coderrob Coderrob force-pushed the return-raw-component-responses branch from 1716c3c to 8bb7bc6 Compare September 21, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants