@volter/live 0.5.211 → 0.5.213
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/BUNDLED_NOTICES +13 -13
- package/README.md +10 -11
- package/dist/asset-library.d.ts +98 -0
- package/dist/asset-library.js +7 -0
- package/dist/asset-library.js.map +7 -0
- package/dist/chunk-7WKVJGHZ.js +15 -0
- package/dist/chunk-7WKVJGHZ.js.map +7 -0
- package/dist/chunk-B2HUWFTT.js +25 -0
- package/dist/chunk-B2HUWFTT.js.map +7 -0
- package/dist/chunk-IZJOOON2.js +805 -0
- package/dist/chunk-IZJOOON2.js.map +7 -0
- package/dist/chunk-JDOIPALX.js +158 -0
- package/dist/chunk-JDOIPALX.js.map +7 -0
- package/dist/chunk-JFAHP5CC.js +218 -0
- package/dist/chunk-JFAHP5CC.js.map +7 -0
- package/dist/chunk-PC56TDHV.js +189 -0
- package/dist/chunk-PC56TDHV.js.map +7 -0
- package/dist/chunk-WIAH4XZE.js +82 -0
- package/dist/chunk-WIAH4XZE.js.map +7 -0
- package/dist/client.d.ts +376 -0
- package/dist/client.js +10 -0
- package/dist/client.js.map +7 -0
- package/dist/discovery.d.ts +32 -0
- package/dist/discovery.js +19 -0
- package/dist/discovery.js.map +7 -0
- package/dist/editor-document.d.ts +12 -47
- package/dist/editor.d.ts +45 -183
- package/dist/http-transport.d.ts +6 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.js +83 -1762
- package/dist/index.js.map +4 -4
- package/dist/installed-package.d.ts +6 -0
- package/dist/installed-package.js +7 -0
- package/dist/installed-package.js.map +7 -0
- package/dist/lazy-proxy.d.ts +11 -11
- package/dist/member-hints.d.ts +6 -9
- package/dist/product-create.d.ts +29 -0
- package/dist/product-create.js +13 -0
- package/dist/product-create.js.map +7 -0
- package/dist/product-locator.d.ts +100 -0
- package/dist/product-locator.js +25 -0
- package/dist/product-locator.js.map +7 -0
- package/dist/registry-format.d.ts +72 -0
- package/dist/registry-format.js +31 -0
- package/dist/registry-format.js.map +7 -0
- package/dist/session.d.ts +11 -15
- package/dist/singleton.d.ts +1 -13
- package/dist/volter-manifest.d.ts +55 -0
- package/dist/volter-manifest.js +9 -0
- package/dist/volter-manifest.js.map +7 -0
- package/dist/workbench-locator.d.ts +84 -0
- package/dist/workbench-locator.js +416 -0
- package/dist/workbench-locator.js.map +7 -0
- package/package.json +39 -3
- package/src/asset-library.ts +104 -0
- package/src/client.ts +1093 -0
- package/src/discovery.ts +105 -0
- package/src/editor-document.ts +12 -49
- package/src/editor.ts +56 -215
- package/src/http-transport.ts +19 -0
- package/src/index.ts +5 -8
- package/src/installed-package.ts +15 -0
- package/src/lazy-proxy.ts +11 -11
- package/src/member-hints.ts +8 -12
- package/src/product-create.ts +38 -0
- package/src/product-locator.ts +327 -0
- package/src/registry-format.ts +248 -0
- package/src/session.ts +36 -144
- package/src/singleton.ts +1 -16
- package/src/volter-manifest.ts +97 -0
- package/src/workbench-locator.ts +625 -0
- package/dist/tools.d.ts +0 -23
- package/src/tools.ts +0 -45
package/dist/editor.d.ts
CHANGED
|
@@ -1,70 +1,35 @@
|
|
|
1
1
|
/** Editor and document automation over the shared session command wire.
|
|
2
2
|
* Modeling executes in the editor tab; this client owns no model state. */
|
|
3
|
-
import type { ActiveDocumentCapture, AssetKind, AssetPreviewCapture, AssetPreviewOptions, AssetPreviewShotSetDefinition, AssetPreviewSource, CaptureDimensions, DocumentLookOutcome, StageFrameCostReading, EditorChromeCapture, EditorChromeCaptureOptions,
|
|
3
|
+
import type { ActiveDocumentCapture, AssetKind, AssetPreviewCapture, AssetPreviewOptions, AssetPreviewShotSetDefinition, AssetPreviewSource, CaptureDimensions, DocumentLookOutcome, StageFrameCostReading, EditorChromeCapture, EditorChromeCaptureOptions, EditorState, EditorView, EditorWorkspaceName, InspectedFieldWrite, InspectedHierarchy, InspectedInspection, LabeledShotSetCapture, PresentedEditorView, ShadingMode, StructureOp, StructureOpOptions, StructureOpResult, ViewPreset, ViewportCapture } from '@volter/sdk';
|
|
4
|
+
import type { EditorClient, HistoryStep, OpenedDocument } from './client.js';
|
|
5
|
+
import { LiveAssetLibrary } from './asset-library.js';
|
|
4
6
|
import { LiveEditorDocument } from './editor-document.js';
|
|
5
|
-
/** A panel `showPanel` can focus: the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
export type PanelName = '
|
|
7
|
+
/** A panel `showPanel` can focus: the console, the build surface, or any key
|
|
8
|
+
* the editor's own static-panel registry holds (`hierarchy`, `asset-library`,
|
|
9
|
+
* `inspector`, `history`, …) — which is why this is open: the registry, not
|
|
10
|
+
* this union, is the vocabulary. */
|
|
11
|
+
export type PanelName = 'console' | (string & {});
|
|
10
12
|
/**
|
|
11
13
|
* Lightweight extension-based `AssetKind` guess for `openAsset`'s optional
|
|
12
|
-
* `kind` argument.
|
|
13
|
-
*
|
|
14
|
-
* React-component-local helper of a package `@volter/live` has no dependency
|
|
15
|
-
* on. Callers with an unusual extension can always pass `kind` explicitly.
|
|
14
|
+
* `kind` argument. Callers with an unusual extension can always pass `kind`
|
|
15
|
+
* explicitly.
|
|
16
16
|
*/
|
|
17
17
|
export declare function inferAssetKind(path: string): AssetKind;
|
|
18
18
|
export declare class LiveEditor {
|
|
19
19
|
#private;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* deliberately scoped to that document alone —
|
|
24
|
-
* `packages/sdk/src/kit/editor-document-probe.ts` carries the design and the
|
|
25
|
-
* refusal contract. Screenshotting the same subject is
|
|
26
|
-
* {@link LiveEditor.captureActiveDocument}, not a fifth verb here.
|
|
27
|
-
*/
|
|
20
|
+
/** Read and drive DOM within a named scope: the active document by default, or editor chrome
|
|
21
|
+
* such as header, shelf, rail, outliner, utility and area. Targets outside the scope are refused.
|
|
22
|
+
* See `@volter/sdk`'s editor-document-probe for scope and gesture contracts. */
|
|
28
23
|
readonly document: LiveEditorDocument;
|
|
24
|
+
/** The asset library: search a source, list an asset's files, download one into the project with its license
|
|
25
|
+
* recorded (`asset-library.ts`). */
|
|
26
|
+
readonly assetLibrary: LiveAssetLibrary;
|
|
29
27
|
constructor(client: EditorClient);
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
* Blender runs headless in the editor tab's worker (ARCHITECTURE-CORE, "THE
|
|
34
|
-
* BLENDER IN THE TAB IS BLENDER") and answers `blender-start`,
|
|
35
|
-
* `blender-execute`, `blender-scene-info`, `blender-object-info`,
|
|
36
|
-
* `blender-screenshot-view`, `blender-read-file`, `blender-write-file`,
|
|
37
|
-
* `blender-list-files`, `blender-stop` and `blender-status`. They were
|
|
38
|
-
* reachable from `@volter/sdk` and through `volter blender-mcp` but from
|
|
39
|
-
* no GENERAL door, so driving a session meant writing an MCP client script
|
|
40
|
-
* per question — the same discovery failure `eval-surface.ts`'s header
|
|
41
|
-
* records, in a lane that had not noticed it yet.
|
|
42
|
-
*
|
|
43
|
-
* cyclotron eval "await editor.blender('blender-execute', { code: 'import bpy; print(len(bpy.data.objects))' })"
|
|
44
|
-
*
|
|
45
|
-
* `blender-status` is the only verb that creates nothing: it answers whether
|
|
46
|
-
* this tab already has a session without starting one.
|
|
47
|
-
*/
|
|
48
|
-
blender<T extends object = Record<string, unknown>>(type: `blender-${string}`, fields?: Record<string, unknown>): Promise<T>;
|
|
49
|
-
/**
|
|
50
|
-
* MODEL PLAY'S LOG, from `cyclotron eval` — the same read as
|
|
51
|
-
* `cyclotron play-log`. A play script writes it with
|
|
52
|
-
* `play.log(kind, facts)`; the runner adds `play-start`, `script-reload`,
|
|
53
|
-
* `script-error` and `play-stop`. Every entry carries `simT` (simulation
|
|
54
|
-
* seconds) and `tick` (the frame). Each model document keeps its own: the
|
|
55
|
-
* current run, or the last one after Stop; Play from a fresh copy empties it.
|
|
56
|
-
* `documentId` picks one (`documents` lists them); the active Play's by default.
|
|
57
|
-
*
|
|
58
|
-
* cyclotron eval "(await editor.modelPlayLog({ kind: 'death' })).entries"
|
|
59
|
-
*/
|
|
60
|
-
modelPlayLog(query?: {
|
|
61
|
-
readonly documentId?: string;
|
|
62
|
-
readonly since?: number;
|
|
63
|
-
readonly kind?: string;
|
|
64
|
-
}): Promise<ModelPlayLogReading>;
|
|
28
|
+
/** A verb a composed package contributes (`<package>-<verb>`), waited on for its own row's budget. */
|
|
29
|
+
contributedVerb<T extends object = Record<string, unknown>>(type: string, fields?: Record<string, unknown>): Promise<T>;
|
|
65
30
|
/**
|
|
66
31
|
* The active authoring adapter's persistence destination — where a save would
|
|
67
|
-
* land (`status().savePath`). A read only: a
|
|
32
|
+
* land (`status().savePath`). A read only: a stage root has no scene document
|
|
68
33
|
* to open, and its root is activated instead.
|
|
69
34
|
*/
|
|
70
35
|
scene(): Promise<string | null>;
|
|
@@ -76,19 +41,10 @@ export declare class LiveEditor {
|
|
|
76
41
|
present(view: EditorView): Promise<PresentedEditorView>;
|
|
77
42
|
/** The human editor's actual active document, selection, camera and utility. */
|
|
78
43
|
currentView(): Promise<EditorView>;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* an unstaged look at a model. `{width, height}` asks for a shaped frame, so
|
|
84
|
-
* a video-aspect look needs no crop afterwards. Both are bounded by the
|
|
85
|
-
* relay budget (64-1024 per side, total no larger than a 1024 square); see
|
|
86
|
-
* `@volter/sdk`'s `CaptureDimensions`.
|
|
87
|
-
* Supply a view to present and photograph it in one editor request.
|
|
88
|
-
*/
|
|
89
|
-
/** The active document's RENDER alone, at the size asked for: what the document draws,
|
|
90
|
-
* without what the viewport draws over it (its navigation gizmo, its readouts). To see a
|
|
91
|
-
* stage as the person does, use `captureEditorChrome({ region: 'document' })`. */
|
|
44
|
+
/** Capture the active document's render without viewport navigation gizmos or readouts.
|
|
45
|
+
* A number requests a square; `{width, height}` requests a shaped frame, bounded by
|
|
46
|
+
* `CaptureDimensions`. Supply a view to present and capture it in one request.
|
|
47
|
+
* Use `captureEditorChrome({ region: 'document' })` to include viewport chrome. */
|
|
92
48
|
captureActiveDocument(size?: CaptureDimensions, view?: EditorView): Promise<ActiveDocumentCapture>;
|
|
93
49
|
/**
|
|
94
50
|
* Photograph the editor PAGE — every panel, tab strip and viewport as the
|
|
@@ -117,7 +73,7 @@ export declare class LiveEditor {
|
|
|
117
73
|
*/
|
|
118
74
|
frame(entityId: string): Promise<void>;
|
|
119
75
|
/**
|
|
120
|
-
* Bare `frame()` frames the OPEN
|
|
76
|
+
* Bare `frame()` frames the OPEN asset document's subject instead — its
|
|
121
77
|
* selection if it has one, else the whole model: the toolbar's own Frame
|
|
122
78
|
* button, reachable from a script. `fit` scales the fitted distance (1 is
|
|
123
79
|
* that button's tight fit, 1.5 stands back a little for a shot).
|
|
@@ -128,7 +84,7 @@ export declare class LiveEditor {
|
|
|
128
84
|
/**
|
|
129
85
|
* WATCH THE AGENT LOOK AROUND THE MODEL.
|
|
130
86
|
*
|
|
131
|
-
* Swings the open
|
|
87
|
+
* Swings the open asset document's camera — the camera the human's tab is
|
|
132
88
|
* showing — around the framed subject by `azimuth`/`elevation` RADIANS,
|
|
133
89
|
* animated over `duration` seconds (default 0.6), and resolves when the move
|
|
134
90
|
* ends. This is deliberately not a jump cut: the point of the verb is that a
|
|
@@ -173,22 +129,10 @@ export declare class LiveEditor {
|
|
|
173
129
|
readonly quality?: 'full' | 'navigation';
|
|
174
130
|
}): Promise<StageFrameCostReading>;
|
|
175
131
|
view(preset: ViewPreset): Promise<void>;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
* (ARCHITECTURE-CORE §Editor chrome): `game` (the default, the editor's
|
|
181
|
-
* standing arrangement), `model`, `sculpt`, `texture`, `animate`, `look`.
|
|
182
|
-
* Switching is an EXPLICIT act — nothing in the editor moves chrome on its
|
|
183
|
-
* own, opening a document included — and this is the session door to it,
|
|
184
|
-
* beside `Window → Workspace` and the registered actions.
|
|
185
|
-
*
|
|
186
|
-
* Resolves once the dock has finished rebuilding, so a capture taken
|
|
187
|
-
* immediately after photographs the arrangement that was asked for. Each
|
|
188
|
-
* workspace remembers the user's own hand-tuning per project, so switching
|
|
189
|
-
* away and back is lossless.
|
|
190
|
-
*/
|
|
191
|
-
workspace(id: EditorWorkspaceName): Promise<void>;
|
|
132
|
+
workspace(id: EditorWorkspaceName): Promise<{
|
|
133
|
+
readonly workspace: EditorWorkspaceName;
|
|
134
|
+
readonly applied: boolean;
|
|
135
|
+
}>;
|
|
192
136
|
/**
|
|
193
137
|
* Apply a STYLE BUNDLE by id — the chrome's palette, material and icon set in
|
|
194
138
|
* one gesture, the session door beside
|
|
@@ -198,28 +142,12 @@ export declare class LiveEditor {
|
|
|
198
142
|
style(id: string): Promise<void>;
|
|
199
143
|
/**
|
|
200
144
|
* A document stage's viewport PRESENTATION — its draw mode, lighting, backdrop and overlays
|
|
201
|
-
* (`@volter/sdk/
|
|
145
|
+
* (`@volter/sdk/viewport-presentation`) — resolved. With `layer`, that choice is
|
|
202
146
|
* recorded for the view first, as a person's toolbar change would be, e.g.
|
|
203
147
|
* `presentation('model:src/models/cube.blend', { all: { lighting: { studioPreset: 'kit' } } })`.
|
|
204
|
-
* With a STRING, the named view of that id (`*.view.ts`, e.g. `'godot'`) is put on the view
|
|
205
|
-
* whole; the answer's `viewPresets` lists the ones registered.
|
|
206
148
|
*/
|
|
207
149
|
presentation(documentId: string, layer?: Parameters<EditorClient['viewportPresentation']>[1]): ReturnType<EditorClient['viewportPresentation']>;
|
|
208
|
-
/**
|
|
209
|
-
* Set the MATERIAL apart from the bundle that usually carries it.
|
|
210
|
-
* Appearance is palette × material, independent axes by ruling, so
|
|
211
|
-
* `style()` alone can never say whether a cost belongs to the blur or to
|
|
212
|
-
* the palette. This is the door that measures them apart; it answers with
|
|
213
|
-
* what the chrome wears afterwards (`style` is `null` when the mix matches
|
|
214
|
-
* no registered bundle).
|
|
215
|
-
*/
|
|
216
|
-
appearance(appearance: {
|
|
217
|
-
readonly material?: string;
|
|
218
|
-
}): Promise<{
|
|
219
|
-
material: string;
|
|
220
|
-
style: string | null;
|
|
221
|
-
}>;
|
|
222
|
-
/** Focus an editor panel: a viewport tab, the console, the build surface, or
|
|
150
|
+
/** Focus an editor panel: the console, the build surface, or
|
|
223
151
|
* any key the editor's static-panel registry holds — an unknown key refuses
|
|
224
152
|
* naming the ones it does. */
|
|
225
153
|
showPanel(name: PanelName): Promise<void>;
|
|
@@ -228,12 +156,8 @@ export declare class LiveEditor {
|
|
|
228
156
|
/**
|
|
229
157
|
* SELECT a project asset — the browser's single click, which fills the
|
|
230
158
|
* Inspector without opening a document. `openAsset` is the double click.
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* the file it matches, then `inspect()` lists the verbs that section
|
|
234
|
-
* declares and `runAction(id)` runs one. Selecting a path nothing matches
|
|
235
|
-
* is not an error — the Inspector shows what it has, exactly as it does
|
|
236
|
-
* for a human.
|
|
159
|
+
* Selecting a path nothing matches is not an error — the Inspector shows
|
|
160
|
+
* what it has, exactly as it does for a human.
|
|
237
161
|
*/
|
|
238
162
|
selectAsset(path: string): Promise<void>;
|
|
239
163
|
/**
|
|
@@ -244,8 +168,8 @@ export declare class LiveEditor {
|
|
|
244
168
|
* where it stands under the scene's own lighting, reachable from here — or
|
|
245
169
|
* RAW GLB BYTES (`assetPreview({ glbBase64 }, …)`), for a model that exists
|
|
246
170
|
* only in the calling Node process's memory and has never been written to
|
|
247
|
-
* disk. `stage` defaults to `'lab'`, the neutral Asset Lab staging
|
|
248
|
-
*
|
|
171
|
+
* disk. `stage` defaults to `'lab'`, the neutral Asset Lab staging, and the
|
|
172
|
+
* bytes form is lab-only.
|
|
249
173
|
*/
|
|
250
174
|
assetPreview(source: string | AssetPreviewSource, options?: AssetPreviewOptions): Promise<AssetPreviewCapture>;
|
|
251
175
|
/**
|
|
@@ -254,72 +178,22 @@ export declare class LiveEditor {
|
|
|
254
178
|
* crops, rendered against the asset's own skeleton, with a contact sheet.
|
|
255
179
|
* Every source {@link assetPreview} takes works here, GLB bytes included:
|
|
256
180
|
* a shot set stages its own subject, so it needs no place to stand.
|
|
257
|
-
*
|
|
258
|
-
* Sole in-repo caller today: `project.bake.preview`'s `--orbit` lane.
|
|
259
181
|
*/
|
|
260
182
|
assetPreviewShots(source: string | AssetPreviewSource, definition: AssetPreviewShotSetDefinition, options?: AssetPreviewOptions): Promise<LabeledShotSetCapture>;
|
|
261
183
|
grid(on: boolean): Promise<void>;
|
|
262
184
|
helpers(on: boolean): Promise<void>;
|
|
263
185
|
stats(on: boolean): Promise<void>;
|
|
264
186
|
shading(mode: ShadingMode): Promise<void>;
|
|
265
|
-
/**
|
|
266
|
-
* READ the inspector, as data — the serialized inspection subject
|
|
267
|
-
* (`editor.inspect()`; design: `docs/ARCHITECTURE-CORE.md` §Editor chrome,
|
|
268
|
-
* "The Inspection Model"). This is the Figma-Inspect analog: whatever a
|
|
269
|
-
* human would see in the inspector right now — the subject's identity, its
|
|
270
|
-
* verbs, and every identified section in display order, with a `fields`
|
|
271
|
-
* section's CURRENT VALUES at their scriptable `path`s.
|
|
272
|
-
*
|
|
273
|
-
* Reach for it whenever the next step depends on what an object actually
|
|
274
|
-
* IS: `await editor.select(id)` then `await editor.inspect()` answers "what
|
|
275
|
-
* properties does this thing have, and what are they set to" in one call,
|
|
276
|
-
* against the same model the panel renders — no scene-graph reads, no
|
|
277
|
-
* guessing at property names.
|
|
278
|
-
*
|
|
279
|
-
* When the inspector is showing NOTHING — nothing selected on a surface
|
|
280
|
-
* with no empty-state subject of its own, which is most of them — the answer
|
|
281
|
-
* is `{none: true}`, so "the human sees no inspector" and "the read failed"
|
|
282
|
-
* are never the same value. A surface whose empty space IS a real thing (an
|
|
283
|
-
* open Asset Lab document) still answers with that subject, and never with
|
|
284
|
-
* another surface's.
|
|
285
|
-
*
|
|
286
|
-
* A `custom` section body is a named opaque: the editor renders it with
|
|
287
|
-
* React, so the wire reports its identity rather than pretending to describe
|
|
288
|
-
* its rendering — plus, when the section can say what it DISPLAYS, a `data`
|
|
289
|
-
* payload in its own vocabulary (`transform` carries
|
|
290
|
-
* `{position, rotation, scale}`, rotation in Euler XYZ degrees).
|
|
291
|
-
*/
|
|
292
187
|
inspect(): Promise<InspectedInspection>;
|
|
293
188
|
/** Run one verb listed by `inspect().quickActions`, through the same action
|
|
294
189
|
* the human Inspector button invokes. */
|
|
295
190
|
runAction(actionId: string): Promise<InspectedInspection>;
|
|
296
191
|
/**
|
|
297
|
-
* Run
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
* onto the one view-verb table — this one and `editor.viewVerb(view, verb)`,
|
|
301
|
-
* which addressed the same registry by its two halves. A second addressing
|
|
302
|
-
* of one table is a second name for one thing, and an agent reading
|
|
303
|
-
* `--list` had to choose between them with nothing to choose on. This door
|
|
304
|
-
* stays because it is strictly wider: it addresses a COMMAND ID, so under
|
|
305
|
-
* the frame it reaches everything the workbench knows — a `volter.action.<id>`
|
|
306
|
-
* editor action, one of VS Code's own — and not only a view. A VIEW is
|
|
307
|
-
* reached by spelling its verb's command id:
|
|
308
|
-
*
|
|
309
|
-
* await editor.command('volter.blender-uv-view.state')
|
|
310
|
-
* await editor.command('volter.blender-uv-view.zoom', { to: 600 })
|
|
192
|
+
* Run a command by id. Under the native frame this uses ICommandService and
|
|
193
|
+
* can invoke editor or VS Code commands. Standalone sessions resolve registered
|
|
194
|
+
* view verbs of the form `volter.<view>.<verb>` and refuse other ids.
|
|
311
195
|
*
|
|
312
|
-
*
|
|
313
|
-
* await editor.command('volter.blender-node-view.look', { node: 'Principled BSDF' })
|
|
314
|
-
*
|
|
315
|
-
* Under the Code-OSS frame this is the workbench's own command service, so
|
|
316
|
-
* any command id works — ours and VS Code's alike. Standalone the editor's `edit` command
|
|
317
|
-
* has no command service and answers the `volter.<view>.<verb>` shape off the
|
|
318
|
-
* SAME verb table the frame's commands call, refusing any other id by name.
|
|
319
|
-
* One table, two doors, exactly like the keymap's.
|
|
320
|
-
*
|
|
321
|
-
* Answers with whatever the command returned — a view verb's own state, or
|
|
322
|
-
* `null` for a command that returns nothing.
|
|
196
|
+
* Returns the command’s result, or `null` when it returns nothing.
|
|
323
197
|
*/
|
|
324
198
|
command(commandId: string, args?: unknown): Promise<unknown>;
|
|
325
199
|
/**
|
|
@@ -332,11 +206,6 @@ export declare class LiveEditor {
|
|
|
332
206
|
* helpers the menu items call, so there is one implementation of each op and
|
|
333
207
|
* not a second that can disagree with what a human gets.
|
|
334
208
|
*
|
|
335
|
-
* It exists because the menu is a POINTER surface: every one of these ops was
|
|
336
|
-
* reachable only by right-clicking a hierarchy row, which is nothing an agent
|
|
337
|
-
* can do — so for an ingest root, whose only authoring surface IS the editor,
|
|
338
|
-
* structure was closed entirely.
|
|
339
|
-
*
|
|
340
209
|
* `id`/`ids` default to the current selection. The answer carries the same
|
|
341
210
|
* per-edit `write` ack `setField` does, so `write.persisted` tells a saved
|
|
342
211
|
* restructure from a live-only one. An op the active adapter does not provide
|
|
@@ -371,23 +240,14 @@ export declare class LiveEditor {
|
|
|
371
240
|
*
|
|
372
241
|
* The companion to {@link inspect}: that one answers "what IS the selected
|
|
373
242
|
* thing", this one answers "what does the tree LOOK LIKE". It is the panel's
|
|
374
|
-
* own
|
|
375
|
-
*
|
|
376
|
-
* instanced pools), after the internals reveal, the document promotion, the
|
|
377
|
-
* child cap, the collapse state, the search filter and the selection scope.
|
|
378
|
-
*
|
|
379
|
-
* Works in play mode and edit mode; the answer says which (`playState`,
|
|
380
|
-
* `activeViewportTab`), because the two are different adapters and a tree
|
|
381
|
-
* that looks wrong is very often the wrong adapter's tree.
|
|
243
|
+
* own projection of component marks, document promotion, child caps,
|
|
244
|
+
* collapse state, search and selection scope onto the adapter tree.
|
|
382
245
|
*
|
|
383
246
|
* Prefer this over `status().entities`, which is deliberately a different
|
|
384
247
|
* question — the RAW adapter tree, unprojected. A panel that renders the
|
|
385
248
|
* wrong rows looks perfectly healthy in that facet.
|
|
386
249
|
*
|
|
387
|
-
* Each row
|
|
388
|
-
* (what is folded behind "Reveal Internals") and `expandable` (whether the
|
|
389
|
-
* panel draws a caret at all), so "this subtree exists but nothing in the UI
|
|
390
|
-
* opens it" is a fact you can read rather than one you have to notice.
|
|
250
|
+
* Each row reports the projected child count and whether the panel draws a disclosure control.
|
|
391
251
|
*
|
|
392
252
|
* Rejects, naming the panel, when no hierarchy panel is mounted — an empty
|
|
393
253
|
* tree would be a fabricated answer about a surface nobody is being shown.
|
|
@@ -426,7 +286,9 @@ export declare class LiveEditor {
|
|
|
426
286
|
* seam to report, not a removal that failed.
|
|
427
287
|
*/
|
|
428
288
|
removeField(path: string): Promise<InspectedFieldWrite>;
|
|
429
|
-
/** Open a document by its adapter-declared id, through its registered owner.
|
|
289
|
+
/** Open a document by its adapter-declared id, through its registered owner. An id the adapter would list for a
|
|
290
|
+
* file not written yet (a new model, `model:prefabs/coin/coin.blend`) opens as that new document, written by its
|
|
291
|
+
* first save. */
|
|
430
292
|
open(id: string): Promise<OpenedDocument>;
|
|
431
293
|
/** Undo / redo one project transaction, through the session's own history
|
|
432
294
|
* queue — the same one the keyboard shortcut drives. */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Node session clients need explicit header deadlines for long modeling calls.
|
|
2
|
+
* Some runtimes supply an undici-compatible Agent without destroy(); callers
|
|
3
|
+
* close explicitly when that lifecycle method exists. */
|
|
4
|
+
import { type Dispatcher } from 'undici';
|
|
5
|
+
export declare function createDispatcher(timeoutMs: number): Dispatcher;
|
|
6
|
+
export declare function dispatchFetch(url: string, init?: RequestInit, dispatcher?: Dispatcher): Promise<Response>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { LiveEditor } from './editor.js';
|
|
2
|
-
import { LiveTools } from './tools.js';
|
|
3
2
|
import { type ResolvedSession, type SessionResolutionDeps } from './session.js';
|
|
4
3
|
export { LiveEditor, inferAssetKind, type PanelName } from './editor.js';
|
|
5
4
|
export { LiveEditorDocument } from './editor-document.js';
|
|
5
|
+
export type { AssetDownloadRequest, AssetDownloadResult, AssetFileOption, AssetSearchQuery, OnlineAsset } from './asset-library.js';
|
|
6
6
|
export type { DocumentGestureOptions, DocumentKeyOptions, DocumentPasteOptions } from './editor-document.js';
|
|
7
|
-
export { LiveTools } from './tools.js';
|
|
8
7
|
export { editorMemberHint, withEditorMemberHints } from './member-hints.js';
|
|
9
|
-
export { resolveSession, findProjectRootFrom, NO_SESSION_FOR_PROJECT } from './session.js';
|
|
10
|
-
export type { ResolvedSession, SessionResolutionDeps, SessionListingTransport
|
|
8
|
+
export { resolveSession, findProjectRootFrom, NO_SESSION_FOR_PROJECT, SESSION_MANIFEST_UNREADABLE } from './session.js';
|
|
9
|
+
export type { ResolvedSession, SessionResolutionDeps, SessionListingTransport } from './session.js';
|
|
11
10
|
export type { ActiveDocumentCapture, EditorView, PresentedEditorView } from '@volter/sdk';
|
|
12
11
|
export interface LiveBindings {
|
|
13
12
|
editor: LiveEditor;
|
|
14
|
-
tools: LiveTools;
|
|
15
13
|
}
|
|
16
14
|
export interface LiveSession extends LiveBindings {
|
|
17
15
|
session: ResolvedSession;
|
|
@@ -21,4 +19,3 @@ export declare function unconnectedBindings(): LiveBindings;
|
|
|
21
19
|
/** Attach only to the session serving the requested project's canonical path. */
|
|
22
20
|
export declare function connect(projectDir?: string, deps?: SessionResolutionDeps): Promise<LiveSession>;
|
|
23
21
|
export declare const editor: LiveEditor;
|
|
24
|
-
export declare const tools: LiveTools;
|