Commit graph

204 commits

Author SHA1 Message Date
Joan Xie
e4f1236bf2
Fix TypeScript error: remove localization argument from buildManifest call
The buildManifest function signature has the localization parameter
commented out (expecting 13 params), but the function call was still
passing it as the 14th argument, causing a type error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 16:26:38 -08:00
Joan Xie
08cb52bc86
remove localization param 2025-11-03 16:07:24 -08:00
Joan Xie
e59797f9ce
chore: major version bump 2025-11-03 16:04:56 -08:00
Joan Xie
07b77432a6
Fix lint errors: sort imports and rename unused parameter
- Reorganize imports in types.ts to satisfy simple-import-sort
- Rename unused localization parameter to _localization in init.ts
2025-11-03 16:02:09 -08:00
Joan Xie
3a9ee6e007
Export schemas/index instead of specific version
Changed all entry points (index.ts, cli.ts, node.ts) to export from schemas/index.js
instead of schemas/0.3.js. This provides access to all versioned schemas (v0_1, v0_2,
v0_3, vAny) and VERSIONED_MANIFEST_SCHEMAS without exposing a specific version.
2025-11-03 15:59:40 -08:00
Joan Xie
21c9710584
Fix lint errors in types.ts and remove any casts
- Use import type for VERSIONED_MANIFEST_SCHEMAS and DEFAULT_MANIFEST_VERSION
- Remove unnecessary any type annotations from test file
2025-11-03 15:57:20 -08:00
Joan Xie
8018a9a2e0
Remove latest schema reference from build script
The build script was still importing from the deleted schemas/latest.js file.
Updated to import McpbSignatureInfoSchema from 0.3.js and removed the
mcpb-manifest-latest entry from versionedManifestSchemas.
2025-11-03 15:54:54 -08:00
Joan Xie
3fffc30560
Use McpbManifestDefault derived from DEFAULT_MANIFEST_VERSION
Changes:
- Create McpbManifestDefault type derived from VERSIONED_MANIFEST_SCHEMAS[DEFAULT_MANIFEST_VERSION]
- Update init.ts to use McpbManifestDefault instead of hardcoded v0.2 schema
- Import schema types from version matching DEFAULT_MANIFEST_VERSION (0.2)
- Update test to match commented-out localization field
- Make McpbManifest (deprecated) point to McpbManifestDefault

This makes the codebase more maintainable by deriving types from DEFAULT_MANIFEST_VERSION instead of hardcoding version references.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 15:47:05 -08:00
Joan Xie
70c3615fc9
Add LATEST_MANIFEST_VERSION export (hardcoded to 0.3)
Export LATEST_MANIFEST_VERSION to indicate the maximum supported manifest version by the vAny schema. This allows clients to know what the highest version is that they can use.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 15:35:15 -08:00
Joan Xie
efe9e3345d
Make McpbManifest point to v0.2 for backwards compatibility
- Change McpbManifest type to point to v0.2 schema instead of McpbManifestAny
- Add DEFAULT_MANIFEST_VERSION export to browser.ts
- Update test fixtures to use manifest_version "0.2" when using McpbManifest type
- Keep @deprecated annotation directing users to McpbManifestAny for multi-version support

This maintains backwards compatibility for existing code using McpbManifest while encouraging new code to use McpbManifestAny for broader version support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 15:33:31 -08:00
Joan Xie
30a3b8e779
Remove vLatest concept and associated files
Remove the concept of "vLatest" throughout the codebase to encourage use of McpbManifestAny which supports all manifest versions. Changes include:

- Delete src/schemas/latest.ts and src/schemas_loose/latest.ts
- Remove vLatest and latest-related exports from schema index files
- Remove McpbManifestLatest type, replace McpbManifest to point to McpbManifestAny
- Remove LATEST_MANIFEST_VERSION, LATEST_MANIFEST_SCHEMA constants
- Update all main export files (index.ts, cli.ts, node.ts) to export from 0.3.js instead of latest.js
- Update tests to use v0_3.McpbManifestSchema explicitly
- Add @deprecated annotation to McpbManifest directing users to McpbManifestAny

