Skip to main content
Clavion is organized as an npm workspaces monorepo. Each package maps to one of the three architectural trust domains. This page is a comprehensive map of the entire codebase.

Top-Level Layout

Every component belongs to exactly one trust domain. The tabs below walk through every package, file, and its role.
Domain B is the trusted core. Private keys, policy evaluation, signing, audit logging, and RPC access all live here. No adapter or agent code runs in this domain. This is the only place where private keys exist and transactions are signed.

packages/types — @clavion/types

Shared TypeScript interfaces and JSON Schemas used across all packages.

packages/audit — @clavion/audit

Append-only audit trail backed by SQLite. Every fund-affecting operation is logged and correlated by intentId.

packages/policy — @clavion/policy

Policy engine that evaluates each TxIntent and returns allow, deny, or require_approval.

packages/signer — @clavion/signer

Encrypted keystore and signing pipeline. Keys are encrypted at rest with scrypt + AES-256-GCM.

packages/preflight — @clavion/preflight

Simulates transactions via eth_call and scores risk before approval.

packages/registry — @clavion/registry

Skill manifest validation, signing, and registry. Ensures only verified skills can interact with the system.

packages/core — @clavion/core

The main API server, transaction builders, approval flow, multi-chain RPC routing, and the 1inch DEX aggregator integration.

CLI and SDK

The CLI provides key management commands. The SDK is a planned interface stub for v0.2.

Fixtures and Tools

Test fixtures live in tools/fixtures/. One valid fixture exists per action type, plus invalid and edge-case variants.

Tests

Docker