Skip to content
kora-sqlite-rust-engine logo

KORA SQLite-Rust Data Engine

kora-sqlite-rust-engine

Data engine patterns for asynchronous SQLite management in Rust. Handles Zero-Copy RAG, immutable SHA-256 auditing, and Session Vaulting for KORA OS.

SKILL.md

Full skill instructions

KORA SQLite-Rust Data Engine

To manage the Core Data, Knowledge Index, and Audit Logs of KORA OS securely, implement the following data engine patterns:

  1. Initialize the kora_kernel.db with strict asynchronous constraints.
  2. Manage file segmentation (50KB chunks) using Zero-Copy memory patterns in Rust.
  3. Write immutable audit logs to JSONL files using cryptographic chaining.
  4. Handle context snapshots for OpenClaw's Session Vaulting.

Stack: Rust + sqlx (or rusqlite) + SQLite + SHA-256 Cryptography

Security & Integrity Guidelines

VERY IMPORTANT: KORA OS operates on a "Zero Trust" model.

  • Never allow raw SQL queries from the UI or Ring 3 (OpenClaw). All queries must be parameterized.
  • Always validate the agency_id in every transaction to enforce Multi-Tenancy Isolation. No data should leak between business units.
  • Absolute paths are strictly forbidden. All file operations must be relative to the project root.

Quick Start

Step 1: Database Operations

Use Rust's asynchronous runtime to interact with kora_kernel.db. Keep queries lightweight to ensure instant retrieval of RAG metadata.

Step 2: Zero-Copy RAG Management

When the Watch-Driver triggers an INDEX_REQUEST, segment files into 50KB chunks with 10% semantic overlap. Pass memory references to OpenClaw instead of duplicating strings in RAM to preserve the Lite mode budget.

Step 3: Immutable Auditing (The Black Box)

Every action must be appended to the JSONL log. You MUST enforce the following SHA-256 chaining formula: H_n = SHA256(Event_n + H_{n-1}) If the hash chain breaks, immediately trigger an agency lockdown.

Step 4: Session Vault Snapshots

Persist OpenClaw's context state to the disk at critical milestones. If the OpenClaw sub-process crashes, use these snapshots to perform a transparent re-injection (Auto-Healing).

Reference

  • KORA Data Model Specs: Refer to 03_KORA_DATA_MODEL_AND_PERSISTENCE.md and 07_KORA_SECURITY_AND_AUDIT.md.

More Finance & Trading skills

ponytail-debt logo
Finance & Trading

ponytail-debt

Harvest every `ponytail:` comment in the codebase into a debt ledger, so the deliberate shortcuts and deferrals ponytail leaves behind get tracked instead of rotting into "later means never". One-shot report, changes nothing.

155.5K 27.9K
View
stripe-integration logo
Finance & Trading

stripe-integration

Stripe payment processing with checkout sessions, subscriptions, webhooks, and customer management.

40.2K 12.9K
View

Build comprehensive 3-5 year financial models with revenue projections, cost structures, cash flow analysis, and scenario planning for early-stage startups. Use this skill when creating financial projections, calculating burn rate or runway, modeling fundraising scenarios, or preparing investor-r...

40.2K 12K
View
stock-analysis logo
Finance & Trading

stock-analysis

Stock and cryptocurrency analysis with portfolio management and multi-dimensional scoring.

46 11.9K
View
coinglass logo
Finance & Trading

coinglass

Real-time crypto derivatives positioning, whale tracking, liquidations, and institutional ETF flows across 37 specialized tools.

27 11.5K
View

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

40.2K 10.5K
View

Finance AI tools

C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Finalle.ai logo
Finance

Finalle.ai

Stay Ahead with Finalle.ai: The Ultimate Financial News and Tools Platform

Free
View

AI-powered Pine Script code generator for TradingView

Paid
View
TradeUI logo
Finance

TradeUI

Empower your investment strategies with AI signals, option flow data, and advanced chart patterns.

Paid
View
D
Finance

Danelfin

Danelfin review covering its AI stock and ETF scores, rankings, portfolio tools, current pricing, strengths, risks, and alternatives for investors.

Freemium
View
E
Finance

Ellisense

A software for comprehensive market sentiment analysis.

Paid
View

'Stock Correlations' App by Freshly.ai: Reveal Stock Patterns and Trends

Free
View