Module: test/browser
Classes
BrowserAppTestError
Extends
Error
Constructors
Constructor
new BrowserAppTestError(
message,provenance,details?):BrowserAppTestError
Parameters
message
string
provenance
details?
readonly string[]
Returns
Overrides
Error.constructor
Properties
~effect/ErrorReporter/attributes?
readonlyoptional~effect/ErrorReporter/attributes?:ReadonlyRecord<string,unknown>
Inherited from
Error.~effect/ErrorReporter/attributes
~effect/ErrorReporter/ignore?
readonlyoptional~effect/ErrorReporter/ignore?:boolean
Inherited from
Error.~effect/ErrorReporter/ignore
~effect/ErrorReporter/severity?
readonlyoptional~effect/ErrorReporter/severity?:Severity
Inherited from
Error.~effect/ErrorReporter/severity
~effect/Runtime/errorExitCode?
readonlyoptional~effect/Runtime/errorExitCode?:number
Inherited from
Error.~effect/Runtime/errorExitCode
~effect/Runtime/errorReported?
readonlyoptional~effect/Runtime/errorReported?:boolean
Inherited from
Error.~effect/Runtime/errorReported
cause?
optionalcause?:unknown
Inherited from
Error.cause
message
message:
string
Inherited from
Error.message
name
name:
string
Inherited from
Error.name
provenance
readonlyprovenance:BrowserAppProvenance
stack?
optionalstack?:string
Inherited from
Error.stack
stackTraceLimit
staticstackTraceLimit:number
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimit
Methods
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTrace
Interfaces
BrowserAppHostTraffic
Properties
downloads
readonlydownloads: readonlyMcpAppValidatedDownload[]
logs
readonlylogs: readonlyMcpAppBridgeLogEvent[]
messages
readonlymessages: readonlyMcpAppBridgeMessageEvent[]
modelContexts
readonlymodelContexts: readonlyMcpAppBridgeModelContext[]
openLinks
readonlyopenLinks: readonlystring[]
sizes
readonlysizes: readonlyMcpAppBridgeSize[]
BrowserAppProvenance
Properties
name
readonlyname:string
output
readonlyoutput:string
proofLevel
readonlyproofLevel:"browser-app"
resourceUri
readonlyresourceUri:string
target
readonlytarget:string
BrowserAppTraffic
Properties
direction
readonlydirection:"app-to-host"|"host-to-app"
message
readonlymessage:McpAppBridgeMessage
MountBrowserAppOptions
Properties
consentAuthority?
readonlyoptionalconsentAuthority?:McpAppConsentAuthority
container?
readonlyoptionalcontainer?:HTMLElement
host?
readonlyoptionalhost?:Partial<McpAppBridgeHost>
operations
readonlyoperations:McpAppBridgeBindingOperations
profile?
readonlyoptionalprofile?:McpAppProfileId
scriptedConsent?
readonlyoptionalscriptedConsent?:BrowserAppScriptedConsent
serverName?
readonlyoptionalserverName?:string
MCP server to bind when one compiled App is shared by several servers.
timeoutMs?
readonlyoptionaltimeoutMs?:number
toolDefinition?
readonlyoptionaltoolDefinition?:McpAppToolDefinition
toolInput?
readonlyoptionaltoolInput?:McpAppBridgeJsonRecord
toolName?
readonlyoptionaltoolName?:string
toolResult?
readonlyoptionaltoolResult?:McpAppJsonValue
Initial terminal result; omit it while the opening call is in flight.
MountedBrowserApp
Properties
bridge
readonlybridge:McpAppBridge
document
readonlydocument:Document
hostTraffic
readonlyhostTraffic:BrowserAppHostTraffic
iframe
readonlyiframe:HTMLIFrameElement
pendingConsentChallenges
readonlypendingConsentChallenges: readonlyMcpAppConsentChallenge[]
provenance
readonlyprovenance:BrowserAppProvenance
traffic
readonlytraffic: readonlyBrowserAppTraffic[]
Methods
decideConsent()
decideConsent(
challengeId,approved):Promise<boolean>
Parameters
challengeId
string
approved
boolean
Returns
Promise<boolean>
dispose()
dispose():
Promise<void>
Returns
Promise<void>
publishHostContextChanged()
publishHostContextChanged(
context):boolean
Parameters
context
McpAppBridgeJsonRecord
Returns
boolean
publishToolCancelled()
publishToolCancelled(
reason?):boolean
Parameters
reason?
string
Returns
boolean
publishToolInput()
publishToolInput(
input?):boolean
Parameters
input?
McpAppBridgeJsonRecord
Returns
boolean
publishToolResult()
publishToolResult(
result):boolean
Parameters
result
McpAppJsonValue
Returns
boolean
Type Aliases
BrowserAppScriptedConsent
BrowserAppScriptedConsent =
"manual"|"approve"|"deny"| ((challenge) =>boolean|undefined)
Variables
mountBrowserApp
constmountBrowserApp: (name,options) =>Promise<MountedBrowserApp>
Parameters
name
string
options
Returns
Promise<MountedBrowserApp>