@volter/editor-live 0.5.67 → 0.5.69
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 +6 -5
- package/dist/editor-document.d.ts +8 -4
- package/dist/editor.d.ts +13 -13
- package/dist/index.js +59 -54
- package/dist/index.js.map +2 -2
- package/dist/session.d.ts +2 -2
- package/dist/tools.d.ts +1 -1
- package/package.json +3 -3
- package/src/editor-document.ts +19 -7
- package/src/editor.ts +13 -13
- package/src/session.ts +9 -9
- package/src/tools.ts +1 -1
package/BUNDLED_NOTICES
CHANGED
|
@@ -3,9 +3,9 @@ Bundled license notices
|
|
|
3
3
|
These notices accompany code incorporated into this package. Separate npm dependencies retain their own licenses.
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
@volter/editor-project@0.5.
|
|
6
|
+
@volter/editor-project@0.5.69
|
|
7
7
|
Declared license: Apache-2.0
|
|
8
|
-
Source: the unmodified npm package @volter/editor-project@0.5.
|
|
8
|
+
Source: the unmodified npm package @volter/editor-project@0.5.69, from https://github.com/volter-ai/editor.git
|
|
9
9
|
|
|
10
10
|
--- packages/editor-project/LICENSE ---
|
|
11
11
|
|
|
@@ -213,9 +213,9 @@ Source: the unmodified npm package @volter/editor-project@0.5.67, from https://g
|
|
|
213
213
|
limitations under the License.
|
|
214
214
|
|
|
215
215
|
|
|
216
|
-
@volter/editor-sdk@0.5.
|
|
216
|
+
@volter/editor-sdk@0.5.69
|
|
217
217
|
Declared license: Apache-2.0
|
|
218
|
-
Source: the unmodified npm package @volter/editor-sdk@0.5.
|
|
218
|
+
Source: the unmodified npm package @volter/editor-sdk@0.5.69, from https://github.com/volter-ai/editor.git
|
|
219
219
|
|
|
220
220
|
--- packages/editor-sdk/LICENSE ---
|
|
221
221
|
|
|
@@ -428,7 +428,8 @@ Source: the unmodified npm package @volter/editor-sdk@0.5.67, from https://githu
|
|
|
428
428
|
Copyright 2026 Volter AI, Inc.
|
|
429
429
|
|
|
430
430
|
Project tool registry, provider execution and related types were transferred
|
|
431
|
-
from the Apache-2.0
|
|
431
|
+
from the Apache-2.0 SDK package of volter-ai/volter-engine. Original source
|
|
432
|
+
hashes and revision are
|
|
432
433
|
recorded in provenance/editor-server.json.
|
|
433
434
|
|
|
434
435
|
The project output-root policy is Apache-2.0, transferred from the original
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* active; `editor.hierarchy()` / `editor.inspect()` keep answering what those
|
|
29
29
|
* panels RESOLVED, where this door answers what they DREW.
|
|
30
30
|
*
|
|
31
|
-
* A field on `LiveEditor` rather than methods on it, so `
|
|
31
|
+
* A field on `LiveEditor` rather than methods on it, so the editor's `eval --list` command
|
|
32
32
|
* shows the verbs as one named surface — the same reason `game.input`
|
|
33
33
|
* and `game.events` are instance fields.
|
|
34
34
|
*/
|
|
@@ -74,13 +74,13 @@ export declare class LiveEditorDocument {
|
|
|
74
74
|
* `styles` additionally resolves named properties per match — and resolving
|
|
75
75
|
* is the point, because a theme token is an expression until an element
|
|
76
76
|
* paints it. Ask for the standard property to learn the colour a person
|
|
77
|
-
* sees; ask for a `--
|
|
77
|
+
* sees; ask for a `--volter-…` custom property to learn what a rule WOULD
|
|
78
78
|
* paint, which is the only way to measure a `:hover` colour (`:hover` is a
|
|
79
79
|
* browser state no synthetic event can enter, so there is deliberately no
|
|
80
80
|
* hover verb on this door).
|
|
81
81
|
*
|
|
82
|
-
* await editor.document.query('.
|
|
83
|
-
* styles: ['backgroundColor', '--
|
|
82
|
+
* await editor.document.query('.volter-tree-row', {
|
|
83
|
+
* styles: ['backgroundColor', '--volter-widget-regular-hover'],
|
|
84
84
|
* });
|
|
85
85
|
*/
|
|
86
86
|
query(selector: string, options?: DocumentScopeOption & {
|
|
@@ -92,6 +92,10 @@ export declare class LiveEditorDocument {
|
|
|
92
92
|
click(selector: string, options?: DocumentGestureOptions & {
|
|
93
93
|
clicks?: number;
|
|
94
94
|
at?: [number, number];
|
|
95
|
+
altKey?: boolean;
|
|
96
|
+
ctrlKey?: boolean;
|
|
97
|
+
metaKey?: boolean;
|
|
98
|
+
shiftKey?: boolean;
|
|
95
99
|
}): Promise<DocumentProbeResult>;
|
|
96
100
|
/**
|
|
97
101
|
* TYPE into a field and commit with Enter, the way a person does — one
|
package/dist/editor.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare class LiveEditor {
|
|
|
35
35
|
* `blender-execute`, `blender-scene-info`, `blender-object-info`,
|
|
36
36
|
* `blender-screenshot-view`, `blender-read-file`, `blender-write-file`,
|
|
37
37
|
* `blender-list-files`, `blender-stop` and `blender-status`. They were
|
|
38
|
-
* reachable from `@volter/editor-sdk` and through `
|
|
38
|
+
* reachable from `@volter/editor-sdk` and through `volter blender-mcp` but from
|
|
39
39
|
* no GENERAL door, so driving a session meant writing an MCP client script
|
|
40
40
|
* per question — the same discovery failure `eval-surface.ts`'s header
|
|
41
41
|
* records, in a lane that had not noticed it yet.
|
|
@@ -76,7 +76,7 @@ export declare class LiveEditor {
|
|
|
76
76
|
captureActiveDocument(size?: CaptureDimensions, view?: EditorView): Promise<ActiveDocumentCapture>;
|
|
77
77
|
/**
|
|
78
78
|
* Photograph the editor PAGE — every panel, tab strip and viewport as the
|
|
79
|
-
* person sees it. `
|
|
79
|
+
* person sees it. the editor's `screenshot editor` command is this verb from the shell. The
|
|
80
80
|
* one door for judging chrome sighted: a skin, a workspace arrangement or a
|
|
81
81
|
* contributed panel is looked at through this, never guessed at from DOM
|
|
82
82
|
* probes. The page at its own layout, `scale` output pixels per CSS pixel
|
|
@@ -85,11 +85,11 @@ export declare class LiveEditor {
|
|
|
85
85
|
* at, and the result reports its own `size` and `scale`.
|
|
86
86
|
*/
|
|
87
87
|
captureEditorChrome(options?: EditorChromeCaptureOptions): Promise<EditorChromeCapture>;
|
|
88
|
-
/** `'all'` -> `EditorClient.selectAll()` (mirrors `
|
|
88
|
+
/** `'all'` -> `EditorClient.selectAll()` (mirrors `volter select --all`); otherwise `EditorClient.select(id)` (mirrors `volter select <entityId>`). */
|
|
89
89
|
select(id: string | 'all'): Promise<void>;
|
|
90
|
-
/** Mirrors `
|
|
90
|
+
/** Mirrors `volter deselect`. */
|
|
91
91
|
deselect(): Promise<void>;
|
|
92
|
-
/** No `id` -> focus the current selection (mirrors bare `
|
|
92
|
+
/** No `id` -> focus the current selection (mirrors bare `volter focus`); `id` given -> focus that entity. */
|
|
93
93
|
focus(id?: string): Promise<void>;
|
|
94
94
|
/**
|
|
95
95
|
* Frame the edit viewport camera on one entity. Same framing as
|
|
@@ -274,19 +274,19 @@ export declare class LiveEditor {
|
|
|
274
274
|
* of one table is a second name for one thing, and an agent reading
|
|
275
275
|
* `--list` had to choose between them with nothing to choose on. This door
|
|
276
276
|
* stays because it is strictly wider: it addresses a COMMAND ID, so under
|
|
277
|
-
* the frame it reaches everything the workbench knows — a `
|
|
277
|
+
* the frame it reaches everything the workbench knows — a `volter.action.<id>`
|
|
278
278
|
* editor action, one of VS Code's own — and not only a view. A VIEW is
|
|
279
279
|
* reached by spelling its verb's command id:
|
|
280
280
|
*
|
|
281
|
-
* await editor.command('
|
|
282
|
-
* await editor.command('
|
|
281
|
+
* await editor.command('volter.blender-uv-view.state')
|
|
282
|
+
* await editor.command('volter.blender-uv-view.zoom', { to: 600 })
|
|
283
283
|
*
|
|
284
|
-
* await editor.command('
|
|
285
|
-
* await editor.command('
|
|
284
|
+
* await editor.command('volter.blender-node-view.view-all')
|
|
285
|
+
* await editor.command('volter.blender-node-view.look', { node: 'Principled BSDF' })
|
|
286
286
|
*
|
|
287
287
|
* Under the Code-OSS frame this is the workbench's own command service, so
|
|
288
|
-
* any command id works — ours and VS Code's alike. Standalone `
|
|
289
|
-
* has no command service and answers the `
|
|
288
|
+
* any command id works — ours and VS Code's alike. Standalone the editor's `edit` command
|
|
289
|
+
* has no command service and answers the `volter.<view>.<verb>` shape off the
|
|
290
290
|
* SAME verb table the frame's commands call, refusing any other id by name.
|
|
291
291
|
* One table, two doors, exactly like the keymap's.
|
|
292
292
|
*
|
|
@@ -406,7 +406,7 @@ export declare class LiveEditor {
|
|
|
406
406
|
redo(): Promise<HistoryStep>;
|
|
407
407
|
/** Reload the editor's page and resolve once the new document answers. */
|
|
408
408
|
reloadPage(): Promise<void>;
|
|
409
|
-
/** Mirrors `
|
|
409
|
+
/** Mirrors the editor's `status` command — the full live editor state as JSON. */
|
|
410
410
|
status(): Promise<EditorState>;
|
|
411
411
|
/** A live viewport PNG (`EditorClient.captureViewport`) — no direct CLI verb exists; this is the closest wire read. */
|
|
412
412
|
screenshot(size?: number): Promise<ViewportCapture>;
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var EditorCommandError = class extends Error {
|
|
|
27
27
|
* the receipt window closing unanswered, a beating-but-dead tab, and no tab
|
|
28
28
|
* present at all. The last four can fail in milliseconds.
|
|
29
29
|
*
|
|
30
|
-
* A caller that converges by retrying (`
|
|
30
|
+
* A caller that converges by retrying (the editor's `restart` command) needs the distinction
|
|
31
31
|
* because a refusal the editor ANSWERED may go differently next time, while
|
|
32
32
|
* a command the relay abandoned tells you nothing new on a second identical
|
|
33
33
|
* attempt — and when the abandonment was a 120s budget, re-running it three
|
|
@@ -205,22 +205,22 @@ var EditorClient = class {
|
|
|
205
205
|
return data;
|
|
206
206
|
}
|
|
207
207
|
// --- Play control ---
|
|
208
|
-
/** `opts.seed` (D15/T-D15.6, objection-4 fix) — `
|
|
208
|
+
/** `opts.seed` (D15/T-D15.6, objection-4 fix) — the editor's `play --seed <n>` command's
|
|
209
209
|
* explicit config leg, relayed as `cmd['seed']`; `handleCommand`'s
|
|
210
210
|
* `'play'` case threads it into `enterPlayMode`'s highest-precedence seed
|
|
211
|
-
* argument (beats manifest.determinism.defaultSeed/?
|
|
211
|
+
* argument (beats manifest.determinism.defaultSeed/?volter-seed=). Omitted,
|
|
212
212
|
* boot seeding falls back to that precedence unchanged.
|
|
213
213
|
*
|
|
214
|
-
* `opts.name` (`
|
|
214
|
+
* `opts.name` (the editor's `play --name <text>` command) — an OPTIONAL label for this run,
|
|
215
215
|
* relayed as `cmd['name']` and slugified server-side into the run's
|
|
216
216
|
* `logs/play-*.jsonl` filename and its session-journal line. Findability
|
|
217
217
|
* only: no registry, no uniqueness, no lookup verb — grep and `ls` are the
|
|
218
218
|
* query engine. Omitted, the filename keeps its exact unnamed shape. */
|
|
219
|
-
/* `opts.record` (`
|
|
219
|
+
/* `opts.record` (the editor's `play --record <name>` command) — NAMES this run's recording
|
|
220
220
|
* file. It does not ENABLE recording: every relayed play records, with no
|
|
221
|
-
* flag (see `@
|
|
221
|
+
* flag (see `@volter/game`'s `src/play/play-recording.ts`). Omitted, the clip is named for
|
|
222
222
|
* the durable Gameplay Session; named, it becomes an explicit keepsake in
|
|
223
|
-
* `.
|
|
223
|
+
* `.volter/recordings/<name>.webm`. */
|
|
224
224
|
async play(opts) {
|
|
225
225
|
return this.command({
|
|
226
226
|
type: "play",
|
|
@@ -321,9 +321,9 @@ var EditorClient = class {
|
|
|
321
321
|
return { base64: data.base64, mimeType: data.mimeType };
|
|
322
322
|
}
|
|
323
323
|
/**
|
|
324
|
-
* Unit 4 (live-front-door wave) — capture the RUNNING GAME (
|
|
325
|
-
* screenshot`'s wire leg). Sends the SAME `bridge-screenshot` relay op
|
|
326
|
-
* `@
|
|
324
|
+
* Unit 4 (live-front-door wave) — capture the RUNNING GAME (the editor's
|
|
325
|
+
* `screenshot`'s wire leg). Sends the SAME `bridge-screenshot` relay op
|
|
326
|
+
* `@volter/live`'s `RelayTransport.screenshot` (and therefore
|
|
327
327
|
* `game.screenshot()` on the relay path) already sends, so all three
|
|
328
328
|
* surfaces composite the identical full game stack — canvas(es) plus the
|
|
329
329
|
* HUD/react DOM layers — rather than any of them inventing a second,
|
|
@@ -341,8 +341,8 @@ var EditorClient = class {
|
|
|
341
341
|
* refuses it with `BRIDGE_SCREENSHOT_STALE` rather than pass it off as
|
|
342
342
|
* current. Setting this asks the relay to render exactly ONE deterministic
|
|
343
343
|
* tick (`runTicks(1, {render:'last'})`) first — the same escape
|
|
344
|
-
* `@
|
|
345
|
-
* `
|
|
344
|
+
* `@volter/live`'s `RelayTransport.screenshot` has always used, which is why
|
|
345
|
+
* the editor's `eval` command could recover these frames while the editor's `screenshot` command could not.
|
|
346
346
|
* Off by default: a caller who does not ask must never be handed a frame
|
|
347
347
|
* that only exists because the capture drove the game.
|
|
348
348
|
*/
|
|
@@ -427,8 +427,8 @@ var EditorClient = class {
|
|
|
427
427
|
...source,
|
|
428
428
|
...options
|
|
429
429
|
},
|
|
430
|
-
// Photographing changes nothing, and this is the relay `
|
|
431
|
-
// <module>`
|
|
430
|
+
// Photographing changes nothing, and this is the relay the editor's `screenshot
|
|
431
|
+
// <module>` command and `project.bake.preview` ride — the lane where a momentary
|
|
432
432
|
// transport failure cost a cold agent three probe modules.
|
|
433
433
|
{ retryTransport: true }
|
|
434
434
|
);
|
|
@@ -442,7 +442,7 @@ var EditorClient = class {
|
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
/**
|
|
445
|
-
* A project-defined labeled shot set (`
|
|
445
|
+
* A project-defined labeled shot set (the editor's `screenshot <target> --shots <set>` command):
|
|
446
446
|
* the DEFINITION travels with the command (project data — see
|
|
447
447
|
* `AssetPreviewShotSetDefinition`; the CLI resolves it from the registered
|
|
448
448
|
* `project.<set>.previewShots` tool), and the editor's generic
|
|
@@ -471,8 +471,8 @@ var EditorClient = class {
|
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
473
|
/**
|
|
474
|
-
* B8.4 — score the asset against a reference GLB (`
|
|
475
|
-
* <model.glb> --compare <ref.glb>`): matched orthographic front + side silhouettes
|
|
474
|
+
* B8.4 — score the asset against a reference GLB (the editor's `screenshot
|
|
475
|
+
* <model.glb> --compare <ref.glb>` command): matched orthographic front + side silhouettes
|
|
476
476
|
* (equal-height bounding-box framing, both yaw-normalized to face the
|
|
477
477
|
* camera), per-view IoU numbers, and overlay evidence images. The
|
|
478
478
|
* reference GLB's raw bytes travel base64 in the command; the editor
|
|
@@ -489,7 +489,7 @@ var EditorClient = class {
|
|
|
489
489
|
return { width: data.width, height: data.height, views: data.views };
|
|
490
490
|
}
|
|
491
491
|
/**
|
|
492
|
-
* The STORY lane (`
|
|
492
|
+
* The STORY lane (the editor's `screenshot <file>.stories.tsx` command): every CSF export of
|
|
493
493
|
* one project story file rendered in the live session's DOM and captured
|
|
494
494
|
* through the same composite leg {@link captureGame} uses, returned as
|
|
495
495
|
* per-export images plus one variant sheet. `options.story` narrows to a
|
|
@@ -621,9 +621,9 @@ var EditorClient = class {
|
|
|
621
621
|
* Run ONE command by id — the door to everything the command palette lists.
|
|
622
622
|
*
|
|
623
623
|
* Under the Code-OSS frame this is the workbench's own `ICommandService`, so
|
|
624
|
-
* any command id works: a view's `
|
|
625
|
-
* `
|
|
626
|
-
* command service and answers the `
|
|
624
|
+
* any command id works: a view's `volter.<view>.<verb>`, an editor action's
|
|
625
|
+
* `volter.action.<id>`, or one of VS Code's own. Standalone the editor's `edit` command has no
|
|
626
|
+
* command service and answers the `volter.<view>.<verb>` shape directly off
|
|
627
627
|
* the views registry, refusing anything else BY NAME.
|
|
628
628
|
*
|
|
629
629
|
* The result is whatever the command answered — a view verb's state, or
|
|
@@ -819,7 +819,7 @@ var EditorClient = class {
|
|
|
819
819
|
* `blender-object-info`, `blender-screenshot-view`, `blender-read-file`,
|
|
820
820
|
* `blender-write-file`, `blender-list-files`, `blender-start`,
|
|
821
821
|
* `blender-status`): Blender runs in the editor tab's worker, and
|
|
822
|
-
* `
|
|
822
|
+
* `volter blender-mcp` is transport onto these. `blender-status` is the only
|
|
823
823
|
* one that creates nothing — it answers whether this tab already has a
|
|
824
824
|
* session, which is how a caller survives an editor restart.
|
|
825
825
|
*/
|
|
@@ -893,7 +893,7 @@ var EditorClient = class {
|
|
|
893
893
|
return data.projects;
|
|
894
894
|
}
|
|
895
895
|
// --- Registered project tools ---
|
|
896
|
-
/** List tools explicitly registered in `package.json#
|
|
896
|
+
/** List tools explicitly registered in `package.json#volter.tools`.
|
|
897
897
|
* The editor server loads callable metadata in Node; modules never enter the
|
|
898
898
|
* editor browser merely because they were listed. */
|
|
899
899
|
async listProjectTools() {
|
|
@@ -1149,13 +1149,13 @@ var LiveEditorDocument = class {
|
|
|
1149
1149
|
* `styles` additionally resolves named properties per match — and resolving
|
|
1150
1150
|
* is the point, because a theme token is an expression until an element
|
|
1151
1151
|
* paints it. Ask for the standard property to learn the colour a person
|
|
1152
|
-
* sees; ask for a `--
|
|
1152
|
+
* sees; ask for a `--volter-…` custom property to learn what a rule WOULD
|
|
1153
1153
|
* paint, which is the only way to measure a `:hover` colour (`:hover` is a
|
|
1154
1154
|
* browser state no synthetic event can enter, so there is deliberately no
|
|
1155
1155
|
* hover verb on this door).
|
|
1156
1156
|
*
|
|
1157
|
-
* await editor.document.query('.
|
|
1158
|
-
* styles: ['backgroundColor', '--
|
|
1157
|
+
* await editor.document.query('.volter-tree-row', {
|
|
1158
|
+
* styles: ['backgroundColor', '--volter-widget-regular-hover'],
|
|
1159
1159
|
* });
|
|
1160
1160
|
*/
|
|
1161
1161
|
async query(selector, options) {
|
|
@@ -1170,15 +1170,20 @@ var LiveEditorDocument = class {
|
|
|
1170
1170
|
/** A REAL pointer gesture (pointerdown/mousedown/focus/pointerup/mouseup/click)
|
|
1171
1171
|
* — not `element.click()`, which a `pointerdown` listener never sees. */
|
|
1172
1172
|
async click(selector, options) {
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1173
|
+
const known = ["scope", "index", "clicks", "at", "altKey", "ctrlKey", "metaKey", "shiftKey"];
|
|
1174
|
+
const unknown = Object.keys(options ?? {}).filter((key) => !known.includes(key));
|
|
1175
|
+
if (unknown.length > 0) throw new Error(`click has no option ${unknown.map((key) => `\`${key}\``).join(", ")}; its options are scope, index, clicks, at ([x, y] fractions of the element's box) and the modifier keys altKey, ctrlKey, metaKey and shiftKey.`);
|
|
1175
1176
|
return this.#probe({
|
|
1176
1177
|
action: "click",
|
|
1177
1178
|
selector,
|
|
1178
1179
|
...options?.scope === void 0 ? {} : { scope: options.scope },
|
|
1179
1180
|
...options?.index === void 0 ? {} : { index: options.index },
|
|
1180
1181
|
...options?.clicks === void 0 ? {} : { clicks: options.clicks },
|
|
1181
|
-
...options?.at === void 0 ? {} : { at: options.at }
|
|
1182
|
+
...options?.at === void 0 ? {} : { at: options.at },
|
|
1183
|
+
...options?.altKey ? { altKey: true } : {},
|
|
1184
|
+
...options?.ctrlKey ? { ctrlKey: true } : {},
|
|
1185
|
+
...options?.metaKey ? { metaKey: true } : {},
|
|
1186
|
+
...options?.shiftKey ? { shiftKey: true } : {}
|
|
1182
1187
|
});
|
|
1183
1188
|
}
|
|
1184
1189
|
/**
|
|
@@ -1338,7 +1343,7 @@ var LiveEditor = class {
|
|
|
1338
1343
|
* `blender-execute`, `blender-scene-info`, `blender-object-info`,
|
|
1339
1344
|
* `blender-screenshot-view`, `blender-read-file`, `blender-write-file`,
|
|
1340
1345
|
* `blender-list-files`, `blender-stop` and `blender-status`. They were
|
|
1341
|
-
* reachable from `@volter/editor-sdk` and through `
|
|
1346
|
+
* reachable from `@volter/editor-sdk` and through `volter blender-mcp` but from
|
|
1342
1347
|
* no GENERAL door, so driving a session meant writing an MCP client script
|
|
1343
1348
|
* per question — the same discovery failure `eval-surface.ts`'s header
|
|
1344
1349
|
* records, in a lane that had not noticed it yet.
|
|
@@ -1390,7 +1395,7 @@ var LiveEditor = class {
|
|
|
1390
1395
|
}
|
|
1391
1396
|
/**
|
|
1392
1397
|
* Photograph the editor PAGE — every panel, tab strip and viewport as the
|
|
1393
|
-
* person sees it. `
|
|
1398
|
+
* person sees it. the editor's `screenshot editor` command is this verb from the shell. The
|
|
1394
1399
|
* one door for judging chrome sighted: a skin, a workspace arrangement or a
|
|
1395
1400
|
* contributed panel is looked at through this, never guessed at from DOM
|
|
1396
1401
|
* probes. The page at its own layout, `scale` output pixels per CSS pixel
|
|
@@ -1401,7 +1406,7 @@ var LiveEditor = class {
|
|
|
1401
1406
|
async captureEditorChrome(options) {
|
|
1402
1407
|
return this.#client.captureEditorChrome(options);
|
|
1403
1408
|
}
|
|
1404
|
-
/** `'all'` -> `EditorClient.selectAll()` (mirrors `
|
|
1409
|
+
/** `'all'` -> `EditorClient.selectAll()` (mirrors `volter select --all`); otherwise `EditorClient.select(id)` (mirrors `volter select <entityId>`). */
|
|
1405
1410
|
async select(id) {
|
|
1406
1411
|
if (id === "all") {
|
|
1407
1412
|
await this.#client.selectAll();
|
|
@@ -1409,11 +1414,11 @@ var LiveEditor = class {
|
|
|
1409
1414
|
}
|
|
1410
1415
|
await this.#client.select(id);
|
|
1411
1416
|
}
|
|
1412
|
-
/** Mirrors `
|
|
1417
|
+
/** Mirrors `volter deselect`. */
|
|
1413
1418
|
async deselect() {
|
|
1414
1419
|
await this.#client.select(null);
|
|
1415
1420
|
}
|
|
1416
|
-
/** No `id` -> focus the current selection (mirrors bare `
|
|
1421
|
+
/** No `id` -> focus the current selection (mirrors bare `volter focus`); `id` given -> focus that entity. */
|
|
1417
1422
|
async focus(id) {
|
|
1418
1423
|
if (id !== void 0) {
|
|
1419
1424
|
await this.#client.focusEntity(id);
|
|
@@ -1636,19 +1641,19 @@ var LiveEditor = class {
|
|
|
1636
1641
|
* of one table is a second name for one thing, and an agent reading
|
|
1637
1642
|
* `--list` had to choose between them with nothing to choose on. This door
|
|
1638
1643
|
* stays because it is strictly wider: it addresses a COMMAND ID, so under
|
|
1639
|
-
* the frame it reaches everything the workbench knows — a `
|
|
1644
|
+
* the frame it reaches everything the workbench knows — a `volter.action.<id>`
|
|
1640
1645
|
* editor action, one of VS Code's own — and not only a view. A VIEW is
|
|
1641
1646
|
* reached by spelling its verb's command id:
|
|
1642
1647
|
*
|
|
1643
|
-
* await editor.command('
|
|
1644
|
-
* await editor.command('
|
|
1648
|
+
* await editor.command('volter.blender-uv-view.state')
|
|
1649
|
+
* await editor.command('volter.blender-uv-view.zoom', { to: 600 })
|
|
1645
1650
|
*
|
|
1646
|
-
* await editor.command('
|
|
1647
|
-
* await editor.command('
|
|
1651
|
+
* await editor.command('volter.blender-node-view.view-all')
|
|
1652
|
+
* await editor.command('volter.blender-node-view.look', { node: 'Principled BSDF' })
|
|
1648
1653
|
*
|
|
1649
1654
|
* Under the Code-OSS frame this is the workbench's own command service, so
|
|
1650
|
-
* any command id works — ours and VS Code's alike. Standalone `
|
|
1651
|
-
* has no command service and answers the `
|
|
1655
|
+
* any command id works — ours and VS Code's alike. Standalone the editor's `edit` command
|
|
1656
|
+
* has no command service and answers the `volter.<view>.<verb>` shape off the
|
|
1652
1657
|
* SAME verb table the frame's commands call, refusing any other id by name.
|
|
1653
1658
|
* One table, two doors, exactly like the keymap's.
|
|
1654
1659
|
*
|
|
@@ -1789,7 +1794,7 @@ var LiveEditor = class {
|
|
|
1789
1794
|
async reloadPage() {
|
|
1790
1795
|
await this.#client.reloadPage();
|
|
1791
1796
|
}
|
|
1792
|
-
/** Mirrors `
|
|
1797
|
+
/** Mirrors the editor's `status` command — the full live editor state as JSON. */
|
|
1793
1798
|
async status() {
|
|
1794
1799
|
return this.#client.getState();
|
|
1795
1800
|
}
|
|
@@ -1806,7 +1811,7 @@ var LiveTools = class {
|
|
|
1806
1811
|
constructor(client) {
|
|
1807
1812
|
this.#client = client;
|
|
1808
1813
|
}
|
|
1809
|
-
/** Enumerate the exact `package.json#
|
|
1814
|
+
/** Enumerate the exact `package.json#volter.tools` catalog without executing it. */
|
|
1810
1815
|
async list() {
|
|
1811
1816
|
return this.#client.listProjectTools();
|
|
1812
1817
|
}
|
|
@@ -1873,8 +1878,8 @@ import { existsSync } from "node:fs";
|
|
|
1873
1878
|
import { join } from "node:path";
|
|
1874
1879
|
|
|
1875
1880
|
// ../editor-project/src/manifest/filename.ts
|
|
1876
|
-
var MANIFEST_FILENAME = "
|
|
1877
|
-
var REMOVED_MANIFEST_FILENAME = "
|
|
1881
|
+
var MANIFEST_FILENAME = "volter.project.json";
|
|
1882
|
+
var REMOVED_MANIFEST_FILENAME = "volter.game.json";
|
|
1878
1883
|
function removedManifestFilenameMessage(where) {
|
|
1879
1884
|
return `${where}: found \`${REMOVED_MANIFEST_FILENAME}\` and no \`${MANIFEST_FILENAME}\`. \`${REMOVED_MANIFEST_FILENAME}\` was REMOVED (the legacy-removal doctrine, docs/ARCHITECTURE-CORE.md \xA7Vocabulary) \u2014 nothing reads it any more, and it is deliberately NOT read as a fallback, because a second accepted name is the defect.
|
|
1880
1885
|
Fix: rename it \u2014 \`git mv ${REMOVED_MANIFEST_FILENAME} ${MANIFEST_FILENAME}\`. The contents are unchanged; only the filename moved.`;
|
|
@@ -1896,7 +1901,7 @@ import { existsSync as existsSync2, readFileSync } from "node:fs";
|
|
|
1896
1901
|
import { createRequire } from "node:module";
|
|
1897
1902
|
import { dirname, join as join2 } from "node:path";
|
|
1898
1903
|
import { pathToFileURL } from "node:url";
|
|
1899
|
-
var PRODUCT_DECLARATION_KEY = "
|
|
1904
|
+
var PRODUCT_DECLARATION_KEY = "volter.product";
|
|
1900
1905
|
var PRODUCT_INSTALL_LINES = [
|
|
1901
1906
|
" npm install --save-dev @volter/model-editor",
|
|
1902
1907
|
" npm install --save-dev @volter/game-editor"
|
|
@@ -1911,7 +1916,7 @@ function readProductManifest(packageDir) {
|
|
|
1911
1916
|
} catch {
|
|
1912
1917
|
return null;
|
|
1913
1918
|
}
|
|
1914
|
-
const declared = manifest.
|
|
1919
|
+
const declared = manifest.volter?.product;
|
|
1915
1920
|
if (declared === void 0) return null;
|
|
1916
1921
|
const entry = declared.entry;
|
|
1917
1922
|
if (typeof entry !== "string" || !entry.startsWith("./"))
|
|
@@ -1956,7 +1961,7 @@ function readProductManifest(packageDir) {
|
|
|
1956
1961
|
}
|
|
1957
1962
|
var SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
1958
1963
|
function readProductWorkbench(manifestPath, declared) {
|
|
1959
|
-
const example = ' "
|
|
1964
|
+
const example = ' "volter": { "product": { "workbench": { "release": "<product>-<fork sha 12>-<platform>", "tarballSha256": "<64 hex>" } } }\n`node scripts/workbench/build-release.mjs --publish --out <release dir>` cuts the release and prints exactly that block.';
|
|
1960
1965
|
if (typeof declared !== "object" || declared === null || Array.isArray(declared))
|
|
1961
1966
|
throw new Error(
|
|
1962
1967
|
`${manifestPath} declares ${PRODUCT_DECLARATION_KEY} but its "workbench" is ${JSON.stringify(declared)}. A product IS the Code-OSS workbench it was compiled into, so it names the published release those bytes are:
|
|
@@ -1983,7 +1988,7 @@ ${example}`
|
|
|
1983
1988
|
);
|
|
1984
1989
|
return { release, tarballSha256 };
|
|
1985
1990
|
}
|
|
1986
|
-
function
|
|
1991
|
+
function declaredVolterPackages(projectRoot) {
|
|
1987
1992
|
let manifest;
|
|
1988
1993
|
try {
|
|
1989
1994
|
manifest = JSON.parse(
|
|
@@ -2019,7 +2024,7 @@ function locatePackage(projectRoot, name) {
|
|
|
2019
2024
|
}
|
|
2020
2025
|
function declaredProducts(projectRoot) {
|
|
2021
2026
|
const found = [];
|
|
2022
|
-
for (const name of
|
|
2027
|
+
for (const name of declaredVolterPackages(projectRoot)) {
|
|
2023
2028
|
const dir = locatePackage(projectRoot, name);
|
|
2024
2029
|
if (dir === null) continue;
|
|
2025
2030
|
const product = readProductManifest(dir);
|
|
@@ -2059,7 +2064,7 @@ import {
|
|
|
2059
2064
|
} from "node:fs";
|
|
2060
2065
|
import { homedir } from "node:os";
|
|
2061
2066
|
import { join as join3, resolve } from "node:path";
|
|
2062
|
-
var EDITOR_SESSIONS_REGISTRY_FILE = join3(homedir(), ".
|
|
2067
|
+
var EDITOR_SESSIONS_REGISTRY_FILE = join3(homedir(), ".volter", "editor-sessions.json");
|
|
2063
2068
|
function isEditorSessionEntry(v) {
|
|
2064
2069
|
if (typeof v !== "object" || v === null) return false;
|
|
2065
2070
|
const s = v;
|
|
@@ -2185,7 +2190,7 @@ function canonicalPath(path) {
|
|
|
2185
2190
|
function readProjectSession(projectRoot) {
|
|
2186
2191
|
try {
|
|
2187
2192
|
const value = JSON.parse(
|
|
2188
|
-
readFileSync3(join4(projectRoot, ".
|
|
2193
|
+
readFileSync3(join4(projectRoot, ".volter", "session.json"), "utf8")
|
|
2189
2194
|
);
|
|
2190
2195
|
if (typeof value !== "object" || value === null) return null;
|
|
2191
2196
|
const hint = value;
|
|
@@ -2210,7 +2215,7 @@ async function probeServedProject(port) {
|
|
|
2210
2215
|
}
|
|
2211
2216
|
function manifestRefusal(projectRoot, manifestError) {
|
|
2212
2217
|
return new Error(
|
|
2213
|
-
`@volter/editor-live: the editor session for ${projectRoot} is live, but its
|
|
2218
|
+
`@volter/editor-live: the editor session for ${projectRoot} is live, but its volter.project.json does not load, so there is no editor or game to drive \u2014 the editor page is showing this same error. Fix the manifest and retry; the session recovers on save, no restart needed.
|
|
2214
2219
|
${manifestError}`
|
|
2215
2220
|
);
|
|
2216
2221
|
}
|
|
@@ -2240,7 +2245,7 @@ async function resolveSession(projectDir = process.cwd(), deps = {}) {
|
|
|
2240
2245
|
const projectRoot = findRoot(projectDir);
|
|
2241
2246
|
if (projectRoot === null) {
|
|
2242
2247
|
throw new Error(
|
|
2243
|
-
`@volter/editor-live: no
|
|
2248
|
+
`@volter/editor-live: no volter.project.json found in ${projectDir} or any parent directory \u2014 is this a project?`
|
|
2244
2249
|
);
|
|
2245
2250
|
}
|
|
2246
2251
|
const localHint = (deps.readProjectSession ?? readProjectSession)(projectRoot);
|