@hypersocial/decks-cli 0.9.18 → 0.9.19
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/README.md +1 -1
- package/package.json +1 -1
- package/skills/hyperdecks/SKILL.md +1 -1
- package/src/avatar-import.mjs +17 -1
- package/src/runtime.mjs +1 -1
package/README.md
CHANGED
|
@@ -117,7 +117,7 @@ avatar import <head.glb> --metadata <file.json> [--thumbnail <png>] [--pack <pac
|
|
|
117
117
|
|
|
118
118
|
### Importing a private avatar head (for tools)
|
|
119
119
|
|
|
120
|
-
`avatar import` puts a baked, owner-private Minimoji head (bake v17–
|
|
120
|
+
`avatar import` puts a baked, owner-private Minimoji head (bake v17–19; mouth anchors from 19,
|
|
121
121
|
`privateFormat: 1`) into the signed-in account, or into one of its own private
|
|
122
122
|
packs that has no grants. Tools such as Minimoji's character creator shell out
|
|
123
123
|
to it rather than reading Hyperdecks credentials.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: hyperdecks
|
|
3
3
|
description: Use when asked to make, narrate, check or ship a deck ("make me a narrated deck", "turn this into a deck and send it"), or when working with Hypersocial Decks, Hyperdecks CLI, production deck analytics, recipient share links, deck activity, MCP deck tools, or real-world/customer-facing deck checks. Prefer production for real activity and analytics; use development only for local implementation/testing when explicitly requested.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.9.
|
|
5
|
+
version: "0.9.19"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Hyperdecks
|
package/src/avatar-import.mjs
CHANGED
|
@@ -31,7 +31,11 @@ import { client as defaultClient, routeAuth as defaultRouteAuth } from "./runtim
|
|
|
31
31
|
|
|
32
32
|
export const MAX_BAKE_BYTES = 8 * 1024 * 1024;
|
|
33
33
|
export const MAX_THUMBNAIL_BYTES = 1024 * 1024;
|
|
34
|
-
|
|
34
|
+
// Mirrors convex/lib/avatars/privateBake.ts: bakes 17-19, and mouth anchors
|
|
35
|
+
// (checkMouthExtras there) only from bake 19.
|
|
36
|
+
export const MIN_BAKE_VERSION = 17, MAX_BAKE_VERSION = 19, MOUTH_ANCHOR_MIN_VERSION = 19;
|
|
37
|
+
const MOUTH_EXTRAS = new Set(["mouthAnchor", "mouthRigid", "mouthPivot"]);
|
|
38
|
+
const anchorNumbers = (x, length) => Array.isArray(x) && x.length === length && x.every((n) => typeof n === "number" && Number.isFinite(n) && Math.abs(n) <= 1000);
|
|
35
39
|
const ALLOWED_EXTENSIONS = new Set(["KHR_materials_sheen", "KHR_materials_clearcoat", "KHR_materials_unlit", "KHR_materials_ior", "KHR_materials_specular", "KHR_materials_emissive_strength"]);
|
|
36
40
|
const METADATA_KEYS = ["name", "sha256", "provenance", "limitations", "stockVoice", "packId"];
|
|
37
41
|
const UPLOAD_TIMEOUT_MS = 120_000;
|
|
@@ -111,6 +115,18 @@ export function checkBake(buffer) {
|
|
|
111
115
|
if (!Number.isInteger(meta.v) || meta.v < MIN_BAKE_VERSION || meta.v > MAX_BAKE_VERSION) bad(`unsupported Mini bake version ${meta.v} (expected ${MIN_BAKE_VERSION}-${MAX_BAKE_VERSION})`);
|
|
112
116
|
if (meta.privateFormat !== 1 || meta.character != null || meta.avatar != null) bad("not a private-format head (privateFormat must be 1, with no character or avatar)");
|
|
113
117
|
for (const key of ["u", "H", "W"]) if (typeof meta[key] !== "number" || !Number.isFinite(meta[key]) || meta[key] <= 0) bad(`invalid rig ${key}`);
|
|
118
|
+
// A mouth piece attached to the mouth (a fang, a tusk) carries
|
|
119
|
+
// mouthAnchor: [anchorX, anchorY, deltaRoll], mouthRigid: true and its offset.
|
|
120
|
+
for (const node of nodes) {
|
|
121
|
+
const extras = node?.extras;
|
|
122
|
+
if (!extras || typeof extras !== "object" || Array.isArray(extras)) continue;
|
|
123
|
+
for (const key of Object.keys(extras)) if (/^mouth/i.test(key) && !MOUTH_EXTRAS.has(key)) bad(`unsupported mouth metadata ${key}`);
|
|
124
|
+
if (extras.mouthRigid !== undefined && typeof extras.mouthRigid !== "boolean") bad("invalid mouthRigid");
|
|
125
|
+
if (extras.mouthAnchor === undefined) continue;
|
|
126
|
+
if (meta.v < MOUTH_ANCHOR_MIN_VERSION) bad(`mouth anchors need bake ${MOUTH_ANCHOR_MIN_VERSION}`);
|
|
127
|
+
if (!anchorNumbers(extras.mouthAnchor, 3)) bad("invalid mouth anchor");
|
|
128
|
+
if (extras.mouthRigid !== true || !anchorNumbers(extras.offset, 2)) bad("an anchored mouth piece needs mouthRigid and an offset");
|
|
129
|
+
}
|
|
114
130
|
return { bakeVersion: meta.v, sha256: createHash("sha256").update(buffer).digest("hex") };
|
|
115
131
|
}
|
|
116
132
|
|
package/src/runtime.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { ConvexHttpClient } from "convex/browser";
|
|
|
9
9
|
import { makeFunctionReference } from "convex/server";
|
|
10
10
|
import { recordSkillInstall } from "./skillFreshness.mjs";
|
|
11
11
|
|
|
12
|
-
export const VERSION = "0.9.
|
|
12
|
+
export const VERSION = "0.9.19";
|
|
13
13
|
|
|
14
14
|
// Sent on the CLI's calls to our routes and to Convex, so the server can see
|
|
15
15
|
// which CLI versions are still out there (not used to refuse anything).
|