noa-receipt
Version:
NOA Agent Action Receipt — open, offline-verifiable provenance for AI-agent actions. The governance/receipt organ only; the NOA brain is separate and proprietary.
38 lines (37 loc) • 932 B
TypeScript
export type Scalar = string | number | boolean;
export type InputSnapshot = Record<string, Scalar>;
export type Verdict = "ALLOW" | "DENY";
export type Condition = {
op: "eq" | "ne" | "lt" | "le" | "gt" | "ge";
path: string;
value: Scalar;
} | {
op: "in";
path: string;
values: Scalar[];
} | {
op: "exists" | "absent";
path: string;
} | {
op: "and" | "or";
clauses: Condition[];
} | {
op: "not";
clause: Condition;
};
export interface Rule {
id: string;
when: Condition;
then: Verdict;
}
export interface Policy {
spec: "noa.policy/0.2";
id: string;
requiredPaths: string[];
rules: Rule[];
}
export declare const POLICY_SPEC: "noa.policy/0.2";
export declare const DEFAULT_VERDICT: Verdict;
export declare function policyHash(p: Policy): string;
export declare function readSet(p: Policy): string[];
export declare function readSetHash(p: Policy): string;