sunpeak 0.15.4 → 0.16.2
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/README.md +53 -49
- package/bin/commands/build.mjs +119 -6
- package/bin/commands/dev.mjs +168 -27
- package/bin/commands/new.mjs +13 -3
- package/bin/commands/start.mjs +215 -0
- package/bin/lib/extract-resource.mjs +1 -1
- package/bin/lib/extract-tool.mjs +78 -0
- package/bin/lib/patterns.mjs +2 -26
- package/bin/sunpeak.js +11 -1
- package/dist/chatgpt/index.cjs +3 -6
- package/dist/chatgpt/index.cjs.map +1 -1
- package/dist/chatgpt/index.d.ts +1 -1
- package/dist/chatgpt/index.js +6 -9
- package/dist/claude/index.cjs +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/discovery-CH80W5l9.js +217 -0
- package/dist/discovery-CH80W5l9.js.map +1 -0
- package/dist/discovery-DmB8_4QL.cjs +216 -0
- package/dist/discovery-DmB8_4QL.cjs.map +1 -0
- package/dist/{index-Cngntkp2.cjs → index-Bll1bszc.cjs} +3 -6
- package/dist/{index-Cngntkp2.cjs.map → index-Bll1bszc.cjs.map} +1 -1
- package/dist/{index-Ce_5ZIdJ.js → index-CACtnwu2.js} +3 -6
- package/dist/{index-Ce_5ZIdJ.js.map → index-CACtnwu2.js.map} +1 -1
- package/dist/{index-CutQgPzR.js → index-CLcr8IyR.js} +3 -6
- package/dist/index-CLcr8IyR.js.map +1 -0
- package/dist/{index-B0dxRJvS.cjs → index-CaQmwZJc.cjs} +3 -6
- package/dist/index-CaQmwZJc.cjs.map +1 -0
- package/dist/index.cjs +49 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3405 -3362
- package/dist/index.js.map +1 -1
- package/dist/lib/discovery-cli.cjs +58 -5
- package/dist/lib/discovery-cli.cjs.map +1 -1
- package/dist/lib/discovery-cli.d.ts +3 -2
- package/dist/lib/discovery-cli.js +61 -8
- package/dist/lib/discovery-cli.js.map +1 -1
- package/dist/lib/discovery.d.ts +42 -43
- package/dist/lib/extract-tool.d.ts +12 -0
- package/dist/mcp/favicon.d.ts +1 -1
- package/dist/mcp/index.cjs +1582 -5
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.d.ts +3 -1
- package/dist/mcp/index.js +1583 -6
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/production-server.d.ts +156 -0
- package/dist/mcp/types.d.ts +24 -1
- package/dist/platform/chatgpt/index.cjs +1 -1
- package/dist/platform/chatgpt/index.js +1 -1
- package/dist/{protocol-DFbsCx7E.js → protocol-BD5jDQEx.js} +8 -1
- package/dist/{protocol-DFbsCx7E.js.map → protocol-BD5jDQEx.js.map} +1 -1
- package/dist/{protocol-CL4_Npj5.cjs → protocol-BOjXuK6l.cjs} +8 -1
- package/dist/{protocol-CL4_Npj5.cjs.map → protocol-BOjXuK6l.cjs.map} +1 -1
- package/dist/simulator/index.cjs +2 -5
- package/dist/simulator/index.cjs.map +1 -1
- package/dist/simulator/index.d.ts +1 -1
- package/dist/simulator/index.js +5 -8
- package/dist/simulator/simulator-url.d.ts +9 -9
- package/dist/{simulator-CxrtnguM.js → simulator-B7rw83zP.js} +9 -3
- package/dist/{simulator-CxrtnguM.js.map → simulator-B7rw83zP.js.map} +1 -1
- package/dist/{simulator-DcfQBRXE.cjs → simulator-DjZNa1MI.cjs} +9 -3
- package/dist/{simulator-DcfQBRXE.cjs.map → simulator-DjZNa1MI.cjs.map} +1 -1
- package/dist/simulator-url-CuLqtnSS.js.map +1 -1
- package/dist/simulator-url-rgg_KYOg.cjs.map +1 -1
- package/dist/types/resource-config.d.ts +7 -5
- package/dist/{use-app-BnoSPiUT.cjs → use-app-BpAJqzdE.cjs} +50 -21
- package/dist/{use-app-BnoSPiUT.cjs.map → use-app-BpAJqzdE.cjs.map} +1 -1
- package/dist/{use-app-D_TeaMFG.js → use-app-WOUdh1PR.js} +52 -23
- package/dist/{use-app-D_TeaMFG.js.map → use-app-WOUdh1PR.js.map} +1 -1
- package/package.json +1 -1
- package/template/.sunpeak/dev.tsx +8 -4
- package/template/.sunpeak/resource-loader.tsx +2 -1
- package/template/README.md +27 -22
- package/template/package.json +3 -1
- package/template/src/resources/albums/{albums-resource.test.tsx → albums.test.tsx} +1 -1
- package/template/src/resources/albums/{albums-resource.tsx → albums.tsx} +0 -1
- package/template/src/resources/carousel/{carousel-resource.test.tsx → carousel.test.tsx} +1 -1
- package/template/src/resources/carousel/{carousel-resource.tsx → carousel.tsx} +0 -1
- package/template/src/resources/index.ts +4 -4
- package/template/src/resources/map/{map-resource.test.tsx → map.test.tsx} +1 -1
- package/template/src/resources/map/{map-resource.tsx → map.tsx} +0 -1
- package/template/src/resources/review/{review-resource.test.tsx → review.test.tsx} +1 -1
- package/template/src/resources/review/{review-resource.tsx → review.tsx} +1 -2
- package/template/src/server.ts +17 -0
- package/template/src/tools/review-diff.ts +24 -0
- package/template/src/tools/review-post.ts +26 -0
- package/template/src/tools/review-purchase.ts +31 -0
- package/template/src/tools/show-albums.ts +22 -0
- package/template/src/tools/show-carousel.ts +25 -0
- package/template/src/tools/show-map.ts +29 -0
- package/template/tests/e2e/albums.spec.ts +6 -6
- package/template/tests/e2e/carousel.spec.ts +6 -6
- package/template/tests/e2e/map.spec.ts +11 -11
- package/template/tests/simulations/{review/review-diff-simulation.json → review-diff.json} +1 -31
- package/template/tests/simulations/{review/review-post-simulation.json → review-post.json} +1 -37
- package/template/tests/simulations/{review/review-purchase-simulation.json → review-purchase.json} +1 -38
- package/template/tests/simulations/{albums/albums-show-simulation.json → show-albums.json} +1 -24
- package/template/tests/simulations/{carousel/carousel-show-simulation.json → show-carousel.json} +1 -24
- package/template/tests/simulations/{map/map-show-simulation.json → show-map.json} +1 -35
- package/dist/discovery-CRR3SlyI.cjs +0 -156
- package/dist/discovery-CRR3SlyI.cjs.map +0 -1
- package/dist/discovery-DzV3HLXs.js +0 -157
- package/dist/discovery-DzV3HLXs.js.map +0 -1
- package/dist/index-B0dxRJvS.cjs.map +0 -1
- package/dist/index-CutQgPzR.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, createContext, useContext } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { C as ContentBlockSchema, a as CallToolResultSchema, T as ToolSchema, R as RequestIdSchema, I as ImplementationSchema, P as Protocol, b as PingRequestSchema, c as CallToolRequestSchema, L as ListToolsRequestSchema, E as EmptyResultSchema, J as JSONRPCMessageSchema } from "./protocol-
|
|
3
|
+
import { C as ContentBlockSchema, a as CallToolResultSchema, T as ToolSchema, R as RequestIdSchema, I as ImplementationSchema, P as Protocol, b as PingRequestSchema, c as CallToolRequestSchema, L as ListToolsRequestSchema, E as EmptyResultSchema, J as JSONRPCMessageSchema } from "./protocol-BD5jDQEx.js";
|
|
4
4
|
var Kc = Object.defineProperty;
|
|
5
5
|
var s = (r, i) => {
|
|
6
6
|
for (var o in i) Kc(r, o, { get: i[o], enumerable: true, configurable: true, set: (t) => i[o] = () => t });
|
|
@@ -37,7 +37,7 @@ class Yn {
|
|
|
37
37
|
sessionId;
|
|
38
38
|
setProtocolVersion;
|
|
39
39
|
}
|
|
40
|
-
var wv = "2026-01-26";
|
|
40
|
+
var wv = "2026-01-26", Yc = "ui/open-link", Qc = "ui/message", Fc = "ui/notifications/size-changed", Bc = "ui/notifications/tool-input", Hc = "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";
|
|
41
41
|
var g = {};
|
|
42
42
|
s(g, { xor: () => yl, xid: () => Nl, void: () => xl, uuidv7: () => cl, uuidv6: () => ll, uuidv4: () => el, uuid: () => gl, util: () => D, url: () => Il, uppercase: () => Kr, unknown: () => Nr, union: () => ev, undefined: () => Ml, ulid: () => wl, uint64: () => Bl, uint32: () => ml, tuple: () => Qg, trim: () => Fr, treeifyError: () => Xv, transform: () => cv, toUpperCase: () => Hr, toLowerCase: () => Br, toJSONSchema: () => Qi, templateLiteral: () => ec, symbol: () => Hl, superRefine: () => ee, success: () => uc, stringbool: () => Dc, stringFormat: () => Xl, string: () => Mi, 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: () => $i, regexes: () => x, regex: () => Vr, refine: () => ge, record: () => mg, readonly: () => ie, property: () => Ai, promise: () => lc, prettifyError: () => Vv, preprocess: () => Nc, prefault: () => hg, positive: () => Gi, pipe: () => En, partialRecord: () => pl, parseAsync: () => gg, parse: () => $g, overwrite: () => d, optional: () => Jn, object: () => Cl, number: () => Og, nullish: () => tc, nullable: () => Ln, null: () => Jg, normalize: () => Tr, nonpositive: () => Xi, nonoptional: () => yg, nonnegative: () => Vi, never: () => gv, negative: () => Wi, nativeEnum: () => ic, nanoid: () => Ul, nan: () => $c, multipleOf: () => $r, minSize: () => a, minLength: () => nr, mime: () => mr, meta: () => Uc, maxSize: () => gr, maxLength: () => Dr, map: () => rc, mac: () => zl, lte: () => M, lt: () => h, lowercase: () => Ar, looseRecord: () => sl, looseObject: () => hl, locales: () => On, literal: () => vc, length: () => wr, lazy: () => te, ksuid: () => Ol, keyof: () => dl, jwt: () => Wl, json: () => wc, iso: () => Zr, ipv6: () => Pl, ipv4: () => Sl, intersection: () => qg, int64: () => Fl, int32: () => Ql, int: () => Ri, instanceof: () => kc, includes: () => qr, httpUrl: () => bl, hostname: () => Vl, hex: () => Al, hash: () => Kl, guid: () => $l, gte: () => Y, gt: () => y, globalRegistry: () => A, getErrorMap: () => L6, function: () => cc, fromJSONSchema: () => Sc, formatError: () => en, float64: () => Yl, float32: () => ql, flattenError: () => gn, file: () => oc, exactOptional: () => xg, enum: () => lv, 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: () => V, coerce: () => ce, codec: () => gc, clone: () => q, cidrv6: () => Jl, cidrv4: () => jl, check: () => Ic, catch: () => sg, boolean: () => Sg, bigint: () => Tl, base64url: () => El, base64: () => Ll, array: () => Xn, any: () => Rl, _function: () => cc, _default: () => Cg, _ZodString: () => xi, ZodXor: () => Vg, ZodXID: () => ai, ZodVoid: () => Wg, ZodUnknown: () => Eg, ZodUnion: () => An, ZodUndefined: () => Pg, ZodUUID: () => p, ZodURL: () => Gn, ZodULID: () => yi, ZodType: () => P, ZodTuple: () => Yg, ZodTransform: () => Mg, ZodTemplateLiteral: () => ve, ZodSymbol: () => zg, ZodSuccess: () => ag, ZodStringFormat: () => G, ZodString: () => Cr, ZodSet: () => Fg, ZodRecord: () => Kn, ZodRealError: () => B, ZodReadonly: () => ne, ZodPromise: () => ue, ZodPrefault: () => fg, ZodPipe: () => _v, ZodOptional: () => Iv, ZodObject: () => Vn, ZodNumberFormat: () => Or, ZodNumber: () => hr, ZodNullable: () => Zg, ZodNull: () => jg, ZodNonOptional: () => bv, ZodNever: () => Gg, ZodNanoID: () => Ci, ZodNaN: () => re, ZodMap: () => Tg, ZodMAC: () => Ng, ZodLiteral: () => Bg, ZodLazy: () => oe, ZodKSUID: () => pi, ZodJWT: () => uv, ZodIssueCode: () => j6, ZodIntersection: () => Kg, ZodISOTime: () => Bi, ZodISODuration: () => Hi, ZodISODateTime: () => Ti, ZodISODate: () => Fi, ZodIPv6: () => rv, ZodIPv4: () => si, ZodGUID: () => jn, ZodFunction: () => $e, ZodFirstPartyTypeKind: () => le, ZodFile: () => Hg, ZodExactOptional: () => Rg, ZodError: () => z6, ZodEnum: () => dr, ZodEmoji: () => di, ZodEmail: () => Zi, ZodE164: () => tv, ZodDiscriminatedUnion: () => Ag, ZodDefault: () => dg, ZodDate: () => Wn, ZodCustomStringFormat: () => fr, ZodCustom: () => qn, ZodCodec: () => Uv, ZodCatch: () => pg, ZodCUID2: () => hi, ZodCUID: () => fi, ZodCIDRv6: () => iv, ZodCIDRv4: () => nv, ZodBoolean: () => yr, ZodBigIntFormat: () => $v, ZodBigInt: () => ar, ZodBase64URL: () => ov, ZodBase64: () => vv, ZodArray: () => Xg, ZodAny: () => Lg, TimePrecision: () => Qu, NEVER: () => Nv, $output: () => Xu, $input: () => Vu, $brand: () => Ov });
|
|
43
43
|
var ir = {};
|
|
@@ -6150,30 +6150,16 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
6150
6150
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
6151
6151
|
|
|
6152
6152
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
6153
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);
|
|
6154
|
-
g.object({ method: g.literal("ui/open-link"), params: g.object({ url: g.string().describe("URL to open in the host's browser") }) });
|
|
6155
|
-
var 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();
|
|
6153
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`), B6 = 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();
|
|
6156
6154
|
g.object({ method: g.literal("ui/notifications/sandbox-proxy-ready"), params: g.object({}) });
|
|
6157
|
-
var kv = 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).") }), Dv = 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).") })
|
|
6158
|
-
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.") }) });
|
|
6159
|
-
var 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: F6.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({}) });
|
|
6160
|
-
g.record(g.string(), g.unknown());
|
|
6161
|
-
var 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: Dv.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."), csp: kv.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 view.") }), 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."), availableDisplayModes: g.array(pr).optional().describe("Display modes the app supports.") });
|
|
6162
|
-
g.object({ method: g.literal("ui/notifications/initialized"), params: g.object({}).optional() });
|
|
6163
|
-
g.object({ csp: kv.optional().describe("Content Security Policy configuration."), permissions: Dv.optional().describe("Sandbox permissions requested by the UI."), domain: g.string().optional().describe("Dedicated origin for view sandbox."), prefersBorder: g.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.") });
|
|
6164
|
-
g.object({ method: g.literal("ui/request-display-mode"), params: g.object({ mode: pr.describe("The display mode being requested.") }) });
|
|
6165
|
-
var Ne = g.object({ mode: pr.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.");
|
|
6166
|
-
g.object({ resourceUri: g.string().optional(), visibility: g.array(Wc).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
6155
|
+
var kv = 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).") }), Dv = 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: F6.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: Dv.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."), csp: kv.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 view.") }), 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."), availableDisplayModes: g.array(pr).optional().describe("Display modes the app supports.") }), x6 = g.object({ method: g.literal("ui/notifications/initialized"), params: g.object({}).optional() }), Z6 = g.object({ csp: kv.optional().describe("Content Security Policy configuration."), permissions: Dv.optional().describe("Sandbox permissions requested by the UI."), domain: g.string().optional().describe("Dedicated origin for view 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: pr.describe("The display mode being requested.") }) }), Ne = g.object({ mode: pr.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"]
|
|
6167
6156
|
- "model": Tool visible to and callable by the agent
|
|
6168
6157
|
- "app": Tool callable by the app from this server only`) });
|
|
6169
6158
|
g.object({ mimeTypes: g.array(g.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.') });
|
|
6170
|
-
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(ContentBlockSchema).describe("Message content blocks (text, image, etc.).") }) });
|
|
6159
|
+
var 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(ContentBlockSchema).describe("Message content blocks (text, image, etc.).") }) });
|
|
6171
6160
|
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: kv.optional().describe("CSP configuration from resource metadata."), permissions: Dv.optional().describe("Sandbox permissions from resource metadata.") }) });
|
|
6172
6161
|
var Oe = g.object({ method: g.literal("ui/notifications/tool-result"), params: CallToolResultSchema.describe("Standard MCP tool execution result.") }), Se = g.object({ toolInfo: g.object({ id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."), tool: ToolSchema.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: pr.optional().describe("How the UI is currently displayed."), availableDisplayModes: g.array(pr).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
|
|
6173
|
-
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(), ze = g.object({ method: g.literal("ui/notifications/host-context-changed"), params: Se.describe("Partial context update containing only changed fields.") });
|
|
6174
|
-
g.object({ method: g.literal("ui/update-model-context"), params: g.object({ content: g.array(ContentBlockSchema).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.") }) });
|
|
6175
|
-
g.object({ method: g.literal("ui/initialize"), params: g.object({ appInfo: ImplementationSchema.describe("App identification (name and version)."), appCapabilities: Gc.describe("Features and capabilities this app provides."), protocolVersion: g.string().describe("Protocol version this app supports.") }) });
|
|
6176
|
-
var Pe = g.object({ protocolVersion: g.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'), hostInfo: ImplementationSchema.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();
|
|
6162
|
+
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(), ze = g.object({ method: g.literal("ui/notifications/host-context-changed"), params: Se.describe("Partial context update containing only changed fields.") }), y6 = g.object({ method: g.literal("ui/update-model-context"), params: g.object({ content: g.array(ContentBlockSchema).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: ImplementationSchema.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: ImplementationSchema.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();
|
|
6177
6163
|
function p6() {
|
|
6178
6164
|
let r = document.documentElement.getAttribute("data-theme");
|
|
6179
6165
|
if (r === "dark" || r === "light") return r;
|
|
@@ -6370,16 +6356,59 @@ function useApp() {
|
|
|
6370
6356
|
return useContext(AppContext).app;
|
|
6371
6357
|
}
|
|
6372
6358
|
export {
|
|
6373
|
-
AppProvider as
|
|
6359
|
+
AppProvider as $,
|
|
6360
|
+
R6 as A,
|
|
6374
6361
|
Bk as B,
|
|
6362
|
+
Cc as C,
|
|
6363
|
+
De as D,
|
|
6364
|
+
Ec as E,
|
|
6375
6365
|
Fk as F,
|
|
6366
|
+
Gc as G,
|
|
6367
|
+
Hc as H,
|
|
6368
|
+
kv as I,
|
|
6369
|
+
Jc as J,
|
|
6370
|
+
Dv as K,
|
|
6371
|
+
Lc as L,
|
|
6372
|
+
Mc as M,
|
|
6373
|
+
Ne as N,
|
|
6374
|
+
Oe as O,
|
|
6375
|
+
Pe as P,
|
|
6376
|
+
Qc as Q,
|
|
6377
|
+
Rc as R,
|
|
6378
|
+
Se as S,
|
|
6379
|
+
Z6 as T,
|
|
6380
|
+
Ue as U,
|
|
6381
|
+
C6 as V,
|
|
6382
|
+
Wc as W,
|
|
6383
|
+
Ie as X,
|
|
6376
6384
|
Yn as Y,
|
|
6385
|
+
Zc as Z,
|
|
6386
|
+
_e as _,
|
|
6387
|
+
Yc as a,
|
|
6388
|
+
Fc as b,
|
|
6389
|
+
Bc as c,
|
|
6390
|
+
dc as d,
|
|
6391
|
+
pr as e,
|
|
6392
|
+
fc as f,
|
|
6377
6393
|
gb as g,
|
|
6394
|
+
a6 as h,
|
|
6395
|
+
x6 as i,
|
|
6396
|
+
jc as j,
|
|
6397
|
+
ke as k,
|
|
6398
|
+
M6 as l,
|
|
6399
|
+
B6 as m,
|
|
6378
6400
|
nb as n,
|
|
6401
|
+
be as o,
|
|
6379
6402
|
p6 as p,
|
|
6403
|
+
f6 as q,
|
|
6380
6404
|
rb as r,
|
|
6381
6405
|
s6 as s,
|
|
6406
|
+
d6 as t,
|
|
6382
6407
|
useApp as u,
|
|
6383
|
-
|
|
6408
|
+
we as v,
|
|
6409
|
+
wv as w,
|
|
6410
|
+
xc as x,
|
|
6411
|
+
y6 as y,
|
|
6412
|
+
ze as z
|
|
6384
6413
|
};
|
|
6385
|
-
//# sourceMappingURL=use-app-
|
|
6414
|
+
//# sourceMappingURL=use-app-WOUdh1PR.js.map
|