@statelyai/sdk 0.34.1 → 0.35.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 +32 -26
- package/dist/assetStorage.d.mts +1 -1
- package/dist/auth.d.mts +14 -1
- package/dist/bin.mjs +1 -3
- package/dist/editor-sync-types-DNFk7Xtj.d.mts +53 -0
- package/dist/editorHostProtocol.d.mts +197 -0
- package/dist/{editorHostProtocol-B2_t3Le7.mjs → editorHostProtocol.mjs} +1 -1
- package/dist/embed.d.mts +3 -3
- package/dist/embed.mjs +2 -2
- package/dist/{graph-Ciocekxl.d.mts → graph-B6xUxqR5.d.mts} +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{index-DZivqh0u.d.mts → index-CoxF4Saw.d.mts} +36 -252
- package/dist/index.d.mts +8 -31
- package/dist/index.mjs +5 -9
- package/dist/{inspect-BbvfH0Q1.d.mts → inspect-DCdu0ST3.d.mts} +1 -1
- package/dist/{inspect-DW30GMge.mjs → inspect-GSXRhzOx.mjs} +48 -32
- package/dist/inspect.d.mts +2 -2
- package/dist/inspect.mjs +2 -2
- package/dist/patchTypes.d.mts +1 -1
- package/dist/{protocol-B7q2lWj_.d.mts → protocol-nOWsz3UV.d.mts} +3 -3
- package/dist/protocol.d.mts +1 -1
- package/dist/relay.d.mts +1 -1
- package/dist/relay.mjs +40 -1
- package/dist/{studio-CKdEPGKY.d.mts → studio-3ujfe2z0.d.mts} +2 -2
- package/dist/{openapi-BTDjYWXd.mjs → studio-Bn3alVku.mjs} +637 -1
- package/dist/studio.d.mts +1 -1
- package/dist/studio.mjs +2 -2
- package/dist/{version-BEfUEyPL.mjs → version-DECst76A.mjs} +1 -1
- package/package.json +21 -17
- package/dist/auth-CVFc85uF.d.mts +0 -15
- package/dist/dist-NJFkDQjK.mjs +0 -8134
- package/dist/editor-sync-types-D7YYz6fb.d.mts +0 -98
- package/dist/editorHostSession-Bj5YcijC.mjs +0 -912
- package/dist/editorHostSession-DBLSyHJs.d.mts +0 -325
- package/dist/editorHostSession.d.mts +0 -2
- package/dist/editorHostSession.mjs +0 -6
- package/dist/statelyPragma-YtVaBuIe.mjs +0 -102
- package/dist/studio-BZP6DaIO.mjs +0 -638
- package/dist/sync.d.mts +0 -86
- package/dist/sync.mjs +0 -4646
package/dist/patchTypes.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as EditorStateType, i as CanvasColor, o as GraphPatch, r as ActionLocation, s as ImplementationSourceType } from "./index-CoxF4Saw.mjs";
|
|
2
2
|
export { type ActionLocation, type CanvasColor, type EditorStateType, type GraphPatch, type ImplementationSourceType };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as StatelyGraph } from "./graph-
|
|
3
|
-
import {
|
|
1
|
+
import { n as ProfileManifest } from "./index-CoxF4Saw.mjs";
|
|
2
|
+
import { i as StatelyGraph } from "./graph-B6xUxqR5.mjs";
|
|
3
|
+
import { a as MachineSourceLocations$1, i as EditorSyncStateSourceLocation, n as EditorSyncSourceLocation, r as EditorSyncSourceRange, t as EditorCapabilities$1 } from "./editor-sync-types-DNFk7Xtj.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/embedPanel.d.ts
|
|
6
6
|
type EmbedPanelPosition = 'left' | 'right' | 'bottom';
|
package/dist/protocol.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ProjectInitMessage, $t as createInspectionRoomUrls, A as ExtensionCallMessage, At as StateSourceLocation, B as InspectionSentEvent, Bt as UpdateMessage, C as EmbedFormatManifest, Ct as SessionMessage, D as ExportCallOptions, Dt as SetThemeMessage, E as ErrorMessage, Et as SetSettingsMessage, F as InitOptions, Ft as SystemInitMessage, G as MachineInitOptions, Gt as UploadResult, H as InspectorLoadedEvent, Ht as UploadFileInfo, I as InspectSnapshotMessage, It as SystemLoadedMessage, J as MachineVersionAutoSaveOptions, Jt as ViewModeChangedMessage, K as MachinePayload, Kt as ValidationIssue, L as InspectionAction, Lt as SystemSelectActorMessage, M as INSPECTION_PROTOCOL_VERSION, Mt as SystemActorRegisteredMessage, N as INSPECTION_ROOM_QUERY_PARAM, Nt as SystemActorSnapshotMessage, O as ExportFormat, Ot as SourceLocation, P as InitMessage, Pt as SystemActorStoppedMessage, Q as ProjectEmbedMachine, Qt as createInspectionActorId, R as InspectionClientMetadata, Rt as ToastDismissMessage, S as EmbedExtensionsManifest, St as SavedMessage, T as ErrorCode, Tt as SetModeMessage, U as InspectorSettings, Ut as UploadRequestMessage, V as InspectionTakenTransition, Vt as UploadCapabilitiesMessage, W as LoadedMessage, Wt as UploadResponseMessage, X as PREFIX, Xt as VizMessage, Y as ModeChangedMessage, Yt as ViewerOptions, Z as PanelChangedMessage, Zt as assertEmbedExamples, _ as EmbedDocumentLanguage, _t as RegisterMessage, a as ChangeMessage, an as EmbedPanelConfig, at as ProjectWorkspaceAction, b as EmbedEventName, bt as RetrievedMessage, c as ClipboardReadResponseMessage, ct as ProjectWorkspaceCapabilities, d as CommentsConfig, dt as ProjectWorkspaceMachineOrigin, en as getInspectionRoomId, et as ProjectInitOptions, f as EMBED_DOCUMENT_LANGUAGES, ft as ProjectWorkspaceOpenChangedMessage, g as EmbedDocument, gt as ReadyMessage, h as EditorHandshakeMessage, ht as ReadOnlyReason, i as CapabilityDeniedMessage, in as resolveInspectorSettings, it as ProjectUpdateMessage, j as ExtensionResultMessage, jt as SystemActorEventMessage, k as ExportFormatMap, kt as SourceRange, l as ClipboardWriteMessage, lt as ProjectWorkspaceConfig, m as EditorCapabilities, mt as ProtocolMessage, n as CapabilityDeniedCapability, nn as isEmbedExampleMachine, nt as ProjectSelectMachineMessage, o as ClientMessage, on as EmbedPanelPosition, ot as ProjectWorkspaceActionIcon, p as EMBED_DOCUMENT_LIMITS, pt as ProjectWorkspaceProject, q as MachineSourceLocations, qt as VersionSaveRequestedMessage, r as CapabilityDeniedEvent, rn as mergeInspectorSettings, rt as ProjectSetWorkspaceOpenMessage, s as ClipboardReadMessage, st as ProjectWorkspaceActionMessage, t as ActorSystemEntry, tn as isEmbedExample, tt as ProjectMachineSelectedMessage, u as ClipboardWriteResponseMessage, ut as ProjectWorkspaceMachine, v as EmbedEventHandler, vt as RegisteredMessage, w as EmbedMode, wt as SetApiKeyMessage, x as EmbedExample, xt as SaveMessage, y as EmbedEventMap, yt as RetrieveMessage, z as InspectionRoomUrls, zt as ToastMessage } from "./protocol-
|
|
1
|
+
import { $ as ProjectInitMessage, $t as createInspectionRoomUrls, A as ExtensionCallMessage, At as StateSourceLocation, B as InspectionSentEvent, Bt as UpdateMessage, C as EmbedFormatManifest, Ct as SessionMessage, D as ExportCallOptions, Dt as SetThemeMessage, E as ErrorMessage, Et as SetSettingsMessage, F as InitOptions, Ft as SystemInitMessage, G as MachineInitOptions, Gt as UploadResult, H as InspectorLoadedEvent, Ht as UploadFileInfo, I as InspectSnapshotMessage, It as SystemLoadedMessage, J as MachineVersionAutoSaveOptions, Jt as ViewModeChangedMessage, K as MachinePayload, Kt as ValidationIssue, L as InspectionAction, Lt as SystemSelectActorMessage, M as INSPECTION_PROTOCOL_VERSION, Mt as SystemActorRegisteredMessage, N as INSPECTION_ROOM_QUERY_PARAM, Nt as SystemActorSnapshotMessage, O as ExportFormat, Ot as SourceLocation, P as InitMessage, Pt as SystemActorStoppedMessage, Q as ProjectEmbedMachine, Qt as createInspectionActorId, R as InspectionClientMetadata, Rt as ToastDismissMessage, S as EmbedExtensionsManifest, St as SavedMessage, T as ErrorCode, Tt as SetModeMessage, U as InspectorSettings, Ut as UploadRequestMessage, V as InspectionTakenTransition, Vt as UploadCapabilitiesMessage, W as LoadedMessage, Wt as UploadResponseMessage, X as PREFIX, Xt as VizMessage, Y as ModeChangedMessage, Yt as ViewerOptions, Z as PanelChangedMessage, Zt as assertEmbedExamples, _ as EmbedDocumentLanguage, _t as RegisterMessage, a as ChangeMessage, an as EmbedPanelConfig, at as ProjectWorkspaceAction, b as EmbedEventName, bt as RetrievedMessage, c as ClipboardReadResponseMessage, ct as ProjectWorkspaceCapabilities, d as CommentsConfig, dt as ProjectWorkspaceMachineOrigin, en as getInspectionRoomId, et as ProjectInitOptions, f as EMBED_DOCUMENT_LANGUAGES, ft as ProjectWorkspaceOpenChangedMessage, g as EmbedDocument, gt as ReadyMessage, h as EditorHandshakeMessage, ht as ReadOnlyReason, i as CapabilityDeniedMessage, in as resolveInspectorSettings, it as ProjectUpdateMessage, j as ExtensionResultMessage, jt as SystemActorEventMessage, k as ExportFormatMap, kt as SourceRange, l as ClipboardWriteMessage, lt as ProjectWorkspaceConfig, m as EditorCapabilities, mt as ProtocolMessage, n as CapabilityDeniedCapability, nn as isEmbedExampleMachine, nt as ProjectSelectMachineMessage, o as ClientMessage, on as EmbedPanelPosition, ot as ProjectWorkspaceActionIcon, p as EMBED_DOCUMENT_LIMITS, pt as ProjectWorkspaceProject, q as MachineSourceLocations, qt as VersionSaveRequestedMessage, r as CapabilityDeniedEvent, rn as mergeInspectorSettings, rt as ProjectSetWorkspaceOpenMessage, s as ClipboardReadMessage, st as ProjectWorkspaceActionMessage, t as ActorSystemEntry, tn as isEmbedExample, tt as ProjectMachineSelectedMessage, u as ClipboardWriteResponseMessage, ut as ProjectWorkspaceMachine, v as EmbedEventHandler, vt as RegisteredMessage, w as EmbedMode, wt as SetApiKeyMessage, x as EmbedExample, xt as SaveMessage, y as EmbedEventMap, yt as RetrieveMessage, z as InspectionRoomUrls, zt as ToastMessage } from "./protocol-nOWsz3UV.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, InspectorLoadedEvent, InspectorSettings, LoadedMessage, MachineInitOptions, MachinePayload, 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, SystemLoadedMessage, SystemSelectActorMessage, ToastDismissMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VersionSaveRequestedMessage, ViewModeChangedMessage, ViewerOptions, VizMessage, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine, mergeInspectorSettings, resolveInspectorSettings };
|
package/dist/relay.d.mts
CHANGED
package/dist/relay.mjs
CHANGED
|
@@ -64,6 +64,41 @@ function errorMessage(code, message) {
|
|
|
64
64
|
function compactReplay(replay, message, max) {
|
|
65
65
|
const record = message;
|
|
66
66
|
const type = record.type;
|
|
67
|
+
const checkpoint = type === "@statelyai.system.actorRegistered" || type === "@statelyai.system.actorSnapshot" || type === "@statelyai.system.actorStopped" ? replay.find((entry) => entry.type === "@statelyai.system.init") : void 0;
|
|
68
|
+
if (checkpoint && typeof record.sessionId === "string") {
|
|
69
|
+
const actorIndex = checkpoint.actors.findIndex((actor) => actor.sessionId === record.sessionId);
|
|
70
|
+
if (type === "@statelyai.system.actorRegistered") {
|
|
71
|
+
const nextActor = {
|
|
72
|
+
sessionId: record.sessionId,
|
|
73
|
+
actorId: record.actorId,
|
|
74
|
+
...typeof record.displayName === "string" && { displayName: record.displayName },
|
|
75
|
+
parentSessionId: record.parentSessionId,
|
|
76
|
+
machine: record.machine,
|
|
77
|
+
snapshot: record.snapshot
|
|
78
|
+
};
|
|
79
|
+
if (actorIndex >= 0) checkpoint.actors[actorIndex] = nextActor;
|
|
80
|
+
else checkpoint.actors.push(nextActor);
|
|
81
|
+
for (let index = replay.length - 1; index >= 0; index--) {
|
|
82
|
+
const previous = replay[index];
|
|
83
|
+
if (previous.sessionId === record.sessionId && typeof previous.type === "string" && previous.type.startsWith("@statelyai.system.actor")) replay.splice(index, 1);
|
|
84
|
+
}
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const actor = checkpoint.actors[actorIndex];
|
|
88
|
+
if (actor) {
|
|
89
|
+
if (type === "@statelyai.system.actorSnapshot") checkpoint.actors[actorIndex] = {
|
|
90
|
+
...actor,
|
|
91
|
+
snapshot: record.snapshot
|
|
92
|
+
};
|
|
93
|
+
else if (type === "@statelyai.system.actorStopped") {
|
|
94
|
+
checkpoint.actors[actorIndex] = {
|
|
95
|
+
...actor,
|
|
96
|
+
stopped: true
|
|
97
|
+
};
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
67
102
|
if (type === "@statelyai.setSettings" || type === "@statelyai.system.selectActor") {
|
|
68
103
|
const index = replay.findIndex((entry) => entry.type === "@statelyai.system.init");
|
|
69
104
|
const init = replay[index];
|
|
@@ -97,7 +132,11 @@ function compactReplay(replay, message, max) {
|
|
|
97
132
|
if (index >= 0) replay.splice(index, 1);
|
|
98
133
|
}
|
|
99
134
|
replay.push(message);
|
|
100
|
-
|
|
135
|
+
while (replay.length > max) {
|
|
136
|
+
const oldestDelta = replay.findIndex((entry) => entry.type !== "@statelyai.system.init" && entry.type !== "@statelyai.init");
|
|
137
|
+
if (oldestDelta < 0) break;
|
|
138
|
+
replay.splice(oldestDelta, 1);
|
|
139
|
+
}
|
|
101
140
|
}
|
|
102
141
|
/**
|
|
103
142
|
* Runtime-neutral implementation of one inspection room.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { S as $strip, _ as ZodString, b as output, c as ZodArray, d as ZodLiteral, f as ZodNullable, g as ZodRecord, h as ZodOptional, l as ZodBoolean, m as ZodObject, p as ZodNumber, u as ZodEnum, v as ZodUnion, x as $loose, y as ZodUnknown } from "./index-CoxF4Saw.mjs";
|
|
2
|
+
import { StatelyAuthMode, StatelyCredential } from "./auth.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../api-contract/dist/errors.d.mts
|
|
5
5
|
/**
|