foldkit 0.152.0 → 0.153.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/dist/asyncData/asyncData.d.ts.map +1 -1
- package/dist/asyncData/asyncData.js +10 -7
- package/dist/canvas/shape.d.ts.map +1 -1
- package/dist/canvas/shape.js +11 -11
- package/dist/command/interruptible/interruptible.d.ts +12 -23
- package/dist/command/interruptible/interruptible.d.ts.map +1 -1
- package/dist/command/interruptible/interruptible.js +12 -16
- package/dist/command/interruptible/public.d.ts +1 -1
- package/dist/command/interruptible/public.d.ts.map +1 -1
- package/dist/command/interruptible/public.js +1 -1
- package/dist/devTools/protocol.d.ts +391 -527
- package/dist/devTools/protocol.d.ts.map +1 -1
- package/dist/devTools/protocol.js +96 -192
- package/dist/devTools/public.d.ts +1 -1
- package/dist/devTools/public.d.ts.map +1 -1
- package/dist/devTools/public.js +1 -1
- package/dist/devTools/summarize.d.ts +19 -25
- package/dist/devTools/summarize.d.ts.map +1 -1
- package/dist/devTools/summarize.js +19 -24
- package/dist/devTools/webSocketBridge.d.ts +1 -1
- package/dist/devTools/webSocketBridge.d.ts.map +1 -1
- package/dist/devTools/webSocketBridge.js +45 -41
- package/dist/navigation/index.d.ts +1 -1
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/navigation/public.d.ts +1 -1
- package/dist/navigation/public.d.ts.map +1 -1
- package/dist/navigation/public.js +1 -1
- package/dist/navigation/urlRequest.d.ts +15 -31
- package/dist/navigation/urlRequest.d.ts.map +1 -1
- package/dist/navigation/urlRequest.js +5 -10
- package/dist/route/index.d.ts +2 -1
- package/dist/route/index.d.ts.map +1 -1
- package/dist/route/index.js +1 -1
- package/dist/route/public.d.ts +2 -2
- package/dist/route/public.d.ts.map +1 -1
- package/dist/route/public.js +1 -1
- package/dist/runtime/browserListeners.d.ts.map +1 -1
- package/dist/runtime/browserListeners.js +3 -3
- package/dist/schema/index.d.ts +140 -49
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +132 -31
- package/dist/schema/public.d.ts +2 -2
- package/dist/schema/public.d.ts.map +1 -1
- package/dist/schema/public.js +1 -1
- package/dist/test/apps/contextMenu.d.ts +10 -7
- package/dist/test/apps/contextMenu.d.ts.map +1 -1
- package/dist/test/apps/contextMenu.js +6 -7
- package/dist/test/apps/formChild.d.ts +0 -16
- package/dist/test/apps/formChild.d.ts.map +1 -1
- package/dist/test/apps/formChild.js +0 -3
- package/dist/test/apps/uploads.d.ts +4 -1
- package/dist/test/apps/uploads.d.ts.map +1 -1
- package/dist/test/scene.d.ts +1 -1
- package/dist/test/scene.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -53,159 +53,59 @@ export declare const RuntimeInfo: S.Struct<{
|
|
|
53
53
|
}>;
|
|
54
54
|
/** Metadata about a connected browser runtime. */
|
|
55
55
|
export type RuntimeInfo = typeof RuntimeInfo.Type;
|
|
56
|
-
/** Request the current Model snapshot, optionally narrowed to a path and/or expanded. */
|
|
57
|
-
export declare const RequestGetModel: import("../schema/index.js").CallableTaggedStruct<"RequestGetModel", {
|
|
58
|
-
maybePath: S.OptionFromNullOr<S.String>;
|
|
59
|
-
expand: S.Boolean;
|
|
60
|
-
}>;
|
|
61
|
-
/** Request a historical Model snapshot at an absolute history index, optionally narrowed to a path and/or expanded. Use `index: -1` for the initial Model. */
|
|
62
|
-
export declare const RequestGetModelAt: import("../schema/index.js").CallableTaggedStruct<"RequestGetModelAt", {
|
|
63
|
-
index: S.Number;
|
|
64
|
-
maybePath: S.OptionFromNullOr<S.String>;
|
|
65
|
-
expand: S.Boolean;
|
|
66
|
-
}>;
|
|
67
|
-
/** Request recent history entries. `maybeSinceIndex` starts the page at an absolute index; `fromEnd` returns the final entries instead (the two are mutually exclusive). `maybeChangedPathsMatch` filters entries server-side to those whose `changedPaths` match at least one dot-string pattern: segments compare pairwise for the length of the shorter list and `*` matches any single segment, so `root.grid` matches changes anywhere inside the grid subtree and `root.grid.5.3` also matches a wholesale replacement recorded at `root.grid`. The two newer fields decode with defaults when absent, so requests from an older MCP server keep working against a newer runtime. */
|
|
68
|
-
export declare const RequestListMessages: import("../schema/index.js").CallableTaggedStruct<"RequestListMessages", {
|
|
69
|
-
limit: S.Number;
|
|
70
|
-
maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
71
|
-
maybeChangedPathsMatch: S.withDecodingDefault<S.OptionFromNullOr<S.$Array<S.String>>, never>;
|
|
72
|
-
fromEnd: S.withDecodingDefault<S.Boolean, never>;
|
|
73
|
-
}>;
|
|
74
|
-
/** Request a histogram of retained history entries by Message tag. Accepts the same `maybeSinceIndex` / `maybeChangedPathsMatch` filters as `RequestListMessages` but returns only counts, so the response stays small regardless of history size. */
|
|
75
|
-
export declare const RequestCountMessagesByTag: import("../schema/index.js").CallableTaggedStruct<"RequestCountMessagesByTag", {
|
|
76
|
-
maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
77
|
-
maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
78
|
-
}>;
|
|
79
|
-
/** Request a path-level diff between the Models at two absolute history indices. Each index follows `RequestGetModelAt` semantics (the Model right after that entry was applied; -1 is the initial Model). `maybeChangedPathsMatch` narrows the reported changes with the same pattern semantics as `RequestListMessages`. */
|
|
80
|
-
export declare const RequestDiffModels: import("../schema/index.js").CallableTaggedStruct<"RequestDiffModels", {
|
|
81
|
-
fromIndex: S.Number;
|
|
82
|
-
toIndex: S.Number;
|
|
83
|
-
maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
84
|
-
}>;
|
|
85
|
-
/** Request a single history entry by index. To inspect the Model around the entry, call `RequestGetModelAt` with `index - 1` (before) and `index` (after). */
|
|
86
|
-
export declare const RequestGetMessage: import("../schema/index.js").CallableTaggedStruct<"RequestGetMessage", {
|
|
87
|
-
index: S.Number;
|
|
88
|
-
}>;
|
|
89
|
-
/** Request the list of available keyframes. */
|
|
90
|
-
export declare const RequestListKeyframes: import("../schema/index.js").CallableTaggedStruct<"RequestListKeyframes", {}>;
|
|
91
|
-
/** Request the runtime jump to a specific keyframe. The runtime is paused on success; resume via RequestResume. */
|
|
92
|
-
export declare const RequestReplayToKeyframe: import("../schema/index.js").CallableTaggedStruct<"RequestReplayToKeyframe", {
|
|
93
|
-
keyframeIndex: S.Number;
|
|
94
|
-
}>;
|
|
95
|
-
/** Request the runtime resume normal execution from a paused state. */
|
|
96
|
-
export declare const RequestResume: import("../schema/index.js").CallableTaggedStruct<"RequestResume", {}>;
|
|
97
|
-
/** Request the recorded init data: the initial Model and the names of Commands returned from `init`. */
|
|
98
|
-
export declare const RequestGetInit: import("../schema/index.js").CallableTaggedStruct<"RequestGetInit", {}>;
|
|
99
|
-
/** Request a snapshot of the runtime's DevTools state: history bounds, current paused/live status, and whether init is recorded. */
|
|
100
|
-
export declare const RequestGetRuntimeState: import("../schema/index.js").CallableTaggedStruct<"RequestGetRuntimeState", {}>;
|
|
101
|
-
/** Request the runtime dispatch a Message at the current state. The payload is opaque to the protocol; the runtime validates against the app's Message Schema. */
|
|
102
|
-
export declare const RequestDispatchMessage: import("../schema/index.js").CallableTaggedStruct<"RequestDispatchMessage", {
|
|
103
|
-
message: S.Unknown;
|
|
104
|
-
}>;
|
|
105
56
|
/** The largest batch `RequestDispatchMessages` accepts. Matches the DevTools store's default history size, so a batch cannot evict its own earliest entries before the caller reads them back. The runtime rejects a larger batch with `ResponseError`, and MCP clients reject it earlier still, at their own input boundary. */
|
|
106
57
|
export declare const MAX_DISPATCH_BATCH_SIZE = 100;
|
|
107
|
-
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export declare const RequestListRuntimes: import("../schema/index.js").CallableTaggedStruct<"RequestListRuntimes", {}>;
|
|
117
|
-
/** A request from the MCP server. RequestListRuntimes is handled at the Vite plugin layer; all other requests are routed to a browser runtime. */
|
|
118
|
-
export declare const Request: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"RequestGetModel", {
|
|
119
|
-
maybePath: S.OptionFromNullOr<S.String>;
|
|
120
|
-
expand: S.Boolean;
|
|
121
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetModelAt", {
|
|
122
|
-
index: S.Number;
|
|
123
|
-
maybePath: S.OptionFromNullOr<S.String>;
|
|
124
|
-
expand: S.Boolean;
|
|
125
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestListMessages", {
|
|
126
|
-
limit: S.Number;
|
|
127
|
-
maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
128
|
-
maybeChangedPathsMatch: S.withDecodingDefault<S.OptionFromNullOr<S.$Array<S.String>>, never>;
|
|
129
|
-
fromEnd: S.withDecodingDefault<S.Boolean, never>;
|
|
130
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestCountMessagesByTag", {
|
|
131
|
-
maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
132
|
-
maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
133
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestDiffModels", {
|
|
134
|
-
fromIndex: S.Number;
|
|
135
|
-
toIndex: S.Number;
|
|
136
|
-
maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
137
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetMessage", {
|
|
138
|
-
index: S.Number;
|
|
139
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestListKeyframes", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestReplayToKeyframe", {
|
|
140
|
-
keyframeIndex: S.Number;
|
|
141
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestResume", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestDispatchMessage", {
|
|
142
|
-
message: S.Unknown;
|
|
143
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestDispatchMessages", {
|
|
144
|
-
messages: S.$Array<S.Unknown>;
|
|
145
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestListRuntimes", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetInit", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetRuntimeState", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetMessageSchema", {
|
|
146
|
-
maybeVariantTag: S.OptionFromNullOr<S.String>;
|
|
147
|
-
}>]>;
|
|
148
|
-
/** A request from the MCP server. */
|
|
149
|
-
export type Request = typeof Request.Type;
|
|
150
|
-
/** Response carrying a Model snapshot. The `value` is the resolved subtree at `atPath` (or the whole Model when no path was supplied). When `summarized` is true, large arrays/records/strings have been collapsed to `_summary` placeholders to keep payloads small for AI agents; pass `expand: true` on the Request to receive the literal value. */
|
|
151
|
-
export declare const ResponseModel: import("../schema/index.js").CallableTaggedStruct<"ResponseModel", {
|
|
152
|
-
value: S.Unknown;
|
|
153
|
-
atPath: S.String;
|
|
154
|
-
summarized: S.Boolean;
|
|
155
|
-
}>;
|
|
156
|
-
/** Response carrying a page of history entries. For forward reads, `maybeNextIndex` is `Some` of the absolute index of the next entry matching the request's filters (pass it as `RequestListMessages.maybeSinceIndex` to fetch the next page) and `None` when the page reaches the end of matching history. Tail reads (`fromEnd`) always carry `None`. */
|
|
157
|
-
export declare const ResponseMessages: import("../schema/index.js").CallableTaggedStruct<"ResponseMessages", {
|
|
158
|
-
entries: S.$Array<S.Struct<{
|
|
58
|
+
/** A request from the MCP server. The Vite plugin handles
|
|
59
|
+
* `Request.RequestListRuntimes`; it forwards every other request to a browser
|
|
60
|
+
* runtime. */
|
|
61
|
+
export declare const Request: import("../schema/index.js").TaggedUnion<{
|
|
62
|
+
readonly RequestGetModel: {
|
|
63
|
+
readonly maybePath: S.OptionFromNullOr<S.String>;
|
|
64
|
+
readonly expand: S.Boolean;
|
|
65
|
+
};
|
|
66
|
+
readonly RequestGetModelAt: {
|
|
159
67
|
readonly index: S.Number;
|
|
160
|
-
readonly
|
|
161
|
-
readonly
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
readonly
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
readonly
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
readonly
|
|
175
|
-
readonly
|
|
176
|
-
readonly
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
180
|
-
}>>;
|
|
181
|
-
maybeNextIndex: S.OptionFromNullOr<S.Number>;
|
|
182
|
-
}>;
|
|
183
|
-
/** Response carrying a single history entry. Model snapshots are not included; use `RequestGetModelAt` with `index - 1` and `index` to inspect Model state around the entry. */
|
|
184
|
-
export declare const ResponseMessage: import("../schema/index.js").CallableTaggedStruct<"ResponseMessage", {
|
|
185
|
-
entry: S.Struct<{
|
|
68
|
+
readonly maybePath: S.OptionFromNullOr<S.String>;
|
|
69
|
+
readonly expand: S.Boolean;
|
|
70
|
+
};
|
|
71
|
+
readonly RequestListMessages: {
|
|
72
|
+
readonly limit: S.Number;
|
|
73
|
+
readonly maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
74
|
+
readonly maybeChangedPathsMatch: S.withDecodingDefault<S.OptionFromNullOr<S.$Array<S.String>>, never>;
|
|
75
|
+
readonly fromEnd: S.withDecodingDefault<S.Boolean, never>;
|
|
76
|
+
};
|
|
77
|
+
readonly RequestCountMessagesByTag: {
|
|
78
|
+
readonly maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
79
|
+
readonly maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
80
|
+
};
|
|
81
|
+
readonly RequestDiffModels: {
|
|
82
|
+
readonly fromIndex: S.Number;
|
|
83
|
+
readonly toIndex: S.Number;
|
|
84
|
+
readonly maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
85
|
+
};
|
|
86
|
+
readonly RequestGetMessage: {
|
|
186
87
|
readonly index: S.Number;
|
|
187
|
-
|
|
88
|
+
};
|
|
89
|
+
readonly RequestListKeyframes: {};
|
|
90
|
+
readonly RequestReplayToKeyframe: {
|
|
91
|
+
readonly keyframeIndex: S.Number;
|
|
92
|
+
};
|
|
93
|
+
readonly RequestResume: {};
|
|
94
|
+
readonly RequestDispatchMessage: {
|
|
188
95
|
readonly message: S.Unknown;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
readonly
|
|
198
|
-
|
|
199
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
200
|
-
}>>;
|
|
201
|
-
readonly timestamp: S.Number;
|
|
202
|
-
readonly isModelChanged: S.Boolean;
|
|
203
|
-
readonly changedPaths: S.$Array<S.String>;
|
|
204
|
-
readonly affectedPaths: S.$Array<S.String>;
|
|
205
|
-
readonly submodelPath: S.$Array<S.String>;
|
|
206
|
-
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
207
|
-
}>;
|
|
96
|
+
};
|
|
97
|
+
readonly RequestDispatchMessages: {
|
|
98
|
+
readonly messages: S.$Array<S.Unknown>;
|
|
99
|
+
};
|
|
100
|
+
readonly RequestListRuntimes: {};
|
|
101
|
+
readonly RequestGetInit: {};
|
|
102
|
+
readonly RequestGetRuntimeState: {};
|
|
103
|
+
readonly RequestGetMessageSchema: {
|
|
104
|
+
readonly maybeVariantTag: S.OptionFromNullOr<S.String>;
|
|
105
|
+
};
|
|
208
106
|
}>;
|
|
107
|
+
/** A request from the MCP server. */
|
|
108
|
+
export type Request = typeof Request.Type;
|
|
209
109
|
/** One row of a Message-tag histogram. */
|
|
210
110
|
export declare const MessageTagCount: S.Struct<{
|
|
211
111
|
readonly tag: S.String;
|
|
@@ -213,74 +113,35 @@ export declare const MessageTagCount: S.Struct<{
|
|
|
213
113
|
}>;
|
|
214
114
|
/** One row of a Message-tag histogram. */
|
|
215
115
|
export type MessageTagCount = typeof MessageTagCount.Type;
|
|
216
|
-
/**
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
scannedToIndex: S.Number;
|
|
225
|
-
}>;
|
|
226
|
-
/** The value on one side of a Model diff path: `Present` carries the summarized value; `Absent` means the path does not exist on that side (an added or removed key or element). The tagged shape is deliberate: a nullable encoding could not distinguish an absent path from a path whose value is literally `null`. `undefined`, which JSON cannot represent, is reported as `null`. */
|
|
227
|
-
export declare const DiffValueAbsent: import("../schema/index.js").CallableTaggedStruct<"Absent", {}>;
|
|
228
|
-
/** The value on one side of a Model diff path. See `DiffValue`. */
|
|
229
|
-
export declare const DiffValuePresent: import("../schema/index.js").CallableTaggedStruct<"Present", {
|
|
230
|
-
value: S.Unknown;
|
|
116
|
+
/** The value on one side of a Model diff. `DiffValue.Present` carries the
|
|
117
|
+
* value. `DiffValue.Absent` means the path does not exist on that side, which
|
|
118
|
+
* keeps a missing path distinct from a path whose value is `null`. */
|
|
119
|
+
export declare const DiffValue: import("../schema/index.js").TaggedUnion<{
|
|
120
|
+
readonly Absent: {};
|
|
121
|
+
readonly Present: {
|
|
122
|
+
readonly value: S.Unknown;
|
|
123
|
+
};
|
|
231
124
|
}>;
|
|
232
125
|
/** The value on one side of a Model diff path. */
|
|
233
|
-
export declare const DiffValue: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"Absent", {}>, import("../schema/index.js").CallableTaggedStruct<"Present", {
|
|
234
|
-
value: S.Unknown;
|
|
235
|
-
}>]>;
|
|
236
|
-
/** The value on one side of a Model diff path. */
|
|
237
126
|
export type DiffValue = typeof DiffValue.Type;
|
|
238
127
|
/** One changed path in a Model diff. `before` is the value at `fromIndex`, `after` the value at `toIndex`. */
|
|
239
128
|
export declare const ModelDiffChange: S.Struct<{
|
|
240
129
|
readonly path: S.String;
|
|
241
|
-
readonly before:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
130
|
+
readonly before: import("../schema/index.js").TaggedUnion<{
|
|
131
|
+
readonly Absent: {};
|
|
132
|
+
readonly Present: {
|
|
133
|
+
readonly value: S.Unknown;
|
|
134
|
+
};
|
|
135
|
+
}>;
|
|
136
|
+
readonly after: import("../schema/index.js").TaggedUnion<{
|
|
137
|
+
readonly Absent: {};
|
|
138
|
+
readonly Present: {
|
|
139
|
+
readonly value: S.Unknown;
|
|
140
|
+
};
|
|
141
|
+
}>;
|
|
247
142
|
}>;
|
|
248
143
|
/** One changed path in a Model diff. */
|
|
249
144
|
export type ModelDiffChange = typeof ModelDiffChange.Type;
|
|
250
|
-
/** Response carrying a path-level Model diff between two history indices. Changes list the leaf paths where the Models differ, sorted by path with numeric segments in numeric order; values are summarized with the same rules `ResponseModel` applies when `expand` is false. */
|
|
251
|
-
export declare const ResponseModelDiff: import("../schema/index.js").CallableTaggedStruct<"ResponseModelDiff", {
|
|
252
|
-
fromIndex: S.Number;
|
|
253
|
-
toIndex: S.Number;
|
|
254
|
-
changes: S.$Array<S.Struct<{
|
|
255
|
-
readonly path: S.String;
|
|
256
|
-
readonly before: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"Absent", {}>, import("../schema/index.js").CallableTaggedStruct<"Present", {
|
|
257
|
-
value: S.Unknown;
|
|
258
|
-
}>]>;
|
|
259
|
-
readonly after: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"Absent", {}>, import("../schema/index.js").CallableTaggedStruct<"Present", {
|
|
260
|
-
value: S.Unknown;
|
|
261
|
-
}>]>;
|
|
262
|
-
}>>;
|
|
263
|
-
}>;
|
|
264
|
-
/** Response carrying the list of available keyframes. */
|
|
265
|
-
export declare const ResponseKeyframes: import("../schema/index.js").CallableTaggedStruct<"ResponseKeyframes", {
|
|
266
|
-
keyframes: S.$Array<S.Struct<{
|
|
267
|
-
readonly index: S.Number;
|
|
268
|
-
}>>;
|
|
269
|
-
}>;
|
|
270
|
-
/** Response confirming a successful replay. The runtime is paused at this Model. */
|
|
271
|
-
export declare const ResponseReplayed: import("../schema/index.js").CallableTaggedStruct<"ResponseReplayed", {
|
|
272
|
-
model: S.Unknown;
|
|
273
|
-
}>;
|
|
274
|
-
/** Response confirming the runtime resumed normal execution. */
|
|
275
|
-
export declare const ResponseResumed: import("../schema/index.js").CallableTaggedStruct<"ResponseResumed", {}>;
|
|
276
|
-
/** Response confirming a Message was dispatched. The `acceptedAtIndex` is the absolute history index where the entry is predicted to land. Computed from the runtime's history length at dispatch time. The runtime processes Messages in arrival order, so the index is reliable whenever the bridge is the only Message source, but the app produces its own Messages too (user input, Subscription emissions, Command results); one recorded between the snapshot and the dispatch shifts the entry past this index. Messages excluded from history via `excludeFromHistory` still drive `update` but are never recorded, so no entry lands at the predicted index for them, and a Message dispatched into a crashed or disposed runtime is dropped without recording anything. */
|
|
277
|
-
export declare const ResponseDispatched: import("../schema/index.js").CallableTaggedStruct<"ResponseDispatched", {
|
|
278
|
-
acceptedAtIndex: S.Number;
|
|
279
|
-
}>;
|
|
280
|
-
/** Response confirming a batch dispatch. `acceptedAtIndices` aligns with the request's `messages` order; each value is the absolute history index where that entry is predicted to land, computed from one history snapshot at dispatch time with the same caveats as `ResponseDispatched.acceptedAtIndex`. An `excludeFromHistory` Message inside the batch records no entry, so entries after it land below their predicted index. */
|
|
281
|
-
export declare const ResponseDispatchedBatch: import("../schema/index.js").CallableTaggedStruct<"ResponseDispatchedBatch", {
|
|
282
|
-
acceptedAtIndices: S.$Array<S.Number>;
|
|
283
|
-
}>;
|
|
284
145
|
/** One variant entry in a `MessageSchemaIndex`. `payloadFields` lists the variant's payload property names (excluding `_tag`); `unionFields` lists the subset of those properties whose schemas are themselves `_tag`-discriminated unions. A Submodel-wrapper variant always shows up with `unionFields: ['message']`, but the same flag also catches plain tagged-union value types like `UrlRequest = Internal | External`. Either way, the agent will need to pick a variant when filling these fields. */
|
|
285
146
|
export declare const MessageSchemaIndexEntry: S.Struct<{
|
|
286
147
|
readonly tag: S.String;
|
|
@@ -299,274 +160,33 @@ export declare const MessageSchemaIndex: S.Struct<{
|
|
|
299
160
|
}>;
|
|
300
161
|
/** A flat directory of every top-level Message variant. */
|
|
301
162
|
export type MessageSchemaIndex = typeof MessageSchemaIndex.Type;
|
|
302
|
-
/** The result
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
readonly payloadFields: S.$Array<S.String>;
|
|
308
|
-
readonly unionFields: S.$Array<S.String>;
|
|
309
|
-
}>>;
|
|
310
|
-
}>;
|
|
311
|
-
}>;
|
|
312
|
-
/** A JSON Schema document carrying a single variant of the runtime's Message union, plus the original `definitions` block so any `$ref`s the variant carries still resolve. */
|
|
313
|
-
export declare const MessageSchemaDocumentResult: import("../schema/index.js").CallableTaggedStruct<"MessageSchemaDocumentResult", {
|
|
314
|
-
document: S.Unknown;
|
|
315
|
-
}>;
|
|
316
|
-
declare const MessageSchemaResult: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"MessageSchemaIndexResult", {
|
|
317
|
-
index: S.Struct<{
|
|
318
|
-
readonly variants: S.$Array<S.Struct<{
|
|
319
|
-
readonly tag: S.String;
|
|
320
|
-
readonly payloadFields: S.$Array<S.String>;
|
|
321
|
-
readonly unionFields: S.$Array<S.String>;
|
|
322
|
-
}>>;
|
|
323
|
-
}>;
|
|
324
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"MessageSchemaDocumentResult", {
|
|
325
|
-
document: S.Unknown;
|
|
326
|
-
}>]>;
|
|
327
|
-
/** The result payload carried by `ResponseMessageSchema`. */
|
|
328
|
-
export type MessageSchemaResult = typeof MessageSchemaResult.Type;
|
|
329
|
-
/** Response describing the app's Message Schema. `maybeResult` is `Some(MessageSchemaIndexResult)` for index requests, `Some(MessageSchemaDocumentResult)` for variant-narrowed requests, and `None` when the runtime has not configured `DevToolsConfig.Message` or when JSON Schema derivation failed. Variant tags appear as `_tag` enums in the document, nested Submodel Messages recurse correctly, and `S.Option` fields render as `anyOf: [{_tag: 'Some', value}, {_tag: 'None'}]`. Apps using `S.OptionFromNullishOr(T)` (the Foldkit-canonical option codec for shapes that cross a JSON boundary) instead see the field as nullable `anyOf: [T, null]`; agents dispatching against that shape send either the bare value or `null`, not a tagged `Some`/`None` envelope. Fields with no JSON representation, such as `S.instanceOf(File)`, render as `{ type: 'null' }` rather than throwing; those variants cannot be dispatched via the bridge because their values live in browser memory. A few AST nodes (symbol-keyed structs, symbol-indexed records, tuples with post-rest elements) still cause the derivation to throw; the bridge guards the call and returns `None` in that case while logging a warning to the dev console. */
|
|
330
|
-
export declare const ResponseMessageSchema: import("../schema/index.js").CallableTaggedStruct<"ResponseMessageSchema", {
|
|
331
|
-
maybeResult: S.OptionFromNullOr<S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"MessageSchemaIndexResult", {
|
|
332
|
-
index: S.Struct<{
|
|
163
|
+
/** The result of requesting the app's Message Schema. It is either a compact
|
|
164
|
+
* index of Message variants or the JSON Schema document for one variant. */
|
|
165
|
+
export declare const MessageSchemaResult: import("../schema/index.js").TaggedUnion<{
|
|
166
|
+
readonly MessageSchemaIndexResult: {
|
|
167
|
+
readonly index: S.Struct<{
|
|
333
168
|
readonly variants: S.$Array<S.Struct<{
|
|
334
169
|
readonly tag: S.String;
|
|
335
170
|
readonly payloadFields: S.$Array<S.String>;
|
|
336
171
|
readonly unionFields: S.$Array<S.String>;
|
|
337
172
|
}>>;
|
|
338
173
|
}>;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
/** Response carrying the list of connected runtimes. */
|
|
344
|
-
export declare const ResponseRuntimes: import("../schema/index.js").CallableTaggedStruct<"ResponseRuntimes", {
|
|
345
|
-
runtimes: S.$Array<S.Struct<{
|
|
346
|
-
readonly connectionId: S.String;
|
|
347
|
-
readonly url: S.String;
|
|
348
|
-
readonly title: S.String;
|
|
349
|
-
}>>;
|
|
350
|
-
}>;
|
|
351
|
-
/** Response carrying the recorded init data. `maybeModel` is `None` until the runtime has finished its first render and recorded init; once set it stays set for the rest of the runtime's life. `commands` lists the Commands returned from the application's `init` function in the order they were produced, with their args when declared. `mountStarts` lists the Mounts that fired during the initial render, with their args when declared. */
|
|
352
|
-
export declare const ResponseInit: import("../schema/index.js").CallableTaggedStruct<"ResponseInit", {
|
|
353
|
-
maybeModel: S.OptionFromNullOr<S.Unknown>;
|
|
354
|
-
commands: S.$Array<S.Struct<{
|
|
355
|
-
readonly name: S.String;
|
|
356
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
357
|
-
}>>;
|
|
358
|
-
mountStarts: S.$Array<S.Struct<{
|
|
359
|
-
readonly name: S.String;
|
|
360
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
361
|
-
}>>;
|
|
362
|
-
}>;
|
|
363
|
-
/** Response carrying a snapshot of the runtime's DevTools state. `currentIndex` is the absolute index of the most recently recorded Message, or -1 when no Messages have been recorded yet. `startIndex` is the earliest absolute index still retained in the rolling buffer (older entries are evicted past `maxEntries`). `totalEntries` is the number of retained entries. `isPaused` is true while the runtime is paused at a replayed snapshot; `maybePausedAtIndex` is `Some(index)` then and `None` otherwise. `hasInitModel` is true once the runtime has finished initialising. */
|
|
364
|
-
export declare const ResponseRuntimeState: import("../schema/index.js").CallableTaggedStruct<"ResponseRuntimeState", {
|
|
365
|
-
currentIndex: S.Number;
|
|
366
|
-
startIndex: S.Number;
|
|
367
|
-
totalEntries: S.Number;
|
|
368
|
-
isPaused: S.Boolean;
|
|
369
|
-
maybePausedAtIndex: S.OptionFromNullOr<S.Number>;
|
|
370
|
-
hasInitModel: S.Boolean;
|
|
371
|
-
}>;
|
|
372
|
-
/** Response carrying an error reason for a failed Request. */
|
|
373
|
-
export declare const ResponseError: import("../schema/index.js").CallableTaggedStruct<"ResponseError", {
|
|
374
|
-
reason: S.String;
|
|
174
|
+
};
|
|
175
|
+
readonly MessageSchemaDocumentResult: {
|
|
176
|
+
readonly document: S.Unknown;
|
|
177
|
+
};
|
|
375
178
|
}>;
|
|
179
|
+
/** The result of requesting the app's Message Schema. */
|
|
180
|
+
export type MessageSchemaResult = typeof MessageSchemaResult.Type;
|
|
376
181
|
/** A response replying to a Request. */
|
|
377
|
-
export declare const Response:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
readonly
|
|
385
|
-
readonly message: S.Unknown;
|
|
386
|
-
readonly commands: S.$Array<S.Struct<{
|
|
387
|
-
readonly name: S.String;
|
|
388
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
389
|
-
}>>;
|
|
390
|
-
readonly mountStarts: S.$Array<S.Struct<{
|
|
391
|
-
readonly name: S.String;
|
|
392
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
393
|
-
}>>;
|
|
394
|
-
readonly mountEnds: S.$Array<S.Struct<{
|
|
395
|
-
readonly name: S.String;
|
|
396
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
397
|
-
}>>;
|
|
398
|
-
readonly timestamp: S.Number;
|
|
399
|
-
readonly isModelChanged: S.Boolean;
|
|
400
|
-
readonly changedPaths: S.$Array<S.String>;
|
|
401
|
-
readonly affectedPaths: S.$Array<S.String>;
|
|
402
|
-
readonly submodelPath: S.$Array<S.String>;
|
|
403
|
-
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
404
|
-
}>>;
|
|
405
|
-
maybeNextIndex: S.OptionFromNullOr<S.Number>;
|
|
406
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseMessage", {
|
|
407
|
-
entry: S.Struct<{
|
|
408
|
-
readonly index: S.Number;
|
|
409
|
-
readonly tag: S.String;
|
|
410
|
-
readonly message: S.Unknown;
|
|
411
|
-
readonly commands: S.$Array<S.Struct<{
|
|
412
|
-
readonly name: S.String;
|
|
413
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
414
|
-
}>>;
|
|
415
|
-
readonly mountStarts: S.$Array<S.Struct<{
|
|
416
|
-
readonly name: S.String;
|
|
417
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
418
|
-
}>>;
|
|
419
|
-
readonly mountEnds: S.$Array<S.Struct<{
|
|
420
|
-
readonly name: S.String;
|
|
421
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
422
|
-
}>>;
|
|
423
|
-
readonly timestamp: S.Number;
|
|
424
|
-
readonly isModelChanged: S.Boolean;
|
|
425
|
-
readonly changedPaths: S.$Array<S.String>;
|
|
426
|
-
readonly affectedPaths: S.$Array<S.String>;
|
|
427
|
-
readonly submodelPath: S.$Array<S.String>;
|
|
428
|
-
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
429
|
-
}>;
|
|
430
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseMessageCounts", {
|
|
431
|
-
counts: S.$Array<S.Struct<{
|
|
432
|
-
readonly tag: S.String;
|
|
433
|
-
readonly count: S.Number;
|
|
434
|
-
}>>;
|
|
435
|
-
totalCount: S.Number;
|
|
436
|
-
scannedFromIndex: S.Number;
|
|
437
|
-
scannedToIndex: S.Number;
|
|
438
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseModelDiff", {
|
|
439
|
-
fromIndex: S.Number;
|
|
440
|
-
toIndex: S.Number;
|
|
441
|
-
changes: S.$Array<S.Struct<{
|
|
442
|
-
readonly path: S.String;
|
|
443
|
-
readonly before: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"Absent", {}>, import("../schema/index.js").CallableTaggedStruct<"Present", {
|
|
444
|
-
value: S.Unknown;
|
|
445
|
-
}>]>;
|
|
446
|
-
readonly after: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"Absent", {}>, import("../schema/index.js").CallableTaggedStruct<"Present", {
|
|
447
|
-
value: S.Unknown;
|
|
448
|
-
}>]>;
|
|
449
|
-
}>>;
|
|
450
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseKeyframes", {
|
|
451
|
-
keyframes: S.$Array<S.Struct<{
|
|
452
|
-
readonly index: S.Number;
|
|
453
|
-
}>>;
|
|
454
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseReplayed", {
|
|
455
|
-
model: S.Unknown;
|
|
456
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseResumed", {}>, import("../schema/index.js").CallableTaggedStruct<"ResponseDispatched", {
|
|
457
|
-
acceptedAtIndex: S.Number;
|
|
458
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseDispatchedBatch", {
|
|
459
|
-
acceptedAtIndices: S.$Array<S.Number>;
|
|
460
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseRuntimes", {
|
|
461
|
-
runtimes: S.$Array<S.Struct<{
|
|
462
|
-
readonly connectionId: S.String;
|
|
463
|
-
readonly url: S.String;
|
|
464
|
-
readonly title: S.String;
|
|
465
|
-
}>>;
|
|
466
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseInit", {
|
|
467
|
-
maybeModel: S.OptionFromNullOr<S.Unknown>;
|
|
468
|
-
commands: S.$Array<S.Struct<{
|
|
469
|
-
readonly name: S.String;
|
|
470
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
471
|
-
}>>;
|
|
472
|
-
mountStarts: S.$Array<S.Struct<{
|
|
473
|
-
readonly name: S.String;
|
|
474
|
-
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
475
|
-
}>>;
|
|
476
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseRuntimeState", {
|
|
477
|
-
currentIndex: S.Number;
|
|
478
|
-
startIndex: S.Number;
|
|
479
|
-
totalEntries: S.Number;
|
|
480
|
-
isPaused: S.Boolean;
|
|
481
|
-
maybePausedAtIndex: S.OptionFromNullOr<S.Number>;
|
|
482
|
-
hasInitModel: S.Boolean;
|
|
483
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseMessageSchema", {
|
|
484
|
-
maybeResult: S.OptionFromNullOr<S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"MessageSchemaIndexResult", {
|
|
485
|
-
index: S.Struct<{
|
|
486
|
-
readonly variants: S.$Array<S.Struct<{
|
|
487
|
-
readonly tag: S.String;
|
|
488
|
-
readonly payloadFields: S.$Array<S.String>;
|
|
489
|
-
readonly unionFields: S.$Array<S.String>;
|
|
490
|
-
}>>;
|
|
491
|
-
}>;
|
|
492
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"MessageSchemaDocumentResult", {
|
|
493
|
-
document: S.Unknown;
|
|
494
|
-
}>]>>;
|
|
495
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseError", {
|
|
496
|
-
reason: S.String;
|
|
497
|
-
}>]>;
|
|
498
|
-
/** A response replying to a Request. */
|
|
499
|
-
export type Response = typeof Response.Type;
|
|
500
|
-
/** A new browser runtime connected. */
|
|
501
|
-
export declare const EventConnected: import("../schema/index.js").CallableTaggedStruct<"EventConnected", {
|
|
502
|
-
runtime: S.Struct<{
|
|
503
|
-
readonly connectionId: S.String;
|
|
504
|
-
readonly url: S.String;
|
|
505
|
-
readonly title: S.String;
|
|
506
|
-
}>;
|
|
507
|
-
}>;
|
|
508
|
-
/** A previously connected runtime disconnected. */
|
|
509
|
-
export declare const EventDisconnected: import("../schema/index.js").CallableTaggedStruct<"EventDisconnected", {
|
|
510
|
-
connectionId: S.String;
|
|
511
|
-
}>;
|
|
512
|
-
/** A runtime lifecycle event used by the Vite plugin to track which browser tabs are connected. Not forwarded to MCP clients. */
|
|
513
|
-
export declare const Event: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"EventConnected", {
|
|
514
|
-
runtime: S.Struct<{
|
|
515
|
-
readonly connectionId: S.String;
|
|
516
|
-
readonly url: S.String;
|
|
517
|
-
readonly title: S.String;
|
|
518
|
-
}>;
|
|
519
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"EventDisconnected", {
|
|
520
|
-
connectionId: S.String;
|
|
521
|
-
}>]>;
|
|
522
|
-
/** A runtime lifecycle event. */
|
|
523
|
-
export type Event = typeof Event.Type;
|
|
524
|
-
/** A wire frame carrying a Request from the MCP server. The id is opaque, used only by the MCP server to correlate the matching Response. The maybeConnectionId routes the request to a specific runtime when present. */
|
|
525
|
-
export declare const RequestFrame: S.Struct<{
|
|
526
|
-
readonly id: S.String;
|
|
527
|
-
readonly maybeConnectionId: S.OptionFromNullOr<S.String>;
|
|
528
|
-
readonly request: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"RequestGetModel", {
|
|
529
|
-
maybePath: S.OptionFromNullOr<S.String>;
|
|
530
|
-
expand: S.Boolean;
|
|
531
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetModelAt", {
|
|
532
|
-
index: S.Number;
|
|
533
|
-
maybePath: S.OptionFromNullOr<S.String>;
|
|
534
|
-
expand: S.Boolean;
|
|
535
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestListMessages", {
|
|
536
|
-
limit: S.Number;
|
|
537
|
-
maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
538
|
-
maybeChangedPathsMatch: S.withDecodingDefault<S.OptionFromNullOr<S.$Array<S.String>>, never>;
|
|
539
|
-
fromEnd: S.withDecodingDefault<S.Boolean, never>;
|
|
540
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestCountMessagesByTag", {
|
|
541
|
-
maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
542
|
-
maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
543
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestDiffModels", {
|
|
544
|
-
fromIndex: S.Number;
|
|
545
|
-
toIndex: S.Number;
|
|
546
|
-
maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
547
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetMessage", {
|
|
548
|
-
index: S.Number;
|
|
549
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestListKeyframes", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestReplayToKeyframe", {
|
|
550
|
-
keyframeIndex: S.Number;
|
|
551
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestResume", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestDispatchMessage", {
|
|
552
|
-
message: S.Unknown;
|
|
553
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestDispatchMessages", {
|
|
554
|
-
messages: S.$Array<S.Unknown>;
|
|
555
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"RequestListRuntimes", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetInit", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetRuntimeState", {}>, import("../schema/index.js").CallableTaggedStruct<"RequestGetMessageSchema", {
|
|
556
|
-
maybeVariantTag: S.OptionFromNullOr<S.String>;
|
|
557
|
-
}>]>;
|
|
558
|
-
}>;
|
|
559
|
-
/** A wire frame carrying a Request from the MCP server. */
|
|
560
|
-
export type RequestFrame = typeof RequestFrame.Type;
|
|
561
|
-
/** A wire frame carrying a Response, correlated to a Request by id. */
|
|
562
|
-
export declare const ResponseFrame: S.Struct<{
|
|
563
|
-
readonly id: S.String;
|
|
564
|
-
readonly response: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"ResponseModel", {
|
|
565
|
-
value: S.Unknown;
|
|
566
|
-
atPath: S.String;
|
|
567
|
-
summarized: S.Boolean;
|
|
568
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"ResponseMessages", {
|
|
569
|
-
entries: S.$Array<S.Struct<{
|
|
182
|
+
export declare const Response: import("../schema/index.js").TaggedUnion<{
|
|
183
|
+
readonly ResponseModel: {
|
|
184
|
+
readonly value: S.Unknown;
|
|
185
|
+
readonly atPath: S.String;
|
|
186
|
+
readonly summarized: S.Boolean;
|
|
187
|
+
};
|
|
188
|
+
readonly ResponseMessages: {
|
|
189
|
+
readonly entries: S.$Array<S.Struct<{
|
|
570
190
|
readonly index: S.Number;
|
|
571
191
|
readonly tag: S.String;
|
|
572
192
|
readonly message: S.Unknown;
|
|
@@ -589,9 +209,10 @@ export declare const ResponseFrame: S.Struct<{
|
|
|
589
209
|
readonly submodelPath: S.$Array<S.String>;
|
|
590
210
|
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
591
211
|
}>>;
|
|
592
|
-
maybeNextIndex: S.OptionFromNullOr<S.Number>;
|
|
593
|
-
}
|
|
594
|
-
|
|
212
|
+
readonly maybeNextIndex: S.OptionFromNullOr<S.Number>;
|
|
213
|
+
};
|
|
214
|
+
readonly ResponseMessage: {
|
|
215
|
+
readonly entry: S.Struct<{
|
|
595
216
|
readonly index: S.Number;
|
|
596
217
|
readonly tag: S.String;
|
|
597
218
|
readonly message: S.Unknown;
|
|
@@ -614,91 +235,334 @@ export declare const ResponseFrame: S.Struct<{
|
|
|
614
235
|
readonly submodelPath: S.$Array<S.String>;
|
|
615
236
|
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
616
237
|
}>;
|
|
617
|
-
}
|
|
618
|
-
|
|
238
|
+
};
|
|
239
|
+
readonly ResponseMessageCounts: {
|
|
240
|
+
readonly counts: S.$Array<S.Struct<{
|
|
619
241
|
readonly tag: S.String;
|
|
620
242
|
readonly count: S.Number;
|
|
621
243
|
}>>;
|
|
622
|
-
totalCount: S.Number;
|
|
623
|
-
scannedFromIndex: S.Number;
|
|
624
|
-
scannedToIndex: S.Number;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
244
|
+
readonly totalCount: S.Number;
|
|
245
|
+
readonly scannedFromIndex: S.Number;
|
|
246
|
+
readonly scannedToIndex: S.Number;
|
|
247
|
+
};
|
|
248
|
+
readonly ResponseModelDiff: {
|
|
249
|
+
readonly fromIndex: S.Number;
|
|
250
|
+
readonly toIndex: S.Number;
|
|
251
|
+
readonly changes: S.$Array<S.Struct<{
|
|
629
252
|
readonly path: S.String;
|
|
630
|
-
readonly before:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
}
|
|
253
|
+
readonly before: import("../schema/index.js").TaggedUnion<{
|
|
254
|
+
readonly Absent: {};
|
|
255
|
+
readonly Present: {
|
|
256
|
+
readonly value: S.Unknown;
|
|
257
|
+
};
|
|
258
|
+
}>;
|
|
259
|
+
readonly after: import("../schema/index.js").TaggedUnion<{
|
|
260
|
+
readonly Absent: {};
|
|
261
|
+
readonly Present: {
|
|
262
|
+
readonly value: S.Unknown;
|
|
263
|
+
};
|
|
264
|
+
}>;
|
|
636
265
|
}>>;
|
|
637
|
-
}
|
|
638
|
-
|
|
266
|
+
};
|
|
267
|
+
readonly ResponseKeyframes: {
|
|
268
|
+
readonly keyframes: S.$Array<S.Struct<{
|
|
639
269
|
readonly index: S.Number;
|
|
640
270
|
}>>;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
271
|
+
};
|
|
272
|
+
readonly ResponseReplayed: {
|
|
273
|
+
readonly model: S.Unknown;
|
|
274
|
+
};
|
|
275
|
+
readonly ResponseResumed: {};
|
|
276
|
+
readonly ResponseDispatched: {
|
|
277
|
+
readonly acceptedAtIndex: S.Number;
|
|
278
|
+
};
|
|
279
|
+
readonly ResponseDispatchedBatch: {
|
|
280
|
+
readonly acceptedAtIndices: S.$Array<S.Number>;
|
|
281
|
+
};
|
|
282
|
+
readonly ResponseRuntimes: {
|
|
283
|
+
readonly runtimes: S.$Array<S.Struct<{
|
|
649
284
|
readonly connectionId: S.String;
|
|
650
285
|
readonly url: S.String;
|
|
651
286
|
readonly title: S.String;
|
|
652
287
|
}>>;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
|
|
288
|
+
};
|
|
289
|
+
readonly ResponseInit: {
|
|
290
|
+
readonly maybeModel: S.OptionFromNullOr<S.Unknown>;
|
|
291
|
+
readonly commands: S.$Array<S.Struct<{
|
|
656
292
|
readonly name: S.String;
|
|
657
293
|
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
658
294
|
}>>;
|
|
659
|
-
mountStarts: S.$Array<S.Struct<{
|
|
295
|
+
readonly mountStarts: S.$Array<S.Struct<{
|
|
660
296
|
readonly name: S.String;
|
|
661
297
|
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
662
298
|
}>>;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
readonly
|
|
299
|
+
};
|
|
300
|
+
readonly ResponseRuntimeState: {
|
|
301
|
+
readonly currentIndex: S.Number;
|
|
302
|
+
readonly startIndex: S.Number;
|
|
303
|
+
readonly totalEntries: S.Number;
|
|
304
|
+
readonly isPaused: S.Boolean;
|
|
305
|
+
readonly maybePausedAtIndex: S.OptionFromNullOr<S.Number>;
|
|
306
|
+
readonly hasInitModel: S.Boolean;
|
|
307
|
+
};
|
|
308
|
+
readonly ResponseMessageSchema: {
|
|
309
|
+
readonly maybeResult: S.OptionFromNullOr<import("../schema/index.js").TaggedUnion<{
|
|
310
|
+
readonly MessageSchemaIndexResult: {
|
|
311
|
+
readonly index: S.Struct<{
|
|
312
|
+
readonly variants: S.$Array<S.Struct<{
|
|
313
|
+
readonly tag: S.String;
|
|
314
|
+
readonly payloadFields: S.$Array<S.String>;
|
|
315
|
+
readonly unionFields: S.$Array<S.String>;
|
|
316
|
+
}>>;
|
|
317
|
+
}>;
|
|
318
|
+
};
|
|
319
|
+
readonly MessageSchemaDocumentResult: {
|
|
320
|
+
readonly document: S.Unknown;
|
|
321
|
+
};
|
|
322
|
+
}>>;
|
|
323
|
+
};
|
|
324
|
+
readonly ResponseError: {
|
|
325
|
+
readonly reason: S.String;
|
|
326
|
+
};
|
|
327
|
+
}>;
|
|
328
|
+
/** A response replying to a Request. */
|
|
329
|
+
export type Response = typeof Response.Type;
|
|
330
|
+
/** A runtime lifecycle event used by the Vite plugin to track which browser tabs are connected. Not forwarded to MCP clients. */
|
|
331
|
+
export declare const Event: import("../schema/index.js").TaggedUnion<{
|
|
332
|
+
readonly EventConnected: {
|
|
333
|
+
readonly runtime: S.Struct<{
|
|
334
|
+
readonly connectionId: S.String;
|
|
335
|
+
readonly url: S.String;
|
|
336
|
+
readonly title: S.String;
|
|
337
|
+
}>;
|
|
338
|
+
};
|
|
339
|
+
readonly EventDisconnected: {
|
|
340
|
+
readonly connectionId: S.String;
|
|
341
|
+
};
|
|
342
|
+
}>;
|
|
343
|
+
/** A runtime lifecycle event. */
|
|
344
|
+
export type Event = typeof Event.Type;
|
|
345
|
+
/** A wire frame carrying a Request from the MCP server. The id is opaque, used only by the MCP server to correlate the matching Response. The maybeConnectionId routes the request to a specific runtime when present. */
|
|
346
|
+
export declare const RequestFrame: S.Struct<{
|
|
347
|
+
readonly id: S.String;
|
|
348
|
+
readonly maybeConnectionId: S.OptionFromNullOr<S.String>;
|
|
349
|
+
readonly request: import("../schema/index.js").TaggedUnion<{
|
|
350
|
+
readonly RequestGetModel: {
|
|
351
|
+
readonly maybePath: S.OptionFromNullOr<S.String>;
|
|
352
|
+
readonly expand: S.Boolean;
|
|
353
|
+
};
|
|
354
|
+
readonly RequestGetModelAt: {
|
|
355
|
+
readonly index: S.Number;
|
|
356
|
+
readonly maybePath: S.OptionFromNullOr<S.String>;
|
|
357
|
+
readonly expand: S.Boolean;
|
|
358
|
+
};
|
|
359
|
+
readonly RequestListMessages: {
|
|
360
|
+
readonly limit: S.Number;
|
|
361
|
+
readonly maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
362
|
+
readonly maybeChangedPathsMatch: S.withDecodingDefault<S.OptionFromNullOr<S.$Array<S.String>>, never>;
|
|
363
|
+
readonly fromEnd: S.withDecodingDefault<S.Boolean, never>;
|
|
364
|
+
};
|
|
365
|
+
readonly RequestCountMessagesByTag: {
|
|
366
|
+
readonly maybeSinceIndex: S.OptionFromNullOr<S.Number>;
|
|
367
|
+
readonly maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
368
|
+
};
|
|
369
|
+
readonly RequestDiffModels: {
|
|
370
|
+
readonly fromIndex: S.Number;
|
|
371
|
+
readonly toIndex: S.Number;
|
|
372
|
+
readonly maybeChangedPathsMatch: S.OptionFromNullOr<S.$Array<S.String>>;
|
|
373
|
+
};
|
|
374
|
+
readonly RequestGetMessage: {
|
|
375
|
+
readonly index: S.Number;
|
|
376
|
+
};
|
|
377
|
+
readonly RequestListKeyframes: {};
|
|
378
|
+
readonly RequestReplayToKeyframe: {
|
|
379
|
+
readonly keyframeIndex: S.Number;
|
|
380
|
+
};
|
|
381
|
+
readonly RequestResume: {};
|
|
382
|
+
readonly RequestDispatchMessage: {
|
|
383
|
+
readonly message: S.Unknown;
|
|
384
|
+
};
|
|
385
|
+
readonly RequestDispatchMessages: {
|
|
386
|
+
readonly messages: S.$Array<S.Unknown>;
|
|
387
|
+
};
|
|
388
|
+
readonly RequestListRuntimes: {};
|
|
389
|
+
readonly RequestGetInit: {};
|
|
390
|
+
readonly RequestGetRuntimeState: {};
|
|
391
|
+
readonly RequestGetMessageSchema: {
|
|
392
|
+
readonly maybeVariantTag: S.OptionFromNullOr<S.String>;
|
|
393
|
+
};
|
|
394
|
+
}>;
|
|
395
|
+
}>;
|
|
396
|
+
/** A wire frame carrying a Request from the MCP server. */
|
|
397
|
+
export type RequestFrame = typeof RequestFrame.Type;
|
|
398
|
+
/** A wire frame carrying a Response, correlated to a Request by id. */
|
|
399
|
+
export declare const ResponseFrame: S.Struct<{
|
|
400
|
+
readonly id: S.String;
|
|
401
|
+
readonly response: import("../schema/index.js").TaggedUnion<{
|
|
402
|
+
readonly ResponseModel: {
|
|
403
|
+
readonly value: S.Unknown;
|
|
404
|
+
readonly atPath: S.String;
|
|
405
|
+
readonly summarized: S.Boolean;
|
|
406
|
+
};
|
|
407
|
+
readonly ResponseMessages: {
|
|
408
|
+
readonly entries: S.$Array<S.Struct<{
|
|
409
|
+
readonly index: S.Number;
|
|
410
|
+
readonly tag: S.String;
|
|
411
|
+
readonly message: S.Unknown;
|
|
412
|
+
readonly commands: S.$Array<S.Struct<{
|
|
413
|
+
readonly name: S.String;
|
|
414
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
415
|
+
}>>;
|
|
416
|
+
readonly mountStarts: S.$Array<S.Struct<{
|
|
417
|
+
readonly name: S.String;
|
|
418
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
677
419
|
}>>;
|
|
420
|
+
readonly mountEnds: S.$Array<S.Struct<{
|
|
421
|
+
readonly name: S.String;
|
|
422
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
423
|
+
}>>;
|
|
424
|
+
readonly timestamp: S.Number;
|
|
425
|
+
readonly isModelChanged: S.Boolean;
|
|
426
|
+
readonly changedPaths: S.$Array<S.String>;
|
|
427
|
+
readonly affectedPaths: S.$Array<S.String>;
|
|
428
|
+
readonly submodelPath: S.$Array<S.String>;
|
|
429
|
+
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
430
|
+
}>>;
|
|
431
|
+
readonly maybeNextIndex: S.OptionFromNullOr<S.Number>;
|
|
432
|
+
};
|
|
433
|
+
readonly ResponseMessage: {
|
|
434
|
+
readonly entry: S.Struct<{
|
|
435
|
+
readonly index: S.Number;
|
|
436
|
+
readonly tag: S.String;
|
|
437
|
+
readonly message: S.Unknown;
|
|
438
|
+
readonly commands: S.$Array<S.Struct<{
|
|
439
|
+
readonly name: S.String;
|
|
440
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
441
|
+
}>>;
|
|
442
|
+
readonly mountStarts: S.$Array<S.Struct<{
|
|
443
|
+
readonly name: S.String;
|
|
444
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
445
|
+
}>>;
|
|
446
|
+
readonly mountEnds: S.$Array<S.Struct<{
|
|
447
|
+
readonly name: S.String;
|
|
448
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
449
|
+
}>>;
|
|
450
|
+
readonly timestamp: S.Number;
|
|
451
|
+
readonly isModelChanged: S.Boolean;
|
|
452
|
+
readonly changedPaths: S.$Array<S.String>;
|
|
453
|
+
readonly affectedPaths: S.$Array<S.String>;
|
|
454
|
+
readonly submodelPath: S.$Array<S.String>;
|
|
455
|
+
readonly maybeLeafTag: S.OptionFromNullOr<S.String>;
|
|
678
456
|
}>;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
457
|
+
};
|
|
458
|
+
readonly ResponseMessageCounts: {
|
|
459
|
+
readonly counts: S.$Array<S.Struct<{
|
|
460
|
+
readonly tag: S.String;
|
|
461
|
+
readonly count: S.Number;
|
|
462
|
+
}>>;
|
|
463
|
+
readonly totalCount: S.Number;
|
|
464
|
+
readonly scannedFromIndex: S.Number;
|
|
465
|
+
readonly scannedToIndex: S.Number;
|
|
466
|
+
};
|
|
467
|
+
readonly ResponseModelDiff: {
|
|
468
|
+
readonly fromIndex: S.Number;
|
|
469
|
+
readonly toIndex: S.Number;
|
|
470
|
+
readonly changes: S.$Array<S.Struct<{
|
|
471
|
+
readonly path: S.String;
|
|
472
|
+
readonly before: import("../schema/index.js").TaggedUnion<{
|
|
473
|
+
readonly Absent: {};
|
|
474
|
+
readonly Present: {
|
|
475
|
+
readonly value: S.Unknown;
|
|
476
|
+
};
|
|
477
|
+
}>;
|
|
478
|
+
readonly after: import("../schema/index.js").TaggedUnion<{
|
|
479
|
+
readonly Absent: {};
|
|
480
|
+
readonly Present: {
|
|
481
|
+
readonly value: S.Unknown;
|
|
482
|
+
};
|
|
483
|
+
}>;
|
|
484
|
+
}>>;
|
|
485
|
+
};
|
|
486
|
+
readonly ResponseKeyframes: {
|
|
487
|
+
readonly keyframes: S.$Array<S.Struct<{
|
|
488
|
+
readonly index: S.Number;
|
|
489
|
+
}>>;
|
|
490
|
+
};
|
|
491
|
+
readonly ResponseReplayed: {
|
|
492
|
+
readonly model: S.Unknown;
|
|
493
|
+
};
|
|
494
|
+
readonly ResponseResumed: {};
|
|
495
|
+
readonly ResponseDispatched: {
|
|
496
|
+
readonly acceptedAtIndex: S.Number;
|
|
497
|
+
};
|
|
498
|
+
readonly ResponseDispatchedBatch: {
|
|
499
|
+
readonly acceptedAtIndices: S.$Array<S.Number>;
|
|
500
|
+
};
|
|
501
|
+
readonly ResponseRuntimes: {
|
|
502
|
+
readonly runtimes: S.$Array<S.Struct<{
|
|
503
|
+
readonly connectionId: S.String;
|
|
504
|
+
readonly url: S.String;
|
|
505
|
+
readonly title: S.String;
|
|
506
|
+
}>>;
|
|
507
|
+
};
|
|
508
|
+
readonly ResponseInit: {
|
|
509
|
+
readonly maybeModel: S.OptionFromNullOr<S.Unknown>;
|
|
510
|
+
readonly commands: S.$Array<S.Struct<{
|
|
511
|
+
readonly name: S.String;
|
|
512
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
513
|
+
}>>;
|
|
514
|
+
readonly mountStarts: S.$Array<S.Struct<{
|
|
515
|
+
readonly name: S.String;
|
|
516
|
+
readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
|
|
517
|
+
}>>;
|
|
518
|
+
};
|
|
519
|
+
readonly ResponseRuntimeState: {
|
|
520
|
+
readonly currentIndex: S.Number;
|
|
521
|
+
readonly startIndex: S.Number;
|
|
522
|
+
readonly totalEntries: S.Number;
|
|
523
|
+
readonly isPaused: S.Boolean;
|
|
524
|
+
readonly maybePausedAtIndex: S.OptionFromNullOr<S.Number>;
|
|
525
|
+
readonly hasInitModel: S.Boolean;
|
|
526
|
+
};
|
|
527
|
+
readonly ResponseMessageSchema: {
|
|
528
|
+
readonly maybeResult: S.OptionFromNullOr<import("../schema/index.js").TaggedUnion<{
|
|
529
|
+
readonly MessageSchemaIndexResult: {
|
|
530
|
+
readonly index: S.Struct<{
|
|
531
|
+
readonly variants: S.$Array<S.Struct<{
|
|
532
|
+
readonly tag: S.String;
|
|
533
|
+
readonly payloadFields: S.$Array<S.String>;
|
|
534
|
+
readonly unionFields: S.$Array<S.String>;
|
|
535
|
+
}>>;
|
|
536
|
+
}>;
|
|
537
|
+
};
|
|
538
|
+
readonly MessageSchemaDocumentResult: {
|
|
539
|
+
readonly document: S.Unknown;
|
|
540
|
+
};
|
|
541
|
+
}>>;
|
|
542
|
+
};
|
|
543
|
+
readonly ResponseError: {
|
|
544
|
+
readonly reason: S.String;
|
|
545
|
+
};
|
|
546
|
+
}>;
|
|
685
547
|
}>;
|
|
686
548
|
/** A wire frame carrying a Response, correlated to a Request by id. */
|
|
687
549
|
export type ResponseFrame = typeof ResponseFrame.Type;
|
|
688
550
|
/** A wire frame carrying a runtime lifecycle event from the bridge to the Vite plugin. */
|
|
689
551
|
export declare const EventFrame: S.Struct<{
|
|
690
552
|
readonly maybeConnectionId: S.OptionFromNullOr<S.String>;
|
|
691
|
-
readonly event:
|
|
692
|
-
|
|
553
|
+
readonly event: import("../schema/index.js").TaggedUnion<{
|
|
554
|
+
readonly EventConnected: {
|
|
555
|
+
readonly runtime: S.Struct<{
|
|
556
|
+
readonly connectionId: S.String;
|
|
557
|
+
readonly url: S.String;
|
|
558
|
+
readonly title: S.String;
|
|
559
|
+
}>;
|
|
560
|
+
};
|
|
561
|
+
readonly EventDisconnected: {
|
|
693
562
|
readonly connectionId: S.String;
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
}>;
|
|
697
|
-
}>, import("../schema/index.js").CallableTaggedStruct<"EventDisconnected", {
|
|
698
|
-
connectionId: S.String;
|
|
699
|
-
}>]>;
|
|
563
|
+
};
|
|
564
|
+
}>;
|
|
700
565
|
}>;
|
|
701
566
|
/** A wire frame carrying a runtime lifecycle event. */
|
|
702
567
|
export type EventFrame = typeof EventFrame.Type;
|
|
703
|
-
export {};
|
|
704
568
|
//# sourceMappingURL=protocol.d.ts.map
|