OpenAgentIDDocumentation
API referencenpm packages@openagentid/aegis-sdk
OpenAgentIDAPI reference

@openagentid/aegis-sdk/policy

API contract shipped by @openagentid/aegis-sdk 0.1.1. Exact exports, signatures, dependencies and availability.

All packages · Runnable examples · Start an agent

ContractValue
Package@openagentid/aegis-sdk@0.1.1
Entry point@openagentid/aegis-sdk/policy
AvailabilityPublished package
Reference sourcePublished TypeScript declarations
Package enginesnode >=20

This reference is generated from the integrity-verified npm archive for this exact version. Signatures describe the public contract; they are not standalone programs. Complete examples are checked separately.

Import conditions

Use the public entry point above. The package resolves it to these shipped files; do not import its internal files directly.

ConditionPublished file
types./dist/policy/index.d.ts
import./dist/policy/index.js

Exports

composeDecisions

Signature
declare function composeDecisions(decisions: readonly PolicyDecision[]): PolicyDecision;

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:63.

ContractInteraction

Type-only declaration; it is not a runtime value.

Signature
interface ContractInteraction {
    contractAddress: string;
    functionName: string;
    chain: string;
    gasEstimate?: number | null;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:53.

ContractPolicy

Type-only declaration; it is not a runtime value.

Signature
interface ContractPolicy {
    contractAllowlist: string[];
    functionAllowlist: string[];
    chainAllowlist: string[];
    gasLimit?: number | null;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:47.

ContractPolicyEvaluator

Signature
declare class ContractPolicyEvaluator {
    static evaluate(policy: ContractPolicy, interaction: ContractInteraction): PolicyDecision;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:59.

LineagePolicy

Type-only declaration; it is not a runtime value.

Signature
interface LineagePolicy {
    minConformanceLevel?: number | null;
    maxLineageDepth?: number | null;
    requiredHumanRootLiveness?: number | null;
    requiredAttestations: string[];
    bannedHumanRoots: string[];
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:35.

LineagePolicyEvaluator

Signature
declare class LineagePolicyEvaluator {
    static evaluate(policy: LineagePolicy, verification: VerificationResult): PolicyDecision;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:43.

parseAmount

Parse a decimal amount string. Throws PolicyError on invalid input.

Signature
declare function parseAmount(s: string): number;

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:22.

SpendingPolicyEvaluator

Signature
declare class SpendingPolicyEvaluator {
    static evaluate(limits: SpendingLimits, tx: TransactionInfo, dailySpent: string): PolicyDecision;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:10.

TemporalPolicyEvaluator

Signature
declare class TemporalPolicyEvaluator {
    static evaluate(constraints: TemporalConstraints, now?: Date): PolicyDecision;
    static evaluateWithCooldown(constraints: TemporalConstraints, now: Date, lastOperation: Date | null): PolicyDecision;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:24.

TransactionInfo

Type-only declaration; it is not a runtime value.

Signature
interface TransactionInfo {
    asset: string;
    amount: string;
    recipient: string;
    chain: string;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/policy/index.d.ts:4.

Supporting declarations

These package-owned declarations are referenced by the exports above. Their presence here does not make them importable from this entry point. Import only the names in Exports.

ActiveHours

Type-only declaration; it is not a runtime value.

Signature
interface ActiveHours {
    startHour: number;
    endHour: number;
    timezone: string;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:126.

AuditInfo

Type-only declaration; it is not a runtime value.

Signature
interface AuditInfo {
    auditId: string;
    timestamp: string;
    engine: string;
    policiesEvaluated: string[];
}

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:86.

LivenessStatus

Type-only declaration; it is not a runtime value.

Signature
type LivenessStatus = "active" | "warning" | "stale" | "unknown";

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:104.

Obligation

Type-only declaration; it is not a runtime value.

Signature
interface Obligation {
    obligationType: ObligationType;
    params: Record<string, unknown>;
    deadline?: string | null;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:81.

ObligationType

Type-only declaration; it is not a runtime value.

Signature
type ObligationType = "log" | "notify" | "approve" | "escrow" | "limit";

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:80.

PolicyDecision

Type-only declaration; it is not a runtime value.

Signature
interface PolicyDecision {
    allowed: boolean;
    reason?: string | null;
    obligations: Obligation[];
    auditInfo: AuditInfo;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:92.

RevocationStatus

Type-only declaration; it is not a runtime value.

Signature
type RevocationStatus = "active" | "revoked" | "suspended" | "expired" | "unknown";

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:103.

SpendingLimits

Type-only declaration; it is not a runtime value.

Signature
interface SpendingLimits {
    maxAmount?: string | null;
    dailyVolume?: string | null;
    assetAllowlist: string[];
    recipientAllowlist: string[];
    approvalThreshold?: string | null;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:137.

TemporalConstraints

Type-only declaration; it is not a runtime value.

Signature
interface TemporalConstraints {
    validFrom?: string | null;
    validUntil?: string | null;
    activeHours?: ActiveHours | null;
    cooldown?: string | null;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:131.

VerificationResult

Type-only declaration; it is not a runtime value.

Signature
interface VerificationResult {
    did: string;
    signatureValid: boolean;
    lineageValid: boolean;
    lineageDepth: number;
    humanRoot?: string | null;
    revocationStatus: RevocationStatus;
    livenessStatus: LivenessStatus;
    conformanceLevel: number;
    warnings: string[];
    verifiedAt: string;
}

Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:105.

Package requirements

Dependencies

PackagePublished range
uuid^11.0.0
zod^3.23.0

Archive verification

Pinned integrity:

SHA-512 integrity
sha512-eKG79P17teM8i+ZQaNdBEPJnL0XT9723i04kDxgVRrOb0VOnNW5rt2doLq8g4mHBZ4rjHdPEuzZmj5LsL4iuVw==

Machine-readable API manifest · Coverage

On this page