ocs_doc_api: Phase 3 attributes + nested block traversal

- SetAttribute op + GetAttributes/GetBlockEntities queries (append-only).
- backend set_attribute (add/update Insert attribute), attributes (tag,value pairs),
  block_entities (read-only traversal via BlockRecord.entity_handles -> id+kind+bounds).
- facade Entity::set_attribute/attributes, Document::block_entities.
- spec Insert methods; api_reference + binding_schema regenerated; mocks + baseline.
- Query enum: drop Copy (GetBlockEntities carries String).
- Test phase3_attributes_and_block_traversal -> 608 host lib + 3 consistency green.
This commit is contained in:
Sebastian committed 2026-09-06 10:02:23 +02:00
1 parent 2dba0158ca
commit 67655add72
15 files changed
+267 -14

No files matched your search

+7 -2
View File
@@ -79,8 +79,13 @@ Phase 2b (annotations/hatch/dimension typed ops), attributes + nested traversal
- **Done:** `create_insert(block_name, point, scale, rotation)` → `Operation::CreateInsert`
(validates the BlockRecord exists; unknown block → `Validation`, no mutation).
Insert `transform` moves its `insert_point`. Covered by `phase3_*` test.
- **Remaining:** `AttributeDefinition`/`AttributeEntity` typed create + attribute
get/set; read-only nested block-content traversal.
- **Done (attributes + traversal):** `set_attribute(tag, value)` (adds/updates an
attribute on an insert, `SetAttribute` op), `attributes()` → (tag, value) pairs
(`GetAttributes`), and `block_entities(block_name)` → read-only nested traversal
of a block definition's entities (`GetBlockEntities`). Covered by
`phase3_attributes_and_block_traversal` test.
- **Remaining:** typed `AttributeDefinition` (in-block attribute-definition)
create.
### Phase 4 — paper-space & viewports
- **Done:** `create_viewport(center, width, height, view_target, view_height)` →