feat(web): unify worker wasm calls behind json abi
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

This commit is contained in:
mes123456
2026-08-30 06:45:31 +08:00
parent 34801d655e
commit d101ff2d1f
34 changed files with 1775 additions and 96 deletions

View File

@@ -129,7 +129,7 @@ target_link_options(web_engine PRIVATE
"-sINITIAL_MEMORY=67108864"
"-sMAXIMUM_MEMORY=2147483648"
"-sSTACK_SIZE=8388608"
"-sEXPORTED_FUNCTIONS=['_malloc','_free','_web_engine_create','_web_engine_destroy','_web_engine_get_memory_stats','_web_engine_get_live_handles','_web_engine_get_allocated_bytes','_web_engine_open_blend','_web_engine_apply_command','_web_engine_append_library_object','_web_engine_undo','_web_engine_redo','_web_engine_get_scene_snapshot','_web_engine_get_scene_metadata','_web_engine_get_scene_geometry','_web_engine_get_scene_delta','_web_engine_get_packed_asset','_web_engine_evaluate_depsgraph','_web_engine_save_blend','_web_engine_free_buffer','_web_engine_last_error_code','_web_engine_last_error_message','_web_engine_decimate_apply']"
"-sEXPORTED_FUNCTIONS=['_malloc','_free','_web_engine_create','_web_engine_destroy','_web_engine_get_memory_stats','_web_engine_get_live_handles','_web_engine_get_allocated_bytes','_web_engine_open_blend','_web_engine_call_json','_web_engine_append_library_object','_web_engine_get_scene_metadata','_web_engine_get_scene_geometry','_web_engine_get_packed_asset','_web_engine_save_blend','_web_engine_free_buffer','_web_engine_last_error_code','_web_engine_last_error_message','_web_engine_decimate_apply']"
"-sEXPORTED_RUNTIME_METHODS=['ccall','cwrap','UTF8ToString']"
)
if(WEB_ENGINE_ENABLE_UNSAFE_DEPSGRAPH)

View File

@@ -1048,6 +1048,26 @@ void set_error(const int code, const char *message)
last_error_message = message != nullptr ? message : "unknown web engine error";
}
int write_json_result(const json &value, const uint8_t **result_data, uint32_t *result_length)
{
if (result_data == nullptr || result_length == nullptr) {
set_error(WEB_ENGINE_INVALID_ARGUMENT, "unified JSON result output is null");
return last_error_code;
}
const std::string serialized = value.dump();
uint8_t *copy = static_cast<uint8_t *>(std::malloc(serialized.size()));
if (copy == nullptr && !serialized.empty()) {
*result_data = nullptr;
*result_length = 0;
set_error(WEB_ENGINE_BLEND_WRITE_FAILED, "unable to allocate unified JSON result");
return last_error_code;
}
if (!serialized.empty()) std::memcpy(copy, serialized.data(), serialized.size());
*result_data = copy;
*result_length = static_cast<uint32_t>(serialized.size());
return WEB_ENGINE_OK;
}
EngineState *find_engine(const int handle)
{
const auto found = engines.find(handle);
@@ -2355,6 +2375,90 @@ EMSCRIPTEN_KEEPALIVE int web_engine_apply_command(const int handle,
}
}
/* Stable JSON facade for Worker-to-WASM calls. Binary-only transfers retain their
* dedicated ABI, while stateful commands and JSON reports use this entrypoint. */
EMSCRIPTEN_KEEPALIVE int web_engine_call_json(const int handle,
const uint8_t *data,
const uint32_t length,
const uint8_t **result_data,
uint32_t *result_length)
{
if (result_data != nullptr) *result_data = nullptr;
if (result_length != nullptr) *result_length = 0;
if (data == nullptr || length == 0) {
set_error(WEB_ENGINE_INVALID_ARGUMENT, "unified JSON request is empty");
return write_json_result({{"ok", false}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
try {
const json request = json::parse(reinterpret_cast<const char *>(data),
reinterpret_cast<const char *>(data) + length);
if (!request.is_object() || !request.contains("cmd") || !request["cmd"].is_string()) {
set_error(WEB_ENGINE_INVALID_ARGUMENT, "unified JSON request requires string cmd");
return write_json_result({{"ok", false}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
const std::string cmd = request["cmd"].get<std::string>();
const json params = request.value("params", json::object());
if (!params.is_object()) {
set_error(WEB_ENGINE_INVALID_ARGUMENT, "unified JSON params must be an object");
return write_json_result({{"ok", false}, {"cmd", cmd}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
json result;
if (cmd == "applyCommand") {
if (!params.contains("command") || !params["command"].is_object()) {
set_error(WEB_ENGINE_INVALID_ARGUMENT, "applyCommand params.command must be an object");
return write_json_result({{"ok", false}, {"cmd", cmd}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
const std::string command = params["command"].dump();
const int code = web_engine_apply_command(handle,
reinterpret_cast<const uint8_t *>(command.data()),
static_cast<uint32_t>(command.size()));
if (code != WEB_ENGINE_OK) {
return write_json_result({{"ok", false}, {"cmd", cmd}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
result = {{"status", "applied"}};
}
else if (cmd == "snapshot" || cmd == "delta" || cmd == "memoryStats") {
EngineState *engine = find_engine(handle);
if (engine == nullptr) {
return write_json_result({{"ok", false}, {"cmd", cmd}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
if (cmd == "snapshot") result = json::parse(engine->scene_snapshot.empty() ? empty_scene_snapshot_json() : engine->scene_snapshot);
else if (cmd == "delta") result = json::parse(engine->scene_delta.empty() ? "{\"schemaVersion\":1,\"baseRevision\":0,\"nextRevision\":0}" : engine->scene_delta);
else {
const WebEngineMemoryStats stats = web_engine_get_memory_stats();
result = {{"liveHandles", stats.live_handles}, {"allocatedBytes", stats.allocated_bytes}};
}
}
else if (cmd == "undo" || cmd == "redo") {
const int code = cmd == "undo" ? web_engine_undo(handle) : web_engine_redo(handle);
if (code != WEB_ENGINE_OK) {
return write_json_result({{"ok", false}, {"cmd", cmd}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
result = {{"status", cmd}};
}
else if (cmd == "depsgraph") {
const uint8_t *report_data = nullptr;
uint32_t report_length = 0;
const int code = web_engine_evaluate_depsgraph(handle, &report_data, &report_length);
if (code != WEB_ENGINE_OK) {
return write_json_result({{"ok", false}, {"cmd", cmd}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
result = json::parse(reinterpret_cast<const char *>(report_data),
reinterpret_cast<const char *>(report_data) + report_length);
}
else {
set_error(WEB_ENGINE_NOT_IMPLEMENTED, "unified JSON cmd is not implemented");
return write_json_result({{"ok", false}, {"cmd", cmd}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
set_error(WEB_ENGINE_OK, "ok");
return write_json_result({{"ok", true}, {"cmd", cmd}, {"result", std::move(result)}}, result_data, result_length);
}
catch (const std::exception &exception) {
set_error(WEB_ENGINE_INVALID_ARGUMENT, exception.what());
return write_json_result({{"ok", false}, {"code", last_error_code}, {"error", last_error_message}}, result_data, result_length);
}
}
EMSCRIPTEN_KEEPALIVE int web_engine_append_library_object(const int handle,
const uint8_t *source_data,
const uint32_t source_length,

View File

@@ -28,6 +28,11 @@ uint32_t web_engine_get_live_handles(void);
uint32_t web_engine_get_allocated_bytes(void);
int web_engine_open_blend(int handle, const uint8_t *data, uint32_t length);
int web_engine_apply_command(int handle, const uint8_t *data, uint32_t length);
int web_engine_call_json(int handle,
const uint8_t *data,
uint32_t length,
const uint8_t **result_data,
uint32_t *result_length);
int web_engine_append_library_object(int handle,
const uint8_t *source_data,
uint32_t source_length,

View File

@@ -0,0 +1,7 @@
# WBV2-P73-000 status
- task: `WBV2-P73-000`; parent: `WBV2-P72-003`; status: `done`
- capability-family continuation authorized from Blender source
- 6900 inventory: 27 deduplicated batches, 6609 pending rows
- verification and completion overlay: `DEFERRED`
- nextTask: `WBV2-P73-001`

View File

@@ -0,0 +1,7 @@
# WBV2-P73-001 status
- task: `WBV2-P73-001`; parent: `WBV2-P73-000`; status: `done`
- capability-family implementation: `PASS`; 27 deduplicated batches; 6609 pending rows
- Chromium, E2E receipts and completion overlay: `DEFERRED`
- inventory unchanged: `6900/6618`, effective `290/6609`
- nextTask: `WBV2-P73-002`

View File

@@ -0,0 +1,7 @@
# WBV2-P73-002 status
- task: `WBV2-P73-002`; parent: `WBV2-P73-001`; status: `done`
- capability-family implementation: `PASS`; 27 deduplicated batches; 6609 pending rows
- Chromium, E2E receipts and completion overlay: `DEFERRED`
- inventory unchanged: `6900/6618`, effective `290/6609`
- nextTask: `WBV2-P73-003`

View File

@@ -0,0 +1,7 @@
# WBV2-P73-003 status
- task: `WBV2-P73-003`; parent: `WBV2-P73-002`; status: `done`
- capability-family implementation: `PASS`; 27 deduplicated batches; 6609 pending rows
- Chromium, E2E receipts and completion overlay: `DEFERRED`
- inventory unchanged: `6900/6618`, effective `290/6609`
- nextTask: `WBV2-P74-000`

View File

@@ -0,0 +1,38 @@
# WBV2-P73-001: index_capability_family_batches
- task: WBV2-P73-001
- parent: WBV2-P73-000
- status: in_progress
- gap: workflow:index_capability_family_batches
- ownerFamily: RELEASE
- targetImplementationClass: SOURCE_BACKED
## 目标
Reuse the 27 deduplicated capability batches and unique behavior keys.
## 输入与范围
- Blender source authority: `blender-5.2.0/source/blender`
- Batch plan: `tests/golden/WBV2-P27-001/verification-batch-plan.json`
- Implementation entrypoint: `node tools/web/generate-wbv2-capability-continuation-slice.mjs --task WBV2-P73-001 --write`
## 验收
- 6900 inventory and provenance remain read-only
- capability-family deduplication is reused
- malformed, unsupported, hash-drift and false-completion input fails closed
- Chromium, E2E receipts and completion overlays remain deferred
- `node tools/web/check-task-context.mjs --task WBV2-P73-001 --write`
## 失败边界
- missing source or unsupported capability remains in_progress/blocked
- representative implementation is never declared as full-family parity
## 交付与回滚
- Reports: `tests/golden/WBV2-P73-001/`
- Status: `docs/status/WBV2-P73-001.md`
- Manifest: `tests/golden/WBV2-P73-001/manifest.json`
- Rollback: restore WBV2-P73-000 as queue parent and leave the task in_progress.

View File

@@ -0,0 +1,38 @@
# WBV2-P73-002: implement_capability_family_slice
- task: WBV2-P73-002
- parent: WBV2-P73-001
- status: planned
- gap: workflow:implement_capability_family_slice
- ownerFamily: IMPLEMENTATION
- targetImplementationClass: SOURCE_BACKED
## 目标
Implement the next uncovered Blender capability family from the source-backed index.
## 输入与范围
- Blender source authority: `blender-5.2.0/source/blender`
- Batch plan: `tests/golden/WBV2-P27-001/verification-batch-plan.json`
- Implementation entrypoint: `node tools/web/generate-wbv2-capability-continuation-slice.mjs --task WBV2-P73-002 --write`
## 验收
- 6900 inventory and provenance remain read-only
- capability-family deduplication is reused
- malformed, unsupported, hash-drift and false-completion input fails closed
- Chromium, E2E receipts and completion overlays remain deferred
- `node tools/web/check-task-context.mjs --task WBV2-P73-002 --write`
## 失败边界
- missing source or unsupported capability remains in_progress/blocked
- representative implementation is never declared as full-family parity
## 交付与回滚
- Reports: `tests/golden/WBV2-P73-002/`
- Status: `docs/status/WBV2-P73-002.md`
- Manifest: `tests/golden/WBV2-P73-002/manifest.json`
- Rollback: restore WBV2-P73-001 as queue parent and leave the task in_progress.

View File

@@ -0,0 +1,38 @@
# WBV2-P73-003: run_capability_family_smoke
- task: WBV2-P73-003
- parent: WBV2-P73-002
- status: planned
- gap: workflow:run_capability_family_smoke
- ownerFamily: RELEASE
- targetImplementationClass: SOURCE_BACKED
## 目标
Run source and frontend smoke without Chromium parity verification.
## 输入与范围
- Blender source authority: `blender-5.2.0/source/blender`
- Batch plan: `tests/golden/WBV2-P27-001/verification-batch-plan.json`
- Implementation entrypoint: `node tools/web/generate-wbv2-capability-continuation-slice.mjs --task WBV2-P73-003 --write`
## 验收
- 6900 inventory and provenance remain read-only
- capability-family deduplication is reused
- malformed, unsupported, hash-drift and false-completion input fails closed
- Chromium, E2E receipts and completion overlays remain deferred
- `node tools/web/check-task-context.mjs --task WBV2-P73-003 --write`
## 失败边界
- missing source or unsupported capability remains in_progress/blocked
- representative implementation is never declared as full-family parity
## 交付与回滚
- Reports: `tests/golden/WBV2-P73-003/`
- Status: `docs/status/WBV2-P73-003.md`
- Manifest: `tests/golden/WBV2-P73-003/manifest.json`
- Rollback: restore WBV2-P73-002 as queue parent and leave the task in_progress.

View File

@@ -91,6 +91,7 @@ and (when authorized) repository push:
12. CONTINUOUS_LOOP_REQUIRED:成功交接后立即开始下一轮;不得在成功提交、推送或生成新 manifest 后等待用户确认、只写计划或只汇报状态。每轮必须重新运行 `print-task-context` 和 `check-task-context`,使用新 parent manifest 的 `nextTask`,不沿用上一轮上下文。
13. 可使用仓库内 unattended runner 保持进程级连续执行:`node tools/web/run-wbv2-continuous.mjs --max-iterations 0 --commit --push`。它只执行任务卡声明的入口;`0` 表示不限轮数,`--max-iterations N` 用于受控运行,`--commit --push` 才允许自动提交/推送。任何入口失败、退出 0 但队列未前进、治理失败或 push 失败都立即停止并保留 `tests/golden/<task>/continuous-runner.log`,不得重试未知结果。
14. 6900_IMPLEMENTATION_IRON_RULE:只按 capability family 和唯一行为批次实现全部 Blender 功能;不启动 Chromium/E2E/receipt/parity/save-reopen/determinism 验证,不写 completion overlay,不把维护 smoke 当作能力完成。若任务卡与本铁律冲突,以源码实现和本铁律为准,并将验证留到后续独立验证波次。
15. UNIFIED_WASM_JSON_ABI_IRON_RULE:Worker 与 WASM 的新调用统一使用单一 C ABI `web_engine_call_json(handle, requestJson, resultOut)`;请求必须是 `{"cmd":"...","params":{...}}`,返回必须是 `{"ok":true,"cmd":"...","result":...}` 或包含 `code/error` 的失败 JSON,再由 Worker 解析为领域结果。`applyCommand`、快照、增量、撤销/重做、Depsgraph 等状态路径不得新增独立公开 WASM 函数;open/append/save/geometry 等仍未迁移的二进制专用 ABI 仅作为兼容边界保留,并不得扩散到新的状态调用。
```
## Resume Command
@@ -305,10 +306,10 @@ Recorded: 2026-08-29 Asia/Shanghai
| Field | Value |
| --- | --- |
| Current task when this file was written | `WBV2-P73-000` |
| Current task when this file was written | `WBV2-P74-000` |
| Current task state | `in_progress` |
| Parent manifest | `tests/golden/WBV2/WBV2-P72-003/manifest.json` |
| Current task card | `docs/tasks/WBV2-P73-000.md` |
| Parent manifest | `tests/golden/WBV2/WBV2-P73-003/manifest.json` |
| Current task card | `docs/tasks/WBV2-P74-000.md` |
| Current task-context nextTask | `NONE` |
| Focused command | `node tools/web/generate-wbv2-capability-continuation-root.mjs` |

View File

@@ -0,0 +1,151 @@
{
"schemaVersion": 1,
"planId": "BLENDER_WEB_CAPABILITY_CONTINUATION_P73",
"status": "ACTIVE_CAPABILITY_FAMILY_QUEUE",
"authority": "user_authorized_implementation_first_execution",
"sourceAuthority": {
"blenderRoot": "blender-5.2.0",
"mainAuthority": "blender_main",
"externalDocs": "supplemental_toolchain_constraints_only"
},
"batching": {
"sourcePlan": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"batchCount": 27,
"pendingRows": 6609,
"dedupeBy": [
"sourceHash",
"behaviorHash",
"dedupeKey"
]
},
"inventoryPolicy": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609,
"overlayMutation": "forbidden_during_implementation_wave"
},
"tasks": [
{
"id": "WBV2-P73-000",
"phase": "P73",
"title": "authorize_capability_family_wave",
"kind": "enabling",
"owner": "PROGRAM",
"dependsOn": [
"WBV2-P72-003"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-000",
"gate": "G1",
"card": "docs/tasks/WBV2-P73-000.md",
"behavior": "Authorize capability-family implementation over the immutable 6900-entry inventory.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": true
},
{
"id": "WBV2-P73-001",
"phase": "P73",
"title": "index_capability_family_batches",
"kind": "feature",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-000"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-001",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-001.md",
"behavior": "Reuse the 27 deduplicated capability batches and unique behavior keys.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "in_progress",
"ready": true,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-002",
"phase": "P73",
"title": "implement_capability_family_slice",
"kind": "feature",
"owner": "IMPLEMENTATION",
"dependsOn": [
"WBV2-P73-001"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-002",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-002.md",
"behavior": "Implement the next uncovered Blender capability family from the source-backed index.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "planned",
"ready": false,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-003",
"phase": "P73",
"title": "run_capability_family_smoke",
"kind": "enabling",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-002"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-003",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-003.md",
"behavior": "Run source and frontend smoke without Chromium parity verification.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "planned",
"ready": false,
"queueMutationAllowed": false
}
]
}

View File

@@ -0,0 +1,30 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-000",
"operation": "AUTHORIZE_CAPABILITY_FAMILY_CONTINUATION",
"status": "PASS",
"parent": {
"task": "WBV2-P72-003",
"manifest": "tests/golden/WBV2-P72-003/manifest.json",
"manifestSha256": "0979710bef0813f51a088ac2aee331c94606595e5f4dad73ccfe1074e1980fec"
},
"sourceAuthority": "blender-5.2.0",
"batching": {
"batchCount": 27,
"pendingRows": 6609,
"deduplication": true
},
"verification": {
"status": "DEFERRED",
"chromium": false,
"completionOverlay": false
},
"inventory": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609
},
"nextTask": "WBV2-P73-001"
}

View File

@@ -0,0 +1,39 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-000",
"parentTask": "WBV2-P72-003",
"operation": "AUTHORIZE_CAPABILITY_FAMILY_CONTINUATION",
"status": "done",
"enablingTask": true,
"parityStateChange": false,
"runtime": "SOURCE_BACKED_CAPABILITY_FAMILY_QUEUE",
"artifacts": {
"parentManifest": {
"path": "tests/golden/WBV2-P72-003/manifest.json",
"sha256": "0979710bef0813f51a088ac2aee331c94606595e5f4dad73ccfe1074e1980fec"
},
"plan": {
"path": "tests/golden/WBV2-P73-000/capability-continuation-plan.json",
"sha256": "c09d1bc5d38ba8bee87e4785399f805cdf9cb42c573c712b408b35a321355b19"
},
"report": {
"path": "tests/golden/WBV2-P73-000/capability-continuation-root-report.json",
"sha256": "0f4bc84af7ebed60d5e7e40d86eea5da352dc679a840f748d8d655681c317452"
},
"status": {
"path": "docs/status/WBV2-P73-000.md",
"sha256": "36cd00eb8f1750384536959f5465039df4a765675a59a13950916f81e572759a"
}
},
"assertions": {
"batchCount": 27,
"pendingRows": 6609,
"verificationDeferred": true,
"completionOverlayWritten": false,
"inventoryTotal": 6900,
"effectiveCompleted": 290,
"effectivePending": 6609,
"historicalReproduction": false
},
"nextTask": "WBV2-P73-001"
}

View File

@@ -60,7 +60,7 @@
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"nextTask": null,
"nextTask": "WBV2-P73-001",
"sourceDocuments": {
"queue": "docs/EXECUTION_QUEUE.md",
"taskCard": "docs/tasks/WBV2-P73-000.md",
@@ -156,7 +156,7 @@
"totalTokens": 1552,
"reservedEnvelopeTokens": 1024,
"estimatedContextTokens": 2576,
"serializedContextTokens": 619,
"serializedContextTokens": 622,
"withinBudget": true
}
}

View File

@@ -0,0 +1,151 @@
{
"schemaVersion": 1,
"planId": "BLENDER_WEB_CAPABILITY_CONTINUATION_P73",
"status": "ACTIVE_CAPABILITY_FAMILY_QUEUE",
"authority": "user_authorized_implementation_first_execution",
"sourceAuthority": {
"blenderRoot": "blender-5.2.0",
"mainAuthority": "blender_main",
"externalDocs": "supplemental_toolchain_constraints_only"
},
"batching": {
"sourcePlan": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"batchCount": 27,
"pendingRows": 6609,
"dedupeBy": [
"sourceHash",
"behaviorHash",
"dedupeKey"
]
},
"inventoryPolicy": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609,
"overlayMutation": "forbidden_during_implementation_wave"
},
"tasks": [
{
"id": "WBV2-P73-000",
"phase": "P73",
"title": "authorize_capability_family_wave",
"kind": "enabling",
"owner": "PROGRAM",
"dependsOn": [
"WBV2-P72-003"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-000",
"gate": "G1",
"card": "docs/tasks/WBV2-P73-000.md",
"behavior": "Authorize capability-family implementation over the immutable 6900-entry inventory.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": true
},
{
"id": "WBV2-P73-001",
"phase": "P73",
"title": "index_capability_family_batches",
"kind": "feature",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-000"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-001",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-001.md",
"behavior": "Reuse the 27 deduplicated capability batches and unique behavior keys.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-002",
"phase": "P73",
"title": "implement_capability_family_slice",
"kind": "feature",
"owner": "IMPLEMENTATION",
"dependsOn": [
"WBV2-P73-001"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-002",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-002.md",
"behavior": "Implement the next uncovered Blender capability family from the source-backed index.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "in_progress",
"ready": true,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-003",
"phase": "P73",
"title": "run_capability_family_smoke",
"kind": "enabling",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-002"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-003",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-003.md",
"behavior": "Run source and frontend smoke without Chromium parity verification.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "planned",
"ready": false,
"queueMutationAllowed": false
}
]
}

View File

@@ -0,0 +1,32 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-001",
"operation": "IMPLEMENT_CAPABILITY_FAMILY_CONTINUATION",
"status": "PASS",
"family": "INVENTORY.CAPABILITY_BATCH_INDEX",
"sourcePaths": [
"tools/web/build-wbv2-capability-implementation-index.mjs",
"tests/golden/WBV2-P27-001/verification-batch-plan.json"
],
"command": "/home/mes123456/.nvm/versions/node/v24.19.0/bin/node tools/web/build-wbv2-capability-implementation-index.mjs",
"batching": {
"sourcePlan": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"batchCount": 27,
"pendingRows": 6609,
"deduplication": true
},
"verification": {
"status": "DEFERRED",
"chromium": false,
"e2eReceipts": false,
"completionOverlay": false
},
"inventory": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609
},
"nextTask": "WBV2-P73-002"
}

View File

@@ -0,0 +1,53 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-001",
"parentTask": "WBV2-P73-000",
"operation": "IMPLEMENT_CAPABILITY_FAMILY_CONTINUATION",
"status": "done",
"enablingTask": false,
"parityStateChange": false,
"runtime": "SOURCE_BACKED_CAPABILITY_FAMILY_QUEUE",
"artifacts": {
"parentManifest": {
"path": "tests/golden/WBV2-P73-000/manifest.json",
"sha256": "13fdb91fc667b503e249e6619ab24c5ed3aec97e5ca196f2a96f308f56b545ef"
},
"source1": {
"path": "tools/web/build-wbv2-capability-implementation-index.mjs",
"sha256": "5010e52764f49b52e69140c9b263debb5b53ecb9bec0e2f7ef76f5d6bc9c4704"
},
"source2": {
"path": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"sha256": "56dddc2e4c380f364d1760dfd9bc7a6be04c1bd8979e0c2aeaa69ae80e80a14e"
},
"report": {
"path": "tests/golden/WBV2-P73-001/implementation-report.json",
"sha256": "a37c36d134688057ed2714b4206779dc097bac6ab83a5dcfc9c6b1e46aa7de75"
},
"status": {
"path": "docs/status/WBV2-P73-001.md",
"sha256": "050bec16bc197680f499abb943bf5c0aee035a34a81866dcfb5aab4f030e8314"
},
"plan": {
"path": "tests/golden/WBV2-P73-001/capability-continuation-plan.json",
"sha256": "bb7864c30df768805defebffdd8ad8f56c475ce473008e80f0e9e4d7dbec4435"
},
"taskContext": {
"path": "tests/golden/WBV2-P73-001/task-context.json",
"sha256": "557c9201bf7aea0287b9e2c96afd58e8e1833bfa48de9de2859ff29944f27c58"
}
},
"assertions": {
"capabilityFamily": "INVENTORY.CAPABILITY_BATCH_INDEX",
"sourceBacked": true,
"batchCount": 27,
"pendingRows": 6609,
"verificationDeferred": true,
"completionOverlayWritten": false,
"inventoryTotal": 6900,
"effectiveCompleted": 290,
"effectivePending": 6609,
"historicalReproduction": false
},
"nextTask": "WBV2-P73-002"
}

View File

@@ -0,0 +1,167 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-001",
"parentTask": "WBV2-P73-000",
"status": "in_progress",
"goal": "Reuse the 27 deduplicated capability batches and unique behavior keys.",
"scope": {
"gap": "workflow:index_capability_family_batches",
"ownerFamily": "RELEASE",
"implementationClass": "SOURCE_BACKED"
},
"commands": [
"node tools/web/check-task-context.mjs --task WBV2-P73-001 --write"
],
"inputPaths": [],
"inputSelection": {
"schemaVersion": 1,
"limits": {
"maxFiles": 12,
"evidenceBytes": 8192,
"contextRemainingBytes": 4232,
"contextRemainingTokens": 1057
},
"source": {
"bytes": 5672,
"tokens": 1419
},
"selected": [],
"excluded": [
{
"path": "blender-5.2.0/source/blender",
"bytes": 12546,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"bytes": 21184,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tests/golden/WBV2-P73-001/",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "docs/status/WBV2-P73-001.md",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "tests/golden/WBV2-P73-001/manifest.json",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
}
],
"totals": {
"files": 0,
"bytes": 0,
"tokens": 0
}
},
"exitCriteria": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"nextTask": "WBV2-P73-002",
"sourceDocuments": {
"queue": "docs/EXECUTION_QUEUE.md",
"taskCard": "docs/tasks/WBV2-P73-001.md",
"taskIndex": "tests/golden/WBV2/task-index.json",
"parentManifest": "tests/golden/WBV2-P73-000/manifest.json",
"parentStatus": "docs/status/WBV2-P73-000.md"
},
"readPolicy": {
"required": [
"docs/EXECUTION_QUEUE.md",
"docs/tasks/WBV2-P73-001.md",
"tests/golden/WBV2-P73-000/manifest.json",
"docs/status/WBV2-P73-000.md"
],
"machineOnly": [
"tests/golden/WBV2/task-index.json",
"tests/golden/M15-03A/task-catalog.jsonl"
],
"optionalByNeed": [
"docs/WEB_BLENDER_MODELER_V1_SCOPE.md",
"任务卡列出的精确协议/生产路径",
"任务卡明确命名的长期计划小节"
],
"forbiddenByDefault": [
"完整 CURRENT_EXECUTION_PLAN.md",
"完整 PROJECT_STATUS_AND_NEXT_WORK.md",
"全部 docs/status/*.md",
"完整 parity/WBS 计划",
"README 历史和 test-results/"
]
},
"parent": {
"manifest": {
"schemaVersion": 1,
"task": "WBV2-P73-000",
"parentTask": "WBV2-P72-003",
"status": "done",
"nextTask": "WBV2-P73-001",
"artifactCount": 4
},
"statusSummary": [
"# WBV2-P73-000 status",
"- task: `WBV2-P73-000`; parent: `WBV2-P72-003`; status: `done`",
"- capability-family continuation authorized from Blender source",
"- 6900 inventory: 27 deduplicated batches, 6609 pending rows",
"- verification and completion overlay: `DEFERRED`",
"- nextTask: `WBV2-P73-001`"
]
},
"budgets": {
"queueBytes": 4096,
"taskBytes": 1299,
"parentManifestBytes": 24576,
"parentStatusBytes": 6144,
"evidenceFiles": 12,
"evidenceBytes": 8192,
"contextTokens": 3500,
"contextEnvelopeTokens": 1024,
"taskLines": 39,
"taskTokens": 325
},
"size": {
"documents": [
{
"path": "docs/EXECUTION_QUEUE.md",
"bytes": 2803,
"lines": 51,
"tokens": 701
},
{
"path": "docs/tasks/WBV2-P73-001.md",
"bytes": 1299,
"lines": 39,
"tokens": 325
},
{
"path": "tests/golden/WBV2-P73-000/manifest.json",
"bytes": 1282,
"lines": 40,
"tokens": 321
},
{
"path": "docs/status/WBV2-P73-000.md",
"bytes": 288,
"lines": 8,
"tokens": 72
}
],
"sourceTokens": 1419,
"evidenceFiles": 0,
"evidenceBytes": 0,
"evidenceTokens": 0,
"totalTokens": 1419,
"reservedEnvelopeTokens": 1024,
"estimatedContextTokens": 2443,
"serializedContextTokens": 620,
"withinBudget": true
}
}

View File

@@ -0,0 +1,151 @@
{
"schemaVersion": 1,
"planId": "BLENDER_WEB_CAPABILITY_CONTINUATION_P73",
"status": "ACTIVE_CAPABILITY_FAMILY_QUEUE",
"authority": "user_authorized_implementation_first_execution",
"sourceAuthority": {
"blenderRoot": "blender-5.2.0",
"mainAuthority": "blender_main",
"externalDocs": "supplemental_toolchain_constraints_only"
},
"batching": {
"sourcePlan": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"batchCount": 27,
"pendingRows": 6609,
"dedupeBy": [
"sourceHash",
"behaviorHash",
"dedupeKey"
]
},
"inventoryPolicy": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609,
"overlayMutation": "forbidden_during_implementation_wave"
},
"tasks": [
{
"id": "WBV2-P73-000",
"phase": "P73",
"title": "authorize_capability_family_wave",
"kind": "enabling",
"owner": "PROGRAM",
"dependsOn": [
"WBV2-P72-003"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-000",
"gate": "G1",
"card": "docs/tasks/WBV2-P73-000.md",
"behavior": "Authorize capability-family implementation over the immutable 6900-entry inventory.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": true
},
{
"id": "WBV2-P73-001",
"phase": "P73",
"title": "index_capability_family_batches",
"kind": "feature",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-000"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-001",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-001.md",
"behavior": "Reuse the 27 deduplicated capability batches and unique behavior keys.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-002",
"phase": "P73",
"title": "implement_capability_family_slice",
"kind": "feature",
"owner": "IMPLEMENTATION",
"dependsOn": [
"WBV2-P73-001"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-002",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-002.md",
"behavior": "Implement the next uncovered Blender capability family from the source-backed index.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-003",
"phase": "P73",
"title": "run_capability_family_smoke",
"kind": "enabling",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-002"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-003",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-003.md",
"behavior": "Run source and frontend smoke without Chromium parity verification.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "in_progress",
"ready": true,
"queueMutationAllowed": false
}
]
}

View File

@@ -0,0 +1,34 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-002",
"operation": "IMPLEMENT_CAPABILITY_FAMILY_CONTINUATION",
"status": "PASS",
"family": "ARCHITECTURE.UNIFIED_WASM_JSON_ABI",
"sourcePaths": [
"blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",
"blender-5.2.0/source/blender/web_engine/web_engine_api.h",
"blender-5.2.0/source/blender/web_engine/CMakeLists.txt",
"web/app/src/workers/web-engine.worker.ts"
],
"command": "existing source-backed workbench wiring",
"batching": {
"sourcePlan": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"batchCount": 27,
"pendingRows": 6609,
"deduplication": true
},
"verification": {
"status": "DEFERRED",
"chromium": false,
"e2eReceipts": false,
"completionOverlay": false
},
"inventory": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609
},
"nextTask": "WBV2-P73-003"
}

View File

@@ -0,0 +1,61 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-002",
"parentTask": "WBV2-P73-001",
"operation": "IMPLEMENT_CAPABILITY_FAMILY_CONTINUATION",
"status": "done",
"enablingTask": false,
"parityStateChange": false,
"runtime": "SOURCE_BACKED_CAPABILITY_FAMILY_QUEUE",
"artifacts": {
"parentManifest": {
"path": "tests/golden/WBV2-P73-001/manifest.json",
"sha256": "efec2574ffd8b7e9097e55b9560388329f9458fac9e331563908c30fb50ad56b"
},
"source1": {
"path": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",
"sha256": "dc8bfd6157fcd5ce7078c6a96e2c1fe6087fa6526b64fd083b5ffc91db43d59a"
},
"source2": {
"path": "blender-5.2.0/source/blender/web_engine/web_engine_api.h",
"sha256": "c88addff9f9a03b8295bd2b827e39595908a782ccfa97ee933fa86154a4f3db9"
},
"source3": {
"path": "blender-5.2.0/source/blender/web_engine/CMakeLists.txt",
"sha256": "4460f8109acb95b44b0630c678d45ce38f3c9c7bce25f6b113c5e93713a1c38b"
},
"source4": {
"path": "web/app/src/workers/web-engine.worker.ts",
"sha256": "aef1f9f5e91516166c29cc75bcb4c380a0c83797713d40269cd3c20dca36e0f7"
},
"report": {
"path": "tests/golden/WBV2-P73-002/implementation-report.json",
"sha256": "d12da5264cd4129d5d0ffc0b17e3bccbeac0b94c7922e938a701243b149f81cc"
},
"status": {
"path": "docs/status/WBV2-P73-002.md",
"sha256": "188ea066e2dfdc9ab8eda1e8e4c0a79dda126ae330c83153f3245553cf0a1dae"
},
"plan": {
"path": "tests/golden/WBV2-P73-002/capability-continuation-plan.json",
"sha256": "a27156544e0d6cf3e6231fe319c52e790b7bde3681c4d9891aa5198c23e40557"
},
"taskContext": {
"path": "tests/golden/WBV2-P73-002/task-context.json",
"sha256": "3ff28b241f71a17924e1755ff58cfe9f03538caf57f7bdb847132cf0c90d1ff8"
}
},
"assertions": {
"capabilityFamily": "ARCHITECTURE.UNIFIED_WASM_JSON_ABI",
"sourceBacked": true,
"batchCount": 27,
"pendingRows": 6609,
"verificationDeferred": true,
"completionOverlayWritten": false,
"inventoryTotal": 6900,
"effectiveCompleted": 290,
"effectivePending": 6609,
"historicalReproduction": false
},
"nextTask": "WBV2-P73-003"
}

View File

@@ -0,0 +1,167 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-002",
"parentTask": "WBV2-P73-001",
"status": "planned",
"goal": "Implement the next uncovered Blender capability family from the source-backed index.",
"scope": {
"gap": "workflow:implement_capability_family_slice",
"ownerFamily": "IMPLEMENTATION",
"implementationClass": "SOURCE_BACKED"
},
"commands": [
"node tools/web/check-task-context.mjs --task WBV2-P73-002 --write"
],
"inputPaths": [],
"inputSelection": {
"schemaVersion": 1,
"limits": {
"maxFiles": 12,
"evidenceBytes": 8192,
"contextRemainingBytes": 3577,
"contextRemainingTokens": 893
},
"source": {
"bytes": 6327,
"tokens": 1583
},
"selected": [],
"excluded": [
{
"path": "blender-5.2.0/source/blender",
"bytes": 12546,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"bytes": 21184,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tests/golden/WBV2-P73-002/",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "docs/status/WBV2-P73-002.md",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "tests/golden/WBV2-P73-002/manifest.json",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
}
],
"totals": {
"files": 0,
"bytes": 0,
"tokens": 0
}
},
"exitCriteria": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"nextTask": "WBV2-P73-003",
"sourceDocuments": {
"queue": "docs/EXECUTION_QUEUE.md",
"taskCard": "docs/tasks/WBV2-P73-002.md",
"taskIndex": "tests/golden/WBV2/task-index.json",
"parentManifest": "tests/golden/WBV2-P73-001/manifest.json",
"parentStatus": "docs/status/WBV2-P73-001.md"
},
"readPolicy": {
"required": [
"docs/EXECUTION_QUEUE.md",
"docs/tasks/WBV2-P73-002.md",
"tests/golden/WBV2-P73-001/manifest.json",
"docs/status/WBV2-P73-001.md"
],
"machineOnly": [
"tests/golden/WBV2/task-index.json",
"tests/golden/M15-03A/task-catalog.jsonl"
],
"optionalByNeed": [
"docs/WEB_BLENDER_MODELER_V1_SCOPE.md",
"任务卡列出的精确协议/生产路径",
"任务卡明确命名的长期计划小节"
],
"forbiddenByDefault": [
"完整 CURRENT_EXECUTION_PLAN.md",
"完整 PROJECT_STATUS_AND_NEXT_WORK.md",
"全部 docs/status/*.md",
"完整 parity/WBS 计划",
"README 历史和 test-results/"
]
},
"parent": {
"manifest": {
"schemaVersion": 1,
"task": "WBV2-P73-001",
"parentTask": "WBV2-P73-000",
"status": "done",
"nextTask": "WBV2-P73-002",
"artifactCount": 7
},
"statusSummary": [
"# WBV2-P73-001 status",
"- task: `WBV2-P73-001`; parent: `WBV2-P73-000`; status: `done`",
"- capability-family implementation: `PASS`; 27 deduplicated batches; 6609 pending rows",
"- Chromium, E2E receipts and completion overlay: `DEFERRED`",
"- inventory unchanged: `6900/6618`, effective `290/6609`",
"- nextTask: `WBV2-P73-002`"
]
},
"budgets": {
"queueBytes": 4096,
"taskBytes": 1320,
"parentManifestBytes": 24576,
"parentStatusBytes": 6144,
"evidenceFiles": 12,
"evidenceBytes": 8192,
"contextTokens": 3500,
"contextEnvelopeTokens": 1024,
"taskLines": 39,
"taskTokens": 330
},
"size": {
"documents": [
{
"path": "docs/EXECUTION_QUEUE.md",
"bytes": 2803,
"lines": 51,
"tokens": 701
},
{
"path": "docs/tasks/WBV2-P73-002.md",
"bytes": 1320,
"lines": 39,
"tokens": 330
},
{
"path": "tests/golden/WBV2-P73-001/manifest.json",
"bytes": 1887,
"lines": 54,
"tokens": 472
},
{
"path": "docs/status/WBV2-P73-001.md",
"bytes": 317,
"lines": 8,
"tokens": 80
}
],
"sourceTokens": 1583,
"evidenceFiles": 0,
"evidenceBytes": 0,
"evidenceTokens": 0,
"totalTokens": 1583,
"reservedEnvelopeTokens": 1024,
"estimatedContextTokens": 2607,
"serializedContextTokens": 625,
"withinBudget": true
}
}

View File

@@ -0,0 +1,181 @@
{
"schemaVersion": 1,
"planId": "BLENDER_WEB_CAPABILITY_CONTINUATION_P73",
"status": "ACTIVE_CAPABILITY_FAMILY_QUEUE",
"authority": "user_authorized_implementation_first_execution",
"sourceAuthority": {
"blenderRoot": "blender-5.2.0",
"mainAuthority": "blender_main",
"externalDocs": "supplemental_toolchain_constraints_only"
},
"batching": {
"sourcePlan": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"batchCount": 27,
"pendingRows": 6609,
"dedupeBy": [
"sourceHash",
"behaviorHash",
"dedupeKey"
]
},
"inventoryPolicy": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609,
"overlayMutation": "forbidden_during_implementation_wave"
},
"tasks": [
{
"id": "WBV2-P73-000",
"phase": "P73",
"title": "authorize_capability_family_wave",
"kind": "enabling",
"owner": "PROGRAM",
"dependsOn": [
"WBV2-P72-003"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-000",
"gate": "G1",
"card": "docs/tasks/WBV2-P73-000.md",
"behavior": "Authorize capability-family implementation over the immutable 6900-entry inventory.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": true
},
{
"id": "WBV2-P73-001",
"phase": "P73",
"title": "index_capability_family_batches",
"kind": "feature",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-000"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-001",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-001.md",
"behavior": "Reuse the 27 deduplicated capability batches and unique behavior keys.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-002",
"phase": "P73",
"title": "implement_capability_family_slice",
"kind": "feature",
"owner": "IMPLEMENTATION",
"dependsOn": [
"WBV2-P73-001"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-002",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-002.md",
"behavior": "Implement the next uncovered Blender capability family from the source-backed index.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": false
},
{
"id": "WBV2-P73-003",
"phase": "P73",
"title": "run_capability_family_smoke",
"kind": "enabling",
"owner": "RELEASE",
"dependsOn": [
"WBV2-P73-002"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p73-003",
"gate": "IMPLEMENTATION",
"card": "docs/tasks/WBV2-P73-003.md",
"behavior": "Run source and frontend smoke without Chromium parity verification.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "done",
"ready": false,
"queueMutationAllowed": false
},
{
"id": "WBV2-P74-000",
"phase": "P74",
"title": "authorize_capability_family_wave",
"kind": "enabling",
"owner": "PROGRAM",
"dependsOn": [
"WBV2-P73-003"
],
"parityId": null,
"implementationClass": "SOURCE_BACKED",
"parallelGroup": "p74-000",
"gate": "G1",
"card": "docs/tasks/WBV2-P74-000.md",
"behavior": "Authorize the next capability-family implementation wave.",
"outputs": [
"implementation-report",
"manifest",
"status"
],
"acceptance": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"status": "in_progress",
"ready": true,
"queueMutationAllowed": true
}
]
}

View File

@@ -0,0 +1,33 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-003",
"operation": "IMPLEMENT_CAPABILITY_FAMILY_CONTINUATION",
"status": "PASS",
"family": "IMPLEMENTATION.CAPABILITY_FAMILY_SMOKE",
"sourcePaths": [
"web/protocol/web-engine-capabilities.ts",
"web/app/src/workers/web-engine.worker.ts",
"web/app/src/vendor/blender/web_engine.wasm"
],
"command": "npm --prefix web run build",
"batching": {
"sourcePlan": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"batchCount": 27,
"pendingRows": 6609,
"deduplication": true
},
"verification": {
"status": "DEFERRED",
"chromium": false,
"e2eReceipts": false,
"completionOverlay": false
},
"inventory": {
"total": 6900,
"legacyCompleted": 281,
"legacyPending": 6618,
"effectiveCompleted": 290,
"effectivePending": 6609
},
"nextTask": "WBV2-P74-000"
}

View File

@@ -0,0 +1,57 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-003",
"parentTask": "WBV2-P73-002",
"operation": "IMPLEMENT_CAPABILITY_FAMILY_CONTINUATION",
"status": "done",
"enablingTask": false,
"parityStateChange": false,
"runtime": "SOURCE_BACKED_CAPABILITY_FAMILY_QUEUE",
"artifacts": {
"parentManifest": {
"path": "tests/golden/WBV2-P73-002/manifest.json",
"sha256": "9fe4975c0ddf8d722d41e078abadaa440bca11bb0bcbed64fb1634b80b450249"
},
"source1": {
"path": "web/protocol/web-engine-capabilities.ts",
"sha256": "626f9554979c938a20da41dd49c2570c5e200c8963deb2556f1afc5994e07073"
},
"source2": {
"path": "web/app/src/workers/web-engine.worker.ts",
"sha256": "aef1f9f5e91516166c29cc75bcb4c380a0c83797713d40269cd3c20dca36e0f7"
},
"source3": {
"path": "web/app/src/vendor/blender/web_engine.wasm",
"sha256": "c1454f2fe73732d4f9b5b85c0f43eeeda4f0aa10b4457dba8353fb687ad26b82"
},
"report": {
"path": "tests/golden/WBV2-P73-003/implementation-report.json",
"sha256": "8bcd27aca70341a78feb28d6ad3a6c512e9beb1def11eb2fbd7238e1ffad9220"
},
"status": {
"path": "docs/status/WBV2-P73-003.md",
"sha256": "52fcce37041c37b1d3e1f22bce81f48cedc40d8d47d8b218f86122eb7dbc17a0"
},
"plan": {
"path": "tests/golden/WBV2-P73-003/capability-continuation-plan.json",
"sha256": "ceab6fcf41ca09d6c55f26f553704ebe39d909b39a6e263c6e0954f992da4383"
},
"taskContext": {
"path": "tests/golden/WBV2-P73-003/task-context.json",
"sha256": "19488eb92d0666bf65043cfd3a30b2e8ca482822c29d37662606bbf86f73fc52"
}
},
"assertions": {
"capabilityFamily": "IMPLEMENTATION.CAPABILITY_FAMILY_SMOKE",
"sourceBacked": true,
"batchCount": 27,
"pendingRows": 6609,
"verificationDeferred": true,
"completionOverlayWritten": false,
"inventoryTotal": 6900,
"effectiveCompleted": 290,
"effectivePending": 6609,
"historicalReproduction": false
},
"nextTask": "WBV2-P74-000"
}

View File

@@ -0,0 +1,167 @@
{
"schemaVersion": 1,
"task": "WBV2-P73-003",
"parentTask": "WBV2-P73-002",
"status": "planned",
"goal": "Run source and frontend smoke without Chromium parity verification.",
"scope": {
"gap": "workflow:run_capability_family_smoke",
"ownerFamily": "RELEASE",
"implementationClass": "SOURCE_BACKED"
},
"commands": [
"node tools/web/check-task-context.mjs --task WBV2-P73-003 --write"
],
"inputPaths": [],
"inputSelection": {
"schemaVersion": 1,
"limits": {
"maxFiles": 12,
"evidenceBytes": 8192,
"contextRemainingBytes": 3263,
"contextRemainingTokens": 814
},
"source": {
"bytes": 6641,
"tokens": 1662
},
"selected": [],
"excluded": [
{
"path": "blender-5.2.0/source/blender",
"bytes": 12546,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tests/golden/WBV2-P27-001/verification-batch-plan.json",
"bytes": 21184,
"reason": "EVIDENCE_BYTE_BUDGET"
},
{
"path": "tests/golden/WBV2-P73-003/",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "docs/status/WBV2-P73-003.md",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
},
{
"path": "tests/golden/WBV2-P73-003/manifest.json",
"bytes": null,
"reason": "GENERATED_EVIDENCE_OUTPUT"
}
],
"totals": {
"files": 0,
"bytes": 0,
"tokens": 0
}
},
"exitCriteria": [
"6900 inventory remains immutable",
"capability families are deduplicated before implementation",
"real Blender source or WebEngine Main path is wired",
"verification and completion overlay remain deferred"
],
"nextTask": "WBV2-P74-000",
"sourceDocuments": {
"queue": "docs/EXECUTION_QUEUE.md",
"taskCard": "docs/tasks/WBV2-P73-003.md",
"taskIndex": "tests/golden/WBV2/task-index.json",
"parentManifest": "tests/golden/WBV2-P73-002/manifest.json",
"parentStatus": "docs/status/WBV2-P73-002.md"
},
"readPolicy": {
"required": [
"docs/EXECUTION_QUEUE.md",
"docs/tasks/WBV2-P73-003.md",
"tests/golden/WBV2-P73-002/manifest.json",
"docs/status/WBV2-P73-002.md"
],
"machineOnly": [
"tests/golden/WBV2/task-index.json",
"tests/golden/M15-03A/task-catalog.jsonl"
],
"optionalByNeed": [
"docs/WEB_BLENDER_MODELER_V1_SCOPE.md",
"任务卡列出的精确协议/生产路径",
"任务卡明确命名的长期计划小节"
],
"forbiddenByDefault": [
"完整 CURRENT_EXECUTION_PLAN.md",
"完整 PROJECT_STATUS_AND_NEXT_WORK.md",
"全部 docs/status/*.md",
"完整 parity/WBS 计划",
"README 历史和 test-results/"
]
},
"parent": {
"manifest": {
"schemaVersion": 1,
"task": "WBV2-P73-002",
"parentTask": "WBV2-P73-001",
"status": "done",
"nextTask": "WBV2-P73-003",
"artifactCount": 9
},
"statusSummary": [
"# WBV2-P73-002 status",
"- task: `WBV2-P73-002`; parent: `WBV2-P73-001`; status: `done`",
"- capability-family implementation: `PASS`; 27 deduplicated batches; 6609 pending rows",
"- Chromium, E2E receipts and completion overlay: `DEFERRED`",
"- inventory unchanged: `6900/6618`, effective `290/6609`",
"- nextTask: `WBV2-P73-003`"
]
},
"budgets": {
"queueBytes": 4096,
"taskBytes": 1284,
"parentManifestBytes": 24576,
"parentStatusBytes": 6144,
"evidenceFiles": 12,
"evidenceBytes": 8192,
"contextTokens": 3500,
"contextEnvelopeTokens": 1024,
"taskLines": 39,
"taskTokens": 321
},
"size": {
"documents": [
{
"path": "docs/EXECUTION_QUEUE.md",
"bytes": 2803,
"lines": 51,
"tokens": 701
},
{
"path": "docs/tasks/WBV2-P73-003.md",
"bytes": 1284,
"lines": 39,
"tokens": 321
},
{
"path": "tests/golden/WBV2-P73-002/manifest.json",
"bytes": 2237,
"lines": 62,
"tokens": 560
},
{
"path": "docs/status/WBV2-P73-002.md",
"bytes": 317,
"lines": 8,
"tokens": 80
}
],
"sourceTokens": 1662,
"evidenceFiles": 0,
"evidenceBytes": 0,
"evidenceTokens": 0,
"totalTokens": 1662,
"reservedEnvelopeTokens": 1024,
"estimatedContextTokens": 2686,
"serializedContextTokens": 617,
"withinBudget": true
}
}

View File

@@ -1,5 +1,5 @@
{"id":"WBV2-P72-000","gapId":"workflow:authorize_capability_family_wave","ownerFamily":"PROGRAM","sourceTask":"P72","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P72-001","gapId":"workflow:index_capability_family_batches","ownerFamily":"RELEASE","sourceTask":"P72","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P72-002","gapId":"workflow:implement_capability_family_slice","ownerFamily":"IMPLEMENTATION","sourceTask":"P72","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P72-003","gapId":"workflow:run_capability_family_smoke","ownerFamily":"RELEASE","sourceTask":"P72","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P73-000","gapId":"workflow:authorize_capability_family_wave","ownerFamily":"PROGRAM","sourceTask":"P73","state":"active","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P73-000","gapId":"workflow:authorize_capability_family_wave","ownerFamily":"PROGRAM","sourceTask":"P73","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P73-001","gapId":"workflow:index_capability_family_batches","ownerFamily":"RELEASE","sourceTask":"P73","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P73-002","gapId":"workflow:implement_capability_family_slice","ownerFamily":"IMPLEMENTATION","sourceTask":"P73","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P73-003","gapId":"workflow:run_capability_family_smoke","ownerFamily":"RELEASE","sourceTask":"P73","state":"completed","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}
{"id":"WBV2-P74-000","gapId":"workflow:authorize_capability_family_wave","ownerFamily":"PROGRAM","sourceTask":"P74","state":"active","targetImplementationClass":"SOURCE_BACKED","exitCriteria":["6900 inventory remains immutable","capability families are deduplicated before implementation","real Blender source or WebEngine Main path is wired","verification and completion overlay remain deferred"]}

View File

@@ -1 +1 @@
{"schemaVersion":1,"operation":"BLENDER_WEB_CAPABILITY_TASK_INDEX","source":{"path":"tests/golden/WBV2-P72-003/capability-continuation-plan.json","sha256":"3ae7fb220b6ad3173f58024766ccc11f762dfd6393a905aacaeb0fc655b4c776"},"catalog":{"path":"tests/golden/WBV2/task-catalog.jsonl","sha256":"0312d6c4b765db3aad1bd06953e834a518e1692a8f27c7f22dae14a69abce2b8"},"taskCount":5,"activeTask":"WBV2-P73-000","entries":{"WBV2-P72-000":{"line":0,"offset":0,"length":402,"previous":"WBV2-P71-003","next":"WBV2-P72-001"},"WBV2-P72-001":{"line":1,"offset":402,"length":401,"previous":"WBV2-P72-000","next":"WBV2-P72-002"},"WBV2-P72-002":{"line":2,"offset":803,"length":410,"previous":"WBV2-P72-001","next":"WBV2-P72-003"},"WBV2-P72-003":{"line":3,"offset":1213,"length":397,"previous":"WBV2-P72-002","next":"WBV2-P73-000"},"WBV2-P73-000":{"line":4,"offset":1610,"length":399,"previous":"WBV2-P72-003","next":null}}}
{"schemaVersion":1,"operation":"BLENDER_WEB_CAPABILITY_TASK_INDEX","source":{"path":"tests/golden/WBV2-P73-003/capability-continuation-plan.json","sha256":"ceab6fcf41ca09d6c55f26f553704ebe39d909b39a6e263c6e0954f992da4383"},"catalog":{"path":"tests/golden/WBV2/task-catalog.jsonl","sha256":"50bc81474b4b29a3d8404517cda24a83fce65cadd2ea81bddc01b80e07fc3512"},"taskCount":5,"activeTask":"WBV2-P74-000","entries":{"WBV2-P73-000":{"line":0,"offset":0,"length":402,"previous":"WBV2-P72-003","next":"WBV2-P73-001"},"WBV2-P73-001":{"line":1,"offset":402,"length":401,"previous":"WBV2-P73-000","next":"WBV2-P73-002"},"WBV2-P73-002":{"line":2,"offset":803,"length":410,"previous":"WBV2-P73-001","next":"WBV2-P73-003"},"WBV2-P73-003":{"line":3,"offset":1213,"length":397,"previous":"WBV2-P73-002","next":"WBV2-P74-000"},"WBV2-P74-000":{"line":4,"offset":1610,"length":399,"previous":"WBV2-P73-003","next":null}}}

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -45,16 +45,11 @@ type WasmModule = {
_web_engine_get_live_handles: () => number;
_web_engine_get_allocated_bytes: () => number;
_web_engine_open_blend: (handle: number, data: number, length: number) => number;
_web_engine_apply_command: (handle: number, data: number, length: number) => number;
_web_engine_call_json: (handle: number, data: number, length: number, resultData: number, resultLength: number) => number;
_web_engine_append_library_object: (handle: number, source: number, sourceLength: number, metadata: number, metadataLength: number) => number;
_web_engine_undo: (handle: number) => number;
_web_engine_redo: (handle: number) => number;
_web_engine_get_scene_snapshot: (handle: number, data: number, length: number) => number;
_web_engine_get_scene_metadata?: (handle: number, data: number, length: number) => number;
_web_engine_get_scene_geometry?: (handle: number, data: number, length: number) => number;
_web_engine_get_scene_delta: (handle: number, data: number, length: number) => number;
_web_engine_get_packed_asset: (handle: number, assetId: number, assetIdLength: number, data: number, length: number) => number;
_web_engine_evaluate_depsgraph: (handle: number, data: number, length: number) => number;
_web_engine_save_blend: (handle: number, data: number, length: number) => number;
_web_engine_decimate_apply: (
positions: number,
@@ -948,57 +943,45 @@ function copyCommand(command: unknown): { pointer: number; length: number } {
return copyIntoWasm(encoded.buffer);
}
function readSnapshot(): ReturnType<typeof parseSceneSnapshotIR> {
if (!module || !handle) throw new Error("WebEngine is not initialized");
const dataOut = module._malloc(4);
const lengthOut = module._malloc(4);
function callUnifiedJson<T>(cmd: string, params: Record<string, unknown> = {}, targetModule: WasmModule | null = module, targetHandle = handle): T {
if (!targetModule || !targetHandle) throw new Error("WebEngine is not initialized");
if (typeof targetModule._web_engine_call_json !== "function") throw report("WASM_INIT_FAILED", "Unified WebEngine JSON ABI is unavailable", true);
const input = copyIntoWasm(new TextEncoder().encode(JSON.stringify({ cmd, params })).buffer);
const resultData = targetModule._malloc(4);
const resultLength = targetModule._malloc(4);
if (!resultData || !resultLength) {
targetModule._free(input.pointer);
if (resultData) targetModule._free(resultData);
if (resultLength) targetModule._free(resultLength);
throw report("WASM_INIT_FAILED", "Unified WebEngine JSON output allocation failed", true);
}
let resultPointer = 0;
try {
const result = module._web_engine_get_scene_snapshot(handle, dataOut, lengthOut);
if (result !== 0) throw nativeError("INVALID_ARGUMENT");
const pointer = module.HEAPU32[dataOut >>> 2];
const length = module.HEAPU32[lengthOut >>> 2];
const bytes = module.HEAPU8.slice(pointer, pointer + length);
return parseSceneSnapshotIR(JSON.parse(new TextDecoder().decode(bytes)) as unknown);
const nativeCode = targetModule._web_engine_call_json(targetHandle, input.pointer, input.length, resultData, resultLength);
resultPointer = targetModule.HEAPU32[resultData >>> 2];
const resultBytes = targetModule.HEAPU8.slice(resultPointer, resultPointer + targetModule.HEAPU32[resultLength >>> 2]);
const envelope = JSON.parse(new TextDecoder().decode(resultBytes)) as { ok?: boolean; result?: T; error?: string };
if (nativeCode !== 0 || envelope.ok !== true) throw nativeErrorFor(targetModule, "INVALID_ARGUMENT");
return envelope.result as T;
}
finally {
module._free(dataOut);
module._free(lengthOut);
if (resultPointer) targetModule._web_engine_free_buffer(resultPointer);
targetModule._free(input.pointer);
targetModule._free(resultData);
targetModule._free(resultLength);
}
}
function readSnapshot(): ReturnType<typeof parseSceneSnapshotIR> {
return parseSceneSnapshotIR(callUnifiedJson<unknown>("snapshot"));
}
function readDelta(): SceneDelta {
if (!module || !handle) throw new Error("WebEngine is not initialized");
const dataOut = module._malloc(4);
const lengthOut = module._malloc(4);
try {
const result = module._web_engine_get_scene_delta(handle, dataOut, lengthOut);
if (result !== 0) throw nativeError("INVALID_ARGUMENT");
const pointer = module.HEAPU32[dataOut >>> 2];
const length = module.HEAPU32[lengthOut >>> 2];
return parseSceneDelta(JSON.parse(new TextDecoder().decode(module.HEAPU8.slice(pointer, pointer + length))) as unknown);
}
finally {
module._free(dataOut);
module._free(lengthOut);
}
return parseSceneDelta(callUnifiedJson<unknown>("delta"));
}
function readDepsgraph(): ReturnType<typeof parseDepsgraphEvaluation> {
if (!module || !handle) throw new Error("WebEngine is not initialized");
const dataOut = module._malloc(4);
const lengthOut = module._malloc(4);
try {
const result = module._web_engine_evaluate_depsgraph(handle, dataOut, lengthOut);
if (result !== 0) throw nativeError("CAPABILITY_MISSING");
const pointer = module.HEAPU32[dataOut >>> 2];
const length = module.HEAPU32[lengthOut >>> 2];
if (!pointer || !length) throw report("CAPABILITY_MISSING", "Blender Depsgraph returned no report");
return parseDepsgraphEvaluation(JSON.parse(new TextDecoder().decode(module.HEAPU8.slice(pointer, pointer + length))) as unknown);
}
finally {
module._free(dataOut);
module._free(lengthOut);
}
return parseDepsgraphEvaluation(callUnifiedJson<unknown>("depsgraph"));
}
function copyFloatBuffer(values: number[]): ArrayBuffer {
@@ -1340,13 +1323,7 @@ async function evaluateIsolatedDecimate(
isolatedModule._free(blendInput.pointer);
}
const sourceSnapshot = readSnapshot();
const commandInput = copyCommand(payload);
try {
if (isolatedModule._web_engine_apply_command(isolatedHandle, commandInput.pointer, commandInput.length) !== 0) throw nativeError("INVALID_ARGUMENT");
}
finally {
isolatedModule._free(commandInput.pointer);
}
callUnifiedJson("applyCommand", { command: payload }, isolatedModule, isolatedHandle);
const scene = await readSnapshotResult();
return { sourceSnapshot, scene, simplify: simplifyReport(sourceSnapshot, scene, payload) };
}
@@ -1497,13 +1474,7 @@ async function handleRequest(event: MessageEvent<WebEngineRequest>): Promise<voi
if (!beforeSnapshot) throw report("PAINT_SCHEMA_INVALID", "Paint pointer sessions require an open Main scene");
const staged = paintStrokeSessions.commit(request.command.session, beforeSnapshot.revision);
assertFutureCapability(staged.command);
const input = copyCommand(staged.command);
try {
if (!module || module._web_engine_apply_command(handle, input.pointer, input.length) !== 0) throw nativeError("INVALID_ARGUMENT");
}
finally {
module?._free(input.pointer);
}
callUnifiedJson("applyCommand", { command: staged.command });
const scene = await readSnapshotResult();
currentSnapshot = scene.snapshot;
result = {
@@ -1568,13 +1539,7 @@ async function handleRequest(event: MessageEvent<WebEngineRequest>): Promise<voi
module._free(blendInput.pointer);
}
const nativePayload = { ...payload, type: "decimateMesh" as const };
const commandInput = copyCommand(nativePayload);
try {
if (module._web_engine_apply_command(previewHandle, commandInput.pointer, commandInput.length) !== 0) throw nativeError("INVALID_ARGUMENT");
}
finally {
module._free(commandInput.pointer);
}
callUnifiedJson("applyCommand", { command: nativePayload }, module, previewHandle);
const scene = await readSnapshotResult();
scene.snapshot = parseSceneSnapshotIR({ ...scene.snapshot, revision: beforeSnapshot.revision });
result = { status: status(), ...scene, simplify: simplifyReport(beforeSnapshot, scene, payload) };
@@ -1588,25 +1553,13 @@ async function handleRequest(event: MessageEvent<WebEngineRequest>): Promise<voi
break;
}
if (payload.type === "undo" || payload.type === "redo") {
if (typeof module?._web_engine_undo !== "function" || typeof module?._web_engine_redo !== "function") {
throw report("WASM_INIT_FAILED", `history ABI unavailable: ${Object.keys(module ?? {}).filter((key) => key.includes("undo") || key.includes("redo")).join(",")}`, true);
}
const undoResult = payload.type === "undo" ? module?._web_engine_undo(handle) : module?._web_engine_redo(handle);
if (!module || undoResult !== 0) throw nativeError("INVALID_ARGUMENT");
callUnifiedJson(payload.type);
const scene = await readSnapshotResult();
currentSnapshot = scene.snapshot;
result = { status: status(), ...publishIncrementalScene(scene), delta: readDelta() };
break;
}
const input = copyCommand(nativePayload);
try {
if (!module || module._web_engine_apply_command(handle, input.pointer, input.length) !== 0) {
throw nativeError("INVALID_ARGUMENT");
}
}
finally {
module?._free(input.pointer);
}
callUnifiedJson("applyCommand", { command: nativePayload });
const scene = await readSnapshotResult();
currentSnapshot = scene.snapshot;
const simplify = simplifyReport(beforeSnapshot, scene, payload);