1import{t as e}from"./index-LJN3RQda.js";var t=e(),n=`// Deterministic policy engine â agent intent vs. policy check 2type Intent = { type: "payment"; amountCents: number; tenantId: string; approvedBy?: string }; 3type Decision = { allow: boolean; reason: string }; 4 5export function evaluate(intent: Intent, ctx: { tenantId: string; limitCents: number }): Decision { 6 if (intent.tenantId !== ctx.tenantId) 7 return deny("tenant_scope_violation: intent crosses tenant boundary"); 8 if (intent.amountCents > ctx.limitCents) 9 return deny(\`amount_over_limit: \${intent.amountCents} > \${ctx.limitCents}\`); 10 if (intent.amountCents >= 10_000_00 && !intent.approvedBy) 11 return deny("approval_required: payments >= $10,000 need explicit approval"); 12 return { allow: true, reason: "ok" }; 13} 14 15function deny(reason: string): Decision { 16 audit.append({ kind: "policy_deny", reason }); // append-only log 17 alerts.emit({ severity: "high", reason }); 18 return { allow: false, reason }; 19}`;function r(){return(0,t.jsxs)(`div`,{className:`min-h-dvh bg-background text-foreground font-sans`,children:[(0,t.jsx)(i,{}),(0,t.jsx)(a,{}),(0,t.jsx)(o,{}),(0,t.jsx)(s,{}),(0,t.jsx)(c,{}),(0,t.jsx)(l,{}),(0,t.jsx)(d,{}),(0,t.jsx)(f,{})]})}function i(){return(0,t.jsx)(`header`,{className:`sticky top-0 z-40 border-b border-border/60 bg-background/80 backdrop-blur-md`,children:(0,t.jsxs)(`div`,{className:`mx-auto flex max-w-6xl items-center justify-between px-5 py-4`,children:[(0,t.jsxs)(`a`,{href:`#`,className:`font-mono text-base font-semibold tracking-tight`,children:[`Claw`,(0,t.jsx)(`span`,{className:`text-accent`,children:`Keeper`})]}),(0,t.jsxs)(`nav`,{className:`hidden items-center gap-7 text-sm text-muted-foreground sm:flex`,children:[(0,t.jsx)(`a`,{href:`#how`,className:`transition-colors hover:text-foreground`,children:`How it works`}),(0,t.jsx)(`a`,{href:`#code`,className:`transition-colors hover:text-foreground`,children:`Policy engine`}),(0,t.jsx)(`a`,{href:`#refs`,className:`transition-colors hover:text-foreground`,children:`References`})]}),(0,t.jsx)(`a`,{href:`https://github.com/Alexi5000/ClawKeeper`,target:`_blank`,rel:`noreferrer`,className:`inline-flex min-h-11 items-center rounded-md border border-border-strong px-3 text-sm font-medium transition-colors hover:bg-surface`,children:`GitHub`})]})})}function a(){return(0,t.jsxs)(`section`,{className:`relative overflow-hidden border-b border-border/60`,children:[(0,t.jsx)(`div`,{className:`pointer-events-none absolute inset-0 grid-bg opacity-60`,"aria-hidden":!0}),(0,t.jsx)(`div`,{className:`pointer-events-none absolute -top-40 left-1/2 h-[480px] w-[820px] -translate-x-1/2 rounded-full opacity-25 blur-3xl`,style:{background:`radial-gradient(closest-side, var(--accent), transparent 70%)`},"aria-hidden":!0}),(0,t.jsxs)(`div`,{className:`relative mx-auto max-w-6xl px-5 pt-20 pb-24 sm:pt-28 sm:pb-32`,children:[(0,t.jsx)(`p`,{className:`animate-fade-up font-mono text-xs uppercase tracking-[0.18em] text-accent`,children:`Open-source agentic finance platform`}),(0,t.jsx)(`h1`,{className:`animate-fade-up mt-5 max-w-4xl text-balance text-4xl font-semibold leading-[1.05] tracking-tight sm:text-5xl md:text-6xl`,children:`A 110-agent finance hierarchy that ships to production.`}),(0,t.jsx)(`p`,{className:`animate-fade-up mt-6 max-w-2xl text-base leading-relaxed text-muted-foreground sm:text-lg`,children:`CEO â 9 orchestrators â 100 workers. Deterministic policy engine. Postgres row-level tenant isolation. Immutable audit logs. MIT licensed.`}),(0,t.jsxs)(`div`,{className:`animate-fade-up mt-9 flex flex-wrap gap-3`,children:[(0,t.jsx)(`a`,{href:`https://github.com/Alexi5000/ClawKeeper`,target:`_blank`,rel:`noreferrer`,className:`inline-flex min-h-11 items-center justify-center rounded-md bg-accent px-5 text-sm font-semibold text-accent-foreground shadow-[0_8px_24px_-8px_color-mix(in_oklab,var(--accent)_70%,transparent)] transition-transform hover:-translate-y-0.5`,children:`Read the source â`}),(0,t.jsx)(`a`,{href:`https://arxiv.org/abs/2603.24414`,target:`_blank`,rel:`noreferrer`,className:`inline-flex min-h-11 items-center justify-center rounded-md border border-border-strong px-5 text-sm font-semibold transition-colors hover:bg-surface`,children:`See the paper`})]})]})]})}function o(){return(0,t.jsx)(`section`,{className:`border-b border-border/60`,children:(0,t.jsxs)(`div`,{className:`mx-auto max-w-6xl px-5 py-20 sm:py-24`,children:[(0,t.jsx)(`h2`,{className:`font-mono text-xs uppercase tracking-[0.18em] text-accent`,children:`The problem`}),(0,t.jsx)(`div`,{className:`mt-8 grid gap-8 md:grid-cols-3`,children:[`Most "AI finance" stacks are wrappers around an LLM with a prompt. They fail in production because thereâs no enforceable policy layer.`,`Regulated workflows (SOX, GDPR, audit) require code-level guarantees â not prompt-level asks.`,`ClawKeeper separates intent (what the agent wants to do) from authority (what itâs allowed to do). The policy engine runs in TypeScript, not in the prompt.`].map((e,n)=>(0,t.jsxs)(`p`,{className:`text-base leading-relaxed text-muted-foreground`,children:[(0,t.jsxs)(`span`,{className:`mr-2 font-mono text-xs text-foreground
19/60`,children:[`0`,n+1]}),e]},n))})]})})}function s(){return(0,t.jsx)(`section`,{id:`how`,className:`border-b border-border/60`,children:(0,t.jsxs)(`div`,{className:`mx-auto max-w-6xl px-5 py-20 sm:py-24`,children:[(0,t.jsx)(`h2`,{className:`font-mono text-xs uppercase tracking-[0.18em] text-accent`,children:`How it works`}),(0,t.jsx)(`div`,{className:`mt-10 grid gap-5 md:grid-cols-3`,children:[{n:`01`,title:`Three-layer agent hierarchy`,body:`1 CEO agent (task intake, decomposition); 9 orchestrator agents (one per finance domain: AP, AR, payroll, tax, treasury, reporting, audit, compliance, FP&A); 100 worker agents (specialized routines per orchestrator).`},{n:`02`,title:`Deterministic policy engine`,body:`Policies written as TypeScript functions, not natural language. Pre-execution check before any financial workflow. Block + log + alert on violation.`},{n:`03`,title:`Tenant isolation`,body:`Postgres row-level security (RLS) on every table. Per-tenant JWT claims bound to query context. Append-only immutable audit logs.`}].map(e=>(0,t.jsxs)(`article`,{className:`group relative rounded-lg border border-border bg-surface/60 p-6 transition-colors hover:border-border-strong hover:bg-surface`,children:[(0,t.jsx)(`div`,{className:`font-mono text-xs text-accent`,children:e.n}),(0,t.jsx)(`h3`,{className:`mt-3 text-lg font-semibold tracking-tight`,children:e.title}),(0,t.jsx)(`p`,{className:`mt-3 text-sm leading-relaxed text-muted-foreground`,children:e.body})]},e.n))})]})})}function c(){return(0,t.jsx)(`section`,{className:`border-b border-border/60`,children:(0,t.jsx)(`div`,{className:`mx-auto max-w-6xl px-5 py-16`,children:(0,t.jsx)(`div`,{className:`grid grid-cols-2 gap-px overflow-hidden rounded-lg border border-border bg-border md:grid-cols-4`,children:[{v:`110`,l:`agents`},{v:`3`,l:`layers`},{v:`MIT`,l:`license`},{v:`RLS`,l:`Postgres`}].map(e=>(0,t.jsxs)(`div`,{className:`bg-surface/60 px-6 py-8 text-center`,children:[(0,t.jsx)(`div`,{className:`font-mono text-3xl font-semibold tracking-tight sm:text-4xl`,children:e.v}),(0,t.jsx)(`div`,{className:`mt-2 text-xs uppercase tracking-wider text-muted-foreground`,children:e.l})]},e.l))})})})}function l(){return(0,t.jsx)(`section`,{id:`code`,className:`border-b border-border/60`,children:(0,t.jsxs)(`div`,{className:`mx-auto max-w-6xl px-5 py-20 sm:py-24`,children:[(0,t.jsx)(`h2`,{className:`font-mono text-xs uppercase tracking-[0.18em] text-accent`,children:`Policy engine`}),(0,t.jsx)(`h3`,{className:`mt-3 max-w-2xl text-2xl font-semibold tracking-tight sm:text-3xl`,children:`Agent intent. Policy check. Allow or deny â with a reason.`}),(0,t.jsx)(`p`,{className:`mt-4 max-w-2xl text-sm leading-relaxed text-muted-foreground`,children:`An agent proposes a payment. The policy function checks amount limits, tenant scope, and approval state, then returns allow/deny + reason. The deny path logs and alerts.`}),(0,t.jsxs)(`div`,{className:`mt-8 overflow-hidden rounded-lg border border-border bg-[oklch(0.14_0.005_280)] shadow-2xl`,children:[(0,t.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-4 py-2.5`,children:[(0,t.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,t.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[oklch(0.55_0.18_25)]`}),(0,t.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[oklch(0.75_0.15_85)]`}),(0,t.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[oklch(0.65_0.15_150)]`})]}),(0,t.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:`policy/engine.ts`})]}),(0,t.jsx)(`pre`,{className:`overflow-x-auto p-5 font-mono text-[13px] leading-relaxed sm:text-sm`,children:(0,t.jsx)(u,{code:n})})]})]})})}function u({code:e}){let n=[{re:/(\/\/[^\n]*)/g,cls:`text-muted-foreground italic`},{re:/(`[^`]*`|"[^"]*"|'[^']*')/g,cls:`text-[oklch(0.78_0.14_140)]`},{re:/\b(export|function|type|return|if|const|let|import|from)\b/g,cls:`text-accent`},{re:/\b(string|number|boolean|Decision|Intent)\b/g,cls:`text-[oklch(0.75_0.12_220)]`},{re:/\b(\d[\d_]*)\b/g,cls:`text-[oklch(0.80_0.14_70)]`}],r=[{text:e}];for(let{re:e,cls:t}of n){let n=[];for(let i of r){if(i.cls){n.push(i);continue}let r=0,a=i.text,o;for(e.lastIndex=0;(o=e.exec(a))!==null;)o.index>r&&n.push({text:a.slice(r,o.index)}),n.push({text:o[0],cls:t}),r=o.index+o[0].length,o[0].length===0&&e.lastIndex++;r<a.length&&n.push({text:a.slice(r)})}r=n}return(0,t.jsx)(`code`,{children:r.map((e,n)=>e.cls?(0,t.jsx)(`span`,{className:e.cls,children:e.text}
19,n):(0,t.jsx)(`span`,{className:`text-foreground/85`,children:e.text},n))})}function d(){return(0,t.jsx)(`section`,{id:`refs`,className:`border-b border-border/60`,children:(0,t.jsxs)(`div`,{className:`mx-auto max-w-6xl px-5 py-20 sm:py-24`,children:[(0,t.jsx)(`h2`,{className:`font-mono text-xs uppercase tracking-[0.18em] text-accent`,children:`References`}),(0,t.jsx)(`ul`,{className:`mt-8 divide-y divide-border rounded-lg border border-border bg-surface/40`,children:[{label:`GitHub`,value:`github.com/Alexi5000/ClawKeeper`,href:`https://github.com/Alexi5000/ClawKeeper`},{label:`Paper`,value:`arXiv:2603.24414`,href:`https://arxiv.org/abs/2603.24414`},{label:`License`,value:`MIT`,href:`https://github.com/Alexi5000/ClawKeeper/blob/main/LICENSE`},{label:`Stars`,value:`19â
on GitHub`,href:`https://github.com/Alexi5000/ClawKeeper`}].map(e=>(0,t.jsx)(`li`,{children:(0,t.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer`,className:`flex min-h-14 items-center justify-between gap-4 px-5 py-4 transition-colors hover:bg-surface`,children:[(0,t.jsx)(`span`,{className:`font-mono text-xs uppercase tracking-wider text-muted-foreground`,children:e.label}),(0,t.jsxs)(`span`,{className:`truncate text-right text-sm font-medium text-foreground`,children:[e.value,` `,(0,t.jsx)(`span`,{className:`text-accent`,children:`â`})]})]})},e.label))})]})})}function f(){return(0,t.jsx)(`footer`,{className:`border-border/60`,children:(0,t.jsxs)(`div`,{className:`mx-auto grid max-w-6xl gap-6 px-5 py-12 sm:grid-cols-[1fr_auto] sm:items-end`,children:[(0,t.jsxs)(`div`,{children:[(0,t.jsxs)(`div`,{className:`font-mono text-sm font-semibold`,children:[`Claw`,(0,t.jsx)(`span`,{className:`text-accent`,children:`Keeper`})]}),(0,t.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Built by Alex Cinovoj · TechTide AI · Columbus, OH`})]}),(0,t.jsxs)(`nav`,{className:`flex flex-wrap gap-x-5 gap-y-2 text-sm text-muted-foreground sm:justify-end`,children:[(0,t.jsx)(`a`,{href:`https://github.com/Alexi5000`,target:`_blank`,rel:`noreferrer`,className:`hover:text-foreground`,children:`github.com/Alexi5000`}),(0,t.jsx)(`a`,{href:`https://linkedin.com/in/alexcinovoj`,target:`_blank`,rel:`noreferrer`,className:`hover:text-foreground`,children:`linkedin.com/in/alexcinovoj`}),(0,t.jsx)(`a`,{href:`https://techtideai.io`,target:`_blank`,rel:`noreferrer`,className:`hover:text-foreground`,children:`techtideai.io`})]})]})})}export{r as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.