@statelyai/sdk 0.20.2 → 0.21.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 CHANGED
@@ -44,6 +44,13 @@ embed.init({
44
44
  });
45
45
  ```
46
46
 
47
+ Custom profiles and formats can be supplied when the embed is created. Their
48
+ serializable manifests are sent to the iframe; detector, importer, exporter,
49
+ and validator implementations remain in the host and are called asynchronously.
50
+ RPC methods and payloads are validated before host code runs, and malformed
51
+ graphs returned by custom importers are rejected.
52
+ Use `defaultProfile` and `defaultFormat` to choose the initial custom pair.
53
+
47
54
  Restrict an embed by passing a resolved access policy:
48
55
 
49
56
  <!-- restricted MachineInitOptions from src/protocol.ts -->
package/dist/embed.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { i as StatelyGraph } from "./graph-yDK-MM3G.mjs";
2
- import { CapabilityDeniedEvent, CommentsConfig, EditorCapabilities, EmbedDocument, EmbedDocumentLanguage, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, InitOptions, MachineInitOptions, MachineSourceLocations, ProjectEmbedMachine, UploadResult } from "./protocol.mjs";
1
+ import { l as ProfileManifest } from "./index-BABex8NE.mjs";
2
+ import { i as StatelyGraph } from "./graph-B4WM_nYg.mjs";
3
+ import { CapabilityDeniedEvent, CommentsConfig, EditorCapabilities, EmbedDocument, EmbedDocumentLanguage, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedExtensionsManifest, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, InitOptions, MachineInitOptions, MachineSourceLocations, ProjectEmbedMachine, UploadResult } from "./protocol.mjs";
3
4
  import { AssetUploadAdapter } from "./assetStorage.mjs";
4
5
 
5
6
  //#region src/embed.d.ts
@@ -29,6 +30,45 @@ interface AssetConfig {
29
30
  */
30
31
  maxFileSize?: number;
31
32
  }
33
+ type EmbedEntity = {
34
+ data?: Record<string, unknown>;
35
+ };
36
+ type EmbedGraph = EmbedEntity & {
37
+ nodes?: EmbedEntity[];
38
+ edges?: EmbedEntity[];
39
+ };
40
+ type EmbedFormatContext = {
41
+ profile: EmbedProfileDefinition;
42
+ resolveGraphData(graph: EmbedGraph): Record<string, unknown>;
43
+ resolveNodeData(node: EmbedEntity): Record<string, unknown>;
44
+ resolveEdgeData(edge: EmbedEntity): Record<string, unknown>;
45
+ };
46
+ type EmbedProfileDefinition = Omit<ProfileManifest, 'validation'> & {
47
+ validation?: Array<{
48
+ name: string;
49
+ description: string;
50
+ validate?(context: {
51
+ graph: EmbedGraph;
52
+ profile: ProfileManifest;
53
+ revision?: number;
54
+ resolveGraphData(graph: EmbedGraph): Record<string, unknown>;
55
+ resolveNodeData(node: EmbedEntity): Record<string, unknown>;
56
+ resolveEdgeData(edge: EmbedEntity): Record<string, unknown>;
57
+ }): unknown | Promise<unknown>;
58
+ }>;
59
+ };
60
+ type EmbedFormatDefinition = {
61
+ id: string;
62
+ name: string;
63
+ file?: {
64
+ extension?: string;
65
+ mediaType?: string;
66
+ };
67
+ editorLanguage?: string;
68
+ detect?(source: string): boolean | number | Promise<boolean | number>;
69
+ import?(source: string, context: EmbedFormatContext): unknown | Promise<unknown>;
70
+ export?(graph: EmbedGraph, context: EmbedFormatContext): unknown | Promise<unknown>;
71
+ };
32
72
  interface StatelyEmbedOptions extends Partial<MachineInitOptions> {
33
73
  baseUrl: string;
34
74
  apiKey?: string;
@@ -49,6 +89,10 @@ interface StatelyEmbedOptions extends Partial<MachineInitOptions> {
49
89
  commentsByMachineId?: Record<string, CommentsConfig>;
50
90
  /** Asset upload configuration. If omitted, files are stored as base64 data URLs. */
51
91
  assets?: AssetConfig;
92
+ profiles?: readonly EmbedProfileDefinition[];
93
+ formats?: readonly EmbedFormatDefinition[];
94
+ defaultProfile?: string;
95
+ defaultFormat?: string;
52
96
  onReady?: () => void;
53
97
  onLoaded?: (graph: StatelyGraph) => void;
54
98
  onChange?: (graph: StatelyGraph, machineConfig: unknown) => void;
@@ -91,4 +135,4 @@ interface StatelyEmbed {
91
135
  }
92
136
  declare function createStatelyEmbed(options: StatelyEmbedOptions): StatelyEmbed;
93
137
  //#endregion
94
- export { AssetConfig, type CapabilityDeniedEvent, type CommentsConfig, type EditorCapabilities, type EmbedDocument, type EmbedDocumentLanguage, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedMode, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type InitOptions, type MachineInitOptions, type MachineSourceLocations, type ProjectEmbedMachine, StatelyEmbed, StatelyEmbedOptions, type UploadResult, createStatelyEmbed };
138
+ export { AssetConfig, type CapabilityDeniedEvent, type CommentsConfig, type EditorCapabilities, type EmbedDocument, type EmbedDocumentLanguage, EmbedEntity, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedExtensionsManifest, EmbedFormatContext, EmbedFormatDefinition, EmbedGraph, type EmbedMode, EmbedProfileDefinition, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type InitOptions, type MachineInitOptions, type MachineSourceLocations, type ProjectEmbedMachine, StatelyEmbed, StatelyEmbedOptions, type UploadResult, createStatelyEmbed };
package/dist/embed.mjs CHANGED
@@ -1,13 +1,73 @@
1
- import { a as createEventRegistry, o as createPendingExportManager, r as createPostMessageTransport, s as toInitMessage, t as SDK_VERSION } from "./version-C-1n7MoR.mjs";
1
+ import { a as createEventRegistry, o as createPendingExportManager, r as createPostMessageTransport, s as toInitMessage, t as SDK_VERSION } from "./version-CNeiHhaT.mjs";
2
2
  import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-D_h4y3rX.mjs";
3
3
 
4
4
  //#region src/embed.ts
5
+ function isRecord(value) {
6
+ return typeof value === "object" && value !== null && !Array.isArray(value);
7
+ }
8
+ function isEmbedEntity(value) {
9
+ return isRecord(value) && isRecord(value.data);
10
+ }
11
+ function isEmbedGraph(value) {
12
+ return isRecord(value) && isRecord(value.data) && Array.isArray(value.nodes) && value.nodes.every(isEmbedEntity) && Array.isArray(value.edges) && value.edges.every(isEmbedEntity);
13
+ }
14
+ function assertExtensionCall(value) {
15
+ if (!isRecord(value)) throw new Error("Invalid extension request.");
16
+ if (typeof value.requestId !== "string" || typeof value.extensionId !== "string" || ![
17
+ "detect",
18
+ "import",
19
+ "export",
20
+ "validate"
21
+ ].includes(String(value.method)) || !isRecord(value.payload)) throw new Error("Invalid extension request.");
22
+ const payload = value.payload;
23
+ if ((value.method === "detect" || value.method === "import") && typeof payload.source !== "string") throw new Error("Invalid extension source payload.");
24
+ if ((value.method === "import" || value.method === "export") && typeof payload.profileId !== "string") throw new Error("Invalid extension profile payload.");
25
+ if ((value.method === "export" || value.method === "validate") && !isEmbedGraph(payload.graph)) throw new Error("Invalid extension graph payload.");
26
+ if (value.method === "validate" && payload.revision !== void 0 && typeof payload.revision !== "number") throw new Error("Invalid extension revision payload.");
27
+ }
5
28
  function buildEmbedUrl(options) {
6
29
  const base = options.baseUrl.replace(/\/+$/, "") + "/embed";
7
30
  const url = new URL(base);
8
31
  if (options.apiKey) url.searchParams.set("api_key", options.apiKey);
9
32
  return url.toString();
10
33
  }
34
+ function serializeExtensions(options) {
35
+ if (!options.profiles?.length && !options.formats?.length) return options.extensions;
36
+ return {
37
+ profiles: (options.profiles ?? []).map((profile) => ({
38
+ profile: profile.profile,
39
+ name: profile.name,
40
+ description: profile.description,
41
+ namespace: profile.namespace,
42
+ extends: profile.extends,
43
+ formats: profile.formats,
44
+ defaultFormat: profile.defaultFormat,
45
+ graph: profile.graph,
46
+ authoring: profile.authoring,
47
+ operations: profile.operations,
48
+ restrictFormatsToListed: profile.restrictFormatsToListed,
49
+ features: profile.features,
50
+ implementations: profile.implementations,
51
+ rules: profile.rules,
52
+ editorDefaults: profile.editorDefaults,
53
+ validation: profile.validation?.map(({ name, description }) => ({
54
+ name,
55
+ description
56
+ }))
57
+ })),
58
+ formats: (options.formats ?? []).map((format) => ({
59
+ id: format.id,
60
+ name: format.name,
61
+ file: format.file,
62
+ editorLanguage: format.editorLanguage,
63
+ detect: !!format.detect,
64
+ import: !!format.import,
65
+ export: !!format.export
66
+ })),
67
+ defaultProfile: options.defaultProfile,
68
+ defaultFormat: options.defaultFormat
69
+ };
70
+ }
11
71
  function extractInitOptions(options) {
12
72
  if (options.machines) return {
13
73
  machines: options.machines,
@@ -26,6 +86,7 @@ function extractInitOptions(options) {
26
86
  machine: options.machine,
27
87
  documents: options.documents,
28
88
  format: options.format,
89
+ extensions: serializeExtensions(options),
29
90
  mode: options.mode,
30
91
  theme: options.theme,
31
92
  readOnly: options.readOnly,
@@ -41,7 +102,7 @@ function extractInitOptions(options) {
41
102
  }
42
103
  function createStatelyEmbed(options) {
43
104
  const embedUrl = buildEmbedUrl(options);
44
- const targetOrigin = options.origin ?? "*";
105
+ const targetOrigin = options.origin ?? new URL(embedUrl).origin;
45
106
  let iframe = null;
46
107
  let transport = null;
47
108
  let ownedIframe = false;
@@ -49,6 +110,9 @@ function createStatelyEmbed(options) {
49
110
  let editorProtocolCompatible;
50
111
  const pendingMessages = [];
51
112
  const events = createEventRegistry();
113
+ const profiles = new Map((options.profiles ?? []).map((profile) => [profile.profile, profile]));
114
+ const formats = new Map((options.formats ?? []).map((format) => [format.id, format]));
115
+ const bundledExtensions = serializeExtensions(options);
52
116
  const exportManager = createPendingExportManager((message) => send(message));
53
117
  const assetUploadAdapter = options.assets?.adapter;
54
118
  const uploadAsset = options.assets?.onUploadRequest ? (file, context) => options.assets.onUploadRequest(file, context) : assetUploadAdapter ? (file, context) => assetUploadAdapter.upload({
@@ -72,9 +136,73 @@ function createStatelyEmbed(options) {
72
136
  transport.send(msg);
73
137
  }
74
138
  }
139
+ function formatContext(profile) {
140
+ const namespace = profile.namespace ?? /^(@[^/]+)\//.exec(profile.profile)?.[1];
141
+ if (!namespace) throw new Error(`Profile ${profile.profile} has no namespace.`);
142
+ const resolve = (data) => Object.fromEntries(Object.entries(data).filter(([key]) => key.startsWith(`${namespace}.`)).map(([key, value]) => [key.slice(namespace.length + 1), value]));
143
+ return {
144
+ profile,
145
+ resolveGraphData: (graph) => resolve(graph.data ?? {}),
146
+ resolveNodeData: (node) => resolve(node.data ?? {}),
147
+ resolveEdgeData: (edge) => resolve(edge.data ?? {})
148
+ };
149
+ }
150
+ async function handleExtensionCall(input) {
151
+ const requestId = isRecord(input) && typeof input.requestId === "string" ? input.requestId : void 0;
152
+ try {
153
+ assertExtensionCall(input);
154
+ const call = input;
155
+ const payload = call.payload;
156
+ let result;
157
+ if (call.method === "validate") {
158
+ const profile = profiles.get(call.extensionId);
159
+ if (!profile) throw new Error(`Unknown profile ${call.extensionId}.`);
160
+ const context = formatContext(profile);
161
+ result = (await Promise.all((profile.validation ?? []).filter((validator) => validator.validate).map((validator) => validator.validate({
162
+ graph: payload.graph,
163
+ revision: typeof payload.revision === "number" ? payload.revision : void 0,
164
+ ...context
165
+ })))).flat();
166
+ } else {
167
+ const format = formats.get(call.extensionId);
168
+ if (!format) throw new Error(`Unknown format ${call.extensionId}.`);
169
+ if (call.method === "detect") {
170
+ if (!format.detect) throw new Error("Format has no detector.");
171
+ result = await format.detect(String(payload.source ?? ""));
172
+ } else {
173
+ const profile = profiles.get(String(payload.profileId ?? ""));
174
+ if (!profile) throw new Error(`Unknown profile ${payload.profileId}.`);
175
+ const context = formatContext(profile);
176
+ if (call.method === "import") {
177
+ if (!format.import) throw new Error("Format has no importer.");
178
+ result = await format.import(payload.source, context);
179
+ if (!isEmbedGraph(result)) throw new Error("Format importer returned an invalid graph.");
180
+ } else {
181
+ if (!format.export) throw new Error("Format has no exporter.");
182
+ result = await format.export(payload.graph, context);
183
+ }
184
+ }
185
+ }
186
+ send({
187
+ type: "@statelyai.extension.result",
188
+ requestId: call.requestId,
189
+ result
190
+ });
191
+ } catch (error) {
192
+ if (!requestId) return;
193
+ send({
194
+ type: "@statelyai.extension.result",
195
+ requestId,
196
+ error: error instanceof Error ? error.message : String(error)
197
+ });
198
+ }
199
+ }
75
200
  function handleMessage(data) {
76
201
  if (destroyed) return;
77
202
  switch (data.type) {
203
+ case "@statelyai.extension.call":
204
+ handleExtensionCall(data);
205
+ break;
78
206
  case "@statelyai.ready": {
79
207
  const ready = data;
80
208
  if (ready.protocolVersion !== void 0) {
@@ -257,7 +385,10 @@ function createStatelyEmbed(options) {
257
385
  return el;
258
386
  },
259
387
  init(opts) {
260
- send(toInitMessage(opts));
388
+ send(toInitMessage("machine" in opts ? {
389
+ ...opts,
390
+ extensions: opts.extensions ?? bundledExtensions
391
+ } : opts));
261
392
  },
262
393
  updateMachine(machine, format, sourceLocations) {
263
394
  send({
@@ -1,4 +1,4 @@
1
- import { r as CodeExpression } from "./index-BAkQThnl.mjs";
1
+ import { r as CodeExpression } from "./index-BABex8NE.mjs";
2
2
  import * as _statelyai_graph0 from "@statelyai/graph";
3
3
  import { Graph } from "@statelyai/graph";
4
4
 
package/dist/graph.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-yDK-MM3G.mjs";
1
+ import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-B4WM_nYg.mjs";
2
2
  export { StatelyAction, StatelyActorImplementation, StatelyEdgeData, StatelyGraph, StatelyGraphData, StatelyGuard, StatelyImplementation, StatelyInvoke, StatelyNodeData, StatelyTagImplementation, StudioAction, StudioEdge, StudioEventTypeData, StudioMachine, StudioNode, fromStudioMachine, studioMachineConverter, toStudioMachine };
@@ -2451,6 +2451,70 @@ declare function raw(code: string): RawCode;
2451
2451
  declare function serializeJS(value: unknown, indent?: number, step?: number): string; //#endregion
2452
2452
  //#region src/profiles/xgraphMetadata.d.ts
2453
2453
  //#endregion
2454
+ //#region src/profiles/types.d.ts
2455
+ type FormatId = string;
2456
+ type ProfileFormatManifest = {
2457
+ format: FormatId;
2458
+ import?: boolean;
2459
+ export?: boolean;
2460
+ sourcePreserving?: boolean;
2461
+ warning?: string;
2462
+ };
2463
+ type ProfileEntityType = {
2464
+ kind: string;
2465
+ label: string;
2466
+ description?: string;
2467
+ authorable?: boolean;
2468
+ terminal?: boolean;
2469
+ canContain?: boolean; /** Logical, unnamespaced profile data stored canonically under the profile namespace. */
2470
+ dataSchema?: JSONSchema7;
2471
+ children?: {
2472
+ types: readonly string[];
2473
+ min?: number;
2474
+ max?: number;
2475
+ };
2476
+ };
2477
+ type ProfileValidationDefinition = {
2478
+ name: string;
2479
+ description: string;
2480
+ };
2481
+ type ProfileAuthoringManifest = {
2482
+ terminology: {
2483
+ node: string;
2484
+ edge: string;
2485
+ graph: string;
2486
+ };
2487
+ nodeTypes: readonly ProfileEntityType[];
2488
+ edgeTypes: readonly ProfileEntityType[];
2489
+ attachments?: Partial<Record<'actions' | 'guards' | 'invokes' | 'tags', boolean>>;
2490
+ supportsInitialNode?: boolean;
2491
+ supportsTargetlessEdges?: boolean;
2492
+ supportsReenterEdges?: boolean;
2493
+ };
2494
+ type ProfileManifest = {
2495
+ profile: ResolvedProfileRef;
2496
+ name: string;
2497
+ description?: string; /** Namespace for canonical profile data, for example `@mastra`. */
2498
+ namespace?: `@${string}`;
2499
+ extends?: ProfileSpecifier;
2500
+ formats: ProfileFormatManifest[];
2501
+ defaultFormat?: FormatId;
2502
+ graph?: {
2503
+ dataSchema?: JSONSchema7;
2504
+ }; /** Profile-owned editor vocabulary. The canvas itself only assumes a graph. */
2505
+ authoring?: ProfileAuthoringManifest;
2506
+ operations?: Partial<Record<'simulate' | 'validate' | 'export', boolean>>;
2507
+ restrictFormatsToListed?: boolean;
2508
+ features?: Record<string, boolean | Record<string, unknown>>;
2509
+ implementations?: Partial<Record<'actions' | 'guards' | 'actors' | 'delays', {
2510
+ mode: 'allowlist' | 'any';
2511
+ items: Record<string, Record<string, unknown>>;
2512
+ }>>;
2513
+ rules?: Array<Record<string, unknown>>;
2514
+ validation?: ProfileValidationDefinition[];
2515
+ editorDefaults?: Record<string, unknown>;
2516
+ };
2517
+ //#endregion
2454
2518
  //#region src/graphToXStateTS.d.ts
2455
2519
  interface XStateTSOptions extends MachineConfigOptions {
2456
2520
  exportStyle?: 'named' | 'default' | 'none';
@@ -2888,4 +2952,4 @@ declare const graphPatchSchema: ZodDiscriminatedUnion<[ZodObject<{
2888
2952
  type GraphPatch = output<typeof graphPatchSchema>;
2889
2953
  /** AI-only schema: semantic ops + shared ops (no generic graph ops) */
2890
2954
  //#endregion
2891
- export { $strip as A, ZodObject as C, ZodUnion as D, ZodString as E, ZodUnknown as O, ZodNumber as S, ZodRecord as T, serializeJS as _, EditorStateType as a, ZodLiteral as b, MachineConfigOptions as c, contextSchemaToTSType as d, eventsSchemaToTSType as f, raw as g, jsonSchemaToTSType as h, CodeGenGraph as i, output as k, RawCode as l, graphToXStateTS as m, CanvasColor as n, GraphPatch as o, graphToMachineConfig as p, CodeExpression as r, ImplementationSourceType as s, ActionLocation as t, XStateTSOptions as u, ZodArray as v, ZodOptional as w, ZodNullable as x, ZodEnum as y };
2955
+ export { output as A, ZodNumber as C, ZodString as D, ZodRecord as E, ZodUnion as O, ZodNullable as S, ZodOptional as T, raw as _, EditorStateType as a, ZodEnum as b, MachineConfigOptions as c, XStateTSOptions as d, contextSchemaToTSType as f, jsonSchemaToTSType as g, graphToXStateTS as h, CodeGenGraph as i, $strip as j, ZodUnknown as k, ProfileManifest as l, graphToMachineConfig as m, CanvasColor as n, GraphPatch as o, eventsSchemaToTSType as p, CodeExpression as r, ImplementationSourceType as s, ActionLocation as t, RawCode as u, serializeJS as v, ZodObject as w, ZodLiteral as x, ZodArray as y };
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { StatelyApiClientOptions, StatelyApiError, StatelyApiUrlOptions, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
2
- import { _ as serializeJS, c as MachineConfigOptions, d as contextSchemaToTSType, f as eventsSchemaToTSType, g as raw, h as jsonSchemaToTSType, i as CodeGenGraph, l as RawCode, m as graphToXStateTS, o as GraphPatch, p as graphToMachineConfig, t as ActionLocation, u as XStateTSOptions } from "./index-BAkQThnl.mjs";
3
- import { C as EventTypeData, S as DigraphNodeConfig, _ as studioMachineConverter, a as StatelyGraphData, b as DigraphConfig, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, o as StatelyGuard, r as StatelyEdgeData, t as StatelyAction, v as toStudioMachine, w as StateNodeJSONData, x as DigraphEdgeConfig, y as DigraphAction } from "./graph-yDK-MM3G.mjs";
2
+ import { _ as raw, c as MachineConfigOptions, d as XStateTSOptions, f as contextSchemaToTSType, g as jsonSchemaToTSType, h as graphToXStateTS, i as CodeGenGraph, m as graphToMachineConfig, o as GraphPatch, p as eventsSchemaToTSType, t as ActionLocation, u as RawCode, v as serializeJS } from "./index-BABex8NE.mjs";
3
+ import { C as EventTypeData, S as DigraphNodeConfig, _ as studioMachineConverter, a as StatelyGraphData, b as DigraphConfig, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, o as StatelyGuard, r as StatelyEdgeData, t as StatelyAction, v as toStudioMachine, w as StateNodeJSONData, x as DigraphEdgeConfig, y as DigraphAction } from "./graph-B4WM_nYg.mjs";
4
4
  import { CapabilityDeniedCapability, CapabilityDeniedEvent, CommentsConfig, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, EditorCapabilities, EmbedDocument, EmbedDocumentLanguage, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, InitOptions, InspectionAction, InspectionSentEvent, InspectionTakenTransition, ProjectEmbedMachine, UploadResult, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId } from "./protocol.mjs";
5
5
  import { AssetUploadAdapter, AssetUploadContext, AssetUploadRequest, CreateS3AssetUploadAdapterOptions, CreateSupabaseAssetUploadAdapterOptions, S3UploadTarget, SupabaseStorageClient, createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
6
6
  import { i as getCredentialToken, n as StatelyCredential, r as createAuthorizationHeader, t as StatelyAuthMode } from "./auth-B0ZTKri2.mjs";
7
7
  import { a as RemoteEditorSyncBackendOptions, c as EDITOR_PROTOCOL_VERSION, d as EditorHostInitOptions, f as EditorHostOutboundMessage, i as EditorSyncBackend, l as EditorHostExportFormat, n as EditorHostSessionOptions, o as createRemoteEditorSyncBackend, p as EditorHostValidationIssue, r as EditorSourceHost, s as fetchEditorSyncAccess, t as EditorHostSession, u as EditorHostInboundMessage } from "./editorHostSession-lL7wPLnL.mjs";
8
- import { AssetConfig, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
8
+ import { AssetConfig, EmbedEntity, EmbedFormatContext, EmbedFormatDefinition, EmbedGraph, EmbedProfileDefinition, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
9
9
  import { a as InspectedTransition, c as InspectorInspectionEvent, d as createStatelyInspector, f as Transport, h as createWebSocketTransport, i as InspectedSnapshot, l as ManualActorOptions, m as createPostMessageTransport, n as CreateInspectorOptions, o as Inspector, p as TransportFailure, r as InspectedEvent, s as InspectorEvents, t as AdoptedActor, u as createInspector } from "./inspect-CGJR4iZK.mjs";
10
- import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-YSppd-am.mjs";
10
+ import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-CjnsqD8j.mjs";
11
11
  import { OAuthAuthorizationServerMetadata, OAuthClientRegistrationResponse, OAuthProtectedResourceMetadata, OAuthTokenResponse, PkcePair, buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
12
12
  import { PlanSyncOptions, PullSyncResult, PushLocalMachineLinksResult, PushSyncOptions, PushSyncProjectOptions, PushSyncResult, ResolvedSyncInput, SyncInputFormat, SyncPlan, SyncPlanSummary } from "./sync.mjs";
13
13
  import { CreateInspectionRelayOptions, InspectionRelay, InspectionRelayEffect, InspectionRelayPeer, InspectionRelayRole, InspectionRelaySnapshot, createInspectionRelay } from "./relay.mjs";
@@ -33,4 +33,4 @@ declare function findStatelyPragmaAttachments(sourceText: string, fileName?: str
33
33
  declare function getStatelyPragma(sourceText: string, fileName?: string, machineIndex?: number): StatelyPragma | undefined;
34
34
  declare function upsertStatelyPragma(sourceText: string, id: string, options?: UpsertStatelyPragmaOptions): string;
35
35
  //#endregion
36
- export { type ActionLocation, type AdoptedActor, type AssetConfig, type AssetUploadAdapter, type AssetUploadContext, type AssetUploadRequest, type CapabilityDeniedCapability, type CapabilityDeniedEvent, type CodeGenGraph, type CommentsConfig, type ConnectedRepo, type CreateInspectionRelayOptions, type CreateInspectorOptions, type CreateMachineFromDefinitionInput, type CreateMachineFromTemplateInput, type CreateMachineInput, type CreateMachineTemplate, type CreateProjectInput, type CreateS3AssetUploadAdapterOptions, type CreateSupabaseAssetUploadAdapterOptions, DEFAULT_STATELY_BASE_URL, type DigraphAction, type DigraphConfig, type DigraphEdgeConfig, type DigraphNodeConfig, EDITOR_PROTOCOL_VERSION, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, type EditorCapabilities, type EditorHostExportFormat, type EditorHostInboundMessage, type EditorHostInitOptions, type EditorHostOutboundMessage, EditorHostSession, type EditorHostSessionOptions, type EditorHostValidationIssue, type EditorSourceHost, type EditorSyncBackend, type EmbedDocument, type EmbedDocumentLanguage, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedMode, type EnsureProjectInput, type EventTypeData, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type ExtractMachinesInput, type ExtractMachinesResponse, type ExtractedMachine, type ExtractedMachines, type GetMachineOptions, type GraphPatch, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, type InitOptions, type InspectedEvent, type InspectedSnapshot, type InspectedTransition, type InspectionAction, type InspectionRelay, type InspectionRelayEffect, type InspectionRelayPeer, type InspectionRelayRole, type InspectionRelaySnapshot, type InspectionSentEvent, type InspectionTakenTransition, type Inspector, type InspectorEvents, type InspectorInspectionEvent, type LegacyProjectVisibility, type LegacyUpdateMachineInput, type Machine, type MachineConfigOptions, type MachineVersion, type ManualActorOptions, type OAuthAuthorizationServerMetadata, type OAuthClientRegistrationResponse, type OAuthProtectedResourceMetadata, type OAuthTokenResponse, type PkcePair, type PlanSyncOptions, type Project, type ProjectData, type ProjectEmbedMachine, type ProjectMachine, type ProjectMachineSummary, type ProjectSummary, type ProjectVisibility, type PullSyncResult, type PushLocalMachineLinksResult, type PushSyncOptions, type PushSyncProjectOptions, type PushSyncResult, RawCode, type RemoteEditorSyncBackendOptions, type RepoType, type ResolvedSyncInput, type ResourceErrorCode, type S3UploadTarget, type StateNodeJSONData, type StatelyAction, type StatelyApiClientOptions, StatelyApiError, type StatelyApiUrlOptions, type StatelyAuthMode, type StatelyCredential, type StatelyEdgeData, type StatelyEmbed, type StatelyEmbedOptions, type StatelyGraph, type StatelyGraphData, type StatelyGuard, type StatelyInvoke, type StatelyNodeData, type StatelyPragma, type StatelyPragmaAttachment, type StudioAction, StudioApiError, type StudioApiErrorOptions, type StudioClient, type StudioClientOptions, type StudioEdge, type StudioMachine, type StudioMachineRecord, type StudioNode, type StudioRequestOptions, type SupabaseStorageClient, type SyncInputFormat, type SyncPlan, type SyncPlanSummary, type Transport, type TransportFailure, type UpdateMachineInput, type UpdateProjectInput, type UploadResult, type UpsertStatelyPragmaOptions, type VerifyApiKeyResponse, type VerifyResult, type XStateTSOptions, type XStateVersion, buildAuthorizeUrl, contextSchemaToTSType, createAuthorizationHeader, createInspectionActorId, createInspectionRelay, createInspectionRoomUrls, createInspector, createPkcePair, createPostMessageTransport, createRemoteEditorSyncBackend, createS3AssetUploadAdapter, createStatelyApiClient, createStatelyApiUrl, createStatelyClient, createStatelyEmbed, createStatelyInspector, createSupabaseAssetUploadAdapter, createWebSocketTransport, discoverAuthorizationServer, discoverProtectedResource, eventsSchemaToTSType, exchangeCodeForToken, fetchEditorSyncAccess, findStatelyPragmaAttachments, fromStudioMachine, getCredentialToken, getInspectionRoomId, getStatelyPragma, graphToMachineConfig, graphToXStateTS, jsonSchemaToTSType, raw, refreshToken, registerOAuthClient, serializeJS, studioMachineConverter, toStudioMachine, upsertStatelyPragma };
36
+ export { type ActionLocation, type AdoptedActor, type AssetConfig, type AssetUploadAdapter, type AssetUploadContext, type AssetUploadRequest, type CapabilityDeniedCapability, type CapabilityDeniedEvent, type CodeGenGraph, type CommentsConfig, type ConnectedRepo, type CreateInspectionRelayOptions, type CreateInspectorOptions, type CreateMachineFromDefinitionInput, type CreateMachineFromTemplateInput, type CreateMachineInput, type CreateMachineTemplate, type CreateProjectInput, type CreateS3AssetUploadAdapterOptions, type CreateSupabaseAssetUploadAdapterOptions, DEFAULT_STATELY_BASE_URL, type DigraphAction, type DigraphConfig, type DigraphEdgeConfig, type DigraphNodeConfig, EDITOR_PROTOCOL_VERSION, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, type EditorCapabilities, type EditorHostExportFormat, type EditorHostInboundMessage, type EditorHostInitOptions, type EditorHostOutboundMessage, EditorHostSession, type EditorHostSessionOptions, type EditorHostValidationIssue, type EditorSourceHost, type EditorSyncBackend, type EmbedDocument, type EmbedDocumentLanguage, type EmbedEntity, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedFormatContext, type EmbedFormatDefinition, type EmbedGraph, type EmbedMode, type EmbedProfileDefinition, type EnsureProjectInput, type EventTypeData, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type ExtractMachinesInput, type ExtractMachinesResponse, type ExtractedMachine, type ExtractedMachines, type GetMachineOptions, type GraphPatch, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, type InitOptions, type InspectedEvent, type InspectedSnapshot, type InspectedTransition, type InspectionAction, type InspectionRelay, type InspectionRelayEffect, type InspectionRelayPeer, type InspectionRelayRole, type InspectionRelaySnapshot, type InspectionSentEvent, type InspectionTakenTransition, type Inspector, type InspectorEvents, type InspectorInspectionEvent, type LegacyProjectVisibility, type LegacyUpdateMachineInput, type Machine, type MachineConfigOptions, type MachineVersion, type ManualActorOptions, type OAuthAuthorizationServerMetadata, type OAuthClientRegistrationResponse, type OAuthProtectedResourceMetadata, type OAuthTokenResponse, type PkcePair, type PlanSyncOptions, type Project, type ProjectData, type ProjectEmbedMachine, type ProjectMachine, type ProjectMachineSummary, type ProjectSummary, type ProjectVisibility, type PullSyncResult, type PushLocalMachineLinksResult, type PushSyncOptions, type PushSyncProjectOptions, type PushSyncResult, RawCode, type RemoteEditorSyncBackendOptions, type RepoType, type ResolvedSyncInput, type ResourceErrorCode, type S3UploadTarget, type StateNodeJSONData, type StatelyAction, type StatelyApiClientOptions, StatelyApiError, type StatelyApiUrlOptions, type StatelyAuthMode, type StatelyCredential, type StatelyEdgeData, type StatelyEmbed, type StatelyEmbedOptions, type StatelyGraph, type StatelyGraphData, type StatelyGuard, type StatelyInvoke, type StatelyNodeData, type StatelyPragma, type StatelyPragmaAttachment, type StudioAction, StudioApiError, type StudioApiErrorOptions, type StudioClient, type StudioClientOptions, type StudioEdge, type StudioMachine, type StudioMachineRecord, type StudioNode, type StudioRequestOptions, type SupabaseStorageClient, type SyncInputFormat, type SyncPlan, type SyncPlanSummary, type Transport, type TransportFailure, type UpdateMachineInput, type UpdateProjectInput, type UploadResult, type UpsertStatelyPragmaOptions, type VerifyApiKeyResponse, type VerifyResult, type XStateTSOptions, type XStateVersion, buildAuthorizeUrl, contextSchemaToTSType, createAuthorizationHeader, createInspectionActorId, createInspectionRelay, createInspectionRoomUrls, createInspector, createPkcePair, createPostMessageTransport, createRemoteEditorSyncBackend, createS3AssetUploadAdapter, createStatelyApiClient, createStatelyApiUrl, createStatelyClient, createStatelyEmbed, createStatelyInspector, createSupabaseAssetUploadAdapter, createWebSocketTransport, discoverAuthorizationServer, discoverProtectedResource, eventsSchemaToTSType, exchangeCodeForToken, fetchEditorSyncAccess, findStatelyPragmaAttachments, fromStudioMachine, getCredentialToken, getInspectionRoomId, getStatelyPragma, graphToMachineConfig, graphToXStateTS, jsonSchemaToTSType, raw, refreshToken, registerOAuthClient, serializeJS, studioMachineConverter, toStudioMachine, upsertStatelyPragma };
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import { EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId } from "./protocol.mjs";
2
- import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-C-1n7MoR.mjs";
2
+ import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-CNeiHhaT.mjs";
3
3
  import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-D_h4y3rX.mjs";
4
4
  import { createStatelyEmbed } from "./embed.mjs";
5
5
  import { n as createRemoteEditorSyncBackend, r as fetchEditorSyncAccess, t as EditorHostSession } from "./editorHostSession-CCTwvUOB.mjs";
6
6
  import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-DHGspwII.mjs";
7
- import { a as RawCode, c as eventsSchemaToTSType, d as jsonSchemaToTSType, l as graphToMachineConfig, m as serializeJS, n as getStatelyPragma, o as contextSchemaToTSType, p as raw, r as upsertStatelyPragma, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-Cnj58Rua.mjs";
7
+ import { a as RawCode, c as eventsSchemaToTSType, d as jsonSchemaToTSType, l as graphToMachineConfig, m as serializeJS, n as getStatelyPragma, o as contextSchemaToTSType, p as raw, r as upsertStatelyPragma, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-mii-qTXd.mjs";
8
8
  import { createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
9
- import { n as createStatelyInspector, t as createInspector } from "./inspect-CwN52e61.mjs";
9
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-CnOHdMYX.mjs";
10
10
  import { createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
11
11
  import { buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
12
12
  import { StatelyApiError, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
@@ -1,5 +1,5 @@
1
1
  import { INSPECTION_PROTOCOL_VERSION, createInspectionRoomUrls, getInspectionRoomId } from "./protocol.mjs";
2
- import { a as createEventRegistry, i as createWebSocketTransport, n as inspectionRuntime, o as createPendingExportManager, t as SDK_VERSION } from "./version-C-1n7MoR.mjs";
2
+ import { a as createEventRegistry, i as createWebSocketTransport, n as inspectionRuntime, o as createPendingExportManager, t as SDK_VERSION } from "./version-CNeiHhaT.mjs";
3
3
 
4
4
  //#region src/openBrowser.ts
5
5
  async function openBrowser(url) {
package/dist/inspect.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import "./version-C-1n7MoR.mjs";
2
- import { n as createStatelyInspector, t as createInspector } from "./inspect-CwN52e61.mjs";
1
+ import "./version-CNeiHhaT.mjs";
2
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-CnOHdMYX.mjs";
3
3
 
4
4
  export { createInspector, createStatelyInspector };
@@ -1,2 +1,2 @@
1
- import { a as EditorStateType, n as CanvasColor, o as GraphPatch, s as ImplementationSourceType, t as ActionLocation } from "./index-BAkQThnl.mjs";
1
+ import { a as EditorStateType, n as CanvasColor, o as GraphPatch, s as ImplementationSourceType, t as ActionLocation } from "./index-BABex8NE.mjs";
2
2
  export { type ActionLocation, type CanvasColor, type EditorStateType, type GraphPatch, type ImplementationSourceType };
@@ -1,4 +1,5 @@
1
- import { i as StatelyGraph } from "./graph-yDK-MM3G.mjs";
1
+ import { l as ProfileManifest } from "./index-BABex8NE.mjs";
2
+ import { i as StatelyGraph } from "./graph-B4WM_nYg.mjs";
2
3
  import { c as EditorSyncSourceLocation, f as MachineSourceLocations$1, l as EditorSyncSourceRange, t as EditorCapabilities$1, u as EditorSyncStateSourceLocation } from "./editor-sync-types-C-zWaaVk.mjs";
3
4
 
4
5
  //#region src/protocol.d.ts
@@ -173,11 +174,30 @@ interface EmbedEventMap {
173
174
  }
174
175
  type EmbedEventName = keyof EmbedEventMap;
175
176
  type EmbedEventHandler<K extends EmbedEventName> = (data: EmbedEventMap[K]) => void;
177
+ interface EmbedFormatManifest {
178
+ id: string;
179
+ name: string;
180
+ file?: {
181
+ extension?: string;
182
+ mediaType?: string;
183
+ };
184
+ editorLanguage?: string;
185
+ detect?: boolean;
186
+ import?: boolean;
187
+ export?: boolean;
188
+ }
189
+ interface EmbedExtensionsManifest {
190
+ profiles: ProfileManifest[];
191
+ formats: EmbedFormatManifest[];
192
+ defaultProfile?: string;
193
+ defaultFormat?: string;
194
+ }
176
195
  interface MachineInitOptions {
177
196
  machine: unknown;
178
197
  /** Ephemeral, read-only reference documents owned by the embed host. */
179
198
  documents?: EmbedDocument[];
180
199
  format?: string;
200
+ extensions?: EmbedExtensionsManifest;
181
201
  mode?: EmbedMode;
182
202
  theme?: 'light' | 'dark';
183
203
  readOnly?: boolean;
@@ -237,6 +257,7 @@ interface InitMessage {
237
257
  machine: unknown;
238
258
  documents?: EmbedDocument[];
239
259
  format?: string;
260
+ extensions?: EmbedExtensionsManifest;
240
261
  mode?: EmbedMode;
241
262
  theme?: 'light' | 'dark';
242
263
  readOnly?: boolean;
@@ -539,10 +560,23 @@ interface UploadResponseMessage {
539
560
  requestId: string;
540
561
  result: UploadResult;
541
562
  }
563
+ interface ExtensionCallMessage {
564
+ type: '@statelyai.extension.call';
565
+ requestId: string;
566
+ extensionId: string;
567
+ method: 'detect' | 'import' | 'export' | 'validate';
568
+ payload: unknown;
569
+ }
570
+ interface ExtensionResultMessage {
571
+ type: '@statelyai.extension.result';
572
+ requestId: string;
573
+ result?: unknown;
574
+ error?: string;
575
+ }
542
576
  /** All messages a client (embed/inspector) can send to the viz. */
543
- type ClientMessage = InitMessage | SetApiKeyMessage | EditorHandshakeMessage | SavedMessage | ClipboardReadResponseMessage | ClipboardWriteResponseMessage | ProjectInitMessage | ProjectUpdateMessage | ProjectSelectMachineMessage | UpdateMessage | SetModeMessage | SetThemeMessage | SetSettingsMessage | RetrieveMessage | ToastMessage | InspectSnapshotMessage | SystemInitMessage | SystemSelectActorMessage | SystemActorRegisteredMessage | SystemActorEventMessage | SystemActorSnapshotMessage | SystemActorStoppedMessage | UploadCapabilitiesMessage | UploadResponseMessage | ErrorMessage;
577
+ type ClientMessage = InitMessage | SetApiKeyMessage | EditorHandshakeMessage | SavedMessage | ClipboardReadResponseMessage | ClipboardWriteResponseMessage | ProjectInitMessage | ProjectUpdateMessage | ProjectSelectMachineMessage | UpdateMessage | SetModeMessage | SetThemeMessage | SetSettingsMessage | RetrieveMessage | ToastMessage | InspectSnapshotMessage | SystemInitMessage | SystemSelectActorMessage | SystemActorRegisteredMessage | SystemActorEventMessage | SystemActorSnapshotMessage | SystemActorStoppedMessage | UploadCapabilitiesMessage | UploadResponseMessage | ExtensionResultMessage | ErrorMessage;
544
578
  /** All messages the viz can send back to a client. */
545
- type VizMessage = ReadyMessage | LoadedMessage | ChangeMessage | SaveMessage | ProjectMachineSelectedMessage | RetrievedMessage | ErrorMessage | CapabilityDeniedMessage | ClipboardReadMessage | ClipboardWriteMessage | UploadRequestMessage;
579
+ type VizMessage = ReadyMessage | LoadedMessage | ChangeMessage | SaveMessage | ProjectMachineSelectedMessage | RetrievedMessage | ErrorMessage | CapabilityDeniedMessage | ClipboardReadMessage | ClipboardWriteMessage | UploadRequestMessage | ExtensionCallMessage;
546
580
  interface InspectionClientMetadata {
547
581
  name?: string;
548
582
  machineId?: string;
@@ -571,4 +605,4 @@ declare const PREFIX = "@statelyai.";
571
605
  /** Current WebSocket inspection protocol version. */
572
606
  declare const INSPECTION_PROTOCOL_VERSION = 2;
573
607
  //#endregion
574
- export { ActorSystemEntry, CapabilityDeniedCapability, CapabilityDeniedEvent, CapabilityDeniedMessage, ChangeMessage, ClientMessage, ClipboardReadMessage, ClipboardReadResponseMessage, ClipboardWriteMessage, ClipboardWriteResponseMessage, CommentsConfig, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, EditorCapabilities, EditorHandshakeMessage, EmbedDocument, EmbedDocumentLanguage, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ErrorMessage, ExportCallOptions, ExportFormat, ExportFormatMap, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, InitMessage, InitOptions, InspectSnapshotMessage, InspectionAction, InspectionClientMetadata, InspectionRoomUrls, InspectionSentEvent, InspectionTakenTransition, LoadedMessage, MachineInitOptions, MachineSourceLocations, PREFIX, ProjectEmbedMachine, ProjectInitMessage, ProjectInitOptions, ProjectMachineSelectedMessage, ProjectSelectMachineMessage, ProjectUpdateMessage, ProtocolMessage, ReadOnlyReason, ReadyMessage, RegisterMessage, RegisteredMessage, RetrieveMessage, RetrievedMessage, SaveMessage, SavedMessage, SessionMessage, SetApiKeyMessage, SetModeMessage, SetSettingsMessage, SetThemeMessage, SourceLocation, SourceRange, StateSourceLocation, SystemActorEventMessage, SystemActorRegisteredMessage, SystemActorSnapshotMessage, SystemActorStoppedMessage, SystemInitMessage, SystemSelectActorMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VizMessage, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId };
608
+ export { ActorSystemEntry, CapabilityDeniedCapability, CapabilityDeniedEvent, CapabilityDeniedMessage, ChangeMessage, ClientMessage, ClipboardReadMessage, ClipboardReadResponseMessage, ClipboardWriteMessage, ClipboardWriteResponseMessage, CommentsConfig, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, EditorCapabilities, EditorHandshakeMessage, EmbedDocument, EmbedDocumentLanguage, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedExtensionsManifest, EmbedFormatManifest, EmbedMode, ErrorMessage, ExportCallOptions, ExportFormat, ExportFormatMap, ExtensionCallMessage, ExtensionResultMessage, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, InitMessage, InitOptions, InspectSnapshotMessage, InspectionAction, InspectionClientMetadata, InspectionRoomUrls, InspectionSentEvent, InspectionTakenTransition, LoadedMessage, MachineInitOptions, MachineSourceLocations, PREFIX, ProjectEmbedMachine, ProjectInitMessage, ProjectInitOptions, ProjectMachineSelectedMessage, ProjectSelectMachineMessage, ProjectUpdateMessage, ProtocolMessage, ReadOnlyReason, ReadyMessage, RegisterMessage, RegisteredMessage, RetrieveMessage, RetrievedMessage, SaveMessage, SavedMessage, SessionMessage, SetApiKeyMessage, SetModeMessage, SetSettingsMessage, SetThemeMessage, SourceLocation, SourceRange, StateSourceLocation, SystemActorEventMessage, SystemActorRegisteredMessage, SystemActorSnapshotMessage, SystemActorStoppedMessage, SystemInitMessage, SystemSelectActorMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VizMessage, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId };