chore: checkpoint web Blender migration source, tools and docs
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-10 11:18:01 +08:00
parent 122142c26c
commit f3e21c6b98
6887 changed files with 257154 additions and 12294 deletions

View File

@@ -9,6 +9,7 @@ export const SERVER_OPERATOR_JOB_BUDGET = {
maxPropertiesBytes: 64 * 1024,
maxPropertyCount: 128,
maxStringPropertyBytes: 4096,
maxArrayLength: 64,
maxSourceBytes: 512 * 1024 * 1024,
minTimeoutMs: 1000,
maxTimeoutMs: 10 * 60 * 1000,
@@ -155,10 +156,15 @@ function validateProperties(value: unknown): Record<string, BlenderOperatorPrope
if (entries.length > SERVER_OPERATOR_JOB_BUDGET.maxPropertyCount) throw new ServerOperatorJobValidationError("properties exceed the property-count budget");
for (const [key, item] of entries) {
if (!KEY.test(key)) throw new ServerOperatorJobValidationError(`property key ${key} is invalid`);
if (!((typeof item === "string" && new TextEncoder().encode(item).byteLength <= SERVER_OPERATOR_JOB_BUDGET.maxStringPropertyBytes) ||
(typeof item === "number" && Number.isFinite(item)) || typeof item === "boolean")) {
throw new ServerOperatorJobValidationError(`property ${key} must be a bounded typed scalar`);
const scalar = (part: unknown): boolean => (typeof part === "string" && new TextEncoder().encode(part).byteLength <= SERVER_OPERATOR_JOB_BUDGET.maxStringPropertyBytes) ||
(typeof part === "number" && Number.isFinite(part)) || typeof part === "boolean";
if (Array.isArray(item)) {
if (item.length > SERVER_OPERATOR_JOB_BUDGET.maxArrayLength ||
Array.from(item).some((part) => !scalar(part) || typeof part !== typeof item[0])) {
throw new ServerOperatorJobValidationError(`property ${key} must be a bounded homogeneous array`);
}
}
else if (!scalar(item)) throw new ServerOperatorJobValidationError(`property ${key} must be a bounded scalar or array`);
}
if (new TextEncoder().encode(stableJSON(value)).byteLength > SERVER_OPERATOR_JOB_BUDGET.maxPropertiesBytes) throw new ServerOperatorJobValidationError("properties exceed the byte budget");
return value as Record<string, BlenderOperatorPropertyValue>;