;
+}
+export declare const setupAuthServer: ({ authServerUrl, mcpServerUrl, strictResource }: {
+ authServerUrl: URL;
+ mcpServerUrl: URL;
+ strictResource: boolean;
+}) => OAuthMetadata;
+//# sourceMappingURL=demoInMemoryOAuthProvider.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts.map
new file mode 100644
index 0000000..8a4a43f
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"demoInMemoryOAuthProvider.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/demoInMemoryOAuthProvider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAgB,EAAW,QAAQ,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAKtD,qBAAa,wBAAyB,YAAW,2BAA2B;IACxE,OAAO,CAAC,OAAO,CAAiD;IAE1D,SAAS,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;IAI1B,cAAc,CAAC,cAAc,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;CAIlE;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAyB,YAAW,mBAAmB;IAWpD,OAAO,CAAC,gBAAgB,CAAC;IAVrC,YAAY,2BAAkC;IAC9C,OAAO,CAAC,KAAK,CAMT;IACJ,OAAO,CAAC,MAAM,CAA+B;gBAEzB,gBAAgB,CAAC,GAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,OAAO,aAAA;IAE5D,SAAS,CAAC,MAAM,EAAE,0BAA0B,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAwCxG,6BAA6B,CAAC,MAAM,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAU7G,yBAAyB,CAC3B,MAAM,EAAE,0BAA0B,EAClC,iBAAiB,EAAE,MAAM,EAGzB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,WAAW,CAAC;IAoCjB,oBAAoB,CACtB,OAAO,EAAE,0BAA0B,EACnC,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,SAAS,CAAC,EAAE,GAAG,GAChB,OAAO,CAAC,WAAW,CAAC;IAIjB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAc5D;AAED,eAAO,MAAM,eAAe,oDAIzB;IACC,aAAa,EAAE,GAAG,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;CAC3B,KAAG,aA+EH,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js
new file mode 100644
index 0000000..c439a34
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js
@@ -0,0 +1,205 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.setupAuthServer = exports.DemoInMemoryAuthProvider = exports.DemoInMemoryClientsStore = void 0;
+const node_crypto_1 = require("node:crypto");
+const express_1 = __importDefault(require("express"));
+const router_js_1 = require("../../server/auth/router.js");
+const auth_utils_js_1 = require("../../shared/auth-utils.js");
+const errors_js_1 = require("../../server/auth/errors.js");
+class DemoInMemoryClientsStore {
+ constructor() {
+ this.clients = new Map();
+ }
+ async getClient(clientId) {
+ return this.clients.get(clientId);
+ }
+ async registerClient(clientMetadata) {
+ this.clients.set(clientMetadata.client_id, clientMetadata);
+ return clientMetadata;
+ }
+}
+exports.DemoInMemoryClientsStore = DemoInMemoryClientsStore;
+/**
+ * 🚨 DEMO ONLY - NOT FOR PRODUCTION
+ *
+ * This example demonstrates MCP OAuth flow but lacks some of the features required for production use,
+ * for example:
+ * - Persistent token storage
+ * - Rate limiting
+ */
+class DemoInMemoryAuthProvider {
+ constructor(validateResource) {
+ this.validateResource = validateResource;
+ this.clientsStore = new DemoInMemoryClientsStore();
+ this.codes = new Map();
+ this.tokens = new Map();
+ }
+ async authorize(client, params, res) {
+ const code = (0, node_crypto_1.randomUUID)();
+ const searchParams = new URLSearchParams({
+ code
+ });
+ if (params.state !== undefined) {
+ searchParams.set('state', params.state);
+ }
+ this.codes.set(code, {
+ client,
+ params
+ });
+ // Simulate a user login
+ // Set a secure HTTP-only session cookie with authorization info
+ if (res.cookie) {
+ const authCookieData = {
+ userId: 'demo_user',
+ name: 'Demo User',
+ timestamp: Date.now()
+ };
+ res.cookie('demo_session', JSON.stringify(authCookieData), {
+ httpOnly: true,
+ secure: false, // In production, this should be true
+ sameSite: 'lax',
+ maxAge: 24 * 60 * 60 * 1000, // 24 hours - for demo purposes
+ path: '/' // Available to all routes
+ });
+ }
+ if (!client.redirect_uris.includes(params.redirectUri)) {
+ throw new errors_js_1.InvalidRequestError('Unregistered redirect_uri');
+ }
+ const targetUrl = new URL(params.redirectUri);
+ targetUrl.search = searchParams.toString();
+ res.redirect(targetUrl.toString());
+ }
+ async challengeForAuthorizationCode(client, authorizationCode) {
+ // Store the challenge with the code data
+ const codeData = this.codes.get(authorizationCode);
+ if (!codeData) {
+ throw new Error('Invalid authorization code');
+ }
+ return codeData.params.codeChallenge;
+ }
+ async exchangeAuthorizationCode(client, authorizationCode,
+ // Note: code verifier is checked in token.ts by default
+ // it's unused here for that reason.
+ _codeVerifier) {
+ const codeData = this.codes.get(authorizationCode);
+ if (!codeData) {
+ throw new Error('Invalid authorization code');
+ }
+ if (codeData.client.client_id !== client.client_id) {
+ throw new Error(`Authorization code was not issued to this client, ${codeData.client.client_id} != ${client.client_id}`);
+ }
+ if (this.validateResource && !this.validateResource(codeData.params.resource)) {
+ throw new Error(`Invalid resource: ${codeData.params.resource}`);
+ }
+ this.codes.delete(authorizationCode);
+ const token = (0, node_crypto_1.randomUUID)();
+ const tokenData = {
+ token,
+ clientId: client.client_id,
+ scopes: codeData.params.scopes || [],
+ expiresAt: Date.now() + 3600000, // 1 hour
+ resource: codeData.params.resource,
+ type: 'access'
+ };
+ this.tokens.set(token, tokenData);
+ return {
+ access_token: token,
+ token_type: 'bearer',
+ expires_in: 3600,
+ scope: (codeData.params.scopes || []).join(' ')
+ };
+ }
+ async exchangeRefreshToken(_client, _refreshToken, _scopes, _resource) {
+ throw new Error('Not implemented for example demo');
+ }
+ async verifyAccessToken(token) {
+ const tokenData = this.tokens.get(token);
+ if (!tokenData || !tokenData.expiresAt || tokenData.expiresAt < Date.now()) {
+ throw new Error('Invalid or expired token');
+ }
+ return {
+ token,
+ clientId: tokenData.clientId,
+ scopes: tokenData.scopes,
+ expiresAt: Math.floor(tokenData.expiresAt / 1000),
+ resource: tokenData.resource
+ };
+ }
+}
+exports.DemoInMemoryAuthProvider = DemoInMemoryAuthProvider;
+const setupAuthServer = ({ authServerUrl, mcpServerUrl, strictResource }) => {
+ // Create separate auth server app
+ // NOTE: This is a separate app on a separate port to illustrate
+ // how to separate an OAuth Authorization Server from a Resource
+ // server in the SDK. The SDK is not intended to be provide a standalone
+ // authorization server.
+ const validateResource = strictResource
+ ? (resource) => {
+ if (!resource)
+ return false;
+ const expectedResource = (0, auth_utils_js_1.resourceUrlFromServerUrl)(mcpServerUrl);
+ return resource.toString() === expectedResource.toString();
+ }
+ : undefined;
+ const provider = new DemoInMemoryAuthProvider(validateResource);
+ const authApp = (0, express_1.default)();
+ authApp.use(express_1.default.json());
+ // For introspection requests
+ authApp.use(express_1.default.urlencoded());
+ // Add OAuth routes to the auth server
+ // NOTE: this will also add a protected resource metadata route,
+ // but it won't be used, so leave it.
+ authApp.use((0, router_js_1.mcpAuthRouter)({
+ provider,
+ issuerUrl: authServerUrl,
+ scopesSupported: ['mcp:tools']
+ }));
+ authApp.post('/introspect', async (req, res) => {
+ try {
+ const { token } = req.body;
+ if (!token) {
+ res.status(400).json({ error: 'Token is required' });
+ return;
+ }
+ const tokenInfo = await provider.verifyAccessToken(token);
+ res.json({
+ active: true,
+ client_id: tokenInfo.clientId,
+ scope: tokenInfo.scopes.join(' '),
+ exp: tokenInfo.expiresAt,
+ aud: tokenInfo.resource
+ });
+ return;
+ }
+ catch (error) {
+ res.status(401).json({
+ active: false,
+ error: 'Unauthorized',
+ error_description: `Invalid token: ${error}`
+ });
+ }
+ });
+ const auth_port = authServerUrl.port;
+ // Start the auth server
+ authApp.listen(auth_port, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`OAuth Authorization Server listening on port ${auth_port}`);
+ });
+ // Note: we could fetch this from the server, but then we end up
+ // with some top level async which gets annoying.
+ const oauthMetadata = (0, router_js_1.createOAuthMetadata)({
+ provider,
+ issuerUrl: authServerUrl,
+ scopesSupported: ['mcp:tools']
+ });
+ oauthMetadata.introspection_endpoint = new URL('/introspect', authServerUrl).href;
+ return oauthMetadata;
+};
+exports.setupAuthServer = setupAuthServer;
+//# sourceMappingURL=demoInMemoryOAuthProvider.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js.map
new file mode 100644
index 0000000..e19a20d
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"demoInMemoryOAuthProvider.js","sourceRoot":"","sources":["../../../../src/examples/server/demoInMemoryOAuthProvider.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAyC;AAIzC,sDAAqD;AAErD,2DAAiF;AACjF,8DAAsE;AACtE,2DAAkE;AAElE,MAAa,wBAAwB;IAArC;QACY,YAAO,GAAG,IAAI,GAAG,EAAsC,CAAC;IAUpE,CAAC;IARG,KAAK,CAAC,SAAS,CAAC,QAAgB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,cAA0C;QAC3D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QAC3D,OAAO,cAAc,CAAC;IAC1B,CAAC;CACJ;AAXD,4DAWC;AAED;;;;;;;GAOG;AACH,MAAa,wBAAwB;IAWjC,YAAoB,gBAA8C;QAA9C,qBAAgB,GAAhB,gBAAgB,CAA8B;QAVlE,iBAAY,GAAG,IAAI,wBAAwB,EAAE,CAAC;QACtC,UAAK,GAAG,IAAI,GAAG,EAMpB,CAAC;QACI,WAAM,GAAG,IAAI,GAAG,EAAoB,CAAC;IAEwB,CAAC;IAEtE,KAAK,CAAC,SAAS,CAAC,MAAkC,EAAE,MAA2B,EAAE,GAAa;QAC1F,MAAM,IAAI,GAAG,IAAA,wBAAU,GAAE,CAAC;QAE1B,MAAM,YAAY,GAAG,I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cjs/examples/server/elicitationFormExample.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts
new file mode 100644
index 0000000..e4b736e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=elicitationFormExample.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts.map
new file mode 100644
index 0000000..c569df4
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationFormExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/elicitationFormExample.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js
new file mode 100644
index 0000000..4c2f4e1
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js
@@ -0,0 +1,460 @@
+"use strict";
+// Run with: npx tsx src/examples/server/elicitationFormExample.ts
+//
+// This example demonstrates how to use form elicitation to collect structured user input
+// with JSON Schema validation via a local HTTP server with SSE streaming.
+// Form elicitation allows servers to request *non-sensitive* user input through the client
+// with schema-based validation.
+// Note: See also elicitationUrlExample.ts for an example of using URL elicitation
+// to collect *sensitive* user input via a browser.
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const types_js_1 = require("../../types.js");
+const express_js_1 = require("../../server/express.js");
+// Factory to create a new MCP server per session.
+// Each session needs its own server+transport pair to avoid cross-session contamination.
+const getServer = () => {
+ // Create MCP server - it will automatically use AjvJsonSchemaValidator with sensible defaults
+ // The validator supports format validation (email, date, etc.) if ajv-formats is installed
+ const mcpServer = new mcp_js_1.McpServer({
+ name: 'form-elicitation-example-server',
+ version: '1.0.0'
+ }, {
+ capabilities: {}
+ });
+ /**
+ * Example 1: Simple user registration tool
+ * Collects username, email, and password from the user
+ */
+ mcpServer.registerTool('register_user', {
+ description: 'Register a new user account by collecting their information',
+ inputSchema: {}
+ }, async () => {
+ try {
+ // Request user information through form elicitation
+ const result = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Please provide your registration information:',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ username: {
+ type: 'string',
+ title: 'Username',
+ description: 'Your desired username (3-20 characters)',
+ minLength: 3,
+ maxLength: 20
+ },
+ email: {
+ type: 'string',
+ title: 'Email',
+ description: 'Your email address',
+ format: 'email'
+ },
+ password: {
+ type: 'string',
+ title: 'Password',
+ description: 'Your password (min 8 characters)',
+ minLength: 8
+ },
+ newsletter: {
+ type: 'boolean',
+ title: 'Newsletter',
+ description: 'Subscribe to newsletter?',
+ default: false
+ },
+ role: {
+ type: 'string',
+ title: 'Role',
+ description: 'Your primary role',
+ oneOf: [
+ { const: 'developer', title: 'Developer' },
+ { const: 'designer', title: 'Designer' },
+ { const: 'manager', title: 'Manager' },
+ { const: 'other', title: 'Other' }
+ ],
+ default: 'developer'
+ },
+ interests: {
+ type: 'array',
+ title: 'Interests',
+ description: 'Select your areas of interest',
+ items: {
+ type: 'string',
+ enum: ['frontend', 'backend', 'mobile', 'devops', 'ai']
+ },
+ minItems: 1,
+ maxItems: 3
+ }
+ },
+ required: ['username', 'email', 'password']
+ }
+ });
+ // Handle the different possible actions
+ if (result.action === 'accept' && result.content) {
+ const { username, email, newsletter } = result.content;
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Registration successful!\n\nUsername: ${username}\nEmail: ${email}\nNewsletter: ${newsletter ? 'Yes' : 'No'}`
+ }
+ ]
+ };
+ }
+ else if (result.action === 'decline') {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Registration cancelled by user.'
+ }
+ ]
+ };
+ }
+ else {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Registration was cancelled.'
+ }
+ ]
+ };
+ }
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Registration failed: ${error instanceof Error ? error.message : String(error)}`
+ }
+ ],
+ isError: true
+ };
+ }
+ });
+ /**
+ * Example 2: Multi-step workflow with multiple form elicitation requests
+ * Demonstrates how to collect information in multiple steps
+ */
+ mcpServer.registerTool('create_event', {
+ description: 'Create a calendar event by collecting event details',
+ inputSchema: {}
+ }, async () => {
+ try {
+ // Step 1: Collect basic event information
+ const basicInfo = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Step 1: Enter basic event information',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ title: {
+ type: 'string',
+ title: 'Event Title',
+ description: 'Name of the event',
+ minLength: 1
+ },
+ description: {
+ type: 'string',
+ title: 'Description',
+ description: 'Event description (optional)'
+ }
+ },
+ required: ['title']
+ }
+ });
+ if (basicInfo.action !== 'accept' || !basicInfo.content) {
+ return {
+ content: [{ type: 'text', text: 'Event creation cancelled.' }]
+ };
+ }
+ // Step 2: Collect date and time
+ const dateTime = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Step 2: Enter date and time',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ date: {
+ type: 'string',
+ title: 'Date',
+ description: 'Event date',
+ format: 'date'
+ },
+ startTime: {
+ type: 'string',
+ title: 'Start Time',
+ description: 'Event start time (HH:MM)'
+ },
+ duration: {
+ type: 'integer',
+ title: 'Duration',
+ description: 'Duration in minutes',
+ minimum: 15,
+ maximum: 480
+ }
+ },
+ required: ['date', 'startTime', 'duration']
+ }
+ });
+ if (dateTime.action !== 'accept' || !dateTime.content) {
+ return {
+ content: [{ type: 'text', text: 'Event creation cancelled.' }]
+ };
+ }
+ // Combine all collected information
+ const event = {
+ ...basicInfo.content,
+ ...dateTime.content
+ };
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Event created successfully!\n\n${JSON.stringify(event, null, 2)}`
+ }
+ ]
+ };
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Event creation failed: ${error instanceof Error ? error.message : String(error)}`
+ }
+ ],
+ isError: true
+ };
+ }
+ });
+ /**
+ * Example 3: Collecting address information
+ * Demonstrates validation with patterns and optional fields
+ */
+ mcpServer.registerTool('update_shipping_address', {
+ description: 'Update shipping address with validation',
+ inputSchema: {}
+ }, async () => {
+ try {
+ const result = await mcpServer.server.elicitInput({
+ mode: 'form',
+ message: 'Please provide your shipping address:',
+ requestedSchema: {
+ type: 'object',
+ properties: {
+ name: {
+ type: 'string',
+ title: 'Full Name',
+ description: 'Recipient name',
+ minLength: 1
+ },
+ street: {
+ type: 'string',
+ title: 'Street Address',
+ minLength: 1
+ },
+ city: {
+ type: 'string',
+ title: 'City',
+ minLength: 1
+ },
+ state: {
+ type: 'string',
+ title: 'State/Province',
+ minLength: 2,
+ maxLength: 2
+ },
+ zipCode: {
+ type: 'string',
+ title: 'ZIP/Postal Code',
+ description: '5-digit ZIP code'
+ },
+ phone: {
+ type: 'string',
+ title: 'Phone Number (optional)',
+ description: 'Contact phone number'
+ }
+ },
+ required: ['name', 'street', 'city', 'state', 'zipCode']
+ }
+ });
+ if (result.action === 'accept' && result.content) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Address updated successfully!\n\n${JSON.stringify(result.content, null, 2)}`
+ }
+ ]
+ };
+ }
+ else if (result.action === 'decline') {
+ return {
+ content: [{ type: 'text', text: 'Address update cancelled by user.' }]
+ };
+ }
+ else {
+ return {
+ content: [{ type: 'text', text: 'Address update was cancelled.' }]
+ };
+ }
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Address update failed: ${error instanceof Error ? error.message : String(error)}`
+ }
+ ],
+ isError: true
+ };
+ }
+ });
+ return mcpServer;
+};
+async function main() {
+ const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
+ const app = (0, express_js_1.createMcpExpressApp)();
+ // Map to store transports by session ID
+ const transports = {};
+ // MCP POST endpoint
+ const mcpPostHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (sessionId) {
+ console.log(`Received MCP request for session: ${sessionId}`);
+ }
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport for this session
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request - create new transport
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ }
+ };
+ // Create a new server per session and connect it to the transport
+ const mcpServer = getServer();
+ await mcpServer.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return;
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+ };
+ app.post('/mcp', mcpPostHandler);
+ // Handle GET requests for SSE streams
+ const mcpGetHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Establishing SSE stream for session ${sessionId}`);
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ };
+ app.get('/mcp', mcpGetHandler);
+ // Handle DELETE requests for session termination
+ const mcpDeleteHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Received session termination request for session ${sessionId}`);
+ try {
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ }
+ catch (error) {
+ console.error('Error handling session termination:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error processing session termination');
+ }
+ }
+ };
+ app.delete('/mcp', mcpDeleteHandler);
+ // Start listening
+ app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Form elicitation example server is running on http://localhost:${PORT}/mcp`);
+ console.log('Available tools:');
+ console.log(' - register_user: Collect user registration information');
+ console.log(' - create_event: Multi-step event creation');
+ console.log(' - update_shipping_address: Collect and validate address');
+ console.log('\nConnect your MCP client to this server using the HTTP transport.');
+ });
+ // Handle server shutdown
+ process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+ });
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=elicitationFormExample.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map
new file mode 100644
index 0000000..4056a05
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationFormExample.js","sourceRoot":"","sources":["../../../../src/examples/server/elicitationFormExample.ts"],"names":[],"mappings":";AAAA,kEAAkE;AAClE,EAAE;AACF,yFAAyF;AACzF,0EAA0E;AAC1E,2FAA2F;AAC3F,gCAAgC;AAChC,kFAAkF;AAClF,mDAAmD;;AAEnD,6CAAyC;AAEzC,gDAAgD;AAChD,sEAA+E;AAC/E,6CAAqD;AACrD,wDAA8D;AAE9D,kDAAkD;AAClD,yFAAyF;AACzF,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,8FAA8F;IAC9F,2FAA2F;IAC3F,MAAM,SAAS,GAAG,IAAI,kBAAS,CAC3B;QACI,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,OAAO;KACnB,EACD;QACI,YAAY,EAAE,EAAE;KACnB,CACJ,CAAC;IAEF;;;OAGG;IACH,SAAS,CAAC,YAAY,CAClB,eAAe,EACf;QACI,WAAW,EAAE,6DAA6D;QAC1E,WAAW,EAAE,EAAE;KAClB,EACD,KAAK,IAAI,EAAE;QACP,IAAI,CAAC;YACD,oDAAoD;YACpD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC;gBAC9C,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,+CAA+C;gBACxD,eAAe,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,QAAQ,EAAE;4BACN,IAAI,EAAE,QAAQ;4BACd,KAAK,E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AC,GAAG,CAAC,6CAA6C,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;IAEH,yBAAyB;IACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QAEvC,6DAA6D;QAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACjC,IAAI,CAAC;gBACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;gBAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;gBACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;YACjC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9E,CAAC;QACL,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts
new file mode 100644
index 0000000..611f6eb
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=elicitationUrlExample.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts.map
new file mode 100644
index 0000000..04acd66
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationUrlExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/elicitationUrlExample.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js
new file mode 100644
index 0000000..53c860b
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js
@@ -0,0 +1,656 @@
+"use strict";
+// Run with: npx tsx src/examples/server/elicitationUrlExample.ts
+//
+// This example demonstrates how to use URL elicitation to securely collect
+// *sensitive* user input in a remote (HTTP) server.
+// URL elicitation allows servers to prompt the end-user to open a URL in their browser
+// to collect sensitive information.
+// Note: See also elicitationFormExample.ts for an example of using form (not URL) elicitation
+// to collect *non-sensitive* user input with a structured schema.
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const express_1 = __importDefault(require("express"));
+const node_crypto_1 = require("node:crypto");
+const zod_1 = require("zod");
+const mcp_js_1 = require("../../server/mcp.js");
+const express_js_1 = require("../../server/express.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const router_js_1 = require("../../server/auth/router.js");
+const bearerAuth_js_1 = require("../../server/auth/middleware/bearerAuth.js");
+const types_js_1 = require("../../types.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const demoInMemoryOAuthProvider_js_1 = require("./demoInMemoryOAuthProvider.js");
+const auth_utils_js_1 = require("../../shared/auth-utils.js");
+const cors_1 = __importDefault(require("cors"));
+// Create an MCP server with implementation details
+const getServer = () => {
+ const mcpServer = new mcp_js_1.McpServer({
+ name: 'url-elicitation-http-server',
+ version: '1.0.0'
+ }, {
+ capabilities: { logging: {} }
+ });
+ mcpServer.registerTool('payment-confirm', {
+ description: 'A tool that confirms a payment directly with a user',
+ inputSchema: {
+ cartId: zod_1.z.string().describe('The ID of the cart to confirm')
+ }
+ }, async ({ cartId }, extra) => {
+ /*
+ In a real world scenario, there would be some logic here to check if the user has the provided cartId.
+ For the purposes of this example, we'll throw an error (-> elicits the client to open a URL to confirm payment)
+ */
+ const sessionId = extra.sessionId;
+ if (!sessionId) {
+ throw new Error('Expected a Session ID');
+ }
+ // Create and track the elicitation
+ const elicitationId = generateTrackedElicitation(sessionId, elicitationId => mcpServer.server.createElicitationCompletionNotifier(elicitationId));
+ throw new types_js_1.UrlElicitationRequiredError([
+ {
+ mode: 'url',
+ message: 'This tool requires a payment confirmation. Open the link to confirm payment!',
+ url: `http://localhost:${MCP_PORT}/confirm-payment?session=${sessionId}&elicitation=${elicitationId}&cartId=${encodeURIComponent(cartId)}`,
+ elicitationId
+ }
+ ]);
+ });
+ mcpServer.registerTool('third-party-auth', {
+ description: 'A demo tool that requires third-party OAuth credentials',
+ inputSchema: {
+ param1: zod_1.z.string().describe('First parameter')
+ }
+ }, async (_, extra) => {
+ /*
+ In a real world scenario, there would be some logic here to check if we already have a valid access token for the user.
+ Auth info (with a subject or `sub` claim) can be typically be found in `extra.authInfo`.
+ If we do, we can just return the result of the tool call.
+ If we don't, we can throw an ElicitationRequiredError to request the user to authenticate.
+ For the purposes of this example, we'll throw an error (-> elicits the client to open a URL to authenticate).
+ */
+ const sessionId = extra.sessionId;
+ if (!sessionId) {
+ throw new Error('Expected a Session ID');
+ }
+ // Create and track the elicitation
+ const elicitationId = generateTrackedElicitation(sessionId, elicitationId => mcpServer.server.createElicitationCompletionNotifier(elicitationId));
+ // Simulate OAuth callback and token exchange after 5 seconds
+ // In a real app, this would be called from your OAuth callback handler
+ setTimeout(() => {
+ console.log(`Simulating OAuth token received for elicitation ${elicitationId}`);
+ completeURLElicitation(elicitationId);
+ }, 5000);
+ throw new types_js_1.UrlElicitationRequiredError([
+ {
+ mode: 'url',
+ message: 'This tool requires access to your example.com account. Open the link to authenticate!',
+ url: 'https://www.example.com/oauth/authorize',
+ elicitationId
+ }
+ ]);
+ });
+ return mcpServer;
+};
+const elicitationsMap = new Map();
+// Clean up old elicitations after 1 hour to prevent memory leaks
+const ELICITATION_TTL_MS = 60 * 60 * 1000; // 1 hour
+const CLEANUP_INTERVAL_MS = 10 * 60 * 1000; // 10 minutes
+function cleanupOldElicitations() {
+ const now = new Date();
+ for (const [id, metadata] of elicitationsMap.entries()) {
+ if (now.getTime() - metadata.createdAt.getTime() > ELICITATION_TTL_MS) {
+ elicitationsMap.delete(id);
+ console.log(`Cleaned up expired elicitation: ${id}`);
+ }
+ }
+}
+setInterval(cleanupOldElicitations, CLEANUP_INTERVAL_MS);
+/**
+ * Elicitation IDs must be unique strings within the MCP session
+ * UUIDs are used in this example for simplicity
+ */
+function generateElicitationId() {
+ return (0, node_crypto_1.randomUUID)();
+}
+/**
+ * Helper function to create and track a new elicitation.
+ */
+function generateTrackedElicitation(sessionId, createCompletionNotifier) {
+ const elicitationId = generateElicitationId();
+ // Create a Promise and its resolver for tracking completion
+ let completeResolver;
+ const completedPromise = new Promise(resolve => {
+ completeResolver = resolve;
+ });
+ const completionNotifier = createCompletionNotifier ? createCompletionNotifier(elicitationId) : undefined;
+ // Store the elicitation in our map
+ elicitationsMap.set(elicitationId, {
+ status: 'pending',
+ completedPromise,
+ completeResolver: completeResolver,
+ createdAt: new Date(),
+ sessionId,
+ completionNotifier
+ });
+ return elicitationId;
+}
+/**
+ * Helper function to complete an elicitation.
+ */
+function completeURLElicitation(elicitationId) {
+ const elicitation = elicitationsMap.get(elicitationId);
+ if (!elicitation) {
+ console.warn(`Attempted to complete unknown elicitation: ${elicitationId}`);
+ return;
+ }
+ if (elicitation.status === 'complete') {
+ console.warn(`Elicitation already complete: ${elicitationId}`);
+ return;
+ }
+ // Update metadata
+ elicitation.status = 'complete';
+ // Send completion notification to the client
+ if (elicitation.completionNotifier) {
+ console.log(`Sending notifications/elicitation/complete notification for elicitation ${elicitationId}`);
+ elicitation.completionNotifier().catch(error => {
+ console.error(`Failed to send completion notification for elicitation ${elicitationId}:`, error);
+ });
+ }
+ // Resolve the promise to unblock any waiting code
+ elicitation.completeResolver();
+}
+const MCP_PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 3000;
+const AUTH_PORT = process.env.MCP_AUTH_PORT ? parseInt(process.env.MCP_AUTH_PORT, 10) : 3001;
+const app = (0, express_js_1.createMcpExpressApp)();
+// Allow CORS all domains, expose the Mcp-Session-Id header
+app.use((0, cors_1.default)({
+ origin: '*', // Allow all origins
+ exposedHeaders: ['Mcp-Session-Id'],
+ credentials: true // Allow cookies to be sent cross-origin
+}));
+// Set up OAuth (required for this example)
+let authMiddleware = null;
+// Create auth middleware for MCP endpoints
+const mcpServerUrl = new URL(`http://localhost:${MCP_PORT}/mcp`);
+const authServerUrl = new URL(`http://localhost:${AUTH_PORT}`);
+const oauthMetadata = (0, demoInMemoryOAuthProvider_js_1.setupAuthServer)({ authServerUrl, mcpServerUrl, strictResource: true });
+const tokenVerifier = {
+ verifyAccessToken: async (token) => {
+ const endpoint = oauthMetadata.introspection_endpoint;
+ if (!endpoint) {
+ throw new Error('No token verification endpoint available in metadata');
+ }
+ const response = await fetch(endpoint, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ body: new URLSearchParams({
+ token: token
+ }).toString()
+ });
+ if (!response.ok) {
+ const text = await response.text().catch(() => null);
+ throw new Error(`Invalid or expired token: ${text}`);
+ }
+ const data = await response.json();
+ if (!data.aud) {
+ throw new Error(`Resource Indicator (RFC8707) missing`);
+ }
+ if (!(0, auth_utils_js_1.checkResourceAllowed)({ requestedResource: data.aud, configuredResource: mcpServerUrl })) {
+ throw new Error(`Expected resource indicator ${mcpServerUrl}, got: ${data.aud}`);
+ }
+ // Convert the response to AuthInfo format
+ return {
+ token,
+ clientId: data.client_id,
+ scopes: data.scope ? data.scope.split(' ') : [],
+ expiresAt: data.exp
+ };
+ }
+};
+// Add metadata routes to the main MCP server
+app.use((0, router_js_1.mcpAuthMetadataRouter)({
+ oauthMetadata,
+ resourceServerUrl: mcpServerUrl,
+ scopesSupported: ['mcp:tools'],
+ resourceName: 'MCP Demo Server'
+}));
+authMiddleware = (0, bearerAuth_js_1.requireBearerAuth)({
+ verifier: tokenVerifier,
+ requiredScopes: [],
+ resourceMetadataUrl: (0, router_js_1.getOAuthProtectedResourceMetadataUrl)(mcpServerUrl)
+});
+/**
+ * API Key Form Handling
+ *
+ * Many servers today require an API key to operate, but there's no scalable way to do this dynamically for remote servers within MCP protocol.
+ * URL-mode elicitation enables the server to host a simple form and get the secret data securely from the user without involving the LLM or client.
+ **/
+async function sendApiKeyElicitation(sessionId, sender, createCompletionNotifier) {
+ if (!sessionId) {
+ console.error('No session ID provided');
+ throw new Error('Expected a Session ID to track elicitation');
+ }
+ console.log('🔑 URL elicitation demo: Requesting API key from client...');
+ const elicitationId = generateTrackedElicitation(sessionId, createCompletionNotifier);
+ try {
+ const result = await sender({
+ mode: 'url',
+ message: 'Please provide your API key to authenticate with this server',
+ // Host the form on the same server. In a real app, you might coordinate passing these state variables differently.
+ url: `http://localhost:${MCP_PORT}/api-key-form?session=${sessionId}&elicitation=${elicitationId}`,
+ elicitationId
+ });
+ switch (result.action) {
+ case 'accept':
+ console.log('🔑 URL elicitation demo: Client accepted the API key elicitation (now pending form submission)');
+ // Wait for the API key to be submitted via the form
+ // The form submission will complete the elicitation
+ break;
+ default:
+ console.log('🔑 URL elicitation demo: Client declined to provide an API key');
+ // In a real app, this might close the connection, but for the demo, we'll continue
+ break;
+ }
+ }
+ catch (error) {
+ console.error('Error during API key elicitation:', error);
+ }
+}
+// API Key Form endpoint - serves a simple HTML form
+app.get('/api-key-form', (req, res) => {
+ const mcpSessionId = req.query.session;
+ const elicitationId = req.query.elicitation;
+ if (!mcpSessionId || !elicitationId) {
+ res.status(400).send('Error
Missing required parameters
');
+ return;
+ }
+ // Check for user session cookie
+ // In production, this is often handled by some user auth middleware to ensure the user has a valid session
+ // This session is different from the MCP session.
+ // This userSession is the cookie that the MCP Server's Authorization Server sets for the user when they log in.
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ // Serve a simple HTML form
+ res.send(`
+
+
+
+ Submit Your API Key
+
+
+
+ API Key Required
+ ✓ Logged in as: ${userSession.name}
+
+ This is a demo showing how a server can securely elicit sensitive data from a user using a URL.
+
+
+ `);
+});
+// Handle API key form submission
+app.post('/api-key-form', express_1.default.urlencoded(), (req, res) => {
+ const { session: sessionId, apiKey, elicitation: elicitationId } = req.body;
+ if (!sessionId || !apiKey || !elicitationId) {
+ res.status(400).send('Error
Missing required parameters
');
+ return;
+ }
+ // Check for user session cookie here too
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ // A real app might store this API key to be used later for the user.
+ console.log(`🔑 Received API key \x1b[32m${apiKey}\x1b[0m for session ${sessionId}`);
+ // If we have an elicitationId, complete the elicitation
+ completeURLElicitation(elicitationId);
+ // Send a success response
+ res.send(`
+
+
+
+ Success
+
+
+
+
+
Success ✓
+
API key received.
+
+ You can close this window and return to your MCP client.
+
+
+ `);
+});
+// Helper to get the user session from the demo_session cookie
+function getUserSessionCookie(cookieHeader) {
+ if (!cookieHeader)
+ return null;
+ const cookies = cookieHeader.split(';');
+ for (const cookie of cookies) {
+ const [name, value] = cookie.trim().split('=');
+ if (name === 'demo_session' && value) {
+ try {
+ return JSON.parse(decodeURIComponent(value));
+ }
+ catch (error) {
+ console.error('Failed to parse demo_session cookie:', error);
+ return null;
+ }
+ }
+ }
+ return null;
+}
+/**
+ * Payment Confirmation Form Handling
+ *
+ * This demonstrates how a server can use URL-mode elicitation to get user confirmation
+ * for sensitive operations like payment processing.
+ **/
+// Payment Confirmation Form endpoint - serves a simple HTML form
+app.get('/confirm-payment', (req, res) => {
+ const mcpSessionId = req.query.session;
+ const elicitationId = req.query.elicitation;
+ const cartId = req.query.cartId;
+ if (!mcpSessionId || !elicitationId) {
+ res.status(400).send('Error
Missing required parameters
');
+ return;
+ }
+ // Check for user session cookie
+ // In production, this is often handled by some user auth middleware to ensure the user has a valid session
+ // This session is different from the MCP session.
+ // This userSession is the cookie that the MCP Server's Authorization Server sets for the user when they log in.
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ // Serve a simple HTML form
+ res.send(`
+
+
+
+ Confirm Payment
+
+
+
+ Confirm Payment
+ ✓ Logged in as: ${userSession.name}
+ ${cartId ? `Cart ID: ${cartId}
` : ''}
+
+ ⚠️ Please review your order before confirming.
+
+
+ This is a demo showing how a server can securely get user confirmation for sensitive operations using URL-mode elicitation.
+
+
+ `);
+});
+// Handle Payment Confirmation form submission
+app.post('/confirm-payment', express_1.default.urlencoded(), (req, res) => {
+ const { session: sessionId, elicitation: elicitationId, cartId, action } = req.body;
+ if (!sessionId || !elicitationId) {
+ res.status(400).send('Error
Missing required parameters
');
+ return;
+ }
+ // Check for user session cookie here too
+ const userSession = getUserSessionCookie(req.headers.cookie);
+ if (!userSession) {
+ res.status(401).send('Error
Unauthorized - please reconnect to login again
');
+ return;
+ }
+ if (action === 'confirm') {
+ // A real app would process the payment here
+ console.log(`💳 Payment confirmed for cart ${cartId || 'unknown'} by user ${userSession.name} (session ${sessionId})`);
+ // Complete the elicitation
+ completeURLElicitation(elicitationId);
+ // Send a success response
+ res.send(`
+
+
+
+ Payment Confirmed
+
+
+
+
+
Payment Confirmed ✓
+
Your payment has been successfully processed.
+ ${cartId ? `
Cart ID: ${cartId}
` : ''}
+
+ You can close this window and return to your MCP client.
+
+
+ `);
+ }
+ else if (action === 'cancel') {
+ console.log(`💳 Payment cancelled for cart ${cartId || 'unknown'} by user ${userSession.name} (session ${sessionId})`);
+ // The client will still receive a notifications/elicitation/complete notification,
+ // which indicates that the out-of-band interaction is complete (but not necessarily successful)
+ completeURLElicitation(elicitationId);
+ res.send(`
+
+
+
+ Payment Cancelled
+
+
+
+
+
Payment Cancelled
+
Your payment has been cancelled.
+
+ You can close this window and return to your MCP client.
+
+
+ `);
+ }
+ else {
+ res.status(400).send('Error
Invalid action
');
+ }
+});
+// Map to store transports by session ID
+const transports = {};
+const sessionsNeedingElicitation = {};
+// MCP POST endpoint
+const mcpPostHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ console.debug(`Received MCP POST for session: ${sessionId || 'unknown'}`);
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ const server = getServer();
+ // New initialization request
+ const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore, // Enable resumability
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ sessionsNeedingElicitation[sessionId] = {
+ elicitationSender: params => server.server.elicitInput(params),
+ createCompletionNotifier: elicitationId => server.server.createElicitationCompletionNotifier(elicitationId)
+ };
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ delete sessionsNeedingElicitation[sid];
+ }
+ };
+ // Connect the transport to the MCP server BEFORE handling the request
+ // so responses can flow back through the same transport
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport - no need to reconnect
+ // The existing transport is already connected to the server
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+};
+// Set up routes with auth middleware
+app.post('/mcp', authMiddleware, mcpPostHandler);
+// Handle GET requests for SSE streams (using built-in support from StreamableHTTP)
+const mcpGetHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ // Check for Last-Event-ID header for resumability
+ const lastEventId = req.headers['last-event-id'];
+ if (lastEventId) {
+ console.log(`Client reconnecting with Last-Event-ID: ${lastEventId}`);
+ }
+ else {
+ console.log(`Establishing new SSE stream for session ${sessionId}`);
+ }
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ if (sessionsNeedingElicitation[sessionId]) {
+ const { elicitationSender, createCompletionNotifier } = sessionsNeedingElicitation[sessionId];
+ // Send an elicitation request to the client in the background
+ sendApiKeyElicitation(sessionId, elicitationSender, createCompletionNotifier)
+ .then(() => {
+ // Only delete on successful send for this demo
+ delete sessionsNeedingElicitation[sessionId];
+ console.log(`🔑 URL elicitation demo: Finished sending API key elicitation request for session ${sessionId}`);
+ })
+ .catch(error => {
+ console.error('Error sending API key elicitation:', error);
+ // Keep in map to potentially retry on next reconnect
+ });
+ }
+};
+// Set up GET route with conditional auth middleware
+app.get('/mcp', authMiddleware, mcpGetHandler);
+// Handle DELETE requests for session termination (according to MCP spec)
+const mcpDeleteHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Received session termination request for session ${sessionId}`);
+ try {
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ }
+ catch (error) {
+ console.error('Error handling session termination:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error processing session termination');
+ }
+ }
+};
+// Set up DELETE route with auth middleware
+app.delete('/mcp', authMiddleware, mcpDeleteHandler);
+app.listen(MCP_PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Streamable HTTP Server listening on port ${MCP_PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ delete sessionsNeedingElicitation[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=elicitationUrlExample.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map
new file mode 100644
index 0000000..a37e196
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"elicitationUrlExample.js","sourceRoot":"","sources":["../../../../src/examples/server/elicitationUrlExample.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,2EAA2E;AAC3E,oDAAoD;AACpD,uFAAuF;AACvF,oCAAoC;AACpC,8FAA8F;AAC9F,kEAAkE;;;;;AAElE,sDAAqD;AACrD,6CAAyC;AACzC,6BAAwB;AACxB,gDAAgD;AAChD,wDAA8D;AAC9D,sEAA+E;AAC/E,2DAA0G;AAC1G,8EAA+E;AAC/E,6CAAwI;AACxI,2EAAqE;AACrE,iFAAiE;AAEjE,8DAAkE;AAElE,gDAAwB;AAExB,mDAAmD;AACnD,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,SAAS,GAAG,IAAI,kBAAS,CAC3B;QACI,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,OAAO;KACnB,EACD;QACI,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KAChC,CACJ,CAAC;IAEF,SAAS,CAAC,YAAY,CAClB,iBAAiB,EACjB;QACI,WAAW,EAAE,qDAAqD;QAClE,WAAW,EAAE;YACT,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;SAC/D;KACJ,EACD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAA2B,EAAE;QACjD;;;MAGF;QACE,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC7C,CAAC;QAED,mCAAmC;QACnC,MAAM,aAAa,GAAG,0BAA0B,CAAC,SA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CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAEvC,6DAA6D;IAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;YAC7B,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts
new file mode 100644
index 0000000..bc6abdd
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Example MCP server using Hono with WebStandardStreamableHTTPServerTransport
+ *
+ * This example demonstrates using the Web Standard transport directly with Hono,
+ * which works on any runtime: Node.js, Cloudflare Workers, Deno, Bun, etc.
+ *
+ * Run with: npx tsx src/examples/server/honoWebStandardStreamableHttp.ts
+ */
+export {};
+//# sourceMappingURL=honoWebStandardStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts.map
new file mode 100644
index 0000000..a6a6199
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"honoWebStandardStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/honoWebStandardStreamableHttp.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js
new file mode 100644
index 0000000..b45127e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js
@@ -0,0 +1,85 @@
+"use strict";
+/**
+ * Example MCP server using Hono with WebStandardStreamableHTTPServerTransport
+ *
+ * This example demonstrates using the Web Standard transport directly with Hono,
+ * which works on any runtime: Node.js, Cloudflare Workers, Deno, Bun, etc.
+ *
+ * Run with: npx tsx src/examples/server/honoWebStandardStreamableHttp.ts
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const hono_1 = require("hono");
+const cors_1 = require("hono/cors");
+const node_server_1 = require("@hono/node-server");
+const z = __importStar(require("zod/v4"));
+const mcp_js_1 = require("../../server/mcp.js");
+const webStandardStreamableHttp_js_1 = require("../../server/webStandardStreamableHttp.js");
+// Factory function to create a new MCP server per request (stateless mode)
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'hono-webstandard-mcp-server',
+ version: '1.0.0'
+ });
+ // Register a simple greeting tool
+ server.registerTool('greet', {
+ title: 'Greeting Tool',
+ description: 'A simple greeting tool',
+ inputSchema: { name: z.string().describe('Name to greet') }
+ }, async ({ name }) => {
+ return {
+ content: [{ type: 'text', text: `Hello, ${name}! (from Hono + WebStandard transport)` }]
+ };
+ });
+ return server;
+};
+// Create the Hono app
+const app = new hono_1.Hono();
+// Enable CORS for all origins
+app.use('*', (0, cors_1.cors)({
+ origin: '*',
+ allowMethods: ['GET', 'POST', 'DELETE', 'OPTIONS'],
+ allowHeaders: ['Content-Type', 'mcp-session-id', 'Last-Event-ID', 'mcp-protocol-version'],
+ exposeHeaders: ['mcp-session-id', 'mcp-protocol-version']
+}));
+// Health check endpoint
+app.get('/health', c => c.json({ status: 'ok' }));
+// MCP endpoint - create a fresh transport and server per request (stateless)
+app.all('/mcp', async (c) => {
+ const transport = new webStandardStreamableHttp_js_1.WebStandardStreamableHTTPServerTransport();
+ const server = getServer();
+ await server.connect(transport);
+ return transport.handleRequest(c.req.raw);
+});
+// Start the server
+const PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 3000;
+console.log(`Starting Hono MCP server on port ${PORT}`);
+console.log(`Health check: http://localhost:${PORT}/health`);
+console.log(`MCP endpoint: http://localhost:${PORT}/mcp`);
+(0, node_server_1.serve)({
+ fetch: app.fetch,
+ port: PORT
+});
+//# sourceMappingURL=honoWebStandardStreamableHttp.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js.map
new file mode 100644
index 0000000..8c23f27
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"honoWebStandardStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/honoWebStandardStreamableHttp.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA4B;AAC5B,oCAAiC;AACjC,mDAA0C;AAC1C,0CAA4B;AAC5B,gDAAgD;AAChD,4FAAqG;AAGrG,2EAA2E;AAC3E,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;QACzB,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,kCAAkC;IAClC,MAAM,CAAC,YAAY,CACf,OAAO,EACP;QACI,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,wBAAwB;QACrC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;KAC9D,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAA2B,EAAE;QACxC,OAAO;YACH,OAAO,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AAO,CAAC,GAAG,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;AACxD,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,SAAS,CAAC,CAAC;AAC7D,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,MAAM,CAAC,CAAC;AAE1D,IAAA,mBAAK,EAAC;IACF,KAAK,EAAE,GAAG,CAAC,KAAK;IAChB,IAAI,EAAE,IAAI;CACb,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts
new file mode 100644
index 0000000..477fa6b
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=jsonResponseStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts.map
new file mode 100644
index 0000000..ee8117e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsonResponseStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/jsonResponseStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js
new file mode 100644
index 0000000..ecd769b
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js
@@ -0,0 +1,171 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const z = __importStar(require("zod/v4"));
+const types_js_1 = require("../../types.js");
+const express_js_1 = require("../../server/express.js");
+// Create an MCP server with implementation details
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'json-response-streamable-http-server',
+ version: '1.0.0'
+ }, {
+ capabilities: {
+ logging: {}
+ }
+ });
+ // Register a simple tool that returns a greeting
+ server.registerTool('greet', {
+ description: 'A simple greeting tool',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ }
+ }, async ({ name }) => {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Hello, ${name}!`
+ }
+ ]
+ };
+ });
+ // Register a tool that sends multiple greetings with notifications
+ server.registerTool('multi-greet', {
+ description: 'A tool that sends different greetings with delays between them',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ }
+ }, async ({ name }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ await server.sendLoggingMessage({
+ level: 'debug',
+ data: `Starting multi-greet for ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait 1 second before first greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending first greeting to ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait another second before second greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending second greeting to ${name}`
+ }, extra.sessionId);
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Good morning, ${name}!`
+ }
+ ]
+ };
+ });
+ return server;
+};
+const app = (0, express_js_1.createMcpExpressApp)();
+// Map to store transports by session ID
+const transports = {};
+app.post('/mcp', async (req, res) => {
+ console.log('Received MCP request:', req.body);
+ try {
+ // Check for existing session ID
+ const sessionId = req.headers['mcp-session-id'];
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request - use JSON response mode
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ enableJsonResponse: true, // Enable JSON response mode
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Connect the transport to the MCP server BEFORE handling the request
+ const server = getServer();
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport - no need to reconnect
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+// Handle GET requests for SSE streams according to spec
+app.get('/mcp', async (req, res) => {
+ // Since this is a very simple example, we don't support GET requests for this server
+ // The spec requires returning 405 Method Not Allowed in this case
+ res.status(405).set('Allow', 'POST').send('Method Not Allowed');
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Streamable HTTP Server listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ process.exit(0);
+});
+//# sourceMappingURL=jsonResponseStreamableHttp.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map
new file mode 100644
index 0000000..dd8782c
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jsonResponseStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/jsonResponseStreamableHttp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAyC;AACzC,gDAAgD;AAChD,sEAA+E;AAC/E,0CAA4B;AAC5B,6CAAqE;AACrE,wDAA8D;AAE9D,mDAAmD;AACnD,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAA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E,EAAE;IAClD,qFAAqF;IACrF,kEAAkE;IAClE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AACpE,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;IACrB,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,gDAAgD,IAAI,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts
new file mode 100644
index 0000000..a6cb497
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+/**
+ * Example MCP server using the high-level McpServer API with outputSchema
+ * This demonstrates how to easily create tools with structured output
+ */
+export {};
+//# sourceMappingURL=mcpServerOutputSchema.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts.map
new file mode 100644
index 0000000..bd3abdc
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcpServerOutputSchema.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/mcpServerOutputSchema.ts"],"names":[],"mappings":";AACA;;;GAGG"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js
new file mode 100644
index 0000000..4ac7e5c
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js
@@ -0,0 +1,95 @@
+#!/usr/bin/env node
+"use strict";
+/**
+ * Example MCP server using the high-level McpServer API with outputSchema
+ * This demonstrates how to easily create tools with structured output
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const stdio_js_1 = require("../../server/stdio.js");
+const z = __importStar(require("zod/v4"));
+const server = new mcp_js_1.McpServer({
+ name: 'mcp-output-schema-high-level-example',
+ version: '1.0.0'
+});
+// Define a tool with structured output - Weather data
+server.registerTool('get_weather', {
+ description: 'Get weather information for a city',
+ inputSchema: {
+ city: z.string().describe('City name'),
+ country: z.string().describe('Country code (e.g., US, UK)')
+ },
+ outputSchema: {
+ temperature: z.object({
+ celsius: z.number(),
+ fahrenheit: z.number()
+ }),
+ conditions: z.enum(['sunny', 'cloudy', 'rainy', 'stormy', 'snowy']),
+ humidity: z.number().min(0).max(100),
+ wind: z.object({
+ speed_kmh: z.number(),
+ direction: z.string()
+ })
+ }
+}, async ({ city, country }) => {
+ // Parameters are available but not used in this example
+ void city;
+ void country;
+ // Simulate weather API call
+ const temp_c = Math.round((Math.random() * 35 - 5) * 10) / 10;
+ const conditions = ['sunny', 'cloudy', 'rainy', 'stormy', 'snowy'][Math.floor(Math.random() * 5)];
+ const structuredContent = {
+ temperature: {
+ celsius: temp_c,
+ fahrenheit: Math.round(((temp_c * 9) / 5 + 32) * 10) / 10
+ },
+ conditions,
+ humidity: Math.round(Math.random() * 100),
+ wind: {
+ speed_kmh: Math.round(Math.random() * 50),
+ direction: ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'][Math.floor(Math.random() * 8)]
+ }
+ };
+ return {
+ content: [
+ {
+ type: 'text',
+ text: JSON.stringify(structuredContent, null, 2)
+ }
+ ],
+ structuredContent
+ };
+});
+async function main() {
+ const transport = new stdio_js_1.StdioServerTransport();
+ await server.connect(transport);
+ console.error('High-level Output Schema Example Server running on stdio');
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=mcpServerOutputSchema.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js.map
new file mode 100644
index 0000000..ba0f8b2
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcpServerOutputSchema.js","sourceRoot":"","sources":["../../../../src/examples/server/mcpServerOutputSchema.ts"],"names":[],"mappings":";;AACA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAgD;AAChD,oDAA6D;AAC7D,0CAA4B;AAE5B,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;IACzB,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH,sDAAsD;AACtD,MAAM,CAAC,YAAY,CACf,aAAa,EACb;IACI,WAAW,EAAE,oCAAoC;IACjD,WAAW,EAAE;QACT,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;QACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;KAC9D;IACD,YAAY,EAAE;QACV,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YAClB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;YACnB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;SACzB,CAAC;QACF,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACnE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAA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IAEF,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;aACnD;SACJ;QACD,iBAAiB;KACpB,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;AAC9E,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts
new file mode 100644
index 0000000..1b97c20
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts
@@ -0,0 +1,12 @@
+/**
+ * Example: Progress notifications over stdio.
+ *
+ * Demonstrates a tool that reports progress to the client while processing.
+ *
+ * Run:
+ * npx tsx src/examples/server/progressExample.ts
+ *
+ * Then connect a client with an `onprogress` callback (see docs/protocol.md).
+ */
+export {};
+//# sourceMappingURL=progressExample.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts.map
new file mode 100644
index 0000000..590e57d
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"progressExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/progressExample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js
new file mode 100644
index 0000000..041f213
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js
@@ -0,0 +1,49 @@
+"use strict";
+/**
+ * Example: Progress notifications over stdio.
+ *
+ * Demonstrates a tool that reports progress to the client while processing.
+ *
+ * Run:
+ * npx tsx src/examples/server/progressExample.ts
+ *
+ * Then connect a client with an `onprogress` callback (see docs/protocol.md).
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const stdio_js_1 = require("../../server/stdio.js");
+const zod_1 = require("zod");
+const server = new mcp_js_1.McpServer({ name: 'progress-example', version: '1.0.0' }, { capabilities: { logging: {} } });
+server.registerTool('count', {
+ description: 'Count to N with progress updates',
+ inputSchema: { n: zod_1.z.number().int().min(1).max(100) }
+}, async ({ n }, extra) => {
+ for (let i = 1; i <= n; i++) {
+ if (extra.signal.aborted) {
+ return { content: [{ type: 'text', text: `Cancelled at ${i}` }], isError: true };
+ }
+ if (extra._meta?.progressToken !== undefined) {
+ await extra.sendNotification({
+ method: 'notifications/progress',
+ params: {
+ progressToken: extra._meta.progressToken,
+ progress: i,
+ total: n,
+ message: `Counting: ${i}/${n}`
+ }
+ });
+ }
+ // Simulate work
+ await new Promise(resolve => setTimeout(resolve, 100));
+ }
+ return { content: [{ type: 'text', text: `Counted to ${n}` }] };
+});
+async function main() {
+ const transport = new stdio_js_1.StdioServerTransport();
+ await server.connect(transport);
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=progressExample.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js.map
new file mode 100644
index 0000000..e8475e9
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"progressExample.js","sourceRoot":"","sources":["../../../../src/examples/server/progressExample.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAEH,gDAAgD;AAChD,oDAA6D;AAC7D,6BAAwB;AAExB,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAEhH,MAAM,CAAC,YAAY,CACf,OAAO,EACP;IACI,WAAW,EAAE,kCAAkC;IAC/C,WAAW,EAAE,EAAE,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;CACvD,EACD,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1B,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACvB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACrF,CAAC;QAED,IAAI,KAAK,CAAC,KAAK,EAAE,aAAa,KAAK,SAAS,EAAE,CAAC;YAC3C,MAAM,KAAK,CAAC,gBAAgB,CAAC;gBACzB,MAAM,EAAE,wBAAwB;gBAChC,MAAM,EAAE;oBACJ,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa;oBACxC,QAAQ,EAAE,CAAC;oBACX,KAAK,EAAE,CAAC;oBACR,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE;iBACjC;aACJ,CAAC,CAAC;QACP,CAAC;QAED,gBAAgB;QAChB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AACpE,CAAC,CACJ,CAAC;AAEF,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts
new file mode 100644
index 0000000..4269b78
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=simpleSseServer.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts.map
new file mode 100644
index 0000000..08a1b45
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleSseServer.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleSseServer.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js
new file mode 100644
index 0000000..ed1efd5
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js
@@ -0,0 +1,168 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const sse_js_1 = require("../../server/sse.js");
+const z = __importStar(require("zod/v4"));
+const express_js_1 = require("../../server/express.js");
+/**
+ * This example server demonstrates the deprecated HTTP+SSE transport
+ * (protocol version 2024-11-05). It mainly used for testing backward compatible clients.
+ *
+ * The server exposes two endpoints:
+ * - /mcp: For establishing the SSE stream (GET)
+ * - /messages: For receiving client messages (POST)
+ *
+ */
+// Create an MCP server instance
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'simple-sse-server',
+ version: '1.0.0'
+ }, { capabilities: { logging: {} } });
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(1000),
+ count: z.number().describe('Number of notifications to send').default(10)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ // Send the initial notification
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Starting notification stream with ${count} messages every ${interval}ms`
+ }, extra.sessionId);
+ // Send periodic notifications
+ while (counter < count) {
+ counter++;
+ await sleep(interval);
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Completed sending ${count} notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ return server;
+};
+const app = (0, express_js_1.createMcpExpressApp)();
+// Store transports by session ID
+const transports = {};
+// SSE endpoint for establishing the stream
+app.get('/mcp', async (req, res) => {
+ console.log('Received GET request to /sse (establishing SSE stream)');
+ try {
+ // Create a new SSE transport for the client
+ // The endpoint for POST messages is '/messages'
+ const transport = new sse_js_1.SSEServerTransport('/messages', res);
+ // Store the transport by session ID
+ const sessionId = transport.sessionId;
+ transports[sessionId] = transport;
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ console.log(`SSE transport closed for session ${sessionId}`);
+ delete transports[sessionId];
+ };
+ // Connect the transport to the MCP server
+ const server = getServer();
+ await server.connect(transport);
+ console.log(`Established SSE stream with session ID: ${sessionId}`);
+ }
+ catch (error) {
+ console.error('Error establishing SSE stream:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error establishing SSE stream');
+ }
+ }
+});
+// Messages endpoint for receiving client JSON-RPC requests
+app.post('/messages', async (req, res) => {
+ console.log('Received POST request to /messages');
+ // Extract session ID from URL query parameter
+ // In the SSE protocol, this is added by the client based on the endpoint event
+ const sessionId = req.query.sessionId;
+ if (!sessionId) {
+ console.error('No session ID provided in request URL');
+ res.status(400).send('Missing sessionId parameter');
+ return;
+ }
+ const transport = transports[sessionId];
+ if (!transport) {
+ console.error(`No active transport found for session ID: ${sessionId}`);
+ res.status(404).send('Session not found');
+ return;
+ }
+ try {
+ // Handle the POST message with the transport
+ await transport.handlePostMessage(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling request:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error handling request');
+ }
+ }
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Simple SSE Server (deprecated protocol version 2024-11-05) listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleSseServer.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js.map
new file mode 100644
index 0000000..e3a334c
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleSseServer.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleSseServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAgD;AAChD,gDAAyD;AACzD,0CAA4B;AAE5B,wDAA8D;AAE9D;;;;;;;;GAQG;AAEH,gCAAgC;AAChC,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,OAAO;KACnB,EACD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CACpC,CAAC;IAEF,MAAM,CAAC,YAAY,CACf,2BAA2B,EAC3B;QACI,WAAW,EAAE,uCAAuC;QACpD,WAAW,EAAE;YACT,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;YAC7F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SAC5E;KACJ,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAA2B,EAAE;QAC1D,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CA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SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts
new file mode 100644
index 0000000..0aa4ad2
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=simpleStatelessStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts.map
new file mode 100644
index 0000000..92deb06
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStatelessStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleStatelessStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js
new file mode 100644
index 0000000..87601ab
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js
@@ -0,0 +1,166 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const z = __importStar(require("zod/v4"));
+const express_js_1 = require("../../server/express.js");
+const getServer = () => {
+ // Create an MCP server with implementation details
+ const server = new mcp_js_1.McpServer({
+ name: 'stateless-streamable-http-server',
+ version: '1.0.0'
+ }, { capabilities: { logging: {} } });
+ // Register a simple prompt
+ server.registerPrompt('greeting-template', {
+ description: 'A simple greeting prompt template',
+ argsSchema: {
+ name: z.string().describe('Name to include in greeting')
+ }
+ }, async ({ name }) => {
+ return {
+ messages: [
+ {
+ role: 'user',
+ content: {
+ type: 'text',
+ text: `Please greet ${name} in a friendly manner.`
+ }
+ }
+ ]
+ };
+ });
+ // Register a tool specifically for testing resumability
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications for testing resumability',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(100),
+ count: z.number().describe('Number of notifications to send (0 for 100)').default(10)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ while (count === 0 || counter < count) {
+ counter++;
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Periodic notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ // Wait for the specified interval
+ await sleep(interval);
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Started sending periodic notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ // Create a simple resource at a fixed URI
+ server.registerResource('greeting-resource', 'https://example.com/greetings/default', { mimeType: 'text/plain' }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'https://example.com/greetings/default',
+ text: 'Hello, world!'
+ }
+ ]
+ };
+ });
+ return server;
+};
+const app = (0, express_js_1.createMcpExpressApp)();
+app.post('/mcp', async (req, res) => {
+ const server = getServer();
+ try {
+ const transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: undefined
+ });
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ res.on('close', () => {
+ console.log('Request closed');
+ transport.close();
+ server.close();
+ });
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+app.get('/mcp', async (req, res) => {
+ console.log('Received GET MCP request');
+ res.writeHead(405).end(JSON.stringify({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Method not allowed.'
+ },
+ id: null
+ }));
+});
+app.delete('/mcp', async (req, res) => {
+ console.log('Received DELETE MCP request');
+ res.writeHead(405).end(JSON.stringify({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Method not allowed.'
+ },
+ id: null
+ }));
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Stateless Streamable HTTP Server listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleStatelessStreamableHttp.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js.map
new file mode 100644
index 0000000..e87774a
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStatelessStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleStatelessStreamableHttp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAgD;AAChD,sEAA+E;AAC/E,0CAA4B;AAE5B,wDAA8D;AAE9D,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,mDAAmD;IACnD,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,OAAO;KACnB,EACD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CACpC,CAAC;IAEF,2BAA2B;IAC3B,MAAM,CAAC,cAAc,CACjB,mBAAmB,EACnB;QACI,WAA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,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;IACrB,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0DAA0D,IAAI,EAAE,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts
new file mode 100644
index 0000000..a20be42
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=simpleStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts.map
new file mode 100644
index 0000000..e3cf042
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js
new file mode 100644
index 0000000..5e79893
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js
@@ -0,0 +1,750 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const z = __importStar(require("zod/v4"));
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const router_js_1 = require("../../server/auth/router.js");
+const bearerAuth_js_1 = require("../../server/auth/middleware/bearerAuth.js");
+const express_js_1 = require("../../server/express.js");
+const types_js_1 = require("../../types.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const in_memory_js_1 = require("../../experimental/tasks/stores/in-memory.js");
+const demoInMemoryOAuthProvider_js_1 = require("./demoInMemoryOAuthProvider.js");
+const auth_utils_js_1 = require("../../shared/auth-utils.js");
+// Check for OAuth flag
+const useOAuth = process.argv.includes('--oauth');
+const strictOAuth = process.argv.includes('--oauth-strict');
+// Create shared task store for demonstration
+const taskStore = new in_memory_js_1.InMemoryTaskStore();
+// Create an MCP server with implementation details
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'simple-streamable-http-server',
+ version: '1.0.0',
+ icons: [{ src: './mcp.svg', sizes: ['512x512'], mimeType: 'image/svg+xml' }],
+ websiteUrl: 'https://github.com/modelcontextprotocol/typescript-sdk'
+ }, {
+ capabilities: { logging: {}, tasks: { requests: { tools: { call: {} } } } },
+ taskStore, // Enable task support
+ taskMessageQueue: new in_memory_js_1.InMemoryTaskMessageQueue()
+ });
+ // Register a simple tool that returns a greeting
+ server.registerTool('greet', {
+ title: 'Greeting Tool', // Display name for UI
+ description: 'A simple greeting tool',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ }
+ }, async ({ name }) => {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Hello, ${name}!`
+ }
+ ]
+ };
+ });
+ // Register a tool that sends multiple greetings with notifications (with annotations)
+ server.registerTool('multi-greet', {
+ description: 'A tool that sends different greetings with delays between them',
+ inputSchema: {
+ name: z.string().describe('Name to greet')
+ },
+ annotations: {
+ title: 'Multiple Greeting Tool',
+ readOnlyHint: true,
+ openWorldHint: false
+ }
+ }, async ({ name }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ await server.sendLoggingMessage({
+ level: 'debug',
+ data: `Starting multi-greet for ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait 1 second before first greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending first greeting to ${name}`
+ }, extra.sessionId);
+ await sleep(1000); // Wait another second before second greeting
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Sending second greeting to ${name}`
+ }, extra.sessionId);
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Good morning, ${name}!`
+ }
+ ]
+ };
+ });
+ // Register a tool that demonstrates form elicitation (user input collection with a schema)
+ // This creates a closure that captures the server instance
+ server.registerTool('collect-user-info', {
+ description: 'A tool that collects user information through form elicitation',
+ inputSchema: {
+ infoType: z.enum(['contact', 'preferences', 'feedback']).describe('Type of information to collect')
+ }
+ }, async ({ infoType }, extra) => {
+ let message;
+ let requestedSchema;
+ switch (infoType) {
+ case 'contact':
+ message = 'Please provide your contact information';
+ requestedSchema = {
+ type: 'object',
+ properties: {
+ name: {
+ type: 'string',
+ title: 'Full Name',
+ description: 'Your full name'
+ },
+ email: {
+ type: 'string',
+ title: 'Email Address',
+ description: 'Your email address',
+ format: 'email'
+ },
+ phone: {
+ type: 'string',
+ title: 'Phone Number',
+ description: 'Your phone number (optional)'
+ }
+ },
+ required: ['name', 'email']
+ };
+ break;
+ case 'preferences':
+ message = 'Please set your preferences';
+ requestedSchema = {
+ type: 'object',
+ properties: {
+ theme: {
+ type: 'string',
+ title: 'Theme',
+ description: 'Choose your preferred theme',
+ enum: ['light', 'dark', 'auto'],
+ enumNames: ['Light', 'Dark', 'Auto']
+ },
+ notifications: {
+ type: 'boolean',
+ title: 'Enable Notifications',
+ description: 'Would you like to receive notifications?',
+ default: true
+ },
+ frequency: {
+ type: 'string',
+ title: 'Notification Frequency',
+ description: 'How often would you like notifications?',
+ enum: ['daily', 'weekly', 'monthly'],
+ enumNames: ['Daily', 'Weekly', 'Monthly']
+ }
+ },
+ required: ['theme']
+ };
+ break;
+ case 'feedback':
+ message = 'Please provide your feedback';
+ requestedSchema = {
+ type: 'object',
+ properties: {
+ rating: {
+ type: 'integer',
+ title: 'Rating',
+ description: 'Rate your experience (1-5)',
+ minimum: 1,
+ maximum: 5
+ },
+ comments: {
+ type: 'string',
+ title: 'Comments',
+ description: 'Additional comments (optional)',
+ maxLength: 500
+ },
+ recommend: {
+ type: 'boolean',
+ title: 'Would you recommend this?',
+ description: 'Would you recommend this to others?'
+ }
+ },
+ required: ['rating', 'recommend']
+ };
+ break;
+ default:
+ throw new Error(`Unknown info type: ${infoType}`);
+ }
+ try {
+ // Use sendRequest through the extra parameter to elicit input
+ const result = await extra.sendRequest({
+ method: 'elicitation/create',
+ params: {
+ mode: 'form',
+ message,
+ requestedSchema
+ }
+ }, types_js_1.ElicitResultSchema);
+ if (result.action === 'accept') {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Thank you! Collected ${infoType} information: ${JSON.stringify(result.content, null, 2)}`
+ }
+ ]
+ };
+ }
+ else if (result.action === 'decline') {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `No information was collected. User declined ${infoType} information request.`
+ }
+ ]
+ };
+ }
+ else {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Information collection was cancelled by the user.`
+ }
+ ]
+ };
+ }
+ }
+ catch (error) {
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Error collecting ${infoType} information: ${error}`
+ }
+ ]
+ };
+ }
+ });
+ // Register a tool that demonstrates bidirectional task support:
+ // Server creates a task, then elicits input from client using elicitInputStream
+ // Using the experimental tasks API - WARNING: may change without notice
+ server.experimental.tasks.registerToolTask('collect-user-info-task', {
+ title: 'Collect Info with Task',
+ description: 'Collects user info via elicitation with task support using elicitInputStream',
+ inputSchema: {
+ infoType: z.enum(['contact', 'preferences']).describe('Type of information to collect').default('contact')
+ }
+ }, {
+ async createTask({ infoType }, { taskStore: createTaskStore, taskRequestedTtl }) {
+ // Create the server-side task
+ const task = await createTaskStore.createTask({
+ ttl: taskRequestedTtl
+ });
+ // Perform async work that makes a nested elicitation request using elicitInputStream
+ (async () => {
+ try {
+ const message = infoType === 'contact' ? 'Please provide your contact information' : 'Please set your preferences';
+ // Define schemas with proper typing for PrimitiveSchemaDefinition
+ const contactSchema = {
+ type: 'object',
+ properties: {
+ name: { type: 'string', title: 'Full Name', description: 'Your full name' },
+ email: { type: 'string', title: 'Email', description: 'Your email address' }
+ },
+ required: ['name', 'email']
+ };
+ const preferencesSchema = {
+ type: 'object',
+ properties: {
+ theme: { type: 'string', title: 'Theme', enum: ['light', 'dark', 'auto'] },
+ notifications: { type: 'boolean', title: 'Enable Notifications', default: true }
+ },
+ required: ['theme']
+ };
+ const requestedSchema = infoType === 'contact' ? contactSchema : preferencesSchema;
+ // Use elicitInputStream to elicit input from client
+ // This demonstrates the streaming elicitation API
+ // Access via server.server to get the underlying Server instance
+ const stream = server.server.experimental.tasks.elicitInputStream({
+ mode: 'form',
+ message,
+ requestedSchema
+ });
+ let elicitResult;
+ for await (const msg of stream) {
+ if (msg.type === 'result') {
+ elicitResult = msg.result;
+ }
+ else if (msg.type === 'error') {
+ throw msg.error;
+ }
+ }
+ if (!elicitResult) {
+ throw new Error('No result received from elicitation');
+ }
+ let resultText;
+ if (elicitResult.action === 'accept') {
+ resultText = `Collected ${infoType} info: ${JSON.stringify(elicitResult.content, null, 2)}`;
+ }
+ else if (elicitResult.action === 'decline') {
+ resultText = `User declined to provide ${infoType} information`;
+ }
+ else {
+ resultText = 'User cancelled the request';
+ }
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [{ type: 'text', text: resultText }]
+ });
+ }
+ catch (error) {
+ console.error('Error in collect-user-info-task:', error);
+ await taskStore.storeTaskResult(task.taskId, 'failed', {
+ content: [{ type: 'text', text: `Error: ${error}` }],
+ isError: true
+ });
+ }
+ })();
+ return { task };
+ },
+ async getTask(_args, { taskId, taskStore: getTaskStore }) {
+ return await getTaskStore.getTask(taskId);
+ },
+ async getTaskResult(_args, { taskId, taskStore: getResultTaskStore }) {
+ const result = await getResultTaskStore.getTaskResult(taskId);
+ return result;
+ }
+ });
+ // Register a simple prompt with title
+ server.registerPrompt('greeting-template', {
+ title: 'Greeting Template', // Display name for UI
+ description: 'A simple greeting prompt template',
+ argsSchema: {
+ name: z.string().describe('Name to include in greeting')
+ }
+ }, async ({ name }) => {
+ return {
+ messages: [
+ {
+ role: 'user',
+ content: {
+ type: 'text',
+ text: `Please greet ${name} in a friendly manner.`
+ }
+ }
+ ]
+ };
+ });
+ // Register a tool specifically for testing resumability
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications for testing resumability',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(100),
+ count: z.number().describe('Number of notifications to send (0 for 100)').default(50)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ while (count === 0 || counter < count) {
+ counter++;
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Periodic notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ // Wait for the specified interval
+ await sleep(interval);
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Started sending periodic notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ // Create a simple resource at a fixed URI
+ server.registerResource('greeting-resource', 'https://example.com/greetings/default', {
+ title: 'Default Greeting', // Display name for UI
+ description: 'A simple greeting resource',
+ mimeType: 'text/plain'
+ }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'https://example.com/greetings/default',
+ text: 'Hello, world!'
+ }
+ ]
+ };
+ });
+ // Create additional resources for ResourceLink demonstration
+ server.registerResource('example-file-1', 'file:///example/file1.txt', {
+ title: 'Example File 1',
+ description: 'First example file for ResourceLink demonstration',
+ mimeType: 'text/plain'
+ }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'file:///example/file1.txt',
+ text: 'This is the content of file 1'
+ }
+ ]
+ };
+ });
+ server.registerResource('example-file-2', 'file:///example/file2.txt', {
+ title: 'Example File 2',
+ description: 'Second example file for ResourceLink demonstration',
+ mimeType: 'text/plain'
+ }, async () => {
+ return {
+ contents: [
+ {
+ uri: 'file:///example/file2.txt',
+ text: 'This is the content of file 2'
+ }
+ ]
+ };
+ });
+ // Register a tool that returns ResourceLinks
+ server.registerTool('list-files', {
+ title: 'List Files with ResourceLinks',
+ description: 'Returns a list of files as ResourceLinks without embedding their content',
+ inputSchema: {
+ includeDescriptions: z.boolean().optional().describe('Whether to include descriptions in the resource links')
+ }
+ }, async ({ includeDescriptions = true }) => {
+ const resourceLinks = [
+ {
+ type: 'resource_link',
+ uri: 'https://example.com/greetings/default',
+ name: 'Default Greeting',
+ mimeType: 'text/plain',
+ ...(includeDescriptions && { description: 'A simple greeting resource' })
+ },
+ {
+ type: 'resource_link',
+ uri: 'file:///example/file1.txt',
+ name: 'Example File 1',
+ mimeType: 'text/plain',
+ ...(includeDescriptions && { description: 'First example file for ResourceLink demonstration' })
+ },
+ {
+ type: 'resource_link',
+ uri: 'file:///example/file2.txt',
+ name: 'Example File 2',
+ mimeType: 'text/plain',
+ ...(includeDescriptions && { description: 'Second example file for ResourceLink demonstration' })
+ }
+ ];
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Here are the available files as resource links:'
+ },
+ ...resourceLinks,
+ {
+ type: 'text',
+ text: '\nYou can read any of these resources using their URI.'
+ }
+ ]
+ };
+ });
+ // Register a long-running tool that demonstrates task execution
+ // Using the experimental tasks API - WARNING: may change without notice
+ server.experimental.tasks.registerToolTask('delay', {
+ title: 'Delay',
+ description: 'A simple tool that delays for a specified duration, useful for testing task execution',
+ inputSchema: {
+ duration: z.number().describe('Duration in milliseconds').default(5000)
+ }
+ }, {
+ async createTask({ duration }, { taskStore, taskRequestedTtl }) {
+ // Create the task
+ const task = await taskStore.createTask({
+ ttl: taskRequestedTtl
+ });
+ // Simulate out-of-band work
+ (async () => {
+ await new Promise(resolve => setTimeout(resolve, duration));
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [
+ {
+ type: 'text',
+ text: `Completed ${duration}ms delay`
+ }
+ ]
+ });
+ })();
+ // Return CreateTaskResult with the created task
+ return {
+ task
+ };
+ },
+ async getTask(_args, { taskId, taskStore }) {
+ return await taskStore.getTask(taskId);
+ },
+ async getTaskResult(_args, { taskId, taskStore }) {
+ const result = await taskStore.getTaskResult(taskId);
+ return result;
+ }
+ });
+ return server;
+};
+const MCP_PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 3000;
+const AUTH_PORT = process.env.MCP_AUTH_PORT ? parseInt(process.env.MCP_AUTH_PORT, 10) : 3001;
+const app = (0, express_js_1.createMcpExpressApp)();
+// Set up OAuth if enabled
+let authMiddleware = null;
+if (useOAuth) {
+ // Create auth middleware for MCP endpoints
+ const mcpServerUrl = new URL(`http://localhost:${MCP_PORT}/mcp`);
+ const authServerUrl = new URL(`http://localhost:${AUTH_PORT}`);
+ const oauthMetadata = (0, demoInMemoryOAuthProvider_js_1.setupAuthServer)({ authServerUrl, mcpServerUrl, strictResource: strictOAuth });
+ const tokenVerifier = {
+ verifyAccessToken: async (token) => {
+ const endpoint = oauthMetadata.introspection_endpoint;
+ if (!endpoint) {
+ throw new Error('No token verification endpoint available in metadata');
+ }
+ const response = await fetch(endpoint, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ body: new URLSearchParams({
+ token: token
+ }).toString()
+ });
+ if (!response.ok) {
+ const text = await response.text().catch(() => null);
+ throw new Error(`Invalid or expired token: ${text}`);
+ }
+ const data = await response.json();
+ if (strictOAuth) {
+ if (!data.aud) {
+ throw new Error(`Resource Indicator (RFC8707) missing`);
+ }
+ if (!(0, auth_utils_js_1.checkResourceAllowed)({ requestedResource: data.aud, configuredResource: mcpServerUrl })) {
+ throw new Error(`Expected resource indicator ${mcpServerUrl}, got: ${data.aud}`);
+ }
+ }
+ // Convert the response to AuthInfo format
+ return {
+ token,
+ clientId: data.client_id,
+ scopes: data.scope ? data.scope.split(' ') : [],
+ expiresAt: data.exp
+ };
+ }
+ };
+ // Add metadata routes to the main MCP server
+ app.use((0, router_js_1.mcpAuthMetadataRouter)({
+ oauthMetadata,
+ resourceServerUrl: mcpServerUrl,
+ scopesSupported: ['mcp:tools'],
+ resourceName: 'MCP Demo Server'
+ }));
+ authMiddleware = (0, bearerAuth_js_1.requireBearerAuth)({
+ verifier: tokenVerifier,
+ requiredScopes: [],
+ resourceMetadataUrl: (0, router_js_1.getOAuthProtectedResourceMetadataUrl)(mcpServerUrl)
+ });
+}
+// Map to store transports by session ID
+const transports = {};
+// MCP POST endpoint with optional auth
+const mcpPostHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (sessionId) {
+ console.log(`Received MCP request for session: ${sessionId}`);
+ }
+ else {
+ console.log('Request body:', req.body);
+ }
+ if (useOAuth && req.auth) {
+ console.log('Authenticated user:', req.auth);
+ }
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request
+ const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore, // Enable resumability
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ }
+ };
+ // Connect the transport to the MCP server BEFORE handling the request
+ // so responses can flow back through the same transport
+ const server = getServer();
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport - no need to reconnect
+ // The existing transport is already connected to the server
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+};
+// Set up routes with conditional auth middleware
+if (useOAuth && authMiddleware) {
+ app.post('/mcp', authMiddleware, mcpPostHandler);
+}
+else {
+ app.post('/mcp', mcpPostHandler);
+}
+// Handle GET requests for SSE streams (using built-in support from StreamableHTTP)
+const mcpGetHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ if (useOAuth && req.auth) {
+ console.log('Authenticated SSE connection from user:', req.auth);
+ }
+ // Check for Last-Event-ID header for resumability
+ const lastEventId = req.headers['last-event-id'];
+ if (lastEventId) {
+ console.log(`Client reconnecting with Last-Event-ID: ${lastEventId}`);
+ }
+ else {
+ console.log(`Establishing new SSE stream for session ${sessionId}`);
+ }
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+};
+// Set up GET route with conditional auth middleware
+if (useOAuth && authMiddleware) {
+ app.get('/mcp', authMiddleware, mcpGetHandler);
+}
+else {
+ app.get('/mcp', mcpGetHandler);
+}
+// Handle DELETE requests for session termination (according to MCP spec)
+const mcpDeleteHandler = async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Received session termination request for session ${sessionId}`);
+ try {
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+ }
+ catch (error) {
+ console.error('Error handling session termination:', error);
+ if (!res.headersSent) {
+ res.status(500).send('Error processing session termination');
+ }
+ }
+};
+// Set up DELETE route with conditional auth middleware
+if (useOAuth && authMiddleware) {
+ app.delete('/mcp', authMiddleware, mcpDeleteHandler);
+}
+else {
+ app.delete('/mcp', mcpDeleteHandler);
+}
+app.listen(MCP_PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`MCP Streamable HTTP Server listening on port ${MCP_PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleStreamableHttp.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map
new file mode 100644
index 0000000..64486a8
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleStreamableHttp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAyC;AACzC,0CAA4B;AAC5B,gDAAgD;AAChD,sEAA+E;AAC/E,2DAA0G;AAC1G,8EAA+E;AAC/E,wDAA8D;AAC9D,6CASwB;AACxB,2EAAqE;AACrE,+EAA2G;AAC3G,iFAAiE;AAEjE,8DAAkE;AAElE,uBAAuB;AACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAClD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC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S,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts
new file mode 100644
index 0000000..661c9f0
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts
@@ -0,0 +1,12 @@
+/**
+ * Simple interactive task server demonstrating elicitation and sampling.
+ *
+ * This server demonstrates the task message queue pattern from the MCP Tasks spec:
+ * - confirm_delete: Uses elicitation to ask the user for confirmation
+ * - write_haiku: Uses sampling to request an LLM to generate content
+ *
+ * Both tools use the "call-now, fetch-later" pattern where the initial call
+ * creates a task, and the result is fetched via tasks/result endpoint.
+ */
+export {};
+//# sourceMappingURL=simpleTaskInteractive.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts.map
new file mode 100644
index 0000000..3e48b9e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleTaskInteractive.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleTaskInteractive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js
new file mode 100644
index 0000000..cd95140
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js
@@ -0,0 +1,600 @@
+"use strict";
+/**
+ * Simple interactive task server demonstrating elicitation and sampling.
+ *
+ * This server demonstrates the task message queue pattern from the MCP Tasks spec:
+ * - confirm_delete: Uses elicitation to ask the user for confirmation
+ * - write_haiku: Uses sampling to request an LLM to generate content
+ *
+ * Both tools use the "call-now, fetch-later" pattern where the initial call
+ * creates a task, and the result is fetched via tasks/result endpoint.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const index_js_1 = require("../../server/index.js");
+const express_js_1 = require("../../server/express.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const types_js_1 = require("../../types.js");
+const interfaces_js_1 = require("../../experimental/tasks/interfaces.js");
+const in_memory_js_1 = require("../../experimental/tasks/stores/in-memory.js");
+// ============================================================================
+// Resolver - Promise-like for passing results between async operations
+// ============================================================================
+class Resolver {
+ constructor() {
+ this._done = false;
+ this._promise = new Promise((resolve, reject) => {
+ this._resolve = resolve;
+ this._reject = reject;
+ });
+ }
+ setResult(value) {
+ if (this._done)
+ return;
+ this._done = true;
+ this._resolve(value);
+ }
+ setException(error) {
+ if (this._done)
+ return;
+ this._done = true;
+ this._reject(error);
+ }
+ wait() {
+ return this._promise;
+ }
+ done() {
+ return this._done;
+ }
+}
+class TaskMessageQueueWithResolvers {
+ constructor() {
+ this.queues = new Map();
+ this.waitResolvers = new Map();
+ }
+ getQueue(taskId) {
+ let queue = this.queues.get(taskId);
+ if (!queue) {
+ queue = [];
+ this.queues.set(taskId, queue);
+ }
+ return queue;
+ }
+ async enqueue(taskId, message, _sessionId, maxSize) {
+ const queue = this.getQueue(taskId);
+ if (maxSize !== undefined && queue.length >= maxSize) {
+ throw new Error(`Task message queue overflow: queue size (${queue.length}) exceeds maximum (${maxSize})`);
+ }
+ queue.push(message);
+ // Notify any waiters
+ this.notifyWaiters(taskId);
+ }
+ async enqueueWithResolver(taskId, message, resolver, originalRequestId) {
+ const queue = this.getQueue(taskId);
+ const queuedMessage = {
+ type: 'request',
+ message,
+ timestamp: Date.now(),
+ resolver,
+ originalRequestId
+ };
+ queue.push(queuedMessage);
+ this.notifyWaiters(taskId);
+ }
+ async dequeue(taskId, _sessionId) {
+ const queue = this.getQueue(taskId);
+ return queue.shift();
+ }
+ async dequeueAll(taskId, _sessionId) {
+ const queue = this.queues.get(taskId) ?? [];
+ this.queues.delete(taskId);
+ return queue;
+ }
+ async waitForMessage(taskId) {
+ // Check if there are already messages
+ const queue = this.getQueue(taskId);
+ if (queue.length > 0)
+ return;
+ // Wait for a message to be added
+ return new Promise(resolve => {
+ let waiters = this.waitResolvers.get(taskId);
+ if (!waiters) {
+ waiters = [];
+ this.waitResolvers.set(taskId, waiters);
+ }
+ waiters.push(resolve);
+ });
+ }
+ notifyWaiters(taskId) {
+ const waiters = this.waitResolvers.get(taskId);
+ if (waiters) {
+ this.waitResolvers.delete(taskId);
+ for (const resolve of waiters) {
+ resolve();
+ }
+ }
+ }
+ cleanup() {
+ this.queues.clear();
+ this.waitResolvers.clear();
+ }
+}
+// ============================================================================
+// Extended task store with wait functionality
+// ============================================================================
+class TaskStoreWithNotifications extends in_memory_js_1.InMemoryTaskStore {
+ constructor() {
+ super(...arguments);
+ this.updateResolvers = new Map();
+ }
+ async updateTaskStatus(taskId, status, statusMessage, sessionId) {
+ await super.updateTaskStatus(taskId, status, statusMessage, sessionId);
+ this.notifyUpdate(taskId);
+ }
+ async storeTaskResult(taskId, status, result, sessionId) {
+ await super.storeTaskResult(taskId, status, result, sessionId);
+ this.notifyUpdate(taskId);
+ }
+ async waitForUpdate(taskId) {
+ return new Promise(resolve => {
+ let waiters = this.updateResolvers.get(taskId);
+ if (!waiters) {
+ waiters = [];
+ this.updateResolvers.set(taskId, waiters);
+ }
+ waiters.push(resolve);
+ });
+ }
+ notifyUpdate(taskId) {
+ const waiters = this.updateResolvers.get(taskId);
+ if (waiters) {
+ this.updateResolvers.delete(taskId);
+ for (const resolve of waiters) {
+ resolve();
+ }
+ }
+ }
+}
+// ============================================================================
+// Task Result Handler - delivers queued messages and routes responses
+// ============================================================================
+class TaskResultHandler {
+ constructor(store, queue) {
+ this.store = store;
+ this.queue = queue;
+ this.pendingRequests = new Map();
+ }
+ async handle(taskId, server, _sessionId) {
+ while (true) {
+ // Get fresh task state
+ const task = await this.store.getTask(taskId);
+ if (!task) {
+ throw new Error(`Task not found: ${taskId}`);
+ }
+ // Dequeue and send all pending messages
+ await this.deliverQueuedMessages(taskId, server, _sessionId);
+ // If task is terminal, return result
+ if ((0, interfaces_js_1.isTerminal)(task.status)) {
+ const result = await this.store.getTaskResult(taskId);
+ // Add related-task metadata per spec
+ return {
+ ...result,
+ _meta: {
+ ...(result._meta || {}),
+ [types_js_1.RELATED_TASK_META_KEY]: { taskId }
+ }
+ };
+ }
+ // Wait for task update or new message
+ await this.waitForUpdate(taskId);
+ }
+ }
+ async deliverQueuedMessages(taskId, server, _sessionId) {
+ while (true) {
+ const message = await this.queue.dequeue(taskId);
+ if (!message)
+ break;
+ console.log(`[Server] Delivering queued ${message.type} message for task ${taskId}`);
+ if (message.type === 'request') {
+ const reqMessage = message;
+ // Send the request via the server
+ // Store the resolver so we can route the response back
+ if (reqMessage.resolver && reqMessage.originalRequestId) {
+ this.pendingRequests.set(reqMessage.originalRequestId, reqMessage.resolver);
+ }
+ // Send the message - for elicitation/sampling, we use the server's methods
+ // But since we're in tasks/result context, we need to send via transport
+ // This is simplified - in production you'd use proper message routing
+ try {
+ const request = reqMessage.message;
+ let response;
+ if (request.method === 'elicitation/create') {
+ // Send elicitation request to client
+ const params = request.params;
+ response = await server.elicitInput(params);
+ }
+ else if (request.method === 'sampling/createMessage') {
+ // Send sampling request to client
+ const params = request.params;
+ response = await server.createMessage(params);
+ }
+ else {
+ throw new Error(`Unknown request method: ${request.method}`);
+ }
+ // Route response back to resolver
+ if (reqMessage.resolver) {
+ reqMessage.resolver.setResult(response);
+ }
+ }
+ catch (error) {
+ if (reqMessage.resolver) {
+ reqMessage.resolver.setException(error instanceof Error ? error : new Error(String(error)));
+ }
+ }
+ }
+ // For notifications, we'd send them too but this example focuses on requests
+ }
+ }
+ async waitForUpdate(taskId) {
+ // Race between store update and queue message
+ await Promise.race([this.store.waitForUpdate(taskId), this.queue.waitForMessage(taskId)]);
+ }
+ routeResponse(requestId, response) {
+ const resolver = this.pendingRequests.get(requestId);
+ if (resolver && !resolver.done()) {
+ this.pendingRequests.delete(requestId);
+ resolver.setResult(response);
+ return true;
+ }
+ return false;
+ }
+ routeError(requestId, error) {
+ const resolver = this.pendingRequests.get(requestId);
+ if (resolver && !resolver.done()) {
+ this.pendingRequests.delete(requestId);
+ resolver.setException(error);
+ return true;
+ }
+ return false;
+ }
+}
+// ============================================================================
+// Task Session - wraps server to enqueue requests during task execution
+// ============================================================================
+class TaskSession {
+ constructor(server, taskId, store, queue) {
+ this.server = server;
+ this.taskId = taskId;
+ this.store = store;
+ this.queue = queue;
+ this.requestCounter = 0;
+ }
+ nextRequestId() {
+ return `task-${this.taskId}-${++this.requestCounter}`;
+ }
+ async elicit(message, requestedSchema) {
+ // Update task status to input_required
+ await this.store.updateTaskStatus(this.taskId, 'input_required');
+ const requestId = this.nextRequestId();
+ // Build the elicitation request with related-task metadata
+ const params = {
+ message,
+ requestedSchema,
+ mode: 'form',
+ _meta: {
+ [types_js_1.RELATED_TASK_META_KEY]: { taskId: this.taskId }
+ }
+ };
+ const jsonrpcRequest = {
+ jsonrpc: '2.0',
+ id: requestId,
+ method: 'elicitation/create',
+ params
+ };
+ // Create resolver to wait for response
+ const resolver = new Resolver();
+ // Enqueue the request
+ await this.queue.enqueueWithResolver(this.taskId, jsonrpcRequest, resolver, requestId);
+ try {
+ // Wait for response
+ const response = await resolver.wait();
+ // Update status back to working
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ return response;
+ }
+ catch (error) {
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ throw error;
+ }
+ }
+ async createMessage(messages, maxTokens) {
+ // Update task status to input_required
+ await this.store.updateTaskStatus(this.taskId, 'input_required');
+ const requestId = this.nextRequestId();
+ // Build the sampling request with related-task metadata
+ const params = {
+ messages,
+ maxTokens,
+ _meta: {
+ [types_js_1.RELATED_TASK_META_KEY]: { taskId: this.taskId }
+ }
+ };
+ const jsonrpcRequest = {
+ jsonrpc: '2.0',
+ id: requestId,
+ method: 'sampling/createMessage',
+ params
+ };
+ // Create resolver to wait for response
+ const resolver = new Resolver();
+ // Enqueue the request
+ await this.queue.enqueueWithResolver(this.taskId, jsonrpcRequest, resolver, requestId);
+ try {
+ // Wait for response
+ const response = await resolver.wait();
+ // Update status back to working
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ return response;
+ }
+ catch (error) {
+ await this.store.updateTaskStatus(this.taskId, 'working');
+ throw error;
+ }
+ }
+}
+// ============================================================================
+// Server Setup
+// ============================================================================
+const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 8000;
+// Create shared stores
+const taskStore = new TaskStoreWithNotifications();
+const messageQueue = new TaskMessageQueueWithResolvers();
+const taskResultHandler = new TaskResultHandler(taskStore, messageQueue);
+// Track active task executions
+const activeTaskExecutions = new Map();
+// Create the server
+const createServer = () => {
+ const server = new index_js_1.Server({ name: 'simple-task-interactive', version: '1.0.0' }, {
+ capabilities: {
+ tools: {},
+ tasks: {
+ requests: {
+ tools: { call: {} }
+ }
+ }
+ }
+ });
+ // Register tools
+ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
+ return {
+ tools: [
+ {
+ name: 'confirm_delete',
+ description: 'Asks for confirmation before deleting (demonstrates elicitation)',
+ inputSchema: {
+ type: 'object',
+ properties: {
+ filename: { type: 'string' }
+ }
+ },
+ execution: { taskSupport: 'required' }
+ },
+ {
+ name: 'write_haiku',
+ description: 'Asks LLM to write a haiku (demonstrates sampling)',
+ inputSchema: {
+ type: 'object',
+ properties: {
+ topic: { type: 'string' }
+ }
+ },
+ execution: { taskSupport: 'required' }
+ }
+ ]
+ };
+ });
+ // Handle tool calls
+ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request, extra) => {
+ const { name, arguments: args } = request.params;
+ const taskParams = (request.params._meta?.task || request.params.task);
+ // Validate task mode - these tools require tasks
+ if (!taskParams) {
+ throw new Error(`Tool ${name} requires task mode`);
+ }
+ // Create task
+ const taskOptions = {
+ ttl: taskParams.ttl,
+ pollInterval: taskParams.pollInterval ?? 1000
+ };
+ const task = await taskStore.createTask(taskOptions, extra.requestId, request, extra.sessionId);
+ console.log(`\n[Server] ${name} called, task created: ${task.taskId}`);
+ // Start background task execution
+ const taskExecution = (async () => {
+ try {
+ const taskSession = new TaskSession(server, task.taskId, taskStore, messageQueue);
+ if (name === 'confirm_delete') {
+ const filename = args?.filename ?? 'unknown.txt';
+ console.log(`[Server] confirm_delete: asking about '${filename}'`);
+ console.log('[Server] Sending elicitation request to client...');
+ const result = await taskSession.elicit(`Are you sure you want to delete '${filename}'?`, {
+ type: 'object',
+ properties: {
+ confirm: { type: 'boolean' }
+ },
+ required: ['confirm']
+ });
+ console.log(`[Server] Received elicitation response: action=${result.action}, content=${JSON.stringify(result.content)}`);
+ let text;
+ if (result.action === 'accept' && result.content) {
+ const confirmed = result.content.confirm;
+ text = confirmed ? `Deleted '${filename}'` : 'Deletion cancelled';
+ }
+ else {
+ text = 'Deletion cancelled';
+ }
+ console.log(`[Server] Completing task with result: ${text}`);
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [{ type: 'text', text }]
+ });
+ }
+ else if (name === 'write_haiku') {
+ const topic = args?.topic ?? 'nature';
+ console.log(`[Server] write_haiku: topic '${topic}'`);
+ console.log('[Server] Sending sampling request to client...');
+ const result = await taskSession.createMessage([
+ {
+ role: 'user',
+ content: { type: 'text', text: `Write a haiku about ${topic}` }
+ }
+ ], 50);
+ let haiku = 'No response';
+ if (result.content && 'text' in result.content) {
+ haiku = result.content.text;
+ }
+ console.log(`[Server] Received sampling response: ${haiku.substring(0, 50)}...`);
+ console.log('[Server] Completing task with haiku');
+ await taskStore.storeTaskResult(task.taskId, 'completed', {
+ content: [{ type: 'text', text: `Haiku:\n${haiku}` }]
+ });
+ }
+ }
+ catch (error) {
+ console.error(`[Server] Task ${task.taskId} failed:`, error);
+ await taskStore.storeTaskResult(task.taskId, 'failed', {
+ content: [{ type: 'text', text: `Error: ${error}` }],
+ isError: true
+ });
+ }
+ finally {
+ activeTaskExecutions.delete(task.taskId);
+ }
+ })();
+ activeTaskExecutions.set(task.taskId, {
+ promise: taskExecution,
+ server,
+ sessionId: extra.sessionId ?? ''
+ });
+ return { task };
+ });
+ // Handle tasks/get
+ server.setRequestHandler(types_js_1.GetTaskRequestSchema, async (request) => {
+ const { taskId } = request.params;
+ const task = await taskStore.getTask(taskId);
+ if (!task) {
+ throw new Error(`Task ${taskId} not found`);
+ }
+ return task;
+ });
+ // Handle tasks/result
+ server.setRequestHandler(types_js_1.GetTaskPayloadRequestSchema, async (request, extra) => {
+ const { taskId } = request.params;
+ console.log(`[Server] tasks/result called for task ${taskId}`);
+ return taskResultHandler.handle(taskId, server, extra.sessionId ?? '');
+ });
+ return server;
+};
+// ============================================================================
+// Express App Setup
+// ============================================================================
+const app = (0, express_js_1.createMcpExpressApp)();
+// Map to store transports by session ID
+const transports = {};
+// Helper to check if request is initialize
+const isInitializeRequest = (body) => {
+ return typeof body === 'object' && body !== null && 'method' in body && body.method === 'initialize';
+};
+// MCP POST endpoint
+app.post('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ try {
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && isInitializeRequest(req.body)) {
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ onsessioninitialized: sid => {
+ console.log(`Session initialized: ${sid}`);
+ transports[sid] = transport;
+ }
+ });
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}`);
+ delete transports[sid];
+ }
+ };
+ const server = createServer();
+ await server.connect(transport);
+ await transport.handleRequest(req, res, req.body);
+ return;
+ }
+ else {
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: { code: -32000, message: 'Bad Request: No valid session ID' },
+ id: null
+ });
+ return;
+ }
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: { code: -32603, message: 'Internal server error' },
+ id: null
+ });
+ }
+ }
+});
+// Handle GET requests for SSE streams
+app.get('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+});
+// Handle DELETE requests for session termination
+app.delete('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Session termination request: ${sessionId}`);
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+});
+// Start server
+app.listen(PORT, () => {
+ console.log(`Starting server on http://localhost:${PORT}/mcp`);
+ console.log('\nAvailable tools:');
+ console.log(' - confirm_delete: Demonstrates elicitation (asks user y/n)');
+ console.log(' - write_haiku: Demonstrates sampling (requests LLM completion)');
+});
+// Handle shutdown
+process.on('SIGINT', async () => {
+ console.log('\nShutting down server...');
+ for (const sessionId of Object.keys(transports)) {
+ try {
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing session ${sessionId}:`, error);
+ }
+ }
+ taskStore.cleanup();
+ messageQueue.cleanup();
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=simpleTaskInteractive.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map
new file mode 100644
index 0000000..faabd3f
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"simpleTaskInteractive.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleTaskInteractive.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAGH,6CAAyC;AACzC,oDAA+C;AAC/C,wDAA8D;AAC9D,sEAA+E;AAC/E,6CAsBwB;AACxB,0EAAuI;AACvI,+EAAiF;AAEjF,+EAA+E;AAC/E,uEAAuE;AACvE,+EAA+E;AAE/E,MAAM,QAAQ;IAMV;QAFQ,UAAK,GAAG,KAAK,CAAC;QAGlB,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC/C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAC1B,CAAC,CAAC,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AyB,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAChE,CAAC;IACL,CAAC;IACD,SAAS,CAAC,OAAO,EAAE,CAAC;IACpB,YAAY,CAAC,OAAO,EAAE,CAAC;IACvB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts
new file mode 100644
index 0000000..c536d0c
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=sseAndStreamableHttpCompatibleServer.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts.map
new file mode 100644
index 0000000..fb982c8
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sseAndStreamableHttpCompatibleServer.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/sseAndStreamableHttpCompatibleServer.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js
new file mode 100644
index 0000000..6e2c1b4
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js
@@ -0,0 +1,256 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const sse_js_1 = require("../../server/sse.js");
+const z = __importStar(require("zod/v4"));
+const types_js_1 = require("../../types.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const express_js_1 = require("../../server/express.js");
+/**
+ * This example server demonstrates backwards compatibility with both:
+ * 1. The deprecated HTTP+SSE transport (protocol version 2024-11-05)
+ * 2. The Streamable HTTP transport (protocol version 2025-11-25)
+ *
+ * It maintains a single MCP server instance but exposes two transport options:
+ * - /mcp: The new Streamable HTTP endpoint (supports GET/POST/DELETE)
+ * - /sse: The deprecated SSE endpoint for older clients (GET to establish stream)
+ * - /messages: The deprecated POST endpoint for older clients (POST to send messages)
+ */
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'backwards-compatible-server',
+ version: '1.0.0'
+ }, { capabilities: { logging: {} } });
+ // Register a simple tool that sends notifications over time
+ server.registerTool('start-notification-stream', {
+ description: 'Starts sending periodic notifications for testing resumability',
+ inputSchema: {
+ interval: z.number().describe('Interval in milliseconds between notifications').default(100),
+ count: z.number().describe('Number of notifications to send (0 for 100)').default(50)
+ }
+ }, async ({ interval, count }, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ let counter = 0;
+ while (count === 0 || counter < count) {
+ counter++;
+ try {
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: `Periodic notification #${counter} at ${new Date().toISOString()}`
+ }, extra.sessionId);
+ }
+ catch (error) {
+ console.error('Error sending notification:', error);
+ }
+ // Wait for the specified interval
+ await sleep(interval);
+ }
+ return {
+ content: [
+ {
+ type: 'text',
+ text: `Started sending periodic notifications every ${interval}ms`
+ }
+ ]
+ };
+ });
+ return server;
+};
+// Create Express application
+const app = (0, express_js_1.createMcpExpressApp)();
+// Store transports by session ID
+const transports = {};
+//=============================================================================
+// STREAMABLE HTTP TRANSPORT (PROTOCOL VERSION 2025-11-25)
+//=============================================================================
+// Handle all MCP Streamable HTTP requests (GET, POST, DELETE) on a single endpoint
+app.all('/mcp', async (req, res) => {
+ console.log(`Received ${req.method} request to /mcp`);
+ try {
+ // Check for existing session ID
+ const sessionId = req.headers['mcp-session-id'];
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Check if the transport is of the correct type
+ const existingTransport = transports[sessionId];
+ if (existingTransport instanceof streamableHttp_js_1.StreamableHTTPServerTransport) {
+ // Reuse existing transport
+ transport = existingTransport;
+ }
+ else {
+ // Transport exists but is not a StreamableHTTPServerTransport (could be SSEServerTransport)
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: Session exists but uses a different transport protocol'
+ },
+ id: null
+ });
+ return;
+ }
+ }
+ else if (!sessionId && req.method === 'POST' && (0, types_js_1.isInitializeRequest)(req.body)) {
+ const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore, // Enable resumability
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ console.log(`StreamableHTTP session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Set up onclose handler to clean up transport when closed
+ transport.onclose = () => {
+ const sid = transport.sessionId;
+ if (sid && transports[sid]) {
+ console.log(`Transport closed for session ${sid}, removing from transports map`);
+ delete transports[sid];
+ }
+ };
+ // Connect the transport to the MCP server
+ const server = getServer();
+ await server.connect(transport);
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with the transport
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+//=============================================================================
+// DEPRECATED HTTP+SSE TRANSPORT (PROTOCOL VERSION 2024-11-05)
+//=============================================================================
+app.get('/sse', async (req, res) => {
+ console.log('Received GET request to /sse (deprecated SSE transport)');
+ const transport = new sse_js_1.SSEServerTransport('/messages', res);
+ transports[transport.sessionId] = transport;
+ res.on('close', () => {
+ delete transports[transport.sessionId];
+ });
+ const server = getServer();
+ await server.connect(transport);
+});
+app.post('/messages', async (req, res) => {
+ const sessionId = req.query.sessionId;
+ let transport;
+ const existingTransport = transports[sessionId];
+ if (existingTransport instanceof sse_js_1.SSEServerTransport) {
+ // Reuse existing transport
+ transport = existingTransport;
+ }
+ else {
+ // Transport exists but is not a SSEServerTransport (could be StreamableHTTPServerTransport)
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: Session exists but uses a different transport protocol'
+ },
+ id: null
+ });
+ return;
+ }
+ if (transport) {
+ await transport.handlePostMessage(req, res, req.body);
+ }
+ else {
+ res.status(400).send('No transport found for sessionId');
+ }
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Backwards compatible MCP server listening on port ${PORT}`);
+ console.log(`
+==============================================
+SUPPORTED TRANSPORT OPTIONS:
+
+1. Streamable Http(Protocol version: 2025-11-25)
+ Endpoint: /mcp
+ Methods: GET, POST, DELETE
+ Usage:
+ - Initialize with POST to /mcp
+ - Establish SSE stream with GET to /mcp
+ - Send requests with POST to /mcp
+ - Terminate session with DELETE to /mcp
+
+2. Http + SSE (Protocol version: 2024-11-05)
+ Endpoints: /sse (GET) and /messages (POST)
+ Usage:
+ - Establish SSE stream with GET to /sse
+ - Send requests with POST to /messages?sessionId=
+==============================================
+`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ // Close all active transports to properly clean up resources
+ for (const sessionId in transports) {
+ try {
+ console.log(`Closing transport for session ${sessionId}`);
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ catch (error) {
+ console.error(`Error closing transport for session ${sessionId}:`, error);
+ }
+ }
+ console.log('Server shutdown complete');
+ process.exit(0);
+});
+//# sourceMappingURL=sseAndStreamableHttpCompatibleServer.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map
new file mode 100644
index 0000000..3f6331a
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sseAndStreamableHttpCompatibleServer.js","sourceRoot":"","sources":["../../../../src/examples/server/sseAndStreamableHttpCompatibleServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAyC;AACzC,gDAAgD;AAChD,sEAA+E;AAC/E,gDAAyD;AACzD,0CAA4B;AAC5B,6CAAqE;AACrE,2EAAqE;AACrE,wDAA8D;AAE9D;;;;;;;;;GASG;AAEH,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,OAAO;KACnB,EACD,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CACpC,CAAC;IAEF,4DAA4D;IAC5D,MAAM,CAAC,YAAY,CACf,2BAA2B,EAC3B;QACI,WAAW,EAAE,gEAAgE;QAC7E,WAAW,EAAE;YACT,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YAC5F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SACxF;KACJ,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAA2B,EAAE;QAC1D,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAC9E,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,OAAO,KAAK,K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AC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,qDAAqD,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;CAmBf,CAAC,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAEvC,6DAA6D;IAC7D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,uCAAuC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts
new file mode 100644
index 0000000..63e4554
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=ssePollingExample.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts.map
new file mode 100644
index 0000000..9382731
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ssePollingExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/ssePollingExample.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js
new file mode 100644
index 0000000..ea5c9ed
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js
@@ -0,0 +1,107 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const express_js_1 = require("../../server/express.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const inMemoryEventStore_js_1 = require("../shared/inMemoryEventStore.js");
+const cors_1 = __importDefault(require("cors"));
+// Factory to create a new MCP server per session.
+// Each session needs its own server+transport pair to avoid cross-session contamination.
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'sse-polling-example',
+ version: '1.0.0'
+ }, {
+ capabilities: { logging: {} }
+ });
+ // Register a long-running tool that demonstrates server-initiated disconnect
+ server.tool('long-task', 'A long-running task that sends progress updates. Server will disconnect mid-task to demonstrate polling.', {}, async (_args, extra) => {
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
+ console.log(`[${extra.sessionId}] Starting long-task...`);
+ // Send first progress notification
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 25% - Starting work...'
+ }, extra.sessionId);
+ await sleep(1000);
+ // Send second progress notification
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 50% - Halfway there...'
+ }, extra.sessionId);
+ await sleep(1000);
+ // Server decides to disconnect the client to free resources
+ // Client will reconnect via GET with Last-Event-ID after the transport's retryInterval
+ // Use extra.closeSSEStream callback - available when eventStore is configured
+ if (extra.closeSSEStream) {
+ console.log(`[${extra.sessionId}] Closing SSE stream to trigger client polling...`);
+ extra.closeSSEStream();
+ }
+ // Continue processing while client is disconnected
+ // Events are stored in eventStore and will be replayed on reconnect
+ await sleep(500);
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 75% - Almost done (sent while client disconnected)...'
+ }, extra.sessionId);
+ await sleep(500);
+ await server.sendLoggingMessage({
+ level: 'info',
+ data: 'Progress: 100% - Complete!'
+ }, extra.sessionId);
+ console.log(`[${extra.sessionId}] Task complete`);
+ return {
+ content: [
+ {
+ type: 'text',
+ text: 'Long task completed successfully!'
+ }
+ ]
+ };
+ });
+ return server;
+};
+// Set up Express app
+const app = (0, express_js_1.createMcpExpressApp)();
+app.use((0, cors_1.default)());
+// Create event store for resumability
+const eventStore = new inMemoryEventStore_js_1.InMemoryEventStore();
+// Track transports by session ID for session reuse
+const transports = new Map();
+// Handle all MCP requests
+app.all('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ // Reuse existing transport or create new one
+ let transport = sessionId ? transports.get(sessionId) : undefined;
+ if (!transport) {
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ eventStore,
+ retryInterval: 2000, // Default retry interval for priming events
+ onsessioninitialized: id => {
+ console.log(`[${id}] Session initialized`);
+ transports.set(id, transport);
+ }
+ });
+ // Create a new server per session and connect it to the transport
+ const server = getServer();
+ await server.connect(transport);
+ }
+ await transport.handleRequest(req, res, req.body);
+});
+// Start the server
+const PORT = 3001;
+app.listen(PORT, () => {
+ console.log(`SSE Polling Example Server running on http://localhost:${PORT}/mcp`);
+ console.log('');
+ console.log('This server demonstrates SEP-1699 SSE polling:');
+ console.log('- retryInterval: 2000ms (client waits 2s before reconnecting)');
+ console.log('- eventStore: InMemoryEventStore (events are persisted for replay)');
+ console.log('');
+ console.log('Try calling the "long-task" tool to see server-initiated disconnect in action.');
+});
+//# sourceMappingURL=ssePollingExample.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map
new file mode 100644
index 0000000..d001a5b
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ssePollingExample.js","sourceRoot":"","sources":["../../../../src/examples/server/ssePollingExample.ts"],"names":[],"mappings":";;;;;AAeA,6CAAyC;AACzC,gDAAgD;AAChD,wDAA8D;AAC9D,sEAA+E;AAE/E,2EAAqE;AACrE,gDAAwB;AAExB,kDAAkD;AAClD,yFAAyF;AACzF,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CACxB;QACI,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,OAAO;KACnB,EACD;QACI,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KAChC,CACJ,CAAC;IAEF,6EAA6E;IAC7E,MAAM,CAAC,IAAI,CACP,WAAW,EACX,0GAA0G,EAC1G,EAAE,EACF,KAAK,EAAE,KAAK,EAAE,KAAK,EAA2B,EAAE;QAC5C,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAA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AAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;IAClB,OAAO,CAAC,GAAG,CAAC,0DAA0D,IAAI,MAAM,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,gFAAgF,CAAC,CAAC;AAClG,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts
new file mode 100644
index 0000000..4df1783
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=standaloneSseWithGetStreamableHttp.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts.map
new file mode 100644
index 0000000..df60dc5
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"standaloneSseWithGetStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/standaloneSseWithGetStreamableHttp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js
new file mode 100644
index 0000000..129980e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js
@@ -0,0 +1,124 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_crypto_1 = require("node:crypto");
+const mcp_js_1 = require("../../server/mcp.js");
+const streamableHttp_js_1 = require("../../server/streamableHttp.js");
+const types_js_1 = require("../../types.js");
+const express_js_1 = require("../../server/express.js");
+// Factory to create a new MCP server per session.
+// Each session needs its own server+transport pair to avoid cross-session contamination.
+const getServer = () => {
+ const server = new mcp_js_1.McpServer({
+ name: 'resource-list-changed-notification-server',
+ version: '1.0.0'
+ });
+ const addResource = (name, content) => {
+ const uri = `https://mcp-example.com/dynamic/${encodeURIComponent(name)}`;
+ server.registerResource(name, uri, { mimeType: 'text/plain', description: `Dynamic resource: ${name}` }, async () => {
+ return {
+ contents: [{ uri, text: content }]
+ };
+ });
+ };
+ addResource('example-resource', 'Initial content for example-resource');
+ // Periodically add new resources to demonstrate notifications
+ const resourceChangeInterval = setInterval(() => {
+ const name = (0, node_crypto_1.randomUUID)();
+ addResource(name, `Content for ${name}`);
+ }, 5000);
+ // Clean up the interval when the server closes
+ server.server.onclose = () => {
+ clearInterval(resourceChangeInterval);
+ };
+ return server;
+};
+// Store transports by session ID to send notifications
+const transports = {};
+const app = (0, express_js_1.createMcpExpressApp)();
+app.post('/mcp', async (req, res) => {
+ console.log('Received MCP request:', req.body);
+ try {
+ // Check for existing session ID
+ const sessionId = req.headers['mcp-session-id'];
+ let transport;
+ if (sessionId && transports[sessionId]) {
+ // Reuse existing transport
+ transport = transports[sessionId];
+ }
+ else if (!sessionId && (0, types_js_1.isInitializeRequest)(req.body)) {
+ // New initialization request
+ transport = new streamableHttp_js_1.StreamableHTTPServerTransport({
+ sessionIdGenerator: () => (0, node_crypto_1.randomUUID)(),
+ onsessioninitialized: sessionId => {
+ // Store the transport by session ID when session is initialized
+ // This avoids race conditions where requests might come in before the session is stored
+ console.log(`Session initialized with ID: ${sessionId}`);
+ transports[sessionId] = transport;
+ }
+ });
+ // Create a new server per session and connect it to the transport
+ const server = getServer();
+ await server.connect(transport);
+ // Handle the request - the onsessioninitialized callback will store the transport
+ await transport.handleRequest(req, res, req.body);
+ return; // Already handled
+ }
+ else {
+ // Invalid request - no session ID or not initialization request
+ res.status(400).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32000,
+ message: 'Bad Request: No valid session ID provided'
+ },
+ id: null
+ });
+ return;
+ }
+ // Handle the request with existing transport
+ await transport.handleRequest(req, res, req.body);
+ }
+ catch (error) {
+ console.error('Error handling MCP request:', error);
+ if (!res.headersSent) {
+ res.status(500).json({
+ jsonrpc: '2.0',
+ error: {
+ code: -32603,
+ message: 'Internal server error'
+ },
+ id: null
+ });
+ }
+ }
+});
+// Handle GET requests for SSE streams (now using built-in support from StreamableHTTP)
+app.get('/mcp', async (req, res) => {
+ const sessionId = req.headers['mcp-session-id'];
+ if (!sessionId || !transports[sessionId]) {
+ res.status(400).send('Invalid or missing session ID');
+ return;
+ }
+ console.log(`Establishing SSE stream for session ${sessionId}`);
+ const transport = transports[sessionId];
+ await transport.handleRequest(req, res);
+});
+// Start the server
+const PORT = 3000;
+app.listen(PORT, error => {
+ if (error) {
+ console.error('Failed to start server:', error);
+ process.exit(1);
+ }
+ console.log(`Server listening on port ${PORT}`);
+});
+// Handle server shutdown
+process.on('SIGINT', async () => {
+ console.log('Shutting down server...');
+ for (const sessionId in transports) {
+ await transports[sessionId].close();
+ delete transports[sessionId];
+ }
+ process.exit(0);
+});
+//# sourceMappingURL=standaloneSseWithGetStreamableHttp.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map
new file mode 100644
index 0000000..f5c8acd
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"standaloneSseWithGetStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/standaloneSseWithGetStreamableHttp.ts"],"names":[],"mappings":";;AACA,6CAAyC;AACzC,gDAAgD;AAChD,sEAA+E;AAC/E,6CAAyE;AACzE,wDAA8D;AAE9D,kDAAkD;AAClD,yFAAyF;AACzF,MAAM,SAAS,GAAG,GAAG,EAAE;IACnB,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;QACzB,IAAI,EAAE,2CAA2C;QACjD,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,mCAAmC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1E,MAAM,CAAC,gBAAgB,CACnB,IAAI,EACJ,GAAG,EACH,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,IAAI,EAAE,EAAE,EACpE,KAAK,IAAiC,EAAE;YACpC,OAAO;gBACH,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;aACrC,CAAC;QACN,CAAC,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
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts
new file mode 100644
index 0000000..acc24b6
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=toolWithSampleServer.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts.map
new file mode 100644
index 0000000..bd0cebc
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"toolWithSampleServer.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/toolWithSampleServer.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js
new file mode 100644
index 0000000..45d3837
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js
@@ -0,0 +1,73 @@
+"use strict";
+// Run with: npx tsx src/examples/server/toolWithSampleServer.ts
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mcp_js_1 = require("../../server/mcp.js");
+const stdio_js_1 = require("../../server/stdio.js");
+const z = __importStar(require("zod/v4"));
+const mcpServer = new mcp_js_1.McpServer({
+ name: 'tools-with-sample-server',
+ version: '1.0.0'
+});
+// Tool that uses LLM sampling to summarize any text
+mcpServer.registerTool('summarize', {
+ description: 'Summarize any text using an LLM',
+ inputSchema: {
+ text: z.string().describe('Text to summarize')
+ }
+}, async ({ text }) => {
+ // Call the LLM through MCP sampling
+ const response = await mcpServer.server.createMessage({
+ messages: [
+ {
+ role: 'user',
+ content: {
+ type: 'text',
+ text: `Please summarize the following text concisely:\n\n${text}`
+ }
+ }
+ ],
+ maxTokens: 500
+ });
+ // Since we're not passing tools param to createMessage, response.content is single content
+ return {
+ content: [
+ {
+ type: 'text',
+ text: response.content.type === 'text' ? response.content.text : 'Unable to generate summary'
+ }
+ ]
+ };
+});
+async function main() {
+ const transport = new stdio_js_1.StdioServerTransport();
+ await mcpServer.connect(transport);
+ console.log('MCP server is running...');
+}
+main().catch(error => {
+ console.error('Server error:', error);
+ process.exit(1);
+});
+//# sourceMappingURL=toolWithSampleServer.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js.map
new file mode 100644
index 0000000..287e11e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"toolWithSampleServer.js","sourceRoot":"","sources":["../../../../src/examples/server/toolWithSampleServer.ts"],"names":[],"mappings":";AAAA,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;AAEhE,gDAAgD;AAChD,oDAA6D;AAC7D,0CAA4B;AAE5B,MAAM,SAAS,GAAG,IAAI,kBAAS,CAAC;IAC5B,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH,oDAAoD;AACpD,SAAS,CAAC,YAAY,CAClB,WAAW,EACX;IACI,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE;QACT,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;KACjD;CACJ,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACf,oCAAoC;IACpC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;QAClD,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,qDAAqD,IAAI,EAAE;iBACpE;aACJ;SACJ;QACD,SAAS,EAAE,GAAG;KACjB,CAAC,CAAC;IAEH,2FAA2F;IAC3F,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B;aAChG;SACJ;KACJ,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAC5C,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts
new file mode 100644
index 0000000..26ff38c
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts
@@ -0,0 +1,31 @@
+import { JSONRPCMessage } from '../../types.js';
+import { EventStore } from '../../server/streamableHttp.js';
+/**
+ * Simple in-memory implementation of the EventStore interface for resumability
+ * This is primarily intended for examples and testing, not for production use
+ * where a persistent storage solution would be more appropriate.
+ */
+export declare class InMemoryEventStore implements EventStore {
+ private events;
+ /**
+ * Generates a unique event ID for a given stream ID
+ */
+ private generateEventId;
+ /**
+ * Extracts the stream ID from an event ID
+ */
+ private getStreamIdFromEventId;
+ /**
+ * Stores an event with a generated event ID
+ * Implements EventStore.storeEvent
+ */
+ storeEvent(streamId: string, message: JSONRPCMessage): Promise;
+ /**
+ * Replays events that occurred after a specific event ID
+ * Implements EventStore.replayEventsAfter
+ */
+ replayEventsAfter(lastEventId: string, { send }: {
+ send: (eventId: string, message: JSONRPCMessage) => Promise;
+ }): Promise;
+}
+//# sourceMappingURL=inMemoryEventStore.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts.map
new file mode 100644
index 0000000..a67ee6c
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemoryEventStore.d.ts","sourceRoot":"","sources":["../../../../src/examples/shared/inMemoryEventStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;GAIG;AACH,qBAAa,kBAAmB,YAAW,UAAU;IACjD,OAAO,CAAC,MAAM,CAAyE;IAEvF;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAK9B;;;OAGG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAM5E;;;OAGG;IACG,iBAAiB,CACnB,WAAW,EAAE,MAAM,EACnB,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,GAChF,OAAO,CAAC,MAAM,CAAC;CAkCrB"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js
new file mode 100644
index 0000000..d33ffdb
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js
@@ -0,0 +1,69 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InMemoryEventStore = void 0;
+/**
+ * Simple in-memory implementation of the EventStore interface for resumability
+ * This is primarily intended for examples and testing, not for production use
+ * where a persistent storage solution would be more appropriate.
+ */
+class InMemoryEventStore {
+ constructor() {
+ this.events = new Map();
+ }
+ /**
+ * Generates a unique event ID for a given stream ID
+ */
+ generateEventId(streamId) {
+ return `${streamId}_${Date.now()}_${Math.random().toString(36).substring(2, 10)}`;
+ }
+ /**
+ * Extracts the stream ID from an event ID
+ */
+ getStreamIdFromEventId(eventId) {
+ const parts = eventId.split('_');
+ return parts.length > 0 ? parts[0] : '';
+ }
+ /**
+ * Stores an event with a generated event ID
+ * Implements EventStore.storeEvent
+ */
+ async storeEvent(streamId, message) {
+ const eventId = this.generateEventId(streamId);
+ this.events.set(eventId, { streamId, message });
+ return eventId;
+ }
+ /**
+ * Replays events that occurred after a specific event ID
+ * Implements EventStore.replayEventsAfter
+ */
+ async replayEventsAfter(lastEventId, { send }) {
+ if (!lastEventId || !this.events.has(lastEventId)) {
+ return '';
+ }
+ // Extract the stream ID from the event ID
+ const streamId = this.getStreamIdFromEventId(lastEventId);
+ if (!streamId) {
+ return '';
+ }
+ let foundLastEvent = false;
+ // Sort events by eventId for chronological ordering
+ const sortedEvents = [...this.events.entries()].sort((a, b) => a[0].localeCompare(b[0]));
+ for (const [eventId, { streamId: eventStreamId, message }] of sortedEvents) {
+ // Only include events from the same stream
+ if (eventStreamId !== streamId) {
+ continue;
+ }
+ // Start sending events after we find the lastEventId
+ if (eventId === lastEventId) {
+ foundLastEvent = true;
+ continue;
+ }
+ if (foundLastEvent) {
+ await send(eventId, message);
+ }
+ }
+ return streamId;
+ }
+}
+exports.InMemoryEventStore = InMemoryEventStore;
+//# sourceMappingURL=inMemoryEventStore.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js.map
new file mode 100644
index 0000000..d696450
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemoryEventStore.js","sourceRoot":"","sources":["../../../../src/examples/shared/inMemoryEventStore.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,MAAa,kBAAkB;IAA/B;QACY,WAAM,GAA+D,IAAI,GAAG,EAAE,CAAC;IAoE3F,CAAC;IAlEG;;OAEG;IACK,eAAe,CAAC,QAAgB;QACpC,OAAO,GAAG,QAAQ,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;IACtF,CAAC;IAED;;OAEG;IACK,sBAAsB,CAAC,OAAe;QAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU,CAAC,QAAgB,EAAE,OAAuB;QACtD,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAChD,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CACnB,WAAmB,EACnB,EAAE,IAAI,EAAyE;QAE/E,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YAChD,OAAO,EAAE,CAAC;QACd,CAAC;QAED,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACd,CAAC;QAED,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,oDAAoD;QACpD,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEzF,KAAK,MAAM,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC;YACzE,2CAA2C;YAC3C,IAAI,aAAa,KAAK,QAAQ,EAAE,CAAC;gBAC7B,SAAS;YACb,CAAC;YAED,qDAAqD;YACrD,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;gBAC1B,cAAc,GAAG,IAAI,CAAC;gBACtB,SAAS;YACb,CAAC;YAED,IAAI,cAAc,EAAE,CAAC;gBACjB,MAAM,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACjC,CAAC;QACL,CAAC;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AArED,gDAqEC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts
new file mode 100644
index 0000000..2a86335
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts
@@ -0,0 +1,13 @@
+/**
+ * Experimental MCP SDK features.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * Import experimental features from this module:
+ * ```typescript
+ * import { TaskStore, InMemoryTaskStore } from '@modelcontextprotocol/sdk/experimental';
+ * ```
+ *
+ * @experimental
+ */
+export * from './tasks/index.js';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts.map
new file mode 100644
index 0000000..410892a
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/experimental/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,kBAAkB,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js
new file mode 100644
index 0000000..7634e67
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js
@@ -0,0 +1,29 @@
+"use strict";
+/**
+ * Experimental MCP SDK features.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * Import experimental features from this module:
+ * ```typescript
+ * import { TaskStore, InMemoryTaskStore } from '@modelcontextprotocol/sdk/experimental';
+ * ```
+ *
+ * @experimental
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./tasks/index.js"), exports);
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js.map
new file mode 100644
index 0000000..110189e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/experimental/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;AAEH,mDAAiC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts
new file mode 100644
index 0000000..9c7a928
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts
@@ -0,0 +1,121 @@
+/**
+ * Experimental client task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import type { Client } from '../../client/index.js';
+import type { RequestOptions } from '../../shared/protocol.js';
+import type { ResponseMessage } from '../../shared/responseMessage.js';
+import type { AnyObjectSchema, SchemaOutput } from '../../server/zod-compat.js';
+import type { CallToolRequest, ClientRequest, Notification, Request, Result } from '../../types.js';
+import { CallToolResultSchema, type CompatibilityCallToolResultSchema } from '../../types.js';
+import type { GetTaskResult, ListTasksResult, CancelTaskResult } from './types.js';
+/**
+ * Experimental task features for MCP clients.
+ *
+ * Access via `client.experimental.tasks`:
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'tool', arguments: {} });
+ * const task = await client.experimental.tasks.getTask(taskId);
+ * ```
+ *
+ * @experimental
+ */
+export declare class ExperimentalClientTasks {
+ private readonly _client;
+ constructor(_client: Client);
+ /**
+ * Calls a tool and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to tool execution, allowing you to
+ * observe intermediate task status updates for long-running tool calls.
+ * Automatically validates structured output if the tool has an outputSchema.
+ *
+ * @example
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'myTool', arguments: {} });
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Tool execution started:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Tool status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Tool result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Tool error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - Tool call parameters (name and arguments)
+ * @param resultSchema - Zod schema for validating the result (defaults to CallToolResultSchema)
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ callToolStream(params: CallToolRequest['params'], resultSchema?: T, options?: RequestOptions): AsyncGenerator>, void, void>;
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ getTask(taskId: string, options?: RequestOptions): Promise;
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ getTaskResult(taskId: string, resultSchema?: T, options?: RequestOptions): Promise>;
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ listTasks(cursor?: string, options?: RequestOptions): Promise;
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ cancelTask(taskId: string, options?: RequestOptions): Promise;
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request: ClientRequest | RequestT, resultSchema: T, options?: RequestOptions): AsyncGenerator>, void, void>;
+}
+//# sourceMappingURL=client.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts.map
new file mode 100644
index 0000000..e54158d
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,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C,CAAC;IAapI;;;;;;;;OAQG;IACG,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IASpF;;;;;;;OAOG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IASrF;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,CAAC,SAAS,eAAe,EACnC,OAAO,EAAE,aAAa,GAAG,QAAQ,EACjC,YAAY,EAAE,CAAC,EACf,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;CAWlE"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js
new file mode 100644
index 0000000..cb7d26f
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js
@@ -0,0 +1,188 @@
+"use strict";
+/**
+ * Experimental client task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ExperimentalClientTasks = void 0;
+const types_js_1 = require("../../types.js");
+/**
+ * Experimental task features for MCP clients.
+ *
+ * Access via `client.experimental.tasks`:
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'tool', arguments: {} });
+ * const task = await client.experimental.tasks.getTask(taskId);
+ * ```
+ *
+ * @experimental
+ */
+class ExperimentalClientTasks {
+ constructor(_client) {
+ this._client = _client;
+ }
+ /**
+ * Calls a tool and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to tool execution, allowing you to
+ * observe intermediate task status updates for long-running tool calls.
+ * Automatically validates structured output if the tool has an outputSchema.
+ *
+ * @example
+ * ```typescript
+ * const stream = client.experimental.tasks.callToolStream({ name: 'myTool', arguments: {} });
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Tool execution started:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Tool status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Tool result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Tool error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - Tool call parameters (name and arguments)
+ * @param resultSchema - Zod schema for validating the result (defaults to CallToolResultSchema)
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ async *callToolStream(params, resultSchema = types_js_1.CallToolResultSchema, options) {
+ // Access Client's internal methods
+ const clientInternal = this._client;
+ // Add task creation parameters if server supports it and not explicitly provided
+ const optionsWithTask = {
+ ...options,
+ // We check if the tool is known to be a task during auto-configuration, but assume
+ // the caller knows what they're doing if they pass this explicitly
+ task: options?.task ?? (clientInternal.isToolTask(params.name) ? {} : undefined)
+ };
+ const stream = clientInternal.requestStream({ method: 'tools/call', params }, resultSchema, optionsWithTask);
+ // Get the validator for this tool (if it has an output schema)
+ const validator = clientInternal.getToolOutputValidator(params.name);
+ // Iterate through the stream and validate the final result if needed
+ for await (const message of stream) {
+ // If this is a result message and the tool has an output schema, validate it
+ if (message.type === 'result' && validator) {
+ const result = message.result;
+ // If tool has outputSchema, it MUST return structuredContent (unless it's an error)
+ if (!result.structuredContent && !result.isError) {
+ yield {
+ type: 'error',
+ error: new types_js_1.McpError(types_js_1.ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`)
+ };
+ return;
+ }
+ // Only validate structured content if present (not when there's an error)
+ if (result.structuredContent) {
+ try {
+ // Validate the structured content against the schema
+ const validationResult = validator(result.structuredContent);
+ if (!validationResult.valid) {
+ yield {
+ type: 'error',
+ error: new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)
+ };
+ return;
+ }
+ }
+ catch (error) {
+ if (error instanceof types_js_1.McpError) {
+ yield { type: 'error', error };
+ return;
+ }
+ yield {
+ type: 'error',
+ error: new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`)
+ };
+ return;
+ }
+ }
+ }
+ // Yield the message (either validated result or any other message type)
+ yield message;
+ }
+ }
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ async getTask(taskId, options) {
+ return this._client.getTask({ taskId }, options);
+ }
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ async getTaskResult(taskId, resultSchema, options) {
+ // Delegate to the client's underlying Protocol method
+ return this._client.getTaskResult({ taskId }, resultSchema, options);
+ }
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ async listTasks(cursor, options) {
+ // Delegate to the client's underlying Protocol method
+ return this._client.listTasks(cursor ? { cursor } : undefined, options);
+ }
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ async cancelTask(taskId, options) {
+ // Delegate to the client's underlying Protocol method
+ return this._client.cancelTask({ taskId }, options);
+ }
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request, resultSchema, options) {
+ return this._client.requestStream(request, resultSchema, options);
+ }
+}
+exports.ExperimentalClientTasks = ExperimentalClientTasks;
+//# sourceMappingURL=client.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js.map
new file mode 100644
index 0000000..a5dd7bd
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,6CAAmH;AAkBnH;;;;;;;;;;GAUG;AACH,MAAa,uBAAuB;IAKhC,YAA6B,OAAiD;QAAjD,YAAO,GAAP,OAAO,CAA0C;IAAG,CAAC;IAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,KAAK,CAAC,CAAC,cAAc,CACjB,MAAiC,EACjC,eAAkB,+BAAyB,EAC3C,OAAwB;QAExB,mCAAmC;QACnC,MAAM,cAAc,GAAG,IAAI,CAAC,OAA8C,CAAC;QAE3E,iFAAiF;QACjF,MAAM,eAAe,GAAG;YACpB,GAAG,OAAO;YACV,mFAAmF;YACnF,mEAAmE;YACnE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SACnF,CAAC;QAEF,MAAM,MAAM,GAAG,cAAc,CAAC,a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,IAAI,CAAC,OAA8C,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAC9G,CAAC;CACJ;AA9ND,0DA8NC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts
new file mode 100644
index 0000000..f5e505f
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts
@@ -0,0 +1,47 @@
+/**
+ * Experimental task capability assertion helpers.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+/**
+ * Type representing the task requests capability structure.
+ * This is derived from ClientTasksCapability.requests and ServerTasksCapability.requests.
+ */
+interface TaskRequestsCapability {
+ tools?: {
+ call?: object;
+ };
+ sampling?: {
+ createMessage?: object;
+ };
+ elicitation?: {
+ create?: object;
+ };
+}
+/**
+ * Asserts that task creation is supported for tools/call.
+ * Used by Client.assertTaskCapability and Server.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+export declare function assertToolsCallTaskCapability(requests: TaskRequestsCapability | undefined, method: string, entityName: 'Server' | 'Client'): void;
+/**
+ * Asserts that task creation is supported for sampling/createMessage or elicitation/create.
+ * Used by Server.assertTaskCapability and Client.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+export declare function assertClientRequestTaskCapability(requests: TaskRequestsCapability | undefined, method: string, entityName: 'Server' | 'Client'): void;
+export {};
+//# sourceMappingURL=helpers.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts.map
new file mode 100644
index 0000000..99dc903
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,UAAU,sBAAsB;IAC5B,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,WAAW,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CACzC,QAAQ,EAAE,sBAAsB,GAAG,SAAS,EAC5C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAChC,IAAI,CAgBN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iCAAiC,CAC7C,QAAQ,EAAE,sBAAsB,GAAG,SAAS,EAC5C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAChC,IAAI,CAsBN"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js
new file mode 100644
index 0000000..6348ab0
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js
@@ -0,0 +1,68 @@
+"use strict";
+/**
+ * Experimental task capability assertion helpers.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.assertToolsCallTaskCapability = assertToolsCallTaskCapability;
+exports.assertClientRequestTaskCapability = assertClientRequestTaskCapability;
+/**
+ * Asserts that task creation is supported for tools/call.
+ * Used by Client.assertTaskCapability and Server.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+function assertToolsCallTaskCapability(requests, method, entityName) {
+ if (!requests) {
+ throw new Error(`${entityName} does not support task creation (required for ${method})`);
+ }
+ switch (method) {
+ case 'tools/call':
+ if (!requests.tools?.call) {
+ throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
+ }
+ break;
+ default:
+ // Method doesn't support tasks, which is fine - no error
+ break;
+ }
+}
+/**
+ * Asserts that task creation is supported for sampling/createMessage or elicitation/create.
+ * Used by Server.assertTaskCapability and Client.assertTaskHandlerCapability.
+ *
+ * @param requests - The task requests capability object
+ * @param method - The method being checked
+ * @param entityName - 'Server' or 'Client' for error messages
+ * @throws Error if the capability is not supported
+ *
+ * @experimental
+ */
+function assertClientRequestTaskCapability(requests, method, entityName) {
+ if (!requests) {
+ throw new Error(`${entityName} does not support task creation (required for ${method})`);
+ }
+ switch (method) {
+ case 'sampling/createMessage':
+ if (!requests.sampling?.createMessage) {
+ throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
+ }
+ break;
+ case 'elicitation/create':
+ if (!requests.elicitation?.create) {
+ throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
+ }
+ break;
+ default:
+ // Method doesn't support tasks, which is fine - no error
+ break;
+ }
+}
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js.map
new file mode 100644
index 0000000..1054273
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/helpers.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAuBH,sEAoBC;AAaD,8EA0BC;AAtED;;;;;;;;;;GAUG;AACH,SAAgB,6BAA6B,CACzC,QAA4C,EAC5C,MAAc,EACd,UAA+B;IAE/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,iDAAiD,MAAM,GAAG,CAAC,CAAC;IAC7F,CAAC;IAED,QAAQ,MAAM,EAAE,CAAC;QACb,KAAK,YAAY;YACb,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;gBACxB,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,gEAAgE,MAAM,GAAG,CAAC,CAAC;YAC5G,CAAC;YACD,MAAM;QAEV;YACI,yDAAyD;YACzD,MAAM;IACd,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,iCAAiC,CAC7C,QAA4C,EAC5C,MAAc,EACd,UAA+B;IAE/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,iDAAiD,MAAM,GAAG,CAAC,CAAC;IAC7F,CAAC;IAED,QAAQ,MAAM,EAAE,CAAC;QACb,KAAK,wBAAwB;YACzB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC;gBACpC,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,4EAA4E,MAAM,GAAG,CAAC,CAAC;YACxH,CAAC;YACD,MAAM;QAEV,KAAK,oBAAoB;YACrB,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,wEAAwE,MAAM,GAAG,CAAC,CAAC;YACpH,CAAC;YACD,MAAM;QAEV;YACI,yDAAyD;YACzD,MAAM;IACd,CAAC;AACL,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts
new file mode 100644
index 0000000..33ab791
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts
@@ -0,0 +1,16 @@
+/**
+ * Experimental task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+export * from './types.js';
+export * from './interfaces.js';
+export * from './helpers.js';
+export * from './client.js';
+export * from './server.js';
+export * from './mcp-server.js';
+export * from './stores/in-memory.js';
+export type { ResponseMessage, TaskStatusMessage, TaskCreatedMessage, ResultMessage, ErrorMessage, BaseResponseMessage } from '../../shared/responseMessage.js';
+export { takeResult, toArrayAsync } from '../../shared/responseMessage.js';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts.map
new file mode 100644
index 0000000..cf117ed
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,YAAY,CAAC;AAG3B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,cAAc,CAAC;AAG7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,uBAAuB,CAAC;AAGtC,YAAY,EACR,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,mBAAmB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js
new file mode 100644
index 0000000..25296f6
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js
@@ -0,0 +1,39 @@
+"use strict";
+/**
+ * Experimental task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.toArrayAsync = exports.takeResult = void 0;
+// Re-export spec types for convenience
+__exportStar(require("./types.js"), exports);
+// SDK implementation interfaces
+__exportStar(require("./interfaces.js"), exports);
+// Assertion helpers
+__exportStar(require("./helpers.js"), exports);
+// Wrapper classes
+__exportStar(require("./client.js"), exports);
+__exportStar(require("./server.js"), exports);
+__exportStar(require("./mcp-server.js"), exports);
+// Store implementations
+__exportStar(require("./stores/in-memory.js"), exports);
+var responseMessage_js_1 = require("../../shared/responseMessage.js");
+Object.defineProperty(exports, "takeResult", { enumerable: true, get: function () { return responseMessage_js_1.takeResult; } });
+Object.defineProperty(exports, "toArrayAsync", { enumerable: true, get: function () { return responseMessage_js_1.toArrayAsync; } });
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js.map
new file mode 100644
index 0000000..3d57065
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;AAEH,uCAAuC;AACvC,6CAA2B;AAE3B,gCAAgC;AAChC,kDAAgC;AAEhC,oBAAoB;AACpB,+CAA6B;AAE7B,kBAAkB;AAClB,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAEhC,wBAAwB;AACxB,wDAAsC;AAWtC,sEAA2E;AAAlE,gHAAA,UAAU,OAAA;AAAE,kHAAA,YAAY,OAAA"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts
new file mode 100644
index 0000000..b0bb989
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts
@@ -0,0 +1,232 @@
+/**
+ * Experimental task interfaces for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ */
+import { Task, RequestId, Result, JSONRPCRequest, JSONRPCNotification, JSONRPCResultResponse, JSONRPCErrorResponse, ServerRequest, ServerNotification, CallToolResult, GetTaskResult, ToolExecution, Request } from '../../types.js';
+import { CreateTaskResult } from './types.js';
+import type { RequestHandlerExtra, RequestTaskStore } from '../../shared/protocol.js';
+import type { ZodRawShapeCompat, AnySchema, ShapeOutput } from '../../server/zod-compat.js';
+/**
+ * Extended handler extra with task store for task creation.
+ * @experimental
+ */
+export interface CreateTaskRequestHandlerExtra extends RequestHandlerExtra {
+ taskStore: RequestTaskStore;
+}
+/**
+ * Extended handler extra with task ID and store for task operations.
+ * @experimental
+ */
+export interface TaskRequestHandlerExtra extends RequestHandlerExtra {
+ taskId: string;
+ taskStore: RequestTaskStore;
+}
+/**
+ * Base callback type for tool handlers.
+ * @experimental
+ */
+export type BaseToolCallback, Args extends undefined | ZodRawShapeCompat | AnySchema = undefined> = Args extends ZodRawShapeCompat ? (args: ShapeOutput, extra: ExtraT) => SendResultT | Promise : Args extends AnySchema ? (args: unknown, extra: ExtraT) => SendResultT | Promise : (extra: ExtraT) => SendResultT | Promise;
+/**
+ * Handler for creating a task.
+ * @experimental
+ */
+export type CreateTaskRequestHandler = BaseToolCallback;
+/**
+ * Handler for task operations (get, getResult).
+ * @experimental
+ */
+export type TaskRequestHandler = BaseToolCallback;
+/**
+ * Interface for task-based tool handlers.
+ * @experimental
+ */
+export interface ToolTaskHandler {
+ createTask: CreateTaskRequestHandler;
+ getTask: TaskRequestHandler;
+ getTaskResult: TaskRequestHandler;
+}
+/**
+ * Task-specific execution configuration.
+ * taskSupport cannot be 'forbidden' for task-based tools.
+ * @experimental
+ */
+export type TaskToolExecution = Omit & {
+ taskSupport: TaskSupport extends 'forbidden' | undefined ? never : TaskSupport;
+};
+/**
+ * Represents a message queued for side-channel delivery via tasks/result.
+ *
+ * This is a serializable data structure that can be stored in external systems.
+ * All fields are JSON-serializable.
+ */
+export type QueuedMessage = QueuedRequest | QueuedNotification | QueuedResponse | QueuedError;
+export interface BaseQueuedMessage {
+ /** Type of message */
+ type: string;
+ /** When the message was queued (milliseconds since epoch) */
+ timestamp: number;
+}
+export interface QueuedRequest extends BaseQueuedMessage {
+ type: 'request';
+ /** The actual JSONRPC request */
+ message: JSONRPCRequest;
+}
+export interface QueuedNotification extends BaseQueuedMessage {
+ type: 'notification';
+ /** The actual JSONRPC notification */
+ message: JSONRPCNotification;
+}
+export interface QueuedResponse extends BaseQueuedMessage {
+ type: 'response';
+ /** The actual JSONRPC response */
+ message: JSONRPCResultResponse;
+}
+export interface QueuedError extends BaseQueuedMessage {
+ type: 'error';
+ /** The actual JSONRPC error */
+ message: JSONRPCErrorResponse;
+}
+/**
+ * Interface for managing per-task FIFO message queues.
+ *
+ * Similar to TaskStore, this allows pluggable queue implementations
+ * (in-memory, Redis, other distributed queues, etc.).
+ *
+ * Each method accepts taskId and optional sessionId parameters to enable
+ * a single queue instance to manage messages for multiple tasks, with
+ * isolation based on task ID and session ID.
+ *
+ * All methods are async to support external storage implementations.
+ * All data in QueuedMessage must be JSON-serializable.
+ *
+ * @experimental
+ */
+export interface TaskMessageQueue {
+ /**
+ * Adds a message to the end of the queue for a specific task.
+ * Atomically checks queue size and throws if maxSize would be exceeded.
+ * @param taskId The task identifier
+ * @param message The message to enqueue
+ * @param sessionId Optional session ID for binding the operation to a specific session
+ * @param maxSize Optional maximum queue size - if specified and queue is full, throws an error
+ * @throws Error if maxSize is specified and would be exceeded
+ */
+ enqueue(taskId: string, message: QueuedMessage, sessionId?: string, maxSize?: number): Promise;
+ /**
+ * Removes and returns the first message from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns The first message, or undefined if the queue is empty
+ */
+ dequeue(taskId: string, sessionId?: string): Promise;
+ /**
+ * Removes and returns all messages from the queue for a specific task.
+ * Used when tasks are cancelled or failed to clean up pending messages.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns Array of all messages that were in the queue
+ */
+ dequeueAll(taskId: string, sessionId?: string): Promise;
+}
+/**
+ * Task creation options.
+ * @experimental
+ */
+export interface CreateTaskOptions {
+ /**
+ * Time in milliseconds to keep task results available after completion.
+ * If null, the task has unlimited lifetime until manually cleaned up.
+ */
+ ttl?: number | null;
+ /**
+ * Time in milliseconds to wait between task status requests.
+ */
+ pollInterval?: number;
+ /**
+ * Additional context to pass to the task store.
+ */
+ context?: Record;
+}
+/**
+ * Interface for storing and retrieving task state and results.
+ *
+ * Similar to Transport, this allows pluggable task storage implementations
+ * (in-memory, database, distributed cache, etc.).
+ *
+ * @experimental
+ */
+export interface TaskStore {
+ /**
+ * Creates a new task with the given creation parameters and original request.
+ * The implementation must generate a unique taskId and createdAt timestamp.
+ *
+ * TTL Management:
+ * - The implementation receives the TTL suggested by the requestor via taskParams.ttl
+ * - The implementation MAY override the requested TTL (e.g., to enforce limits)
+ * - The actual TTL used MUST be returned in the Task object
+ * - Null TTL indicates unlimited task lifetime (no automatic cleanup)
+ * - Cleanup SHOULD occur automatically after TTL expires, regardless of task status
+ *
+ * @param taskParams - The task creation parameters from the request (ttl, pollInterval)
+ * @param requestId - The JSON-RPC request ID
+ * @param request - The original request that triggered task creation
+ * @param sessionId - Optional session ID for binding the task to a specific session
+ * @returns The created task object
+ */
+ createTask(taskParams: CreateTaskOptions, requestId: RequestId, request: Request, sessionId?: string): Promise;
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param sessionId - Optional session ID for binding the query to a specific session
+ * @returns The task object, or null if it does not exist
+ */
+ getTask(taskId: string, sessionId?: string): Promise;
+ /**
+ * Stores the result of a task and sets its final status.
+ *
+ * @param taskId - The task identifier
+ * @param status - The final status: 'completed' for success, 'failed' for errors
+ * @param result - The result to store
+ * @param sessionId - Optional session ID for binding the operation to a specific session
+ */
+ storeTaskResult(taskId: string, status: 'completed' | 'failed', result: Result, sessionId?: string): Promise;
+ /**
+ * Retrieves the stored result of a task.
+ *
+ * @param taskId - The task identifier
+ * @param sessionId - Optional session ID for binding the query to a specific session
+ * @returns The stored result
+ */
+ getTaskResult(taskId: string, sessionId?: string): Promise;
+ /**
+ * Updates a task's status (e.g., to 'cancelled', 'failed', 'completed').
+ *
+ * @param taskId - The task identifier
+ * @param status - The new status
+ * @param statusMessage - Optional diagnostic message for failed tasks or other status information
+ * @param sessionId - Optional session ID for binding the operation to a specific session
+ */
+ updateTaskStatus(taskId: string, status: Task['status'], statusMessage?: string, sessionId?: string): Promise;
+ /**
+ * Lists tasks, optionally starting from a pagination cursor.
+ *
+ * @param cursor - Optional cursor for pagination
+ * @param sessionId - Optional session ID for binding the query to a specific session
+ * @returns An object containing the tasks array and an optional nextCursor
+ */
+ listTasks(cursor?: string, sessionId?: string): Promise<{
+ tasks: Task[];
+ nextCursor?: string;
+ }>;
+}
+/**
+ * Checks if a task status represents a terminal state.
+ * Terminal states are those where the task has finished and will not change.
+ *
+ * @param status - The task status to check
+ * @returns True if the status is terminal (completed, failed, or cancelled)
+ * @experimental
+ */
+export declare function isTerminal(status: Task['status']): boolean;
+//# sourceMappingURL=interfaces.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map
new file mode 100644
index 0000000..afd1d70
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,IAAI,EACJ,SAAS,E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C,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErH;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAElE;;;;;;;OAOG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnH;;;;;;OAMG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnE;;;;;;;OAOG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpH;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnG;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,OAAO,CAE1D"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js
new file mode 100644
index 0000000..8f533bb
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js
@@ -0,0 +1,19 @@
+"use strict";
+/**
+ * Experimental task interfaces for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isTerminal = isTerminal;
+/**
+ * Checks if a task status represents a terminal state.
+ * Terminal states are those where the task has finished and will not change.
+ *
+ * @param status - The task status to check
+ * @returns True if the status is terminal (completed, failed, or cancelled)
+ * @experimental
+ */
+function isTerminal(status) {
+ return status === 'completed' || status === 'failed' || status === 'cancelled';
+}
+//# sourceMappingURL=interfaces.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map
new file mode 100644
index 0000000..c3cd4ed
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA2RH,gCAEC;AAVD;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,MAAsB;IAC7C,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,WAAW,CAAC;AACnF,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts
new file mode 100644
index 0000000..b3244f9
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts
@@ -0,0 +1,77 @@
+/**
+ * Experimental McpServer task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import type { McpServer, RegisteredTool } from '../../server/mcp.js';
+import type { ZodRawShapeCompat, AnySchema } from '../../server/zod-compat.js';
+import type { ToolAnnotations } from '../../types.js';
+import type { ToolTaskHandler, TaskToolExecution } from './interfaces.js';
+/**
+ * Experimental task features for McpServer.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * server.experimental.tasks.registerToolTask('long-running', config, handler);
+ * ```
+ *
+ * @experimental
+ */
+export declare class ExperimentalMcpServerTasks {
+ private readonly _mcpServer;
+ constructor(_mcpServer: McpServer);
+ /**
+ * Registers a task-based tool with a config object and handler.
+ *
+ * Task-based tools support long-running operations that can be polled for status
+ * and results. The handler must implement `createTask`, `getTask`, and `getTaskResult`
+ * methods.
+ *
+ * @example
+ * ```typescript
+ * server.experimental.tasks.registerToolTask('long-computation', {
+ * description: 'Performs a long computation',
+ * inputSchema: { input: z.string() },
+ * execution: { taskSupport: 'required' }
+ * }, {
+ * createTask: async (args, extra) => {
+ * const task = await extra.taskStore.createTask({ ttl: 300000 });
+ * startBackgroundWork(task.taskId, args);
+ * return { task };
+ * },
+ * getTask: async (args, extra) => {
+ * return extra.taskStore.getTask(extra.taskId);
+ * },
+ * getTaskResult: async (args, extra) => {
+ * return extra.taskStore.getTaskResult(extra.taskId);
+ * }
+ * });
+ * ```
+ *
+ * @param name - The tool name
+ * @param config - Tool configuration (description, schemas, etc.)
+ * @param handler - Task handler with createTask, getTask, getTaskResult methods
+ * @returns RegisteredTool for managing the tool's lifecycle
+ *
+ * @experimental
+ */
+ registerToolTask(name: string, config: {
+ title?: string;
+ description?: string;
+ outputSchema?: OutputArgs;
+ annotations?: ToolAnnotations;
+ execution?: TaskToolExecution;
+ _meta?: Record;
+ }, handler: ToolTaskHandler): RegisteredTool;
+ registerToolTask(name: string, config: {
+ title?: string;
+ description?: string;
+ inputSchema: InputArgs;
+ outputSchema?: OutputArgs;
+ annotations?: ToolAnnotations;
+ execution?: TaskToolExecution;
+ _meta?: Record;
+ }, handler: ToolTaskHandler): RegisteredTool;
+}
+//# sourceMappingURL=mcp-server.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts.map
new file mode 100644
index 0000000..84ee9e0
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAoB1E;;;;;;;;;GASG;AACH,qBAAa,0BAA0B;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,SAAS;IAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,gBAAgB,CAAC,UAAU,SAAS,SAAS,GAAG,iBAAiB,GAAG,SAAS,EACzE,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,UAAU,CAAC;QAC1B,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,SAAS,CAAC,EAAE,iBAAiB,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,EACD,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,GACpC,cAAc;IAEjB,gBAAgB,CAAC,SAAS,SAAS,iBAAiB,GAAG,SAAS,EAAE,UAAU,SAAS,SAAS,GAAG,iBAAiB,GAAG,SAAS,EAC1H,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,SAAS,CAAC;QACvB,YAAY,CAAC,EAAE,UAAU,CAAC;QAC1B,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,SAAS,CAAC,EAAE,iBAAiB,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,EACD,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,GACpC,cAAc;CAsCpB"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js
new file mode 100644
index 0000000..a2718e1
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js
@@ -0,0 +1,36 @@
+"use strict";
+/**
+ * Experimental McpServer task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ExperimentalMcpServerTasks = void 0;
+/**
+ * Experimental task features for McpServer.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * server.experimental.tasks.registerToolTask('long-running', config, handler);
+ * ```
+ *
+ * @experimental
+ */
+class ExperimentalMcpServerTasks {
+ constructor(_mcpServer) {
+ this._mcpServer = _mcpServer;
+ }
+ registerToolTask(name, config, handler) {
+ // Validate that taskSupport is not 'forbidden' for task-based tools
+ const execution = { taskSupport: 'required', ...config.execution };
+ if (execution.taskSupport === 'forbidden') {
+ throw new Error(`Cannot register task-based tool '${name}' with taskSupport 'forbidden'. Use registerTool() instead.`);
+ }
+ // Access McpServer's internal _createRegisteredTool method
+ const mcpServerInternal = this._mcpServer;
+ return mcpServerInternal._createRegisteredTool(name, config.title, config.description, config.inputSchema, config.outputSchema, config.annotations, execution, config._meta, handler);
+ }
+}
+exports.ExperimentalMcpServerTasks = ExperimentalMcpServerTasks;
+//# sourceMappingURL=mcp-server.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js.map
new file mode 100644
index 0000000..ff3e8c4
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/mcp-server.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAyBH;;;;;;;;;GASG;AACH,MAAa,0BAA0B;IACnC,YAA6B,UAAqB;QAArB,eAAU,GAAV,UAAU,CAAW;IAAG,CAAC;IAgEtD,gBAAgB,CAIZ,IAAY,EACZ,MAQC,EACD,OAAmC;QAEnC,oEAAoE;QACpE,MAAM,SAAS,GAAkB,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAClF,IAAI,SAAS,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,6DAA6D,CAAC,CAAC;QAC3H,CAAC;QAED,2DAA2D;QAC3D,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAA0C,CAAC;QAC1E,OAAO,iBAAiB,CAAC,qBAAqB,CAC1C,IAAI,EACJ,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,YAAY,EACnB,MAAM,CAAC,WAAW,EAClB,SAAS,EACT,MAAM,CAAC,KAAK,EACZ,OAAwD,CAC3D,CAAC;IACN,CAAC;CACJ;AArGD,gEAqGC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts
new file mode 100644
index 0000000..45ac3d6
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts
@@ -0,0 +1,170 @@
+/**
+ * Experimental server task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import type { Server } from '../../server/index.js';
+import type { RequestOptions } from '../../shared/protocol.js';
+import type { ResponseMessage } from '../../shared/responseMessage.js';
+import type { AnySchema, SchemaOutput } from '../../server/zod-compat.js';
+import type { ServerRequest, Notification, Request, Result, GetTaskResult, ListTasksResult, CancelTaskResult, CreateMessageRequestParams, CreateMessageResult, ElicitRequestFormParams, ElicitRequestURLParams, ElicitResult } from '../../types.js';
+/**
+ * Experimental task features for low-level MCP servers.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * const stream = server.experimental.tasks.requestStream(request, schema, options);
+ * ```
+ *
+ * For high-level server usage with task-based tools, use `McpServer.experimental.tasks` instead.
+ *
+ * @experimental
+ */
+export declare class ExperimentalServerTasks {
+ private readonly _server;
+ constructor(_server: Server);
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request: ServerRequest | RequestT, resultSchema: T, options?: RequestOptions): AsyncGenerator>, void, void>;
+ /**
+ * Sends a sampling request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
+ * before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.createMessageStream({
+ * messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
+ * maxTokens: 100
+ * }, {
+ * onprogress: (progress) => {
+ * // Handle streaming tokens via progress notifications
+ * console.log('Progress:', progress.message);
+ * }
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Final result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The sampling request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ createMessageStream(params: CreateMessageRequestParams, options?: RequestOptions): AsyncGenerator, void, void>;
+ /**
+ * Sends an elicitation request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
+ * and 'taskStatus' messages before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.elicitInputStream({
+ * mode: 'url',
+ * message: 'Please authenticate',
+ * elicitationId: 'auth-123',
+ * url: 'https://example.com/auth'
+ * }, {
+ * task: { ttl: 300000 } // Task-augmented for long-running auth flow
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('User action:', message.result.action);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The elicitation request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ elicitInputStream(params: ElicitRequestFormParams | ElicitRequestURLParams, options?: RequestOptions): AsyncGenerator, void, void>;
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ getTask(taskId: string, options?: RequestOptions): Promise;
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ getTaskResult(taskId: string, resultSchema?: T, options?: RequestOptions): Promise>;
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ listTasks(cursor?: string, options?: RequestOptions): Promise;
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ cancelTask(taskId: string, options?: RequestOptions): Promise;
+}
+//# sourceMappingURL=server.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts.map
new file mode 100644
index 0000000..48c996b
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACR,aAAa,EACb,YAAY,EACZ,OAAO,EACP,MAAM,EACN,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACf,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAuB,CAChC,QAAQ,SAAS,OAAO,GAAG,OAAO,EAClC,aAAa,SAAS,YAAY,GAAG,YAAY,EACjD,OAAO,SAAS,MAAM,GAAG,MAAM;IAEnB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC;IAE9E;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,CAAC,SAAS,SAAS,EAC7B,OAAO,EAAE,aAAa,GAAG,QAAQ,EACjC,YAAY,EAAE,CAAC,EACf,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAY/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,mBAAmB,CACf,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAuDnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,iBAAiB,CACb,MAAM,EAAE,uBAAuB,GAAG,sBAAsB,EACxD,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAoC5D;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAK/E;;;;;;;;;OASG;IACG,aAAa,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAY9H;;;;;;;;OAQG;IACG,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAQpF;;;;;;;OAOG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAOxF"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js
new file mode 100644
index 0000000..5da86c9
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js
@@ -0,0 +1,250 @@
+"use strict";
+/**
+ * Experimental server task features for MCP SDK.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ExperimentalServerTasks = void 0;
+const types_js_1 = require("../../types.js");
+/**
+ * Experimental task features for low-level MCP servers.
+ *
+ * Access via `server.experimental.tasks`:
+ * ```typescript
+ * const stream = server.experimental.tasks.requestStream(request, schema, options);
+ * ```
+ *
+ * For high-level server usage with task-based tools, use `McpServer.experimental.tasks` instead.
+ *
+ * @experimental
+ */
+class ExperimentalServerTasks {
+ constructor(_server) {
+ this._server = _server;
+ }
+ /**
+ * Sends a request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * This method provides streaming access to request processing, allowing you to
+ * observe intermediate task status updates for task-augmented requests.
+ *
+ * @param request - The request to send
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ requestStream(request, resultSchema, options) {
+ return this._server.requestStream(request, resultSchema, options);
+ }
+ /**
+ * Sends a sampling request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
+ * before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.createMessageStream({
+ * messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
+ * maxTokens: 100
+ * }, {
+ * onprogress: (progress) => {
+ * // Handle streaming tokens via progress notifications
+ * console.log('Progress:', progress.message);
+ * }
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('Final result:', message.result);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The sampling request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ createMessageStream(params, options) {
+ // Access client capabilities via the server
+ const clientCapabilities = this._server.getClientCapabilities();
+ // Capability check - only required when tools/toolChoice are provided
+ if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
+ throw new Error('Client does not support sampling tools capability.');
+ }
+ // Message structure validation - always validate tool_use/tool_result pairs.
+ // These may appear even without tools/toolChoice in the current request when
+ // a previous sampling request returned tool_use and this is a follow-up with results.
+ if (params.messages.length > 0) {
+ const lastMessage = params.messages[params.messages.length - 1];
+ const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
+ const hasToolResults = lastContent.some(c => c.type === 'tool_result');
+ const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined;
+ const previousContent = previousMessage
+ ? Array.isArray(previousMessage.content)
+ ? previousMessage.content
+ : [previousMessage.content]
+ : [];
+ const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use');
+ if (hasToolResults) {
+ if (lastContent.some(c => c.type !== 'tool_result')) {
+ throw new Error('The last message must contain only tool_result content if any is present');
+ }
+ if (!hasPreviousToolUse) {
+ throw new Error('tool_result blocks are not matching any tool_use from the previous message');
+ }
+ }
+ if (hasPreviousToolUse) {
+ // Extract tool_use IDs from previous message and tool_result IDs from current message
+ const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => c.id));
+ const toolResultIds = new Set(lastContent.filter(c => c.type === 'tool_result').map(c => c.toolUseId));
+ if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) {
+ throw new Error('ids of tool_result blocks and tool_use blocks from previous message do not match');
+ }
+ }
+ }
+ return this.requestStream({
+ method: 'sampling/createMessage',
+ params
+ }, types_js_1.CreateMessageResultSchema, options);
+ }
+ /**
+ * Sends an elicitation request and returns an AsyncGenerator that yields response messages.
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
+ *
+ * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
+ * and 'taskStatus' messages before the final result.
+ *
+ * @example
+ * ```typescript
+ * const stream = server.experimental.tasks.elicitInputStream({
+ * mode: 'url',
+ * message: 'Please authenticate',
+ * elicitationId: 'auth-123',
+ * url: 'https://example.com/auth'
+ * }, {
+ * task: { ttl: 300000 } // Task-augmented for long-running auth flow
+ * });
+ *
+ * for await (const message of stream) {
+ * switch (message.type) {
+ * case 'taskCreated':
+ * console.log('Task created:', message.task.taskId);
+ * break;
+ * case 'taskStatus':
+ * console.log('Task status:', message.task.status);
+ * break;
+ * case 'result':
+ * console.log('User action:', message.result.action);
+ * break;
+ * case 'error':
+ * console.error('Error:', message.error);
+ * break;
+ * }
+ * }
+ * ```
+ *
+ * @param params - The elicitation request parameters
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
+ * @returns AsyncGenerator that yields ResponseMessage objects
+ *
+ * @experimental
+ */
+ elicitInputStream(params, options) {
+ // Access client capabilities via the server
+ const clientCapabilities = this._server.getClientCapabilities();
+ const mode = params.mode ?? 'form';
+ // Capability check based on mode
+ switch (mode) {
+ case 'url': {
+ if (!clientCapabilities?.elicitation?.url) {
+ throw new Error('Client does not support url elicitation.');
+ }
+ break;
+ }
+ case 'form': {
+ if (!clientCapabilities?.elicitation?.form) {
+ throw new Error('Client does not support form elicitation.');
+ }
+ break;
+ }
+ }
+ // Normalize params to ensure mode is set for form mode (defaults to 'form' per spec)
+ const normalizedParams = mode === 'form' && params.mode === undefined ? { ...params, mode: 'form' } : params;
+ // Cast to ServerRequest needed because TypeScript can't narrow the union type
+ // based on the discriminated 'method' field when constructing the object literal
+ return this.requestStream({
+ method: 'elicitation/create',
+ params: normalizedParams
+ }, types_js_1.ElicitResultSchema, options);
+ }
+ /**
+ * Gets the current status of a task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ * @returns The task status
+ *
+ * @experimental
+ */
+ async getTask(taskId, options) {
+ return this._server.getTask({ taskId }, options);
+ }
+ /**
+ * Retrieves the result of a completed task.
+ *
+ * @param taskId - The task identifier
+ * @param resultSchema - Zod schema for validating the result
+ * @param options - Optional request options
+ * @returns The task result
+ *
+ * @experimental
+ */
+ async getTaskResult(taskId, resultSchema, options) {
+ return this._server.getTaskResult({ taskId }, resultSchema, options);
+ }
+ /**
+ * Lists tasks with optional pagination.
+ *
+ * @param cursor - Optional pagination cursor
+ * @param options - Optional request options
+ * @returns List of tasks with optional next cursor
+ *
+ * @experimental
+ */
+ async listTasks(cursor, options) {
+ return this._server.listTasks(cursor ? { cursor } : undefined, options);
+ }
+ /**
+ * Cancels a running task.
+ *
+ * @param taskId - The task identifier
+ * @param options - Optional request options
+ *
+ * @experimental
+ */
+ async cancelTask(taskId, options) {
+ return this._server.cancelTask({ taskId }, options);
+ }
+}
+exports.ExperimentalServerTasks = ExperimentalServerTasks;
+//# sourceMappingURL=server.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js.map
new file mode 100644
index 0000000..5beb316
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/server.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAoBH,6CAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAa,uBAAuB;IAKhC,YAA6B,OAAiD;QAAjD,YAAO,GAAP,OAAO,CAA0C;IAAG,CAAC;IAElF;;;;;;;;;;;;;OAaG;IACH,aAAa,CACT,OAAiC,EACjC,YAAe,EACf,OAAwB;QAUxB,OAAQ,IAAI,CAAC,OAA8C,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IA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OAAwB;QAElD,OAAQ,IAAI,CAAC,OAAwC,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,aAAa,CAAsB,MAAc,EAAE,YAAgB,EAAE,OAAwB;QAC/F,OACI,IAAI,CAAC,OAOR,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,SAAS,CAAC,MAAe,EAAE,OAAwB;QACrD,OACI,IAAI,CAAC,OAGR,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,OAAwB;QACrD,OACI,IAAI,CAAC,OAGR,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AA/RD,0DA+RC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts
new file mode 100644
index 0000000..d30795e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts
@@ -0,0 +1,94 @@
+/**
+ * In-memory implementations of TaskStore and TaskMessageQueue.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+import { Task, RequestId, Result, Request } from '../../../types.js';
+import { TaskStore, TaskMessageQueue, QueuedMessage, CreateTaskOptions } from '../interfaces.js';
+/**
+ * A simple in-memory implementation of TaskStore for demonstration purposes.
+ *
+ * This implementation stores all tasks in memory and provides automatic cleanup
+ * based on the ttl duration specified in the task creation parameters.
+ *
+ * Note: This is not suitable for production use as all data is lost on restart.
+ * For production, consider implementing TaskStore with a database or distributed cache.
+ *
+ * @experimental
+ */
+export declare class InMemoryTaskStore implements TaskStore {
+ private tasks;
+ private cleanupTimers;
+ /**
+ * Generates a unique task ID.
+ * Uses 16 bytes of random data encoded as hex (32 characters).
+ */
+ private generateTaskId;
+ createTask(taskParams: CreateTaskOptions, requestId: RequestId, request: Request, _sessionId?: string): Promise;
+ getTask(taskId: string, _sessionId?: string): Promise;
+ storeTaskResult(taskId: string, status: 'completed' | 'failed', result: Result, _sessionId?: string): Promise;
+ getTaskResult(taskId: string, _sessionId?: string): Promise;
+ updateTaskStatus(taskId: string, status: Task['status'], statusMessage?: string, _sessionId?: string): Promise;
+ listTasks(cursor?: string, _sessionId?: string): Promise<{
+ tasks: Task[];
+ nextCursor?: string;
+ }>;
+ /**
+ * Cleanup all timers (useful for testing or graceful shutdown)
+ */
+ cleanup(): void;
+ /**
+ * Get all tasks (useful for debugging)
+ */
+ getAllTasks(): Task[];
+}
+/**
+ * A simple in-memory implementation of TaskMessageQueue for demonstration purposes.
+ *
+ * This implementation stores messages in memory, organized by task ID and optional session ID.
+ * Messages are stored in FIFO queues per task.
+ *
+ * Note: This is not suitable for production use in distributed systems.
+ * For production, consider implementing TaskMessageQueue with Redis or other distributed queues.
+ *
+ * @experimental
+ */
+export declare class InMemoryTaskMessageQueue implements TaskMessageQueue {
+ private queues;
+ /**
+ * Generates a queue key from taskId.
+ * SessionId is intentionally ignored because taskIds are globally unique
+ * and tasks need to be accessible across HTTP requests/sessions.
+ */
+ private getQueueKey;
+ /**
+ * Gets or creates a queue for the given task and session.
+ */
+ private getQueue;
+ /**
+ * Adds a message to the end of the queue for a specific task.
+ * Atomically checks queue size and throws if maxSize would be exceeded.
+ * @param taskId The task identifier
+ * @param message The message to enqueue
+ * @param sessionId Optional session ID for binding the operation to a specific session
+ * @param maxSize Optional maximum queue size - if specified and queue is full, throws an error
+ * @throws Error if maxSize is specified and would be exceeded
+ */
+ enqueue(taskId: string, message: QueuedMessage, sessionId?: string, maxSize?: number): Promise;
+ /**
+ * Removes and returns the first message from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns The first message, or undefined if the queue is empty
+ */
+ dequeue(taskId: string, sessionId?: string): Promise;
+ /**
+ * Removes and returns all messages from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns Array of all messages that were in the queue
+ */
+ dequeueAll(taskId: string, sessionId?: string): Promise;
+}
+//# sourceMappingURL=in-memory.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map
new file mode 100644
index 0000000..1825e87
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"in-memory.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/tasks/stores/in-memory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAc,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAU7G;;;;;;;;;;GAUG;AACH,qBAAa,iBAAkB,YAAW,SAAS;IAC/C,OAAO,CAAC,KAAK,CAAiC;IAC9C,OAAO,CAAC,aAAa,CAAoD;IAEzE;;;OAGG;IACH,OAAO,CAAC,cAAc;IAIhB,UAAU,CAAC,UAAU,EAAE,iB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OAAO,CAAC,IAAI,CAAC;IAW1G;;;;;OAKG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAKrF;;;;;OAKG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;CAMjF"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js
new file mode 100644
index 0000000..fe1b1e7
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js
@@ -0,0 +1,251 @@
+"use strict";
+/**
+ * In-memory implementations of TaskStore and TaskMessageQueue.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * @experimental
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InMemoryTaskMessageQueue = exports.InMemoryTaskStore = void 0;
+const interfaces_js_1 = require("../interfaces.js");
+const node_crypto_1 = require("node:crypto");
+/**
+ * A simple in-memory implementation of TaskStore for demonstration purposes.
+ *
+ * This implementation stores all tasks in memory and provides automatic cleanup
+ * based on the ttl duration specified in the task creation parameters.
+ *
+ * Note: This is not suitable for production use as all data is lost on restart.
+ * For production, consider implementing TaskStore with a database or distributed cache.
+ *
+ * @experimental
+ */
+class InMemoryTaskStore {
+ constructor() {
+ this.tasks = new Map();
+ this.cleanupTimers = new Map();
+ }
+ /**
+ * Generates a unique task ID.
+ * Uses 16 bytes of random data encoded as hex (32 characters).
+ */
+ generateTaskId() {
+ return (0, node_crypto_1.randomBytes)(16).toString('hex');
+ }
+ async createTask(taskParams, requestId, request, _sessionId) {
+ // Generate a unique task ID
+ const taskId = this.generateTaskId();
+ // Ensure uniqueness
+ if (this.tasks.has(taskId)) {
+ throw new Error(`Task with ID ${taskId} already exists`);
+ }
+ const actualTtl = taskParams.ttl ?? null;
+ // Create task with generated ID and timestamps
+ const createdAt = new Date().toISOString();
+ const task = {
+ taskId,
+ status: 'working',
+ ttl: actualTtl,
+ createdAt,
+ lastUpdatedAt: createdAt,
+ pollInterval: taskParams.pollInterval ?? 1000
+ };
+ this.tasks.set(taskId, {
+ task,
+ request,
+ requestId
+ });
+ // Schedule cleanup if ttl is specified
+ // Cleanup occurs regardless of task status
+ if (actualTtl) {
+ const timer = setTimeout(() => {
+ this.tasks.delete(taskId);
+ this.cleanupTimers.delete(taskId);
+ }, actualTtl);
+ this.cleanupTimers.set(taskId, timer);
+ }
+ return task;
+ }
+ async getTask(taskId, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ return stored ? { ...stored.task } : null;
+ }
+ async storeTaskResult(taskId, status, result, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ if (!stored) {
+ throw new Error(`Task with ID ${taskId} not found`);
+ }
+ // Don't allow storing results for tasks already in terminal state
+ if ((0, interfaces_js_1.isTerminal)(stored.task.status)) {
+ throw new Error(`Cannot store result for task ${taskId} in terminal status '${stored.task.status}'. Task results can only be stored once.`);
+ }
+ stored.result = result;
+ stored.task.status = status;
+ stored.task.lastUpdatedAt = new Date().toISOString();
+ // Reset cleanup timer to start from now (if ttl is set)
+ if (stored.task.ttl) {
+ const existingTimer = this.cleanupTimers.get(taskId);
+ if (existingTimer) {
+ clearTimeout(existingTimer);
+ }
+ const timer = setTimeout(() => {
+ this.tasks.delete(taskId);
+ this.cleanupTimers.delete(taskId);
+ }, stored.task.ttl);
+ this.cleanupTimers.set(taskId, timer);
+ }
+ }
+ async getTaskResult(taskId, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ if (!stored) {
+ throw new Error(`Task with ID ${taskId} not found`);
+ }
+ if (!stored.result) {
+ throw new Error(`Task ${taskId} has no result stored`);
+ }
+ return stored.result;
+ }
+ async updateTaskStatus(taskId, status, statusMessage, _sessionId) {
+ const stored = this.tasks.get(taskId);
+ if (!stored) {
+ throw new Error(`Task with ID ${taskId} not found`);
+ }
+ // Don't allow transitions from terminal states
+ if ((0, interfaces_js_1.isTerminal)(stored.task.status)) {
+ throw new Error(`Cannot update task ${taskId} from terminal status '${stored.task.status}' to '${status}'. Terminal states (completed, failed, cancelled) cannot transition to other states.`);
+ }
+ stored.task.status = status;
+ if (statusMessage) {
+ stored.task.statusMessage = statusMessage;
+ }
+ stored.task.lastUpdatedAt = new Date().toISOString();
+ // If task is in a terminal state and has ttl, start cleanup timer
+ if ((0, interfaces_js_1.isTerminal)(status) && stored.task.ttl) {
+ const existingTimer = this.cleanupTimers.get(taskId);
+ if (existingTimer) {
+ clearTimeout(existingTimer);
+ }
+ const timer = setTimeout(() => {
+ this.tasks.delete(taskId);
+ this.cleanupTimers.delete(taskId);
+ }, stored.task.ttl);
+ this.cleanupTimers.set(taskId, timer);
+ }
+ }
+ async listTasks(cursor, _sessionId) {
+ const PAGE_SIZE = 10;
+ const allTaskIds = Array.from(this.tasks.keys());
+ let startIndex = 0;
+ if (cursor) {
+ const cursorIndex = allTaskIds.indexOf(cursor);
+ if (cursorIndex >= 0) {
+ startIndex = cursorIndex + 1;
+ }
+ else {
+ // Invalid cursor - throw error
+ throw new Error(`Invalid cursor: ${cursor}`);
+ }
+ }
+ const pageTaskIds = allTaskIds.slice(startIndex, startIndex + PAGE_SIZE);
+ const tasks = pageTaskIds.map(taskId => {
+ const stored = this.tasks.get(taskId);
+ return { ...stored.task };
+ });
+ const nextCursor = startIndex + PAGE_SIZE < allTaskIds.length ? pageTaskIds[pageTaskIds.length - 1] : undefined;
+ return { tasks, nextCursor };
+ }
+ /**
+ * Cleanup all timers (useful for testing or graceful shutdown)
+ */
+ cleanup() {
+ for (const timer of this.cleanupTimers.values()) {
+ clearTimeout(timer);
+ }
+ this.cleanupTimers.clear();
+ this.tasks.clear();
+ }
+ /**
+ * Get all tasks (useful for debugging)
+ */
+ getAllTasks() {
+ return Array.from(this.tasks.values()).map(stored => ({ ...stored.task }));
+ }
+}
+exports.InMemoryTaskStore = InMemoryTaskStore;
+/**
+ * A simple in-memory implementation of TaskMessageQueue for demonstration purposes.
+ *
+ * This implementation stores messages in memory, organized by task ID and optional session ID.
+ * Messages are stored in FIFO queues per task.
+ *
+ * Note: This is not suitable for production use in distributed systems.
+ * For production, consider implementing TaskMessageQueue with Redis or other distributed queues.
+ *
+ * @experimental
+ */
+class InMemoryTaskMessageQueue {
+ constructor() {
+ this.queues = new Map();
+ }
+ /**
+ * Generates a queue key from taskId.
+ * SessionId is intentionally ignored because taskIds are globally unique
+ * and tasks need to be accessible across HTTP requests/sessions.
+ */
+ getQueueKey(taskId, _sessionId) {
+ return taskId;
+ }
+ /**
+ * Gets or creates a queue for the given task and session.
+ */
+ getQueue(taskId, sessionId) {
+ const key = this.getQueueKey(taskId, sessionId);
+ let queue = this.queues.get(key);
+ if (!queue) {
+ queue = [];
+ this.queues.set(key, queue);
+ }
+ return queue;
+ }
+ /**
+ * Adds a message to the end of the queue for a specific task.
+ * Atomically checks queue size and throws if maxSize would be exceeded.
+ * @param taskId The task identifier
+ * @param message The message to enqueue
+ * @param sessionId Optional session ID for binding the operation to a specific session
+ * @param maxSize Optional maximum queue size - if specified and queue is full, throws an error
+ * @throws Error if maxSize is specified and would be exceeded
+ */
+ async enqueue(taskId, message, sessionId, maxSize) {
+ const queue = this.getQueue(taskId, sessionId);
+ // Atomically check size and enqueue
+ if (maxSize !== undefined && queue.length >= maxSize) {
+ throw new Error(`Task message queue overflow: queue size (${queue.length}) exceeds maximum (${maxSize})`);
+ }
+ queue.push(message);
+ }
+ /**
+ * Removes and returns the first message from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns The first message, or undefined if the queue is empty
+ */
+ async dequeue(taskId, sessionId) {
+ const queue = this.getQueue(taskId, sessionId);
+ return queue.shift();
+ }
+ /**
+ * Removes and returns all messages from the queue for a specific task.
+ * @param taskId The task identifier
+ * @param sessionId Optional session ID for binding the query to a specific session
+ * @returns Array of all messages that were in the queue
+ */
+ async dequeueAll(taskId, sessionId) {
+ const key = this.getQueueKey(taskId, sessionId);
+ const queue = this.queues.get(key) ?? [];
+ this.queues.delete(key);
+ return queue;
+ }
+}
+exports.InMemoryTaskMessageQueue = InMemoryTaskMessageQueue;
+//# sourceMappingURL=in-memory.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map
new file mode 100644
index 0000000..a4d21a9
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"in-memory.js","sourceRoot":"","sources":["../../../../../src/experimental/tasks/stores/in-memory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,oDAA6G;AAC7G,6CAA0C;AAS1C;;;;;;;;;;GAUG;AACH,MAAa,iBAAiB;IAA9B;QACY,UAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;QACtC,kBAAa,GAAG,IAAI,GAAG,EAAyC,CAAC;IAsL7E,CAAC;IApLG;;;OAGG;IACK,cAAc;QAClB,OAAO,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,UAA6B,EAAE,SAAoB,EAAE,OAAgB,EAAE,UAAmB;QACvG,4BAA4B;QAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAErC,oBAAoB;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC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C;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,OAAsB,EAAE,SAAkB,EAAE,OAAgB;QACtF,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAE/C,oCAAoC;QACpC,IAAI,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,IAAI,OAAO,EAAE,CAAC;YACnD,MAAM,IAAI,KAAK,CAAC,4CAA4C,KAAK,CAAC,MAAM,sBAAsB,OAAO,GAAG,CAAC,CAAC;QAC9G,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,SAAkB;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC/C,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,SAAkB;QAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAChD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AApED,4DAoEC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts
new file mode 100644
index 0000000..6022e19
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Re-exports of task-related types from the MCP protocol spec.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * These types are defined in types.ts (matching the protocol spec) and
+ * re-exported here for convenience when working with experimental task features.
+ */
+export { TaskCreationParamsSchema, RelatedTaskMetadataSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema } from '../../types.js';
+export type { Task, TaskCreationParams, RelatedTaskMetadata, CreateTaskResult, TaskStatusNotificationParams, TaskStatusNotification, GetTaskRequest, GetTaskResult, GetTaskPayloadRequest, ListTasksRequest, ListTasksResult, CancelTaskRequest, CancelTaskResult } from '../../types.js';
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts.map
new file mode 100644
index 0000000..f7b9ead
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACH,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,kCAAkC,EAClC,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC9B,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACR,IAAI,EACJ,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EACnB,MAAM,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js
new file mode 100644
index 0000000..b051c84
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js
@@ -0,0 +1,28 @@
+"use strict";
+/**
+ * Re-exports of task-related types from the MCP protocol spec.
+ * WARNING: These APIs are experimental and may change without notice.
+ *
+ * These types are defined in types.ts (matching the protocol spec) and
+ * re-exported here for convenience when working with experimental task features.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ServerTasksCapabilitySchema = exports.ClientTasksCapabilitySchema = exports.CancelTaskResultSchema = exports.CancelTaskRequestSchema = exports.ListTasksResultSchema = exports.ListTasksRequestSchema = exports.GetTaskPayloadRequestSchema = exports.GetTaskResultSchema = exports.GetTaskRequestSchema = exports.TaskStatusNotificationSchema = exports.TaskStatusNotificationParamsSchema = exports.CreateTaskResultSchema = exports.TaskSchema = exports.RelatedTaskMetadataSchema = exports.TaskCreationParamsSchema = void 0;
+// Task schemas (Zod)
+var types_js_1 = require("../../types.js");
+Object.defineProperty(exports, "TaskCreationParamsSchema", { enumerable: true, get: function () { return types_js_1.TaskCreationParamsSchema; } });
+Object.defineProperty(exports, "RelatedTaskMetadataSchema", { enumerable: true, get: function () { return types_js_1.RelatedTaskMetadataSchema; } });
+Object.defineProperty(exports, "TaskSchema", { enumerable: true, get: function () { return types_js_1.TaskSchema; } });
+Object.defineProperty(exports, "CreateTaskResultSchema", { enumerable: true, get: function () { return types_js_1.CreateTaskResultSchema; } });
+Object.defineProperty(exports, "TaskStatusNotificationParamsSchema", { enumerable: true, get: function () { return types_js_1.TaskStatusNotificationParamsSchema; } });
+Object.defineProperty(exports, "TaskStatusNotificationSchema", { enumerable: true, get: function () { return types_js_1.TaskStatusNotificationSchema; } });
+Object.defineProperty(exports, "GetTaskRequestSchema", { enumerable: true, get: function () { return types_js_1.GetTaskRequestSchema; } });
+Object.defineProperty(exports, "GetTaskResultSchema", { enumerable: true, get: function () { return types_js_1.GetTaskResultSchema; } });
+Object.defineProperty(exports, "GetTaskPayloadRequestSchema", { enumerable: true, get: function () { return types_js_1.GetTaskPayloadRequestSchema; } });
+Object.defineProperty(exports, "ListTasksRequestSchema", { enumerable: true, get: function () { return types_js_1.ListTasksRequestSchema; } });
+Object.defineProperty(exports, "ListTasksResultSchema", { enumerable: true, get: function () { return types_js_1.ListTasksResultSchema; } });
+Object.defineProperty(exports, "CancelTaskRequestSchema", { enumerable: true, get: function () { return types_js_1.CancelTaskRequestSchema; } });
+Object.defineProperty(exports, "CancelTaskResultSchema", { enumerable: true, get: function () { return types_js_1.CancelTaskResultSchema; } });
+Object.defineProperty(exports, "ClientTasksCapabilitySchema", { enumerable: true, get: function () { return types_js_1.ClientTasksCapabilitySchema; } });
+Object.defineProperty(exports, "ServerTasksCapabilitySchema", { enumerable: true, get: function () { return types_js_1.ServerTasksCapabilitySchema; } });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js.map
new file mode 100644
index 0000000..adfc3ab
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/experimental/tasks/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,qBAAqB;AACrB,2CAgBwB;AAfpB,oHAAA,wBAAwB,OAAA;AACxB,qHAAA,yBAAyB,OAAA;AACzB,sGAAA,UAAU,OAAA;AACV,kHAAA,sBAAsB,OAAA;AACtB,8HAAA,kCAAkC,OAAA;AAClC,wHAAA,4BAA4B,OAAA;AAC5B,gHAAA,oBAAoB,OAAA;AACpB,+GAAA,mBAAmB,OAAA;AACnB,uHAAA,2BAA2B,OAAA;AAC3B,kHAAA,sBAAsB,OAAA;AACtB,iHAAA,qBAAqB,OAAA;AACrB,mHAAA,uBAAuB,OAAA;AACvB,kHAAA,sBAAsB,OAAA;AACtB,uHAAA,2BAA2B,OAAA;AAC3B,uHAAA,2BAA2B,OAAA"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts
new file mode 100644
index 0000000..32a931a
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts
@@ -0,0 +1,31 @@
+import { Transport } from './shared/transport.js';
+import { JSONRPCMessage, RequestId } from './types.js';
+import { AuthInfo } from './server/auth/types.js';
+/**
+ * In-memory transport for creating clients and servers that talk to each other within the same process.
+ */
+export declare class InMemoryTransport implements Transport {
+ private _otherTransport?;
+ private _messageQueue;
+ onclose?: () => void;
+ onerror?: (error: Error) => void;
+ onmessage?: (message: JSONRPCMessage, extra?: {
+ authInfo?: AuthInfo;
+ }) => void;
+ sessionId?: string;
+ /**
+ * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
+ */
+ static createLinkedPair(): [InMemoryTransport, InMemoryTransport];
+ start(): Promise;
+ close(): Promise;
+ /**
+ * Sends a message with optional auth info.
+ * This is useful for testing authentication scenarios.
+ */
+ send(message: JSONRPCMessage, options?: {
+ relatedRequestId?: RequestId;
+ authInfo?: AuthInfo;
+ }): Promise;
+}
+//# sourceMappingURL=inMemory.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map
new file mode 100644
index 0000000..46bc74b
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemory.d.ts","sourceRoot":"","sources":["../../src/inMemory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAOlD;;GAEG;AACH,qBAAa,iBAAkB,YAAW,SAAS;IAC/C,OAAO,CAAC,eAAe,CAAC,CAAoB;IAC5C,OAAO,CAAC,aAAa,CAAuB;IAE5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAQ3D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B;;;OAGG;IACG,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAWtH"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js
new file mode 100644
index 0000000..9c6cb0e
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js
@@ -0,0 +1,51 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InMemoryTransport = void 0;
+/**
+ * In-memory transport for creating clients and servers that talk to each other within the same process.
+ */
+class InMemoryTransport {
+ constructor() {
+ this._messageQueue = [];
+ }
+ /**
+ * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
+ */
+ static createLinkedPair() {
+ const clientTransport = new InMemoryTransport();
+ const serverTransport = new InMemoryTransport();
+ clientTransport._otherTransport = serverTransport;
+ serverTransport._otherTransport = clientTransport;
+ return [clientTransport, serverTransport];
+ }
+ async start() {
+ // Process any messages that were queued before start was called
+ while (this._messageQueue.length > 0) {
+ const queuedMessage = this._messageQueue.shift();
+ this.onmessage?.(queuedMessage.message, queuedMessage.extra);
+ }
+ }
+ async close() {
+ const other = this._otherTransport;
+ this._otherTransport = undefined;
+ await other?.close();
+ this.onclose?.();
+ }
+ /**
+ * Sends a message with optional auth info.
+ * This is useful for testing authentication scenarios.
+ */
+ async send(message, options) {
+ if (!this._otherTransport) {
+ throw new Error('Not connected');
+ }
+ if (this._otherTransport.onmessage) {
+ this._otherTransport.onmessage(message, { authInfo: options?.authInfo });
+ }
+ else {
+ this._otherTransport._messageQueue.push({ message, extra: { authInfo: options?.authInfo } });
+ }
+ }
+}
+exports.InMemoryTransport = InMemoryTransport;
+//# sourceMappingURL=inMemory.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map
new file mode 100644
index 0000000..a45f3a8
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"inMemory.js","sourceRoot":"","sources":["../../src/inMemory.ts"],"names":[],"mappings":";;;AASA;;GAEG;AACH,MAAa,iBAAiB;IAA9B;QAEY,kBAAa,GAAoB,EAAE,CAAC;IAgDhD,CAAC;IAzCG;;OAEG;IACH,MAAM,CAAC,gBAAgB;QACnB,MAAM,eAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAChD,MAAM,eAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAChD,eAAe,CAAC,eAAe,GAAG,eAAe,CAAC;QAClD,eAAe,CAAC,eAAe,GAAG,eAAe,CAAC;QAClD,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,KAAK;QACP,gEAAgE;QAChE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAG,CAAC;YAClD,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,MAAM,KAAK,EAAE,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAC,OAAuB,EAAE,OAA+D;QAC/F,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7E,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QACjG,CAAC;IACL,CAAC;CACJ;AAlDD,8CAkDC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json
new file mode 100644
index 0000000..b731bd6
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json
@@ -0,0 +1 @@
+{"type": "commonjs"}
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts
new file mode 100644
index 0000000..be6899a
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts
@@ -0,0 +1,19 @@
+import { OAuthClientInformationFull } from '../../shared/auth.js';
+/**
+ * Stores information about registered OAuth clients for this server.
+ */
+export interface OAuthRegisteredClientsStore {
+ /**
+ * Returns information about a registered client, based on its ID.
+ */
+ getClient(clientId: string): OAuthClientInformationFull | undefined | Promise;
+ /**
+ * Registers a new client with the server. The client ID and secret will be automatically generated by the library. A modified version of the client information can be returned to reflect specific values enforced by the server.
+ *
+ * NOTE: Implementations should NOT delete expired client secrets in-place. Auth middleware provided by this library will automatically check the `client_secret_expires_at` field and reject requests with expired secrets. Any custom logic for authenticating clients should check the `client_secret_expires_at` field as well.
+ *
+ * If unimplemented, dynamic client registration is unsupported.
+ */
+ registerClient?(client: Omit): OAuthClientInformationFull | Promise;
+}
+//# sourceMappingURL=clients.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map
new file mode 100644
index 0000000..ab3851d
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/clients.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAAC;IAEtH;;;;;;OAMG;IACH,cAAc,CAAC,CACX,MAAM,EAAE,IAAI,CAAC,0BAA0B,EAAE,WAAW,GAAG,qBAAqB,CAAC,GAC9E,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACvE"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js
new file mode 100644
index 0000000..866b88b
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=clients.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map
new file mode 100644
index 0000000..0210104
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../../../src/server/auth/clients.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts
new file mode 100644
index 0000000..7fddf95
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts
@@ -0,0 +1,148 @@
+import { OAuthErrorResponse } from '../../shared/auth.js';
+/**
+ * Base class for all OAuth errors
+ */
+export declare class OAuthError extends Error {
+ readonly errorUri?: string | undefined;
+ static errorCode: string;
+ constructor(message: string, errorUri?: string | undefined);
+ /**
+ * Converts the error to a standard OAuth error response object
+ */
+ toResponseObject(): OAuthErrorResponse;
+ get errorCode(): string;
+}
+/**
+ * Invalid request error - The request is missing a required parameter,
+ * includes an invalid parameter value, includes a parameter more than once,
+ * or is otherwise malformed.
+ */
+export declare class InvalidRequestError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid client error - Client authentication failed (e.g., unknown client, no client
+ * authentication included, or unsupported authentication method).
+ */
+export declare class InvalidClientError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid grant error - The provided authorization grant or refresh token is
+ * invalid, expired, revoked, does not match the redirection URI used in the
+ * authorization request, or was issued to another client.
+ */
+export declare class InvalidGrantError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unauthorized client error - The authenticated client is not authorized to use
+ * this authorization grant type.
+ */
+export declare class UnauthorizedClientError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unsupported grant type error - The authorization grant type is not supported
+ * by the authorization server.
+ */
+export declare class UnsupportedGrantTypeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid scope error - The requested scope is invalid, unknown, malformed, or
+ * exceeds the scope granted by the resource owner.
+ */
+export declare class InvalidScopeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Access denied error - The resource owner or authorization server denied the request.
+ */
+export declare class AccessDeniedError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Server error - The authorization server encountered an unexpected condition
+ * that prevented it from fulfilling the request.
+ */
+export declare class ServerError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Temporarily unavailable error - The authorization server is currently unable to
+ * handle the request due to a temporary overloading or maintenance of the server.
+ */
+export declare class TemporarilyUnavailableError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unsupported response type error - The authorization server does not support
+ * obtaining an authorization code using this method.
+ */
+export declare class UnsupportedResponseTypeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Unsupported token type error - The authorization server does not support
+ * the requested token type.
+ */
+export declare class UnsupportedTokenTypeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid token error - The access token provided is expired, revoked, malformed,
+ * or invalid for other reasons.
+ */
+export declare class InvalidTokenError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Method not allowed error - The HTTP method used is not allowed for this endpoint.
+ * (Custom, non-standard error)
+ */
+export declare class MethodNotAllowedError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Too many requests error - Rate limit exceeded.
+ * (Custom, non-standard error based on RFC 6585)
+ */
+export declare class TooManyRequestsError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid client metadata error - The client metadata is invalid.
+ * (Custom error for dynamic client registration - RFC 7591)
+ */
+export declare class InvalidClientMetadataError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Insufficient scope error - The request requires higher privileges than provided by the access token.
+ */
+export declare class InsufficientScopeError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * Invalid target error - The requested resource is invalid, missing, unknown, or malformed.
+ * (Custom error for resource indicators - RFC 8707)
+ */
+export declare class InvalidTargetError extends OAuthError {
+ static errorCode: string;
+}
+/**
+ * A utility class for defining one-off error codes
+ */
+export declare class CustomOAuthError extends OAuthError {
+ private readonly customErrorCode;
+ constructor(customErrorCode: string, message: string, errorUri?: string);
+ get errorCode(): string;
+}
+/**
+ * A full list of all OAuthErrors, enabling parsing from error responses
+ */
+export declare const OAUTH_ERRORS: {
+ readonly [x: string]: typeof InvalidRequestError;
+};
+//# sourceMappingURL=errors.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map
new file mode 100644
index 0000000..5c0e992
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAKb,QAAQ,CAAC,EAAE,MAAM;IAJrC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC;gBAGrB,OAAO,EAAE,MAAM,EACC,QAAQ,CAAC,EAAE,MAAM,YAAA;IAMrC;;OAEG;IACH,gBAAgB,IAAI,kBAAkB;IAatC,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;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,UAAU;IACtD,MAAM,CAAC,SAAS,SAA6B;CAChD;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;IAClD,MAAM,CAAC,SAAS,SAAwB;CAC3C;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IAC9C,MAAM,CAAC,SAAS,SAAoB;CACvC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAExC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,MAAM,EACxC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM;IAKrB,IAAI,SAAS,IAAI,MAAM,CAEtB;CACJ;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;CAkBf,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js
new file mode 100644
index 0000000..e67478c
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js
@@ -0,0 +1,202 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAUTH_ERRORS = exports.CustomOAuthError = exports.InvalidTargetError = exports.InsufficientScopeError = exports.InvalidClientMetadataError = exports.TooManyRequestsError = exports.MethodNotAllowedError = exports.InvalidTokenError = exports.UnsupportedTokenTypeError = exports.UnsupportedResponseTypeError = exports.TemporarilyUnavailableError = exports.ServerError = exports.AccessDeniedError = exports.InvalidScopeError = exports.UnsupportedGrantTypeError = exports.UnauthorizedClientError = exports.InvalidGrantError = exports.InvalidClientError = exports.InvalidRequestError = exports.OAuthError = void 0;
+/**
+ * Base class for all OAuth errors
+ */
+class OAuthError extends Error {
+ constructor(message, errorUri) {
+ super(message);
+ this.errorUri = errorUri;
+ this.name = this.constructor.name;
+ }
+ /**
+ * Converts the error to a standard OAuth error response object
+ */
+ toResponseObject() {
+ const response = {
+ error: this.errorCode,
+ error_description: this.message
+ };
+ if (this.errorUri) {
+ response.error_uri = this.errorUri;
+ }
+ return response;
+ }
+ get errorCode() {
+ return this.constructor.errorCode;
+ }
+}
+exports.OAuthError = OAuthError;
+/**
+ * Invalid request error - The request is missing a required parameter,
+ * includes an invalid parameter value, includes a parameter more than once,
+ * or is otherwise malformed.
+ */
+class InvalidRequestError extends OAuthError {
+}
+exports.InvalidRequestError = InvalidRequestError;
+InvalidRequestError.errorCode = 'invalid_request';
+/**
+ * Invalid client error - Client authentication failed (e.g., unknown client, no client
+ * authentication included, or unsupported authentication method).
+ */
+class InvalidClientError extends OAuthError {
+}
+exports.InvalidClientError = InvalidClientError;
+InvalidClientError.errorCode = 'invalid_client';
+/**
+ * Invalid grant error - The provided authorization grant or refresh token is
+ * invalid, expired, revoked, does not match the redirection URI used in the
+ * authorization request, or was issued to another client.
+ */
+class InvalidGrantError extends OAuthError {
+}
+exports.InvalidGrantError = InvalidGrantError;
+InvalidGrantError.errorCode = 'invalid_grant';
+/**
+ * Unauthorized client error - The authenticated client is not authorized to use
+ * this authorization grant type.
+ */
+class UnauthorizedClientError extends OAuthError {
+}
+exports.UnauthorizedClientError = UnauthorizedClientError;
+UnauthorizedClientError.errorCode = 'unauthorized_client';
+/**
+ * Unsupported grant type error - The authorization grant type is not supported
+ * by the authorization server.
+ */
+class UnsupportedGrantTypeError extends OAuthError {
+}
+exports.UnsupportedGrantTypeError = UnsupportedGrantTypeError;
+UnsupportedGrantTypeError.errorCode = 'unsupported_grant_type';
+/**
+ * Invalid scope error - The requested scope is invalid, unknown, malformed, or
+ * exceeds the scope granted by the resource owner.
+ */
+class InvalidScopeError extends OAuthError {
+}
+exports.InvalidScopeError = InvalidScopeError;
+InvalidScopeError.errorCode = 'invalid_scope';
+/**
+ * Access denied error - The resource owner or authorization server denied the request.
+ */
+class AccessDeniedError extends OAuthError {
+}
+exports.AccessDeniedError = AccessDeniedError;
+AccessDeniedError.errorCode = 'access_denied';
+/**
+ * Server error - The authorization server encountered an unexpected condition
+ * that prevented it from fulfilling the request.
+ */
+class ServerError extends OAuthError {
+}
+exports.ServerError = ServerError;
+ServerError.errorCode = 'server_error';
+/**
+ * Temporarily unavailable error - The authorization server is currently unable to
+ * handle the request due to a temporary overloading or maintenance of the server.
+ */
+class TemporarilyUnavailableError extends OAuthError {
+}
+exports.TemporarilyUnavailableError = TemporarilyUnavailableError;
+TemporarilyUnavailableError.errorCode = 'temporarily_unavailable';
+/**
+ * Unsupported response type error - The authorization server does not support
+ * obtaining an authorization code using this method.
+ */
+class UnsupportedResponseTypeError extends OAuthError {
+}
+exports.UnsupportedResponseTypeError = UnsupportedResponseTypeError;
+UnsupportedResponseTypeError.errorCode = 'unsupported_response_type';
+/**
+ * Unsupported token type error - The authorization server does not support
+ * the requested token type.
+ */
+class UnsupportedTokenTypeError extends OAuthError {
+}
+exports.UnsupportedTokenTypeError = UnsupportedTokenTypeError;
+UnsupportedTokenTypeError.errorCode = 'unsupported_token_type';
+/**
+ * Invalid token error - The access token provided is expired, revoked, malformed,
+ * or invalid for other reasons.
+ */
+class InvalidTokenError extends OAuthError {
+}
+exports.InvalidTokenError = InvalidTokenError;
+InvalidTokenError.errorCode = 'invalid_token';
+/**
+ * Method not allowed error - The HTTP method used is not allowed for this endpoint.
+ * (Custom, non-standard error)
+ */
+class MethodNotAllowedError extends OAuthError {
+}
+exports.MethodNotAllowedError = MethodNotAllowedError;
+MethodNotAllowedError.errorCode = 'method_not_allowed';
+/**
+ * Too many requests error - Rate limit exceeded.
+ * (Custom, non-standard error based on RFC 6585)
+ */
+class TooManyRequestsError extends OAuthError {
+}
+exports.TooManyRequestsError = TooManyRequestsError;
+TooManyRequestsError.errorCode = 'too_many_requests';
+/**
+ * Invalid client metadata error - The client metadata is invalid.
+ * (Custom error for dynamic client registration - RFC 7591)
+ */
+class InvalidClientMetadataError extends OAuthError {
+}
+exports.InvalidClientMetadataError = InvalidClientMetadataError;
+InvalidClientMetadataError.errorCode = 'invalid_client_metadata';
+/**
+ * Insufficient scope error - The request requires higher privileges than provided by the access token.
+ */
+class InsufficientScopeError extends OAuthError {
+}
+exports.InsufficientScopeError = InsufficientScopeError;
+InsufficientScopeError.errorCode = 'insufficient_scope';
+/**
+ * Invalid target error - The requested resource is invalid, missing, unknown, or malformed.
+ * (Custom error for resource indicators - RFC 8707)
+ */
+class InvalidTargetError extends OAuthError {
+}
+exports.InvalidTargetError = InvalidTargetError;
+InvalidTargetError.errorCode = 'invalid_target';
+/**
+ * A utility class for defining one-off error codes
+ */
+class CustomOAuthError extends OAuthError {
+ constructor(customErrorCode, message, errorUri) {
+ super(message, errorUri);
+ this.customErrorCode = customErrorCode;
+ }
+ get errorCode() {
+ return this.customErrorCode;
+ }
+}
+exports.CustomOAuthError = CustomOAuthError;
+/**
+ * A full list of all OAuthErrors, enabling parsing from error responses
+ */
+exports.OAUTH_ERRORS = {
+ [InvalidRequestError.errorCode]: InvalidRequestError,
+ [InvalidClientError.errorCode]: InvalidClientError,
+ [InvalidGrantError.errorCode]: InvalidGrantError,
+ [UnauthorizedClientError.errorCode]: UnauthorizedClientError,
+ [UnsupportedGrantTypeError.errorCode]: UnsupportedGrantTypeError,
+ [InvalidScopeError.errorCode]: InvalidScopeError,
+ [AccessDeniedError.errorCode]: AccessDeniedError,
+ [ServerError.errorCode]: ServerError,
+ [TemporarilyUnavailableError.errorCode]: TemporarilyUnavailableError,
+ [UnsupportedResponseTypeError.errorCode]: UnsupportedResponseTypeError,
+ [UnsupportedTokenTypeError.errorCode]: UnsupportedTokenTypeError,
+ [InvalidTokenError.errorCode]: InvalidTokenError,
+ [MethodNotAllowedError.errorCode]: MethodNotAllowedError,
+ [TooManyRequestsError.errorCode]: TooManyRequestsError,
+ [InvalidClientMetadataError.errorCode]: InvalidClientMetadataError,
+ [InsufficientScopeError.errorCode]: InsufficientScopeError,
+ [InvalidTargetError.errorCode]: InvalidTargetError
+};
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map
new file mode 100644
index 0000000..f802594
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/server/auth/errors.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IAGjC,YACI,OAAe,EACC,QAAiB;QAEjC,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,aAAQ,GAAR,QAAQ,CAAS;QAGjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACZ,MAAM,QAAQ,GAAuB;YACjC,KAAK,EAAE,IAAI,CAAC,SAAS;YACrB,iBAAiB,EAAE,IAAI,CAAC,OAAO;SAClC,CAAC;QAEF,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QACvC,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,IAAI,SAAS;QACT,OAAQ,IAAI,CAAC,WAAiC,CAAC,SAAS,CAAC;IAC7D,CAAC;CACJ;AA9BD,gCA8BC;AAED;;;;GAIG;AACH,MAAa,mBAAoB,SAAQ,UAAU;;AAAnD,kDAEC;AADU,6BAAS,GAAG,iBAAiB,CAAC;AAGzC;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,UAAU;;AAAlD,gDAEC;AADU,4BAAS,GAAG,gBAAgB,CAAC;AAGxC;;;;GAIG;AACH,MAAa,iBAAkB,SAAQ,UAA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E,0BAA0B;IAClE,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE,sBAAsB;IAC1D,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB;CAC5C,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts
new file mode 100644
index 0000000..38e9829
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts
@@ -0,0 +1,13 @@
+import { RequestHandler } from 'express';
+import { OAuthServerProvider } from '../provider.js';
+import { Options as RateLimitOptions } from 'express-rate-limit';
+export type AuthorizationHandlerOptions = {
+ provider: OAuthServerProvider;
+ /**
+ * Rate limiting configuration for the authorization endpoint.
+ * Set to false to disable rate limiting for this endpoint.
+ */
+ rateLimit?: Partial | false;
+};
+export declare function authorizationHandler({ provider, rateLimit: rateLimitConfig }: AuthorizationHandlerOptions): RequestHandler;
+//# sourceMappingURL=authorize.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts.map
new file mode 100644
index 0000000..b067988
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"authorize.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/authorize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAa,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI5E,MAAM,MAAM,2BAA2B,GAAG;IACtC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAqBF,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,2BAA2B,GAAG,cAAc,CAgH1H"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js
new file mode 100644
index 0000000..9022082
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js
@@ -0,0 +1,167 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.authorizationHandler = authorizationHandler;
+const z = __importStar(require("zod/v4"));
+const express_1 = __importDefault(require("express"));
+const express_rate_limit_1 = require("express-rate-limit");
+const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
+const errors_js_1 = require("../errors.js");
+// Parameters that must be validated in order to issue redirects.
+const ClientAuthorizationParamsSchema = z.object({
+ client_id: z.string(),
+ redirect_uri: z
+ .string()
+ .optional()
+ .refine(value => value === undefined || URL.canParse(value), { message: 'redirect_uri must be a valid URL' })
+});
+// Parameters that must be validated for a successful authorization request. Failure can be reported to the redirect URI.
+const RequestAuthorizationParamsSchema = z.object({
+ response_type: z.literal('code'),
+ code_challenge: z.string(),
+ code_challenge_method: z.literal('S256'),
+ scope: z.string().optional(),
+ state: z.string().optional(),
+ resource: z.string().url().optional()
+});
+function authorizationHandler({ provider, rateLimit: rateLimitConfig }) {
+ // Create a router to apply middleware
+ const router = express_1.default.Router();
+ router.use((0, allowedMethods_js_1.allowedMethods)(['GET', 'POST']));
+ router.use(express_1.default.urlencoded({ extended: false }));
+ // Apply rate limiting unless explicitly disabled
+ if (rateLimitConfig !== false) {
+ router.use((0, express_rate_limit_1.rateLimit)({
+ windowMs: 15 * 60 * 1000, // 15 minutes
+ max: 100, // 100 requests per windowMs
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: new errors_js_1.TooManyRequestsError('You have exceeded the rate limit for authorization requests').toResponseObject(),
+ ...rateLimitConfig
+ }));
+ }
+ router.all('/', async (req, res) => {
+ res.setHeader('Cache-Control', 'no-store');
+ // In the authorization flow, errors are split into two categories:
+ // 1. Pre-redirect errors (direct response with 400)
+ // 2. Post-redirect errors (redirect with error parameters)
+ // Phase 1: Validate client_id and redirect_uri. Any errors here must be direct responses.
+ let client_id, redirect_uri, client;
+ try {
+ const result = ClientAuthorizationParamsSchema.safeParse(req.method === 'POST' ? req.body : req.query);
+ if (!result.success) {
+ throw new errors_js_1.InvalidRequestError(result.error.message);
+ }
+ client_id = result.data.client_id;
+ redirect_uri = result.data.redirect_uri;
+ client = await provider.clientsStore.getClient(client_id);
+ if (!client) {
+ throw new errors_js_1.InvalidClientError('Invalid client_id');
+ }
+ if (redirect_uri !== undefined) {
+ if (!client.redirect_uris.includes(redirect_uri)) {
+ throw new errors_js_1.InvalidRequestError('Unregistered redirect_uri');
+ }
+ }
+ else if (client.redirect_uris.length === 1) {
+ redirect_uri = client.redirect_uris[0];
+ }
+ else {
+ throw new errors_js_1.InvalidRequestError('redirect_uri must be specified when client has multiple registered URIs');
+ }
+ }
+ catch (error) {
+ // Pre-redirect errors - return direct response
+ //
+ // These don't need to be JSON encoded, as they'll be displayed in a user
+ // agent, but OTOH they all represent exceptional situations (arguably,
+ // "programmer error"), so presenting a nice HTML page doesn't help the
+ // user anyway.
+ if (error instanceof errors_js_1.OAuthError) {
+ const status = error instanceof errors_js_1.ServerError ? 500 : 400;
+ res.status(status).json(error.toResponseObject());
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.status(500).json(serverError.toResponseObject());
+ }
+ return;
+ }
+ // Phase 2: Validate other parameters. Any errors here should go into redirect responses.
+ let state;
+ try {
+ // Parse and validate authorization parameters
+ const parseResult = RequestAuthorizationParamsSchema.safeParse(req.method === 'POST' ? req.body : req.query);
+ if (!parseResult.success) {
+ throw new errors_js_1.InvalidRequestError(parseResult.error.message);
+ }
+ const { scope, code_challenge, resource } = parseResult.data;
+ state = parseResult.data.state;
+ // Validate scopes
+ let requestedScopes = [];
+ if (scope !== undefined) {
+ requestedScopes = scope.split(' ');
+ }
+ // All validation passed, proceed with authorization
+ await provider.authorize(client, {
+ state,
+ scopes: requestedScopes,
+ redirectUri: redirect_uri,
+ codeChallenge: code_challenge,
+ resource: resource ? new URL(resource) : undefined
+ }, res);
+ }
+ catch (error) {
+ // Post-redirect errors - redirect with error parameters
+ if (error instanceof errors_js_1.OAuthError) {
+ res.redirect(302, createErrorRedirect(redirect_uri, error, state));
+ }
+ else {
+ const serverError = new errors_js_1.ServerError('Internal Server Error');
+ res.redirect(302, createErrorRedirect(redirect_uri, serverError, state));
+ }
+ }
+ });
+ return router;
+}
+/**
+ * Helper function to create redirect URL with error parameters
+ */
+function createErrorRedirect(redirectUri, error, state) {
+ const errorUrl = new URL(redirectUri);
+ errorUrl.searchParams.set('error', error.errorCode);
+ errorUrl.searchParams.set('error_description', error.message);
+ if (error.errorUri) {
+ errorUrl.searchParams.set('error_uri', error.errorUri);
+ }
+ if (state) {
+ errorUrl.searchParams.set('state', state);
+ }
+ return errorUrl.href;
+}
+//# sourceMappingURL=authorize.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js.map
new file mode 100644
index 0000000..28e8762
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"authorize.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/authorize.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,oDAgHC;AAnJD,0CAA4B;AAC5B,sDAA8B;AAE9B,2DAA4E;AAC5E,uEAAiE;AACjE,4CAAsH;AAWtH,iEAAiE;AACjE,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,kCAAkC,EAAE,CAAC;CACpH,CAAC,CAAC;AAEH,yHAAyH;AACz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I,KAAK,EAAE,CAAC;QACR,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC;AACzB,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts
new file mode 100644
index 0000000..4d03286
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts
@@ -0,0 +1,4 @@
+import { RequestHandler } from 'express';
+import { OAuthMetadata, OAuthProtectedResourceMetadata } from '../../../shared/auth.js';
+export declare function metadataHandler(metadata: OAuthMetadata | OAuthProtectedResourceMetadata): RequestHandler;
+//# sourceMappingURL=metadata.d.ts.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts.map
new file mode 100644
index 0000000..55e3a50
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/metadata.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAIxF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,8BAA8B,GAAG,cAAc,CAaxG"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js
new file mode 100644
index 0000000..4e00bc5
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js
@@ -0,0 +1,21 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.metadataHandler = metadataHandler;
+const express_1 = __importDefault(require("express"));
+const cors_1 = __importDefault(require("cors"));
+const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
+function metadataHandler(metadata) {
+ // Nested router so we can configure middleware and restrict HTTP method
+ const router = express_1.default.Router();
+ // Configure CORS to allow any origin, to make accessible to web-based MCP clients
+ router.use((0, cors_1.default)());
+ router.use((0, allowedMethods_js_1.allowedMethods)(['GET', 'OPTIONS']));
+ router.get('/', (req, res) => {
+ res.status(200).json(metadata);
+ });
+ return router;
+}
+//# sourceMappingURL=metadata.js.map
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js.map b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js.map
new file mode 100644
index 0000000..9679c9f
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/metadata.ts"],"names":[],"mappings":";;;;;AAKA,0CAaC;AAlBD,sDAAkD;AAElD,gDAAwB;AACxB,uEAAiE;AAEjE,SAAgB,eAAe,CAAC,QAAwD;IACpF,wEAAwE;IACxE,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;IAEhC,kFAAkF;IAClF,MAAM,CAAC,GAAG,CAAC,IAAA,cAAI,GAAE,CAAC,CAAC;IAEnB,MAAM,CAAC,GAAG,CAAC,IAAA,kCAAc,EAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACzB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts
new file mode 100644
index 0000000..e9add28
--- /dev/null
+++ b/projects/arabica/src/sprint2/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts
@@ -0,0 +1,29 @@
+import { RequestHandler } from 'express';
+import { OAuthRegisteredClientsStore } from '../clients.js';
+import { Options as RateLimitOptions } from 'express-rate-limit';
+export type ClientRegistrationHandlerOptions = {
+ /**
+ * A store used to save information about dynamically registered OAuth clients.
+ */
+ clientsStore: OAuthRegisteredClientsStore;
+ /**
+ * The number of seconds after which to expire issued client secrets, or 0 to prevent expiration of client secrets (not recommended).
+ *
+ * If not set, defaults to 30 days.
+ */
+ clientSecretExpirySeconds?: number;
+ /**
+ * Rate limiting configuration for the client registration endpoint.
+ * Set to false to disable rate limiting for this endpoint.
+ * Registration endpoints are particularly sensitive to abuse and should be rate limited.
+ */
+ rateLimit?: Partial