@modelcontextprotocol/ext-apps 0.4.0 → 0.4.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/dist/src/app.d.ts CHANGED
@@ -11,7 +11,7 @@ export { applyHostStyleVariables, applyHostFonts, getDocumentTheme, applyDocumen
11
11
  *
12
12
  * MCP servers include this key in tool call result metadata to indicate which
13
13
  * UI resource should be displayed for the tool. When hosts receive a tool result
14
- * containing this metadata, they resolve and render the corresponding App.
14
+ * containing this metadata, they resolve and render the corresponding {@link App}.
15
15
  *
16
16
  * **Note**: This constant is provided for reference. MCP servers set this metadata
17
17
  * in their tool handlers; App developers typically don't need to use it directly.
@@ -39,20 +39,24 @@ export { applyHostStyleVariables, applyHostFonts, getDocumentTheme, applyDocumen
39
39
  export declare const RESOURCE_URI_META_KEY = "ui/resourceUri";
40
40
  /**
41
41
  * MIME type for MCP UI resources.
42
+ *
43
+ * Identifies HTML content as an MCP App UI resource.
44
+ *
45
+ * Used by {@link server-helpers!registerAppResource} as the default MIME type for app resources.
42
46
  */
43
47
  export declare const RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
44
48
  /**
45
- * Options for configuring App behavior.
49
+ * Options for configuring {@link App} behavior.
46
50
  *
47
- * Extends ProtocolOptions from the MCP SDK with App-specific configuration.
51
+ * Extends `ProtocolOptions` from the MCP SDK with `App`-specific configuration.
48
52
  *
49
- * @see ProtocolOptions from @modelcontextprotocol/sdk for inherited options
53
+ * @see `ProtocolOptions` from @modelcontextprotocol/sdk for inherited options
50
54
  */
51
55
  type AppOptions = ProtocolOptions & {
52
56
  /**
53
- * Automatically report size changes to the host using ResizeObserver.
57
+ * Automatically report size changes to the host using `ResizeObserver`.
54
58
  *
55
- * When enabled, the App monitors `document.body` and `document.documentElement`
59
+ * When enabled, the {@link App} monitors `document.body` and `document.documentElement`
56
60
  * for size changes and automatically sends `ui/notifications/size-changed`
57
61
  * notifications to the host.
58
62
  *
@@ -64,8 +68,8 @@ type RequestHandlerExtra = Parameters<Parameters<App["setRequestHandler"]>[1]>[1
64
68
  /**
65
69
  * Main class for MCP Apps to communicate with their host.
66
70
  *
67
- * The App class provides a framework-agnostic way to build interactive MCP Apps
68
- * that run inside host applications. It extends the MCP SDK's Protocol class and
71
+ * The `App` class provides a framework-agnostic way to build interactive MCP Apps
72
+ * that run inside host applications. It extends the MCP SDK's `Protocol` class and
69
73
  * handles the connection lifecycle, initialization handshake, and bidirectional
70
74
  * communication with the host.
71
75
  *
@@ -84,19 +88,20 @@ type RequestHandlerExtra = Parameters<Parameters<App["setRequestHandler"]>[1]>[1
84
88
  *
85
89
  * ## Inherited Methods
86
90
  *
87
- * As a subclass of Protocol, App inherits key methods for handling communication:
91
+ * As a subclass of `Protocol`, `App` inherits key methods for handling communication:
88
92
  * - `setRequestHandler()` - Register handlers for requests from host
89
93
  * - `setNotificationHandler()` - Register handlers for notifications from host
90
94
  *
91
- * @see Protocol from @modelcontextprotocol/sdk for all inherited methods
95
+ * @see `Protocol` from @modelcontextprotocol/sdk for all inherited methods
92
96
  *
93
97
  * ## Notification Setters
94
98
  *
95
- * For common notifications, the App class provides convenient setter properties
99
+ * For common notifications, the `App` class provides convenient setter properties
96
100
  * that simplify handler registration:
97
101
  * - `ontoolinput` - Complete tool arguments from host
98
102
  * - `ontoolinputpartial` - Streaming partial tool arguments
99
103
  * - `ontoolresult` - Tool execution results
104
+ * - `ontoolcancelled` - Tool execution was cancelled by user or host
100
105
  * - `onhostcontextchanged` - Host context changes (theme, locale, etc.)
101
106
  *
102
107
  * These setters are convenience wrappers around `setNotificationHandler()`.
@@ -128,7 +133,7 @@ type RequestHandlerExtra = Parameters<Parameters<App["setRequestHandler"]>[1]>[1
128
133
  * }
129
134
  * );
130
135
  *
131
- * await app.connect(new PostMessageTransport(window.parent));
136
+ * await app.connect(new PostMessageTransport(window.parent, window.parent));
132
137
  * ```
133
138
  *
134
139
  * @example Sending a message to the host's chat
@@ -151,7 +156,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
151
156
  *
152
157
  * @param _appInfo - App identification (name and version)
153
158
  * @param _capabilities - Features and capabilities this app provides
154
- * @param options - Configuration options including autoResize behavior
159
+ * @param options - Configuration options including `autoResize` behavior
155
160
  *
156
161
  * @example
157
162
  * ```typescript
@@ -257,7 +262,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
257
262
  *
258
263
  * Register handlers before calling {@link connect} to avoid missing notifications.
259
264
  *
260
- * @param callback - Function called with the tool input params
265
+ * @param callback - Function called with the tool input params ({@link McpUiToolInputNotification.params})
261
266
  *
262
267
  * @example Using the setter (simpler)
263
268
  * ```typescript
@@ -295,7 +300,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
295
300
  *
296
301
  * Register handlers before calling {@link connect} to avoid missing notifications.
297
302
  *
298
- * @param callback - Function called with each partial tool input update
303
+ * @param callback - Function called with each partial tool input update ({@link McpUiToolInputPartialNotification.params})
299
304
  *
300
305
  * @example Progressive rendering of tool arguments
301
306
  * ```typescript
@@ -322,7 +327,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
322
327
  *
323
328
  * Register handlers before calling {@link connect} to avoid missing notifications.
324
329
  *
325
- * @param callback - Function called with the tool result
330
+ * @param callback - Function called with the tool result ({@link McpUiToolResultNotification.params})
326
331
  *
327
332
  * @example Display tool execution results
328
333
  * ```typescript
@@ -354,7 +359,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
354
359
  *
355
360
  * Register handlers before calling {@link connect} to avoid missing notifications.
356
361
  *
357
- * @param callback - Function called when tool execution is cancelled
362
+ * @param callback - Function called when tool execution is cancelled. Receives optional cancellation reason — see {@link McpUiToolCancelledNotification.params}.
358
363
  *
359
364
  * @example Handle tool cancellation
360
365
  * ```typescript
@@ -380,6 +385,10 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
380
385
  * This setter is a convenience wrapper around `setNotificationHandler()` that
381
386
  * automatically handles the notification schema and extracts the params for you.
382
387
  *
388
+ * Notification params are automatically merged into the internal host context
389
+ * before the callback is invoked. This means {@link getHostContext} will
390
+ * return the updated values even before your callback runs.
391
+ *
383
392
  * Register handlers before calling {@link connect} to avoid missing notifications.
384
393
  *
385
394
  * @param callback - Function called with the updated host context
@@ -416,7 +425,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
416
425
  * Register handlers before calling {@link connect} to avoid missing requests.
417
426
  *
418
427
  * @param callback - Function called when teardown is requested.
419
- * Can return void or a Promise that resolves when cleanup is complete.
428
+ * Must return `McpUiResourceTeardownResult` (can be an empty object `{}`) or a Promise resolving to it.
420
429
  *
421
430
  * @example Perform cleanup before teardown
422
431
  * ```typescript
@@ -424,6 +433,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
424
433
  * await saveState();
425
434
  * closeConnections();
426
435
  * console.log("App ready for teardown");
436
+ * return {};
427
437
  * };
428
438
  * ```
429
439
  *
@@ -477,9 +487,9 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
477
487
  *
478
488
  * Register handlers before calling {@link connect} to avoid missing requests.
479
489
  *
480
- * @param callback - Async function that returns the list of available tools.
481
- * The callback will only be invoked if the app declared tool capabilities
482
- * in the constructor.
490
+ * @param callback - Async function that returns tool names as strings (simplified
491
+ * from full `ListToolsResult` with `Tool` objects). Registration is always
492
+ * allowed; capability validation occurs when handlers are invoked.
483
493
  *
484
494
  * @example Return available tools
485
495
  * ```typescript
@@ -768,7 +778,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
768
778
  * If initialization fails, the connection is automatically closed and an error
769
779
  * is thrown.
770
780
  *
771
- * @param transport - Transport layer (typically PostMessageTransport)
781
+ * @param transport - Transport layer (typically {@link PostMessageTransport})
772
782
  * @param options - Request options for the initialize request
773
783
  *
774
784
  * @throws {Error} If initialization fails or connection is lost
@@ -781,7 +791,7 @@ export declare class App extends Protocol<AppRequest, AppNotification, AppResult
781
791
  * );
782
792
  *
783
793
  * try {
784
- * await app.connect(new PostMessageTransport(window.parent));
794
+ * await app.connect(new PostMessageTransport(window.parent, window.parent));
785
795
  * console.log("Connected successfully!");
786
796
  * } catch (error) {
787
797
  * console.error("Failed to connect:", error);
package/dist/src/app.js CHANGED
@@ -1,4 +1,4 @@
1
- var Kc=Object.defineProperty;var s=(r,i)=>{for(var v in i)Kc(r,v,{get:i[v],enumerable:!0,configurable:!0,set:(t)=>i[v]=()=>t})};import{Protocol as ib}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as ob,CallToolResultSchema as vb,EmptyResultSchema as tb,ListToolsRequestSchema as ub,PingRequestSchema as $b}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as qc}from"@modelcontextprotocol/sdk/types.js";class qn{eventTarget;eventSource;messageListener;constructor(r=window.parent,i){this.eventTarget=r;this.eventSource=i;this.messageListener=(v)=>{if(i&&v.source!==this.eventSource){console.error("Ignoring message from unknown source",v);return}let t=qc.safeParse(v.data);if(t.success)console.debug("Parsed message",t.data),this.onmessage?.(t.data);else console.error("Failed to parse message",t.error.message,v),this.onerror?.(Error("Invalid JSON-RPC message received: "+t.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,i){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var wo="2025-11-21",Yc="ui/open-link",Qc="ui/message",mc="ui/notifications/sandbox-proxy-ready",Fc="ui/notifications/sandbox-resource-ready",Tc="ui/notifications/size-changed",Hc="ui/notifications/tool-input",Bc="ui/notifications/tool-input-partial",Mc="ui/notifications/tool-result",Rc="ui/notifications/tool-cancelled",xc="ui/notifications/host-context-changed",Zc="ui/resource-teardown",dc="ui/initialize",Cc="ui/notifications/initialized",fc="ui/request-display-mode";var g={};s(g,{xor:()=>hl,xid:()=>Nl,void:()=>xl,uuidv7:()=>cl,uuidv6:()=>ll,uuidv4:()=>el,uuid:()=>gl,util:()=>D,url:()=>Il,uppercase:()=>Kr,unknown:()=>Nr,union:()=>go,undefined:()=>Ml,ulid:()=>wl,uint64:()=>Hl,uint32:()=>ml,tuple:()=>Qg,trim:()=>Tr,treeifyError:()=>Vo,transform:()=>lo,toUpperCase:()=>Br,toLowerCase:()=>Hr,toJSONSchema:()=>Yi,templateLiteral:()=>ec,symbol:()=>Bl,superRefine:()=>ee,success:()=>uc,stringbool:()=>Dc,stringFormat:()=>Vl,string:()=>Bi,strictObject:()=>fl,startsWith:()=>Yr,slugify:()=>Mr,size:()=>kr,setErrorMap:()=>J6,set:()=>nc,safeParseAsync:()=>lg,safeParse:()=>eg,safeEncodeAsync:()=>Dg,safeEncode:()=>Ug,safeDecodeAsync:()=>wg,safeDecode:()=>kg,registry:()=>ui,regexes:()=>x,regex:()=>Ar,refine:()=>ge,record:()=>mg,readonly:()=>ie,property:()=>Ai,promise:()=>lc,prettifyError:()=>Ao,preprocess:()=>Nc,prefault:()=>yg,positive:()=>Ei,pipe:()=>Ln,partialRecord:()=>pl,parseAsync:()=>gg,parse:()=>$g,overwrite:()=>d,optional:()=>jn,object:()=>Cl,number:()=>zg,nullish:()=>tc,nullable:()=>Jn,null:()=>Jg,normalize:()=>Fr,nonpositive:()=>Wi,nonoptional:()=>hg,nonnegative:()=>Vi,never:()=>$o,negative:()=>Gi,nativeEnum:()=>ic,nanoid:()=>Ul,nan:()=>$c,multipleOf:()=>$r,minSize:()=>a,minLength:()=>nr,mime:()=>mr,meta:()=>Uc,maxSize:()=>gr,maxLength:()=>Dr,map:()=>rc,mac:()=>Ol,lte:()=>M,lt:()=>y,lowercase:()=>Xr,looseRecord:()=>sl,looseObject:()=>yl,locales:()=>Nn,literal:()=>oc,length:()=>wr,lazy:()=>te,ksuid:()=>zl,keyof:()=>dl,jwt:()=>Wl,json:()=>wc,iso:()=>Zr,ipv6:()=>Pl,ipv4:()=>Sl,intersection:()=>qg,int64:()=>Tl,int32:()=>Ql,int:()=>Mi,instanceof:()=>kc,includes:()=>qr,httpUrl:()=>bl,hostname:()=>Al,hex:()=>Xl,hash:()=>Kl,guid:()=>$l,gte:()=>Y,gt:()=>h,globalRegistry:()=>X,getErrorMap:()=>L6,function:()=>cc,fromJSONSchema:()=>Sc,formatError:()=>gn,float64:()=>Yl,float32:()=>ql,flattenError:()=>$n,file:()=>vc,exactOptional:()=>xg,enum:()=>eo,endsWith:()=>Qr,encodeAsync:()=>bg,encode:()=>cg,emoji:()=>_l,email:()=>ul,e164:()=>Gl,discriminatedUnion:()=>al,describe:()=>_c,decodeAsync:()=>_g,decode:()=>Ig,date:()=>Zl,custom:()=>bc,cuid2:()=>Dl,cuid:()=>kl,core:()=>ir,config:()=>A,coerce:()=>ce,codec:()=>gc,clone:()=>q,cidrv6:()=>Jl,cidrv4:()=>jl,check:()=>Ic,catch:()=>sg,boolean:()=>Sg,bigint:()=>Fl,base64url:()=>El,base64:()=>Ll,array:()=>Wn,any:()=>Rl,_function:()=>cc,_default:()=>Cg,_ZodString:()=>Ri,ZodXor:()=>Ag,ZodXID:()=>hi,ZodVoid:()=>Wg,ZodUnknown:()=>Eg,ZodUnion:()=>An,ZodUndefined:()=>Pg,ZodUUID:()=>p,ZodURL:()=>En,ZodULID:()=>yi,ZodType:()=>P,ZodTuple:()=>Yg,ZodTransform:()=>Mg,ZodTemplateLiteral:()=>oe,ZodSymbol:()=>Og,ZodSuccess:()=>ag,ZodStringFormat:()=>G,ZodString:()=>Cr,ZodSet:()=>Tg,ZodRecord:()=>Xn,ZodRealError:()=>H,ZodReadonly:()=>ne,ZodPromise:()=>ue,ZodPrefault:()=>fg,ZodPipe:()=>bo,ZodOptional:()=>co,ZodObject:()=>Vn,ZodNumberFormat:()=>zr,ZodNumber:()=>yr,ZodNullable:()=>Zg,ZodNull:()=>jg,ZodNonOptional:()=>Io,ZodNever:()=>Gg,ZodNanoID:()=>di,ZodNaN:()=>re,ZodMap:()=>Fg,ZodMAC:()=>Ng,ZodLiteral:()=>Hg,ZodLazy:()=>ve,ZodKSUID:()=>ai,ZodJWT:()=>to,ZodIssueCode:()=>j6,ZodIntersection:()=>Kg,ZodISOTime:()=>Ti,ZodISODuration:()=>Hi,ZodISODateTime:()=>mi,ZodISODate:()=>Fi,ZodIPv6:()=>si,ZodIPv4:()=>pi,ZodGUID:()=>Pn,ZodFunction:()=>$e,ZodFirstPartyTypeKind:()=>le,ZodFile:()=>Bg,ZodExactOptional:()=>Rg,ZodError:()=>O6,ZodEnum:()=>dr,ZodEmoji:()=>Zi,ZodEmail:()=>xi,ZodE164:()=>vo,ZodDiscriminatedUnion:()=>Xg,ZodDefault:()=>dg,ZodDate:()=>Gn,ZodCustomStringFormat:()=>fr,ZodCustom:()=>Kn,ZodCodec:()=>_o,ZodCatch:()=>pg,ZodCUID2:()=>fi,ZodCUID:()=>Ci,ZodCIDRv6:()=>no,ZodCIDRv4:()=>ro,ZodBoolean:()=>hr,ZodBigIntFormat:()=>uo,ZodBigInt:()=>ar,ZodBase64URL:()=>oo,ZodBase64:()=>io,ZodArray:()=>Vg,ZodAny:()=>Lg,TimePrecision:()=>Qu,NEVER:()=>No,$output:()=>Vu,$input:()=>Au,$brand:()=>zo});var ir={};s(ir,{version:()=>Ev,util:()=>D,treeifyError:()=>Vo,toJSONSchema:()=>Yi,toDotPath:()=>We,safeParseAsync:()=>Ko,safeParse:()=>Xo,safeEncodeAsync:()=>EI,safeEncode:()=>JI,safeDecodeAsync:()=>GI,safeDecode:()=>LI,registry:()=>ui,regexes:()=>x,process:()=>L,prettifyError:()=>Ao,parseAsync:()=>Fn,parse:()=>mn,meta:()=>k$,locales:()=>Nn,isValidJWT:()=>fe,isValidBase64URL:()=>Ce,isValidBase64:()=>yv,initializeContext:()=>er,globalRegistry:()=>X,globalConfig:()=>pr,formatError:()=>gn,flattenError:()=>$n,finalize:()=>cr,extractDefs:()=>lr,encodeAsync:()=>PI,encode:()=>SI,describe:()=>U$,decodeAsync:()=>jI,decode:()=>OI,createToJSONSchemaMethod:()=>w$,createStandardJSONSchemaMethod:()=>xr,config:()=>A,clone:()=>q,_xor:()=>p4,_xid:()=>Di,_void:()=>u$,_uuidv7:()=>ci,_uuidv6:()=>li,_uuidv4:()=>ei,_uuid:()=>gi,_url:()=>Sn,_uppercase:()=>Kr,_unknown:()=>v$,_union:()=>a4,_undefined:()=>n$,_ulid:()=>ki,_uint64:()=>su,_uint32:()=>Cu,_tuple:()=>n6,_trim:()=>Tr,_transform:()=>g6,_toUpperCase:()=>Br,_toLowerCase:()=>Hr,_templateLiteral:()=>D6,_symbol:()=>r$,_superRefine:()=>_$,_success:()=>b6,_stringbool:()=>D$,_stringFormat:()=>Rr,_string:()=>Ku,_startsWith:()=>Yr,_slugify:()=>Mr,_size:()=>kr,_set:()=>v6,_safeParseAsync:()=>Gr,_safeParse:()=>Er,_safeEncodeAsync:()=>Zn,_safeEncode:()=>Rn,_safeDecodeAsync:()=>dn,_safeDecode:()=>xn,_regex:()=>Ar,_refine:()=>b$,_record:()=>i6,_readonly:()=>k6,_property:()=>Ai,_promise:()=>N6,_positive:()=>Ei,_pipe:()=>U6,_parseAsync:()=>Lr,_parse:()=>Jr,_overwrite:()=>d,_optional:()=>e6,_number:()=>Bu,_nullable:()=>l6,_null:()=>i$,_normalize:()=>Fr,_nonpositive:()=>Wi,_nonoptional:()=>I6,_nonnegative:()=>Vi,_never:()=>t$,_negative:()=>Gi,_nativeEnum:()=>u6,_nanoid:()=>bi,_nan:()=>e$,_multipleOf:()=>$r,_minSize:()=>a,_minLength:()=>nr,_min:()=>Y,_mime:()=>mr,_maxSize:()=>gr,_maxLength:()=>Dr,_max:()=>M,_map:()=>o6,_mac:()=>Yu,_lte:()=>M,_lt:()=>y,_lowercase:()=>Xr,_literal:()=>$6,_length:()=>wr,_lazy:()=>w6,_ksuid:()=>wi,_jwt:()=>Li,_isoTime:()=>Tu,_isoDuration:()=>Hu,_isoDateTime:()=>mu,_isoDate:()=>Fu,_ipv6:()=>zi,_ipv4:()=>Ni,_intersection:()=>r6,_int64:()=>pu,_int32:()=>du,_int:()=>Ru,_includes:()=>qr,_guid:()=>zn,_gte:()=>Y,_gt:()=>h,_float64:()=>Zu,_float32:()=>xu,_file:()=>c$,_enum:()=>t6,_endsWith:()=>Qr,_encodeAsync:()=>Bn,_encode:()=>Tn,_emoji:()=>Ii,_email:()=>$i,_e164:()=>Ji,_discriminatedUnion:()=>s4,_default:()=>c6,_decodeAsync:()=>Mn,_decode:()=>Hn,_date:()=>$$,_custom:()=>I$,_cuid2:()=>Ui,_cuid:()=>_i,_coercedString:()=>qu,_coercedNumber:()=>Mu,_coercedDate:()=>g$,_coercedBoolean:()=>yu,_coercedBigint:()=>au,_cidrv6:()=>Oi,_cidrv4:()=>Si,_check:()=>ol,_catch:()=>_6,_boolean:()=>fu,_bigint:()=>hu,_base64url:()=>ji,_base64:()=>Pi,_array:()=>l$,_any:()=>o$,TimePrecision:()=>Qu,NEVER:()=>No,JSONSchemaGenerator:()=>ig,JSONSchema:()=>vl,Doc:()=>hn,$output:()=>Vu,$input:()=>Au,$constructor:()=>c,$brand:()=>zo,$ZodXor:()=>bt,$ZodXID:()=>Fv,$ZodVoid:()=>et,$ZodUnknown:()=>$t,$ZodUnion:()=>bn,$ZodUndefined:()=>vt,$ZodUUID:()=>Vv,$ZodURL:()=>Xv,$ZodULID:()=>mv,$ZodType:()=>O,$ZodTuple:()=>vi,$ZodTransform:()=>Ot,$ZodTemplateLiteral:()=>Kt,$ZodSymbol:()=>ot,$ZodSuccess:()=>Gt,$ZodStringFormat:()=>E,$ZodString:()=>Ur,$ZodSet:()=>wt,$ZodRegistry:()=>Xu,$ZodRecord:()=>kt,$ZodRealError:()=>T,$ZodReadonly:()=>Xt,$ZodPromise:()=>Yt,$ZodPrefault:()=>Lt,$ZodPipe:()=>At,$ZodOptional:()=>ti,$ZodObjectJIT:()=>It,$ZodObject:()=>ae,$ZodNumberFormat:()=>nt,$ZodNumber:()=>ii,$ZodNullable:()=>jt,$ZodNull:()=>tt,$ZodNonOptional:()=>Et,$ZodNever:()=>gt,$ZodNanoID:()=>qv,$ZodNaN:()=>Vt,$ZodMap:()=>Dt,$ZodMAC:()=>dv,$ZodLiteral:()=>zt,$ZodLazy:()=>Qt,$ZodKSUID:()=>Tv,$ZodJWT:()=>sv,$ZodIntersection:()=>Ut,$ZodISOTime:()=>Mv,$ZodISODuration:()=>Rv,$ZodISODateTime:()=>Hv,$ZodISODate:()=>Bv,$ZodIPv6:()=>Zv,$ZodIPv4:()=>xv,$ZodGUID:()=>Wv,$ZodFunction:()=>qt,$ZodFile:()=>St,$ZodExactOptional:()=>Pt,$ZodError:()=>un,$ZodEnum:()=>Nt,$ZodEncodeError:()=>Ir,$ZodEmoji:()=>Kv,$ZodEmail:()=>Av,$ZodE164:()=>pv,$ZodDiscriminatedUnion:()=>_t,$ZodDefault:()=>Jt,$ZodDate:()=>lt,$ZodCustomStringFormat:()=>rt,$ZodCustom:()=>mt,$ZodCodec:()=>_n,$ZodCheckUpperCase:()=>zv,$ZodCheckStringFormat:()=>Wr,$ZodCheckStartsWith:()=>Ov,$ZodCheckSizeEquals:()=>_v,$ZodCheckRegex:()=>wv,$ZodCheckProperty:()=>jv,$ZodCheckOverwrite:()=>Lv,$ZodCheckNumberFormat:()=>lv,$ZodCheckMultipleOf:()=>ev,$ZodCheckMinSize:()=>bv,$ZodCheckMinLength:()=>kv,$ZodCheckMimeType:()=>Jv,$ZodCheckMaxSize:()=>Iv,$ZodCheckMaxLength:()=>Uv,$ZodCheckLowerCase:()=>Nv,$ZodCheckLessThan:()=>fn,$ZodCheckLengthEquals:()=>Dv,$ZodCheckIncludes:()=>Sv,$ZodCheckGreaterThan:()=>yn,$ZodCheckEndsWith:()=>Pv,$ZodCheckBigIntFormat:()=>cv,$ZodCheck:()=>W,$ZodCatch:()=>Wt,$ZodCUID2:()=>Qv,$ZodCUID:()=>Yv,$ZodCIDRv6:()=>fv,$ZodCIDRv4:()=>Cv,$ZodBoolean:()=>In,$ZodBigIntFormat:()=>it,$ZodBigInt:()=>oi,$ZodBase64URL:()=>av,$ZodBase64:()=>hv,$ZodAsyncError:()=>f,$ZodArray:()=>ct,$ZodAny:()=>ut});var No=Object.freeze({status:"aborted"});function c(r,i,v){function t($,l){if(!$._zod)Object.defineProperty($,"_zod",{value:{def:l,constr:u,traits:new Set},enumerable:!1});if($._zod.traits.has(r))return;$._zod.traits.add(r),i($,l);let e=u.prototype,I=Object.keys(e);for(let _=0;_<I.length;_++){let N=I[_];if(!(N in $))$[N]=e[N].bind($)}}let n=v?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:r});function u($){var l;let e=v?.Parent?new o:this;t(e,$),(l=e._zod).deferred??(l.deferred=[]);for(let I of e._zod.deferred)I();return e}return Object.defineProperty(u,"init",{value:t}),Object.defineProperty(u,Symbol.hasInstance,{value:($)=>{if(v?.Parent&&$ instanceof v.Parent)return!0;return $?._zod?.traits?.has(r)}}),Object.defineProperty(u,"name",{value:r}),u}var zo=Symbol("zod_brand");class f extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ir extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`);this.name="ZodEncodeError"}}var pr={};function A(r){if(r)Object.assign(pr,r);return pr}var D={};s(D,{unwrapMessage:()=>sr,uint8ArrayToHex:()=>NI,uint8ArrayToBase64url:()=>DI,uint8ArrayToBase64:()=>Le,stringifyPrimitive:()=>U,slugify:()=>Po,shallowClone:()=>Jo,safeExtend:()=>cI,required:()=>_I,randomString:()=>vI,propertyKeyTypes:()=>on,promiseAllObject:()=>oI,primitiveTypes:()=>Lo,prefixIssues:()=>B,pick:()=>gI,partial:()=>bI,parsedType:()=>k,optionalKeys:()=>Eo,omit:()=>eI,objectClone:()=>rI,numKeys:()=>tI,nullish:()=>or,normalizeParams:()=>w,mergeDefs:()=>rr,merge:()=>II,jsonStringifyReplacer:()=>Or,joinValues:()=>b,issue:()=>jr,isPlainObject:()=>tr,isObject:()=>br,hexToUint8Array:()=>wI,getSizableOrigin:()=>vn,getParsedType:()=>uI,getLengthableOrigin:()=>tn,getEnumValues:()=>rn,getElementAtPath:()=>iI,floatSafeRemainder:()=>Oo,finalizeIssue:()=>F,extend:()=>lI,escapeRegex:()=>R,esc:()=>Yn,defineLazy:()=>j,createTransparentProxy:()=>$I,cloneDef:()=>nI,clone:()=>q,cleanRegex:()=>nn,cleanEnum:()=>UI,captureStackTrace:()=>Qn,cached:()=>Pr,base64urlToUint8Array:()=>kI,base64ToUint8Array:()=>Je,assignProp:()=>vr,assertNotEqual:()=>hc,assertNever:()=>pc,assertIs:()=>ac,assertEqual:()=>yc,assert:()=>sc,allowsEval:()=>jo,aborted:()=>ur,NUMBER_FORMAT_RANGES:()=>Go,Class:()=>Ee,BIGINT_FORMAT_RANGES:()=>Wo});function yc(r){return r}function hc(r){return r}function ac(r){}function pc(r){throw Error("Unexpected value in exhaustive check")}function sc(r){}function rn(r){let i=Object.values(r).filter((t)=>typeof t==="number");return Object.entries(r).filter(([t,n])=>i.indexOf(+t)===-1).map(([t,n])=>n)}function b(r,i="|"){return r.map((v)=>U(v)).join(i)}function Or(r,i){if(typeof i==="bigint")return i.toString();return i}function Pr(r){return{get value(){{let v=r();return Object.defineProperty(this,"value",{value:v}),v}throw Error("cached value already set")}}}function or(r){return r===null||r===void 0}function nn(r){let i=r.startsWith("^")?1:0,v=r.endsWith("$")?r.length-1:r.length;return r.slice(i,v)}function Oo(r,i){let v=(r.toString().split(".")[1]||"").length,t=i.toString(),n=(t.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(t)){let l=t.match(/\d?e-(\d?)/);if(l?.[1])n=Number.parseInt(l[1])}let o=v>n?v:n,u=Number.parseInt(r.toFixed(o).replace(".","")),$=Number.parseInt(i.toFixed(o).replace(".",""));return u%$/10**o}var je=Symbol("evaluating");function j(r,i,v){let t=void 0;Object.defineProperty(r,i,{get(){if(t===je)return;if(t===void 0)t=je,t=v();return t},set(n){Object.defineProperty(r,i,{value:n})},configurable:!0})}function rI(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function vr(r,i,v){Object.defineProperty(r,i,{value:v,writable:!0,enumerable:!0,configurable:!0})}function rr(...r){let i={};for(let v of r){let t=Object.getOwnPropertyDescriptors(v);Object.assign(i,t)}return Object.defineProperties({},i)}function nI(r){return rr(r._zod.def)}function iI(r,i){if(!i)return r;return i.reduce((v,t)=>v?.[t],r)}function oI(r){let i=Object.keys(r),v=i.map((t)=>r[t]);return Promise.all(v).then((t)=>{let n={};for(let o=0;o<i.length;o++)n[i[o]]=t[o];return n})}function vI(r=10){let v="";for(let t=0;t<r;t++)v+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return v}function Yn(r){return JSON.stringify(r)}function Po(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Qn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function br(r){return typeof r==="object"&&r!==null&&!Array.isArray(r)}var jo=Pr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(r){return!1}});function tr(r){if(br(r)===!1)return!1;let i=r.constructor;if(i===void 0)return!0;if(typeof i!=="function")return!0;let v=i.prototype;if(br(v)===!1)return!1;if(Object.prototype.hasOwnProperty.call(v,"isPrototypeOf")===!1)return!1;return!0}function Jo(r){if(tr(r))return{...r};if(Array.isArray(r))return[...r];return r}function tI(r){let i=0;for(let v in r)if(Object.prototype.hasOwnProperty.call(r,v))i++;return i}var uI=(r)=>{let i=typeof r;switch(i){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(r))return"array";if(r===null)return"null";if(r.then&&typeof r.then==="function"&&r.catch&&typeof r.catch==="function")return"promise";if(typeof Map<"u"&&r instanceof Map)return"map";if(typeof Set<"u"&&r instanceof Set)return"set";if(typeof Date<"u"&&r instanceof Date)return"date";if(typeof File<"u"&&r instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${i}`)}},on=new Set(["string","number","symbol"]),Lo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function R(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(r,i,v){let t=new r._zod.constr(i??r._zod.def);if(!i||v?.parent)t._zod.parent=r;return t}function w(r){let i=r;if(!i)return{};if(typeof i==="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");i.error=i.message}if(delete i.message,typeof i.error==="string")return{...i,error:()=>i.error};return i}function $I(r){let i;return new Proxy({},{get(v,t,n){return i??(i=r()),Reflect.get(i,t,n)},set(v,t,n,o){return i??(i=r()),Reflect.set(i,t,n,o)},has(v,t){return i??(i=r()),Reflect.has(i,t)},deleteProperty(v,t){return i??(i=r()),Reflect.deleteProperty(i,t)},ownKeys(v){return i??(i=r()),Reflect.ownKeys(i)},getOwnPropertyDescriptor(v,t){return i??(i=r()),Reflect.getOwnPropertyDescriptor(i,t)},defineProperty(v,t,n){return i??(i=r()),Reflect.defineProperty(i,t,n)}})}function U(r){if(typeof r==="bigint")return r.toString()+"n";if(typeof r==="string")return`"${r}"`;return`${r}`}function Eo(r){return Object.keys(r).filter((i)=>{return r[i]._zod.optin==="optional"&&r[i]._zod.optout==="optional"})}var Go={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Wo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gI(r,i){let v=r._zod.def,t=v.checks;if(t&&t.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=rr(r._zod.def,{get shape(){let u={};for(let $ in i){if(!($ in v.shape))throw Error(`Unrecognized key: "${$}"`);if(!i[$])continue;u[$]=v.shape[$]}return vr(this,"shape",u),u},checks:[]});return q(r,o)}function eI(r,i){let v=r._zod.def,t=v.checks;if(t&&t.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=rr(r._zod.def,{get shape(){let u={...r._zod.def.shape};for(let $ in i){if(!($ in v.shape))throw Error(`Unrecognized key: "${$}"`);if(!i[$])continue;delete u[$]}return vr(this,"shape",u),u},checks:[]});return q(r,o)}function lI(r,i){if(!tr(i))throw Error("Invalid input to extend: expected a plain object");let v=r._zod.def.checks;if(v&&v.length>0){let o=r._zod.def.shape;for(let u in i)if(Object.getOwnPropertyDescriptor(o,u)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=rr(r._zod.def,{get shape(){let o={...r._zod.def.shape,...i};return vr(this,"shape",o),o}});return q(r,n)}function cI(r,i){if(!tr(i))throw Error("Invalid input to safeExtend: expected a plain object");let v=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i};return vr(this,"shape",t),t}});return q(r,v)}function II(r,i){let v=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i._zod.def.shape};return vr(this,"shape",t),t},get catchall(){return i._zod.def.catchall},checks:[]});return q(r,v)}function bI(r,i,v){let n=i._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let u=rr(i._zod.def,{get shape(){let $=i._zod.def.shape,l={...$};if(v)for(let e in v){if(!(e in $))throw Error(`Unrecognized key: "${e}"`);if(!v[e])continue;l[e]=r?new r({type:"optional",innerType:$[e]}):$[e]}else for(let e in $)l[e]=r?new r({type:"optional",innerType:$[e]}):$[e];return vr(this,"shape",l),l},checks:[]});return q(i,u)}function _I(r,i,v){let t=rr(i._zod.def,{get shape(){let n=i._zod.def.shape,o={...n};if(v)for(let u in v){if(!(u in o))throw Error(`Unrecognized key: "${u}"`);if(!v[u])continue;o[u]=new r({type:"nonoptional",innerType:n[u]})}else for(let u in n)o[u]=new r({type:"nonoptional",innerType:n[u]});return vr(this,"shape",o),o}});return q(i,t)}function ur(r,i=0){if(r.aborted===!0)return!0;for(let v=i;v<r.issues.length;v++)if(r.issues[v]?.continue!==!0)return!0;return!1}function B(r,i){return i.map((v)=>{var t;return(t=v).path??(t.path=[]),v.path.unshift(r),v})}function sr(r){return typeof r==="string"?r:r?.message}function F(r,i,v){let t={...r,path:r.path??[]};if(!r.message){let n=sr(r.inst?._zod.def?.error?.(r))??sr(i?.error?.(r))??sr(v.customError?.(r))??sr(v.localeError?.(r))??"Invalid input";t.message=n}if(delete t.inst,delete t.continue,!i?.reportInput)delete t.input;return t}function vn(r){if(r instanceof Set)return"set";if(r instanceof Map)return"map";if(r instanceof File)return"file";return"unknown"}function tn(r){if(Array.isArray(r))return"array";if(typeof r==="string")return"string";return"unknown"}function k(r){let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let v=r;if(v&&Object.getPrototypeOf(v)!==Object.prototype&&"constructor"in v&&v.constructor)return v.constructor.name}}return i}function jr(...r){let[i,v,t]=r;if(typeof i==="string")return{message:i,code:"custom",input:v,inst:t};return{...i}}function UI(r){return Object.entries(r).filter(([i,v])=>{return Number.isNaN(Number.parseInt(i,10))}).map((i)=>i[1])}function Je(r){let i=atob(r),v=new Uint8Array(i.length);for(let t=0;t<i.length;t++)v[t]=i.charCodeAt(t);return v}function Le(r){let i="";for(let v=0;v<r.length;v++)i+=String.fromCharCode(r[v]);return btoa(i)}function kI(r){let i=r.replace(/-/g,"+").replace(/_/g,"/"),v="=".repeat((4-i.length%4)%4);return Je(i+v)}function DI(r){return Le(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function wI(r){let i=r.replace(/^0x/,"");if(i.length%2!==0)throw Error("Invalid hex string length");let v=new Uint8Array(i.length/2);for(let t=0;t<i.length;t+=2)v[t/2]=Number.parseInt(i.slice(t,t+2),16);return v}function NI(r){return Array.from(r).map((i)=>i.toString(16).padStart(2,"0")).join("")}class Ee{constructor(...r){}}var Ge=(r,i)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:i,enumerable:!1}),r.message=JSON.stringify(i,Or,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},un=c("$ZodError",Ge),T=c("$ZodError",Ge,{Parent:Error});function $n(r,i=(v)=>v.message){let v={},t=[];for(let n of r.issues)if(n.path.length>0)v[n.path[0]]=v[n.path[0]]||[],v[n.path[0]].push(i(n));else t.push(i(n));return{formErrors:t,fieldErrors:v}}function gn(r,i=(v)=>v.message){let v={_errors:[]},t=(n)=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map((u)=>t({issues:u}));else if(o.code==="invalid_key")t({issues:o.issues});else if(o.code==="invalid_element")t({issues:o.issues});else if(o.path.length===0)v._errors.push(i(o));else{let u=v,$=0;while($<o.path.length){let l=o.path[$];if($!==o.path.length-1)u[l]=u[l]||{_errors:[]};else u[l]=u[l]||{_errors:[]},u[l]._errors.push(i(o));u=u[l],$++}}};return t(r),v}function Vo(r,i=(v)=>v.message){let v={errors:[]},t=(n,o=[])=>{var u,$;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map((e)=>t({issues:e},l.path));else if(l.code==="invalid_key")t({issues:l.issues},l.path);else if(l.code==="invalid_element")t({issues:l.issues},l.path);else{let e=[...o,...l.path];if(e.length===0){v.errors.push(i(l));continue}let I=v,_=0;while(_<e.length){let N=e[_],z=_===e.length-1;if(typeof N==="string")I.properties??(I.properties={}),(u=I.properties)[N]??(u[N]={errors:[]}),I=I.properties[N];else I.items??(I.items=[]),($=I.items)[N]??($[N]={errors:[]}),I=I.items[N];if(z)I.errors.push(i(l));_++}}};return t(r),v}function We(r){let i=[],v=r.map((t)=>typeof t==="object"?t.key:t);for(let t of v)if(typeof t==="number")i.push(`[${t}]`);else if(typeof t==="symbol")i.push(`[${JSON.stringify(String(t))}]`);else if(/[^\w$]/.test(t))i.push(`[${JSON.stringify(t)}]`);else{if(i.length)i.push(".");i.push(t)}return i.join("")}function Ao(r){let i=[],v=[...r.issues].sort((t,n)=>(t.path??[]).length-(n.path??[]).length);for(let t of v)if(i.push(`✖ ${t.message}`),t.path?.length)i.push(` → at ${We(t.path)}`);return i.join(`
1
+ var Kc=Object.defineProperty;var s=(r,i)=>{for(var v in i)Kc(r,v,{get:i[v],enumerable:!0,configurable:!0,set:(t)=>i[v]=()=>t})};import{Protocol as ib}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as ob,CallToolResultSchema as vb,EmptyResultSchema as tb,ListToolsRequestSchema as ub,PingRequestSchema as $b}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as qc}from"@modelcontextprotocol/sdk/types.js";class qn{eventTarget;eventSource;messageListener;constructor(r=window.parent,i){this.eventTarget=r;this.eventSource=i;this.messageListener=(v)=>{if(i&&v.source!==this.eventSource){console.debug("Ignoring message from unknown source",v);return}let t=qc.safeParse(v.data);if(t.success)console.debug("Parsed message",t.data),this.onmessage?.(t.data);else console.error("Failed to parse message",t.error.message,v),this.onerror?.(Error("Invalid JSON-RPC message received: "+t.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,i){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var wo="2025-11-21",Yc="ui/open-link",Qc="ui/message",mc="ui/notifications/sandbox-proxy-ready",Fc="ui/notifications/sandbox-resource-ready",Tc="ui/notifications/size-changed",Hc="ui/notifications/tool-input",Bc="ui/notifications/tool-input-partial",Mc="ui/notifications/tool-result",Rc="ui/notifications/tool-cancelled",xc="ui/notifications/host-context-changed",Zc="ui/resource-teardown",dc="ui/initialize",Cc="ui/notifications/initialized",fc="ui/request-display-mode";var g={};s(g,{xor:()=>hl,xid:()=>Nl,void:()=>xl,uuidv7:()=>cl,uuidv6:()=>ll,uuidv4:()=>el,uuid:()=>gl,util:()=>D,url:()=>Il,uppercase:()=>Kr,unknown:()=>Nr,union:()=>go,undefined:()=>Ml,ulid:()=>wl,uint64:()=>Hl,uint32:()=>ml,tuple:()=>Qg,trim:()=>Tr,treeifyError:()=>Vo,transform:()=>lo,toUpperCase:()=>Br,toLowerCase:()=>Hr,toJSONSchema:()=>Yi,templateLiteral:()=>ec,symbol:()=>Bl,superRefine:()=>ee,success:()=>uc,stringbool:()=>Dc,stringFormat:()=>Vl,string:()=>Bi,strictObject:()=>fl,startsWith:()=>Yr,slugify:()=>Mr,size:()=>kr,setErrorMap:()=>J6,set:()=>nc,safeParseAsync:()=>lg,safeParse:()=>eg,safeEncodeAsync:()=>Dg,safeEncode:()=>Ug,safeDecodeAsync:()=>wg,safeDecode:()=>kg,registry:()=>ui,regexes:()=>x,regex:()=>Ar,refine:()=>ge,record:()=>mg,readonly:()=>ie,property:()=>Ai,promise:()=>lc,prettifyError:()=>Ao,preprocess:()=>Nc,prefault:()=>yg,positive:()=>Ei,pipe:()=>Ln,partialRecord:()=>pl,parseAsync:()=>gg,parse:()=>$g,overwrite:()=>d,optional:()=>jn,object:()=>Cl,number:()=>zg,nullish:()=>tc,nullable:()=>Jn,null:()=>Jg,normalize:()=>Fr,nonpositive:()=>Wi,nonoptional:()=>hg,nonnegative:()=>Vi,never:()=>$o,negative:()=>Gi,nativeEnum:()=>ic,nanoid:()=>Ul,nan:()=>$c,multipleOf:()=>$r,minSize:()=>a,minLength:()=>nr,mime:()=>mr,meta:()=>Uc,maxSize:()=>gr,maxLength:()=>Dr,map:()=>rc,mac:()=>Ol,lte:()=>M,lt:()=>y,lowercase:()=>Xr,looseRecord:()=>sl,looseObject:()=>yl,locales:()=>Nn,literal:()=>oc,length:()=>wr,lazy:()=>te,ksuid:()=>zl,keyof:()=>dl,jwt:()=>Wl,json:()=>wc,iso:()=>Zr,ipv6:()=>Pl,ipv4:()=>Sl,intersection:()=>qg,int64:()=>Tl,int32:()=>Ql,int:()=>Mi,instanceof:()=>kc,includes:()=>qr,httpUrl:()=>bl,hostname:()=>Al,hex:()=>Xl,hash:()=>Kl,guid:()=>$l,gte:()=>Y,gt:()=>h,globalRegistry:()=>X,getErrorMap:()=>L6,function:()=>cc,fromJSONSchema:()=>Sc,formatError:()=>gn,float64:()=>Yl,float32:()=>ql,flattenError:()=>$n,file:()=>vc,exactOptional:()=>xg,enum:()=>eo,endsWith:()=>Qr,encodeAsync:()=>bg,encode:()=>cg,emoji:()=>_l,email:()=>ul,e164:()=>Gl,discriminatedUnion:()=>al,describe:()=>_c,decodeAsync:()=>_g,decode:()=>Ig,date:()=>Zl,custom:()=>bc,cuid2:()=>Dl,cuid:()=>kl,core:()=>ir,config:()=>A,coerce:()=>ce,codec:()=>gc,clone:()=>q,cidrv6:()=>Jl,cidrv4:()=>jl,check:()=>Ic,catch:()=>sg,boolean:()=>Sg,bigint:()=>Fl,base64url:()=>El,base64:()=>Ll,array:()=>Wn,any:()=>Rl,_function:()=>cc,_default:()=>Cg,_ZodString:()=>Ri,ZodXor:()=>Ag,ZodXID:()=>hi,ZodVoid:()=>Wg,ZodUnknown:()=>Eg,ZodUnion:()=>An,ZodUndefined:()=>Pg,ZodUUID:()=>p,ZodURL:()=>En,ZodULID:()=>yi,ZodType:()=>P,ZodTuple:()=>Yg,ZodTransform:()=>Mg,ZodTemplateLiteral:()=>oe,ZodSymbol:()=>Og,ZodSuccess:()=>ag,ZodStringFormat:()=>G,ZodString:()=>Cr,ZodSet:()=>Tg,ZodRecord:()=>Xn,ZodRealError:()=>H,ZodReadonly:()=>ne,ZodPromise:()=>ue,ZodPrefault:()=>fg,ZodPipe:()=>bo,ZodOptional:()=>co,ZodObject:()=>Vn,ZodNumberFormat:()=>zr,ZodNumber:()=>yr,ZodNullable:()=>Zg,ZodNull:()=>jg,ZodNonOptional:()=>Io,ZodNever:()=>Gg,ZodNanoID:()=>di,ZodNaN:()=>re,ZodMap:()=>Fg,ZodMAC:()=>Ng,ZodLiteral:()=>Hg,ZodLazy:()=>ve,ZodKSUID:()=>ai,ZodJWT:()=>to,ZodIssueCode:()=>j6,ZodIntersection:()=>Kg,ZodISOTime:()=>Ti,ZodISODuration:()=>Hi,ZodISODateTime:()=>mi,ZodISODate:()=>Fi,ZodIPv6:()=>si,ZodIPv4:()=>pi,ZodGUID:()=>Pn,ZodFunction:()=>$e,ZodFirstPartyTypeKind:()=>le,ZodFile:()=>Bg,ZodExactOptional:()=>Rg,ZodError:()=>O6,ZodEnum:()=>dr,ZodEmoji:()=>Zi,ZodEmail:()=>xi,ZodE164:()=>vo,ZodDiscriminatedUnion:()=>Xg,ZodDefault:()=>dg,ZodDate:()=>Gn,ZodCustomStringFormat:()=>fr,ZodCustom:()=>Kn,ZodCodec:()=>_o,ZodCatch:()=>pg,ZodCUID2:()=>fi,ZodCUID:()=>Ci,ZodCIDRv6:()=>no,ZodCIDRv4:()=>ro,ZodBoolean:()=>hr,ZodBigIntFormat:()=>uo,ZodBigInt:()=>ar,ZodBase64URL:()=>oo,ZodBase64:()=>io,ZodArray:()=>Vg,ZodAny:()=>Lg,TimePrecision:()=>Qu,NEVER:()=>No,$output:()=>Vu,$input:()=>Au,$brand:()=>zo});var ir={};s(ir,{version:()=>Ev,util:()=>D,treeifyError:()=>Vo,toJSONSchema:()=>Yi,toDotPath:()=>We,safeParseAsync:()=>Ko,safeParse:()=>Xo,safeEncodeAsync:()=>EI,safeEncode:()=>JI,safeDecodeAsync:()=>GI,safeDecode:()=>LI,registry:()=>ui,regexes:()=>x,process:()=>L,prettifyError:()=>Ao,parseAsync:()=>Fn,parse:()=>mn,meta:()=>k$,locales:()=>Nn,isValidJWT:()=>fe,isValidBase64URL:()=>Ce,isValidBase64:()=>yv,initializeContext:()=>er,globalRegistry:()=>X,globalConfig:()=>pr,formatError:()=>gn,flattenError:()=>$n,finalize:()=>cr,extractDefs:()=>lr,encodeAsync:()=>PI,encode:()=>SI,describe:()=>U$,decodeAsync:()=>jI,decode:()=>OI,createToJSONSchemaMethod:()=>w$,createStandardJSONSchemaMethod:()=>xr,config:()=>A,clone:()=>q,_xor:()=>p4,_xid:()=>Di,_void:()=>u$,_uuidv7:()=>ci,_uuidv6:()=>li,_uuidv4:()=>ei,_uuid:()=>gi,_url:()=>Sn,_uppercase:()=>Kr,_unknown:()=>v$,_union:()=>a4,_undefined:()=>n$,_ulid:()=>ki,_uint64:()=>su,_uint32:()=>Cu,_tuple:()=>n6,_trim:()=>Tr,_transform:()=>g6,_toUpperCase:()=>Br,_toLowerCase:()=>Hr,_templateLiteral:()=>D6,_symbol:()=>r$,_superRefine:()=>_$,_success:()=>b6,_stringbool:()=>D$,_stringFormat:()=>Rr,_string:()=>Ku,_startsWith:()=>Yr,_slugify:()=>Mr,_size:()=>kr,_set:()=>v6,_safeParseAsync:()=>Gr,_safeParse:()=>Er,_safeEncodeAsync:()=>Zn,_safeEncode:()=>Rn,_safeDecodeAsync:()=>dn,_safeDecode:()=>xn,_regex:()=>Ar,_refine:()=>b$,_record:()=>i6,_readonly:()=>k6,_property:()=>Ai,_promise:()=>N6,_positive:()=>Ei,_pipe:()=>U6,_parseAsync:()=>Lr,_parse:()=>Jr,_overwrite:()=>d,_optional:()=>e6,_number:()=>Bu,_nullable:()=>l6,_null:()=>i$,_normalize:()=>Fr,_nonpositive:()=>Wi,_nonoptional:()=>I6,_nonnegative:()=>Vi,_never:()=>t$,_negative:()=>Gi,_nativeEnum:()=>u6,_nanoid:()=>bi,_nan:()=>e$,_multipleOf:()=>$r,_minSize:()=>a,_minLength:()=>nr,_min:()=>Y,_mime:()=>mr,_maxSize:()=>gr,_maxLength:()=>Dr,_max:()=>M,_map:()=>o6,_mac:()=>Yu,_lte:()=>M,_lt:()=>y,_lowercase:()=>Xr,_literal:()=>$6,_length:()=>wr,_lazy:()=>w6,_ksuid:()=>wi,_jwt:()=>Li,_isoTime:()=>Tu,_isoDuration:()=>Hu,_isoDateTime:()=>mu,_isoDate:()=>Fu,_ipv6:()=>zi,_ipv4:()=>Ni,_intersection:()=>r6,_int64:()=>pu,_int32:()=>du,_int:()=>Ru,_includes:()=>qr,_guid:()=>zn,_gte:()=>Y,_gt:()=>h,_float64:()=>Zu,_float32:()=>xu,_file:()=>c$,_enum:()=>t6,_endsWith:()=>Qr,_encodeAsync:()=>Bn,_encode:()=>Tn,_emoji:()=>Ii,_email:()=>$i,_e164:()=>Ji,_discriminatedUnion:()=>s4,_default:()=>c6,_decodeAsync:()=>Mn,_decode:()=>Hn,_date:()=>$$,_custom:()=>I$,_cuid2:()=>Ui,_cuid:()=>_i,_coercedString:()=>qu,_coercedNumber:()=>Mu,_coercedDate:()=>g$,_coercedBoolean:()=>yu,_coercedBigint:()=>au,_cidrv6:()=>Oi,_cidrv4:()=>Si,_check:()=>ol,_catch:()=>_6,_boolean:()=>fu,_bigint:()=>hu,_base64url:()=>ji,_base64:()=>Pi,_array:()=>l$,_any:()=>o$,TimePrecision:()=>Qu,NEVER:()=>No,JSONSchemaGenerator:()=>ig,JSONSchema:()=>vl,Doc:()=>hn,$output:()=>Vu,$input:()=>Au,$constructor:()=>c,$brand:()=>zo,$ZodXor:()=>bt,$ZodXID:()=>Fv,$ZodVoid:()=>et,$ZodUnknown:()=>$t,$ZodUnion:()=>bn,$ZodUndefined:()=>vt,$ZodUUID:()=>Vv,$ZodURL:()=>Xv,$ZodULID:()=>mv,$ZodType:()=>O,$ZodTuple:()=>vi,$ZodTransform:()=>Ot,$ZodTemplateLiteral:()=>Kt,$ZodSymbol:()=>ot,$ZodSuccess:()=>Gt,$ZodStringFormat:()=>E,$ZodString:()=>Ur,$ZodSet:()=>wt,$ZodRegistry:()=>Xu,$ZodRecord:()=>kt,$ZodRealError:()=>T,$ZodReadonly:()=>Xt,$ZodPromise:()=>Yt,$ZodPrefault:()=>Lt,$ZodPipe:()=>At,$ZodOptional:()=>ti,$ZodObjectJIT:()=>It,$ZodObject:()=>ae,$ZodNumberFormat:()=>nt,$ZodNumber:()=>ii,$ZodNullable:()=>jt,$ZodNull:()=>tt,$ZodNonOptional:()=>Et,$ZodNever:()=>gt,$ZodNanoID:()=>qv,$ZodNaN:()=>Vt,$ZodMap:()=>Dt,$ZodMAC:()=>dv,$ZodLiteral:()=>zt,$ZodLazy:()=>Qt,$ZodKSUID:()=>Tv,$ZodJWT:()=>sv,$ZodIntersection:()=>Ut,$ZodISOTime:()=>Mv,$ZodISODuration:()=>Rv,$ZodISODateTime:()=>Hv,$ZodISODate:()=>Bv,$ZodIPv6:()=>Zv,$ZodIPv4:()=>xv,$ZodGUID:()=>Wv,$ZodFunction:()=>qt,$ZodFile:()=>St,$ZodExactOptional:()=>Pt,$ZodError:()=>un,$ZodEnum:()=>Nt,$ZodEncodeError:()=>Ir,$ZodEmoji:()=>Kv,$ZodEmail:()=>Av,$ZodE164:()=>pv,$ZodDiscriminatedUnion:()=>_t,$ZodDefault:()=>Jt,$ZodDate:()=>lt,$ZodCustomStringFormat:()=>rt,$ZodCustom:()=>mt,$ZodCodec:()=>_n,$ZodCheckUpperCase:()=>zv,$ZodCheckStringFormat:()=>Wr,$ZodCheckStartsWith:()=>Ov,$ZodCheckSizeEquals:()=>_v,$ZodCheckRegex:()=>wv,$ZodCheckProperty:()=>jv,$ZodCheckOverwrite:()=>Lv,$ZodCheckNumberFormat:()=>lv,$ZodCheckMultipleOf:()=>ev,$ZodCheckMinSize:()=>bv,$ZodCheckMinLength:()=>kv,$ZodCheckMimeType:()=>Jv,$ZodCheckMaxSize:()=>Iv,$ZodCheckMaxLength:()=>Uv,$ZodCheckLowerCase:()=>Nv,$ZodCheckLessThan:()=>fn,$ZodCheckLengthEquals:()=>Dv,$ZodCheckIncludes:()=>Sv,$ZodCheckGreaterThan:()=>yn,$ZodCheckEndsWith:()=>Pv,$ZodCheckBigIntFormat:()=>cv,$ZodCheck:()=>W,$ZodCatch:()=>Wt,$ZodCUID2:()=>Qv,$ZodCUID:()=>Yv,$ZodCIDRv6:()=>fv,$ZodCIDRv4:()=>Cv,$ZodBoolean:()=>In,$ZodBigIntFormat:()=>it,$ZodBigInt:()=>oi,$ZodBase64URL:()=>av,$ZodBase64:()=>hv,$ZodAsyncError:()=>f,$ZodArray:()=>ct,$ZodAny:()=>ut});var No=Object.freeze({status:"aborted"});function c(r,i,v){function t($,l){if(!$._zod)Object.defineProperty($,"_zod",{value:{def:l,constr:u,traits:new Set},enumerable:!1});if($._zod.traits.has(r))return;$._zod.traits.add(r),i($,l);let e=u.prototype,I=Object.keys(e);for(let _=0;_<I.length;_++){let N=I[_];if(!(N in $))$[N]=e[N].bind($)}}let n=v?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:r});function u($){var l;let e=v?.Parent?new o:this;t(e,$),(l=e._zod).deferred??(l.deferred=[]);for(let I of e._zod.deferred)I();return e}return Object.defineProperty(u,"init",{value:t}),Object.defineProperty(u,Symbol.hasInstance,{value:($)=>{if(v?.Parent&&$ instanceof v.Parent)return!0;return $?._zod?.traits?.has(r)}}),Object.defineProperty(u,"name",{value:r}),u}var zo=Symbol("zod_brand");class f extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ir extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`);this.name="ZodEncodeError"}}var pr={};function A(r){if(r)Object.assign(pr,r);return pr}var D={};s(D,{unwrapMessage:()=>sr,uint8ArrayToHex:()=>NI,uint8ArrayToBase64url:()=>DI,uint8ArrayToBase64:()=>Le,stringifyPrimitive:()=>U,slugify:()=>Po,shallowClone:()=>Jo,safeExtend:()=>cI,required:()=>_I,randomString:()=>vI,propertyKeyTypes:()=>on,promiseAllObject:()=>oI,primitiveTypes:()=>Lo,prefixIssues:()=>B,pick:()=>gI,partial:()=>bI,parsedType:()=>k,optionalKeys:()=>Eo,omit:()=>eI,objectClone:()=>rI,numKeys:()=>tI,nullish:()=>or,normalizeParams:()=>w,mergeDefs:()=>rr,merge:()=>II,jsonStringifyReplacer:()=>Or,joinValues:()=>b,issue:()=>jr,isPlainObject:()=>tr,isObject:()=>br,hexToUint8Array:()=>wI,getSizableOrigin:()=>vn,getParsedType:()=>uI,getLengthableOrigin:()=>tn,getEnumValues:()=>rn,getElementAtPath:()=>iI,floatSafeRemainder:()=>Oo,finalizeIssue:()=>F,extend:()=>lI,escapeRegex:()=>R,esc:()=>Yn,defineLazy:()=>j,createTransparentProxy:()=>$I,cloneDef:()=>nI,clone:()=>q,cleanRegex:()=>nn,cleanEnum:()=>UI,captureStackTrace:()=>Qn,cached:()=>Pr,base64urlToUint8Array:()=>kI,base64ToUint8Array:()=>Je,assignProp:()=>vr,assertNotEqual:()=>hc,assertNever:()=>pc,assertIs:()=>ac,assertEqual:()=>yc,assert:()=>sc,allowsEval:()=>jo,aborted:()=>ur,NUMBER_FORMAT_RANGES:()=>Go,Class:()=>Ee,BIGINT_FORMAT_RANGES:()=>Wo});function yc(r){return r}function hc(r){return r}function ac(r){}function pc(r){throw Error("Unexpected value in exhaustive check")}function sc(r){}function rn(r){let i=Object.values(r).filter((t)=>typeof t==="number");return Object.entries(r).filter(([t,n])=>i.indexOf(+t)===-1).map(([t,n])=>n)}function b(r,i="|"){return r.map((v)=>U(v)).join(i)}function Or(r,i){if(typeof i==="bigint")return i.toString();return i}function Pr(r){return{get value(){{let v=r();return Object.defineProperty(this,"value",{value:v}),v}throw Error("cached value already set")}}}function or(r){return r===null||r===void 0}function nn(r){let i=r.startsWith("^")?1:0,v=r.endsWith("$")?r.length-1:r.length;return r.slice(i,v)}function Oo(r,i){let v=(r.toString().split(".")[1]||"").length,t=i.toString(),n=(t.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(t)){let l=t.match(/\d?e-(\d?)/);if(l?.[1])n=Number.parseInt(l[1])}let o=v>n?v:n,u=Number.parseInt(r.toFixed(o).replace(".","")),$=Number.parseInt(i.toFixed(o).replace(".",""));return u%$/10**o}var je=Symbol("evaluating");function j(r,i,v){let t=void 0;Object.defineProperty(r,i,{get(){if(t===je)return;if(t===void 0)t=je,t=v();return t},set(n){Object.defineProperty(r,i,{value:n})},configurable:!0})}function rI(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function vr(r,i,v){Object.defineProperty(r,i,{value:v,writable:!0,enumerable:!0,configurable:!0})}function rr(...r){let i={};for(let v of r){let t=Object.getOwnPropertyDescriptors(v);Object.assign(i,t)}return Object.defineProperties({},i)}function nI(r){return rr(r._zod.def)}function iI(r,i){if(!i)return r;return i.reduce((v,t)=>v?.[t],r)}function oI(r){let i=Object.keys(r),v=i.map((t)=>r[t]);return Promise.all(v).then((t)=>{let n={};for(let o=0;o<i.length;o++)n[i[o]]=t[o];return n})}function vI(r=10){let v="";for(let t=0;t<r;t++)v+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return v}function Yn(r){return JSON.stringify(r)}function Po(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Qn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function br(r){return typeof r==="object"&&r!==null&&!Array.isArray(r)}var jo=Pr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(r){return!1}});function tr(r){if(br(r)===!1)return!1;let i=r.constructor;if(i===void 0)return!0;if(typeof i!=="function")return!0;let v=i.prototype;if(br(v)===!1)return!1;if(Object.prototype.hasOwnProperty.call(v,"isPrototypeOf")===!1)return!1;return!0}function Jo(r){if(tr(r))return{...r};if(Array.isArray(r))return[...r];return r}function tI(r){let i=0;for(let v in r)if(Object.prototype.hasOwnProperty.call(r,v))i++;return i}var uI=(r)=>{let i=typeof r;switch(i){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(r))return"array";if(r===null)return"null";if(r.then&&typeof r.then==="function"&&r.catch&&typeof r.catch==="function")return"promise";if(typeof Map<"u"&&r instanceof Map)return"map";if(typeof Set<"u"&&r instanceof Set)return"set";if(typeof Date<"u"&&r instanceof Date)return"date";if(typeof File<"u"&&r instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${i}`)}},on=new Set(["string","number","symbol"]),Lo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function R(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(r,i,v){let t=new r._zod.constr(i??r._zod.def);if(!i||v?.parent)t._zod.parent=r;return t}function w(r){let i=r;if(!i)return{};if(typeof i==="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");i.error=i.message}if(delete i.message,typeof i.error==="string")return{...i,error:()=>i.error};return i}function $I(r){let i;return new Proxy({},{get(v,t,n){return i??(i=r()),Reflect.get(i,t,n)},set(v,t,n,o){return i??(i=r()),Reflect.set(i,t,n,o)},has(v,t){return i??(i=r()),Reflect.has(i,t)},deleteProperty(v,t){return i??(i=r()),Reflect.deleteProperty(i,t)},ownKeys(v){return i??(i=r()),Reflect.ownKeys(i)},getOwnPropertyDescriptor(v,t){return i??(i=r()),Reflect.getOwnPropertyDescriptor(i,t)},defineProperty(v,t,n){return i??(i=r()),Reflect.defineProperty(i,t,n)}})}function U(r){if(typeof r==="bigint")return r.toString()+"n";if(typeof r==="string")return`"${r}"`;return`${r}`}function Eo(r){return Object.keys(r).filter((i)=>{return r[i]._zod.optin==="optional"&&r[i]._zod.optout==="optional"})}var Go={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Wo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gI(r,i){let v=r._zod.def,t=v.checks;if(t&&t.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=rr(r._zod.def,{get shape(){let u={};for(let $ in i){if(!($ in v.shape))throw Error(`Unrecognized key: "${$}"`);if(!i[$])continue;u[$]=v.shape[$]}return vr(this,"shape",u),u},checks:[]});return q(r,o)}function eI(r,i){let v=r._zod.def,t=v.checks;if(t&&t.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=rr(r._zod.def,{get shape(){let u={...r._zod.def.shape};for(let $ in i){if(!($ in v.shape))throw Error(`Unrecognized key: "${$}"`);if(!i[$])continue;delete u[$]}return vr(this,"shape",u),u},checks:[]});return q(r,o)}function lI(r,i){if(!tr(i))throw Error("Invalid input to extend: expected a plain object");let v=r._zod.def.checks;if(v&&v.length>0){let o=r._zod.def.shape;for(let u in i)if(Object.getOwnPropertyDescriptor(o,u)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=rr(r._zod.def,{get shape(){let o={...r._zod.def.shape,...i};return vr(this,"shape",o),o}});return q(r,n)}function cI(r,i){if(!tr(i))throw Error("Invalid input to safeExtend: expected a plain object");let v=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i};return vr(this,"shape",t),t}});return q(r,v)}function II(r,i){let v=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i._zod.def.shape};return vr(this,"shape",t),t},get catchall(){return i._zod.def.catchall},checks:[]});return q(r,v)}function bI(r,i,v){let n=i._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let u=rr(i._zod.def,{get shape(){let $=i._zod.def.shape,l={...$};if(v)for(let e in v){if(!(e in $))throw Error(`Unrecognized key: "${e}"`);if(!v[e])continue;l[e]=r?new r({type:"optional",innerType:$[e]}):$[e]}else for(let e in $)l[e]=r?new r({type:"optional",innerType:$[e]}):$[e];return vr(this,"shape",l),l},checks:[]});return q(i,u)}function _I(r,i,v){let t=rr(i._zod.def,{get shape(){let n=i._zod.def.shape,o={...n};if(v)for(let u in v){if(!(u in o))throw Error(`Unrecognized key: "${u}"`);if(!v[u])continue;o[u]=new r({type:"nonoptional",innerType:n[u]})}else for(let u in n)o[u]=new r({type:"nonoptional",innerType:n[u]});return vr(this,"shape",o),o}});return q(i,t)}function ur(r,i=0){if(r.aborted===!0)return!0;for(let v=i;v<r.issues.length;v++)if(r.issues[v]?.continue!==!0)return!0;return!1}function B(r,i){return i.map((v)=>{var t;return(t=v).path??(t.path=[]),v.path.unshift(r),v})}function sr(r){return typeof r==="string"?r:r?.message}function F(r,i,v){let t={...r,path:r.path??[]};if(!r.message){let n=sr(r.inst?._zod.def?.error?.(r))??sr(i?.error?.(r))??sr(v.customError?.(r))??sr(v.localeError?.(r))??"Invalid input";t.message=n}if(delete t.inst,delete t.continue,!i?.reportInput)delete t.input;return t}function vn(r){if(r instanceof Set)return"set";if(r instanceof Map)return"map";if(r instanceof File)return"file";return"unknown"}function tn(r){if(Array.isArray(r))return"array";if(typeof r==="string")return"string";return"unknown"}function k(r){let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let v=r;if(v&&Object.getPrototypeOf(v)!==Object.prototype&&"constructor"in v&&v.constructor)return v.constructor.name}}return i}function jr(...r){let[i,v,t]=r;if(typeof i==="string")return{message:i,code:"custom",input:v,inst:t};return{...i}}function UI(r){return Object.entries(r).filter(([i,v])=>{return Number.isNaN(Number.parseInt(i,10))}).map((i)=>i[1])}function Je(r){let i=atob(r),v=new Uint8Array(i.length);for(let t=0;t<i.length;t++)v[t]=i.charCodeAt(t);return v}function Le(r){let i="";for(let v=0;v<r.length;v++)i+=String.fromCharCode(r[v]);return btoa(i)}function kI(r){let i=r.replace(/-/g,"+").replace(/_/g,"/"),v="=".repeat((4-i.length%4)%4);return Je(i+v)}function DI(r){return Le(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function wI(r){let i=r.replace(/^0x/,"");if(i.length%2!==0)throw Error("Invalid hex string length");let v=new Uint8Array(i.length/2);for(let t=0;t<i.length;t+=2)v[t/2]=Number.parseInt(i.slice(t,t+2),16);return v}function NI(r){return Array.from(r).map((i)=>i.toString(16).padStart(2,"0")).join("")}class Ee{constructor(...r){}}var Ge=(r,i)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:i,enumerable:!1}),r.message=JSON.stringify(i,Or,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},un=c("$ZodError",Ge),T=c("$ZodError",Ge,{Parent:Error});function $n(r,i=(v)=>v.message){let v={},t=[];for(let n of r.issues)if(n.path.length>0)v[n.path[0]]=v[n.path[0]]||[],v[n.path[0]].push(i(n));else t.push(i(n));return{formErrors:t,fieldErrors:v}}function gn(r,i=(v)=>v.message){let v={_errors:[]},t=(n)=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map((u)=>t({issues:u}));else if(o.code==="invalid_key")t({issues:o.issues});else if(o.code==="invalid_element")t({issues:o.issues});else if(o.path.length===0)v._errors.push(i(o));else{let u=v,$=0;while($<o.path.length){let l=o.path[$];if($!==o.path.length-1)u[l]=u[l]||{_errors:[]};else u[l]=u[l]||{_errors:[]},u[l]._errors.push(i(o));u=u[l],$++}}};return t(r),v}function Vo(r,i=(v)=>v.message){let v={errors:[]},t=(n,o=[])=>{var u,$;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map((e)=>t({issues:e},l.path));else if(l.code==="invalid_key")t({issues:l.issues},l.path);else if(l.code==="invalid_element")t({issues:l.issues},l.path);else{let e=[...o,...l.path];if(e.length===0){v.errors.push(i(l));continue}let I=v,_=0;while(_<e.length){let N=e[_],z=_===e.length-1;if(typeof N==="string")I.properties??(I.properties={}),(u=I.properties)[N]??(u[N]={errors:[]}),I=I.properties[N];else I.items??(I.items=[]),($=I.items)[N]??($[N]={errors:[]}),I=I.items[N];if(z)I.errors.push(i(l));_++}}};return t(r),v}function We(r){let i=[],v=r.map((t)=>typeof t==="object"?t.key:t);for(let t of v)if(typeof t==="number")i.push(`[${t}]`);else if(typeof t==="symbol")i.push(`[${JSON.stringify(String(t))}]`);else if(/[^\w$]/.test(t))i.push(`[${JSON.stringify(t)}]`);else{if(i.length)i.push(".");i.push(t)}return i.join("")}function Ao(r){let i=[],v=[...r.issues].sort((t,n)=>(t.path??[]).length-(n.path??[]).length);for(let t of v)if(i.push(`✖ ${t.message}`),t.path?.length)i.push(` → at ${We(t.path)}`);return i.join(`
2
2
  `)}var Jr=(r)=>(i,v,t,n)=>{let o=t?Object.assign(t,{async:!1}):{async:!1},u=i._zod.run({value:v,issues:[]},o);if(u instanceof Promise)throw new f;if(u.issues.length){let $=new(n?.Err??r)(u.issues.map((l)=>F(l,o,A())));throw Qn($,n?.callee),$}return u.value},mn=Jr(T),Lr=(r)=>async(i,v,t,n)=>{let o=t?Object.assign(t,{async:!0}):{async:!0},u=i._zod.run({value:v,issues:[]},o);if(u instanceof Promise)u=await u;if(u.issues.length){let $=new(n?.Err??r)(u.issues.map((l)=>F(l,o,A())));throw Qn($,n?.callee),$}return u.value},Fn=Lr(T),Er=(r)=>(i,v,t)=>{let n=t?{...t,async:!1}:{async:!1},o=i._zod.run({value:v,issues:[]},n);if(o instanceof Promise)throw new f;return o.issues.length?{success:!1,error:new(r??un)(o.issues.map((u)=>F(u,n,A())))}:{success:!0,data:o.value}},Xo=Er(T),Gr=(r)=>async(i,v,t)=>{let n=t?Object.assign(t,{async:!0}):{async:!0},o=i._zod.run({value:v,issues:[]},n);if(o instanceof Promise)o=await o;return o.issues.length?{success:!1,error:new r(o.issues.map((u)=>F(u,n,A())))}:{success:!0,data:o.value}},Ko=Gr(T),Tn=(r)=>(i,v,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Jr(r)(i,v,n)},SI=Tn(T),Hn=(r)=>(i,v,t)=>{return Jr(r)(i,v,t)},OI=Hn(T),Bn=(r)=>async(i,v,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Lr(r)(i,v,n)},PI=Bn(T),Mn=(r)=>async(i,v,t)=>{return Lr(r)(i,v,t)},jI=Mn(T),Rn=(r)=>(i,v,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Er(r)(i,v,n)},JI=Rn(T),xn=(r)=>(i,v,t)=>{return Er(r)(i,v,t)},LI=xn(T),Zn=(r)=>async(i,v,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Gr(r)(i,v,n)},EI=Zn(T),dn=(r)=>async(i,v,t)=>{return Gr(r)(i,v,t)},GI=dn(T);var x={};s(x,{xid:()=>mo,uuid7:()=>XI,uuid6:()=>AI,uuid4:()=>VI,uuid:()=>_r,uppercase:()=>gv,unicodeEmail:()=>Ve,undefined:()=>uv,ulid:()=>Qo,time:()=>so,string:()=>nv,sha512_hex:()=>sI,sha512_base64url:()=>n4,sha512_base64:()=>r4,sha384_hex:()=>hI,sha384_base64url:()=>pI,sha384_base64:()=>aI,sha256_hex:()=>CI,sha256_base64url:()=>yI,sha256_base64:()=>fI,sha1_hex:()=>xI,sha1_base64url:()=>dI,sha1_base64:()=>ZI,rfc5322Email:()=>qI,number:()=>en,null:()=>tv,nanoid:()=>To,md5_hex:()=>BI,md5_base64url:()=>RI,md5_base64:()=>MI,mac:()=>Co,lowercase:()=>$v,ksuid:()=>Fo,ipv6:()=>Zo,ipv4:()=>xo,integer:()=>ov,idnEmail:()=>YI,html5Email:()=>KI,hostname:()=>FI,hex:()=>HI,guid:()=>Bo,extendedDuration:()=>WI,emoji:()=>Ro,email:()=>Mo,e164:()=>ao,duration:()=>Ho,domain:()=>TI,datetime:()=>rv,date:()=>po,cuid2:()=>Yo,cuid:()=>qo,cidrv6:()=>yo,cidrv4:()=>fo,browserEmail:()=>QI,boolean:()=>vv,bigint:()=>iv,base64url:()=>Cn,base64:()=>ho});var qo=/^[cC][^\s-]{8,}$/,Yo=/^[0-9a-z]+$/,Qo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mo=/^[0-9a-vA-V]{20}$/,Fo=/^[A-Za-z0-9]{27}$/,To=/^[a-zA-Z0-9_-]{21}$/,Ho=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,WI=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Bo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,_r=(r)=>{if(!r)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},VI=_r(4),AI=_r(6),XI=_r(7),Mo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,KI=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,qI=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ve=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,YI=Ve,QI=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ro(){return new RegExp(mI,"u")}var xo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Co=(r)=>{let i=R(r??":");return new RegExp(`^(?:[0-9A-F]{2}${i}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${i}){5}[0-9a-f]{2}$`)},fo=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,yo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ho=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cn=/^[A-Za-z0-9_-]*$/,FI=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,TI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ao=/^\+[1-9]\d{6,14}$/,Ae="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",po=new RegExp(`^${Ae}$`);function Xe(r){return typeof r.precision==="number"?r.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":r.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${r.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function so(r){return new RegExp(`^${Xe(r)}$`)}function rv(r){let i=Xe({precision:r.precision}),v=["Z"];if(r.local)v.push("");if(r.offset)v.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let t=`${i}(?:${v.join("|")})`;return new RegExp(`^${Ae}T(?:${t})$`)}var nv=(r)=>{let i=r?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${i}$`)},iv=/^-?\d+n?$/,ov=/^-?\d+$/,en=/^-?\d+(?:\.\d+)?$/,vv=/^(?:true|false)$/i,tv=/^null$/i;var uv=/^undefined$/i;var $v=/^[^A-Z]*$/,gv=/^[^a-z]*$/,HI=/^[0-9a-fA-F]*$/;function ln(r,i){return new RegExp(`^[A-Za-z0-9+/]{${r}}${i}$`)}function cn(r){return new RegExp(`^[A-Za-z0-9_-]{${r}}$`)}var BI=/^[0-9a-fA-F]{32}$/,MI=ln(22,"=="),RI=cn(22),xI=/^[0-9a-fA-F]{40}$/,ZI=ln(27,"="),dI=cn(27),CI=/^[0-9a-fA-F]{64}$/,fI=ln(43,"="),yI=cn(43),hI=/^[0-9a-fA-F]{96}$/,aI=ln(64,""),pI=cn(64),sI=/^[0-9a-fA-F]{128}$/,r4=ln(86,"=="),n4=cn(86);var W=c("$ZodCheck",(r,i)=>{var v;r._zod??(r._zod={}),r._zod.def=i,(v=r._zod).onattach??(v.onattach=[])}),qe={number:"number",bigint:"bigint",object:"date"},fn=c("$ZodCheckLessThan",(r,i)=>{W.init(r,i);let v=qe[typeof i.value];r._zod.onattach.push((t)=>{let n=t._zod.bag,o=(i.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(i.value<o)if(i.inclusive)n.maximum=i.value;else n.exclusiveMaximum=i.value}),r._zod.check=(t)=>{if(i.inclusive?t.value<=i.value:t.value<i.value)return;t.issues.push({origin:v,code:"too_big",maximum:typeof i.value==="object"?i.value.getTime():i.value,input:t.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),yn=c("$ZodCheckGreaterThan",(r,i)=>{W.init(r,i);let v=qe[typeof i.value];r._zod.onattach.push((t)=>{let n=t._zod.bag,o=(i.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(i.value>o)if(i.inclusive)n.minimum=i.value;else n.exclusiveMinimum=i.value}),r._zod.check=(t)=>{if(i.inclusive?t.value>=i.value:t.value>i.value)return;t.issues.push({origin:v,code:"too_small",minimum:typeof i.value==="object"?i.value.getTime():i.value,input:t.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),ev=c("$ZodCheckMultipleOf",(r,i)=>{W.init(r,i),r._zod.onattach.push((v)=>{var t;(t=v._zod.bag).multipleOf??(t.multipleOf=i.value)}),r._zod.check=(v)=>{if(typeof v.value!==typeof i.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof v.value==="bigint"?v.value%i.value===BigInt(0):Oo(v.value,i.value)===0)return;v.issues.push({origin:typeof v.value,code:"not_multiple_of",divisor:i.value,input:v.value,inst:r,continue:!i.abort})}}),lv=c("$ZodCheckNumberFormat",(r,i)=>{W.init(r,i),i.format=i.format||"float64";let v=i.format?.includes("int"),t=v?"int":"number",[n,o]=Go[i.format];r._zod.onattach.push((u)=>{let $=u._zod.bag;if($.format=i.format,$.minimum=n,$.maximum=o,v)$.pattern=ov}),r._zod.check=(u)=>{let $=u.value;if(v){if(!Number.isInteger($)){u.issues.push({expected:t,format:i.format,code:"invalid_type",continue:!1,input:$,inst:r});return}if(!Number.isSafeInteger($)){if($>0)u.issues.push({input:$,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:t,inclusive:!0,continue:!i.abort});else u.issues.push({input:$,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:t,inclusive:!0,continue:!i.abort});return}}if($<n)u.issues.push({origin:"number",input:$,code:"too_small",minimum:n,inclusive:!0,inst:r,continue:!i.abort});if($>o)u.issues.push({origin:"number",input:$,code:"too_big",maximum:o,inclusive:!0,inst:r,continue:!i.abort})}}),cv=c("$ZodCheckBigIntFormat",(r,i)=>{W.init(r,i);let[v,t]=Wo[i.format];r._zod.onattach.push((n)=>{let o=n._zod.bag;o.format=i.format,o.minimum=v,o.maximum=t}),r._zod.check=(n)=>{let o=n.value;if(o<v)n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:v,inclusive:!0,inst:r,continue:!i.abort});if(o>t)n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:t,inclusive:!0,inst:r,continue:!i.abort})}}),Iv=c("$ZodCheckMaxSize",(r,i)=>{var v;W.init(r,i),(v=r._zod.def).when??(v.when=(t)=>{let n=t.value;return!or(n)&&n.size!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)t._zod.bag.maximum=i.maximum}),r._zod.check=(t)=>{let n=t.value;if(n.size<=i.maximum)return;t.issues.push({origin:vn(n),code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),bv=c("$ZodCheckMinSize",(r,i)=>{var v;W.init(r,i),(v=r._zod.def).when??(v.when=(t)=>{let n=t.value;return!or(n)&&n.size!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)t._zod.bag.minimum=i.minimum}),r._zod.check=(t)=>{let n=t.value;if(n.size>=i.minimum)return;t.issues.push({origin:vn(n),code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),_v=c("$ZodCheckSizeEquals",(r,i)=>{var v;W.init(r,i),(v=r._zod.def).when??(v.when=(t)=>{let n=t.value;return!or(n)&&n.size!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.minimum=i.size,n.maximum=i.size,n.size=i.size}),r._zod.check=(t)=>{let n=t.value,o=n.size;if(o===i.size)return;let u=o>i.size;t.issues.push({origin:vn(n),...u?{code:"too_big",maximum:i.size}:{code:"too_small",minimum:i.size},inclusive:!0,exact:!0,input:t.value,inst:r,continue:!i.abort})}}),Uv=c("$ZodCheckMaxLength",(r,i)=>{var v;W.init(r,i),(v=r._zod.def).when??(v.when=(t)=>{let n=t.value;return!or(n)&&n.length!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)t._zod.bag.maximum=i.maximum}),r._zod.check=(t)=>{let n=t.value;if(n.length<=i.maximum)return;let u=tn(n);t.issues.push({origin:u,code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),kv=c("$ZodCheckMinLength",(r,i)=>{var v;W.init(r,i),(v=r._zod.def).when??(v.when=(t)=>{let n=t.value;return!or(n)&&n.length!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)t._zod.bag.minimum=i.minimum}),r._zod.check=(t)=>{let n=t.value;if(n.length>=i.minimum)return;let u=tn(n);t.issues.push({origin:u,code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),Dv=c("$ZodCheckLengthEquals",(r,i)=>{var v;W.init(r,i),(v=r._zod.def).when??(v.when=(t)=>{let n=t.value;return!or(n)&&n.length!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.minimum=i.length,n.maximum=i.length,n.length=i.length}),r._zod.check=(t)=>{let n=t.value,o=n.length;if(o===i.length)return;let u=tn(n),$=o>i.length;t.issues.push({origin:u,...$?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:t.value,inst:r,continue:!i.abort})}}),Wr=c("$ZodCheckStringFormat",(r,i)=>{var v,t;if(W.init(r,i),r._zod.onattach.push((n)=>{let o=n._zod.bag;if(o.format=i.format,i.pattern)o.patterns??(o.patterns=new Set),o.patterns.add(i.pattern)}),i.pattern)(v=r._zod).check??(v.check=(n)=>{if(i.pattern.lastIndex=0,i.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:i.format,input:n.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:r,continue:!i.abort})});else(t=r._zod).check??(t.check=()=>{})}),wv=c("$ZodCheckRegex",(r,i)=>{Wr.init(r,i),r._zod.check=(v)=>{if(i.pattern.lastIndex=0,i.pattern.test(v.value))return;v.issues.push({origin:"string",code:"invalid_format",format:"regex",input:v.value,pattern:i.pattern.toString(),inst:r,continue:!i.abort})}}),Nv=c("$ZodCheckLowerCase",(r,i)=>{i.pattern??(i.pattern=$v),Wr.init(r,i)}),zv=c("$ZodCheckUpperCase",(r,i)=>{i.pattern??(i.pattern=gv),Wr.init(r,i)}),Sv=c("$ZodCheckIncludes",(r,i)=>{W.init(r,i);let v=R(i.includes),t=new RegExp(typeof i.position==="number"?`^.{${i.position}}${v}`:v);i.pattern=t,r._zod.onattach.push((n)=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),r._zod.check=(n)=>{if(n.value.includes(i.includes,i.position))return;n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:n.value,inst:r,continue:!i.abort})}}),Ov=c("$ZodCheckStartsWith",(r,i)=>{W.init(r,i);let v=new RegExp(`^${R(i.prefix)}.*`);i.pattern??(i.pattern=v),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(v)}),r._zod.check=(t)=>{if(t.value.startsWith(i.prefix))return;t.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:t.value,inst:r,continue:!i.abort})}}),Pv=c("$ZodCheckEndsWith",(r,i)=>{W.init(r,i);let v=new RegExp(`.*${R(i.suffix)}$`);i.pattern??(i.pattern=v),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(v)}),r._zod.check=(t)=>{if(t.value.endsWith(i.suffix))return;t.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:t.value,inst:r,continue:!i.abort})}});function Ke(r,i,v){if(r.issues.length)i.issues.push(...B(v,r.issues))}var jv=c("$ZodCheckProperty",(r,i)=>{W.init(r,i),r._zod.check=(v)=>{let t=i.schema._zod.run({value:v.value[i.property],issues:[]},{});if(t instanceof Promise)return t.then((n)=>Ke(n,v,i.property));Ke(t,v,i.property);return}}),Jv=c("$ZodCheckMimeType",(r,i)=>{W.init(r,i);let v=new Set(i.mime);r._zod.onattach.push((t)=>{t._zod.bag.mime=i.mime}),r._zod.check=(t)=>{if(v.has(t.value.type))return;t.issues.push({code:"invalid_value",values:i.mime,input:t.value.type,inst:r,continue:!i.abort})}}),Lv=c("$ZodCheckOverwrite",(r,i)=>{W.init(r,i),r._zod.check=(v)=>{v.value=i.tx(v.value)}});class hn{constructor(r=[]){if(this.content=[],this.indent=0,this)this.args=r}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r==="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let v=r.split(`
3
3
  `).filter((o)=>o),t=Math.min(...v.map((o)=>o.length-o.trimStart().length)),n=v.map((o)=>o.slice(t)).map((o)=>" ".repeat(this.indent*2)+o);for(let o of n)this.content.push(o)}compile(){let r=Function,i=this?.args,t=[...(this?.content??[""]).map((n)=>` ${n}`)];return new r(...i,t.join(`
4
4
  `))}}var Ev={major:4,minor:3,patch:5};var O=c("$ZodType",(r,i)=>{var v;r??(r={}),r._zod.def=i,r._zod.bag=r._zod.bag||{},r._zod.version=Ev;let t=[...r._zod.def.checks??[]];if(r._zod.traits.has("$ZodCheck"))t.unshift(r);for(let n of t)for(let o of n._zod.onattach)o(r);if(t.length===0)(v=r._zod).deferred??(v.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let n=(u,$,l)=>{let e=ur(u),I;for(let _ of $){if(_._zod.def.when){if(!_._zod.def.when(u))continue}else if(e)continue;let N=u.issues.length,z=_._zod.check(u);if(z instanceof Promise&&l?.async===!1)throw new f;if(I||z instanceof Promise)I=(I??Promise.resolve()).then(async()=>{if(await z,u.issues.length===N)return;if(!e)e=ur(u,N)});else{if(u.issues.length===N)continue;if(!e)e=ur(u,N)}}if(I)return I.then(()=>{return u});return u},o=(u,$,l)=>{if(ur(u))return u.aborted=!0,u;let e=n($,t,l);if(e instanceof Promise){if(l.async===!1)throw new f;return e.then((I)=>r._zod.parse(I,l))}return r._zod.parse(e,l)};r._zod.run=(u,$)=>{if($.skipChecks)return r._zod.parse(u,$);if($.direction==="backward"){let e=r._zod.parse({value:u.value,issues:[]},{...$,skipChecks:!0});if(e instanceof Promise)return e.then((I)=>{return o(I,u,$)});return o(e,u,$)}let l=r._zod.parse(u,$);if(l instanceof Promise){if($.async===!1)throw new f;return l.then((e)=>n(e,t,$))}return n(l,t,$)}}j(r,"~standard",()=>({validate:(n)=>{try{let o=Xo(r,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch(o){return Ko(r,n).then((u)=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),Ur=c("$ZodString",(r,i)=>{O.init(r,i),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??nv(r._zod.bag),r._zod.parse=(v,t)=>{if(i.coerce)try{v.value=String(v.value)}catch(n){}if(typeof v.value==="string")return v;return v.issues.push({expected:"string",code:"invalid_type",input:v.value,inst:r}),v}}),E=c("$ZodStringFormat",(r,i)=>{Wr.init(r,i),Ur.init(r,i)}),Wv=c("$ZodGUID",(r,i)=>{i.pattern??(i.pattern=Bo),E.init(r,i)}),Vv=c("$ZodUUID",(r,i)=>{if(i.version){let t={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(t===void 0)throw Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=_r(t))}else i.pattern??(i.pattern=_r());E.init(r,i)}),Av=c("$ZodEmail",(r,i)=>{i.pattern??(i.pattern=Mo),E.init(r,i)}),Xv=c("$ZodURL",(r,i)=>{E.init(r,i),r._zod.check=(v)=>{try{let t=v.value.trim(),n=new URL(t);if(i.hostname){if(i.hostname.lastIndex=0,!i.hostname.test(n.hostname))v.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:v.value,inst:r,continue:!i.abort})}if(i.protocol){if(i.protocol.lastIndex=0,!i.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol))v.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:v.value,inst:r,continue:!i.abort})}if(i.normalize)v.value=n.href;else v.value=t;return}catch(t){v.issues.push({code:"invalid_format",format:"url",input:v.value,inst:r,continue:!i.abort})}}}),Kv=c("$ZodEmoji",(r,i)=>{i.pattern??(i.pattern=Ro()),E.init(r,i)}),qv=c("$ZodNanoID",(r,i)=>{i.pattern??(i.pattern=To),E.init(r,i)}),Yv=c("$ZodCUID",(r,i)=>{i.pattern??(i.pattern=qo),E.init(r,i)}),Qv=c("$ZodCUID2",(r,i)=>{i.pattern??(i.pattern=Yo),E.init(r,i)}),mv=c("$ZodULID",(r,i)=>{i.pattern??(i.pattern=Qo),E.init(r,i)}),Fv=c("$ZodXID",(r,i)=>{i.pattern??(i.pattern=mo),E.init(r,i)}),Tv=c("$ZodKSUID",(r,i)=>{i.pattern??(i.pattern=Fo),E.init(r,i)}),Hv=c("$ZodISODateTime",(r,i)=>{i.pattern??(i.pattern=rv(i)),E.init(r,i)}),Bv=c("$ZodISODate",(r,i)=>{i.pattern??(i.pattern=po),E.init(r,i)}),Mv=c("$ZodISOTime",(r,i)=>{i.pattern??(i.pattern=so(i)),E.init(r,i)}),Rv=c("$ZodISODuration",(r,i)=>{i.pattern??(i.pattern=Ho),E.init(r,i)}),xv=c("$ZodIPv4",(r,i)=>{i.pattern??(i.pattern=xo),E.init(r,i),r._zod.bag.format="ipv4"}),Zv=c("$ZodIPv6",(r,i)=>{i.pattern??(i.pattern=Zo),E.init(r,i),r._zod.bag.format="ipv6",r._zod.check=(v)=>{try{new URL(`http://[${v.value}]`)}catch{v.issues.push({code:"invalid_format",format:"ipv6",input:v.value,inst:r,continue:!i.abort})}}}),dv=c("$ZodMAC",(r,i)=>{i.pattern??(i.pattern=Co(i.delimiter)),E.init(r,i),r._zod.bag.format="mac"}),Cv=c("$ZodCIDRv4",(r,i)=>{i.pattern??(i.pattern=fo),E.init(r,i)}),fv=c("$ZodCIDRv6",(r,i)=>{i.pattern??(i.pattern=yo),E.init(r,i),r._zod.check=(v)=>{let t=v.value.split("/");try{if(t.length!==2)throw Error();let[n,o]=t;if(!o)throw Error();let u=Number(o);if(`${u}`!==o)throw Error();if(u<0||u>128)throw Error();new URL(`http://[${n}]`)}catch{v.issues.push({code:"invalid_format",format:"cidrv6",input:v.value,inst:r,continue:!i.abort})}}});function yv(r){if(r==="")return!0;if(r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}var hv=c("$ZodBase64",(r,i)=>{i.pattern??(i.pattern=ho),E.init(r,i),r._zod.bag.contentEncoding="base64",r._zod.check=(v)=>{if(yv(v.value))return;v.issues.push({code:"invalid_format",format:"base64",input:v.value,inst:r,continue:!i.abort})}});function Ce(r){if(!Cn.test(r))return!1;let i=r.replace(/[-_]/g,(t)=>t==="-"?"+":"/"),v=i.padEnd(Math.ceil(i.length/4)*4,"=");return yv(v)}var av=c("$ZodBase64URL",(r,i)=>{i.pattern??(i.pattern=Cn),E.init(r,i),r._zod.bag.contentEncoding="base64url",r._zod.check=(v)=>{if(Ce(v.value))return;v.issues.push({code:"invalid_format",format:"base64url",input:v.value,inst:r,continue:!i.abort})}}),pv=c("$ZodE164",(r,i)=>{i.pattern??(i.pattern=ao),E.init(r,i)});function fe(r,i=null){try{let v=r.split(".");if(v.length!==3)return!1;let[t]=v;if(!t)return!1;let n=JSON.parse(atob(t));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(i&&(!("alg"in n)||n.alg!==i))return!1;return!0}catch{return!1}}var sv=c("$ZodJWT",(r,i)=>{E.init(r,i),r._zod.check=(v)=>{if(fe(v.value,i.alg))return;v.issues.push({code:"invalid_format",format:"jwt",input:v.value,inst:r,continue:!i.abort})}}),rt=c("$ZodCustomStringFormat",(r,i)=>{E.init(r,i),r._zod.check=(v)=>{if(i.fn(v.value))return;v.issues.push({code:"invalid_format",format:i.format,input:v.value,inst:r,continue:!i.abort})}}),ii=c("$ZodNumber",(r,i)=>{O.init(r,i),r._zod.pattern=r._zod.bag.pattern??en,r._zod.parse=(v,t)=>{if(i.coerce)try{v.value=Number(v.value)}catch(u){}let n=v.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return v;let o=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?"Infinity":void 0:void 0;return v.issues.push({expected:"number",code:"invalid_type",input:n,inst:r,...o?{received:o}:{}}),v}}),nt=c("$ZodNumberFormat",(r,i)=>{lv.init(r,i),ii.init(r,i)}),In=c("$ZodBoolean",(r,i)=>{O.init(r,i),r._zod.pattern=vv,r._zod.parse=(v,t)=>{if(i.coerce)try{v.value=Boolean(v.value)}catch(o){}let n=v.value;if(typeof n==="boolean")return v;return v.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:r}),v}}),oi=c("$ZodBigInt",(r,i)=>{O.init(r,i),r._zod.pattern=iv,r._zod.parse=(v,t)=>{if(i.coerce)try{v.value=BigInt(v.value)}catch(n){}if(typeof v.value==="bigint")return v;return v.issues.push({expected:"bigint",code:"invalid_type",input:v.value,inst:r}),v}}),it=c("$ZodBigIntFormat",(r,i)=>{cv.init(r,i),oi.init(r,i)}),ot=c("$ZodSymbol",(r,i)=>{O.init(r,i),r._zod.parse=(v,t)=>{let n=v.value;if(typeof n==="symbol")return v;return v.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:r}),v}}),vt=c("$ZodUndefined",(r,i)=>{O.init(r,i),r._zod.pattern=uv,r._zod.values=new Set([void 0]),r._zod.optin="optional",r._zod.optout="optional",r._zod.parse=(v,t)=>{let n=v.value;if(typeof n>"u")return v;return v.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:r}),v}}),tt=c("$ZodNull",(r,i)=>{O.init(r,i),r._zod.pattern=tv,r._zod.values=new Set([null]),r._zod.parse=(v,t)=>{let n=v.value;if(n===null)return v;return v.issues.push({expected:"null",code:"invalid_type",input:n,inst:r}),v}}),ut=c("$ZodAny",(r,i)=>{O.init(r,i),r._zod.parse=(v)=>v}),$t=c("$ZodUnknown",(r,i)=>{O.init(r,i),r._zod.parse=(v)=>v}),gt=c("$ZodNever",(r,i)=>{O.init(r,i),r._zod.parse=(v,t)=>{return v.issues.push({expected:"never",code:"invalid_type",input:v.value,inst:r}),v}}),et=c("$ZodVoid",(r,i)=>{O.init(r,i),r._zod.parse=(v,t)=>{let n=v.value;if(typeof n>"u")return v;return v.issues.push({expected:"void",code:"invalid_type",input:n,inst:r}),v}}),lt=c("$ZodDate",(r,i)=>{O.init(r,i),r._zod.parse=(v,t)=>{if(i.coerce)try{v.value=new Date(v.value)}catch($){}let n=v.value,o=n instanceof Date;if(o&&!Number.isNaN(n.getTime()))return v;return v.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:r}),v}});function Qe(r,i,v){if(r.issues.length)i.issues.push(...B(v,r.issues));i.value[v]=r.value}var ct=c("$ZodArray",(r,i)=>{O.init(r,i),r._zod.parse=(v,t)=>{let n=v.value;if(!Array.isArray(n))return v.issues.push({expected:"array",code:"invalid_type",input:n,inst:r}),v;v.value=Array(n.length);let o=[];for(let u=0;u<n.length;u++){let $=n[u],l=i.element._zod.run({value:$,issues:[]},t);if(l instanceof Promise)o.push(l.then((e)=>Qe(e,v,u)));else Qe(l,v,u)}if(o.length)return Promise.all(o).then(()=>v);return v}});function ni(r,i,v,t,n){if(r.issues.length){if(n&&!(v in t))return;i.issues.push(...B(v,r.issues))}if(r.value===void 0){if(v in t)i.value[v]=void 0}else i.value[v]=r.value}function ye(r){let i=Object.keys(r.shape);for(let t of i)if(!r.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let v=Eo(r.shape);return{...r,keys:i,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(v)}}function he(r,i,v,t,n,o){let u=[],$=n.keySet,l=n.catchall._zod,e=l.def.type,I=l.optout==="optional";for(let _ in i){if($.has(_))continue;if(e==="never"){u.push(_);continue}let N=l.run({value:i[_],issues:[]},t);if(N instanceof Promise)r.push(N.then((z)=>ni(z,v,_,i,I)));else ni(N,v,_,i,I)}if(u.length)v.issues.push({code:"unrecognized_keys",keys:u,input:i,inst:o});if(!r.length)return v;return Promise.all(r).then(()=>{return v})}var ae=c("$ZodObject",(r,i)=>{if(O.init(r,i),!Object.getOwnPropertyDescriptor(i,"shape")?.get){let $=i.shape;Object.defineProperty(i,"shape",{get:()=>{let l={...$};return Object.defineProperty(i,"shape",{value:l}),l}})}let t=Pr(()=>ye(i));j(r._zod,"propValues",()=>{let $=i.shape,l={};for(let e in $){let I=$[e]._zod;if(I.values){l[e]??(l[e]=new Set);for(let _ of I.values)l[e].add(_)}}return l});let n=br,o=i.catchall,u;r._zod.parse=($,l)=>{u??(u=t.value);let e=$.value;if(!n(e))return $.issues.push({expected:"object",code:"invalid_type",input:e,inst:r}),$;$.value={};let I=[],_=u.shape;for(let N of u.keys){let z=_[N],J=z._zod.optout==="optional",V=z._zod.run({value:e[N],issues:[]},l);if(V instanceof Promise)I.push(V.then((Sr)=>ni(Sr,$,N,e,J)));else ni(V,$,N,e,J)}if(!o)return I.length?Promise.all(I).then(()=>$):$;return he(I,e,$,l,t.value,r)}}),It=c("$ZodObjectJIT",(r,i)=>{ae.init(r,i);let v=r._zod.parse,t=Pr(()=>ye(i)),n=(N)=>{let z=new hn(["shape","payload","ctx"]),J=t.value,V=(C)=>{let m=Yn(C);return`shape[${m}]._zod.run({ value: input[${m}], issues: [] }, ctx)`};z.write("const input = payload.value;");let Sr=Object.create(null),Vc=0;for(let C of J.keys)Sr[C]=`key_${Vc++}`;z.write("const newResult = {};");for(let C of J.keys){let m=Sr[C],Z=Yn(C),Xc=N[C]?._zod?.optout==="optional";if(z.write(`const ${m} = ${V(C)};`),Xc)z.write(`
@@ -55,7 +55,7 @@ Individual style keys are optional - hosts may provide any subset of these value
55
55
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
56
56
 
57
57
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
58
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),H6=g.object({method:g.literal("ui/open-link"),params:g.object({url:g.string().describe("URL to open in the host's browser")})}),be=g.object({isError:g.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),_e=g.object({isError:g.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),B6=g.object({method:g.literal("ui/notifications/sandbox-proxy-ready"),params:g.object({})}),ko=g.object({connectDomains:g.array(g.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:g.array(g.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:g.array(g.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:g.array(g.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),Do=g.object({camera:g.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:g.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:g.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:g.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")}),M6=g.object({method:g.literal("ui/notifications/size-changed"),params:g.object({width:g.number().optional().describe("New width in pixels."),height:g.number().optional().describe("New height in pixels.")})}),Ue=g.object({method:g.literal("ui/notifications/tool-input"),params:g.object({arguments:g.record(g.string(),g.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),ke=g.object({method:g.literal("ui/notifications/tool-input-partial"),params:g.object({arguments:g.record(g.string(),g.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),De=g.object({method:g.literal("ui/notifications/tool-cancelled"),params:g.object({reason:g.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Jc=g.object({fonts:g.string().optional().describe("CSS for font loading (@font-face rules or")}),Lc=g.object({variables:T6.optional().describe("CSS variables for theming the app."),css:Jc.optional().describe("CSS blocks that apps can inject.")}),we=g.object({method:g.literal("ui/resource-teardown"),params:g.object({})}),R6=g.record(g.string(),g.unknown()),Ie=g.object({text:g.object({}).optional().describe("Host supports text content blocks."),image:g.object({}).optional().describe("Host supports image content blocks."),audio:g.object({}).optional().describe("Host supports audio content blocks."),resource:g.object({}).optional().describe("Host supports resource content blocks."),resourceLink:g.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:g.object({}).optional().describe("Host supports structured content.")}),Ec=g.object({experimental:g.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:g.object({}).optional().describe("Host supports opening external URLs."),serverTools:g.object({listChanged:g.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:g.object({listChanged:g.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:g.object({}).optional().describe("Host accepts log messages."),sandbox:g.object({permissions:Do.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:ko.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Ie.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Ie.optional().describe("Host supports receiving content messages (ui/message) from the Guest UI.")}),Gc=g.object({experimental:g.object({}).optional().describe("Experimental features (structure TBD)."),tools:g.object({listChanged:g.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call.")}),x6=g.object({method:g.literal("ui/notifications/initialized"),params:g.object({}).optional()}),Z6=g.object({csp:ko.optional().describe("Content Security Policy configuration."),permissions:Do.optional().describe("Sandbox permissions requested by the UI."),domain:g.string().optional().describe("Dedicated origin for widget sandbox."),prefersBorder:g.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")}),d6=g.object({method:g.literal("ui/request-display-mode"),params:g.object({mode:Uo.describe("The display mode being requested.")})}),Ne=g.object({mode:Uo.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Wc=g.union([g.literal("model"),g.literal("app")]).describe("Tool visibility scope - who can access the tool."),C6=g.object({resourceUri:g.string().optional(),visibility:g.array(Wc).optional().describe(`Who can access this tool. Default: ["model", "app"]
58
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),H6=g.object({method:g.literal("ui/open-link"),params:g.object({url:g.string().describe("URL to open in the host's browser")})}),be=g.object({isError:g.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),_e=g.object({isError:g.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),B6=g.object({method:g.literal("ui/notifications/sandbox-proxy-ready"),params:g.object({})}),ko=g.object({connectDomains:g.array(g.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:g.array(g.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:g.array(g.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:g.array(g.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),Do=g.object({camera:g.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:g.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:g.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:g.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")}),M6=g.object({method:g.literal("ui/notifications/size-changed"),params:g.object({width:g.number().optional().describe("New width in pixels."),height:g.number().optional().describe("New height in pixels.")})}),Ue=g.object({method:g.literal("ui/notifications/tool-input"),params:g.object({arguments:g.record(g.string(),g.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),ke=g.object({method:g.literal("ui/notifications/tool-input-partial"),params:g.object({arguments:g.record(g.string(),g.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),De=g.object({method:g.literal("ui/notifications/tool-cancelled"),params:g.object({reason:g.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Jc=g.object({fonts:g.string().optional()}),Lc=g.object({variables:T6.optional().describe("CSS variables for theming the app."),css:Jc.optional().describe("CSS blocks that apps can inject.")}),we=g.object({method:g.literal("ui/resource-teardown"),params:g.object({})}),R6=g.record(g.string(),g.unknown()),Ie=g.object({text:g.object({}).optional().describe("Host supports text content blocks."),image:g.object({}).optional().describe("Host supports image content blocks."),audio:g.object({}).optional().describe("Host supports audio content blocks."),resource:g.object({}).optional().describe("Host supports resource content blocks."),resourceLink:g.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:g.object({}).optional().describe("Host supports structured content.")}),Ec=g.object({experimental:g.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:g.object({}).optional().describe("Host supports opening external URLs."),serverTools:g.object({listChanged:g.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:g.object({listChanged:g.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:g.object({}).optional().describe("Host accepts log messages."),sandbox:g.object({permissions:Do.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:ko.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Ie.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Ie.optional().describe("Host supports receiving content messages (ui/message) from the Guest UI.")}),Gc=g.object({experimental:g.object({}).optional().describe("Experimental features (structure TBD)."),tools:g.object({listChanged:g.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call.")}),x6=g.object({method:g.literal("ui/notifications/initialized"),params:g.object({}).optional()}),Z6=g.object({csp:ko.optional().describe("Content Security Policy configuration."),permissions:Do.optional().describe("Sandbox permissions requested by the UI."),domain:g.string().optional().describe("Dedicated origin for widget sandbox."),prefersBorder:g.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")}),d6=g.object({method:g.literal("ui/request-display-mode"),params:g.object({mode:Uo.describe("The display mode being requested.")})}),Ne=g.object({mode:Uo.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Wc=g.union([g.literal("model"),g.literal("app")]).describe("Tool visibility scope - who can access the tool."),C6=g.object({resourceUri:g.string().optional(),visibility:g.array(Wc).optional().describe(`Who can access this tool. Default: ["model", "app"]
59
59
  - "model": Tool visible to and callable by the agent
60
60
  - "app": Tool callable by the app from this server only`)}),f6=g.object({method:g.literal("ui/message"),params:g.object({role:g.literal("user").describe('Message role, currently only "user" is supported.'),content:g.array(Oc).describe("Message content blocks (text, image, etc.).")})}),y6=g.object({method:g.literal("ui/notifications/sandbox-resource-ready"),params:g.object({html:g.string().describe("HTML content to load into the inner iframe."),sandbox:g.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:ko.optional().describe("CSP configuration from resource metadata."),permissions:Do.optional().describe("Sandbox permissions from resource metadata.")})}),ze=g.object({method:g.literal("ui/notifications/tool-result"),params:Y6.describe("Standard MCP tool execution result.")}),Se=g.object({toolInfo:g.object({id:Q6.optional().describe("JSON-RPC id of the tools/call request."),tool:m6.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:jc.optional().describe("Current color theme preference."),styles:Lc.optional().describe("Style configuration for theming the app."),displayMode:Uo.optional().describe("How the UI is currently displayed."),availableDisplayModes:g.array(g.string()).optional().describe("Display modes the host supports."),containerDimensions:g.union([g.object({height:g.number().describe("Fixed container height in pixels.")}),g.object({maxHeight:g.union([g.number(),g.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(g.union([g.object({width:g.number().describe("Fixed container width in pixels.")}),g.object({maxWidth:g.union([g.number(),g.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
61
61
  container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:g.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:g.string().optional().describe("User's timezone in IANA format."),userAgent:g.string().optional().describe("Host application identifier."),platform:g.union([g.literal("web"),g.literal("desktop"),g.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:g.object({touch:g.boolean().optional().describe("Whether the device supports touch input."),hover:g.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:g.object({top:g.number().describe("Top safe area inset in pixels."),right:g.number().describe("Right safe area inset in pixels."),bottom:g.number().describe("Bottom safe area inset in pixels."),left:g.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Oe=g.object({method:g.literal("ui/notifications/host-context-changed"),params:Se.describe("Partial context update containing only changed fields.")}),h6=g.object({method:g.literal("ui/update-model-context"),params:g.object({content:g.array(Oc).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:g.record(g.string(),g.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),a6=g.object({method:g.literal("ui/initialize"),params:g.object({appInfo:Pc.describe("App identification (name and version)."),appCapabilities:Gc.describe("Features and capabilities this app provides."),protocolVersion:g.string().describe("Protocol version this app supports.")})}),Pe=g.object({protocolVersion:g.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Pc.describe("Host application identification and version."),hostCapabilities:Ec.describe("Features and capabilities provided by the host."),hostContext:Se.describe("Rich context about the host environment.")}).passthrough();function p6(){let r=document.documentElement.getAttribute("data-theme");if(r==="dark"||r==="light")return r;return document.documentElement.classList.contains("dark")?"dark":"light"}function s6(r){let i=document.documentElement;i.setAttribute("data-theme",r),i.style.colorScheme=r}function rb(r,i=document.documentElement){for(let[v,t]of Object.entries(r))if(t!==void 0)i.style.setProperty(v,t)}function nb(r){if(document.getElementById("__mcp-host-fonts"))return;let v=document.createElement("style");v.id="__mcp-host-fonts",v.textContent=r,document.head.appendChild(v)}var Fk="ui/resourceUri",Tk="text/html;profile=mcp-app";class gb extends ib{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;constructor(r,i={},v={autoResize:!0}){super(v);this._appInfo=r;this._capabilities=i;this.options=v;this.setRequestHandler($b,(t)=>{return console.log("Received ping:",t.params),{}}),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(r){this.setNotificationHandler(Ue,(i)=>r(i.params))}set ontoolinputpartial(r){this.setNotificationHandler(ke,(i)=>r(i.params))}set ontoolresult(r){this.setNotificationHandler(ze,(i)=>r(i.params))}set ontoolcancelled(r){this.setNotificationHandler(De,(i)=>r(i.params))}set onhostcontextchanged(r){this.setNotificationHandler(Oe,(i)=>{this._hostContext={...this._hostContext,...i.params},r(i.params)})}set onteardown(r){this.setRequestHandler(we,(i,v)=>r(i.params,v))}set oncalltool(r){this.setRequestHandler(ob,(i,v)=>r(i.params,v))}set onlisttools(r){this.setRequestHandler(ub,(i,v)=>r(i.params,v))}assertCapabilityForMethod(r){}assertRequestHandlerCapability(r){switch(r){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${r})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${r} registered`)}}assertNotificationCapability(r){}assertTaskCapability(r){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(r){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(r,i){return await this.request({method:"tools/call",params:r},vb,i)}sendMessage(r,i){return this.request({method:"ui/message",params:r},_e,i)}sendLog(r){return this.notification({method:"notifications/message",params:r})}updateModelContext(r,i){return this.request({method:"ui/update-model-context",params:r},tb,i)}openLink(r,i){return this.request({method:"ui/open-link",params:r},be,i)}sendOpenLink=this.openLink;requestDisplayMode(r,i){return this.request({method:"ui/request-display-mode",params:r},Ne,i)}sendSizeChanged(r){return this.notification({method:"ui/notifications/size-changed",params:r})}setupSizeChangedNotifications(){let r=!1,i=0,v=0,t=()=>{if(r)return;r=!0,requestAnimationFrame(()=>{r=!1;let o=document.documentElement,u=o.style.width,$=o.style.height;o.style.width="fit-content",o.style.height="fit-content";let l=o.getBoundingClientRect();o.style.width=u,o.style.height=$;let e=window.innerWidth-o.clientWidth,I=Math.ceil(l.width+e),_=Math.ceil(l.height);if(I!==i||_!==v)i=I,v=_,this.sendSizeChanged({width:I,height:_})})};t();let n=new ResizeObserver(t);return n.observe(document.documentElement),n.observe(document.body),()=>n.disconnect()}async connect(r=new qn(window.parent,window.parent),i){await super.connect(r);try{let v=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:wo}},Pe,i);if(v===void 0)throw Error(`Server sent invalid initialize result: ${v}`);if(this._hostCapabilities=v.hostCapabilities,this._hostInfo=v.hostInfo,this._hostContext=v.hostContext,await this.notification({method:"ui/notifications/initialized"}),this.options?.autoResize)this.setupSizeChangedNotifications()}catch(v){throw this.close(),v}}}export{p6 as getDocumentTheme,rb as applyHostStyleVariables,nb as applyHostFonts,s6 as applyDocumentTheme,Mc as TOOL_RESULT_METHOD,Bc as TOOL_INPUT_PARTIAL_METHOD,Hc as TOOL_INPUT_METHOD,Rc as TOOL_CANCELLED_METHOD,Tc as SIZE_CHANGED_METHOD,Fc as SANDBOX_RESOURCE_READY_METHOD,mc as SANDBOX_PROXY_READY_METHOD,Fk as RESOURCE_URI_META_KEY,Zc as RESOURCE_TEARDOWN_METHOD,Tk as RESOURCE_MIME_TYPE,fc as REQUEST_DISPLAY_MODE_METHOD,qn as PostMessageTransport,Yc as OPEN_LINK_METHOD,h6 as McpUiUpdateModelContextRequestSchema,Wc as McpUiToolVisibilitySchema,ze as McpUiToolResultNotificationSchema,C6 as McpUiToolMetaSchema,ke as McpUiToolInputPartialNotificationSchema,Ue as McpUiToolInputNotificationSchema,De as McpUiToolCancelledNotificationSchema,jc as McpUiThemeSchema,Ie as McpUiSupportedContentBlockModalitiesSchema,M6 as McpUiSizeChangedNotificationSchema,y6 as McpUiSandboxResourceReadyNotificationSchema,B6 as McpUiSandboxProxyReadyNotificationSchema,R6 as McpUiResourceTeardownResultSchema,we as McpUiResourceTeardownRequestSchema,Do as McpUiResourcePermissionsSchema,Z6 as McpUiResourceMetaSchema,ko as McpUiResourceCspSchema,Ne as McpUiRequestDisplayModeResultSchema,d6 as McpUiRequestDisplayModeRequestSchema,be as McpUiOpenLinkResultSchema,H6 as McpUiOpenLinkRequestSchema,_e as McpUiMessageResultSchema,f6 as McpUiMessageRequestSchema,x6 as McpUiInitializedNotificationSchema,Pe as McpUiInitializeResultSchema,a6 as McpUiInitializeRequestSchema,Lc as McpUiHostStylesSchema,Jc as McpUiHostCssSchema,Se as McpUiHostContextSchema,Oe as McpUiHostContextChangedNotificationSchema,Ec as McpUiHostCapabilitiesSchema,Uo as McpUiDisplayModeSchema,Gc as McpUiAppCapabilitiesSchema,Qc as MESSAGE_METHOD,wo as LATEST_PROTOCOL_VERSION,dc as INITIALIZE_METHOD,Cc as INITIALIZED_METHOD,xc as HOST_CONTEXT_CHANGED_METHOD,gb as App};
@@ -23,7 +23,7 @@ export declare const McpUiStyleVariableKeySchema: z.ZodUnion<readonly [z.ZodLite
23
23
  export declare const McpUiStylesSchema: z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"--color-background-primary">, z.ZodLiteral<"--color-background-secondary">, z.ZodLiteral<"--color-background-tertiary">, z.ZodLiteral<"--color-background-inverse">, z.ZodLiteral<"--color-background-ghost">, z.ZodLiteral<"--color-background-info">, z.ZodLiteral<"--color-background-danger">, z.ZodLiteral<"--color-background-success">, z.ZodLiteral<"--color-background-warning">, z.ZodLiteral<"--color-background-disabled">, z.ZodLiteral<"--color-text-primary">, z.ZodLiteral<"--color-text-secondary">, z.ZodLiteral<"--color-text-tertiary">, z.ZodLiteral<"--color-text-inverse">, z.ZodLiteral<"--color-text-ghost">, z.ZodLiteral<"--color-text-info">, z.ZodLiteral<"--color-text-danger">, z.ZodLiteral<"--color-text-success">, z.ZodLiteral<"--color-text-warning">, z.ZodLiteral<"--color-text-disabled">, z.ZodLiteral<"--color-text-ghost">, z.ZodLiteral<"--color-border-primary">, z.ZodLiteral<"--color-border-secondary">, z.ZodLiteral<"--color-border-tertiary">, z.ZodLiteral<"--color-border-inverse">, z.ZodLiteral<"--color-border-ghost">, z.ZodLiteral<"--color-border-info">, z.ZodLiteral<"--color-border-danger">, z.ZodLiteral<"--color-border-success">, z.ZodLiteral<"--color-border-warning">, z.ZodLiteral<"--color-border-disabled">, z.ZodLiteral<"--color-ring-primary">, z.ZodLiteral<"--color-ring-secondary">, z.ZodLiteral<"--color-ring-inverse">, z.ZodLiteral<"--color-ring-info">, z.ZodLiteral<"--color-ring-danger">, z.ZodLiteral<"--color-ring-success">, z.ZodLiteral<"--color-ring-warning">, z.ZodLiteral<"--font-sans">, z.ZodLiteral<"--font-mono">, z.ZodLiteral<"--font-weight-normal">, z.ZodLiteral<"--font-weight-medium">, z.ZodLiteral<"--font-weight-semibold">, z.ZodLiteral<"--font-weight-bold">, z.ZodLiteral<"--font-text-xs-size">, z.ZodLiteral<"--font-text-sm-size">, z.ZodLiteral<"--font-text-md-size">, z.ZodLiteral<"--font-text-lg-size">, z.ZodLiteral<"--font-heading-xs-size">, z.ZodLiteral<"--font-heading-sm-size">, z.ZodLiteral<"--font-heading-md-size">, z.ZodLiteral<"--font-heading-lg-size">, z.ZodLiteral<"--font-heading-xl-size">, z.ZodLiteral<"--font-heading-2xl-size">, z.ZodLiteral<"--font-heading-3xl-size">, z.ZodLiteral<"--font-text-xs-line-height">, z.ZodLiteral<"--font-text-sm-line-height">, z.ZodLiteral<"--font-text-md-line-height">, z.ZodLiteral<"--font-text-lg-line-height">, z.ZodLiteral<"--font-heading-xs-line-height">, z.ZodLiteral<"--font-heading-sm-line-height">, z.ZodLiteral<"--font-heading-md-line-height">, z.ZodLiteral<"--font-heading-lg-line-height">, z.ZodLiteral<"--font-heading-xl-line-height">, z.ZodLiteral<"--font-heading-2xl-line-height">, z.ZodLiteral<"--font-heading-3xl-line-height">, z.ZodLiteral<"--border-radius-xs">, z.ZodLiteral<"--border-radius-sm">, z.ZodLiteral<"--border-radius-md">, z.ZodLiteral<"--border-radius-lg">, z.ZodLiteral<"--border-radius-xl">, z.ZodLiteral<"--border-radius-full">, z.ZodLiteral<"--border-width-regular">, z.ZodLiteral<"--shadow-hairline">, z.ZodLiteral<"--shadow-sm">, z.ZodLiteral<"--shadow-md">, z.ZodLiteral<"--shadow-lg">]>, z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
24
24
  /**
25
25
  * @description Request to open an external URL in the host's default browser.
26
- * @see {@link app.App.sendOpenLink} for the method that sends this request
26
+ * @see {@link app!App.openLink} for the method that sends this request
27
27
  */
28
28
  export declare const McpUiOpenLinkRequestSchema: z.ZodObject<{
29
29
  method: z.ZodLiteral<"ui/open-link">;
@@ -75,8 +75,8 @@ export declare const McpUiResourcePermissionsSchema: z.ZodObject<{
75
75
  clipboardWrite: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
76
76
  }, z.core.$strip>;
77
77
  /**
78
- * @description Notification of UI size changes (bidirectional: Guest <-> Host).
79
- * @see {@link app.App.sendSizeChanged} for the method to send this from Guest UI
78
+ * @description Notification of UI size changes (Guest UI -> Host).
79
+ * @see {@link app!App.sendSizeChanged} for the method to send this from Guest UI
80
80
  */
81
81
  export declare const McpUiSizeChangedNotificationSchema: z.ZodObject<{
82
82
  method: z.ZodLiteral<"ui/notifications/size-changed">;
@@ -131,7 +131,7 @@ export declare const McpUiHostStylesSchema: z.ZodObject<{
131
131
  }, z.core.$strip>;
132
132
  /**
133
133
  * @description Request for graceful shutdown of the Guest UI (Host -> Guest UI).
134
- * @see {@link app-bridge.AppBridge.teardownResource} for the host method that sends this
134
+ * @see {@link app-bridge!AppBridge.teardownResource} for the host method that sends this
135
135
  */
136
136
  export declare const McpUiResourceTeardownRequestSchema: z.ZodObject<{
137
137
  method: z.ZodLiteral<"ui/resource-teardown">;
@@ -196,7 +196,7 @@ export declare const McpUiHostCapabilitiesSchema: z.ZodObject<{
196
196
  }, z.core.$strip>>;
197
197
  }, z.core.$strip>;
198
198
  /**
199
- * @description Capabilities provided by the Guest UI (App).
199
+ * @description Capabilities provided by the Guest UI ({@link app!App}).
200
200
  * @see {@link McpUiInitializeRequest} for the initialization request that includes these capabilities
201
201
  */
202
202
  export declare const McpUiAppCapabilitiesSchema: z.ZodObject<{
@@ -207,7 +207,7 @@ export declare const McpUiAppCapabilitiesSchema: z.ZodObject<{
207
207
  }, z.core.$strip>;
208
208
  /**
209
209
  * @description Notification that Guest UI has completed initialization (Guest UI -> Host).
210
- * @see {@link app.App.connect} for the method that sends this notification
210
+ * @see {@link app!App.connect} for the method that sends this notification
211
211
  */
212
212
  export declare const McpUiInitializedNotificationSchema: z.ZodObject<{
213
213
  method: z.ZodLiteral<"ui/notifications/initialized">;
@@ -236,7 +236,7 @@ export declare const McpUiResourceMetaSchema: z.ZodObject<{
236
236
  * @description Request to change the display mode of the UI.
237
237
  * The host will respond with the actual display mode that was set,
238
238
  * which may differ from the requested mode if not supported.
239
- * @see {@link app.App.requestDisplayMode} for the method that sends this request
239
+ * @see {@link app!App.requestDisplayMode} for the method that sends this request
240
240
  */
241
241
  export declare const McpUiRequestDisplayModeRequestSchema: z.ZodObject<{
242
242
  method: z.ZodLiteral<"ui/request-display-mode">;
@@ -264,7 +264,7 @@ export declare const McpUiToolMetaSchema: z.ZodObject<{
264
264
  }, z.core.$strip>;
265
265
  /**
266
266
  * @description Request to send a message to the host's chat interface.
267
- * @see {@link app.App.sendMessage} for the method that sends this request
267
+ * @see {@link app!App.sendMessage} for the method that sends this request
268
268
  */
269
269
  export declare const McpUiMessageRequestSchema: z.ZodObject<{
270
270
  method: z.ZodLiteral<"ui/message">;
@@ -752,7 +752,7 @@ export declare const McpUiUpdateModelContextRequestSchema: z.ZodObject<{
752
752
  }, z.core.$strip>;
753
753
  /**
754
754
  * @description Initialization request sent from Guest UI to Host.
755
- * @see {@link app.App.connect} for the method that sends this request
755
+ * @see {@link app!App.connect} for the method that sends this request
756
756
  */
757
757
  export declare const McpUiInitializeRequestSchema: z.ZodObject<{
758
758
  method: z.ZodLiteral<"ui/initialize">;