Factory-level audit wrap
Problem. Per-tool audit logging leaves holes. The auditor's first question always lands on the one call that wasn't logged.
Fix. Wrap audit at the registry, not per-tool. One choke point.
const tool = createAuditedTool({
name: 'mark_reconciled',
execute: async (args, ctx) => { ... },
})
// every tool shipped through this factory is audit-wrapped at the boundary3f2d204 →