This encourages better version compatibility by using the union type that supports all manifest versions rather than assuming a single "latest" version.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 15:30:03 -08:00
Joan Xie
d7f76fc02d
Fix linting issues
- Remove unused McpbManifest import from config.ts
- Auto-fix formatting and import sorting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 20:41:34 -07:00
Joan Xie
e7d6ea3e68
Fix type error in buildManifest return type
Changed return type to use the specific v0.2 manifest schema type since the
function returns a manifest with DEFAULT_MANIFEST_VERSION (0.2).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 20:38:05 -07:00
Joan Xie
7f40d5be42
rm McpbUserConfigValuesSchema export 2025-11-01 20:34:47 -07:00
Joan Xie
753f27e1ba
Revert yarn.lock to match main (zod 3.25.67)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 20:31:26 -07:00
Joan Xie
3538bd4f3b
Bump version to 1.3.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 20:29:04 -07:00
Joan Xie
2d6dd39b3e
Merge remote-tracking branch 'origin/main' into feat/browser-export-versioned-schemas 2025-11-01 20:28:49 -07:00
Joan Xie
05187d7235
Remove zod resolution and bump version to 1.2.0
- Removed zod version resolution from package.json
- Bumped version from 1.1.5 to 1.2.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 20:27:58 -07:00
Joan Xie
c137df512d
Remove validate utilities from browser exports
This removes the validateManifest utilities that were added to the browser bundle. These functions are not needed for the browser export.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 19:48:58 -07:00
Joan Xie
2d76201204
Export versioned schemas and validation utilities in browser bundle
- Update browser.ts to export validation utilities
- Export McpbManifestSchema for backwards compatibility
- Update config.ts to accept McpbManifestAny for broader manifest version support
- Add validate.ts with version-aware validation functions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 16:34:02 -07:00
Joan Xie
5fb25a253e
add McpbManifestAny type 2025-11-01 15:46:37 -07:00
Joan Xie
86166630b4
revert: undo preprocessing changes to any.ts and types.ts
Reverts the preprocessing logic and type name changes to restore
the simpler union schema approach.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 15:37:15 -07:00
Joan Xie
f3ac79afda
update browser exports to incl. vAny schema 2025-11-01 15:27:38 -07:00
Joan Xie
98fc900d5a
WIP 2025-11-01 15:07:43 -07:00
Felix Rieseberg
b75f8a67f9
chore: update version from 1.1.5 to 1.2.0 (#147) v1.2.0 2025-11-01 12:35:45 -07:00
Samuel Attard
98126b777e
feat: use 0.2 as the default schema (#145) 2025-11-01 12:31:25 -07:00
joan-anthropic
ce8a5aec4a
Merge pull request #121 from guyru/patch-1
The repository url should actually point to the git repo
2025-10-31 13:52:06 -07:00
joan-anthropic
8c543a32f6
Merge pull request #141 from asklar/user/asklar/single-size-per-icon v1.1.5
fix: update icon size property from 'sizes' to 'size'
2025-10-30 16:54:44 -07:00
Alexander Sklar
bc2d083d18
chore: update version from 1.1.4 to 1.1.5 in package.json 2025-10-30 16:44:19 -07:00
Alexander Sklar
86e641c0b5
chore: update version from 1.1.3 to 1.1.4 in package.json 2025-10-30 16:43:59 -07:00
Alexander Sklar
257af30812
fix: update icon size property from 'sizes' to 'size' in manifest and schema files 2025-10-30 16:43:54 -07:00
Samuel Attard
406e7bb5bd
feat: add CI job to validate JSON schema generation (#139)
Add a new validate-schemas job to the CI workflow that ensures the
committed JSON schemas in the schemas/ directory are up-to-date with
the schema generation script. This prevents drift between the source
code and generated schemas.

The job:
- Runs the schema generation script (yarn build:schema)
- Checks if any schemas were modified
- Fails if changes are detected, prompting developers to regenerate
  and commit the schemas

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-30 16:31:10 -07:00
joan-anthropic
82b12a406e
Merge pull request #140 from anthropics/feat/use-latest-schema-only v1.1.4
feat: export McpbManifestAny type, use latest MCPB schema for BUILD manifest validation
2025-10-30 14:26:23 -07:00
Joan Xie
7ecb050280
cleanup 2025-10-30 14:19:34 -07:00
joan-anthropic
ba74af5217
Merge pull request #136 from bthompson-sys/feat/icon-validation
feat: add comprehensive icon validation to mcpb validate command
2025-10-30 10:40:02 -07:00
Joan Xie
8bea47f0b7
chore: bump version to 1.1.4 2025-10-30 10:00:13 -07:00
Joan Xie
a2bb7589b6
fix: sort imports in types.ts 2025-10-30 09:57:16 -07:00
Joan Xie
184173e342
fix: use correct manifest types for reading vs building
Apply proper type distinction:
- Reading/validating existing manifests: Use McpbManifest (any version)
- Building/creating new manifests: Use McpbManifestLatest (latest only)

Changes:
- src/shared/config.ts: Revert to McpbManifest for config operations
- src/cli/init.ts: Use McpbManifestLatest for new manifest creation
- test/config.test.ts: Use McpbManifest for testing config operations

This ensures backward compatibility when reading existing manifests
while enforcing latest schema for new builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 09:47:08 -07:00
Joan Xie
ddad8064ef
feat: use latest MCPB schema for BUILD manifest validation
Update manifest type usage in config and packaging to strictly enforce
the latest schema version (0.3) instead of accepting any version.

Changes:
- src/shared/config.ts: Use McpbManifestLatest instead of McpbManifest
- src/types.ts: Add McpbManifestLatest type export
- test/config.test.ts: Update tests to use McpbManifestLatest

This ensures BUILD manifests are validated against the latest schema
only during packaging, preventing use of older schema versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 09:40:32 -07:00
Bryan Thompson
55e3c3cfd8
fix: resolve linting errors
- Remove duplicate node:path import in test/icon-validation.test.ts
- Replace 4 instances of 'any' type with 'unknown' in error handlers
- Auto-format code with prettier (27 formatting fixes)

Addresses review feedback from PR #136
All 6 errors and 27 warnings resolved
2025-10-30 07:53:06 -05:00
joan-anthropic
11d1397ee8
Merge pull request #138 from anthropics/feat/export-versioned-schemas v1.1.3
feat: export versioned schemas in package.json
2025-10-29 17:20:17 -07:00
Joan Xie
c29d1000f3
feat: add any schema 2025-10-29 17:06:55 -07:00
Joan Xie
1660697588
refactor: remove legacy mcpb-manifest.schema.json
Removed the non-versioned mcpb-manifest.schema.json from schemas/
directory. All schemas are now explicitly versioned.

Available schemas:
- mcpb-manifest-v0.1.schema.json
- mcpb-manifest-v0.2.schema.json
- mcpb-manifest-v0.3.schema.json
- mcpb-manifest-latest.schema.json

Consumers should use -latest or specific version to be explicit
about which schema version they're validating against.
2025-10-29 17:01:04 -07:00
Joan Xie
789b37087c
revert: restore McpbManifest type to use latest schema
Reverted the discriminated union type change. McpbManifest now uses
the latest schema as before. Consumers can use versioned schemas
directly if they need to validate specific versions.
2025-10-29 16:59:06 -07:00
Joan Xie
db5d6be33c
Reapply "chore: bump version to 1.1.3"
This reverts commit ae3d9614e2.
2025-10-29 16:58:41 -07:00
Joan Xie
ae3d9614e2
Revert "chore: bump version to 1.1.3"
This reverts commit 48232bf64e.
2025-10-29 16:58:15 -07:00
Joan Xie
48232bf64e
chore: bump version to 1.1.3 2025-10-29 16:57:49 -07:00
Joan Xie
e7282946b6
fix: lint errors - remove unused import and format files
- Remove unused McpbManifestSchema import from types.ts
- Run prettier on modified files
2025-10-29 16:51:27 -07:00
Joan Xie
eeb9dca819
refactor: remove non-versioned mcpb-manifest.schema.json export
Remove the generic mcpb-manifest.schema.json export from package.json
in favor of explicit versioned exports.

Changes:
- Removed ./mcpb-manifest.schema.json from package exports
- Stop generating mcpb-manifest.schema.json in dist/
- Keep mcpb-manifest.schema.json in schemas/ for backward compatibility

Consumers should now use:
- mcpb-manifest-latest.schema.json (for latest version)
- mcpb-manifest-v0.1.schema.json (for specific version)
- etc.

This makes versioning explicit and prevents ambiguity about which
schema version is being used.
2025-10-29 16:49:41 -07:00
Joan Xie
b5fa7df6eb
feat: generate JSON schemas for all manifest versions
Updated build script to generate JSON schemas for all historical manifest
versions (v0.1, v0.2, v0.3) in addition to the latest version.

Changes:
- Generate mcpb-manifest-v0.1.schema.json
- Generate mcpb-manifest-v0.2.schema.json
- Generate mcpb-manifest-v0.3.schema.json
- Generate mcpb-manifest-latest.schema.json
- Keep mcpb-manifest.schema.json as alias for latest
- All schemas generated to both dist/ and schemas/ directories
- Added exports in package.json for all versioned schemas

Benefits:
- Tools can validate against specific manifest versions
- Backwards compatibility for all historical versions
- Latest schema always available at predictable path
- JSON schema files match the Zod schema versions

Usage:
import manifestSchema from '@anthropic-ai/mcpb/mcpb-manifest-v0.2.schema.json'
import latestSchema from '@anthropic-ai/mcpb/mcpb-manifest-latest.schema.json'
2025-10-29 16:39:57 -07:00