Skip to content

agentic-research/ley-line-open

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ley-line-open

Open-source data plane primitives for agentic systems. Extracted from ley-line.

Crates

Tier 1: Infrastructure (ll-core/)

Crate Purpose
leyline-core Arena header (repr(C), bytemuck), controller (mmap'd control block)
leyline-schema Shared nodes table DDL — the contract between crates
leyline-public-schema Protobuf definition of nodes schema (cross-language contract)

Tier 2: Projection Engine (ll-open/)

Crate Purpose
leyline-fs SqliteGraph (zero-copy sqlite3_deserialize), Graph trait, reader pool, NFS/FUSE mount, C FFI bridge
leyline-ts Tree-sitter AST projection + bidirectional splice
leyline-lsp LSP client — spawns language servers, projects symbols + diagnostics into nodes

Build

cd rs
cargo build
cargo test

C FFI

leyline-fs builds as a staticlib (libleyline_fs.a) with a C header (include/leyline_fs.h):

cd rs
cargo build -p leyline-fs --lib
# Header: rs/ll-open/fs/include/leyline_fs.h
# Library: rs/target/debug/libleyline_fs.a

Schema Contract

The nodes table is the shared data contract:

CREATE TABLE IF NOT EXISTS nodes (
    id TEXT PRIMARY KEY,
    parent_id TEXT,
    name TEXT NOT NULL,
    kind INTEGER NOT NULL,   -- 0=file, 1=dir
    size INTEGER DEFAULT 0,
    mtime INTEGER NOT NULL,
    record_id TEXT,          -- optional: FK into results table (mache lazy loading)
    record JSON,
    source_file TEXT         -- optional: originating source file (mache file tracking)
);
CREATE INDEX IF NOT EXISTS idx_parent_name ON nodes(parent_id, name);
CREATE INDEX IF NOT EXISTS idx_source_file ON nodes(source_file);

Defined once in leyline-schema. Used by mache and ley-line. The record_id and source_file columns are nullable — ley-line crates leave them NULL; mache populates them for lazy content resolution and incremental re-ingestion.

License

AGPL-3.0 — see LICENSE.

About

Open-source data plane primitives: arena storage, schema contracts, filesystem projection, tree-sitter AST, LSP integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors