BYO domains
Two ways to bring your own business domain. Both produce packs with content fingerprints that enter the reproduction identity.
1. Declarative (recommended): pack.yaml, zero code
# pack.yaml
name: shop
version: "1.0.0"
entities:
orders:
fields: { status: string, total: number, customer: string }
required: [status]
refunds:
fields: { order_id: integer, amount: number, reason: string }
required: [order_id, amount]
Reference it from the scenario (path relative to the scenario file, no ..):
tools: [pack.yaml, email]
world:
shop:
orders:
- { status: delivered, total: 42.0, customer: "cus_7" }
Each collection gets six generated tools with the same template as the official packs — naming, pagination, error codes and all:
| Tool | Behaviour |
|---|---|
shop.list_orders |
paginated list |
shop.get_orders |
by id → {"entity": ...}; ENTITY_NOT_FOUND |
shop.search_orders |
substring over string fields |
shop.create_orders |
validated against fields/required |
shop.update_orders |
{id, fields}; id immutable; unknown fields rejected |
shop.delete_orders |
ENTITY_NOT_FOUND if missing |
The generated surface is deterministic: the same pack.yaml produces the
same fingerprint every time, and the run_dir carries a copy of the file so
eval-mock verify detects tampering (PACK_CHANGED).
2. Python packs (entry point)
Implement the DomainPack protocol (entity schemas + ToolDef tools +
seeding) and register it:
[project.entry-points."eval_mock.packs"]
warehouse = "my_pkg.packs:build_warehouse_pack"
Trust model: Python packs are local code executed on your machine by your choice — same as any pytest plugin. There is no sandbox, on purpose; the zero-code path above exists for everything that doesn't need code.