Skip to content

feat: validate manifest version during pack command - #109

Merged
joan-anthropic merged 5 commits into
mainfrom
feat/validate-manifest-version-in-pack
Sep 22, 2025
Merged

feat: validate manifest version during pack command#109
joan-anthropic merged 5 commits into
mainfrom
feat/validate-manifest-version-in-pack

Conversation

@joan-anthropic

@joan-anthropic joan-anthropic commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Add validation to ensure manifest_version matches current expected version (0.2) during mcpb pack
  • Centralize version management with CURRENT_MANIFEST_VERSION constant
  • Update init command and tests to use version constant

Changes

  • src/schemas.ts: Add CURRENT_MANIFEST_VERSION = "0.2" constant
  • src/cli/pack.ts: Validate manifest version matches current version before packing
  • src/cli/init.ts: Use version constant when creating new manifests
  • test/cli.test.ts, test/init.test.ts: Update tests to use version constant
  • Fix prettier formatting issues

Behavior

When running mcpb pack, if the manifest version doesn't match "0.2", the command will fail with:

ERROR: Manifest version mismatch. Expected "0.2", found "X.X"
  Please update the manifest_version in your manifest.json to "0.2"

Testing

  • running mcpb pack with unsupported manifest_version fails, succeeds on supported version
  • mcpb init creates manifest.json with latest manifest_version

Add validation to ensure the manifest_version matches the current expected
version (0.2) during the mcpb pack command. This prevents users from
packing extensions with outdated or incorrect manifest versions.

Changes:
- Add CURRENT_MANIFEST_VERSION constant to centralize version management
- Validate manifest version in pack command before creating bundle
- Update init command to use version constant
- Update tests to use version constant
- Fix prettier formatting issues
joan-anthropic and others added 3 commits September 22, 2025 15:17
@joan-anthropic
joan-anthropic merged commit c2d42b3 into main Sep 22, 2025
6 checks passed
bryan-anthropic pushed a commit to bryan-anthropic/mcpb that referenced this pull request Oct 28, 2025
…date-manifest-version-in-pack

feat: validate manifest version during pack command
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