Skip to content

Commit ac02415

Browse files
committed
Merge ochafik/pre-handshake-guard into feat/app-tool-registration
Conflict resolution: - src/app.ts: kept both _registeredTools (#72) and _initializedSent/_assertInitialized (#623) private fields. - typedoc.config.mjs: dropped AppOptions (now exported per #623), kept RequestHandlerExtra (#72) → ["MethodSchema", "RequestHandlerExtra"]. - .husky/pre-commit: took main's --diff-filter=d (both sides had equivalent fixes for staged-deletion re-add failure). Guard application to #72's new App methods: - sendToolListChanged: added _assertInitialized guard. - registerTool's notify() helper: gated on _initializedSent instead of transport so enable/disable/update during the handshake window doesn't fire a premature list_changed notification. - registerTool itself is intentionally NOT guarded — it's a pre-connect setup method (analogous to setting ontoolresult). AppBridge: #72 adds no setRequestHandler/replaceRequestHandler calls; the existing override auto-covers any new replaceRequestHandler users.
2 parents 5f6dec0 + 737efe1 commit ac02415

34 files changed

Lines changed: 261 additions & 71 deletions

File tree

.husky/pre-commit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ if grep -E '"resolved": "https?://' package-lock.json | grep -v registry.npmjs.o
1515
fi
1616

1717
# Capture staged files so we only re-stage what the user intended to commit
18-
# (avoids sweeping unrelated WIP into the commit). Exclude deletions since
19-
# they can't be re-added from the working tree.
20-
STAGED=$(git diff --name-only --cached --diff-filter=ACMR)
18+
# (avoids sweeping unrelated WIP into the commit). --diff-filter=d skips
19+
# deletions so the xargs git add below doesn't fail on removed paths.
20+
STAGED=$(git diff --name-only --cached --diff-filter=d)
2121

2222
npm run build:all
2323
npm run prettier:fix

examples/basic-host/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"homepage": "https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-host",
33
"name": "@modelcontextprotocol/ext-apps-basic-host",
4-
"version": "1.5.0",
4+
"version": "1.6.0",
55
"type": "module",
66
"scripts": {
77
"build": "tsc --noEmit && concurrently \"cross-env INPUT=index.html vite build\" \"cross-env INPUT=sandbox.html vite build\"",

examples/basic-server-preact/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-basic-preact",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Basic MCP App Server example using Preact",
66
"repository": {

examples/basic-server-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-basic-react",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Basic MCP App Server example using React",
66
"repository": {

examples/basic-server-solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-basic-solid",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Basic MCP App Server example using Solid",
66
"repository": {

examples/basic-server-svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-basic-svelte",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Basic MCP App Server example using Svelte",
66
"repository": {

examples/basic-server-vanillajs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-basic-vanillajs",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Basic MCP App Server example using vanilla JavaScript",
66
"repository": {

examples/basic-server-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-basic-vue",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Basic MCP App Server example using Vue",
66
"repository": {

examples/budget-allocator-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-budget-allocator",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Budget allocator MCP App Server with interactive visualization",
66
"repository": {

examples/cohort-heatmap-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/server-cohort-heatmap",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"type": "module",
55
"description": "Cohort heatmap MCP App Server for retention analysis",
66
"repository": {

0 commit comments

Comments
 (0)