@frontmcp/testing 1.12.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/setup.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  var __frontmcpModule = typeof process !== "undefined" && typeof process.getBuiltinModule === "function" ? process.getBuiltinModule("module") : undefined;
2
2
  const require = __frontmcpModule ? __frontmcpModule.createRequire(import.meta.url || 'file:///') : undefined;
3
3
  // __frontmcpCreateRequire
4
- var __getOwnPropNames=Object.getOwnPropertyNames;var __esm=(fn,res,err)=>function __init(){if(err)throw err[0];try{return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res}catch(e){throw err=[e],e}};var __commonJS=(cb,mod)=>function __require(){try{return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports}catch(e){throw mod=0,e}};var REPLAYED_METHODS;var init_replay_diff=__esm({"libs/testing/src/replay/replay-diff.ts"(){"use strict";REPLAYED_METHODS=["tools/call","resources/read","prompts/get"]}});import{z}from"@frontmcp/lazy-zod";import{readFile}from"@frontmcp/utils";function preview(value){if(value===void 0)return"(none)";const json=JSON.stringify(value);return json.length>80?`${json.slice(0,77)}...`:json}function formatReplayReport({file,calls,differences}){if(differences.length===0)return`Replayed ${calls.length} calls from ${file}: every call answered as recorded`;const lines=[`Replayed ${calls.length} calls from ${file}: ${differences.length} differ`];for(const call of differences){lines.push(` line ${call.line} ${call.method} ${call.name}: ${OUTCOME_LABELS[call.outcome]}`);if(call.error){const{code,message}=call.error;lines.push(message===void 0?` ${code}`:` ${code}: ${message}`)}for(const change of call.changes){lines.push(` ${change.path}: ${preview(change.recorded)} -> ${preview(change.replayed)}`)}}return lines.join("\n")}var recordedCallSchema,OUTCOME_LABELS;var init_replay_session=__esm({"libs/testing/src/replay/replay-session.ts"(){"use strict";init_replay_diff();recordedCallSchema=z.object({v:z.literal(1,{message:"is not a recording version this replay reads"}),method:z.enum(REPLAYED_METHODS,{message:`must be one of ${REPLAYED_METHODS.join(", ")}`}),name:z.string(),input:z.record(z.string(),z.unknown()).optional(),answer:z.unknown().optional(),error:z.object({code:z.union([z.string(),z.number()]),message:z.string().optional()}).optional(),session:z.string().optional(),client:z.object({name:z.string(),version:z.string()}).optional()});OUTCOME_LABELS={same:"same",changed:"changed","new-error":"new error","gone-error":"gone error"}}});function getPlatformMimeType(platform){return"text/html;profile=mcp-app"}function getToolCallMetaPrefixes(platform){return["ui/"]}function getForbiddenMetaPrefixes(platform){return["openai/","frontmcp/"]}var init_platform_types=__esm({"libs/testing/src/platform/platform-types.ts"(){"use strict"}});function escapeRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function extractUiHtml(received){if(typeof received==="string"){return received}const wrapper=received;const meta=wrapper?.raw?._meta||wrapper?._meta;if(meta&&typeof meta==="object"){const uiHtml=meta["ui/html"];if(typeof uiHtml==="string"){return uiHtml}}return void 0}function extractMeta(received){const wrapper=received;const meta=wrapper?.raw?._meta||wrapper?._meta;if(meta&&typeof meta==="object"){return meta}return void 0}var toHaveRenderedHtml,toContainHtmlElement,toContainBoundValue,toBeXssSafe,toHaveWidgetMetadata,toHaveCssClass,toNotContainRawContent,toHaveProperHtmlStructure,toHavePlatformMeta,toHaveMetaKey,toHaveMetaValue,toNotHaveMetaKey,toHaveOnlyNamespacedMeta,toHavePlatformMimeType,toHavePlatformHtml,uiMatchers;var init_ui_matchers=__esm({"libs/testing/src/ui/ui-matchers.ts"(){"use strict";init_platform_types();toHaveRenderedHtml=function(received){const html=extractUiHtml(received);const hasHtml=html!==void 0&&html.length>0;const isFallback=hasHtml&&html.includes("mdx-fallback");const pass=hasHtml&&!isFallback;return{pass,message:()=>{if(isFallback){return"Expected rendered HTML but got mdx-fallback (raw escaped content). MDX rendering may have failed."}if(!hasHtml){return"Expected _meta to have ui/html property with rendered HTML"}return"Expected result not to have rendered HTML"}}};toContainHtmlElement=function(received,tag){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>`Expected to find <${tag}> element, but no HTML content found`}}const regex=new RegExp(`<${escapeRegex(tag)}[\\s>]`,"i");const pass=regex.test(html);return{pass,message:()=>pass?`Expected HTML not to contain <${tag}> element`:`Expected HTML to contain <${tag}> element`}};toContainBoundValue=function(received,value){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>`Expected HTML to contain bound value "${value}", but no HTML content found`}}const stringValue=String(value);const pass=html.includes(stringValue);return{pass,message:()=>pass?`Expected HTML not to contain bound value "${stringValue}"`:`Expected HTML to contain bound value "${stringValue}"`}};toBeXssSafe=function(received){const html=extractUiHtml(received);if(!html){return{pass:true,message:()=>"Expected HTML to be XSS unsafe (no HTML found)"}}const hasScript=/<script[\s>]/i.test(html);const hasOnHandler=/\son\w+\s*=/i.test(html);const hasJavascriptUri=/javascript:/i.test(html);const issues=[];if(hasScript)issues.push("<script> tag");if(hasOnHandler)issues.push("inline event handler (onclick, etc.)");if(hasJavascriptUri)issues.push("javascript: URI");const pass=!hasScript&&!hasOnHandler&&!hasJavascriptUri;return{pass,message:()=>pass?"Expected HTML not to be XSS safe":`Expected HTML to be XSS safe, but found: ${issues.join(", ")}`}};toHaveWidgetMetadata=function(received){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>"Expected _meta to have widget metadata, but no _meta found"}}const hasUiHtml=Boolean(meta["ui/html"]);const hasMimeType=Boolean(meta["ui/mimeType"]);const hasUiObject=Boolean(meta["ui"]&&typeof meta["ui"]==="object");const pass=hasUiHtml||hasMimeType||hasUiObject;return{pass,message:()=>pass?"Expected result not to have widget metadata":"Expected _meta to have widget metadata (ui/html, ui/mimeType, or ui object)"}};toHaveCssClass=function(received,className){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>`Expected HTML to have CSS class "${className}", but no HTML content found`}}const classRegex=new RegExp(`class(?:Name)?\\s*=\\s*["'][^"']*\\b${escapeRegex(className)}\\b[^"']*["']`,"i");const pass=classRegex.test(html);return{pass,message:()=>pass?`Expected HTML not to have CSS class "${className}"`:`Expected HTML to have CSS class "${className}"`}};toNotContainRawContent=function(received,content){const html=extractUiHtml(received);if(!html){return{pass:true,message:()=>`Expected HTML to contain raw content "${content}", but no HTML found`}}const pass=!html.includes(content);return{pass,message:()=>pass?`Expected HTML to contain raw content "${content}"`:`Expected HTML not to contain raw content "${content}" (may indicate rendering failure)`}};toHaveProperHtmlStructure=function(received){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>"Expected proper HTML structure, but no HTML content found"}}const hasEscapedTags=html.includes("&lt;")&&html.includes("&gt;");const hasHtmlTags=/<[a-z]/i.test(html);const pass=hasHtmlTags&&!hasEscapedTags;return{pass,message:()=>{if(hasEscapedTags){return"Expected proper HTML structure, but found escaped HTML entities - content may not have been rendered"}if(!hasHtmlTags){return"Expected proper HTML structure, but found no HTML tags"}return"Expected result not to have proper HTML structure"}}};toHavePlatformMeta=function(received,platform){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have platform meta for "${platform}", but no _meta found`}}const expectedPrefixes=getToolCallMetaPrefixes(platform);const forbiddenPrefixes=getForbiddenMetaPrefixes(platform);const metaKeys=Object.keys(meta);const hasExpectedPrefix=metaKeys.some(key=>expectedPrefixes.some(prefix=>key.startsWith(prefix)));const forbiddenKeys=metaKeys.filter(key=>forbiddenPrefixes.some(prefix=>key.startsWith(prefix)));const pass=hasExpectedPrefix&&forbiddenKeys.length===0;return{pass,message:()=>{if(!hasExpectedPrefix){return`Expected _meta to have keys with prefixes [${expectedPrefixes.join(", ")}] for platform "${platform}", but found: [${metaKeys.join(", ")}]`}if(forbiddenKeys.length>0){return`Expected _meta NOT to have keys [${forbiddenKeys.join(", ")}] for platform "${platform}" (forbidden prefixes: [${forbiddenPrefixes.join(", ")}])`}return`Expected result not to have platform meta for "${platform}"`}}};toHaveMetaKey=function(received,key){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have key "${key}", but no _meta found`}}const pass=key in meta;return{pass,message:()=>pass?`Expected _meta not to have key "${key}"`:`Expected _meta to have key "${key}"`}};toHaveMetaValue=function(received,key,value){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta["${key}"] to equal ${JSON.stringify(value)}, but no _meta found`}}const actualValue=meta[key];const pass=JSON.stringify(actualValue)===JSON.stringify(value);return{pass,message:()=>pass?`Expected _meta["${key}"] not to equal ${JSON.stringify(value)}`:`Expected _meta["${key}"] to equal ${JSON.stringify(value)}, but got ${JSON.stringify(actualValue)}`}};toNotHaveMetaKey=function(received,key){const meta=extractMeta(received);if(!meta){return{pass:true,message:()=>`Expected _meta to have key "${key}", but no _meta found`}}const pass=!(key in meta);return{pass,message:()=>pass?`Expected _meta to have key "${key}"`:`Expected _meta not to have key "${key}"`}};toHaveOnlyNamespacedMeta=function(received,namespace){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have keys with namespace "${namespace}", but no _meta found`}}const metaKeys=Object.keys(meta);const wrongKeys=metaKeys.filter(key=>!key.startsWith(namespace));const pass=wrongKeys.length===0&&metaKeys.length>0;return{pass,message:()=>{if(metaKeys.length===0){return`Expected _meta to have keys with namespace "${namespace}", but _meta is empty`}if(wrongKeys.length>0){return`Expected _meta to ONLY have keys with namespace "${namespace}", but found: [${wrongKeys.join(", ")}]`}return`Expected _meta not to have only keys with namespace "${namespace}"`}}};toHavePlatformMimeType=function(received,platform){const meta=extractMeta(received);const expectedMimeType=getPlatformMimeType(platform);if(!meta){return{pass:false,message:()=>`Expected _meta to have MIME type "${expectedMimeType}" for platform "${platform}", but no _meta found`}}const mimeTypeKey="ui/mimeType";const actualMimeType=meta[mimeTypeKey];const pass=actualMimeType===expectedMimeType;return{pass,message:()=>pass?`Expected _meta["${mimeTypeKey}"] not to be "${expectedMimeType}"`:`Expected _meta["${mimeTypeKey}"] to be "${expectedMimeType}" for platform "${platform}", but got "${actualMimeType}"`}};toHavePlatformHtml=function(received,platform){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have platform HTML for "${platform}", but no _meta found`}}const htmlKey="ui/html";const html=meta[htmlKey];const pass=typeof html==="string"&&html.length>0;return{pass,message:()=>pass?`Expected _meta not to have platform HTML in "${htmlKey}"`:`Expected _meta["${htmlKey}"] to contain HTML for platform "${platform}", but ${html===void 0?"key not found":`got ${typeof html}`}`}};uiMatchers={toHaveRenderedHtml,toContainHtmlElement,toContainBoundValue,toBeXssSafe,toHaveWidgetMetadata,toHaveCssClass,toNotContainRawContent,toHaveProperHtmlStructure,toHavePlatformMeta,toHaveMetaKey,toHaveMetaValue,toNotHaveMetaKey,toHaveOnlyNamespacedMeta,toHavePlatformMimeType,toHavePlatformHtml}}});import{hasTransform,z as z2}from"@frontmcp/lazy-zod";import{findDroppedKeys}from"@frontmcp/utils";function isReplayReport(value){const report=value;return typeof report?.file==="string"&&Array.isArray(report.calls)&&Array.isArray(report.differences)}var toContainTool,toBeSuccessful,toBeError,toHaveTextContent,toHaveImageContent,toHaveResourceContent,toPassOutputSchemaWhole,toContainResource,toContainResourceTemplate,toHaveMimeType,toContainPrompt,toHaveMessages,toBeValidJsonRpc,toHaveResult,toHaveError,toHaveErrorCode,toMatchRecording,mcpMatchers;var init_mcp_matchers=__esm({"libs/testing/src/matchers/mcp-matchers.ts"(){"use strict";init_replay_session();init_ui_matchers();toContainTool=function(received,toolName){const tools=received;if(!Array.isArray(tools)){return{pass:false,message:()=>`Expected an array of tools, but received ${typeof received}`}}const pass=tools.some(t=>t.name===toolName);const availableTools=tools.map(t=>t.name).join(", ");return{pass,message:()=>pass?`Expected tools not to contain "${toolName}"`:`Expected tools to contain "${toolName}", but got: [${availableTools}]`}};toBeSuccessful=function(received){const result=received;if(typeof result!=="object"||result===null||!("isSuccess"in result)){return{pass:false,message:()=>`Expected a result wrapper object with isSuccess property`}}const pass=result.isSuccess;return{pass,message:()=>pass?"Expected result not to be successful":`Expected result to be successful, but got error: ${result.error?.message??"unknown error"}`}};toBeError=function(received,expectedCode){const result=received;if(typeof result!=="object"||result===null||!("isError"in result)){return{pass:false,message:()=>`Expected a result wrapper object with isError property`}}const receivedCode=typeof expectedCode==="string"?result.raw?._meta?.["code"]:result.error?.code;const codeMatches=expectedCode===void 0||receivedCode===expectedCode;const pass=result.isError&&codeMatches;return{pass,message:()=>{if(!result.isError){return"Expected result to be an error, but it was successful"}if(!codeMatches){return`Expected error code ${expectedCode}, but got ${String(receivedCode)}`}return"Expected result not to be an error"}}};toHaveTextContent=function(received,expectedText){const result=received;if(typeof result!=="object"||result===null||!("text"in result)){return{pass:false,message:()=>`Expected a ToolResultWrapper or ResourceContentWrapper object with text method`}}const text=result.text();const hasText="hasTextContent"in result?result.hasTextContent():text!==void 0;let pass=hasText;if(pass&&expectedText!==void 0){pass=text?.includes(expectedText)??false}return{pass,message:()=>{if(!hasText){return"Expected result to have text content"}if(expectedText!==void 0&&!text?.includes(expectedText)){return`Expected text to contain "${expectedText}", but got: "${text}"`}return"Expected result not to have text content"}}};toHaveImageContent=function(received){const result=received;if(typeof result!=="object"||result===null||!("hasImageContent"in result)){return{pass:false,message:()=>`Expected a ToolResultWrapper object with hasImageContent method`}}const pass=result.hasImageContent();return{pass,message:()=>pass?"Expected result not to have image content":"Expected result to have image content"}};toHaveResourceContent=function(received){const result=received;if(typeof result!=="object"||result===null||!("hasResourceContent"in result)){return{pass:false,message:()=>`Expected a ToolResultWrapper object with hasResourceContent method`}}const pass=result.hasResourceContent();return{pass,message:()=>pass?"Expected result not to have resource content":"Expected result to have resource content"}};toPassOutputSchemaWhole=function(received,outputSchema){const schema=outputSchema instanceof z2.ZodType?outputSchema:z2.object(outputSchema);if(hasTransform(schema)){return{pass:false,message:()=>"toPassOutputSchemaWhole cannot compare keys through a transform (.transform(), z.preprocess(), .pipe()): assert on the parsed answer instead"}}const parsed=schema.safeParse(received);if(!parsed.success){const[firstIssue]=parsed.error.issues;const location=firstIssue?.path.length?` at ${firstIssue.path.join(".")}`:"";return{pass:false,message:()=>`Expected the answer to pass its output schema whole, but it does not match its output schema${location}: ${firstIssue?.message}`}}const droppedKeys=findDroppedKeys(received,parsed.data);const pass=droppedKeys.length===0;return{pass,message:()=>pass?"Expected the answer not to pass its output schema whole":`Expected the answer to pass its output schema whole, but parsing drops keys it does not declare: ${droppedKeys.join(", ")}`}};toContainResource=function(received,uri){const resources=received;if(!Array.isArray(resources)){return{pass:false,message:()=>`Expected an array of resources, but received ${typeof received}`}}const pass=resources.some(r=>r.uri===uri);const availableUris=resources.map(r=>r.uri).join(", ");return{pass,message:()=>pass?`Expected resources not to contain "${uri}"`:`Expected resources to contain "${uri}", but got: [${availableUris}]`}};toContainResourceTemplate=function(received,uriTemplate){const templates=received;if(!Array.isArray(templates)){return{pass:false,message:()=>`Expected an array of resource templates, but received ${typeof received}`}}const pass=templates.some(t=>t.uriTemplate===uriTemplate);const availableTemplates=templates.map(t=>t.uriTemplate).join(", ");return{pass,message:()=>pass?`Expected templates not to contain "${uriTemplate}"`:`Expected templates to contain "${uriTemplate}", but got: [${availableTemplates}]`}};toHaveMimeType=function(received,mimeType){const result=received;if(typeof result!=="object"||result===null||!("hasMimeType"in result)){return{pass:false,message:()=>`Expected a ResourceContentWrapper object with hasMimeType method`}}const pass=result.hasMimeType(mimeType);const actualMimeType=result.mimeType();return{pass,message:()=>pass?`Expected content not to have MIME type "${mimeType}"`:`Expected MIME type "${mimeType}", but got "${actualMimeType}"`}};toContainPrompt=function(received,name){const prompts=received;if(!Array.isArray(prompts)){return{pass:false,message:()=>`Expected an array of prompts, but received ${typeof received}`}}const pass=prompts.some(p=>p.name===name);const availablePrompts=prompts.map(p=>p.name).join(", ");return{pass,message:()=>pass?`Expected prompts not to contain "${name}"`:`Expected prompts to contain "${name}", but got: [${availablePrompts}]`}};toHaveMessages=function(received,count){const result=received;if(typeof result!=="object"||result===null||!("messages"in result)){return{pass:false,message:()=>`Expected a PromptResultWrapper object with messages property`}}const actualCount=result.messages?.length??0;const pass=actualCount===count;return{pass,message:()=>pass?`Expected prompt not to have ${count} messages`:`Expected prompt to have ${count} messages, but got ${actualCount}`}};toBeValidJsonRpc=function(received){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const hasJsonRpc=response["jsonrpc"]==="2.0";const hasId="id"in response;const hasResult="result"in response;const hasError="error"in response;const hasExactlyOneResultOrError=(hasResult||hasError)&&!(hasResult&&hasError);const pass=hasJsonRpc&&hasId&&hasExactlyOneResultOrError;return{pass,message:()=>{if(pass){return"Expected response not to be valid JSON-RPC"}const issues=[];if(!hasJsonRpc)issues.push('missing or invalid "jsonrpc": "2.0"');if(!hasId)issues.push('missing "id" field');if(!hasExactlyOneResultOrError){if(!hasResult&&!hasError)issues.push('missing "result" or "error"');else issues.push('cannot have both "result" and "error"')}return`Expected valid JSON-RPC 2.0 response: ${issues.join(", ")}`}}};toHaveResult=function(received){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const pass="result"in response;return{pass,message:()=>pass?"Expected response not to have result":"Expected response to have result"}};toHaveError=function(received){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const pass="error"in response;return{pass,message:()=>pass?"Expected response not to have error":"Expected response to have error"}};toHaveErrorCode=function(received,code){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const actualCode=response.error?.code;const pass=actualCode===code;return{pass,message:()=>pass?`Expected response not to have error code ${code}`:`Expected error code ${code}, but got ${actualCode??"no error"}`}};toMatchRecording=function(received){if(!isReplayReport(received)){return{pass:false,message:()=>"Expected the report replaySession() returns"}}const pass=received.differences.length===0;return{pass,message:()=>formatReplayReport(received)}};mcpMatchers={toContainTool,toBeSuccessful,toBeError,toHaveTextContent,toHaveImageContent,toHaveResourceContent,toPassOutputSchemaWhole,toContainResource,toContainResourceTemplate,toHaveMimeType,toContainPrompt,toHaveMessages,toBeValidJsonRpc,toHaveResult,toHaveError,toHaveErrorCode,toMatchRecording,...uiMatchers}}});import{expect}from"@jest/globals";var require_setup=__commonJS({"libs/testing/src/setup.ts"(){init_mcp_matchers();expect.extend(mcpMatchers)}});export default require_setup();
4
+ var __getOwnPropNames=Object.getOwnPropertyNames;var __esm=(fn,res,err)=>function __init(){if(err)throw err[0];try{return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res}catch(e){throw err=[e],e}};var __commonJS=(cb,mod)=>function __require(){try{return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports}catch(e){throw mod=0,e}};var REPLAYED_METHODS;var init_replay_diff=__esm({"libs/testing/src/replay/replay-diff.ts"(){"use strict";REPLAYED_METHODS=["tools/call","resources/read","prompts/get"]}});import{z}from"@frontmcp/lazy-zod";import{readFile}from"@frontmcp/utils";function preview(value){if(value===void 0)return"(none)";const json=JSON.stringify(value);return json.length>80?`${json.slice(0,77)}...`:json}function formatReplayReport({file,calls,differences}){if(differences.length===0)return`Replayed ${calls.length} calls from ${file}: every call answered as recorded`;const lines=[`Replayed ${calls.length} calls from ${file}: ${differences.length} differ`];for(const call of differences){lines.push(` line ${call.line} ${call.method} ${call.name}: ${OUTCOME_LABELS[call.outcome]}`);if(call.error){const{code,message}=call.error;lines.push(message===void 0?` ${code}`:` ${code}: ${message}`)}for(const change of call.changes){lines.push(` ${change.path}: ${preview(change.recorded)} -> ${preview(change.replayed)}`)}}return lines.join("\n")}var recordedCallSchema,OUTCOME_LABELS;var init_replay_session=__esm({"libs/testing/src/replay/replay-session.ts"(){"use strict";init_replay_diff();recordedCallSchema=z.object({v:z.literal(1,{message:"is not a recording version this replay reads"}),method:z.enum(REPLAYED_METHODS,{message:`must be one of ${REPLAYED_METHODS.join(", ")}`}),name:z.string(),input:z.record(z.string(),z.unknown()).optional(),answer:z.unknown().optional(),error:z.object({code:z.union([z.string(),z.number()]),message:z.string().optional()}).optional(),session:z.string().optional(),client:z.object({name:z.string(),version:z.string()}).optional()});OUTCOME_LABELS={same:"same",changed:"changed","new-error":"new error","gone-error":"gone error"}}});function getPlatformMimeType(platform){return"text/html;profile=mcp-app"}function getToolCallMetaPrefixes(platform){return["ui/"]}function getForbiddenMetaPrefixes(platform){return["openai/","frontmcp/"]}var init_platform_types=__esm({"libs/testing/src/platform/platform-types.ts"(){"use strict"}});function escapeRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hasCssClass(html,className){const classWord=new RegExp(`\\b${escapeRegex(className)}\\b`,"i");for(const attribute of html.matchAll(CLASS_ATTRIBUTE_PATTERN)){if(classWord.test(attribute[1]))return true}return false}var CLASS_ATTRIBUTE_PATTERN;var init_ui_assertions=__esm({"libs/testing/src/ui/ui-assertions.ts"(){"use strict";CLASS_ATTRIBUTE_PATTERN=/class(?:Name)?\s*=\s*["']([^"']*)["']/gi}});function escapeRegex2(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function extractUiHtml(received){if(typeof received==="string"){return received}const wrapper=received;const meta=wrapper?.raw?._meta||wrapper?._meta;if(meta&&typeof meta==="object"){const uiHtml=meta["ui/html"];if(typeof uiHtml==="string"){return uiHtml}}return void 0}function extractMeta(received){const wrapper=received;const meta=wrapper?.raw?._meta||wrapper?._meta;if(meta&&typeof meta==="object"){return meta}return void 0}var toHaveRenderedHtml,toContainHtmlElement,toContainBoundValue,toBeXssSafe,toHaveWidgetMetadata,toHaveCssClass,toNotContainRawContent,toHaveProperHtmlStructure,toHavePlatformMeta,toHaveMetaKey,toHaveMetaValue,toNotHaveMetaKey,toHaveOnlyNamespacedMeta,toHavePlatformMimeType,toHavePlatformHtml,uiMatchers;var init_ui_matchers=__esm({"libs/testing/src/ui/ui-matchers.ts"(){"use strict";init_platform_types();init_ui_assertions();toHaveRenderedHtml=function(received){const html=extractUiHtml(received);const hasHtml=html!==void 0&&html.length>0;const isFallback=hasHtml&&html.includes("mdx-fallback");const pass=hasHtml&&!isFallback;return{pass,message:()=>{if(isFallback){return"Expected rendered HTML but got mdx-fallback (raw escaped content). MDX rendering may have failed."}if(!hasHtml){return"Expected _meta to have ui/html property with rendered HTML"}return"Expected result not to have rendered HTML"}}};toContainHtmlElement=function(received,tag){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>`Expected to find <${tag}> element, but no HTML content found`}}const regex=new RegExp(`<${escapeRegex2(tag)}[\\s>]`,"i");const pass=regex.test(html);return{pass,message:()=>pass?`Expected HTML not to contain <${tag}> element`:`Expected HTML to contain <${tag}> element`}};toContainBoundValue=function(received,value){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>`Expected HTML to contain bound value "${value}", but no HTML content found`}}const stringValue=String(value);const pass=html.includes(stringValue);return{pass,message:()=>pass?`Expected HTML not to contain bound value "${stringValue}"`:`Expected HTML to contain bound value "${stringValue}"`}};toBeXssSafe=function(received){const html=extractUiHtml(received);if(!html){return{pass:true,message:()=>"Expected HTML to be XSS unsafe (no HTML found)"}}const hasScript=/<script[\s>]/i.test(html);const hasOnHandler=/\son\w+\s*=/i.test(html);const hasJavascriptUri=/javascript:/i.test(html);const issues=[];if(hasScript)issues.push("<script> tag");if(hasOnHandler)issues.push("inline event handler (onclick, etc.)");if(hasJavascriptUri)issues.push("javascript: URI");const pass=!hasScript&&!hasOnHandler&&!hasJavascriptUri;return{pass,message:()=>pass?"Expected HTML not to be XSS safe":`Expected HTML to be XSS safe, but found: ${issues.join(", ")}`}};toHaveWidgetMetadata=function(received){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>"Expected _meta to have widget metadata, but no _meta found"}}const hasUiHtml=Boolean(meta["ui/html"]);const hasMimeType=Boolean(meta["ui/mimeType"]);const hasUiObject=Boolean(meta["ui"]&&typeof meta["ui"]==="object");const pass=hasUiHtml||hasMimeType||hasUiObject;return{pass,message:()=>pass?"Expected result not to have widget metadata":"Expected _meta to have widget metadata (ui/html, ui/mimeType, or ui object)"}};toHaveCssClass=function(received,className){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>`Expected HTML to have CSS class "${className}", but no HTML content found`}}const pass=hasCssClass(html,className);return{pass,message:()=>pass?`Expected HTML not to have CSS class "${className}"`:`Expected HTML to have CSS class "${className}"`}};toNotContainRawContent=function(received,content){const html=extractUiHtml(received);if(!html){return{pass:true,message:()=>`Expected HTML to contain raw content "${content}", but no HTML found`}}const pass=!html.includes(content);return{pass,message:()=>pass?`Expected HTML to contain raw content "${content}"`:`Expected HTML not to contain raw content "${content}" (may indicate rendering failure)`}};toHaveProperHtmlStructure=function(received){const html=extractUiHtml(received);if(!html){return{pass:false,message:()=>"Expected proper HTML structure, but no HTML content found"}}const hasEscapedTags=html.includes("&lt;")&&html.includes("&gt;");const hasHtmlTags=/<[a-z]/i.test(html);const pass=hasHtmlTags&&!hasEscapedTags;return{pass,message:()=>{if(hasEscapedTags){return"Expected proper HTML structure, but found escaped HTML entities - content may not have been rendered"}if(!hasHtmlTags){return"Expected proper HTML structure, but found no HTML tags"}return"Expected result not to have proper HTML structure"}}};toHavePlatformMeta=function(received,platform){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have platform meta for "${platform}", but no _meta found`}}const expectedPrefixes=getToolCallMetaPrefixes(platform);const forbiddenPrefixes=getForbiddenMetaPrefixes(platform);const metaKeys=Object.keys(meta);const hasExpectedPrefix=metaKeys.some(key=>expectedPrefixes.some(prefix=>key.startsWith(prefix)));const forbiddenKeys=metaKeys.filter(key=>forbiddenPrefixes.some(prefix=>key.startsWith(prefix)));const pass=hasExpectedPrefix&&forbiddenKeys.length===0;return{pass,message:()=>{if(!hasExpectedPrefix){return`Expected _meta to have keys with prefixes [${expectedPrefixes.join(", ")}] for platform "${platform}", but found: [${metaKeys.join(", ")}]`}if(forbiddenKeys.length>0){return`Expected _meta NOT to have keys [${forbiddenKeys.join(", ")}] for platform "${platform}" (forbidden prefixes: [${forbiddenPrefixes.join(", ")}])`}return`Expected result not to have platform meta for "${platform}"`}}};toHaveMetaKey=function(received,key){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have key "${key}", but no _meta found`}}const pass=key in meta;return{pass,message:()=>pass?`Expected _meta not to have key "${key}"`:`Expected _meta to have key "${key}"`}};toHaveMetaValue=function(received,key,value){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta["${key}"] to equal ${JSON.stringify(value)}, but no _meta found`}}const actualValue=meta[key];const pass=JSON.stringify(actualValue)===JSON.stringify(value);return{pass,message:()=>pass?`Expected _meta["${key}"] not to equal ${JSON.stringify(value)}`:`Expected _meta["${key}"] to equal ${JSON.stringify(value)}, but got ${JSON.stringify(actualValue)}`}};toNotHaveMetaKey=function(received,key){const meta=extractMeta(received);if(!meta){return{pass:true,message:()=>`Expected _meta to have key "${key}", but no _meta found`}}const pass=!(key in meta);return{pass,message:()=>pass?`Expected _meta to have key "${key}"`:`Expected _meta not to have key "${key}"`}};toHaveOnlyNamespacedMeta=function(received,namespace){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have keys with namespace "${namespace}", but no _meta found`}}const metaKeys=Object.keys(meta);const wrongKeys=metaKeys.filter(key=>!key.startsWith(namespace));const pass=wrongKeys.length===0&&metaKeys.length>0;return{pass,message:()=>{if(metaKeys.length===0){return`Expected _meta to have keys with namespace "${namespace}", but _meta is empty`}if(wrongKeys.length>0){return`Expected _meta to ONLY have keys with namespace "${namespace}", but found: [${wrongKeys.join(", ")}]`}return`Expected _meta not to have only keys with namespace "${namespace}"`}}};toHavePlatformMimeType=function(received,platform){const meta=extractMeta(received);const expectedMimeType=getPlatformMimeType(platform);if(!meta){return{pass:false,message:()=>`Expected _meta to have MIME type "${expectedMimeType}" for platform "${platform}", but no _meta found`}}const mimeTypeKey="ui/mimeType";const actualMimeType=meta[mimeTypeKey];const pass=actualMimeType===expectedMimeType;return{pass,message:()=>pass?`Expected _meta["${mimeTypeKey}"] not to be "${expectedMimeType}"`:`Expected _meta["${mimeTypeKey}"] to be "${expectedMimeType}" for platform "${platform}", but got "${actualMimeType}"`}};toHavePlatformHtml=function(received,platform){const meta=extractMeta(received);if(!meta){return{pass:false,message:()=>`Expected _meta to have platform HTML for "${platform}", but no _meta found`}}const htmlKey="ui/html";const html=meta[htmlKey];const pass=typeof html==="string"&&html.length>0;return{pass,message:()=>pass?`Expected _meta not to have platform HTML in "${htmlKey}"`:`Expected _meta["${htmlKey}"] to contain HTML for platform "${platform}", but ${html===void 0?"key not found":`got ${typeof html}`}`}};uiMatchers={toHaveRenderedHtml,toContainHtmlElement,toContainBoundValue,toBeXssSafe,toHaveWidgetMetadata,toHaveCssClass,toNotContainRawContent,toHaveProperHtmlStructure,toHavePlatformMeta,toHaveMetaKey,toHaveMetaValue,toNotHaveMetaKey,toHaveOnlyNamespacedMeta,toHavePlatformMimeType,toHavePlatformHtml}}});import{hasTransform,z as z2}from"@frontmcp/lazy-zod";import{findDroppedKeys}from"@frontmcp/utils";function isReplayReport(value){const report=value;return typeof report?.file==="string"&&Array.isArray(report.calls)&&Array.isArray(report.differences)}var toContainTool,toBeSuccessful,toBeError,toHaveTextContent,toHaveImageContent,toHaveResourceContent,toPassOutputSchemaWhole,toContainResource,toContainResourceTemplate,toHaveMimeType,toContainPrompt,toHaveMessages,toBeValidJsonRpc,toHaveResult,toHaveError,toHaveErrorCode,toMatchRecording,mcpMatchers;var init_mcp_matchers=__esm({"libs/testing/src/matchers/mcp-matchers.ts"(){"use strict";init_replay_session();init_ui_matchers();toContainTool=function(received,toolName){const tools=received;if(!Array.isArray(tools)){return{pass:false,message:()=>`Expected an array of tools, but received ${typeof received}`}}const pass=tools.some(t=>t.name===toolName);const availableTools=tools.map(t=>t.name).join(", ");return{pass,message:()=>pass?`Expected tools not to contain "${toolName}"`:`Expected tools to contain "${toolName}", but got: [${availableTools}]`}};toBeSuccessful=function(received){const result=received;if(typeof result!=="object"||result===null||!("isSuccess"in result)){return{pass:false,message:()=>`Expected a result wrapper object with isSuccess property`}}const pass=result.isSuccess;return{pass,message:()=>pass?"Expected result not to be successful":`Expected result to be successful, but got error: ${result.error?.message??"unknown error"}`}};toBeError=function(received,expectedCode){const result=received;if(typeof result!=="object"||result===null||!("isError"in result)){return{pass:false,message:()=>`Expected a result wrapper object with isError property`}}const receivedCode=typeof expectedCode==="string"?result.raw?._meta?.["code"]:result.error?.code;const codeMatches=expectedCode===void 0||receivedCode===expectedCode;const pass=result.isError&&codeMatches;return{pass,message:()=>{if(!result.isError){return"Expected result to be an error, but it was successful"}if(!codeMatches){return`Expected error code ${expectedCode}, but got ${String(receivedCode)}`}return"Expected result not to be an error"}}};toHaveTextContent=function(received,expectedText){const result=received;if(typeof result!=="object"||result===null||!("text"in result)){return{pass:false,message:()=>`Expected a ToolResultWrapper or ResourceContentWrapper object with text method`}}const text=result.text();const hasText="hasTextContent"in result?result.hasTextContent():text!==void 0;let pass=hasText;if(pass&&expectedText!==void 0){pass=text?.includes(expectedText)??false}return{pass,message:()=>{if(!hasText){return"Expected result to have text content"}if(expectedText!==void 0&&!text?.includes(expectedText)){return`Expected text to contain "${expectedText}", but got: "${text}"`}return"Expected result not to have text content"}}};toHaveImageContent=function(received){const result=received;if(typeof result!=="object"||result===null||!("hasImageContent"in result)){return{pass:false,message:()=>`Expected a ToolResultWrapper object with hasImageContent method`}}const pass=result.hasImageContent();return{pass,message:()=>pass?"Expected result not to have image content":"Expected result to have image content"}};toHaveResourceContent=function(received){const result=received;if(typeof result!=="object"||result===null||!("hasResourceContent"in result)){return{pass:false,message:()=>`Expected a ToolResultWrapper object with hasResourceContent method`}}const pass=result.hasResourceContent();return{pass,message:()=>pass?"Expected result not to have resource content":"Expected result to have resource content"}};toPassOutputSchemaWhole=function(received,outputSchema){const schema=outputSchema instanceof z2.ZodType?outputSchema:z2.object(outputSchema);if(hasTransform(schema)){return{pass:false,message:()=>"toPassOutputSchemaWhole cannot compare keys through a transform (.transform(), z.preprocess(), .pipe()): assert on the parsed answer instead"}}const parsed=schema.safeParse(received);if(!parsed.success){const[firstIssue]=parsed.error.issues;const location=firstIssue?.path.length?` at ${firstIssue.path.join(".")}`:"";return{pass:false,message:()=>`Expected the answer to pass its output schema whole, but it does not match its output schema${location}: ${firstIssue?.message}`}}const droppedKeys=findDroppedKeys(received,parsed.data);const pass=droppedKeys.length===0;return{pass,message:()=>pass?"Expected the answer not to pass its output schema whole":`Expected the answer to pass its output schema whole, but parsing drops keys it does not declare: ${droppedKeys.join(", ")}`}};toContainResource=function(received,uri){const resources=received;if(!Array.isArray(resources)){return{pass:false,message:()=>`Expected an array of resources, but received ${typeof received}`}}const pass=resources.some(r=>r.uri===uri);const availableUris=resources.map(r=>r.uri).join(", ");return{pass,message:()=>pass?`Expected resources not to contain "${uri}"`:`Expected resources to contain "${uri}", but got: [${availableUris}]`}};toContainResourceTemplate=function(received,uriTemplate){const templates=received;if(!Array.isArray(templates)){return{pass:false,message:()=>`Expected an array of resource templates, but received ${typeof received}`}}const pass=templates.some(t=>t.uriTemplate===uriTemplate);const availableTemplates=templates.map(t=>t.uriTemplate).join(", ");return{pass,message:()=>pass?`Expected templates not to contain "${uriTemplate}"`:`Expected templates to contain "${uriTemplate}", but got: [${availableTemplates}]`}};toHaveMimeType=function(received,mimeType){const result=received;if(typeof result!=="object"||result===null||!("hasMimeType"in result)){return{pass:false,message:()=>`Expected a ResourceContentWrapper object with hasMimeType method`}}const pass=result.hasMimeType(mimeType);const actualMimeType=result.mimeType();return{pass,message:()=>pass?`Expected content not to have MIME type "${mimeType}"`:`Expected MIME type "${mimeType}", but got "${actualMimeType}"`}};toContainPrompt=function(received,name){const prompts=received;if(!Array.isArray(prompts)){return{pass:false,message:()=>`Expected an array of prompts, but received ${typeof received}`}}const pass=prompts.some(p=>p.name===name);const availablePrompts=prompts.map(p=>p.name).join(", ");return{pass,message:()=>pass?`Expected prompts not to contain "${name}"`:`Expected prompts to contain "${name}", but got: [${availablePrompts}]`}};toHaveMessages=function(received,count){const result=received;if(typeof result!=="object"||result===null||!("messages"in result)){return{pass:false,message:()=>`Expected a PromptResultWrapper object with messages property`}}const actualCount=result.messages?.length??0;const pass=actualCount===count;return{pass,message:()=>pass?`Expected prompt not to have ${count} messages`:`Expected prompt to have ${count} messages, but got ${actualCount}`}};toBeValidJsonRpc=function(received){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const hasJsonRpc=response["jsonrpc"]==="2.0";const hasId="id"in response;const hasResult="result"in response;const hasError="error"in response;const hasExactlyOneResultOrError=(hasResult||hasError)&&!(hasResult&&hasError);const pass=hasJsonRpc&&hasId&&hasExactlyOneResultOrError;return{pass,message:()=>{if(pass){return"Expected response not to be valid JSON-RPC"}const issues=[];if(!hasJsonRpc)issues.push('missing or invalid "jsonrpc": "2.0"');if(!hasId)issues.push('missing "id" field');if(!hasExactlyOneResultOrError){if(!hasResult&&!hasError)issues.push('missing "result" or "error"');else issues.push('cannot have both "result" and "error"')}return`Expected valid JSON-RPC 2.0 response: ${issues.join(", ")}`}}};toHaveResult=function(received){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const pass="result"in response;return{pass,message:()=>pass?"Expected response not to have result":"Expected response to have result"}};toHaveError=function(received){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const pass="error"in response;return{pass,message:()=>pass?"Expected response not to have error":"Expected response to have error"}};toHaveErrorCode=function(received,code){const response=received;if(typeof response!=="object"||response===null){return{pass:false,message:()=>`Expected an object, but received ${typeof received}`}}const actualCode=response.error?.code;const pass=actualCode===code;return{pass,message:()=>pass?`Expected response not to have error code ${code}`:`Expected error code ${code}, but got ${actualCode??"no error"}`}};toMatchRecording=function(received){if(!isReplayReport(received)){return{pass:false,message:()=>"Expected the report replaySession() returns"}}const pass=received.differences.length===0;return{pass,message:()=>formatReplayReport(received)}};mcpMatchers={toContainTool,toBeSuccessful,toBeError,toHaveTextContent,toHaveImageContent,toHaveResourceContent,toPassOutputSchemaWhole,toContainResource,toContainResourceTemplate,toHaveMimeType,toContainPrompt,toHaveMessages,toBeValidJsonRpc,toHaveResult,toHaveError,toHaveErrorCode,toMatchRecording,...uiMatchers}}});import{expect}from"@jest/globals";var require_setup=__commonJS({"libs/testing/src/setup.ts"(){init_mcp_matchers();expect.extend(mcpMatchers)}});export default require_setup();
@@ -36,8 +36,9 @@ export interface TestConfig {
36
36
  type?: 'local' | 'remote';
37
37
  };
38
38
  /**
39
- * Enable public mode for the test client.
40
- * When true, no Authorization header is sent and anonymous token is not requested.
39
+ * Enable public mode for the test client: it does not request an anonymous token.
40
+ * An Authorization header is still sent for a token given explicitly (`server.createClient({ token })`);
41
+ * without one, requests carry no Authorization header.
41
42
  * Use this for testing servers configured with `auth: { mode: 'public' }`.
42
43
  */
43
44
  publicMode?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"fixture-types.d.ts","sourceRoot":"","sources":["../../src/fixtures/fixture-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAM9E;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,SAAS,CAAC,EAAE,KAAK,GAAG,iBAAiB,CAAC;IACtC;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,QAAQ,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,CAAC;QACtE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;KAC3B,CAAC;I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