@world-engines/scenario-review-snapshot 1.0.2 → 1.1.3
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/neutral-artifact-assembler.js +16 -13
- package/package.json +11 -12
|
@@ -17,14 +17,11 @@ const SHA256 = /^[0-9a-f]{64}$/u;
|
|
|
17
17
|
const encoder = new TextEncoder();
|
|
18
18
|
const MAX_EMBEDDING_SOURCE_TEXT_CHARACTERS = 32_000;
|
|
19
19
|
const SPATIAL_PLAYER_MAP_TIERS = ["city", "parcel", "building", "interior", "room", "aperture"];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
room: ["aperture"],
|
|
26
|
-
aperture: [],
|
|
27
|
-
});
|
|
20
|
+
/**
|
|
21
|
+
* tier 只是作者语义标签,不构成父子推进链:任何已存在地点都可以作父级,
|
|
22
|
+
* 子级可以是枚举内任意 tier,因此允许深递归、跳过中间层与同级嵌套。
|
|
23
|
+
* 装配期只证明父级存在、非 city 不能作根与父链无环。
|
|
24
|
+
*/
|
|
28
25
|
const canonicalBytes = (value) => encoder.encode(canonicalJson(value));
|
|
29
26
|
/** 既有 embedding index 的 source vector hash:JSON number array,不是 packed bytes hash。 */
|
|
30
27
|
const vectorSourceJsonSha256 = (vector) => sha256Hex(encoder.encode(JSON.stringify([...vector])));
|
|
@@ -557,12 +554,18 @@ function parseNeutralSpatialPlayerMap(value) {
|
|
|
557
554
|
}
|
|
558
555
|
continue;
|
|
559
556
|
}
|
|
560
|
-
|
|
561
|
-
if (parent === undefined)
|
|
557
|
+
if (!byLocationId.has(location.parentLocationId))
|
|
562
558
|
throw new Error("neutral_artifact_spatial_player_map_parent_missing");
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
559
|
+
}
|
|
560
|
+
for (const location of locations) {
|
|
561
|
+
const visited = new Set();
|
|
562
|
+
let cursor = location;
|
|
563
|
+
while (cursor?.parentLocationId !== undefined) {
|
|
564
|
+
if (visited.has(cursor.locationId)) {
|
|
565
|
+
throw new Error("neutral_artifact_spatial_player_map_location_hierarchy_invalid");
|
|
566
|
+
}
|
|
567
|
+
visited.add(cursor.locationId);
|
|
568
|
+
cursor = byLocationId.get(cursor.parentLocationId);
|
|
566
569
|
}
|
|
567
570
|
}
|
|
568
571
|
let rootMap;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@world-engines/scenario-review-snapshot",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -26,24 +26,23 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@world-engines/chatplay-vite-plugin": "1.
|
|
30
|
-
"@world-engines/ladybug-bridge": "1.
|
|
31
|
-
"@world-engines/protocol-ts": "1.
|
|
32
|
-
"@world-engines/scenario-author-source": "1.
|
|
33
|
-
"@world-engines/tmw": "1.
|
|
34
|
-
"@world-engines/spatial-authoring": "1.
|
|
29
|
+
"@world-engines/chatplay-vite-plugin": "1.1.3",
|
|
30
|
+
"@world-engines/ladybug-bridge": "1.1.3",
|
|
31
|
+
"@world-engines/protocol-ts": "1.1.3",
|
|
32
|
+
"@world-engines/scenario-author-source": "1.1.3",
|
|
33
|
+
"@world-engines/tmw": "1.1.3",
|
|
34
|
+
"@world-engines/spatial-authoring": "1.1.3"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
|
-
"access": "public"
|
|
38
|
-
"registry": "https://registry.npmjs.org"
|
|
37
|
+
"access": "public"
|
|
39
38
|
},
|
|
40
|
-
"worldengine_source_sha256": "
|
|
39
|
+
"worldengine_source_sha256": "b1fba8cb78b9258f61357f9a64a953dc6e8a56183cd9c57463f74e9216010d60",
|
|
41
40
|
"worldengine_source_identity_provenance": {
|
|
42
41
|
"schema": "worldengine-public-namespace-projection/v1",
|
|
43
42
|
"kind": "composite-source-identity; namespace projection; not-full-source-recompile",
|
|
44
43
|
"original_name": "@chat/scenario-review-snapshot",
|
|
45
|
-
"original_archive_sha256": "
|
|
46
|
-
"original_source_sha256": "
|
|
44
|
+
"original_archive_sha256": "54b75a6c567ce9813048b00950b8c0e575c8ab68e673483a19c2846a7e5547cc",
|
|
45
|
+
"original_source_sha256": "aa1043e3acf47a268a1314ce2276b5c1166def1799cd7ce3db72e15ee97e0bbd",
|
|
47
46
|
"projected_name": "@world-engines/scenario-review-snapshot",
|
|
48
47
|
"package_name_mapping": {
|
|
49
48
|
"@chat/blocks-editor": "@world-engines/blocks-editor",
|