Initial open-source release

This commit is contained in:
Andrey Avtomonov 2026-05-10 23:12:26 +02:00
commit 1a42152e6f
1199 changed files with 257054 additions and 0 deletions

View file

@ -0,0 +1,20 @@
# Local Warehouse Example
This example is a standalone KLO project that can be copied to a temp directory
and used with the local CLI and stdio MCP server. It uses the `fake` ingest
adapter so it does not require a database or external app server.
Run the example from the repository root after building the CLI:
```bash
pnpm --filter @klo/cli run build
EXAMPLE_DIR="$(mktemp -d)/local-warehouse"
cp -R examples/local-warehouse "$EXAMPLE_DIR"
node packages/cli/dist/bin.js knowledge list --project-dir "$EXAMPLE_DIR"
node packages/cli/dist/bin.js sl list --project-dir "$EXAMPLE_DIR" --connection-id warehouse
node packages/cli/dist/bin.js ingest run --project-dir "$EXAMPLE_DIR" --connection-id warehouse --adapter fake --source-dir "$EXAMPLE_DIR/source"
```
The copied project creates its own Git repository on first use. Keep commands
pointed at a copy when experimenting so the checked-in example fixture stays
unchanged.

View file

@ -0,0 +1,25 @@
project: local-warehouse
connections:
warehouse:
driver: postgres
readonly: true
storage:
state: sqlite
search: sqlite-fts5
git:
auto_commit: true
author: "klo <klo@example.com>"
ingest:
adapters:
- fake
- live-database
agent:
run_research:
enabled: false
max_iterations: 20
default_toolset:
- sl_query
- knowledge_search
- sl_read_source
memory:
auto_commit: true

View file

@ -0,0 +1,15 @@
---
summary: Paid order value after refunds
tags:
- finance
- orders
refs: []
sl_refs:
- warehouse.orders
usage_mode: auto
---
Revenue is paid order amount after refund adjustments.
Use `orders.total_revenue` for recognized order value and `orders.order_count`
for paid order volume.

View file

@ -0,0 +1,18 @@
name: orders
table: public.orders
description: Orders placed through the storefront.
grain:
- id
columns:
- name: id
type: number
- name: status
type: string
- name: amount
type: number
measures:
- name: order_count
expr: count(*)
- name: total_revenue
expr: sum(amount)
joins: []

View file

@ -0,0 +1 @@
{"source":"orders","description":"Example raw file staged by the fake adapter"}