Download src/agents/ledge.ts from Snapkitty/holy-agents: direct link, hf CLI and curl.
- Browser
- Download file 558 Bytes
-
https://huggingface.co/Snapkitty/holy-agents/resolve/main/src/agents/ledge.ts
- Command line
-
hf download hf://Snapkitty/holy-agents/src/agents/ledge.ts
-
curl -L -o ledge.ts https://huggingface.co/Snapkitty/holy-agents/resolve/main/src/agents/ledge.ts
558 Bytes
| import type { AgentName, Verdict, LedgeResult } from '../types.js'; | |
| import { appendEntry, verifyChain } from '../worm.js'; | |
| export function sealDecision(eventId: string, agent: AgentName, action: string, verdict: Verdict, citations: string[]): LedgeResult { | |
| const entry = appendEntry(eventId, agent, action, verdict, citations); | |
| return { | |
| sequence: entry.seq, | |
| prevHash: entry.prev_hash, | |
| hash: entry.hash, | |
| sealed: true | |
| }; | |
| } | |
| export function verifyLedger(): { valid: boolean; errors: string[] } { | |
| return verifyChain(); | |
| } | |