sunpeak 0.18.2 → 0.18.6
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/bin/commands/inspect.mjs +392 -4
- package/bin/lib/sandbox-server.mjs +11 -1
- package/dist/chatgpt/index.cjs +1 -1
- package/dist/chatgpt/index.js +1 -1
- package/dist/claude/index.cjs +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-request-teardown.d.ts +21 -0
- package/dist/host/chatgpt/index.cjs +1 -1
- package/dist/host/chatgpt/index.js +1 -1
- package/dist/index.cjs +110 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +68 -31
- package/dist/index.js.map +1 -1
- package/dist/inspector/hosts.d.ts +12 -0
- package/dist/inspector/index.cjs +1 -1
- package/dist/inspector/index.js +1 -1
- package/dist/inspector/mcp-app-host.d.ts +3 -0
- package/dist/inspector/simple-sidebar.d.ts +1 -1
- package/dist/inspector/use-mcp-connection.d.ts +9 -1
- package/dist/{inspector-ClhpqKLi.js → inspector-CjSoXm6N.js} +497 -117
- package/dist/inspector-CjSoXm6N.js.map +1 -0
- package/dist/{inspector-CByJjmPD.cjs → inspector-DRD_Q66E.cjs} +498 -118
- package/dist/inspector-DRD_Q66E.cjs.map +1 -0
- package/dist/mcp/index.cjs +38 -33
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +35 -30
- package/dist/mcp/index.js.map +1 -1
- package/dist/style.css +8 -0
- package/dist/{use-app-X7JbGskk.js → use-app-BNbz1uzj.js} +51 -42
- package/dist/use-app-BNbz1uzj.js.map +1 -0
- package/dist/{use-app-D2h-aiyr.cjs → use-app-Dqh20JPP.cjs} +93 -72
- package/dist/use-app-Dqh20JPP.cjs.map +1 -0
- package/package.json +2 -2
- package/template/dist/albums/albums.html +3 -3
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.html +3 -3
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.html +3 -3
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.html +3 -3
- package/template/dist/review/review.json +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +3 -3
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +51 -42
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +56 -50
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +52 -43
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/_metadata.json +22 -22
- package/template/tests/e2e/albums.spec.ts +19 -15
- package/template/tests/live/albums.spec.ts +10 -0
- package/dist/inspector-CByJjmPD.cjs.map +0 -1
- package/dist/inspector-ClhpqKLi.js.map +0 -1
- package/dist/use-app-D2h-aiyr.cjs.map +0 -1
- package/dist/use-app-X7JbGskk.js.map +0 -1
package/dist/mcp/index.cjs
CHANGED
|
@@ -8680,8 +8680,8 @@ var StreamableHTTPServerTransport = class {
|
|
|
8680
8680
|
}
|
|
8681
8681
|
};
|
|
8682
8682
|
//#endregion
|
|
8683
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.
|
|
8684
|
-
var
|
|
8683
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.1_@modelcontextprotocol+sdk@1.27.1_zod@4.3.6__react-_cd1fb28fd87e0bddd0a29eba0721855d/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js
|
|
8684
|
+
var g = require_protocol.union([require_protocol.literal("light"), require_protocol.literal("dark")]).describe("Color theme preference for the host environment."), G = require_protocol.union([
|
|
8685
8685
|
require_protocol.literal("inline"),
|
|
8686
8686
|
require_protocol.literal("fullscreen"),
|
|
8687
8687
|
require_protocol.literal("pip")
|
|
@@ -8825,9 +8825,9 @@ require_protocol.object({
|
|
|
8825
8825
|
method: require_protocol.literal("ui/notifications/tool-cancelled"),
|
|
8826
8826
|
params: require_protocol.object({ reason: require_protocol.string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
|
|
8827
8827
|
});
|
|
8828
|
-
var
|
|
8828
|
+
var S = require_protocol.object({ fonts: require_protocol.string().optional() }), y = require_protocol.object({
|
|
8829
8829
|
variables: o.optional().describe("CSS variables for theming the app."),
|
|
8830
|
-
css:
|
|
8830
|
+
css: S.optional().describe("CSS blocks that apps can inject.")
|
|
8831
8831
|
});
|
|
8832
8832
|
require_protocol.object({
|
|
8833
8833
|
method: require_protocol.literal("ui/resource-teardown"),
|
|
@@ -8841,7 +8841,12 @@ var q = require_protocol.object({
|
|
|
8841
8841
|
resource: require_protocol.object({}).optional().describe("Host supports resource content blocks."),
|
|
8842
8842
|
resourceLink: require_protocol.object({}).optional().describe("Host supports resource link content blocks."),
|
|
8843
8843
|
structuredContent: require_protocol.object({}).optional().describe("Host supports structured content.")
|
|
8844
|
-
})
|
|
8844
|
+
});
|
|
8845
|
+
require_protocol.object({
|
|
8846
|
+
method: require_protocol.literal("ui/notifications/request-teardown"),
|
|
8847
|
+
params: require_protocol.object({}).optional()
|
|
8848
|
+
});
|
|
8849
|
+
var C = require_protocol.object({
|
|
8845
8850
|
experimental: require_protocol.object({}).optional().describe("Experimental features (structure TBD)."),
|
|
8846
8851
|
openLinks: require_protocol.object({}).optional().describe("Host supports opening external URLs."),
|
|
8847
8852
|
downloadFile: require_protocol.object({}).optional().describe("Host supports file downloads via ui/download-file."),
|
|
@@ -8854,10 +8859,10 @@ var q = require_protocol.object({
|
|
|
8854
8859
|
}).optional().describe("Sandbox configuration applied by the host."),
|
|
8855
8860
|
updateModelContext: q.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
|
|
8856
8861
|
message: q.optional().describe("Host supports receiving content messages (ui/message) from the view.")
|
|
8857
|
-
}),
|
|
8862
|
+
}), f = require_protocol.object({
|
|
8858
8863
|
experimental: require_protocol.object({}).optional().describe("Experimental features (structure TBD)."),
|
|
8859
8864
|
tools: require_protocol.object({ listChanged: require_protocol.boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."),
|
|
8860
|
-
availableDisplayModes: require_protocol.array(
|
|
8865
|
+
availableDisplayModes: require_protocol.array(G).optional().describe("Display modes the app supports.")
|
|
8861
8866
|
});
|
|
8862
8867
|
require_protocol.object({
|
|
8863
8868
|
method: require_protocol.literal("ui/notifications/initialized"),
|
|
@@ -8885,13 +8890,13 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
8885
8890
|
});
|
|
8886
8891
|
require_protocol.object({
|
|
8887
8892
|
method: require_protocol.literal("ui/request-display-mode"),
|
|
8888
|
-
params: require_protocol.object({ mode:
|
|
8893
|
+
params: require_protocol.object({ mode: G.describe("The display mode being requested.") })
|
|
8889
8894
|
});
|
|
8890
|
-
require_protocol.object({ mode:
|
|
8891
|
-
var
|
|
8895
|
+
require_protocol.object({ mode: G.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
|
|
8896
|
+
var u = require_protocol.union([require_protocol.literal("model"), require_protocol.literal("app")]).describe("Tool visibility scope - who can access the tool.");
|
|
8892
8897
|
require_protocol.object({
|
|
8893
8898
|
resourceUri: require_protocol.string().optional(),
|
|
8894
|
-
visibility: require_protocol.array(
|
|
8899
|
+
visibility: require_protocol.array(u).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
8895
8900
|
- "model": Tool visible to and callable by the agent
|
|
8896
8901
|
- "app": Tool callable by the app from this server only`)
|
|
8897
8902
|
});
|
|
@@ -8925,10 +8930,10 @@ var k = require_protocol.object({
|
|
|
8925
8930
|
id: require_protocol.RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
|
|
8926
8931
|
tool: require_protocol.ToolSchema.describe("Tool definition including name, inputSchema, etc.")
|
|
8927
8932
|
}).optional().describe("Metadata of the tool call that instantiated this App."),
|
|
8928
|
-
theme:
|
|
8929
|
-
styles:
|
|
8930
|
-
displayMode:
|
|
8931
|
-
availableDisplayModes: require_protocol.array(
|
|
8933
|
+
theme: g.optional().describe("Current color theme preference."),
|
|
8934
|
+
styles: y.optional().describe("Style configuration for theming the app."),
|
|
8935
|
+
displayMode: G.optional().describe("How the UI is currently displayed."),
|
|
8936
|
+
availableDisplayModes: require_protocol.array(G).optional().describe("Display modes the host supports."),
|
|
8932
8937
|
containerDimensions: require_protocol.union([require_protocol.object({ height: require_protocol.number().describe("Fixed container height in pixels.") }), require_protocol.object({ maxHeight: require_protocol.union([require_protocol.number(), require_protocol._undefined()]).optional().describe("Maximum container height in pixels.") })]).and(require_protocol.union([require_protocol.object({ width: require_protocol.number().describe("Fixed container width in pixels.") }), require_protocol.object({ maxWidth: require_protocol.union([require_protocol.number(), require_protocol._undefined()]).optional().describe("Maximum container width in pixels.") })])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
8933
8938
|
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),
|
|
8934
8939
|
locale: require_protocol.string().optional().describe("User's language and region preference in BCP 47 format."),
|
|
@@ -8965,28 +8970,28 @@ require_protocol.object({
|
|
|
8965
8970
|
method: require_protocol.literal("ui/initialize"),
|
|
8966
8971
|
params: require_protocol.object({
|
|
8967
8972
|
appInfo: require_protocol.ImplementationSchema.describe("App identification (name and version)."),
|
|
8968
|
-
appCapabilities:
|
|
8973
|
+
appCapabilities: f.describe("Features and capabilities this app provides."),
|
|
8969
8974
|
protocolVersion: require_protocol.string().describe("Protocol version this app supports.")
|
|
8970
8975
|
})
|
|
8971
8976
|
});
|
|
8972
8977
|
require_protocol.object({
|
|
8973
8978
|
protocolVersion: require_protocol.string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
|
|
8974
8979
|
hostInfo: require_protocol.ImplementationSchema.describe("Host application identification and version."),
|
|
8975
|
-
hostCapabilities:
|
|
8980
|
+
hostCapabilities: C.describe("Features and capabilities provided by the host."),
|
|
8976
8981
|
hostContext: k.describe("Rich context about the host environment.")
|
|
8977
8982
|
}).passthrough();
|
|
8978
8983
|
var v = "ui/resourceUri", d = "text/html;profile=mcp-app";
|
|
8979
|
-
function
|
|
8980
|
-
let D = J._meta, V = D.ui,
|
|
8981
|
-
if (V?.resourceUri && !
|
|
8984
|
+
function hZ(Z, $, J, X) {
|
|
8985
|
+
let D = J._meta, V = D.ui, L = D[v], W = D;
|
|
8986
|
+
if (V?.resourceUri && !L) W = {
|
|
8982
8987
|
...D,
|
|
8983
8988
|
[v]: V.resourceUri
|
|
8984
8989
|
};
|
|
8985
|
-
else if (
|
|
8990
|
+
else if (L && !V?.resourceUri) W = {
|
|
8986
8991
|
...D,
|
|
8987
8992
|
ui: {
|
|
8988
8993
|
...V,
|
|
8989
|
-
resourceUri:
|
|
8994
|
+
resourceUri: L
|
|
8990
8995
|
}
|
|
8991
8996
|
};
|
|
8992
8997
|
return Z.registerTool($, {
|
|
@@ -8994,16 +8999,16 @@ function uZ(Z, $, J, X) {
|
|
|
8994
8999
|
_meta: W
|
|
8995
9000
|
}, X);
|
|
8996
9001
|
}
|
|
8997
|
-
function
|
|
9002
|
+
function mZ(Z, $, J, X, D) {
|
|
8998
9003
|
return Z.registerResource($, J, {
|
|
8999
9004
|
mimeType: d,
|
|
9000
9005
|
...X
|
|
9001
9006
|
}, D);
|
|
9002
9007
|
}
|
|
9003
|
-
var
|
|
9004
|
-
function
|
|
9008
|
+
var IQ = "io.modelcontextprotocol/ui";
|
|
9009
|
+
function cZ(Z) {
|
|
9005
9010
|
if (!Z) return;
|
|
9006
|
-
return Z.extensions?.[
|
|
9011
|
+
return Z.extensions?.[IQ];
|
|
9007
9012
|
}
|
|
9008
9013
|
//#endregion
|
|
9009
9014
|
//#region src/mcp/resolve-domain.ts
|
|
@@ -9290,7 +9295,7 @@ function createAppServer(config, simulations, viteMode) {
|
|
|
9290
9295
|
...toolMeta.ui?.visibility ? { visibility: toolMeta.ui.visibility } : {}
|
|
9291
9296
|
}
|
|
9292
9297
|
};
|
|
9293
|
-
const toolHandle =
|
|
9298
|
+
const toolHandle = hZ(mcpServer, tool.name, {
|
|
9294
9299
|
description: tool.description,
|
|
9295
9300
|
inputSchema: zod.z.object({}).passthrough(),
|
|
9296
9301
|
...simulation.outputSchema ? { outputSchema: simulation.outputSchema } : {},
|
|
@@ -9718,7 +9723,7 @@ function createProductionMcpServer(config) {
|
|
|
9718
9723
|
if (res) {
|
|
9719
9724
|
if (!registeredResources.has(res.uri)) {
|
|
9720
9725
|
registeredResources.add(res.uri);
|
|
9721
|
-
const handle =
|
|
9726
|
+
const handle = mZ(mcpServer, res.name, res.uri, {
|
|
9722
9727
|
description: res.description,
|
|
9723
9728
|
_meta: res._meta
|
|
9724
9729
|
}, async () => {
|
|
@@ -9747,7 +9752,7 @@ function createProductionMcpServer(config) {
|
|
|
9747
9752
|
}
|
|
9748
9753
|
}
|
|
9749
9754
|
};
|
|
9750
|
-
|
|
9755
|
+
hZ(mcpServer, tool.name, toolConfig, makeCallback());
|
|
9751
9756
|
} else {
|
|
9752
9757
|
const cb = makeCallback();
|
|
9753
9758
|
const toolConfig = {
|
|
@@ -10162,7 +10167,7 @@ function startProductionHttpServer(config, portOrOptions) {
|
|
|
10162
10167
|
process.on("SIGINT", () => void shutdown());
|
|
10163
10168
|
}
|
|
10164
10169
|
//#endregion
|
|
10165
|
-
exports.EXTENSION_ID =
|
|
10170
|
+
exports.EXTENSION_ID = IQ;
|
|
10166
10171
|
exports.FAVICON_BASE64 = FAVICON_BASE64;
|
|
10167
10172
|
exports.FAVICON_BUFFER = FAVICON_BUFFER;
|
|
10168
10173
|
exports.FAVICON_DATA_URI = FAVICON_DATA_URI;
|
|
@@ -10173,11 +10178,11 @@ exports.computeClaudeDomain = computeClaudeDomain;
|
|
|
10173
10178
|
exports.createHandler = createHandler;
|
|
10174
10179
|
exports.createMcpHandler = createMcpHandler;
|
|
10175
10180
|
exports.createProductionMcpServer = createProductionMcpServer;
|
|
10176
|
-
exports.getUiCapability =
|
|
10181
|
+
exports.getUiCapability = cZ;
|
|
10177
10182
|
exports.injectDefaultDomain = injectDefaultDomain;
|
|
10178
10183
|
exports.injectResolvedDomain = injectResolvedDomain;
|
|
10179
|
-
exports.registerAppResource =
|
|
10180
|
-
exports.registerAppTool =
|
|
10184
|
+
exports.registerAppResource = mZ;
|
|
10185
|
+
exports.registerAppTool = hZ;
|
|
10181
10186
|
exports.resolveDomain = resolveDomain;
|
|
10182
10187
|
exports.runMCPServer = runMCPServer;
|
|
10183
10188
|
exports.setJsonLogging = setJsonLogging;
|