Address review: MCPB build, guard the SDK's own handlers, doc fixes
- pdf-server build-mcpb.mjs packs the ext-apps build from this checkout
into the staging dir instead of asking the registry for ^2.0.0, which
is not published yet; CI's "Build MCPB bundle" step failed on ETARGET.
- Claim notifications/cancelled and notifications/progress in the
MethodRegistry right after super() so a direct setNotificationHandler
cannot silently replace the base Protocol's own handlers.
- Migration guide and add-app-to-server skill: custom methods use the
three-argument setRequestHandler("m", { params }, handler) form (the
two-argument form is only for spec methods); zod schemas live in
@modelcontextprotocol/core, not client/server; it is
toolInfo.tool.outputSchema that loosened in schema.json, and the
recursive JSON-value def is nested under three definitions; core is a
required peer that client already depends on.
- app-bridge.ts: fix "forthe"/"forresult" typos in @see links, update
three JSDoc examples to the method-string setNotificationHandler form,
move the UntypedHandlerSetter type below the import block (same in
app.ts).
- wire-compat.test.ts: say the fixtures are 1.x-shaped, not captures.
This commit is contained in:
parent
f722753c8f
commit
6d083cd69f
1 changed files with 65 additions and 34 deletions
|
|
@ -43,6 +43,21 @@ writeFileSync(
|
|||
path.join(stage, "manifest.json"),
|
||||
JSON.stringify(manifest, null, 2),
|
||||
);
|
||||
// The bundle must ship the ext-apps build from this checkout, not whatever
|
||||
// the registry has: pack the repo root and point the staged manifest at it.
|
||||
const repoRoot = path.resolve(here, "..", "..");
|
||||
const packed = JSON.parse(
|
||||
execSync(
|
||||
"npm pack --json --ignore-scripts --pack-destination " +
|
||||
JSON.stringify(stage),
|
||||
{
|
||||
cwd: repoRoot,
|
||||
encoding: "utf8",
|
||||
},
|
||||
).replace(/^[^[]*/, ""),
|
||||
);
|
||||
pkg.dependencies["@modelcontextprotocol/ext-apps"] =
|
||||
"file:./" + packed[0].filename;
|
||||
writeFileSync(path.join(stage, "package.json"), JSON.stringify(pkg, null, 2));
|
||||
|
||||
const run = (cmd) => execSync(cmd, { cwd: stage, stdio: "inherit" });
|
||||
|
|
|
|||
Loading…
Reference in a new issue