Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
98fc900
WIP
joan-anthropic Nov 1, 2025
f3ac79a
update browser exports to incl. vAny schema
joan-anthropic Nov 1, 2025
8616663
revert: undo preprocessing changes to any.ts and types.ts
joan-anthropic Nov 1, 2025
5fb25a2
add McpbManifestAny type
joan-anthropic Nov 1, 2025
2d76201
Export versioned schemas and validation utilities in browser bundle
joan-anthropic Nov 1, 2025
c137df5
Remove validate utilities from browser exports
joan-anthropic Nov 2, 2025
05187d7
Remove zod resolution and bump version to 1.2.0
joan-anthropic Nov 2, 2025
2d6dd39
Merge remote-tracking branch 'origin/main' into feat/browser-export-v…
joan-anthropic Nov 2, 2025
3538bd4
Bump version to 1.3.0
joan-anthropic Nov 2, 2025
753f27e
Revert yarn.lock to match main (zod 3.25.67)
joan-anthropic Nov 2, 2025
7f40d5b
rm McpbUserConfigValuesSchema export
joan-anthropic Nov 2, 2025
e7d6ea3
Fix type error in buildManifest return type
joan-anthropic Nov 2, 2025
d7f76fc
Fix linting issues
joan-anthropic Nov 2, 2025
30a3b8e
Remove vLatest concept and associated files
joan-anthropic Nov 3, 2025
efe9e33
Make McpbManifest point to v0.2 for backwards compatibility
joan-anthropic Nov 3, 2025
70c3615
Add LATEST_MANIFEST_VERSION export (hardcoded to 0.3)
joan-anthropic Nov 3, 2025
3fffc30
Use McpbManifestDefault derived from DEFAULT_MANIFEST_VERSION
joan-anthropic Nov 3, 2025
8018a9a
Remove latest schema reference from build script
joan-anthropic Nov 3, 2025
21c9710
Fix lint errors in types.ts and remove any casts
joan-anthropic Nov 3, 2025
3a9ee6e
Export schemas/index instead of specific version
joan-anthropic Nov 3, 2025
07b7743
Fix lint errors: sort imports and rename unused parameter
joan-anthropic Nov 4, 2025
e59797f
chore: major version bump
joan-anthropic Nov 4, 2025
08cb52b
remove localization param
joan-anthropic Nov 4, 2025
e4f1236
Fix TypeScript error: remove localization argument from buildManifest…
joan-anthropic Nov 4, 2025
5f87ea5
Comment out localization parameter in tests
joan-anthropic Nov 4, 2025
5f6b15b
remove da bad tings
MarshallOfSound Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@anthropic-ai/mcpb",
"description": "Tools for building MCP Bundles",
"version": "1.2.0",
"version": "1.3.0",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
3 changes: 1 addition & 2 deletions src/browser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Browser-compatible exports
export * from "./schemas/latest.js";
export * from "./schemas/index.js";
export * from "./shared/config.js";
export * from "./shared/constants.js";
export * from "./types.js";
5 changes: 3 additions & 2 deletions src/cli/init.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { confirm, input, select } from "@inquirer/prompts";
import { existsSync, readFileSync, writeFileSync } from "fs";
import { basename, join, resolve } from "path";
import type * as z from "zod";

import type { McpbManifestSchema as McpbManifestSchemaV0_2 } from "../schemas/0.2.js";
import { DEFAULT_MANIFEST_VERSION } from "../shared/constants.js";
import type { McpbManifest } from "../types.js";

interface PackageJson {
name?: string;
Expand Down Expand Up @@ -878,7 +879,7 @@ export function buildManifest(
resources: string;
default_locale: string;
},
): McpbManifest {
): z.infer<typeof McpbManifestSchemaV0_2> {
const { name, displayName, version, description, authorName } = basicInfo;
const { authorEmail, authorUrl } = authorInfo;
const { serverType, entryPoint, mcp_config } = serverConfig;
Expand Down
20 changes: 17 additions & 3 deletions src/schemas/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import { McpbManifestSchema as ManifestSchemaV0_1 } from "./0.1.js";
import { McpbManifestSchema as ManifestSchemaV0_2 } from "./0.2.js";
import { McpbManifestSchema as ManifestSchemaV0_3 } from "./0.3.js";

export * as v0_1 from "./0.1.js";
export * as v0_2 from "./0.2.js";
export * as v0_3 from "./0.3.js";
export * as any from "./any.js";
export * as latest from "./latest.js";
export * as vAny from "./any.js";
export * as vLatest from "./latest.js";
export {
MANIFEST_VERSION as LATEST_MANIFEST_VERSION,
McpbManifestSchema,
McpbManifestSchema as LatestMcpbManifestSchema,
McpbManifestSchema, // backwards compatibility - exports latest schema
} from "./latest.js";

/**
* Map of manifest versions to their strict schemas
*/
export const VERSIONED_MANIFEST_SCHEMAS = {
"0.1": ManifestSchemaV0_1,
"0.2": ManifestSchemaV0_2,
"0.3": ManifestSchemaV0_3,
} as const;
6 changes: 3 additions & 3 deletions src/shared/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {
Logger,
McpbManifest,
McpbManifestAny,
McpbUserConfigValues,
McpServerConfig,
} from "../types.js";
Expand Down Expand Up @@ -85,7 +85,7 @@ export function replaceVariables(
}

interface GetMcpConfigForManifestOptions {
manifest: McpbManifest;
manifest: McpbManifestAny;
extensionPath: string;
systemDirs: Record<string, string>;
userConfig: McpbUserConfigValues;
Expand Down Expand Up @@ -179,7 +179,7 @@ export async function getMcpConfigForManifest(
}

interface HasRequiredConfigMissingOptions {
manifest: McpbManifest;
manifest: McpbManifestAny;
userConfig?: McpbUserConfigValues;
}

Expand Down
16 changes: 10 additions & 6 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,22 @@ export type McpbUserConfigurationOption = z.infer<

export type McpbUserConfigValues = z.infer<typeof McpbUserConfigValuesSchema>;

/**
* McpbManifest type that accepts any supported manifest version
* This is the default manifest type that should be used for maximum compatibility.
*/
export type McpbManifest = z.infer<typeof McpbManifestSchemaAny>;

/**
* McpbManifest type for the latest manifest version only
* Use this when you specifically need the latest version.
*/
export type McpbManifestLatest = z.infer<typeof McpbManifestSchema>;

/**
* Alias for McpbManifestLatest for backwards compatibility.
*/
export type McpbManifest = McpbManifestLatest;

/**
* McpbManifest type representing the union of all manifest versions
*/
export type McpbManifestAny = z.infer<typeof McpbManifestSchemaAny>;

/**
* Information about a MCPB package signature
*/
Expand Down