@portel/photon 1.32.6 → 1.33.0
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/auto-ui/beam/types.d.ts +1 -0
- package/dist/auto-ui/beam/types.d.ts.map +1 -1
- package/dist/auto-ui/beam.d.ts.map +1 -1
- package/dist/auto-ui/beam.js +57 -8
- package/dist/auto-ui/beam.js.map +1 -1
- package/dist/auto-ui/streamable-http-transport.d.ts +1 -0
- package/dist/auto-ui/streamable-http-transport.d.ts.map +1 -1
- package/dist/auto-ui/streamable-http-transport.js +9 -1
- package/dist/auto-ui/streamable-http-transport.js.map +1 -1
- package/dist/auto-ui/ui-resolver.d.ts +12 -1
- package/dist/auto-ui/ui-resolver.d.ts.map +1 -1
- package/dist/auto-ui/ui-resolver.js +19 -3
- package/dist/auto-ui/ui-resolver.js.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +13 -5
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/daemon/manager.d.ts +8 -0
- package/dist/daemon/manager.d.ts.map +1 -1
- package/dist/daemon/manager.js +46 -9
- package/dist/daemon/manager.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts.map +1 -1
- package/dist/deploy/cloudflare.js +55 -7
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/resource-server.d.ts.map +1 -1
- package/dist/resource-server.js +5 -2
- package/dist/resource-server.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +81 -17
- package/dist/server.js.map +1 -1
- package/dist/tsx-compiler.d.ts +65 -5
- package/dist/tsx-compiler.d.ts.map +1 -1
- package/dist/tsx-compiler.js +531 -52
- package/dist/tsx-compiler.js.map +1 -1
- package/package.json +1 -1
- package/templates/cloudflare/worker.ts.template +60 -0
|
@@ -2511,10 +2511,18 @@ const handlers = {
|
|
|
2511
2511
|
const mimeType = result.isPhotonTemplate
|
|
2512
2512
|
? 'text/html;profile=mcp-app;photon-template=true'
|
|
2513
2513
|
: 'text/html;profile=mcp-app';
|
|
2514
|
+
// An MCP-app webview renders this text with no HTTP origin, so the
|
|
2515
|
+
// compiled .tsx bundle must be inlined rather than referenced as a
|
|
2516
|
+
// hashed sibling (which only the HTTP serving paths can resolve).
|
|
2517
|
+
let text = result.content;
|
|
2518
|
+
if (result.compiled?.js) {
|
|
2519
|
+
const { inlineHtml } = await import('../tsx-compiler.js');
|
|
2520
|
+
text = inlineHtml(result.compiled.js);
|
|
2521
|
+
}
|
|
2514
2522
|
return {
|
|
2515
2523
|
jsonrpc: '2.0',
|
|
2516
2524
|
id: req.id,
|
|
2517
|
-
result: { contents: [{ uri, mimeType, text
|
|
2525
|
+
result: { contents: [{ uri, mimeType, text }] },
|
|
2518
2526
|
};
|
|
2519
2527
|
}
|
|
2520
2528
|
// photon://<photon>/(prompts|resources)/<id> — class-level static-file assets
|