@skenion/contracts 0.34.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 +7 -0
- package/dist/audioClock.d.ts +3 -0
- package/dist/audioClock.d.ts.map +1 -0
- package/dist/audioClock.js +41 -0
- package/dist/audioClock.js.map +1 -0
- package/dist/builtins.generated.d.ts +2689 -0
- package/dist/builtins.generated.d.ts.map +1 -0
- package/dist/builtins.generated.js +6031 -0
- package/dist/builtins.generated.js.map +1 -0
- package/dist/clock.d.ts +39 -0
- package/dist/clock.d.ts.map +1 -0
- package/dist/clock.js +157 -0
- package/dist/clock.js.map +1 -0
- package/dist/conversion.d.ts +158 -0
- package/dist/conversion.d.ts.map +1 -0
- package/dist/conversion.js +199 -0
- package/dist/conversion.js.map +1 -0
- package/dist/generated/schemas.d.ts +2189 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +2839 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/objectText.d.ts +3 -0
- package/dist/objectText.d.ts.map +1 -0
- package/dist/objectText.js +292 -0
- package/dist/objectText.js.map +1 -0
- package/dist/patch.d.ts +7 -0
- package/dist/patch.d.ts.map +1 -0
- package/dist/patch.js +296 -0
- package/dist/patch.js.map +1 -0
- package/dist/project.d.ts +3 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +22 -0
- package/dist/project.js.map +1 -0
- package/dist/runtimeHttp.d.ts +23 -0
- package/dist/runtimeHttp.d.ts.map +1 -0
- package/dist/runtimeHttp.js +474 -0
- package/dist/runtimeHttp.js.map +1 -0
- package/dist/shaderInterface.d.ts +6 -0
- package/dist/shaderInterface.d.ts.map +1 -0
- package/dist/shaderInterface.js +262 -0
- package/dist/shaderInterface.js.map +1 -0
- package/dist/types.d.ts +1122 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validate.d.ts +16 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +485 -0
- package/dist/validate.js.map +1 -0
- package/package.json +104 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,1122 @@
|
|
|
1
|
+
export type DataFlow = "value" | "event" | "signal" | "stream" | "resource";
|
|
2
|
+
export type PortDirection = "input" | "output";
|
|
3
|
+
export type PortActivation = "trigger" | "latched";
|
|
4
|
+
export type AlphaPolicy = "error" | "white" | "black" | "luminance";
|
|
5
|
+
export interface DataTypeV01 {
|
|
6
|
+
flow: DataFlow;
|
|
7
|
+
dataKind: string;
|
|
8
|
+
unit?: string;
|
|
9
|
+
range?: {
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
step?: number;
|
|
13
|
+
};
|
|
14
|
+
shape?: number[];
|
|
15
|
+
channels?: number;
|
|
16
|
+
sampleRate?: number;
|
|
17
|
+
format?: string | string[];
|
|
18
|
+
colorSpace?: string;
|
|
19
|
+
frameRate?: number;
|
|
20
|
+
alphaPolicy?: AlphaPolicy;
|
|
21
|
+
values?: Array<string | number | boolean>;
|
|
22
|
+
}
|
|
23
|
+
export type SemanticDataKindV01 = "number.float" | "number.int" | "number.uint" | "boolean" | "string" | "message.any" | "event.bang" | "clock.state" | "asset.video" | "video.frame" | "signal.audio" | "gpu.texture2d" | "color";
|
|
24
|
+
export type FloatRepresentationV01 = "f64" | "f32" | "f16" | "f8.e4m3" | "f8.e5m2" | "ufloat16" | "ufloat8";
|
|
25
|
+
export type IntRepresentationV01 = "i64" | "i32" | "i16" | "i8";
|
|
26
|
+
export type UintRepresentationV01 = "u64" | "u32" | "u16" | "u8";
|
|
27
|
+
export type NumericRepresentationV01 = FloatRepresentationV01 | IntRepresentationV01 | UintRepresentationV01;
|
|
28
|
+
export type ColorRepresentationV01 = "rgba32f" | "rgba16f" | "rgba8unorm" | "rgb8unorm";
|
|
29
|
+
export type RepresentationV01 = NumericRepresentationV01 | ColorRepresentationV01;
|
|
30
|
+
export type AudioEndpointDirectionV01 = "input" | "output";
|
|
31
|
+
export type AudioClockDomainAuthorityV01 = "authoritative" | "driver-reported" | "user-configured" | "derived" | "unavailable";
|
|
32
|
+
export type AudioClockBridgeMethodV01 = "direct" | "clock-bridge" | "resample" | "invalid";
|
|
33
|
+
export type ClockAuthorityV01 = "authoritative" | "derived" | "estimated" | "unavailable";
|
|
34
|
+
export type ClockSourceKindV01 = "local" | "audio-device" | "render-frame" | "link" | "midi-clock" | "mtc" | "host-transport";
|
|
35
|
+
export type ClockCapabilityV01 = "running" | "tempo-bpm" | "phase" | "tick" | "ppq-position" | "song-position" | "bar-beat" | "time-signature" | "time-seconds" | "timecode" | "sample-frame";
|
|
36
|
+
export interface ClockFieldV01<T> {
|
|
37
|
+
value: T | null;
|
|
38
|
+
authority: ClockAuthorityV01;
|
|
39
|
+
source: string;
|
|
40
|
+
confidence?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ClockTimeSignatureV01 {
|
|
43
|
+
numerator: number;
|
|
44
|
+
denominator: number;
|
|
45
|
+
}
|
|
46
|
+
export interface ClockStateV01 {
|
|
47
|
+
sourceId: string;
|
|
48
|
+
sourceKind: ClockSourceKindV01 | string;
|
|
49
|
+
capabilities: Array<ClockCapabilityV01 | string>;
|
|
50
|
+
running?: ClockFieldV01<boolean>;
|
|
51
|
+
tempoBpm?: ClockFieldV01<number>;
|
|
52
|
+
phase01?: ClockFieldV01<number>;
|
|
53
|
+
tickIndex?: ClockFieldV01<number>;
|
|
54
|
+
ppqPosition?: ClockFieldV01<number>;
|
|
55
|
+
songPositionSixteenth?: ClockFieldV01<number>;
|
|
56
|
+
bar?: ClockFieldV01<number>;
|
|
57
|
+
beat?: ClockFieldV01<number>;
|
|
58
|
+
division?: ClockFieldV01<number>;
|
|
59
|
+
tickInDivision?: ClockFieldV01<number>;
|
|
60
|
+
timeSignature?: ClockFieldV01<ClockTimeSignatureV01>;
|
|
61
|
+
timeSeconds?: ClockFieldV01<number>;
|
|
62
|
+
timecode?: ClockFieldV01<string>;
|
|
63
|
+
sampleRate?: ClockFieldV01<number>;
|
|
64
|
+
sampleFrame?: ClockFieldV01<number>;
|
|
65
|
+
latencySeconds?: ClockFieldV01<number>;
|
|
66
|
+
lastUpdateHostTimeNs?: number;
|
|
67
|
+
}
|
|
68
|
+
export type RuntimeClockDiagnosticSeverity = "warning" | "error";
|
|
69
|
+
export interface RuntimeClockDiagnostic {
|
|
70
|
+
severity: RuntimeClockDiagnosticSeverity;
|
|
71
|
+
code: string;
|
|
72
|
+
message: string;
|
|
73
|
+
}
|
|
74
|
+
export type RuntimeIoDiagnosticSeverity = "warning" | "error";
|
|
75
|
+
export interface RuntimeIoDiagnostic {
|
|
76
|
+
severity: RuntimeIoDiagnosticSeverity;
|
|
77
|
+
code: string;
|
|
78
|
+
message: string;
|
|
79
|
+
}
|
|
80
|
+
export type RuntimeIoTransportKind = "midi" | "hid" | "serial" | "inline";
|
|
81
|
+
export type RuntimeIoDirection = "input" | "output";
|
|
82
|
+
export interface RuntimeIoDeviceDescriptor {
|
|
83
|
+
id: string;
|
|
84
|
+
name: string;
|
|
85
|
+
transportKind: RuntimeIoTransportKind;
|
|
86
|
+
directions: RuntimeIoDirection[];
|
|
87
|
+
backend: string;
|
|
88
|
+
index?: number;
|
|
89
|
+
stable: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface RuntimeIoDeviceListResponse {
|
|
92
|
+
ok: boolean;
|
|
93
|
+
devices: RuntimeIoDeviceDescriptor[];
|
|
94
|
+
diagnostics: RuntimeIoDiagnostic[];
|
|
95
|
+
}
|
|
96
|
+
export interface RuntimeIoInlineFrame {
|
|
97
|
+
atNs: number;
|
|
98
|
+
bytes: number[];
|
|
99
|
+
}
|
|
100
|
+
export type RuntimeIoBindingConfig = {
|
|
101
|
+
kind: "midi";
|
|
102
|
+
deviceId: string;
|
|
103
|
+
} | {
|
|
104
|
+
kind: "hid";
|
|
105
|
+
deviceId: string;
|
|
106
|
+
} | {
|
|
107
|
+
kind: "serial";
|
|
108
|
+
deviceId: string;
|
|
109
|
+
baudRate?: number;
|
|
110
|
+
} | {
|
|
111
|
+
kind: "inline";
|
|
112
|
+
frames: RuntimeIoInlineFrame[];
|
|
113
|
+
};
|
|
114
|
+
export type RuntimeDiagnosticSeverityV01 = "error" | "warning" | "info";
|
|
115
|
+
export type RuntimeDiagnosticSeverity = RuntimeDiagnosticSeverityV01;
|
|
116
|
+
export interface RuntimeDiagnosticV01 {
|
|
117
|
+
severity: RuntimeDiagnosticSeverityV01;
|
|
118
|
+
message: string;
|
|
119
|
+
}
|
|
120
|
+
export type RuntimeDiagnostic = RuntimeDiagnosticV01;
|
|
121
|
+
export interface RuntimeHealth {
|
|
122
|
+
ok: boolean;
|
|
123
|
+
service: string;
|
|
124
|
+
version: string;
|
|
125
|
+
}
|
|
126
|
+
export interface RuntimeInfo {
|
|
127
|
+
name: string;
|
|
128
|
+
version: string;
|
|
129
|
+
apiVersion: string;
|
|
130
|
+
capabilities: string[];
|
|
131
|
+
}
|
|
132
|
+
export interface RuntimeLogEvent {
|
|
133
|
+
id: number;
|
|
134
|
+
timestamp: string;
|
|
135
|
+
source: "runtime";
|
|
136
|
+
level: RuntimeDiagnosticSeverity;
|
|
137
|
+
code: string | null;
|
|
138
|
+
message: string;
|
|
139
|
+
}
|
|
140
|
+
export interface RuntimeLogRetention {
|
|
141
|
+
replayLimit: number;
|
|
142
|
+
replayLevels: RuntimeDiagnosticSeverity[];
|
|
143
|
+
}
|
|
144
|
+
export interface RuntimeLogSnapshotResponse {
|
|
145
|
+
schema: "skenion.runtime.logs";
|
|
146
|
+
schemaVersion: string;
|
|
147
|
+
ok: boolean;
|
|
148
|
+
events: RuntimeLogEvent[];
|
|
149
|
+
retention: RuntimeLogRetention;
|
|
150
|
+
diagnostics: RuntimeDiagnostic[];
|
|
151
|
+
}
|
|
152
|
+
export interface RuntimeProjectSnapshot {
|
|
153
|
+
graph: GraphDocumentV01;
|
|
154
|
+
viewState: ViewStateV01;
|
|
155
|
+
nodes: NodeDefinitionManifestV01[];
|
|
156
|
+
}
|
|
157
|
+
export interface RuntimeProjectRequest {
|
|
158
|
+
graph: GraphDocumentV01;
|
|
159
|
+
nodes: NodeDefinitionManifestV01[];
|
|
160
|
+
viewState?: ViewStateV01;
|
|
161
|
+
}
|
|
162
|
+
export interface RuntimePlan {
|
|
163
|
+
graphId: string;
|
|
164
|
+
graphRevision: string;
|
|
165
|
+
nodes: RuntimePlanNode[];
|
|
166
|
+
edges: RuntimePlanEdge[];
|
|
167
|
+
groups: RuntimeExecutionGroup[];
|
|
168
|
+
}
|
|
169
|
+
export interface RuntimePlanNode {
|
|
170
|
+
nodeId: string;
|
|
171
|
+
kind: string;
|
|
172
|
+
kindVersion: string;
|
|
173
|
+
executionModel: string;
|
|
174
|
+
order: number;
|
|
175
|
+
}
|
|
176
|
+
export interface RuntimePlanEdge {
|
|
177
|
+
fromNode: string;
|
|
178
|
+
fromPort: string;
|
|
179
|
+
toNode: string;
|
|
180
|
+
toPort: string;
|
|
181
|
+
metadata?: RuntimePlanEdgeMetadata | null;
|
|
182
|
+
}
|
|
183
|
+
export interface RuntimePlanEdgeMetadata {
|
|
184
|
+
resolvedType?: string | null;
|
|
185
|
+
mergePolicy?: string | null;
|
|
186
|
+
fanOutPolicy?: string | null;
|
|
187
|
+
order?: number | null;
|
|
188
|
+
feedback?: {
|
|
189
|
+
boundary: string;
|
|
190
|
+
bufferMode?: string;
|
|
191
|
+
maxLatencyFrames?: number;
|
|
192
|
+
} | null;
|
|
193
|
+
cycleClassification?: string | null;
|
|
194
|
+
}
|
|
195
|
+
export interface RuntimeExecutionGroup {
|
|
196
|
+
executionModel: string;
|
|
197
|
+
nodeIds: string[];
|
|
198
|
+
}
|
|
199
|
+
export interface RuntimeDummyExecutionReport {
|
|
200
|
+
graphId: string;
|
|
201
|
+
graphRevision: string;
|
|
202
|
+
frameCount: number;
|
|
203
|
+
frames: RuntimeDummyFrameReport[];
|
|
204
|
+
}
|
|
205
|
+
export interface RuntimeDummyFrameReport {
|
|
206
|
+
index: number;
|
|
207
|
+
executedNodes: RuntimeDummyNodeExecution[];
|
|
208
|
+
}
|
|
209
|
+
export interface RuntimeDummyNodeExecution {
|
|
210
|
+
nodeId: string;
|
|
211
|
+
kind: string;
|
|
212
|
+
kindVersion: string;
|
|
213
|
+
executionModel: string;
|
|
214
|
+
order: number;
|
|
215
|
+
status: string;
|
|
216
|
+
}
|
|
217
|
+
export interface RuntimeApiResponse {
|
|
218
|
+
ok: boolean;
|
|
219
|
+
diagnostics: RuntimeDiagnostic[];
|
|
220
|
+
plan: RuntimePlan | null;
|
|
221
|
+
report: RuntimeDummyExecutionReport | null;
|
|
222
|
+
}
|
|
223
|
+
export interface RuntimeSessionSnapshot {
|
|
224
|
+
sessionRevision: number;
|
|
225
|
+
viewRevision: number;
|
|
226
|
+
controlRevision: number;
|
|
227
|
+
project: RuntimeProjectSnapshot | null;
|
|
228
|
+
diagnostics: RuntimeDiagnosticV01[];
|
|
229
|
+
plan: RuntimePlan | null;
|
|
230
|
+
}
|
|
231
|
+
export interface RuntimeSessionResponse {
|
|
232
|
+
ok: boolean;
|
|
233
|
+
snapshot: RuntimeSessionSnapshot;
|
|
234
|
+
diagnostics: RuntimeDiagnosticV01[];
|
|
235
|
+
report: RuntimeDummyExecutionReport | null;
|
|
236
|
+
}
|
|
237
|
+
export interface RuntimeMutationRequest {
|
|
238
|
+
graphPatch?: GraphPatchV01;
|
|
239
|
+
viewPatch?: RuntimeViewPatch;
|
|
240
|
+
clientId?: string;
|
|
241
|
+
description?: string;
|
|
242
|
+
}
|
|
243
|
+
export interface RuntimeViewPatch {
|
|
244
|
+
baseViewRevision: number;
|
|
245
|
+
ops: RuntimeViewPatchOperation[];
|
|
246
|
+
}
|
|
247
|
+
export type RuntimeViewPatchOperation = {
|
|
248
|
+
op: "setNodeView";
|
|
249
|
+
nodeId: string;
|
|
250
|
+
view: CanvasNodeViewV01;
|
|
251
|
+
} | {
|
|
252
|
+
op: "moveNodeView";
|
|
253
|
+
nodeId: string;
|
|
254
|
+
from?: CanvasNodeViewV01;
|
|
255
|
+
to: CanvasNodeViewV01;
|
|
256
|
+
};
|
|
257
|
+
export type RuntimeHistoryEntryKind = "apply" | "undo" | "redo";
|
|
258
|
+
export interface RuntimeHistoryEntry {
|
|
259
|
+
id: string;
|
|
260
|
+
sequence: number;
|
|
261
|
+
kind: RuntimeHistoryEntryKind;
|
|
262
|
+
mutation: RuntimeMutationRequest;
|
|
263
|
+
inverseMutation: RuntimeMutationRequest;
|
|
264
|
+
subjectEventId?: string;
|
|
265
|
+
clientId?: string;
|
|
266
|
+
description?: string;
|
|
267
|
+
createdAt: string;
|
|
268
|
+
}
|
|
269
|
+
export interface RuntimeHistory {
|
|
270
|
+
schema: "skenion.runtime.history";
|
|
271
|
+
schemaVersion: "0.1.0";
|
|
272
|
+
entries: RuntimeHistoryEntry[];
|
|
273
|
+
canUndo: boolean;
|
|
274
|
+
canRedo: boolean;
|
|
275
|
+
undoDepth: number;
|
|
276
|
+
redoDepth: number;
|
|
277
|
+
}
|
|
278
|
+
export interface RuntimeMutationResponse {
|
|
279
|
+
ok: boolean;
|
|
280
|
+
applied: boolean;
|
|
281
|
+
conflict: boolean;
|
|
282
|
+
snapshot: RuntimeSessionSnapshot;
|
|
283
|
+
history: RuntimeHistory;
|
|
284
|
+
diagnostics: RuntimeDiagnosticV01[];
|
|
285
|
+
}
|
|
286
|
+
export type RuntimePatchResponse = RuntimeMutationResponse;
|
|
287
|
+
export type RuntimeSessionEventKind = "snapshot" | "load" | "clear" | "mutate" | "undo" | "redo";
|
|
288
|
+
export interface RuntimeSessionEvent {
|
|
289
|
+
schema: "skenion.runtime.session.event";
|
|
290
|
+
schemaVersion: "0.1.0";
|
|
291
|
+
id: string;
|
|
292
|
+
sequence: number;
|
|
293
|
+
kind: RuntimeSessionEventKind;
|
|
294
|
+
snapshot: RuntimeSessionSnapshot;
|
|
295
|
+
history: RuntimeHistory;
|
|
296
|
+
mutation?: RuntimeHistoryEntry;
|
|
297
|
+
diagnostics: RuntimeDiagnosticV01[];
|
|
298
|
+
createdAt: string;
|
|
299
|
+
}
|
|
300
|
+
export type RuntimePreviewState = "stopped" | "starting" | "running" | "exited" | "error";
|
|
301
|
+
export interface RuntimePreviewStatus {
|
|
302
|
+
ok: boolean;
|
|
303
|
+
state: RuntimePreviewState;
|
|
304
|
+
pid: number | null;
|
|
305
|
+
graphId: string | null;
|
|
306
|
+
graphRevision: string | null;
|
|
307
|
+
sessionRevision: number | null;
|
|
308
|
+
previewSessionRevision: number | null;
|
|
309
|
+
controlRevision: number | null;
|
|
310
|
+
previewControlRevision: number | null;
|
|
311
|
+
controlLive: boolean;
|
|
312
|
+
lastControlUpdateAt: string | null;
|
|
313
|
+
stale: boolean;
|
|
314
|
+
startedAt: string | null;
|
|
315
|
+
exitedAt: string | null;
|
|
316
|
+
exitCode: number | null;
|
|
317
|
+
message: string | null;
|
|
318
|
+
diagnostics: RuntimeDiagnostic[];
|
|
319
|
+
}
|
|
320
|
+
export interface RuntimePreviewStartRequest {
|
|
321
|
+
restart: boolean;
|
|
322
|
+
}
|
|
323
|
+
export interface RuntimeAsset {
|
|
324
|
+
id: string;
|
|
325
|
+
name: string;
|
|
326
|
+
mimeType: string;
|
|
327
|
+
kind: string;
|
|
328
|
+
sizeBytes: number;
|
|
329
|
+
runtimeUri: string;
|
|
330
|
+
}
|
|
331
|
+
export interface RuntimeAssetImportResponse {
|
|
332
|
+
ok: boolean;
|
|
333
|
+
asset: RuntimeAsset | null;
|
|
334
|
+
diagnostics: RuntimeDiagnostic[];
|
|
335
|
+
}
|
|
336
|
+
export interface RuntimeAssetListResponse {
|
|
337
|
+
ok: boolean;
|
|
338
|
+
assets: RuntimeAsset[];
|
|
339
|
+
diagnostics: RuntimeDiagnostic[];
|
|
340
|
+
}
|
|
341
|
+
export interface RuntimeAssetGetResponse {
|
|
342
|
+
ok: boolean;
|
|
343
|
+
asset: RuntimeAsset | null;
|
|
344
|
+
diagnostics: RuntimeDiagnostic[];
|
|
345
|
+
}
|
|
346
|
+
export type RuntimeControlValue = {
|
|
347
|
+
type: "float";
|
|
348
|
+
representation: FloatRepresentationV01;
|
|
349
|
+
value: number;
|
|
350
|
+
} | {
|
|
351
|
+
type: "int";
|
|
352
|
+
representation: IntRepresentationV01;
|
|
353
|
+
value: number;
|
|
354
|
+
} | {
|
|
355
|
+
type: "uint";
|
|
356
|
+
representation: UintRepresentationV01;
|
|
357
|
+
value: number;
|
|
358
|
+
} | {
|
|
359
|
+
type: "bool";
|
|
360
|
+
value: boolean;
|
|
361
|
+
} | {
|
|
362
|
+
type: "string";
|
|
363
|
+
value: string;
|
|
364
|
+
} | {
|
|
365
|
+
type: "color";
|
|
366
|
+
representation: ColorRepresentationV01;
|
|
367
|
+
colorSpace: "linear" | "srgb";
|
|
368
|
+
value: [number, number, number, number];
|
|
369
|
+
};
|
|
370
|
+
export type RuntimeControlAtom = RuntimeControlValue;
|
|
371
|
+
export interface RuntimeControlMessage {
|
|
372
|
+
selector: string;
|
|
373
|
+
atoms: RuntimeControlAtom[];
|
|
374
|
+
}
|
|
375
|
+
export interface RuntimeControlEventRequest {
|
|
376
|
+
nodeId: string;
|
|
377
|
+
portId: "in" | "cold" | "value" | "out";
|
|
378
|
+
message: RuntimeControlMessage;
|
|
379
|
+
}
|
|
380
|
+
export interface RuntimeControlEmission {
|
|
381
|
+
nodeId: string;
|
|
382
|
+
portId: "in" | "out" | "value";
|
|
383
|
+
message: RuntimeControlMessage;
|
|
384
|
+
}
|
|
385
|
+
export interface RuntimeControlEventResponse {
|
|
386
|
+
ok: boolean;
|
|
387
|
+
changed: boolean;
|
|
388
|
+
controlRevision: number | null;
|
|
389
|
+
emitted: RuntimeControlEmission[];
|
|
390
|
+
diagnostics: RuntimeDiagnostic[];
|
|
391
|
+
}
|
|
392
|
+
export interface RuntimeControlStateResponse {
|
|
393
|
+
ok: boolean;
|
|
394
|
+
controlRevision: number;
|
|
395
|
+
values: Record<string, RuntimeControlValue>;
|
|
396
|
+
channels: Record<string, RuntimeControlMessage>;
|
|
397
|
+
diagnostics: RuntimeDiagnostic[];
|
|
398
|
+
}
|
|
399
|
+
export type RuntimeControlReadTarget = "param" | "port" | "state";
|
|
400
|
+
export interface RuntimeControlReadRequest {
|
|
401
|
+
nodeId: string;
|
|
402
|
+
target: RuntimeControlReadTarget;
|
|
403
|
+
id: string;
|
|
404
|
+
}
|
|
405
|
+
export type RuntimeControlReadValue = RuntimeControlValue | {
|
|
406
|
+
type: "json";
|
|
407
|
+
value: unknown;
|
|
408
|
+
};
|
|
409
|
+
export interface RuntimeControlReadResponse {
|
|
410
|
+
ok: boolean;
|
|
411
|
+
address: RuntimeControlReadRequest;
|
|
412
|
+
value: RuntimeControlReadValue | null;
|
|
413
|
+
diagnostics: RuntimeDiagnostic[];
|
|
414
|
+
}
|
|
415
|
+
export interface RuntimeTelemetrySnapshot {
|
|
416
|
+
schema: "skenion.runtime.telemetry";
|
|
417
|
+
schemaVersion: "0.1.0";
|
|
418
|
+
ok: boolean;
|
|
419
|
+
timestamp: string;
|
|
420
|
+
session: RuntimeTelemetrySession;
|
|
421
|
+
preview: RuntimeTelemetryPreview;
|
|
422
|
+
render: RuntimeTelemetryRender;
|
|
423
|
+
process: RuntimeTelemetryProcess;
|
|
424
|
+
diagnostics: RuntimeDiagnostic[];
|
|
425
|
+
}
|
|
426
|
+
export interface RuntimeTelemetrySession {
|
|
427
|
+
loaded: boolean;
|
|
428
|
+
graphId: string | null;
|
|
429
|
+
graphRevision: string | null;
|
|
430
|
+
sessionRevision: number;
|
|
431
|
+
controlRevision: number;
|
|
432
|
+
}
|
|
433
|
+
export interface RuntimeTelemetryPreview {
|
|
434
|
+
state: RuntimePreviewState;
|
|
435
|
+
pid: number | null;
|
|
436
|
+
stale: boolean;
|
|
437
|
+
graphId: string | null;
|
|
438
|
+
graphRevision: string | null;
|
|
439
|
+
sessionRevision: number | null;
|
|
440
|
+
previewSessionRevision: number | null;
|
|
441
|
+
controlRevision: number | null;
|
|
442
|
+
previewControlRevision: number | null;
|
|
443
|
+
controlLive: boolean;
|
|
444
|
+
lastControlUpdateAt: string | null;
|
|
445
|
+
}
|
|
446
|
+
export interface RuntimeTelemetryRender {
|
|
447
|
+
active: boolean;
|
|
448
|
+
backend: string | null;
|
|
449
|
+
renderer: string | null;
|
|
450
|
+
framesRendered: number;
|
|
451
|
+
approxFps: number | null;
|
|
452
|
+
lastFrameMs: number | null;
|
|
453
|
+
lastError: string | null;
|
|
454
|
+
sourceNodeId: string | null;
|
|
455
|
+
diagnostics: ShaderDiagnosticV01[];
|
|
456
|
+
generatedSourceAvailable: boolean;
|
|
457
|
+
controlRevision: number | null;
|
|
458
|
+
previewControlRevision: number | null;
|
|
459
|
+
controlLive: boolean;
|
|
460
|
+
lastControlUpdateAt: string | null;
|
|
461
|
+
}
|
|
462
|
+
export interface RuntimeTelemetryProcess {
|
|
463
|
+
runtimeVersion: string;
|
|
464
|
+
uptimeMs: number;
|
|
465
|
+
}
|
|
466
|
+
export interface RuntimeGeneratedShaderResponse {
|
|
467
|
+
ok: boolean;
|
|
468
|
+
nodeId: string | null;
|
|
469
|
+
language: "wgsl" | null;
|
|
470
|
+
source: string | null;
|
|
471
|
+
sourceMap: GeneratedShaderSourceMapV01 | null;
|
|
472
|
+
diagnostics: ShaderDiagnosticV01[];
|
|
473
|
+
}
|
|
474
|
+
export interface RuntimeSessionRunRequest {
|
|
475
|
+
frames: number;
|
|
476
|
+
}
|
|
477
|
+
export type ExtensionKindV01 = "core-package" | "native-runtime" | "codec" | "node-pack";
|
|
478
|
+
export type ExtensionNativeArtifactAbiV01 = "c";
|
|
479
|
+
export type ExtensionCodecDirectionV01 = "decode" | "encode" | "duplex";
|
|
480
|
+
export type ExtensionTestKindV01 = "node" | "codec" | "extension";
|
|
481
|
+
export type RuntimeExtensionStatus = "loaded" | "disabled" | "failed";
|
|
482
|
+
export interface ExtensionNativeArtifactV01 {
|
|
483
|
+
os: string;
|
|
484
|
+
arch: string;
|
|
485
|
+
abi: ExtensionNativeArtifactAbiV01;
|
|
486
|
+
path: string;
|
|
487
|
+
sha256?: string;
|
|
488
|
+
}
|
|
489
|
+
export interface ExtensionNativeBindingV01 {
|
|
490
|
+
entrypoint: string;
|
|
491
|
+
artifacts: ExtensionNativeArtifactV01[];
|
|
492
|
+
}
|
|
493
|
+
export interface ExtensionCodecDescriptorV01 {
|
|
494
|
+
id: string;
|
|
495
|
+
version: string;
|
|
496
|
+
transportKinds: RuntimeIoTransportKind[];
|
|
497
|
+
direction: ExtensionCodecDirectionV01;
|
|
498
|
+
}
|
|
499
|
+
export interface ExtensionTransportDescriptorV01 {
|
|
500
|
+
id: string;
|
|
501
|
+
version: string;
|
|
502
|
+
kind: string;
|
|
503
|
+
}
|
|
504
|
+
export interface ExtensionHelpEntryV01 {
|
|
505
|
+
nodeId: string;
|
|
506
|
+
nodeVersion?: string;
|
|
507
|
+
title?: string;
|
|
508
|
+
markdownPath?: string;
|
|
509
|
+
graphPath?: string;
|
|
510
|
+
}
|
|
511
|
+
export interface ExtensionProvidesV01 {
|
|
512
|
+
nodes?: NodeDefinitionManifestV01[];
|
|
513
|
+
codecs?: ExtensionCodecDescriptorV01[];
|
|
514
|
+
transports?: ExtensionTransportDescriptorV01[];
|
|
515
|
+
help?: ExtensionHelpEntryV01[];
|
|
516
|
+
}
|
|
517
|
+
export interface ExtensionFrontendMetadataV01 {
|
|
518
|
+
displayName?: string;
|
|
519
|
+
description?: string;
|
|
520
|
+
tags?: string[];
|
|
521
|
+
}
|
|
522
|
+
export interface ExtensionManifestV01 {
|
|
523
|
+
schema: "skenion.extension.manifest";
|
|
524
|
+
schemaVersion: "0.1.0";
|
|
525
|
+
id: string;
|
|
526
|
+
version: string;
|
|
527
|
+
sdkVersion?: string;
|
|
528
|
+
runtimeAbiVersion: string;
|
|
529
|
+
kind: ExtensionKindV01;
|
|
530
|
+
native?: ExtensionNativeBindingV01;
|
|
531
|
+
provides: ExtensionProvidesV01;
|
|
532
|
+
permissions: string[];
|
|
533
|
+
frontend?: ExtensionFrontendMetadataV01;
|
|
534
|
+
tests?: ExtensionTestDescriptorV01[];
|
|
535
|
+
}
|
|
536
|
+
export interface ExtensionTestDescriptorV01 {
|
|
537
|
+
id: string;
|
|
538
|
+
kind: ExtensionTestKindV01;
|
|
539
|
+
target: string;
|
|
540
|
+
fixturePath?: string;
|
|
541
|
+
expectedPath?: string;
|
|
542
|
+
}
|
|
543
|
+
export interface RuntimeExtensionDescriptor {
|
|
544
|
+
id: string;
|
|
545
|
+
version: string;
|
|
546
|
+
kind: ExtensionKindV01;
|
|
547
|
+
runtimeAbiVersion: string;
|
|
548
|
+
manifestPath: string;
|
|
549
|
+
status: RuntimeExtensionStatus;
|
|
550
|
+
capabilities: string[];
|
|
551
|
+
providedNodes: string[];
|
|
552
|
+
providedCodecs: string[];
|
|
553
|
+
providedTransports: string[];
|
|
554
|
+
providedHelp: string[];
|
|
555
|
+
testIds: string[];
|
|
556
|
+
diagnostics: RuntimeDiagnostic[];
|
|
557
|
+
}
|
|
558
|
+
export interface RuntimeExtensionListResponse {
|
|
559
|
+
ok: boolean;
|
|
560
|
+
extensions: RuntimeExtensionDescriptor[];
|
|
561
|
+
diagnostics: RuntimeDiagnostic[];
|
|
562
|
+
}
|
|
563
|
+
export interface AudioDeviceDescriptorV01 {
|
|
564
|
+
id: string;
|
|
565
|
+
name: string;
|
|
566
|
+
hostApi?: string;
|
|
567
|
+
isDefaultInput?: boolean;
|
|
568
|
+
isDefaultOutput?: boolean;
|
|
569
|
+
maxInputChannels?: number;
|
|
570
|
+
maxOutputChannels?: number;
|
|
571
|
+
clockDomainHint?: string;
|
|
572
|
+
}
|
|
573
|
+
export interface AudioDevicePreferenceV01 {
|
|
574
|
+
deviceId?: string;
|
|
575
|
+
nameContains?: string;
|
|
576
|
+
defaultInput?: boolean;
|
|
577
|
+
defaultOutput?: boolean;
|
|
578
|
+
}
|
|
579
|
+
export interface AudioStreamConfigRequestV01 {
|
|
580
|
+
endpointId: string;
|
|
581
|
+
direction: AudioEndpointDirectionV01;
|
|
582
|
+
device?: AudioDevicePreferenceV01;
|
|
583
|
+
sampleRate?: number;
|
|
584
|
+
channels?: number;
|
|
585
|
+
sampleFormat?: string;
|
|
586
|
+
blockSize?: number;
|
|
587
|
+
}
|
|
588
|
+
export interface AudioStreamConfigResolvedV01 {
|
|
589
|
+
endpointId: string;
|
|
590
|
+
direction: AudioEndpointDirectionV01;
|
|
591
|
+
device: AudioDeviceDescriptorV01;
|
|
592
|
+
sampleRate: number;
|
|
593
|
+
channels: number;
|
|
594
|
+
sampleFormat: string;
|
|
595
|
+
blockSize?: number;
|
|
596
|
+
clockDomainId: string;
|
|
597
|
+
}
|
|
598
|
+
export interface AudioEndpointV01 {
|
|
599
|
+
id: string;
|
|
600
|
+
nodeId: string;
|
|
601
|
+
direction: AudioEndpointDirectionV01;
|
|
602
|
+
channelPorts: string[];
|
|
603
|
+
requestedConfig?: AudioStreamConfigRequestV01;
|
|
604
|
+
resolvedConfig?: AudioStreamConfigResolvedV01;
|
|
605
|
+
clockDomainId?: string;
|
|
606
|
+
}
|
|
607
|
+
export interface AudioInputEndpointV01 extends AudioEndpointV01 {
|
|
608
|
+
direction: "input";
|
|
609
|
+
}
|
|
610
|
+
export interface AudioOutputEndpointV01 extends AudioEndpointV01 {
|
|
611
|
+
direction: "output";
|
|
612
|
+
}
|
|
613
|
+
export interface AudioClockDomainV01 {
|
|
614
|
+
id: string;
|
|
615
|
+
authority: AudioClockDomainAuthorityV01;
|
|
616
|
+
source: string;
|
|
617
|
+
sampleRate?: number;
|
|
618
|
+
driftCompensated?: boolean;
|
|
619
|
+
sharedWith?: string[];
|
|
620
|
+
}
|
|
621
|
+
export interface AudioGraphPartitionV01 {
|
|
622
|
+
id: string;
|
|
623
|
+
clockDomainId: string;
|
|
624
|
+
endpointIds: string[];
|
|
625
|
+
nodeIds: string[];
|
|
626
|
+
}
|
|
627
|
+
export interface AudioClockBridgeDiagnosticV01 {
|
|
628
|
+
severity: "info" | "warning" | "error";
|
|
629
|
+
code: string;
|
|
630
|
+
message: string;
|
|
631
|
+
}
|
|
632
|
+
export interface AudioClockBridgePlanV01 {
|
|
633
|
+
required: boolean;
|
|
634
|
+
sourceClockDomainId: string;
|
|
635
|
+
targetClockDomainId: string;
|
|
636
|
+
method: AudioClockBridgeMethodV01;
|
|
637
|
+
bridgeNodeId?: string;
|
|
638
|
+
diagnostics: AudioClockBridgeDiagnosticV01[];
|
|
639
|
+
}
|
|
640
|
+
export interface AudioResamplerPlanV01 {
|
|
641
|
+
sourceSampleRate: number;
|
|
642
|
+
targetSampleRate: number;
|
|
643
|
+
driftCompensation: boolean;
|
|
644
|
+
quality: "placeholder" | "linear" | "sinc" | "external";
|
|
645
|
+
}
|
|
646
|
+
export interface RepresentationSpecV01 {
|
|
647
|
+
id: RepresentationV01;
|
|
648
|
+
semanticDataKind: "number.float" | "number.int" | "number.uint" | "color";
|
|
649
|
+
bitsPerComponent: number;
|
|
650
|
+
signed?: boolean;
|
|
651
|
+
integer?: boolean;
|
|
652
|
+
normalized?: boolean;
|
|
653
|
+
channels?: number;
|
|
654
|
+
}
|
|
655
|
+
export interface TypeDescriptorV01 {
|
|
656
|
+
dataKind: SemanticDataKindV01 | string;
|
|
657
|
+
representation?: RepresentationV01 | string;
|
|
658
|
+
}
|
|
659
|
+
export interface ConversionStepV01 {
|
|
660
|
+
policy: "identity" | "numeric-cast" | "float-to-integer" | "integer-to-float" | "integer-signedness" | "color-cast";
|
|
661
|
+
clamp?: "saturating" | "unit";
|
|
662
|
+
quantize?: boolean;
|
|
663
|
+
trunc?: "toward-zero";
|
|
664
|
+
sanitize?: "nan-inf-to-finite";
|
|
665
|
+
}
|
|
666
|
+
export interface ConversionDiagnosticV01 {
|
|
667
|
+
severity: "info" | "warning" | "error";
|
|
668
|
+
code: string;
|
|
669
|
+
message: string;
|
|
670
|
+
}
|
|
671
|
+
export interface ConversionPlanV01 {
|
|
672
|
+
ok: boolean;
|
|
673
|
+
source: TypeDescriptorV01;
|
|
674
|
+
target: TypeDescriptorV01;
|
|
675
|
+
implicit: boolean;
|
|
676
|
+
lossy: boolean;
|
|
677
|
+
steps: ConversionStepV01[];
|
|
678
|
+
diagnostics: ConversionDiagnosticV01[];
|
|
679
|
+
}
|
|
680
|
+
export interface PortV01 {
|
|
681
|
+
id: string;
|
|
682
|
+
direction: PortDirection;
|
|
683
|
+
label?: string;
|
|
684
|
+
type: DataTypeV01;
|
|
685
|
+
required?: boolean;
|
|
686
|
+
default?: unknown;
|
|
687
|
+
activation?: PortActivation;
|
|
688
|
+
}
|
|
689
|
+
export interface GraphNodeV01 {
|
|
690
|
+
id: string;
|
|
691
|
+
kind: string;
|
|
692
|
+
kindVersion: string;
|
|
693
|
+
params: Record<string, unknown>;
|
|
694
|
+
ports: PortV01[];
|
|
695
|
+
}
|
|
696
|
+
export interface EdgeV01 {
|
|
697
|
+
from: {
|
|
698
|
+
node: string;
|
|
699
|
+
port: string;
|
|
700
|
+
};
|
|
701
|
+
to: {
|
|
702
|
+
node: string;
|
|
703
|
+
port: string;
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
export interface GraphDocumentV01 {
|
|
707
|
+
schema: "skenion.graph";
|
|
708
|
+
schemaVersion: "0.1.0";
|
|
709
|
+
id: string;
|
|
710
|
+
revision: string;
|
|
711
|
+
nodes: GraphNodeV01[];
|
|
712
|
+
edges: EdgeV01[];
|
|
713
|
+
}
|
|
714
|
+
export interface CanvasNodeViewV01 {
|
|
715
|
+
x: number;
|
|
716
|
+
y: number;
|
|
717
|
+
width?: number;
|
|
718
|
+
height?: number;
|
|
719
|
+
collapsed?: boolean;
|
|
720
|
+
}
|
|
721
|
+
export interface CanvasViewportV01 {
|
|
722
|
+
x: number;
|
|
723
|
+
y: number;
|
|
724
|
+
zoom: number;
|
|
725
|
+
}
|
|
726
|
+
export interface ViewStateV01 {
|
|
727
|
+
schema: "skenion.view-state";
|
|
728
|
+
schemaVersion: "0.1.0";
|
|
729
|
+
canvas: {
|
|
730
|
+
nodes: Record<string, CanvasNodeViewV01>;
|
|
731
|
+
viewport?: CanvasViewportV01;
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
export interface ProjectDocumentV01 {
|
|
735
|
+
schema: "skenion.project";
|
|
736
|
+
schemaVersion: "0.1.0";
|
|
737
|
+
id: string;
|
|
738
|
+
revision: string;
|
|
739
|
+
metadata?: {
|
|
740
|
+
title?: string;
|
|
741
|
+
description?: string;
|
|
742
|
+
createdAt?: string;
|
|
743
|
+
updatedAt?: string;
|
|
744
|
+
[key: string]: unknown;
|
|
745
|
+
};
|
|
746
|
+
graph: GraphDocumentV01;
|
|
747
|
+
viewState: ViewStateV01;
|
|
748
|
+
tutorial?: Record<string, unknown>;
|
|
749
|
+
help?: Record<string, unknown>;
|
|
750
|
+
}
|
|
751
|
+
export type PortRateV02 = "event" | "control" | "audio" | "render" | "gpu" | "resource" | "io";
|
|
752
|
+
export type MergePolicyV02 = "forbid" | "ordered-events" | "mix" | "array" | "latest" | "first" | "custom";
|
|
753
|
+
export type FanOutPolicyV02 = "allow" | "forbid" | "copy" | "share";
|
|
754
|
+
export type TriggerModeV02 = "passive" | "trigger" | "latched";
|
|
755
|
+
export type FeedbackBoundaryV02 = "same-turn" | "next-tick" | "control-frame" | "audio-sample" | "audio-block" | "render-frame" | "gpu-pingpong" | "manual";
|
|
756
|
+
export type FeedbackBufferModeV02 = "latest" | "queue" | "ring" | "pingpong";
|
|
757
|
+
export type CycleValidationV02 = "no-cycle" | "valid-feedback" | "risky-feedback" | "ambiguous-algebraic-loop" | "invalid-cycle";
|
|
758
|
+
export interface PortSpecV02 {
|
|
759
|
+
id: string;
|
|
760
|
+
direction: PortDirection;
|
|
761
|
+
type: string;
|
|
762
|
+
label?: string;
|
|
763
|
+
rate?: PortRateV02;
|
|
764
|
+
accepts?: string[];
|
|
765
|
+
minConnections?: number;
|
|
766
|
+
maxConnections?: number | null;
|
|
767
|
+
mergePolicy?: MergePolicyV02;
|
|
768
|
+
fanOutPolicy?: FanOutPolicyV02;
|
|
769
|
+
triggerMode?: TriggerModeV02;
|
|
770
|
+
defaultValue?: unknown;
|
|
771
|
+
latch?: boolean;
|
|
772
|
+
required?: boolean;
|
|
773
|
+
styleKey?: string;
|
|
774
|
+
group?: string;
|
|
775
|
+
description?: string;
|
|
776
|
+
}
|
|
777
|
+
export interface PortGroupSpecV02 {
|
|
778
|
+
id: string;
|
|
779
|
+
direction: PortDirection;
|
|
780
|
+
type: string;
|
|
781
|
+
minPorts: number;
|
|
782
|
+
label?: string;
|
|
783
|
+
rate?: PortRateV02;
|
|
784
|
+
maxPorts?: number;
|
|
785
|
+
ordered?: boolean;
|
|
786
|
+
portIdPattern?: string;
|
|
787
|
+
createLabel?: string;
|
|
788
|
+
defaultPortSpec?: PortSpecV02;
|
|
789
|
+
}
|
|
790
|
+
export interface FeedbackPolicyV02 {
|
|
791
|
+
enabled: boolean;
|
|
792
|
+
boundary: FeedbackBoundaryV02;
|
|
793
|
+
initialValue?: unknown;
|
|
794
|
+
recursionLimit?: number;
|
|
795
|
+
maxEventsPerTick?: number;
|
|
796
|
+
maxIterationsPerFrame?: number;
|
|
797
|
+
bufferMode?: FeedbackBufferModeV02;
|
|
798
|
+
intentional?: boolean;
|
|
799
|
+
label?: string;
|
|
800
|
+
}
|
|
801
|
+
export interface EdgeEndpointV02 {
|
|
802
|
+
nodeId: string;
|
|
803
|
+
portId: string;
|
|
804
|
+
}
|
|
805
|
+
export interface EdgeSpecV02 {
|
|
806
|
+
id: string;
|
|
807
|
+
source: EdgeEndpointV02;
|
|
808
|
+
target: EdgeEndpointV02;
|
|
809
|
+
resolvedType?: string;
|
|
810
|
+
order?: number;
|
|
811
|
+
enabled?: boolean;
|
|
812
|
+
adapter?: string;
|
|
813
|
+
feedback?: FeedbackPolicyV02;
|
|
814
|
+
styleOverride?: string;
|
|
815
|
+
label?: string;
|
|
816
|
+
description?: string;
|
|
817
|
+
}
|
|
818
|
+
export interface CableStyleV02 {
|
|
819
|
+
color?: string;
|
|
820
|
+
pattern?: "solid" | "dashed" | "dotted";
|
|
821
|
+
width?: number;
|
|
822
|
+
marker?: string;
|
|
823
|
+
}
|
|
824
|
+
export type CableStyleRegistryV02 = Record<string, CableStyleV02>;
|
|
825
|
+
export interface GraphNodeV02 {
|
|
826
|
+
id: string;
|
|
827
|
+
kind: string;
|
|
828
|
+
kindVersion: string;
|
|
829
|
+
params: Record<string, unknown>;
|
|
830
|
+
ports: PortSpecV02[];
|
|
831
|
+
portGroups?: PortGroupSpecV02[];
|
|
832
|
+
}
|
|
833
|
+
export interface GraphDocumentV02 {
|
|
834
|
+
schema: "skenion.graph";
|
|
835
|
+
schemaVersion: "0.2.0";
|
|
836
|
+
id: string;
|
|
837
|
+
revision: string;
|
|
838
|
+
nodes: GraphNodeV02[];
|
|
839
|
+
edges: EdgeSpecV02[];
|
|
840
|
+
cableStyles?: CableStyleRegistryV02;
|
|
841
|
+
}
|
|
842
|
+
export interface GraphValidationDiagnosticV02 {
|
|
843
|
+
severity: "error" | "warning";
|
|
844
|
+
code: string;
|
|
845
|
+
message: string;
|
|
846
|
+
nodes?: string[];
|
|
847
|
+
edges?: string[];
|
|
848
|
+
}
|
|
849
|
+
export interface GraphCycleValidationV02 {
|
|
850
|
+
classification: CycleValidationV02;
|
|
851
|
+
nodes: string[];
|
|
852
|
+
edges: string[];
|
|
853
|
+
message: string;
|
|
854
|
+
}
|
|
855
|
+
export interface GraphValidationResultV02 {
|
|
856
|
+
ok: boolean;
|
|
857
|
+
diagnostics: GraphValidationDiagnosticV02[];
|
|
858
|
+
cycles: GraphCycleValidationV02[];
|
|
859
|
+
}
|
|
860
|
+
export interface AddNodeOperationV01 {
|
|
861
|
+
op: "addNode";
|
|
862
|
+
node: GraphNodeV01;
|
|
863
|
+
}
|
|
864
|
+
export interface RemoveNodeOperationV01 {
|
|
865
|
+
op: "removeNode";
|
|
866
|
+
nodeId: string;
|
|
867
|
+
}
|
|
868
|
+
export interface ReplaceNodeOperationV01 {
|
|
869
|
+
op: "replaceNode";
|
|
870
|
+
nodeId: string;
|
|
871
|
+
node: GraphNodeV01;
|
|
872
|
+
edgePolicy: "removeInvalidEdges";
|
|
873
|
+
}
|
|
874
|
+
export interface SetNodeParamsOperationV01 {
|
|
875
|
+
op: "setNodeParams";
|
|
876
|
+
nodeId: string;
|
|
877
|
+
params: Record<string, unknown>;
|
|
878
|
+
}
|
|
879
|
+
export interface SetNodeParamOperationV01 {
|
|
880
|
+
op: "setNodeParam";
|
|
881
|
+
nodeId: string;
|
|
882
|
+
key: string;
|
|
883
|
+
value: unknown;
|
|
884
|
+
}
|
|
885
|
+
export interface AddEdgeOperationV01 {
|
|
886
|
+
op: "addEdge";
|
|
887
|
+
edge: EdgeV01;
|
|
888
|
+
}
|
|
889
|
+
export interface RemoveEdgeOperationV01 {
|
|
890
|
+
op: "removeEdge";
|
|
891
|
+
edge: EdgeV01;
|
|
892
|
+
}
|
|
893
|
+
export interface ReplaceNodeInterfaceOperationV01 {
|
|
894
|
+
op: "replaceNodeInterface";
|
|
895
|
+
nodeId: string;
|
|
896
|
+
ports: PortV01[];
|
|
897
|
+
edgePolicy: "removeInvalidEdges";
|
|
898
|
+
}
|
|
899
|
+
export type GraphPatchOperationV01 = AddNodeOperationV01 | RemoveNodeOperationV01 | ReplaceNodeOperationV01 | SetNodeParamsOperationV01 | SetNodeParamOperationV01 | AddEdgeOperationV01 | RemoveEdgeOperationV01 | ReplaceNodeInterfaceOperationV01;
|
|
900
|
+
export interface GraphPatchV01 {
|
|
901
|
+
schema: "skenion.graph.patch";
|
|
902
|
+
schemaVersion: "0.1.0";
|
|
903
|
+
id: string;
|
|
904
|
+
baseRevision: string;
|
|
905
|
+
clientId?: string;
|
|
906
|
+
createdAt?: string;
|
|
907
|
+
description?: string;
|
|
908
|
+
ops: GraphPatchOperationV01[];
|
|
909
|
+
}
|
|
910
|
+
export type GraphPatchEventKindV01 = "apply" | "undo" | "redo";
|
|
911
|
+
export interface GraphPatchEventV01 {
|
|
912
|
+
schema: "skenion.graph.patch.event";
|
|
913
|
+
schemaVersion: "0.1.0";
|
|
914
|
+
id: string;
|
|
915
|
+
sequence: number;
|
|
916
|
+
kind: GraphPatchEventKindV01;
|
|
917
|
+
patch: GraphPatchV01;
|
|
918
|
+
inversePatch: GraphPatchV01;
|
|
919
|
+
revisionBefore: string;
|
|
920
|
+
revisionAfter: string;
|
|
921
|
+
clientId?: string;
|
|
922
|
+
description?: string;
|
|
923
|
+
subjectEventId?: string;
|
|
924
|
+
createdAt: string;
|
|
925
|
+
}
|
|
926
|
+
export interface GraphPatchHistoryV01 {
|
|
927
|
+
schema: "skenion.graph.patch.history";
|
|
928
|
+
schemaVersion: "0.1.0";
|
|
929
|
+
events: GraphPatchEventV01[];
|
|
930
|
+
canUndo: boolean;
|
|
931
|
+
canRedo: boolean;
|
|
932
|
+
undoDepth: number;
|
|
933
|
+
redoDepth: number;
|
|
934
|
+
}
|
|
935
|
+
export type ApplyGraphPatchResult = {
|
|
936
|
+
ok: true;
|
|
937
|
+
graph: GraphDocumentV01;
|
|
938
|
+
} | {
|
|
939
|
+
ok: false;
|
|
940
|
+
errors: string[];
|
|
941
|
+
};
|
|
942
|
+
export type InvertGraphPatchResult = {
|
|
943
|
+
ok: true;
|
|
944
|
+
inversePatch: GraphPatchV01;
|
|
945
|
+
} | {
|
|
946
|
+
ok: false;
|
|
947
|
+
errors: string[];
|
|
948
|
+
};
|
|
949
|
+
export type ExecutionModelV01 = "event" | "value" | "frame" | "audio_block" | "video_frame" | "gpu_pass" | "async_resource" | "script_control" | "native_plugin";
|
|
950
|
+
export interface NodeExecutionV01 {
|
|
951
|
+
model: ExecutionModelV01;
|
|
952
|
+
clock?: "frame" | "audio" | "beat" | "timecode" | "external";
|
|
953
|
+
}
|
|
954
|
+
export interface NodeStateV01 {
|
|
955
|
+
persistent: boolean;
|
|
956
|
+
}
|
|
957
|
+
export interface NodeSurfaceV01 {
|
|
958
|
+
palette?: "direct";
|
|
959
|
+
}
|
|
960
|
+
export interface NodeDefinitionManifestV01 {
|
|
961
|
+
schema: "skenion.node.definition";
|
|
962
|
+
schemaVersion: "0.1.0";
|
|
963
|
+
id: string;
|
|
964
|
+
version: string;
|
|
965
|
+
displayName: string;
|
|
966
|
+
category: string;
|
|
967
|
+
scriptApiVersion?: string;
|
|
968
|
+
bundleHash?: string;
|
|
969
|
+
surface?: NodeSurfaceV01;
|
|
970
|
+
ports: PortV01[];
|
|
971
|
+
execution: NodeExecutionV01;
|
|
972
|
+
state: NodeStateV01;
|
|
973
|
+
permissions: string[];
|
|
974
|
+
capabilities: string[];
|
|
975
|
+
}
|
|
976
|
+
export interface NodeDefinitionManifestV02 {
|
|
977
|
+
schema: "skenion.node.definition";
|
|
978
|
+
schemaVersion: "0.2.0";
|
|
979
|
+
id: string;
|
|
980
|
+
version: string;
|
|
981
|
+
displayName: string;
|
|
982
|
+
category: string;
|
|
983
|
+
scriptApiVersion?: string;
|
|
984
|
+
bundleHash?: string;
|
|
985
|
+
surface?: NodeSurfaceV01;
|
|
986
|
+
ports: PortSpecV02[];
|
|
987
|
+
portGroups?: PortGroupSpecV02[];
|
|
988
|
+
execution: NodeExecutionV01;
|
|
989
|
+
state: NodeStateV01;
|
|
990
|
+
permissions: string[];
|
|
991
|
+
capabilities: string[];
|
|
992
|
+
}
|
|
993
|
+
export type ShaderLanguageV01 = "wgsl";
|
|
994
|
+
export type ShaderUniformDataKindV01 = "number.float" | "number.int" | "number.uint" | "boolean" | "color";
|
|
995
|
+
export interface ShaderUniformV01 {
|
|
996
|
+
id: string;
|
|
997
|
+
label: string;
|
|
998
|
+
type: DataTypeV01;
|
|
999
|
+
default?: unknown;
|
|
1000
|
+
required: boolean;
|
|
1001
|
+
}
|
|
1002
|
+
export interface ShaderInterfaceV01 {
|
|
1003
|
+
schema: "skenion.shader.interface";
|
|
1004
|
+
schemaVersion: "0.1.0";
|
|
1005
|
+
language: ShaderLanguageV01;
|
|
1006
|
+
uniforms: ShaderUniformV01[];
|
|
1007
|
+
}
|
|
1008
|
+
export type ShaderDiagnosticSeverityV01 = "error" | "warning" | "info";
|
|
1009
|
+
export type ShaderDiagnosticPhaseV01 = "interface-analysis" | "source-sync" | "wgsl-generation" | "wgsl-compile" | "render-pipeline" | "render-frame";
|
|
1010
|
+
export type ShaderDiagnosticSourceV01 = "user" | "generated" | "runtime";
|
|
1011
|
+
export interface ShaderSourceSpanV01 {
|
|
1012
|
+
line?: number;
|
|
1013
|
+
column?: number;
|
|
1014
|
+
endLine?: number;
|
|
1015
|
+
endColumn?: number;
|
|
1016
|
+
}
|
|
1017
|
+
export interface ShaderDiagnosticV01 extends ShaderSourceSpanV01 {
|
|
1018
|
+
severity: ShaderDiagnosticSeverityV01;
|
|
1019
|
+
phase: ShaderDiagnosticPhaseV01;
|
|
1020
|
+
code: string;
|
|
1021
|
+
message: string;
|
|
1022
|
+
uniformId?: string;
|
|
1023
|
+
source: ShaderDiagnosticSourceV01;
|
|
1024
|
+
}
|
|
1025
|
+
export type ShaderInterfaceDiagnosticV01 = ShaderDiagnosticV01;
|
|
1026
|
+
export interface GeneratedShaderSourceMapV01 {
|
|
1027
|
+
userSourceStartLine: number;
|
|
1028
|
+
generatedLineOffset: number;
|
|
1029
|
+
}
|
|
1030
|
+
export interface ShaderInterfaceAnalysisV01 {
|
|
1031
|
+
ok: boolean;
|
|
1032
|
+
shaderInterface: ShaderInterfaceV01;
|
|
1033
|
+
diagnostics: ShaderInterfaceDiagnosticV01[];
|
|
1034
|
+
}
|
|
1035
|
+
export type ControlAtomV01 = {
|
|
1036
|
+
type: "float";
|
|
1037
|
+
representation: FloatRepresentationV01;
|
|
1038
|
+
value: number;
|
|
1039
|
+
} | {
|
|
1040
|
+
type: "int";
|
|
1041
|
+
representation: IntRepresentationV01;
|
|
1042
|
+
value: number;
|
|
1043
|
+
} | {
|
|
1044
|
+
type: "uint";
|
|
1045
|
+
representation: UintRepresentationV01;
|
|
1046
|
+
value: number;
|
|
1047
|
+
} | {
|
|
1048
|
+
type: "bool";
|
|
1049
|
+
value: boolean;
|
|
1050
|
+
} | {
|
|
1051
|
+
type: "string";
|
|
1052
|
+
value: string;
|
|
1053
|
+
} | {
|
|
1054
|
+
type: "color";
|
|
1055
|
+
representation: ColorRepresentationV01;
|
|
1056
|
+
colorSpace?: "linear" | "srgb";
|
|
1057
|
+
value: [number, number, number, number];
|
|
1058
|
+
};
|
|
1059
|
+
export interface ControlMessageV01 {
|
|
1060
|
+
selector: string;
|
|
1061
|
+
atoms: ControlAtomV01[];
|
|
1062
|
+
}
|
|
1063
|
+
export type ObjectTextAtomV01 = {
|
|
1064
|
+
type: "float";
|
|
1065
|
+
value: number;
|
|
1066
|
+
representation?: string;
|
|
1067
|
+
} | {
|
|
1068
|
+
type: "int";
|
|
1069
|
+
value: number;
|
|
1070
|
+
representation?: string;
|
|
1071
|
+
} | {
|
|
1072
|
+
type: "uint";
|
|
1073
|
+
value: number;
|
|
1074
|
+
representation?: string;
|
|
1075
|
+
} | {
|
|
1076
|
+
type: "bool";
|
|
1077
|
+
value: boolean;
|
|
1078
|
+
} | {
|
|
1079
|
+
type: "symbol";
|
|
1080
|
+
value: string;
|
|
1081
|
+
} | {
|
|
1082
|
+
type: "string";
|
|
1083
|
+
value: string;
|
|
1084
|
+
};
|
|
1085
|
+
export interface ObjectTextPortV01 {
|
|
1086
|
+
id: string;
|
|
1087
|
+
direction: PortDirection;
|
|
1088
|
+
type: string;
|
|
1089
|
+
rate?: PortRateV02;
|
|
1090
|
+
activation?: "trigger" | "latched" | "passive";
|
|
1091
|
+
defaultValue?: unknown;
|
|
1092
|
+
description?: string;
|
|
1093
|
+
}
|
|
1094
|
+
export interface ObjectTextDiagnosticV01 {
|
|
1095
|
+
severity: "error" | "warning" | "info";
|
|
1096
|
+
code: string;
|
|
1097
|
+
message: string;
|
|
1098
|
+
}
|
|
1099
|
+
export interface ObjectTextParseResultV01 {
|
|
1100
|
+
schema: "skenion.object-text.parse-result";
|
|
1101
|
+
schemaVersion: "0.1.0";
|
|
1102
|
+
input: string;
|
|
1103
|
+
ok: boolean;
|
|
1104
|
+
classSymbol: string;
|
|
1105
|
+
creationArgs: ObjectTextAtomV01[];
|
|
1106
|
+
resolvedKind: string | null;
|
|
1107
|
+
resolvedKindVersion: string | null;
|
|
1108
|
+
params: Record<string, unknown>;
|
|
1109
|
+
instancePorts: ObjectTextPortV01[];
|
|
1110
|
+
displayText: string;
|
|
1111
|
+
diagnostics: ObjectTextDiagnosticV01[];
|
|
1112
|
+
}
|
|
1113
|
+
export interface ValidationSuccess<T> {
|
|
1114
|
+
ok: true;
|
|
1115
|
+
value: T;
|
|
1116
|
+
}
|
|
1117
|
+
export interface ValidationFailure {
|
|
1118
|
+
ok: false;
|
|
1119
|
+
errors: string[];
|
|
1120
|
+
}
|
|
1121
|
+
export type ValidationResult<T> = ValidationSuccess<T> | ValidationFailure;
|
|
1122
|
+
//# sourceMappingURL=types.d.ts.map
|