@statelyai/sdk 0.14.2 → 0.16.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 +81 -11
- package/dist/auth.d.mts +1 -1
- package/dist/bin.d.mts +1 -0
- package/dist/bin.mjs +35 -0
- package/dist/embed.d.mts +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/{graph-3oSqiY4N.d.mts → graph-DuOeLGvh.d.mts} +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{index-CcgKzQ-C.d.mts → index-ag6K2iAS.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +6 -6
- package/dist/{inspect-DWDTNMEc.mjs → inspect-BwVdM4R8.mjs} +109 -72
- package/dist/{inspect-DQ_7I7eH.d.mts → inspect-CduY_2Fa.d.mts} +54 -59
- package/dist/inspect.d.mts +1 -1
- package/dist/inspect.mjs +1 -1
- package/dist/node-relay.d.mts +22 -0
- package/dist/node-relay.mjs +84 -0
- package/dist/patchTypes.d.mts +1 -1
- package/dist/protocol.d.mts +102 -115
- package/dist/protocol.mjs +33 -2
- package/dist/relay.d.mts +10 -11
- package/dist/relay.mjs +83 -62
- package/dist/{dist-CO36Ks-i.mjs → statelyPragma-Th0gdXfx.mjs} +112 -4432
- package/dist/studio-Bk_u41gu.d.mts +303 -0
- package/dist/studio-txdyJHD7.mjs +4725 -0
- package/dist/studio.d.mts +2 -125
- package/dist/studio.mjs +2 -171
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +13 -24
- package/dist/{transport-D2Ud05yg.mjs → transport-B_ig9Znn.mjs} +56 -198
- package/package.json +15 -3
- package/dist/dist-Ci5I7Rjq.mjs +0 -9401
- /package/dist/{auth-D9-iLi-S.d.mts → auth-2Thaw42j.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -80,9 +80,12 @@ Key capabilities:
|
|
|
80
80
|
- **Asset uploads** with built-in S3 and Supabase adapters, or bring your own upload handler
|
|
81
81
|
- **Runtime settings** - toggle color mode, grid, snap lines, autolayout, and view mode on the fly
|
|
82
82
|
|
|
83
|
-
###
|
|
83
|
+
### Resource API client
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
<!-- StudioClient namespaces, DEFAULT_STATELY_BASE_URL, and StudioApiError from src/studio.ts -->
|
|
86
|
+
|
|
87
|
+
Programmatic access to hosted Stately resources, credential verification, and
|
|
88
|
+
deterministic machine-config extraction.
|
|
86
89
|
|
|
87
90
|
```ts
|
|
88
91
|
import { createStatelyClient } from '@statelyai/sdk';
|
|
@@ -96,28 +99,68 @@ const studio = createStatelyClient({
|
|
|
96
99
|
|
|
97
100
|
const projects = await studio.projects.list();
|
|
98
101
|
const machine = await studio.machines.get('machine-id');
|
|
99
|
-
const extracted = await studio.code.extractMachines(
|
|
102
|
+
const extracted = await studio.code.extractMachines({
|
|
103
|
+
code: sourceCode,
|
|
104
|
+
});
|
|
100
105
|
```
|
|
101
106
|
|
|
107
|
+
The client namespaces map one-to-one onto the server-owned `/api/v1` contract:
|
|
108
|
+
|
|
109
|
+
| Method | Operation |
|
|
110
|
+
| -------------------------------------------------- | ------------------------------------------------------ |
|
|
111
|
+
| `auth.verify()` | `GET /api/v1/auth/verify` |
|
|
112
|
+
| `projects.list()` | `GET /api/v1/projects` |
|
|
113
|
+
| `projects.create(input)` | `POST /api/v1/projects` |
|
|
114
|
+
| `projects.get(projectId)` | `GET /api/v1/projects/:projectId` |
|
|
115
|
+
| `projects.update(projectId, input)` | `PATCH /api/v1/projects/:projectId` |
|
|
116
|
+
| `projects.delete(projectId)` | `DELETE /api/v1/projects/:projectId` |
|
|
117
|
+
| `projects.listMachines(projectId)` | `GET /api/v1/projects/:projectId/machines` |
|
|
118
|
+
| `machines.create(input)` | `POST /api/v1/machines` |
|
|
119
|
+
| `machines.get(machineId)` | `GET /api/v1/machines/:machineId` |
|
|
120
|
+
| `machines.getVersion(machineId, versionId)` | `GET /api/v1/machines/:machineId/versions/:versionId` |
|
|
121
|
+
| `machines.update(machineId, input)` | `PATCH /api/v1/machines/:machineId` |
|
|
122
|
+
| `code.extractMachines(input)` | `POST /api/v1/code/extract-machines` |
|
|
123
|
+
|
|
124
|
+
`projects.ensure(input)` is a client workflow composed of `projects.list`,
|
|
125
|
+
`projects.get`, and `projects.create`, not a route.
|
|
126
|
+
|
|
127
|
+
`baseUrl` defaults to `https://editor.stately.ai`. Do not target
|
|
128
|
+
`stately.ai/registry` directly: Registry URLs are deprecated for clients, and
|
|
129
|
+
the server reaches the Registry itself when it is configured to.
|
|
130
|
+
|
|
131
|
+
Failed requests reject with `StudioApiError`, carrying `status` plus the
|
|
132
|
+
canonical `code`, optional `issues`, and optional `retryable` flag. Codes are
|
|
133
|
+
`bad_request`, `unauthenticated`, `forbidden`, `not_found`, `conflict`,
|
|
134
|
+
`payload_too_large`, `rate_limited`, `capability_disabled`, `upstream_error`,
|
|
135
|
+
and `internal_error`. Deployments with no resource provider answer resource
|
|
136
|
+
calls with `capability_disabled`; code extraction remains available and infers
|
|
137
|
+
XState v5 or v6 structurally when the version is omitted.
|
|
138
|
+
|
|
139
|
+
Deprecated inputs from earlier versions still work and normalize before the
|
|
140
|
+
request is sent: `{ id }` update inputs, capitalized `visibility`, an omitted
|
|
141
|
+
or `4` machine-create `xstateVersion` (defaulting to `5`), `machines.get(id, { version })`,
|
|
142
|
+
`machines.createMany` (singular semantics: one machine in a single-element
|
|
143
|
+
array), and `code.extractMachines(code, options)`.
|
|
144
|
+
|
|
102
145
|
Legacy `apiKey` is still accepted as an alias for
|
|
103
146
|
`credential: { type: 'api_key', token }`. The default `authMode: 'auto'` sends
|
|
104
147
|
a credential when present and otherwise lets the server accept or reject an
|
|
105
148
|
unauthenticated request. Use `authMode: 'bearer'` to require a credential before
|
|
106
149
|
making requests, or `authMode: 'none'` to ignore a configured credential.
|
|
150
|
+
Resource operations always require a credential.
|
|
107
151
|
|
|
108
152
|
### Inspector
|
|
109
153
|
|
|
110
154
|
<!-- createInspector API from src/inspect.ts -->
|
|
111
155
|
|
|
112
|
-
Stream live actor-system state to the Stately inspector
|
|
156
|
+
Stream live actor-system state to the hosted Stately inspector. Zero-config
|
|
157
|
+
inspection needs no API key or local relay.
|
|
113
158
|
|
|
114
159
|
```ts
|
|
115
160
|
import { createActor } from 'xstate';
|
|
116
161
|
import { createInspector } from '@statelyai/sdk';
|
|
117
162
|
|
|
118
|
-
const inspector = createInspector(
|
|
119
|
-
url: 'ws://localhost:4242',
|
|
120
|
-
});
|
|
163
|
+
const inspector = createInspector();
|
|
121
164
|
const { inspect } = inspector;
|
|
122
165
|
|
|
123
166
|
const actor = createActor(machine, { inspect });
|
|
@@ -132,13 +175,23 @@ completed request-scoped runs stay available for inspection.
|
|
|
132
175
|
|
|
133
176
|
XState v5 and v6 inspection events normalize to independent actor, event,
|
|
134
177
|
snapshot, and stop observations before crossing the WebSocket protocol.
|
|
178
|
+
`actorId` is system-local; `sessionId` is globally unique.
|
|
135
179
|
Observations captured before the first transport registration replay in order
|
|
136
180
|
after the initial actor-tree baseline. Reconnects use the latest checkpoint.
|
|
137
181
|
In Node, the inspector opens in the default browser automatically. The SDK
|
|
138
|
-
generates a
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
182
|
+
connects to `wss://sky.stately.ai` and generates a UUID v4 `?r=` room bearer
|
|
183
|
+
capability. Multiple producers and viewers can share that room. Anyone with the
|
|
184
|
+
URL can inspect its data, so keep it private. Hosted replay expires after 24
|
|
185
|
+
hours without activity. Only actor checkpoints and observations are replayed;
|
|
186
|
+
export traffic is live-only, and auth/upload/embed-control messages are rejected.
|
|
187
|
+
AI-backed features remain separately authenticated.
|
|
188
|
+
|
|
189
|
+
Set `autoOpen: false`, await `inspector.ready`, and navigate to
|
|
190
|
+
`inspector.inspectorUrl` when a test runner or another process owns the browser.
|
|
191
|
+
`inspectorBaseUrl` targets an inspector UI hosted separately from the WebSocket
|
|
192
|
+
relay. An explicit `url` wins over `STATELY_INSPECT_URL`, which wins over the
|
|
193
|
+
hosted default. See `@statelyai/sdk/protocol` for the versioned message and
|
|
194
|
+
`?r=` query contract.
|
|
142
195
|
|
|
143
196
|
### CLI and sync
|
|
144
197
|
|
|
@@ -187,11 +240,28 @@ const embed = createStatelyEmbed({
|
|
|
187
240
|
});
|
|
188
241
|
```
|
|
189
242
|
|
|
243
|
+
For inspection, run your own relay and pass its URL explicitly:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
npx @statelyai/sdk relay
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
```ts
|
|
250
|
+
const inspector = createInspector({
|
|
251
|
+
url: 'ws://localhost:4242',
|
|
252
|
+
inspectorBaseUrl: 'http://localhost:3000/inspect',
|
|
253
|
+
});
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
This repository's `packages/sky` is an optional Cloudflare Durable Object
|
|
257
|
+
reference deployment.
|
|
258
|
+
|
|
190
259
|
Key environment variables for self-hosted deployments:
|
|
191
260
|
|
|
192
261
|
| Variable | Purpose |
|
|
193
262
|
| --------------------------- | ------------------------------------------------- |
|
|
194
263
|
| `AUTH_PROVIDER` | Auth strategy used by the editor host |
|
|
264
|
+
| `RESOURCE_PROVIDER` | Set to `stately` to enable project and machine resource operations; `none` (default) disables them |
|
|
195
265
|
| `EDITOR_SYNC_AUTH_REQUIRED` | Set to `false` to skip editor-sync API-key checks |
|
|
196
266
|
| `NEXT_PUBLIC_BASE_URL` | Public-facing editor URL |
|
|
197
267
|
|
package/dist/auth.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as getCredentialToken, n as StatelyCredential, r as createAuthorizationHeader, t as StatelyAuthMode } from "./auth-
|
|
1
|
+
import { i as getCredentialToken, n as StatelyCredential, r as createAuthorizationHeader, t as StatelyAuthMode } from "./auth-2Thaw42j.mjs";
|
|
2
2
|
export { StatelyAuthMode, StatelyCredential, createAuthorizationHeader, getCredentialToken };
|
package/dist/bin.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/bin.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createNodeInspectionRelay } from "./node-relay.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/bin.ts
|
|
5
|
+
function readFlag(name, fallback) {
|
|
6
|
+
const index = process.argv.indexOf(`--${name}`);
|
|
7
|
+
return index >= 0 ? process.argv[index + 1] ?? fallback : fallback;
|
|
8
|
+
}
|
|
9
|
+
async function main() {
|
|
10
|
+
const command = process.argv[2];
|
|
11
|
+
if (command !== "relay") {
|
|
12
|
+
console.info("Usage: stately-sdk relay [--host 127.0.0.1] [--port 4242]");
|
|
13
|
+
process.exitCode = command ? 1 : 0;
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const relay = createNodeInspectionRelay({
|
|
17
|
+
host: readFlag("host", process.env.STATELY_HOST ?? "127.0.0.1"),
|
|
18
|
+
port: Number(readFlag("port", process.env.STATELY_PORT ?? "4242")),
|
|
19
|
+
logger: console
|
|
20
|
+
});
|
|
21
|
+
await relay.start();
|
|
22
|
+
const shutdown = async () => {
|
|
23
|
+
await relay.stop();
|
|
24
|
+
process.exit(0);
|
|
25
|
+
};
|
|
26
|
+
process.on("SIGINT", () => void shutdown());
|
|
27
|
+
process.on("SIGTERM", () => void shutdown());
|
|
28
|
+
}
|
|
29
|
+
main().catch((error) => {
|
|
30
|
+
console.error(error);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { };
|
package/dist/embed.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as StatelyGraph } from "./graph-
|
|
1
|
+
import { i as StatelyGraph } from "./graph-DuOeLGvh.mjs";
|
|
2
2
|
import { CapabilityDeniedEvent, CommentsConfig, EditorCapabilities, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, InitOptions, MachineInitOptions, MachineSourceLocations, ProjectEmbedMachine, UploadResult } from "./protocol.mjs";
|
|
3
3
|
import { AssetUploadAdapter } from "./assetStorage.mjs";
|
|
4
4
|
|
package/dist/embed.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as toInitMessage, i as createPendingExportManager, r as createEventRegistry, t as createPostMessageTransport } from "./transport-B_ig9Znn.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/embed.ts
|
|
4
4
|
function buildEmbedUrl(options) {
|
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-
|
|
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-DuOeLGvh.mjs";
|
|
2
2
|
export { StatelyAction, StatelyActorImplementation, StatelyEdgeData, StatelyGraph, StatelyGraphData, StatelyGuard, StatelyImplementation, StatelyInvoke, StatelyNodeData, StatelyTagImplementation, StudioAction, StudioEdge, StudioEventTypeData, StudioMachine, StudioNode, fromStudioMachine, studioMachineConverter, toStudioMachine };
|
|
@@ -2888,4 +2888,4 @@ declare const graphPatchSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
|
2888
2888
|
type GraphPatch = output<typeof graphPatchSchema>;
|
|
2889
2889
|
/** AI-only schema: semantic ops + shared ops (no generic graph ops) */
|
|
2890
2890
|
//#endregion
|
|
2891
|
-
export { serializeJS as _, EditorStateType as a, MachineConfigOptions as c, contextSchemaToTSType as d, eventsSchemaToTSType as f, raw as g, jsonSchemaToTSType as h, CodeGenGraph as i, 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 };
|
|
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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-
|
|
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-
|
|
4
|
-
import { CapabilityDeniedCapability, CapabilityDeniedEvent, CommentsConfig, EditorCapabilities, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, INSPECTION_PROTOCOL_VERSION, InitOptions, InspectionAction, InspectionSentEvent, InspectionTakenTransition, ProjectEmbedMachine, UploadResult } from "./protocol.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-ag6K2iAS.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-DuOeLGvh.mjs";
|
|
4
|
+
import { CapabilityDeniedCapability, CapabilityDeniedEvent, CommentsConfig, EditorCapabilities, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, InitOptions, InspectionAction, InspectionSentEvent, InspectionTakenTransition, ProjectEmbedMachine, UploadResult, createInspectionRoomUrls, getInspectionRoomId } from "./protocol.mjs";
|
|
5
5
|
import { AssetUploadAdapter, AssetUploadContext, AssetUploadRequest, CreateS3AssetUploadAdapterOptions, CreateSupabaseAssetUploadAdapterOptions, S3UploadTarget, SupabaseStorageClient, createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
|
|
6
|
-
import { i as getCredentialToken, n as StatelyCredential, r as createAuthorizationHeader, t as StatelyAuthMode } from "./auth-
|
|
6
|
+
import { i as getCredentialToken, n as StatelyCredential, r as createAuthorizationHeader, t as StatelyAuthMode } from "./auth-2Thaw42j.mjs";
|
|
7
7
|
import { AssetConfig, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
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-CduY_2Fa.mjs";
|
|
9
|
+
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-Bk_u41gu.mjs";
|
|
10
10
|
import { OAuthAuthorizationServerMetadata, OAuthClientRegistrationResponse, OAuthProtectedResourceMetadata, OAuthTokenResponse, PkcePair, buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
|
|
11
11
|
import { PlanSyncOptions, PullSyncResult, PushLocalMachineLinksResult, PushSyncOptions, PushSyncProjectOptions, PushSyncResult, ResolvedSyncInput, SyncInputFormat, SyncPlan, SyncPlanSummary } from "./sync.mjs";
|
|
12
12
|
import { CreateInspectionRelayOptions, InspectionRelay, InspectionRelayEffect, InspectionRelayPeer, InspectionRelayRole, InspectionRelaySnapshot, createInspectionRelay } from "./relay.mjs";
|
|
@@ -32,4 +32,4 @@ declare function findStatelyPragmaAttachments(sourceText: string, fileName?: str
|
|
|
32
32
|
declare function getStatelyPragma(sourceText: string, fileName?: string, machineIndex?: number): StatelyPragma | undefined;
|
|
33
33
|
declare function upsertStatelyPragma(sourceText: string, id: string, options?: UpsertStatelyPragmaOptions): string;
|
|
34
34
|
//#endregion
|
|
35
|
-
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, type DigraphAction, type DigraphConfig, type DigraphEdgeConfig, type DigraphNodeConfig, type EditorCapabilities, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedMode, type EnsureProjectInput, type EventTypeData, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type ExtractMachinesResponse, type ExtractedMachine, type GetMachineOptions, type GraphPatch, INSPECTION_PROTOCOL_VERSION, 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
|
|
35
|
+
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, type EditorCapabilities, 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 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, createInspectionRelay, createInspectionRoomUrls, createInspector, createPkcePair, createPostMessageTransport, createS3AssetUploadAdapter, createStatelyApiClient, createStatelyApiUrl, createStatelyClient, createStatelyEmbed, createStatelyInspector, createSupabaseAssetUploadAdapter, createWebSocketTransport, discoverAuthorizationServer, discoverProtectedResource, eventsSchemaToTSType, exchangeCodeForToken, findStatelyPragmaAttachments, fromStudioMachine, getCredentialToken, getInspectionRoomId, getStatelyPragma, graphToMachineConfig, graphToXStateTS, jsonSchemaToTSType, raw, refreshToken, registerOAuthClient, serializeJS, studioMachineConverter, toStudioMachine, upsertStatelyPragma };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { INSPECTION_PROTOCOL_VERSION } from "./protocol.mjs";
|
|
1
|
+
import { n as createWebSocketTransport, t as createPostMessageTransport } from "./transport-B_ig9Znn.mjs";
|
|
2
|
+
import { INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, createInspectionRoomUrls, getInspectionRoomId } from "./protocol.mjs";
|
|
3
3
|
import { createStatelyEmbed } from "./embed.mjs";
|
|
4
4
|
import { createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
|
|
5
|
-
import { n as createStatelyInspector, t as createInspector } from "./inspect-
|
|
5
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-BwVdM4R8.mjs";
|
|
6
|
+
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-txdyJHD7.mjs";
|
|
7
|
+
import { a as RawCode, c as eventsSchemaToTSType, d as jsonSchemaToTSType, f as raw, l as graphToMachineConfig, n as getStatelyPragma, o as contextSchemaToTSType, p as serializeJS, r as upsertStatelyPragma, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-Th0gdXfx.mjs";
|
|
6
8
|
import { createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
|
|
7
|
-
import { StudioApiError, createStatelyClient } from "./studio.mjs";
|
|
8
9
|
import { buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
|
|
9
10
|
import { StatelyApiError, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
10
|
-
import { a as eventsSchemaToTSType, c as jsonSchemaToTSType, f as findStatelyPragmaAttachments, l as raw, m as upsertStatelyPragma, n as RawCode, o as graphToMachineConfig, p as getStatelyPragma, r as contextSchemaToTSType, s as graphToXStateTS, u as serializeJS } from "./dist-CO36Ks-i.mjs";
|
|
11
11
|
import { fromStudioMachine, studioMachineConverter, toStudioMachine } from "./graph.mjs";
|
|
12
12
|
import { createInspectionRelay } from "./relay.mjs";
|
|
13
13
|
|
|
14
|
-
export { INSPECTION_PROTOCOL_VERSION, RawCode, StatelyApiError, StudioApiError, buildAuthorizeUrl, contextSchemaToTSType, createAuthorizationHeader, createInspectionRelay,
|
|
14
|
+
export { DEFAULT_STATELY_BASE_URL, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, RawCode, StatelyApiError, StudioApiError, buildAuthorizeUrl, contextSchemaToTSType, createAuthorizationHeader, createInspectionRelay, createInspectionRoomUrls, createInspector, createPkcePair, createPostMessageTransport, createS3AssetUploadAdapter, createStatelyApiClient, createStatelyApiUrl, createStatelyClient, createStatelyEmbed, createStatelyInspector, createSupabaseAssetUploadAdapter, createWebSocketTransport, discoverAuthorizationServer, discoverProtectedResource, eventsSchemaToTSType, exchangeCodeForToken, findStatelyPragmaAttachments, fromStudioMachine, getCredentialToken, getInspectionRoomId, getStatelyPragma, graphToMachineConfig, graphToXStateTS, jsonSchemaToTSType, raw, refreshToken, registerOAuthClient, serializeJS, studioMachineConverter, toStudioMachine, upsertStatelyPragma };
|