@botiverse/porthole 0.4.0 → 0.5.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/README.md +3 -1
- package/dist/bridge/bridge.d.ts +16 -2
- package/dist/bridge/bridge.js +65 -12
- package/dist/bridge/types.d.ts +44 -6
- package/dist/check/lint.js +2 -2
- package/dist/check/page-source.js +1 -1
- package/dist/check/page.js +5 -0
- package/dist/compile/policy.d.ts +5 -0
- package/dist/compile/policy.js +18 -1
- package/dist/config/capabilities.d.ts +25 -2
- package/dist/config/capabilities.js +13 -0
- package/dist/config/schema.d.ts +7 -0
- package/dist/config/validate.js +14 -3
- package/dist/conformance/harness/page.js +1 -0
- package/dist/conformance/harness-source.js +1 -1
- package/dist/displays/displays.d.ts +1 -1
- package/dist/guide/guide.js +48 -8
- package/dist/host/create-host.js +5 -1
- package/dist/host/types.d.ts +12 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +2 -1
- package/dist/libraries/files.generated.d.ts +1 -0
- package/dist/libraries/files.generated.js +8 -0
- package/dist/libraries/libraries.d.ts +36 -0
- package/dist/libraries/libraries.js +40 -0
- package/dist/mcp/adapter.js +31 -2
- package/dist/presets/presets.d.ts +15 -0
- package/dist/presets/presets.js +27 -2
- package/dist/protocol/live-data.d.ts +27 -0
- package/dist/protocol/live-data.js +98 -0
- package/dist/protocol/mcp-apps.d.ts +9 -0
- package/dist/protocol/mcp-apps.js +11 -0
- package/dist/protocol/shell-adapter.js +35 -2
- package/dist/react/dialog.js +2 -0
- package/dist/react/frame.d.ts +15 -1
- package/dist/react/frame.js +35 -1
- package/dist/server/libraries.d.ts +7 -0
- package/dist/server/libraries.js +27 -0
- package/dist/server/server.js +2 -1
- package/dist/shell/annotate.js +4 -1
- package/dist/shell/runtime.d.ts +5 -1
- package/dist/shell/runtime.js +165 -1
- package/docs/ADOPTING.md +57 -1
- package/docs/DECISIONS.md +129 -0
- package/docs/DESIGN.md +19 -6
- package/package.json +3 -1
- package/src/bridge/bridge.ts +85 -13
- package/src/bridge/types.ts +45 -3
- package/src/check/lint.ts +2 -1
- package/src/check/page.ts +5 -0
- package/src/compile/policy.ts +19 -1
- package/src/config/capabilities.ts +21 -0
- package/src/config/schema.ts +7 -0
- package/src/config/validate.ts +21 -3
- package/src/conformance/harness/page.ts +1 -0
- package/src/displays/displays.ts +1 -1
- package/src/guide/guide.ts +57 -7
- package/src/host/create-host.ts +5 -1
- package/src/host/types.ts +12 -1
- package/src/index.ts +13 -0
- package/src/libraries/files.generated.ts +8 -0
- package/src/libraries/libraries.ts +64 -0
- package/src/mcp/adapter.ts +40 -2
- package/src/presets/presets.ts +46 -3
- package/src/protocol/live-data.ts +138 -0
- package/src/protocol/mcp-apps.ts +12 -0
- package/src/protocol/shell-adapter.ts +35 -3
- package/src/react/dialog.tsx +2 -0
- package/src/react/frame.tsx +54 -0
- package/src/server/libraries.ts +28 -0
- package/src/server/server.ts +2 -1
- package/src/shell/annotate.ts +4 -1
- package/src/shell/runtime.ts +165 -1
|
@@ -17,7 +17,7 @@ import { type PresetOptions, type UrlPresetOptions } from "../presets/presets.ts
|
|
|
17
17
|
* `artifact`, or puts `preset: "page"` in its instances.
|
|
18
18
|
*/
|
|
19
19
|
export type DisplayKind = {
|
|
20
|
-
readonly preset: "inlineWidget" | "artifact" | "mcpApp";
|
|
20
|
+
readonly preset: "inlineWidget" | "liveWidget" | "artifact" | "mcpApp";
|
|
21
21
|
readonly options?: PresetOptions;
|
|
22
22
|
/** Options added when served on content origins (domain isolation): storage, egress. */
|
|
23
23
|
readonly served?: Omit<PresetOptions, "isolation" | "contentOrigins">;
|
package/dist/guide/guide.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MAX_COPY_CHARS, capabilitySpec, } from "../config/capabilities.js";
|
|
2
2
|
import { BUILT_IN_TOPICS } from "../config/validate.js";
|
|
3
|
-
import { anyHttps, declaredCapabilities, effectiveGates, egressOrigins, } from "../compile/policy.js";
|
|
3
|
+
import { anyHttps, declaredCapabilities, effectiveGates, egressOrigins, librarySources, } from "../compile/policy.js";
|
|
4
|
+
import { VENDORED_LIBRARIES, libraryPath } from "../libraries/libraries.js";
|
|
4
5
|
import { shellPlan } from "../shell/plan.js";
|
|
5
6
|
import { themeDefault } from "../theme/variables.js";
|
|
6
7
|
import { GUIDE_EXAMPLES } from "./examples.js";
|
|
@@ -51,6 +52,8 @@ const sourcesFor = (config, kind) => [
|
|
|
51
52
|
...(anyHttps(config, kind) ? [ANY_HTTPS_SITE] : []),
|
|
52
53
|
...egressOrigins(config, kind),
|
|
53
54
|
];
|
|
55
|
+
/** Whether Porthole's own libraries load in the frame (`egress.libraries`, served, P079). */
|
|
56
|
+
const servesLibraries = (config) => librarySources(config).length > 0;
|
|
54
57
|
/** What content may load, in prose, from the same origins the CSP lists. */
|
|
55
58
|
function network(config) {
|
|
56
59
|
const kinds = ["script", "style", "font", "img", "media", "connect"];
|
|
@@ -58,7 +61,13 @@ function network(config) {
|
|
|
58
61
|
.map((kind) => [kind, sourcesFor(config, kind)])
|
|
59
62
|
.filter(([, origins]) => origins.length > 0);
|
|
60
63
|
if (open.length === 0) {
|
|
61
|
-
|
|
64
|
+
// A live widget's data comes from the app alone (P079), and its scripts from Porthole's copies.
|
|
65
|
+
const data = declaredCapabilities(config).includes("readData")
|
|
66
|
+
? " Your data comes only from the app (readData)."
|
|
67
|
+
: "";
|
|
68
|
+
return servesLibraries(config)
|
|
69
|
+
? `Network: none. Nothing loads from outside (no scripts, styles, fonts, images or data from any server) and any fetch fails, so write everything inline; the only scripts that load are the libraries below, from this frame's own address.${data}`
|
|
70
|
+
: `Network: none. Nothing loads from outside (no scripts, styles, fonts, images or data from any server) and any fetch fails, so write everything inline: SVG and CSS draw charts well.${data}`;
|
|
62
71
|
}
|
|
63
72
|
// Origins that serve the same kinds go together: "scripts, styles and data from a, b; fonts from c".
|
|
64
73
|
const byOrigin = new Map();
|
|
@@ -105,6 +114,20 @@ function ownCdns(config) {
|
|
|
105
114
|
}
|
|
106
115
|
return said;
|
|
107
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Porthole's own libraries (`egress.libraries`, P079): a script line for each, at its path on the
|
|
119
|
+
* frame's own origin, the only scripts that load where egress is otherwise closed.
|
|
120
|
+
*/
|
|
121
|
+
function ownLibraries(config) {
|
|
122
|
+
if (!servesLibraries(config)) {
|
|
123
|
+
return [];
|
|
124
|
+
}
|
|
125
|
+
return [
|
|
126
|
+
"",
|
|
127
|
+
"Libraries, served from this frame's own address (pinned; nothing else loads):",
|
|
128
|
+
...VENDORED_LIBRARIES.map((library) => `- ${library.title} ${library.version} (${library.use}): <script src="${libraryPath(library)}"></script>, then window.${library.global}.`),
|
|
129
|
+
];
|
|
130
|
+
}
|
|
108
131
|
function widget(c) {
|
|
109
132
|
const { config, noun } = c;
|
|
110
133
|
const { layout, limits } = config;
|
|
@@ -127,7 +150,7 @@ function widget(c) {
|
|
|
127
150
|
? null
|
|
128
151
|
: "- No position: fixed: the frame grows with its content, so a fixed element covers it.", "", "The sandbox:", ...stated.filter((limit) => limit.topic === "sandbox").map((limit) => `- ${limit.text}`), `Keep it under ${sizeWords(limits.maxBytes)}.`, loadsScripts(config)
|
|
129
152
|
? "\nLibraries: pin an exact version at least two weeks old (chart.js@4.4.1 in its URL), never @latest or a range, so the code can't be swapped under you and draws the same every time."
|
|
130
|
-
: null, ...ownCdns(config), "", themeless
|
|
153
|
+
: null, ...ownCdns(config), ...ownLibraries(config), "", themeless
|
|
131
154
|
? `Colors: these variables hold the app's palette; use them, or colors of your own. Give the ${noun} its own background.`
|
|
132
155
|
: optsIn(config)
|
|
133
156
|
? `Colors, for a ${noun} that declares light and dark: every color from these variables, never hard-coded, so both work; its own background then stays transparent (it sits on the app's surface).`
|
|
@@ -176,9 +199,11 @@ function chart(c) {
|
|
|
176
199
|
const { config } = c;
|
|
177
200
|
const categorical = Object.keys(config.theme.variables).filter((name) => /^--color-chart-\d+$/u.test(name));
|
|
178
201
|
const sequential = Object.keys(config.theme.variables).filter((name) => /^--color-chart-seq-\d+$/u.test(name));
|
|
179
|
-
const libraries =
|
|
180
|
-
?
|
|
181
|
-
:
|
|
202
|
+
const libraries = servesLibraries(config)
|
|
203
|
+
? `${VENDORED_LIBRARIES.map((library) => library.title).join(" and ")} load from this frame's own address (topic widget, Libraries) and draw in px too, in a box with a set height (Chart.js responsive: true, maintainAspectRatio: false). They don't read CSS variables: pass in getComputedStyle(document.documentElement).getPropertyValue("${categorical[0] ?? "--color-text-primary"}").trim()${config.theme.documents === "never" ? "" : `, redraw on window "${config.theme.event}"`}, and override their palette and white background. Or draw the SVG yourself, from a script, as below.`
|
|
204
|
+
: loadsScripts(config)
|
|
205
|
+
? `Libraries (Chart.js, ECharts, d3) draw in px too, in a box with a set height (Chart.js responsive: true, maintainAspectRatio: false). They don't read CSS variables: pass in getComputedStyle(document.documentElement).getPropertyValue("${categorical[0] ?? "--color-text-primary"}").trim()${config.theme.documents === "never" ? "" : `, redraw on window "${config.theme.event}"`}, and override their palette and white background.`
|
|
206
|
+
: "No chart library loads here: draw the SVG yourself, from a script, as below.";
|
|
182
207
|
return lines(`# Charts (a chart is a ${c.noun})`, "", "Pick the form first: a trend over time → line; compare categories → horizontal bars; x against y → scatter; one number → a big number, not a chart; a few numbers → a table, not a chart.", "", "The look:", '- The title states the finding, with its number ("Failed builds fell from 9 to 2 a week"), not the topic; a line under it says what is measured, in what unit.', c.when("- Grey first: the data in a quiet grey (--color-text-disabled), one accent (--color-chart-1) on what the title is about. More hues only for series that differ in kind and must each be found."), "- Values on the marks or a light axis, not both; label only the points the finding rests on. Bars start at zero.", "- Write the numbers once, as rows, and draw marks, labels and readout from them.", "", "Size: draw it at the frame's width, 1 unit = 1 px: read the box's clientWidth, draw an <svg> that wide with 12 px text, and again from a ResizeObserver. Its text stays 12 px on every screen; keep x labels 44 px apart. No script: the phone viewBox (topic widget). Bars need no SVG: an HTML grid row per category.", "", libraries, "", categorical.length === 0 ? null : "Colors:", categorical.length === 0
|
|
183
208
|
? null
|
|
184
209
|
: `- Series of different kinds: ${categorical[0]} … ${categorical.at(-1)}, in this order, never cycled, at most ${categorical.length} (fold the rest into "Other"); a series keeps its color when a filter hides others.`, sequential.length === 0
|
|
@@ -192,6 +217,9 @@ function chart(c) {
|
|
|
192
217
|
/** How a capability's gates read to the author: one sentence each. */
|
|
193
218
|
function gateWords(gates, effect) {
|
|
194
219
|
const sentences = [];
|
|
220
|
+
if (gates.includes("consent")) {
|
|
221
|
+
sentences.push("The first data call asks the person to allow it; if they don't, every one fails (show that the data isn't allowed, not an error).");
|
|
222
|
+
}
|
|
195
223
|
if (gates.includes("confirm")) {
|
|
196
224
|
sentences.push(`The app shows the person ${effect} first, and nothing happens unless they confirm.`);
|
|
197
225
|
}
|
|
@@ -214,7 +242,12 @@ const ENTRIES = {
|
|
|
214
242
|
: `- Links: the MCP Apps request ui/open-link (with the App SDK, app.openLink) asks to open an http(s) link in a new tab. ${gateWords(gates, "the link")}`,
|
|
215
243
|
downloadFile: (_c, gates) => `- Downloads: the MCP Apps request ui/download-file (with the App SDK, app.downloadFile). ${gateWords(gates, "the file")}`,
|
|
216
244
|
callTool: (_c, gates) => `- Tools: the MCP Apps request tools/call (with the App SDK, app.callServerTool). ${gateWords(gates, "the call")}`,
|
|
217
|
-
readData: (
|
|
245
|
+
readData: (c, gates) => c.global("readData")
|
|
246
|
+
? `- readData(uri): reads the app's data at uri (a resource the app names), as the person viewing the ${c.noun} may see it, and returns a promise of it: JSON parsed, else text. ${gateWords(gates, "the request")} It rejects when the app refuses or fails: draw the ${c.noun} without that data, saying why.`
|
|
247
|
+
: `- Data: the MCP Apps request resources/read (with the App SDK, app.readServerResource). ${gateWords(gates, "the request")}`,
|
|
248
|
+
subscribeData: (c, gates) => c.global("subscribeData")
|
|
249
|
+
? `- subscribeData(uri, onData, onError): keeps the ${c.noun} current. It calls onData(value, { stale }) with the data at uri now, and again each time it changes; the first value may be the app's last copy (stale: true), with the current one right after. It returns a function that stops it. onError(error) hears a refusal. ${gateWords(gates, "the request")} Draw from onData every time; don't poll.`
|
|
250
|
+
: `- Live data: the MCP request resources/subscribe with { uri }; the app then sends notifications/resources/updated with { uri } each time it changes: read it again (resources/read). resources/unsubscribe stops it. ${gateWords(gates, "the request")}`,
|
|
218
251
|
setModelContext: (_c, gates) => `- Context for the agent: the MCP Apps request ui/update-model-context (with the App SDK, app.updateModelContext). ${gateWords(gates, "it")}`,
|
|
219
252
|
copyText: (c, gates) => c.global("copyText")
|
|
220
253
|
? `- copyText(text): copies text to the person's clipboard (at most ${MAX_COPY_CHARS.toLocaleString("en-US")} characters), and the app shows them what was copied. Use it for every copy button: nothing else in the ${c.noun} can write the clipboard. ${gateWords(gates, "the text")} It returns a promise: true if it was copied.`
|
|
@@ -281,7 +314,9 @@ export function generateToolDescription(config) {
|
|
|
281
314
|
const passive = ["font", "img", "media"].filter((kind) => anyHttps(config, kind));
|
|
282
315
|
const fromAnywhere = passive.length === 0 ? "" : `${kindsInWords(passive)} from ${ANY_HTTPS_SITE}`;
|
|
283
316
|
const net = origins.length === 0 && fromAnywhere === ""
|
|
284
|
-
?
|
|
317
|
+
? servesLibraries(config)
|
|
318
|
+
? `with no network (nothing loads from outside; ${VENDORED_LIBRARIES.map((library) => library.title).join(" and ")} load from the app)`
|
|
319
|
+
: "with no network (nothing loads from outside)"
|
|
285
320
|
: origins.length === 0
|
|
286
321
|
? `loading only ${fromAnywhere}`
|
|
287
322
|
: `loading only from ${origins.join(", ")}${fromAnywhere === "" ? "" : `, and ${fromAnywhere}`}`;
|
|
@@ -296,6 +331,11 @@ export function generateToolDescription(config) {
|
|
|
296
331
|
if (spec.global === "openLink") {
|
|
297
332
|
return ["openLink(url) asks the person to open a link."];
|
|
298
333
|
}
|
|
334
|
+
if (spec.global === "readData") {
|
|
335
|
+
return [
|
|
336
|
+
`readData(uri)${c.global("subscribeData") ? " and subscribeData(uri, onData)" : ""} read the app's data, as the person viewing it may see it.`,
|
|
337
|
+
];
|
|
338
|
+
}
|
|
299
339
|
return [];
|
|
300
340
|
});
|
|
301
341
|
const read = config.guide.guideToolName === undefined
|
package/dist/host/create-host.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ANNOTATE_METHODS, } from "../annotate/types.js";
|
|
2
2
|
import { annotateMode, checkMarks, parseReport } from "../annotate/validate.js";
|
|
3
|
-
import { createBridge } from "../bridge/bridge.js";
|
|
3
|
+
import { createBridge, onceConsent } from "../bridge/bridge.js";
|
|
4
4
|
import { compile } from "../compile/compile.js";
|
|
5
5
|
import { declaredCapabilities } from "../compile/policy.js";
|
|
6
6
|
import { capabilitySpec } from "../config/capabilities.js";
|
|
@@ -76,6 +76,8 @@ export function createHost(config, options = {}) {
|
|
|
76
76
|
let destroyed = false;
|
|
77
77
|
let restarts = 0;
|
|
78
78
|
let generation = 0;
|
|
79
|
+
// The viewer's answer for this display (P079): asked once, kept across its frames.
|
|
80
|
+
const consent = options.consent === undefined ? undefined : onceConsent(options.consent);
|
|
79
81
|
let abort = null;
|
|
80
82
|
let outcomeWatch = null;
|
|
81
83
|
let themeFrame = null;
|
|
@@ -308,6 +310,8 @@ export function createHost(config, options = {}) {
|
|
|
308
310
|
},
|
|
309
311
|
handlers,
|
|
310
312
|
...(options.confirm === undefined ? {} : { confirm: options.confirm }),
|
|
313
|
+
...(consent === undefined ? {} : { consent }),
|
|
314
|
+
...(options.cached === undefined ? {} : { cached: options.cached }),
|
|
311
315
|
userActivation: () => created.userActivation(),
|
|
312
316
|
onEvent: onBridge,
|
|
313
317
|
});
|
package/dist/host/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnnotateMode, AnnotationMark, AnnotationReport } from "../annotate/types.ts";
|
|
2
|
-
import type { Confirm, CapabilityHandlers, Refusal } from "../bridge/types.ts";
|
|
2
|
+
import type { Confirm, CapabilityHandlers, Consent, DataCache, Refusal } from "../bridge/types.ts";
|
|
3
3
|
import type { CompiledConfig } from "../compile/compile.ts";
|
|
4
4
|
import type { CapabilityName } from "../config/capabilities.ts";
|
|
5
5
|
import type { ColorScheme } from "../config/schema.ts";
|
|
@@ -17,6 +17,17 @@ export interface HostOptions<C extends AdapterConnection = ShellConnection> {
|
|
|
17
17
|
readonly handlers?: CapabilityHandlers;
|
|
18
18
|
/** Who confirms `confirm`-gated calls. Absent: those calls are refused. */
|
|
19
19
|
readonly confirm?: Confirm;
|
|
20
|
+
/**
|
|
21
|
+
* Whether a display may make its `consent`-gated calls (read the viewer's data, P079): asked
|
|
22
|
+
* once per display, before the first, and kept for the display's life (its reloads too).
|
|
23
|
+
* Absent: those calls are refused.
|
|
24
|
+
*/
|
|
25
|
+
readonly consent?: Consent;
|
|
26
|
+
/**
|
|
27
|
+
* What the host last had for a resource (P079): a read of one the content subscribes to is
|
|
28
|
+
* answered with it at once, marked stale, then with the handler's fresh result.
|
|
29
|
+
*/
|
|
30
|
+
readonly cached?: DataCache;
|
|
20
31
|
/**
|
|
21
32
|
* The host's live values for the config's theme variables, for `scheme` (read from its own
|
|
22
33
|
* design tokens). A name it leaves out, or answers empty, gets the config's default.
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export { BUILT_IN_TOPICS, ConfigError, isOriginSource, originSourceProblem, vali
|
|
|
9
9
|
export { URL_PERMISSIONS, URL_SANDBOX_EXTRAS, type UrlPermission, type UrlSandboxExtra, } from "./config/schema.ts";
|
|
10
10
|
export { hostOriginProblem, isHostOrigin } from "./isolation/served.ts";
|
|
11
11
|
export { FRAME_STATUS_METHOD } from "./isolation/types.ts";
|
|
12
|
-
export { LIBRARY_CDNS, presets, type PresetName, type PresetOptions, type UrlPresetOptions, } from "./presets/presets.ts";
|
|
12
|
+
export { LIBRARY_CDNS, presets, type PresetName, type LiveWidgetOptions, type PresetOptions, type UrlPresetOptions, } from "./presets/presets.ts";
|
|
13
|
+
export { LIBRARY_PATH, VENDORED_LIBRARIES, libraryPath, licensePath, type VendoredLibrary, } from "./libraries/libraries.ts";
|
|
13
14
|
export { compile, type CompiledConfig } from "./compile/compile.ts";
|
|
14
15
|
export { allEgressOrigins, anyHttps, declaredCapabilities, effectiveGates, egressOrigins, embedderCsp, embedderFrameSourcesOf, type CspDirective, type EgressKind, } from "./compile/policy.ts";
|
|
15
16
|
export { shellPlan, type ShellPlan } from "./shell/plan.ts";
|
|
@@ -21,8 +22,8 @@ export type { FrameLocation, FrameSource, InstanceLocator, InstanceRef, ServedDo
|
|
|
21
22
|
export type { PlatformHost, Surface, SurfaceSpec } from "./platform/types.ts";
|
|
22
23
|
export type { Transport } from "./transport/types.ts";
|
|
23
24
|
export type { AdapterConnection, AdapterEvent, AdapterSession, ProtocolAdapter, ShellConnection, } from "./protocol/adapter.ts";
|
|
24
|
-
export { COPY_TEXT_METHOD, MCP_APPS_METHODS, MCP_APPS_PROTOCOL_VERSION, MCP_APPS_STYLE_VARIABLES, PORTHOLE_STYLES, type HostContext, } from "./protocol/mcp-apps.ts";
|
|
25
|
-
export type { CallContext, CallOutcome, CapabilityHandler, CapabilityHandlers, Confirm, ConfirmAnswer, ConfirmDisplay, ConfirmRequest, Proceed, HostFunctionBridge, Refusal, } from "./bridge/types.ts";
|
|
25
|
+
export { COPY_TEXT_METHOD, MCP_APPS_METHODS, MCP_APPS_PROTOCOL_VERSION, MCP_APPS_STYLE_VARIABLES, PORTHOLE_STYLES, STALE_META, type HostContext, } from "./protocol/mcp-apps.ts";
|
|
26
|
+
export type { CallContext, CallOptions, CallOutcome, CapabilityHandler, CapabilityHandlers, Confirm, ConfirmAnswer, ConfirmDisplay, ConfirmRequest, Consent, DataCache, Proceed, HostFunctionBridge, Refusal, SubscriptionContext, } from "./bridge/types.ts";
|
|
26
27
|
export { createHost } from "./host/create-host.ts";
|
|
27
28
|
export { entryTarget, frameFallback, portholeClient, type ContentClientMeta, type FrameFallback, type PortholeClient, type PortholeClientOptions, } from "./host/client.ts";
|
|
28
29
|
export { defineDisplays, type DisplayKind, type Displays } from "./displays/displays.ts";
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { hostOriginProblem, isHostOrigin } from "./isolation/served.js";
|
|
|
11
11
|
export { FRAME_STATUS_METHOD } from "./isolation/types.js";
|
|
12
12
|
// Presets.
|
|
13
13
|
export { LIBRARY_CDNS, presets, } from "./presets/presets.js";
|
|
14
|
+
export { LIBRARY_PATH, VENDORED_LIBRARIES, libraryPath, licensePath, } from "./libraries/libraries.js";
|
|
14
15
|
// The compiler.
|
|
15
16
|
export { compile } from "./compile/compile.js";
|
|
16
17
|
export { allEgressOrigins, anyHttps, declaredCapabilities, effectiveGates, egressOrigins, embedderCsp, embedderFrameSourcesOf, } from "./compile/policy.js";
|
|
@@ -19,7 +20,7 @@ export { generateGuide, generateToolDescription, } from "./guide/guide.js";
|
|
|
19
20
|
export { GUIDE_EXAMPLES } from "./guide/examples.js";
|
|
20
21
|
// Theme.
|
|
21
22
|
export { CHART_PALETTE, DEFAULT_THEME, DEFAULT_THEME_EVENT, DEFAULT_THEME_VARIABLES, resolveTheme, themeDefault, } from "./theme/variables.js";
|
|
22
|
-
export { COPY_TEXT_METHOD, MCP_APPS_METHODS, MCP_APPS_PROTOCOL_VERSION, MCP_APPS_STYLE_VARIABLES, PORTHOLE_STYLES, } from "./protocol/mcp-apps.js";
|
|
23
|
+
export { COPY_TEXT_METHOD, MCP_APPS_METHODS, MCP_APPS_PROTOCOL_VERSION, MCP_APPS_STYLE_VARIABLES, PORTHOLE_STYLES, STALE_META, } from "./protocol/mcp-apps.js";
|
|
23
24
|
export { createHost } from "./host/create-host.js";
|
|
24
25
|
// The client half of the host kit, and the display registry (P072).
|
|
25
26
|
export { entryTarget, frameFallback, portholeClient, } from "./host/client.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LIBRARY_FILES: Readonly<Record<string, string>>;
|