Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 10 additions & 23 deletions .github/workflows/kndl-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,19 @@ permissions:
contents: read

jobs:
python:
name: Python library
node-test:
name: kndl-memory (Node)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: actions/setup-node@v4
with:
version: "latest"
node-version: "20"
cache: "npm"
cache-dependency-path: packages/kndl-memory/package-lock.json
- name: Install dependencies
run: cd packages/python && uv sync --all-extras
- name: Lint
run: cd packages/python && uv run ruff check src tests && uv run mypy src
run: cd packages/kndl-memory && npm install
- name: Build
run: cd packages/kndl-memory && npm run build
- name: Test
run: cd packages/python && uv run pytest -v --tb=short

mcp-server:
name: MCP server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies
run: cd packages/mcp-server && uv sync --all-extras
- name: Lint
run: cd packages/mcp-server && uv run ruff check src tests && uv run mypy src
- name: Test
run: cd packages/mcp-server && uv run pytest -v --tb=short
run: cd packages/kndl-memory && npm test
76 changes: 35 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,69 +1,63 @@
.PHONY: help \
py-install py-test py-test-cov py-lint py-build \
mcp-install mcp-run mcp-run-http mcp-test \
kndl-install kndl-build kndl-test kndl-lint kndl-eval \
web-install web-dev web-build web-preview \
install build test lint clean
mcp-run mcp-run-http \
install build test clean

NODE = node
PNPM = pnpm

# ── Default: list targets ─────────────────────────────────────────────────────
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " %-20s %s\n", $$1, $$2}'

# ── Python library ────────────────────────────────────────────────────────────
py-install: ## Install Python library deps
cd packages/python && uv sync --all-extras

py-test: ## Run Python tests
cd packages/python && uv run pytest -v
awk 'BEGIN {FS = ":.*?## "}; {printf " %-22s %s\n", $$1, $$2}'

py-test-cov: ## Run Python tests with coverage
cd packages/python && uv run pytest --cov=src/kndl --cov-report=term-missing
# ── @kndl/memory package ──────────────────────────────────────────────────────
kndl-install: ## Install @kndl/memory deps
cd packages/kndl-memory && $(PNPM) install

py-lint: ## Lint Python (ruff + mypy)
cd packages/python && uv run ruff check src tests && uv run mypy src
kndl-build: ## Build @kndl/memory (ESM + type declarations)
cd packages/kndl-memory && $(PNPM) run build

py-build: ## Build Python wheel
cd packages/python && uv build
kndl-test: ## Run @kndl/memory tests (stores + remote, 36 tests)
cd packages/kndl-memory && $(PNPM) test

# ── MCP server ────────────────────────────────────────────────────────────────
mcp-install: ## Install MCP server deps
cd packages/mcp-server && uv sync --all-extras
kndl-lint: ## Type-check @kndl/memory
cd packages/kndl-memory && npx tsc --noEmit

mcp-run: ## Start MCP server (stdio)
cd packages/mcp-server && uv run python -m kndl_mcp
kndl-eval: ## Run eval and publish results to website/public/eval/results.json
cd packages/kndl-memory && npx tsx eval/runner.ts \
--out ../../website/public/eval/results.json

mcp-run-http: ## Start MCP server (HTTP, port 8000)
cd packages/mcp-server && uv run python -m kndl_mcp --http
publish-eval: kndl-eval web-build ## Run eval, publish results, build website

mcp-lint: ## Lint MCP (ruff + mypy)
cd packages/mcp-server && uv run ruff check src tests && uv run mypy src
# ── MCP server ────────────────────────────────────────────────────────────────
mcp-run: ## Start kndl-memory-mcp (stdio, default storage)
cd packages/kndl-memory && $(NODE) dist/server.js

mcp-test: ## Run MCP integration tests
cd packages/mcp-server && uv run pytest -v
mcp-run-http: ## Start kndl-memory-mcp (HTTP port 8000, DEBUG logging)
cd packages/kndl-memory && LOG_LEVEL=DEBUG $(NODE) dist/server.js --http

# ── Website ───────────────────────────────────────────────────────────────────
web-install: ## Install website pnpm deps
cd website && pnpm install
web-install: ## Install website deps
cd website && $(PNPM) install

web-dev: ## Start Vite dev server
cd website && pnpm run dev
cd website && $(PNPM) run dev

web-build: ## Build website for production
cd website && pnpm run build
cd website && $(PNPM) run build

web-preview: ## Preview production build
cd website && pnpm run preview
cd website && $(PNPM) run preview

# ── Aggregates ────────────────────────────────────────────────────────────────
install: py-install mcp-install ## Install all packages

build: py-build ## Build all packages
install: kndl-install web-install ## Install all packages

test: py-test mcp-test ## Run all test suites
build: kndl-build web-build ## Build all packages

lint: py-lint mcp-lint ## Run all linters
test: kndl-test ## Run all tests

clean: ## Remove build artifacts and venvs
cd packages/python && rm -rf dist .venv
cd packages/mcp-server && rm -rf dist .venv
clean: ## Remove build artifacts and node_modules
cd packages/kndl-memory && rm -rf dist node_modules
cd website && rm -rf dist node_modules
Loading
Loading