commerce-trust-safety
Installation
SKILL.md
Trust and safety rules
commerce_common/ is commerce-common/commerce_common/, shopping_agent/ is shopping-agent/core/shopping_agent/, and
merchant_agent/ is merchant-agent/core/merchant_agent/; docs/safety.md lists the same rules. A rule inside a tool
call holds on all three paths, which share one executor (commerce-architecture); rules 10 and 15 name the paths they run
on. Merchant staging, guardrails, approval, and marketplace posture are in commerce-merchant-operations.
Fence third-party content
- Every tool result from catalog, review, policy, order, metric, message, or web content goes through
Fence.fence_payload(commerce_common/fencing.py): NFKC-normalized, invisible and control characters removed, fence markers, forged turn markers, and special tokens replaced, wrapped in the role's label, and cut atmax_fenced_chars. The executor's_fencedapplies it to every handler. - The label and the notice are per-role constants (
STOREFRONT_FENCEinshopping_agent/fencing.py,MERCHANT_FENCEinmerchant_agent/fencing.py); the notice appears once, in the static prompt, with nothing untrusted in it. - The per-request block (profile, cart, memory facts, page, store context) sits inside the same fence after the cache
breakpoint (
build_dynamic_contextin each role'sprompt.py); backend context blocks have their own cap. - A model-supplied result count is clamped to
max_search_results(clamp_limitincommerce_common/execution.py).