# Search Summary - Motr Enclave Codebase ## Literal Request The user requested a maximum effort search to explore patterns, file structures, and project configurations (go.mod, sqlc.yaml, Makefile, etc.). ## Intent Analysis The goal is to provide a comprehensive map of the codebase to allow for immediate action, understanding the "how" and "where" of the Motr Enclave implementation. ## Key Findings ### Project Configuration - **Go Version**: 1.25.5 - **WASM Target**: `wasip1/wasm` - **Database**: SQLite with SQLC for Go code generation - **TypeScript SDK**: Bun-based build and test system - **Build System**: Makefile with targets for build, generate, lint, and test ### Architecture - **SQLite as DID CPU**: Custom SQLite functions in `internal/keybase/functions.go` (`bip44_derive`, etc.) - **Extism Plugin**: Main entry point in `cmd/enclave/main.go`. Exported functions: `generate`, `load`, `exec`, `query`, `ping`. - **Encryption**: AES-256-GCM for database serialization (`internal/keybase/conn.go`) - **UCAN**: v1.0.0-rc.1 support (`internal/crypto/ucan`) - **MPC**: Key share management (`internal/crypto/mpc`) ### Core Files - `cmd/enclave/main.go`: WASM entry point - `internal/keybase/`: Database logic, actions, and generated SQLC code - `internal/migrations/`: Schema (`schema.sql`) and Queries (`query.sql`) - `AGENTS.md`: Detailed architectural guidelines and coding standards ## Results See the structured results block in the main response.