@volter/editor-blender 0.1.47 → 0.1.48
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-node/serving.mjs
CHANGED
|
@@ -709,6 +709,13 @@ function blenderRoutesPlugin(services) {
|
|
|
709
709
|
return;
|
|
710
710
|
}
|
|
711
711
|
const listed = chunks;
|
|
712
|
+
const ms = {};
|
|
713
|
+
let mark = performance.now();
|
|
714
|
+
const lap = (phase) => {
|
|
715
|
+
const now = performance.now();
|
|
716
|
+
ms[phase] = Math.round(now - mark);
|
|
717
|
+
mark = now;
|
|
718
|
+
};
|
|
712
719
|
const held = heldChunks.get(path) ?? /* @__PURE__ */ new Map();
|
|
713
720
|
const known = committedChunks.get(path);
|
|
714
721
|
let onDisk = null;
|
|
@@ -720,6 +727,7 @@ function blenderRoutesPlugin(services) {
|
|
|
720
727
|
} catch {
|
|
721
728
|
onDisk = null;
|
|
722
729
|
}
|
|
730
|
+
lap("read");
|
|
723
731
|
}
|
|
724
732
|
const parts = [];
|
|
725
733
|
const missing = /* @__PURE__ */ new Set();
|
|
@@ -734,13 +742,16 @@ function blenderRoutesPlugin(services) {
|
|
|
734
742
|
if (reused && sha256(reused) === hash) parts.push(reused);
|
|
735
743
|
else missing.add(hash);
|
|
736
744
|
}
|
|
745
|
+
lap("verify");
|
|
737
746
|
if (missing.size > 0) {
|
|
738
|
-
json(res, { ok: false, missing: [...missing] });
|
|
747
|
+
json(res, { ok: false, missing: [...missing], ms });
|
|
739
748
|
return;
|
|
740
749
|
}
|
|
741
750
|
const body = Buffer.concat(parts);
|
|
751
|
+
lap("concat");
|
|
742
752
|
try {
|
|
743
753
|
const revision = await services.commitProjectMutation(req, [{ path, content: body }]);
|
|
754
|
+
lap("commit");
|
|
744
755
|
heldChunks.delete(path);
|
|
745
756
|
const byHash = /* @__PURE__ */ new Map();
|
|
746
757
|
let offset = 0;
|
|
@@ -756,7 +767,8 @@ function blenderRoutesPlugin(services) {
|
|
|
756
767
|
ok: true,
|
|
757
768
|
bytes: body.byteLength,
|
|
758
769
|
sent: listed.reduce((sum, [hash, length]) => sum + (held.has(hash) ? length : 0), 0),
|
|
759
|
-
revision: revision?.revision ?? null
|
|
770
|
+
revision: revision?.revision ?? null,
|
|
771
|
+
ms
|
|
760
772
|
});
|
|
761
773
|
} catch (error) {
|
|
762
774
|
services.answerProjectMutationError(res, error);
|
|
@@ -1136,6 +1136,7 @@ export async function handleBlenderCommand(cmd: {
|
|
|
1136
1136
|
data: {
|
|
1137
1137
|
started: runtime?.project != null,
|
|
1138
1138
|
document: host.documents.context(presentationDocumentId()) !== undefined,
|
|
1139
|
+
lastOutput: runtime?.lastOutput ?? [],
|
|
1139
1140
|
},
|
|
1140
1141
|
};
|
|
1141
1142
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@volter/editor-blender",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "AGPL-3.0-only AND GPL-3.0-or-later",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.48",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
73
|
-
"@volter/blender-engine": "0.1.
|
|
74
|
-
"@volter/editor-threejs": "0.5.
|
|
73
|
+
"@volter/blender-engine": "0.1.46",
|
|
74
|
+
"@volter/editor-threejs": "0.5.108",
|
|
75
75
|
"zod": "^4.3.6"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@volter/editor-live": "0.5.
|
|
79
|
-
"@volter/editor-project": "0.5.
|
|
80
|
-
"@volter/editor-sdk": "0.5.
|
|
78
|
+
"@volter/editor-live": "0.5.108",
|
|
79
|
+
"@volter/editor-project": "0.5.108",
|
|
80
|
+
"@volter/editor-sdk": "0.5.108",
|
|
81
81
|
"react": "^19.0.0",
|
|
82
82
|
"react-dom": "^19.0.0",
|
|
83
83
|
"three": "^0.180.0",
|
|
@@ -500,6 +500,13 @@ export function blenderRoutesPlugin(services: ProjectServingServices): Plugin {
|
|
|
500
500
|
return;
|
|
501
501
|
}
|
|
502
502
|
const listed = chunks as [string, number][];
|
|
503
|
+
const ms: Record<string, number> = {};
|
|
504
|
+
let mark = performance.now();
|
|
505
|
+
const lap = (phase: string) => {
|
|
506
|
+
const now = performance.now();
|
|
507
|
+
ms[phase] = Math.round(now - mark);
|
|
508
|
+
mark = now;
|
|
509
|
+
};
|
|
503
510
|
const held = heldChunks.get(path) ?? new Map<string, Buffer>();
|
|
504
511
|
// What the document on disk already holds, by hash, re-verified below.
|
|
505
512
|
const known = committedChunks.get(path);
|
|
@@ -512,6 +519,7 @@ export function blenderRoutesPlugin(services: ProjectServingServices): Plugin {
|
|
|
512
519
|
} catch {
|
|
513
520
|
onDisk = null;
|
|
514
521
|
}
|
|
522
|
+
lap('read');
|
|
515
523
|
}
|
|
516
524
|
const parts: Buffer[] = [];
|
|
517
525
|
const missing = new Set<string>();
|
|
@@ -526,13 +534,16 @@ export function blenderRoutesPlugin(services: ProjectServingServices): Plugin {
|
|
|
526
534
|
if (reused && sha256(reused) === hash) parts.push(reused);
|
|
527
535
|
else missing.add(hash);
|
|
528
536
|
}
|
|
537
|
+
lap('verify');
|
|
529
538
|
if (missing.size > 0) {
|
|
530
|
-
json(res, { ok: false, missing: [...missing] });
|
|
539
|
+
json(res, { ok: false, missing: [...missing], ms });
|
|
531
540
|
return;
|
|
532
541
|
}
|
|
533
542
|
const body = Buffer.concat(parts);
|
|
543
|
+
lap('concat');
|
|
534
544
|
try {
|
|
535
545
|
const revision = await services.commitProjectMutation(req, [{ path, content: body }]);
|
|
546
|
+
lap('commit');
|
|
536
547
|
heldChunks.delete(path);
|
|
537
548
|
const byHash = new Map<string, { offset: number; length: number }>();
|
|
538
549
|
let offset = 0;
|
|
@@ -549,6 +560,7 @@ export function blenderRoutesPlugin(services: ProjectServingServices): Plugin {
|
|
|
549
560
|
bytes: body.byteLength,
|
|
550
561
|
sent: listed.reduce((sum, [hash, length]) => sum + (held.has(hash) ? length : 0), 0),
|
|
551
562
|
revision: revision?.revision ?? null,
|
|
563
|
+
ms,
|
|
552
564
|
});
|
|
553
565
|
} catch (error) {
|
|
554
566
|
services.answerProjectMutationError(res, error);
|