@womp/openai-plugin 0.1.1 → 0.2.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/index.d.ts CHANGED
@@ -40,7 +40,17 @@ interface Build {
40
40
  title?: string;
41
41
  picture: Picture | null;
42
42
  }
43
+ /**
44
+ * The design live in 3D, for the card to frame: a page on the host's own origin (the
45
+ * `liveViewOrigin` option) and when its key stops working. The URL carries a credential, so it goes to
46
+ * the card alone, never into text the model reads.
47
+ */
48
+ interface LiveView {
49
+ url: string;
50
+ expiresAt: string;
51
+ }
43
52
  interface WompBackend {
53
+ /** `live` is optional: a host that cannot offer a live view leaves it out and the card shows its picture. */
44
54
  openScene(subject: string, input: {
45
55
  designId?: string;
46
56
  title?: string;
@@ -48,6 +58,7 @@ interface WompBackend {
48
58
  designId: string;
49
59
  buildId: string;
50
60
  title: string;
61
+ live?: LiveView;
51
62
  }>;
52
63
  getSceneApi(): Promise<SceneApi>;
53
64
  runScript(subject: string, input: {
@@ -77,7 +88,13 @@ interface ServerOptions {
77
88
  subject?: string;
78
89
  onError?: (tool: string, error: unknown) => void;
79
90
  instructions?: string;
91
+ /**
92
+ * The one origin the card may frame for a live view, such as "https://app.womp.com". Without it the
93
+ * card allows no frames and `live` from the backend is ignored; an `http:` origin, a path or anything
94
+ * that is not an origin is the same as none.
95
+ */
96
+ liveViewOrigin?: string;
80
97
  }
81
- declare function createServer({ backend, subject, onError, instructions }: ServerOptions): McpServer;
98
+ declare function createServer({ backend, subject, onError, instructions, liveViewOrigin }: ServerOptions): McpServer;
82
99
 
83
- export { BackendRefusal, type WompBackend, createServer };
100
+ export { BackendRefusal, type LiveView, type WompBackend, createServer };