@statelyai/sdk 0.31.2 → 0.32.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 +19 -6
- package/dist/assetStorage.d.mts +1 -1
- package/dist/{editorHostSession-UdKBWr0I.d.mts → editorHostSession-BqyuKldr.d.mts} +1 -1
- package/dist/editorHostSession.d.mts +1 -1
- package/dist/embed.d.mts +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{inspect-DVRwYKva.d.mts → inspect-C18TbR-o.d.mts} +14 -5
- package/dist/{inspect-Dcjy_T2E.mjs → inspect-GI2nE3J9.mjs} +136 -49
- package/dist/inspect.d.mts +2 -2
- package/dist/inspect.mjs +2 -2
- package/dist/{protocol-DC7XJtw_.d.mts → protocol-C-tx0WI6.d.mts} +2 -0
- package/dist/protocol.d.mts +1 -1
- package/dist/relay.d.mts +1 -1
- package/dist/{version-CsJTVKWN.mjs → version-1vqjW2Am.mjs} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -258,22 +258,35 @@ Error, or Stopped); “Awaiting snapshot” means no snapshot has arrived.
|
|
|
258
258
|
|
|
259
259
|
For persisted actors, `resolveSessionId` can keep one producer-local identity
|
|
260
260
|
across sequential restore/resume incarnations. Generate a new id for a new
|
|
261
|
-
logical invocation, persist it beside the actor snapshot, and reuse it
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
logical invocation, persist it beside the actor snapshot, and reuse it after
|
|
262
|
+
the previous incarnation has stopped. The same inspector may observe the
|
|
263
|
+
replacement runtime actor:
|
|
264
264
|
|
|
265
265
|
```ts
|
|
266
266
|
const inspector = createInspector({
|
|
267
267
|
roomId: persistedInspectionRoomId,
|
|
268
268
|
producerId: persistedInspectionProducerId,
|
|
269
|
-
resolveSessionId: (actor, defaultSessionId) =>
|
|
270
|
-
|
|
269
|
+
resolveSessionId: (actor, defaultSessionId, parentSessionId) =>
|
|
270
|
+
parentSessionId
|
|
271
|
+
? `${parentSessionId}/${actor.id}`
|
|
272
|
+
: persistedInspectionId,
|
|
271
273
|
});
|
|
272
274
|
```
|
|
273
275
|
|
|
274
276
|
A resume must reuse the same room id, producer id, and resolved session id. Keep
|
|
275
277
|
the room id private because it is the room's bearer capability. A new logical
|
|
276
|
-
invocation keeps the producer id but receives a new resolved session id.
|
|
278
|
+
invocation keeps the producer id but receives a new resolved session id. Active
|
|
279
|
+
owners reject collisions unless `sessionIdReuse: "always"` explicitly permits
|
|
280
|
+
replacement; late observations from a displaced actor are ignored.
|
|
281
|
+
|
|
282
|
+
The resolver's third argument is the parent's resolved id, so recreated child
|
|
283
|
+
actors can use stable paths instead of accumulating runtime session ids. IDs
|
|
284
|
+
must still be unique within one live actor tree.
|
|
285
|
+
|
|
286
|
+
To present a stopped request-scoped runtime as waiting for its next resume, map
|
|
287
|
+
its serialized status to a non-terminal value such as `suspended` in
|
|
288
|
+
`serializeSnapshot`. The raw terminal status still permits the next runtime
|
|
289
|
+
actor to rebind automatically.
|
|
277
290
|
|
|
278
291
|
Stopped actors remain in `inspector.actors` and in reconnect checkpoints, so
|
|
279
292
|
completed request-scoped runs stay available for inspection.
|
package/dist/assetStorage.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qt as EmbedPanelConfig, Y as ProjectEmbedMachine, ot as ProjectWorkspaceConfig } from "./protocol-
|
|
1
|
+
import { Qt as EmbedPanelConfig, Y as ProjectEmbedMachine, ot as ProjectWorkspaceConfig } from "./protocol-C-tx0WI6.mjs";
|
|
2
2
|
import { a as EditorSyncParseRequest, d as EditorSyncTextReplacement, f as MachineSourceLocations, i as EditorSyncApplyResponse, n as EditorSyncAccess, o as EditorSyncParseResponse, r as EditorSyncApplyRequest, s as EditorSyncSourceDocument, t as EditorCapabilities } from "./editor-sync-types-CPpzTSnT.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/editorHostProtocol.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, c as EditorSyncError, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-
|
|
1
|
+
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, c as EditorSyncError, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-BqyuKldr.mjs";
|
|
2
2
|
export { EDITOR_PROTOCOL_VERSION, EditorHostDiagnostic, EditorHostExportFormat, EditorHostInboundMessage, EditorHostInitOptions, EditorHostOutboundMessage, EditorHostSession, EditorHostSessionOptions, EditorHostValidationIssue, EditorHostWorkspaceMachine, EditorHostWorkspaceSession, EditorHostWorkspaceSessionOptions, EditorSourceHost, EditorSyncBackend, EditorSyncError, RemoteEditorSyncBackendOptions, createRemoteEditorSyncBackend, fetchEditorSyncAccess };
|
package/dist/embed.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as ProfileManifest } from "./index-DlOZxzrW.mjs";
|
|
2
2
|
import { i as StatelyGraph } from "./graph-CR_g-mOq.mjs";
|
|
3
|
-
import { $t as EmbedPanelPosition, D as ExportCallOptions, F as InitOptions, G as MachineVersionAutoSaveOptions, O as ExportFormat, Qt as EmbedPanelConfig, S as EmbedExtensionsManifest, U as MachineInitOptions, Vt as UploadResult, W as MachineSourceLocations, Y as ProjectEmbedMachine, Z as ProjectInitOptions, _ as EmbedDocumentLanguage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, g as EmbedDocument, k as ExportFormatMap, m as EditorCapabilities, nt as ProjectWorkspaceAction, ot as ProjectWorkspaceConfig, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, st as ProjectWorkspaceMachine, ut as ProjectWorkspaceProject, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-
|
|
3
|
+
import { $t as EmbedPanelPosition, D as ExportCallOptions, F as InitOptions, G as MachineVersionAutoSaveOptions, O as ExportFormat, Qt as EmbedPanelConfig, S as EmbedExtensionsManifest, U as MachineInitOptions, Vt as UploadResult, W as MachineSourceLocations, Y as ProjectEmbedMachine, Z as ProjectInitOptions, _ as EmbedDocumentLanguage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, g as EmbedDocument, k as ExportFormatMap, m as EditorCapabilities, nt as ProjectWorkspaceAction, ot as ProjectWorkspaceConfig, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, st as ProjectWorkspaceMachine, ut as ProjectWorkspaceProject, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-C-tx0WI6.mjs";
|
|
4
4
|
import { AssetUploadAdapter } from "./assetStorage.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/embed.d.ts
|
package/dist/embed.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createEventRegistry, o as createPendingExportManager, r as createPostMessageTransport, s as toInitMessage, t as SDK_VERSION } from "./version-
|
|
1
|
+
import { a as createEventRegistry, o as createPendingExportManager, r as createPostMessageTransport, s as toInitMessage, t as SDK_VERSION } from "./version-1vqjW2Am.mjs";
|
|
2
2
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/embed.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { StatelyApiClientOptions, StatelyApiError, StatelyApiUrlOptions, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
2
2
|
import { S as GraphPatch, _ as raw, a as RawCode, c as XStateV4TSOptions, d as getXStateFSMCompatibilityIssues, f as graphToMachineConfig, g as jsonSchemaToTSType, h as graphToXStateV4TS, l as contextSchemaToTSType, m as graphToXStateTS, n as CodeGenGraph, o as XStateFSMOptions, p as graphToXStateFSM, r as MachineConfigOptions, s as XStateTSOptions, u as eventsSchemaToTSType, v as serializeJS, y as ActionLocation } from "./index-DlOZxzrW.mjs";
|
|
3
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-CR_g-mOq.mjs";
|
|
4
|
-
import { $t as EmbedPanelPosition, B as InspectionSentEvent, D as ExportCallOptions, F as InitOptions, G as MachineVersionAutoSaveOptions, Jt as createInspectionRoomUrls, Kt as assertEmbedExamples, L as InspectionAction, M as INSPECTION_PROTOCOL_VERSION, N as INSPECTION_ROOM_QUERY_PARAM, O as ExportFormat, Qt as EmbedPanelConfig, V as InspectionTakenTransition, Vt as UploadResult, Xt as isEmbedExample, Y as ProjectEmbedMachine, Yt as getInspectionRoomId, Zt as isEmbedExampleMachine, _ as EmbedDocumentLanguage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, f as EMBED_DOCUMENT_LANGUAGES, g as EmbedDocument, k as ExportFormatMap, m as EditorCapabilities, n as CapabilityDeniedCapability, nt as ProjectWorkspaceAction, ot as ProjectWorkspaceConfig, p as EMBED_DOCUMENT_LIMITS, qt as createInspectionActorId, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, st as ProjectWorkspaceMachine, ut as ProjectWorkspaceProject, v as EmbedEventHandler, w as EmbedMode, x as EmbedExample, y as EmbedEventMap } from "./protocol-
|
|
4
|
+
import { $t as EmbedPanelPosition, B as InspectionSentEvent, D as ExportCallOptions, F as InitOptions, G as MachineVersionAutoSaveOptions, Jt as createInspectionRoomUrls, Kt as assertEmbedExamples, L as InspectionAction, M as INSPECTION_PROTOCOL_VERSION, N as INSPECTION_ROOM_QUERY_PARAM, O as ExportFormat, Qt as EmbedPanelConfig, V as InspectionTakenTransition, Vt as UploadResult, Xt as isEmbedExample, Y as ProjectEmbedMachine, Yt as getInspectionRoomId, Zt as isEmbedExampleMachine, _ as EmbedDocumentLanguage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, f as EMBED_DOCUMENT_LANGUAGES, g as EmbedDocument, k as ExportFormatMap, m as EditorCapabilities, n as CapabilityDeniedCapability, nt as ProjectWorkspaceAction, ot as ProjectWorkspaceConfig, p as EMBED_DOCUMENT_LIMITS, qt as createInspectionActorId, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, st as ProjectWorkspaceMachine, ut as ProjectWorkspaceProject, v as EmbedEventHandler, w as EmbedMode, x as EmbedExample, y as EmbedEventMap } from "./protocol-C-tx0WI6.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-Dg7prjeL.mjs";
|
|
7
|
-
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-
|
|
7
|
+
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-BqyuKldr.mjs";
|
|
8
8
|
import { AssetConfig, EmbedEntity, EmbedFormatContext, EmbedFormatDefinition, EmbedGraph, EmbedProfileDefinition, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
|
|
9
|
-
import { _ as createWebSocketTransport, a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, g as createPostMessageTransport, h as TransportFailure, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-
|
|
9
|
+
import { _ as createWebSocketTransport, a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, g as createPostMessageTransport, h as TransportFailure, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-C18TbR-o.mjs";
|
|
10
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-DV5IIGhV.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";
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./openapi-BTDjYWXd.mjs";
|
|
2
2
|
import { EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine } from "./protocol.mjs";
|
|
3
|
-
import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-
|
|
3
|
+
import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-1vqjW2Am.mjs";
|
|
4
4
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
5
5
|
import { createStatelyEmbed } from "./embed.mjs";
|
|
6
6
|
import { a as fetchEditorSyncAccess, i as createRemoteEditorSyncBackend, n as EditorHostWorkspaceSession, t as EditorHostSession } from "./editorHostSession-DfmHzpls.mjs";
|
|
7
7
|
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-rSI54Ese.mjs";
|
|
8
8
|
import { _ as graphToXStateV4TS, b as raw, f as getXStateFSMCompatibilityIssues, g as graphToXStateTS, h as graphToXStateFSM, l as eventsSchemaToTSType, m as graphToMachineConfig, n as RawCode, o as contextSchemaToTSType, v as jsonSchemaToTSType, x as serializeJS } from "./dist-wbhkeGh6.mjs";
|
|
9
9
|
import { createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
|
|
10
|
-
import { n as createStatelyInspector, t as createInspector } from "./inspect-
|
|
10
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-GI2nE3J9.mjs";
|
|
11
11
|
import { createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
|
|
12
12
|
import { buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
|
|
13
13
|
import { StatelyApiError, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as InspectionSentEvent, D as ExportCallOptions, L as InspectionAction, O as ExportFormat, Qt as EmbedPanelConfig, R as InspectionClientMetadata, V as InspectionTakenTransition, dt as ProtocolMessage, k as ExportFormatMap, m as EditorCapabilities, y as EmbedEventMap } from "./protocol-
|
|
1
|
+
import { B as InspectionSentEvent, D as ExportCallOptions, L as InspectionAction, O as ExportFormat, Qt as EmbedPanelConfig, R as InspectionClientMetadata, V as InspectionTakenTransition, dt as ProtocolMessage, k as ExportFormatMap, m as EditorCapabilities, y as EmbedEventMap } from "./protocol-C-tx0WI6.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/transport.d.ts
|
|
4
4
|
interface TransportFailure {
|
|
@@ -173,7 +173,9 @@ interface CreateInspectorOptions {
|
|
|
173
173
|
/**
|
|
174
174
|
* Serialize a snapshot for the wire. Defaults to `{value, status}` —
|
|
175
175
|
* dropping context entirely because xstate contexts routinely contain
|
|
176
|
-
* spawned actor refs which are not JSON-safe.
|
|
176
|
+
* spawned actor refs which are not JSON-safe. An explicit serialized status
|
|
177
|
+
* controls terminal presentation; for example, map a runtime `stopped`
|
|
178
|
+
* status to `suspended` when a logical actor is expected to resume.
|
|
177
179
|
*/
|
|
178
180
|
serializeSnapshot?: (snapshot: MinimalSnapshot) => unknown;
|
|
179
181
|
/**
|
|
@@ -191,10 +193,17 @@ interface CreateInspectorOptions {
|
|
|
191
193
|
/**
|
|
192
194
|
* Resolve the producer-local identity used for an actor on the inspection
|
|
193
195
|
* wire. Defaults to XState's runtime `actor.sessionId`. The resolver runs
|
|
194
|
-
* once per runtime actor and
|
|
195
|
-
*
|
|
196
|
+
* once per runtime actor and receives its parent's resolved id as the third
|
|
197
|
+
* argument. It must return a non-empty id. Reusing an id follows
|
|
198
|
+
* {@link CreateInspectorOptions.sessionIdReuse}.
|
|
196
199
|
*/
|
|
197
|
-
resolveSessionId?: (actor: any, defaultSessionId: string) => string;
|
|
200
|
+
resolveSessionId?: (actor: any, defaultSessionId: string, parentSessionId: string | null) => string;
|
|
201
|
+
/**
|
|
202
|
+
* Controls when a resolved session id may move to another runtime actor.
|
|
203
|
+
* Stopped actors are replaced by default. Use `always` for hosts that can
|
|
204
|
+
* guarantee the previous runtime actor will no longer produce relevant events.
|
|
205
|
+
*/
|
|
206
|
+
sessionIdReuse?: 'stopped' | 'always';
|
|
198
207
|
/** Selected actor session id to focus on first. */
|
|
199
208
|
selectedSessionId?: string;
|
|
200
209
|
/** @deprecated Use {@link selectedSessionId}. */
|
|
@@ -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-
|
|
2
|
+
import { a as createEventRegistry, i as createWebSocketTransport, n as inspectionRuntime, o as createPendingExportManager, t as SDK_VERSION } from "./version-1vqjW2Am.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/openBrowser.ts
|
|
5
5
|
async function openBrowser(url) {
|
|
@@ -78,7 +78,7 @@ function generateRoomId() {
|
|
|
78
78
|
function createInspector(options = {}) {
|
|
79
79
|
const environmentUrl = typeof process !== "undefined" ? process.env?.STATELY_INSPECT_URL : void 0;
|
|
80
80
|
const url = options.url ?? environmentUrl ?? "wss://sky.stately.ai";
|
|
81
|
-
const { inspectorBaseUrl, name, serializeSnapshot = defaultSerializeSnapshot, selectedSessionId: configuredSelectedSessionId, selectedActorId, panels, theme, readOnly, depth, capabilities, transport: injectedTransport } = options;
|
|
81
|
+
const { inspectorBaseUrl, name, serializeSnapshot = defaultSerializeSnapshot, selectedSessionId: configuredSelectedSessionId, selectedActorId, panels, theme, readOnly, depth, capabilities, sessionIdReuse = "stopped", transport: injectedTransport } = options;
|
|
82
82
|
const launch = options.launch ?? (options.autoOpen === true ? "browser" : "none");
|
|
83
83
|
const extractMachine = options.extractMachine ?? options.extractMachineConfig ?? defaultExtractMachineConfig;
|
|
84
84
|
const roomId = options.roomId ?? options.sessionId ?? getInspectionRoomId(url) ?? generateRoomId();
|
|
@@ -241,26 +241,60 @@ function createInspector(options = {}) {
|
|
|
241
241
|
const actors = /* @__PURE__ */ new Map();
|
|
242
242
|
const resolvedSessionIds = /* @__PURE__ */ new WeakMap();
|
|
243
243
|
const actorsByResolvedSessionId = /* @__PURE__ */ new Map();
|
|
244
|
+
const runtimeRoots = /* @__PURE__ */ new WeakMap();
|
|
245
|
+
const terminatedActors = /* @__PURE__ */ new WeakSet();
|
|
246
|
+
const reboundActors = /* @__PURE__ */ new WeakSet();
|
|
244
247
|
const manualSessionIds = /* @__PURE__ */ new Map();
|
|
245
248
|
/** Tracks which actors we've already emitted local actor events for. */
|
|
246
249
|
const locallyRegistered = /* @__PURE__ */ new Set();
|
|
247
250
|
/** v5 emits transition facets separately; accumulate them until snapshot. */
|
|
248
251
|
const pendingTransitions = /* @__PURE__ */ new Map();
|
|
249
|
-
function
|
|
252
|
+
function runtimeRootOf(actorRef, parentRef) {
|
|
253
|
+
const known = runtimeRoots.get(actorRef);
|
|
254
|
+
if (known) return known;
|
|
255
|
+
let rootRef = parentRef ?? actorRef;
|
|
256
|
+
while (rootRef._parent) rootRef = rootRef._parent;
|
|
257
|
+
runtimeRoots.set(actorRef, rootRef);
|
|
258
|
+
return rootRef;
|
|
259
|
+
}
|
|
260
|
+
function sessionIdOf(actorRef, parentRef = actorRef._parent, runtimeRoot) {
|
|
250
261
|
const existing = resolvedSessionIds.get(actorRef);
|
|
251
262
|
if (existing) return existing;
|
|
252
|
-
const
|
|
263
|
+
const parentSessionId = parentRef ? sessionIdOf(parentRef, parentRef._parent, runtimeRoot) : null;
|
|
264
|
+
const resolved = options.resolveSessionId?.(actorRef, actorRef.sessionId, parentSessionId) ?? actorRef.sessionId;
|
|
253
265
|
if (typeof resolved !== "string" || resolved.length === 0) throw new Error("createInspector(): resolveSessionId must return a non-empty string.");
|
|
266
|
+
assertSessionIdAvailable(actorRef, resolved, runtimeRoot ?? runtimeRootOf(actorRef, parentRef));
|
|
267
|
+
return claimSessionId(actorRef, resolved);
|
|
268
|
+
}
|
|
269
|
+
function assertSessionIdAvailable(actorRef, resolved, nextRoot) {
|
|
254
270
|
const claimedBy = actorsByResolvedSessionId.get(resolved);
|
|
255
|
-
|
|
271
|
+
const claimedEntry = actors.get(resolved);
|
|
272
|
+
if (claimedBy !== void 0 && claimedBy !== actorRef) {
|
|
273
|
+
if (runtimeRootOf(claimedBy) === nextRoot || !terminatedActors.has(claimedBy) && sessionIdReuse !== "always") throw new Error(`createInspector(): resolveSessionId returned duplicate id "${resolved}".`);
|
|
274
|
+
}
|
|
275
|
+
if (claimedBy === void 0 && claimedEntry) throw new Error(`createInspector(): resolveSessionId returned duplicate id "${resolved}".`);
|
|
276
|
+
}
|
|
277
|
+
function claimSessionId(actorRef, resolved) {
|
|
278
|
+
const claimedBy = actorsByResolvedSessionId.get(resolved);
|
|
279
|
+
if (claimedBy !== void 0 && claimedBy !== actorRef) {
|
|
280
|
+
actorsByResolvedSessionId.set(resolved, actorRef);
|
|
281
|
+
resolvedSessionIds.set(actorRef, resolved);
|
|
282
|
+
reboundActors.add(actorRef);
|
|
283
|
+
pendingTransitions.delete(resolved);
|
|
284
|
+
return resolved;
|
|
285
|
+
}
|
|
256
286
|
resolvedSessionIds.set(actorRef, resolved);
|
|
257
287
|
actorsByResolvedSessionId.set(resolved, actorRef);
|
|
258
288
|
return resolved;
|
|
259
289
|
}
|
|
290
|
+
function isCurrentOwner(actorRef) {
|
|
291
|
+
const sessionId = resolvedSessionIds.get(actorRef);
|
|
292
|
+
return sessionId === void 0 || actorsByResolvedSessionId.get(sessionId) === actorRef;
|
|
293
|
+
}
|
|
260
294
|
function rootSessionIdOf(runtimeRootId, actorRef) {
|
|
261
295
|
let rootRef = actorRef;
|
|
262
296
|
while (rootRef._parent) rootRef = rootRef._parent;
|
|
263
|
-
return rootRef.sessionId === runtimeRootId ? sessionIdOf(rootRef) : runtimeRootId;
|
|
297
|
+
return rootRef.sessionId === runtimeRootId ? sessionIdOf(rootRef, void 0, rootRef) : runtimeRootId;
|
|
264
298
|
}
|
|
265
299
|
function emitRegisterOnce(entry) {
|
|
266
300
|
if (locallyRegistered.has(entry.sessionId)) return;
|
|
@@ -268,23 +302,26 @@ function createInspector(options = {}) {
|
|
|
268
302
|
emitLocal("actor", entry);
|
|
269
303
|
emitLocal("register", entry);
|
|
270
304
|
}
|
|
271
|
-
function
|
|
305
|
+
function readSnapshot(actorRef) {
|
|
272
306
|
try {
|
|
273
|
-
return
|
|
307
|
+
return actorRef.getSnapshot();
|
|
274
308
|
} catch {
|
|
275
|
-
return
|
|
309
|
+
return;
|
|
276
310
|
}
|
|
277
311
|
}
|
|
278
|
-
function
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
312
|
+
function trackTermination(actorRef, snapshot) {
|
|
313
|
+
if (isStoppedSnapshot(snapshot)) terminatedActors.add(actorRef);
|
|
314
|
+
}
|
|
315
|
+
function serializedStoppedValue(serialized, snapshot) {
|
|
316
|
+
if (serialized !== null && typeof serialized === "object" && Object.hasOwn(serialized, "status")) return isStoppedSnapshot(serialized);
|
|
317
|
+
return isStoppedSnapshot(snapshot);
|
|
284
318
|
}
|
|
285
319
|
function toEntry(actorRef, rootActorId, details) {
|
|
286
|
-
const sessionId = sessionIdOf(actorRef);
|
|
287
320
|
const parentRef = details?.parentRef ?? actorRef._parent;
|
|
321
|
+
const sessionId = sessionIdOf(actorRef, parentRef);
|
|
322
|
+
const snapshot = details?.snapshot ?? readSnapshot(actorRef);
|
|
323
|
+
const serialized = snapshot === void 0 ? null : serializeSnapshot(snapshot);
|
|
324
|
+
if (snapshot !== void 0) trackTermination(actorRef, snapshot);
|
|
288
325
|
return {
|
|
289
326
|
sessionId,
|
|
290
327
|
actorId: details?.id ?? actorRef.id ?? sessionId,
|
|
@@ -292,8 +329,8 @@ function createInspector(options = {}) {
|
|
|
292
329
|
parentSessionId: parentRef ? sessionIdOf(parentRef) : null,
|
|
293
330
|
rootSessionId: rootActorId,
|
|
294
331
|
systemId: actorRef.systemId,
|
|
295
|
-
snapshot:
|
|
296
|
-
stopped:
|
|
332
|
+
snapshot: serialized,
|
|
333
|
+
stopped: snapshot === void 0 ? false : serializedStoppedValue(serialized, snapshot),
|
|
297
334
|
machineConfig: extractMachine(actorRef, details?.source ?? actorRef.src)
|
|
298
335
|
};
|
|
299
336
|
}
|
|
@@ -308,26 +345,73 @@ function createInspector(options = {}) {
|
|
|
308
345
|
...entry.stopped && { stopped: true }
|
|
309
346
|
};
|
|
310
347
|
}
|
|
311
|
-
function resolveActorTreeSessionIds(
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
|
|
348
|
+
function resolveActorTreeSessionIds(rootRef) {
|
|
349
|
+
const pending = /* @__PURE__ */ new Map();
|
|
350
|
+
const owners = /* @__PURE__ */ new Map();
|
|
351
|
+
function visit(actorRef, parentRef) {
|
|
352
|
+
const existing = resolvedSessionIds.get(actorRef);
|
|
353
|
+
const parentSessionId = parentRef ? resolvedSessionIds.get(parentRef) ?? pending.get(parentRef)?.resolved : null;
|
|
354
|
+
const resolved = existing ?? options.resolveSessionId?.(actorRef, actorRef.sessionId, parentSessionId ?? null) ?? actorRef.sessionId;
|
|
355
|
+
if (typeof resolved !== "string" || resolved.length === 0) throw new Error("createInspector(): resolveSessionId must return a non-empty string.");
|
|
356
|
+
const localOwner = owners.get(resolved);
|
|
357
|
+
if (localOwner && localOwner !== actorRef) throw new Error(`createInspector(): resolveSessionId returned duplicate id "${resolved}".`);
|
|
358
|
+
owners.set(resolved, actorRef);
|
|
359
|
+
if (!existing) pending.set(actorRef, {
|
|
360
|
+
resolved,
|
|
361
|
+
parentRef
|
|
362
|
+
});
|
|
363
|
+
assertSessionIdAvailable(actorRef, resolved, rootRef);
|
|
364
|
+
const children = actorRef.getSnapshot()?.children ?? {};
|
|
365
|
+
for (const child of Object.values(children)) if (child) visit(child, actorRef);
|
|
366
|
+
}
|
|
367
|
+
visit(rootRef);
|
|
368
|
+
for (const [actorRef, { resolved }] of pending) {
|
|
369
|
+
runtimeRoots.set(actorRef, rootRef);
|
|
370
|
+
claimSessionId(actorRef, resolved);
|
|
371
|
+
}
|
|
315
372
|
}
|
|
316
373
|
/**
|
|
317
374
|
* Walk the actor tree and populate the local `actors` map. Idempotent —
|
|
318
375
|
* existing entries stay in place but have their snapshot refreshed.
|
|
319
376
|
*/
|
|
320
|
-
function
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
377
|
+
function publishActorRegistered(entry, replaces = false) {
|
|
378
|
+
if (!initSent) return;
|
|
379
|
+
send({
|
|
380
|
+
type: "@statelyai.system.actorRegistered",
|
|
381
|
+
sessionId: entry.sessionId,
|
|
382
|
+
actorId: entry.actorId,
|
|
383
|
+
...replaces && { replaces: true },
|
|
384
|
+
...entry.displayName && { displayName: entry.displayName },
|
|
385
|
+
parentSessionId: entry.parentSessionId,
|
|
386
|
+
machine: entry.machineConfig,
|
|
387
|
+
snapshot: entry.snapshot ?? void 0
|
|
388
|
+
});
|
|
389
|
+
if ((configuredSelectedSessionId ?? selectedActorId) === entry.sessionId) send({
|
|
390
|
+
type: "@statelyai.system.selectActor",
|
|
391
|
+
sessionId: entry.sessionId
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
function backfillActorTree(actorRef, rootActorId, publish = false) {
|
|
395
|
+
const sessionId = sessionIdOf(actorRef);
|
|
396
|
+
const existing = actors.get(sessionId);
|
|
397
|
+
const replaces = reboundActors.delete(actorRef);
|
|
398
|
+
const entry = !existing || replaces ? toEntry(actorRef, rootActorId) : existing;
|
|
399
|
+
if (existing && !replaces) {
|
|
324
400
|
const snapshot = actorRef.getSnapshot();
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
401
|
+
const serialized = serializeSnapshot(snapshot);
|
|
402
|
+
trackTermination(actorRef, snapshot);
|
|
403
|
+
existing.snapshot = serialized;
|
|
404
|
+
existing.stopped ||= serializedStoppedValue(serialized, snapshot);
|
|
405
|
+
} else {
|
|
406
|
+
actors.set(entry.sessionId, entry);
|
|
407
|
+
if (replaces) {
|
|
408
|
+
emitLocal("actor", entry);
|
|
409
|
+
emitLocal("register", entry);
|
|
410
|
+
} else emitRegisterOnce(entry);
|
|
411
|
+
if (publish) publishActorRegistered(entry, replaces);
|
|
412
|
+
}
|
|
329
413
|
const children = actorRef.getSnapshot()?.children ?? {};
|
|
330
|
-
for (const child of Object.values(children)) if (child) backfillActorTree(child, rootActorId);
|
|
414
|
+
for (const child of Object.values(children)) if (child) backfillActorTree(child, rootActorId, publish);
|
|
331
415
|
}
|
|
332
416
|
const inspectedRoots = /* @__PURE__ */ new Map();
|
|
333
417
|
const observedRootIds = /* @__PURE__ */ new Set();
|
|
@@ -356,19 +440,16 @@ function createInspector(options = {}) {
|
|
|
356
440
|
initSent = true;
|
|
357
441
|
}
|
|
358
442
|
function handleActor(actorRef, rootActorId, details) {
|
|
359
|
-
|
|
443
|
+
const sessionId = sessionIdOf(actorRef, details?.parentRef);
|
|
444
|
+
const replaces = reboundActors.delete(actorRef);
|
|
445
|
+
if (actors.has(sessionId) && !replaces) return;
|
|
360
446
|
const entry = toEntry(actorRef, rootActorId, details);
|
|
361
447
|
actors.set(entry.sessionId, entry);
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
...entry.displayName && { displayName: entry.displayName },
|
|
368
|
-
parentSessionId: entry.parentSessionId,
|
|
369
|
-
machine: entry.machineConfig,
|
|
370
|
-
snapshot: entry.snapshot ?? void 0
|
|
371
|
-
});
|
|
448
|
+
if (replaces) {
|
|
449
|
+
emitLocal("actor", entry);
|
|
450
|
+
emitLocal("register", entry);
|
|
451
|
+
} else emitRegisterOnce(entry);
|
|
452
|
+
publishActorRegistered(entry, replaces);
|
|
372
453
|
}
|
|
373
454
|
function normalizeAction(action) {
|
|
374
455
|
return {
|
|
@@ -436,6 +517,7 @@ function createInspector(options = {}) {
|
|
|
436
517
|
const entry = actors.get(sessionId);
|
|
437
518
|
if (!entry) return;
|
|
438
519
|
const serialized = serializeSnapshot(snapshot);
|
|
520
|
+
trackTermination(actorRef, snapshot);
|
|
439
521
|
const inspectedSnapshot = {
|
|
440
522
|
sessionId: entry.sessionId,
|
|
441
523
|
sourceSessionId: transition.sourceSessionId,
|
|
@@ -448,7 +530,7 @@ function createInspector(options = {}) {
|
|
|
448
530
|
};
|
|
449
531
|
const wasStopped = entry.stopped;
|
|
450
532
|
entry.snapshot = serialized;
|
|
451
|
-
const stopped =
|
|
533
|
+
const stopped = serializedStoppedValue(serialized, snapshot);
|
|
452
534
|
entry.stopped ||= stopped;
|
|
453
535
|
pendingTransitions.delete(entry.sessionId);
|
|
454
536
|
if (initSent) send({
|
|
@@ -480,6 +562,7 @@ function createInspector(options = {}) {
|
|
|
480
562
|
materializePendingInit();
|
|
481
563
|
const event = inspectionEvent;
|
|
482
564
|
const rootActorId = rootSessionIdOf(event.rootId, event.actorRef);
|
|
565
|
+
if (!isCurrentOwner(event.actorRef)) return;
|
|
483
566
|
const isNewRoot = !observedRootIds.has(rootActorId);
|
|
484
567
|
observedRootIds.add(rootActorId);
|
|
485
568
|
switch (event.type) {
|
|
@@ -522,26 +605,30 @@ function createInspector(options = {}) {
|
|
|
522
605
|
break;
|
|
523
606
|
default: break;
|
|
524
607
|
}
|
|
525
|
-
if (isNewRoot) sendInit();
|
|
608
|
+
if (isNewRoot && !initSent) sendInit();
|
|
526
609
|
}
|
|
527
610
|
function attachActor(actor) {
|
|
528
611
|
const root = actor;
|
|
612
|
+
resolveActorTreeSessionIds(root);
|
|
529
613
|
const rootActorId = sessionIdOf(root);
|
|
530
614
|
const existing = inspectedRoots.get(rootActorId);
|
|
531
|
-
if (existing) return existing.subscription;
|
|
615
|
+
if (existing?.actor === root) return existing.subscription;
|
|
616
|
+
if (existing) {
|
|
617
|
+
existing.subscription.unsubscribe();
|
|
618
|
+
inspectedRoots.delete(rootActorId);
|
|
619
|
+
}
|
|
532
620
|
materializePendingInit();
|
|
533
|
-
resolveActorTreeSessionIds(root);
|
|
534
621
|
observedRootIds.add(rootActorId);
|
|
535
622
|
const subscription = root.system.inspect(handleInspectionEvent);
|
|
536
623
|
inspectedRoots.set(rootActorId, {
|
|
537
624
|
actor: root,
|
|
538
625
|
subscription
|
|
539
626
|
});
|
|
540
|
-
backfillActorTree(root, rootActorId);
|
|
541
|
-
sendInit();
|
|
627
|
+
backfillActorTree(root, rootActorId, true);
|
|
628
|
+
if (!initSent) sendInit();
|
|
542
629
|
return { unsubscribe() {
|
|
543
630
|
subscription.unsubscribe();
|
|
544
|
-
inspectedRoots.delete(rootActorId);
|
|
631
|
+
if (inspectedRoots.get(rootActorId)?.subscription === subscription) inspectedRoots.delete(rootActorId);
|
|
545
632
|
} };
|
|
546
633
|
}
|
|
547
634
|
function getManualSessionId(actorId) {
|
package/dist/inspect.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as InspectionSentEvent, D as ExportCallOptions, L as InspectionAction, O as ExportFormat, V as InspectionTakenTransition, b as EmbedEventName, k as ExportFormatMap, m as EditorCapabilities, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-
|
|
2
|
-
import { a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-
|
|
1
|
+
import { B as InspectionSentEvent, D as ExportCallOptions, L as InspectionAction, O as ExportFormat, V as InspectionTakenTransition, b as EmbedEventName, k as ExportFormatMap, m as EditorCapabilities, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-C-tx0WI6.mjs";
|
|
2
|
+
import { a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-C18TbR-o.mjs";
|
|
3
3
|
export { AdoptedActor, CreateInspectorOptions, EditorCapabilities, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, InspectedEvent, InspectedSnapshot, InspectedTransition, InspectionAction, InspectionSentEvent, InspectionTakenTransition, Inspector, InspectorConnection, InspectorDiscoveryEntry, InspectorEvents, InspectorInspectionEvent, ManualActorOptions, Transport, createInspector, createStatelyInspector };
|
package/dist/inspect.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./version-
|
|
2
|
-
import { n as createStatelyInspector, t as createInspector } from "./inspect-
|
|
1
|
+
import "./version-1vqjW2Am.mjs";
|
|
2
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-GI2nE3J9.mjs";
|
|
3
3
|
|
|
4
4
|
export { createInspector, createStatelyInspector };
|
|
@@ -627,6 +627,8 @@ interface SystemActorRegisteredMessage {
|
|
|
627
627
|
type: '@statelyai.system.actorRegistered';
|
|
628
628
|
sessionId: string;
|
|
629
629
|
actorId: string;
|
|
630
|
+
/** This runtime actor replaces the previous owner of `sessionId`. */
|
|
631
|
+
replaces?: boolean;
|
|
630
632
|
/** Optional readable label; never replaces the runtime actor ID. */
|
|
631
633
|
displayName?: string;
|
|
632
634
|
parentSessionId: string | null;
|
package/dist/protocol.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ProjectSelectMachineMessage, $t as EmbedPanelPosition, A as ExtensionCallMessage, At as SystemActorSnapshotMessage, B as InspectionSentEvent, Bt as UploadResponseMessage, C as EmbedFormatManifest, Ct as SetSettingsMessage, D as ExportCallOptions, Dt as StateSourceLocation, E as ErrorMessage, Et as SourceRange, F as InitOptions, Ft as ToastMessage, G as MachineVersionAutoSaveOptions, Gt as VizMessage, H as LoadedMessage, Ht as ValidationIssue, I as InspectSnapshotMessage, It as UpdateMessage, J as PanelChangedMessage, Jt as createInspectionRoomUrls, K as ModeChangedMessage, Kt as assertEmbedExamples, L as InspectionAction, Lt as UploadCapabilitiesMessage, M as INSPECTION_PROTOCOL_VERSION, Mt as SystemInitMessage, N as INSPECTION_ROOM_QUERY_PARAM, Nt as SystemSelectActorMessage, O as ExportFormat, Ot as SystemActorEventMessage, P as InitMessage, Pt as ToastDismissMessage, Q as ProjectMachineSelectedMessage, Qt as EmbedPanelConfig, R as InspectionClientMetadata, Rt as UploadFileInfo, S as EmbedExtensionsManifest, St as SetModeMessage, T as ErrorCode, Tt as SourceLocation, U as MachineInitOptions, Ut as VersionSaveRequestedMessage, V as InspectionTakenTransition, Vt as UploadResult, W as MachineSourceLocations, Wt as ViewModeChangedMessage, X as ProjectInitMessage, Xt as isEmbedExample, Y as ProjectEmbedMachine, Yt as getInspectionRoomId, Z as ProjectInitOptions, Zt as isEmbedExampleMachine, _ as EmbedDocumentLanguage, _t as RetrievedMessage, a as ChangeMessage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, bt as SessionMessage, c as ClipboardReadResponseMessage, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, dt as ProtocolMessage, et as ProjectSetWorkspaceOpenMessage, f as EMBED_DOCUMENT_LANGUAGES, ft as ReadOnlyReason, g as EmbedDocument, gt as RetrieveMessage, h as EditorHandshakeMessage, ht as RegisteredMessage, i as CapabilityDeniedMessage, it as ProjectWorkspaceActionMessage, j as ExtensionResultMessage, jt as SystemActorStoppedMessage, k as ExportFormatMap, kt as SystemActorRegisteredMessage, l as ClipboardWriteMessage, lt as ProjectWorkspaceOpenChangedMessage, m as EditorCapabilities, mt as RegisterMessage, n as CapabilityDeniedCapability, nt as ProjectWorkspaceAction, o as ClientMessage, ot as ProjectWorkspaceConfig, p as EMBED_DOCUMENT_LIMITS, pt as ReadyMessage, q as PREFIX, qt as createInspectionActorId, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, s as ClipboardReadMessage, st as ProjectWorkspaceMachine, t as ActorSystemEntry, tt as ProjectUpdateMessage, u as ClipboardWriteResponseMessage, ut as ProjectWorkspaceProject, v as EmbedEventHandler, vt as SaveMessage, w as EmbedMode, wt as SetThemeMessage, x as EmbedExample, xt as SetApiKeyMessage, y as EmbedEventMap, yt as SavedMessage, z as InspectionRoomUrls, zt as UploadRequestMessage } from "./protocol-
|
|
1
|
+
import { $ as ProjectSelectMachineMessage, $t as EmbedPanelPosition, A as ExtensionCallMessage, At as SystemActorSnapshotMessage, B as InspectionSentEvent, Bt as UploadResponseMessage, C as EmbedFormatManifest, Ct as SetSettingsMessage, D as ExportCallOptions, Dt as StateSourceLocation, E as ErrorMessage, Et as SourceRange, F as InitOptions, Ft as ToastMessage, G as MachineVersionAutoSaveOptions, Gt as VizMessage, H as LoadedMessage, Ht as ValidationIssue, I as InspectSnapshotMessage, It as UpdateMessage, J as PanelChangedMessage, Jt as createInspectionRoomUrls, K as ModeChangedMessage, Kt as assertEmbedExamples, L as InspectionAction, Lt as UploadCapabilitiesMessage, M as INSPECTION_PROTOCOL_VERSION, Mt as SystemInitMessage, N as INSPECTION_ROOM_QUERY_PARAM, Nt as SystemSelectActorMessage, O as ExportFormat, Ot as SystemActorEventMessage, P as InitMessage, Pt as ToastDismissMessage, Q as ProjectMachineSelectedMessage, Qt as EmbedPanelConfig, R as InspectionClientMetadata, Rt as UploadFileInfo, S as EmbedExtensionsManifest, St as SetModeMessage, T as ErrorCode, Tt as SourceLocation, U as MachineInitOptions, Ut as VersionSaveRequestedMessage, V as InspectionTakenTransition, Vt as UploadResult, W as MachineSourceLocations, Wt as ViewModeChangedMessage, X as ProjectInitMessage, Xt as isEmbedExample, Y as ProjectEmbedMachine, Yt as getInspectionRoomId, Z as ProjectInitOptions, Zt as isEmbedExampleMachine, _ as EmbedDocumentLanguage, _t as RetrievedMessage, a as ChangeMessage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, bt as SessionMessage, c as ClipboardReadResponseMessage, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, dt as ProtocolMessage, et as ProjectSetWorkspaceOpenMessage, f as EMBED_DOCUMENT_LANGUAGES, ft as ReadOnlyReason, g as EmbedDocument, gt as RetrieveMessage, h as EditorHandshakeMessage, ht as RegisteredMessage, i as CapabilityDeniedMessage, it as ProjectWorkspaceActionMessage, j as ExtensionResultMessage, jt as SystemActorStoppedMessage, k as ExportFormatMap, kt as SystemActorRegisteredMessage, l as ClipboardWriteMessage, lt as ProjectWorkspaceOpenChangedMessage, m as EditorCapabilities, mt as RegisterMessage, n as CapabilityDeniedCapability, nt as ProjectWorkspaceAction, o as ClientMessage, ot as ProjectWorkspaceConfig, p as EMBED_DOCUMENT_LIMITS, pt as ReadyMessage, q as PREFIX, qt as createInspectionActorId, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, s as ClipboardReadMessage, st as ProjectWorkspaceMachine, t as ActorSystemEntry, tt as ProjectUpdateMessage, u as ClipboardWriteResponseMessage, ut as ProjectWorkspaceProject, v as EmbedEventHandler, vt as SaveMessage, w as EmbedMode, wt as SetThemeMessage, x as EmbedExample, xt as SetApiKeyMessage, y as EmbedEventMap, yt as SavedMessage, z as InspectionRoomUrls, zt as UploadRequestMessage } from "./protocol-C-tx0WI6.mjs";
|
|
2
2
|
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, EmbedExample, EmbedExtensionsManifest, EmbedFormatManifest, EmbedMode, EmbedPanelConfig, EmbedPanelPosition, ErrorCode, ErrorMessage, ExportCallOptions, ExportFormat, ExportFormatMap, ExtensionCallMessage, ExtensionResultMessage, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, InitMessage, InitOptions, InspectSnapshotMessage, InspectionAction, InspectionClientMetadata, InspectionRoomUrls, InspectionSentEvent, InspectionTakenTransition, LoadedMessage, MachineInitOptions, MachineSourceLocations, MachineVersionAutoSaveOptions, ModeChangedMessage, PREFIX, PanelChangedMessage, ProjectEmbedMachine, ProjectInitMessage, ProjectInitOptions, ProjectMachineSelectedMessage, ProjectSelectMachineMessage, ProjectSetWorkspaceOpenMessage, ProjectUpdateMessage, ProjectWorkspaceAction, ProjectWorkspaceActionIcon, ProjectWorkspaceActionMessage, ProjectWorkspaceCapabilities, ProjectWorkspaceConfig, ProjectWorkspaceMachine, ProjectWorkspaceMachineOrigin, ProjectWorkspaceOpenChangedMessage, ProjectWorkspaceProject, ProtocolMessage, ReadOnlyReason, ReadyMessage, RegisterMessage, RegisteredMessage, RetrieveMessage, RetrievedMessage, SaveMessage, SavedMessage, SessionMessage, SetApiKeyMessage, SetModeMessage, SetSettingsMessage, SetThemeMessage, SourceLocation, SourceRange, StateSourceLocation, SystemActorEventMessage, SystemActorRegisteredMessage, SystemActorSnapshotMessage, SystemActorStoppedMessage, SystemInitMessage, SystemSelectActorMessage, ToastDismissMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VersionSaveRequestedMessage, ViewModeChangedMessage, VizMessage, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine };
|
package/dist/relay.d.mts
CHANGED
|
@@ -366,7 +366,7 @@ function createWebSocketTransport(options) {
|
|
|
366
366
|
|
|
367
367
|
//#endregion
|
|
368
368
|
//#region src/version.ts
|
|
369
|
-
const SDK_VERSION = "0.
|
|
369
|
+
const SDK_VERSION = "0.32.0";
|
|
370
370
|
function inspectionRuntime() {
|
|
371
371
|
if (typeof window !== "undefined") return "browser";
|
|
372
372
|
if (typeof process !== "undefined" && process.versions?.node) return "node";
|