-
Notifications
You must be signed in to change notification settings - Fork 215
refactor: update package schema to use registry_type and registry_base_url #311
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add MCPB as a new registry_name option - Add file_hashes field to Package model for integrity verification - Implement URL validation restricting MCPB packages to GitHub/GitLab hosts - Require SHA-256 hash for all MCPB packages - Add example MCPB package in documentation - Update schemas and OpenAPI specification Implements Option 1 from issue #260 - MCPB as an additional package type pointing to hosted .mcpb files with cryptographic verification.
- Add hash generation during publish (can be disabled with --no-hash) - Add verify command to check existing hashes - Add hash-gen command to generate/update hashes - Support NPM and direct URL (MCPB) packages - Document implementation in docs/file-hashes.md The CLI tool now generates SHA-256 hashes at publish time. Registry validates these hashes to ensure package integrity.
Resolved conflicts to integrate PackageLocation changes with new server wrapper format
- Add LegacyPackage type to migrate-seed tool to handle old package format - Fix conversion from legacy registry_name/name to new PackageLocation format - Fix test data in import_test.go to include packages in ServerResponse - Fix field name typo: RuntimeHint -> RunTimeHint - Remove unused server detail handlers in test
- Replace fmt.Print with log for console output - Make 'docker' a constant (packageTypeDocker) - Fix file permissions from 0644 to 0600 - Convert if-else chain to switch statement - Fix indent-error-flow by removing unnecessary else - Add nolint comment for Docker tag format (not a port)
- Fixed indentation issues in repository and version_detail blocks - Corrected array/object closing brackets for packages and remotes - Ensured consistent 2-space indentation throughout all examples - All 9 examples now pass JSON validation
- Removed file hash generation from publisher tool - Removed MCPB hash validation requirement from registry service - Removed file-hashes.md implementation guide - Kept file_hashes as optional field in schema for external tools - Publisher tool now only handles schema changes (PackageLocation)
…entifier fields - Replace overloaded registry_name and name fields with semantic package_type, registry, and identifier fields - Update all JSON schemas and OpenAPI specifications to reflect new structure - Convert all 396 seed.json entries to new format - Update publisher tool to generate new structure - Update all examples and documentation - Fix all tests to use new field names - Update validation logic for new structure
Preserve the original \u003c and \u003e Unicode escapes for < and > characters
- Update model to use RegistryName instead of Registry - Update all code references to use the new field name - Update JSON schemas and OpenAPI spec - Update all examples and documentation - Update seed.json to use registry_name
Resolved conflicts by: - Combining imports in registry_service.go (both errors and fmt/url/strings) - Keeping package validation while adding new versioning logic - Preserving nolint directives for ireturn in auth providers - Using main branch's URLs in examples.md - Updating package structure to use new fields
Remove placeholder repository IDs that were added in this PR
Fix inconsistent indentation for version and nested fields in package objects
- Fix indentation for version fields on lines 243, 296, 443, 517, 561 - Fix indentation for registry_name field on line 294 - Remove extra closing braces and fix array/object structure - Ensure all JSON examples are valid and properly formatted
- Fix indentation for entire environment_variables blocks - Fix indentation for package_arguments blocks - Fix closing brace indentation on line 406 - Ensure all JSON examples have consistent 2-space indentation
- Restore original structure in import_test.go while keeping schema changes - Keep migrate-seed test files with only schema field updates - Remove unnecessary nolint directives from auth providers - Maintain only essential changes for PackageType/RegistryName/Identifier schema
- Add OldPackage type to represent legacy package format - Convert from old schema (registry_name/name) to new (package_type/registry_name/identifier) - Use zero timestamps for seed data to distinguish from published data - Update test data files to match expected schema formats
…e_RegistryURL The test was failing because the ServerResponse objects in the paginated endpoint were missing Package data that the test assertions expected. Added the appropriate package definitions to match the test expectations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Resolved merge conflicts: - internal/service/registry_service.go: Combined package validation with remote URL validation - tools/publisher/main.go: Added Schema field to ServerJSON struct 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…e_url - Remove package_type field (redundant with registry_type) - Rename package_type → registry_type (indicates HOW to download) - Rename registry_name → registry_base_url (uses actual URLs for clarity) - Remove migrate-seed script (temporary tool no longer needed) - Update all schemas, examples, tests, and API code This provides clearer semantics: registry_type tells clients how to download packages while registry_base_url provides the actual endpoint URL.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements the field restructuring discussed in PR #295 comments from @domdomegg:
package_type
field (redundant withregistry_type
)package_type
→registry_type
(indicates HOW to download)registry_name
→registry_base_url
(uses actual URLs for clarity)migrate-seed
script (temporary tool no longer needed)Changes
New Structure
This provides clearer semantics where
registry_type
tells clients how to download packages whileregistry_base_url
provides the actual endpoint URL.@joan-anthropic Feel free to review and decide if you want to accept these changes into your branch, then @domdomegg can merge everything to main.