Liners: Governance as Code
Composable control layers that wrap event handlers to enforce safety, observability, and governance without touching agent code
Overview
What is a Liner?
Anatomy of a Liner
// The Anatomy of a Liner
const myLiner = (next) => {
return (event, context) => {
// 1. Pre-Process: Inspect the event before execution
console.log(`Processing ${event.type}...`);
// 2. Execute: Call the original handler
const result = next(event, context);
// 3. Post-Process: Inspect the result
console.log(`Finished with status: ${result.status}`);
return result;
};
}; Composing Liners
Practical Examples
Shadow Mode Liner (Safety)
Last updated