Skip to content

Commit deadcf7

Browse files
committed
add suites and shift pending to reflect current pending
1 parent d89370e commit deadcf7

File tree

5 files changed

+57
-32
lines changed

5 files changed

+57
-32
lines changed

package-lock.json

Lines changed: 15 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"vitest": "^4.0.5"
4646
},
4747
"dependencies": {
48-
"@modelcontextprotocol/sdk": "^1.22.0",
48+
"@modelcontextprotocol/sdk": "^1.23.0-beta.0",
4949
"commander": "^14.0.2",
5050
"express": "^5.1.0",
5151
"zod": "^3.25.76"

src/index.ts

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
listScenarios,
1515
listClientScenarios,
1616
listActiveClientScenarios,
17+
listPendingClientScenarios,
1718
listAuthScenarios,
1819
listMetadataScenarios
1920
} from './scenarios';
@@ -53,7 +54,9 @@ program
5354

5455
const suites: Record<string, () => string[]> = {
5556
auth: listAuthScenarios,
56-
metadata: listMetadataScenarios
57+
metadata: listMetadataScenarios,
58+
'sep-835': () =>
59+
listAuthScenarios().filter((name) => name.startsWith('auth/scope-'))
5760
};
5861

5962
const suiteName = options.suite.toLowerCase();
@@ -123,8 +126,9 @@ program
123126
totalWarnings += warnings;
124127

125128
const status = failed === 0 ? '✓' : '✗';
129+
const warningStr = warnings > 0 ? `, ${warnings} warnings` : '';
126130
console.log(
127-
`${status} ${result.scenario}: ${passed} passed, ${failed} failed`
131+
`${status} ${result.scenario}: ${passed} passed, ${failed} failed${warningStr}`
128132
);
129133

130134
if (verbose && failed > 0) {
@@ -149,7 +153,7 @@ program
149153
console.error('Either --scenario or --suite is required');
150154
console.error('\nAvailable client scenarios:');
151155
listScenarios().forEach((s) => console.error(` - ${s}`));
152-
console.error('\nAvailable suites: auth, metadata');
156+
console.error('\nAvailable suites: auth, metadata, sep-835');
153157
process.exit(1);
154158
}
155159

@@ -193,7 +197,12 @@ program
193197
.requiredOption('--url <url>', 'URL of the server to test')
194198
.option(
195199
'--scenario <scenario>',
196-
'Scenario to test (defaults to all scenarios if not specified)'
200+
'Scenario to test (defaults to active suite if not specified)'
201+
)
202+
.option(
203+
'--suite <suite>',
204+
'Suite to run: "active" (default, excludes pending), "all", or "pending"',
205+
'active'
197206
)
198207
.action(async (options) => {
199208
try {
@@ -213,10 +222,24 @@ program
213222
);
214223
process.exit(failed > 0 ? 1 : 0);
215224
} else {
216-
// Run all active scenarios
217-
const scenarios = listActiveClientScenarios();
225+
// Run scenarios based on suite
226+
const suite = options.suite?.toLowerCase() || 'active';
227+
let scenarios: string[];
228+
229+
if (suite === 'all') {
230+
scenarios = listClientScenarios();
231+
} else if (suite === 'active') {
232+
scenarios = listActiveClientScenarios();
233+
} else if (suite === 'pending') {
234+
scenarios = listPendingClientScenarios();
235+
} else {
236+
console.error(`Unknown suite: ${suite}`);
237+
console.error('Available suites: active, all, pending');
238+
process.exit(1);
239+
}
240+
218241
console.log(
219-
`Running ${scenarios.length} scenarios against ${validated.url}\n`
242+
`Running ${suite} suite (${scenarios.length} scenarios) against ${validated.url}\n`
220243
);
221244

222245
const allResults: { scenario: string; checks: ConformanceCheck[] }[] =

src/scenarios/client/auth/index.test.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@ beforeAll(() => {
1717
});
1818

1919
const skipScenarios = new Set<string>([
20-
// Waiting on typescript-sdk support in bearerAuth middleware to include
21-
// scope in WWW-Authenticate header
22-
// https://github.com/modelcontextprotocol/typescript-sdk/pull/1133
23-
'auth/scope-from-www-authenticate',
24-
// Waiting on typescript-sdk support for using scopes_supported from PRM
25-
// to request scopes.
26-
// https://github.com/modelcontextprotocol/typescript-sdk/pull/1133
27-
'auth/scope-from-scopes-supported',
28-
// Waiting on typescript-sdk support for CIMD
29-
// https://github.com/modelcontextprotocol/typescript-sdk/pull/1127
30-
'auth/basic-cimd'
3120
]);
3221

3322
const allowClientErrorScenarios = new Set<string>([

src/scenarios/index.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ const pendingClientScenariosList: ClientScenario[] = [
5858
// JSON Schema 2020-12 (SEP-1613)
5959
// This test is pending until the SDK includes PR #1135 which preserves
6060
// $schema, $defs, and additionalProperties fields in tool schemas.
61-
new JsonSchema2020_12Scenario()
61+
new JsonSchema2020_12Scenario(),
62+
63+
// On hold until elicitation schema types are fixed
64+
// https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1863
65+
new ToolsCallElicitationScenario(),
66+
new ElicitationDefaultsScenario(),
6267
];
6368

6469
// All client scenarios
@@ -90,7 +95,7 @@ const allClientScenariosList: ClientScenario[] = [
9095
new ElicitationDefaultsScenario(),
9196

9297
// Elicitation scenarios (SEP-1330) - pending
93-
...pendingClientScenariosList,
98+
new ElicitationEnumsScenario(),
9499

95100
// Resources scenarios
96101
new ResourcesListScenario(),
@@ -159,6 +164,10 @@ export function listActiveClientScenarios(): string[] {
159164
return activeClientScenariosList.map((scenario) => scenario.name);
160165
}
161166

167+
export function listPendingClientScenarios(): string[] {
168+
return pendingClientScenariosList.map((scenario) => scenario.name);
169+
}
170+
162171
export function listAuthScenarios(): string[] {
163172
return authScenariosList.map((scenario) => scenario.name);
164173
}

0 commit comments

Comments
 (0)