Files
Zhifei Li ccb6136545 feat: OpenClaw integration - ClawHub skill, MCP structured output, and E2E tests (#272)
* feat: OpenClaw ClawHub skill and MCP structured output

Add a ClawHub-compatible skill (skills/leann-memory/) that enables
OpenClaw agents to use LEANN for 97% storage-compressed memory search
with free local embeddings. No PR to the OpenClaw repo required —
users install via `clawhub install` or copy the skill directory.

Skill files:
- claw.json: ClawHub manifest with permissions, tags, model compat
- instructions.md: Agent-facing instructions for search workflow
- README.md: Human-facing setup and comparison table

MCP server:
- Add --json flag to leann_search tool for structured output
  (enables machine-readable results for both MCP and skill paths)

Docs:
- openclaw-setup.md: Quick start guide with MCP and skill options
- openclaw-integration-plan.md: Full competitive analysis, storage
  growth calculations, and marketing strategy

Made-with: Cursor

* feat: OpenClaw integration tests, clean JSON output, and type fixes

- Add tests/openclaw/ suite: skill manifest, MCP protocol, build/search
  E2E, and subprocess-based MCP E2E tests
- Fix SearchResult.score to emit native float (not numpy.float32)
- Add --json quiet mode to suppress informational prints to stderr
- Redirect C++ diagnostic printf to stderr in faiss submodule
- Add stdout fd-level redirection with libc.fflush for clean JSON output
- Fix ty type checker errors (assert shutil.which not None, pytest.skip)

Made-with: Cursor

* feat: real OpenClaw E2E integration test

- Add test_openclaw_e2e.py: 11 tests against a live OpenClaw Docker
  instance with real memory formation via qwen3:8b + native Ollama API
- Fix docker-compose.yml: use --bind lan and native ollama API for
  proper tool calling (openai-completions silently breaks it)
- Add tests/openclaw/.gitignore for docker-data/

Made-with: Cursor

* chore: remove internal strategy docs from public repo

Made-with: Cursor

* docs: restore openclaw-setup.md (user-facing guide)

Made-with: Cursor

* chore: upgrade pytest to 9.0 and remove skip workarounds

pytest 9 fixes the type annotation for pytest.skip(), so ty passes
without the `raise pytest.skip.Exception(...)` workaround. Reverted
all skip calls back to the clean `pytest.skip(...)` form.

Made-with: Cursor

* fix: ruff 0.12.7 format and ty type narrowing for CI

- Reformat assert statements to match ruff 0.12.7 style
- Use assert narrowing instead of explicit type annotation for
  leann_mcp_bin after pytest.skip

Made-with: Cursor
2026-03-06 23:59:11 -08:00

124 lines
2.0 KiB
Plaintext
Executable File

raw_data/
scaling_out/
scaling_out_old/
sanity_check/
demo/indices/
# .vscode/
*.log
*pycache*
outputs/
*.pkl
*.pdf
*.idx
*.map
.history/
lm_eval.egg-info/
demo/experiment_results/**/*.json
*.jsonl
*.eml
*.emlx
*.json
*.png
!.vscode/*.json
!.devcontainer/*.json
!skills/**/claw.json
*.sh
*.txt
!CMakeLists.txt
!llms.txt
latency_breakdown*.json
experiment_results/eval_results/diskann/*.json
aws/
.venv/
.cursor/rules/
*.egg-info/
skip_reorder_comparison/
analysis_results/
build/
.cache/
nprobe_logs/
micro/results
micro/contriever-INT8
data/*
!data/2501.14312v1 (1).pdf
!data/2506.08276v1.pdf
!data/PrideandPrejudice.txt
!data/huawei_pangu.md
!data/ground_truth/
!data/indices/
!data/queries/
!data/.gitattributes
*.qdstrm
benchmark_results/
results/
frac_*.png
final_in_*.png
embedding_comparison_results/
*.ind
*.gz
*.fvecs
*.ivecs
*.index
*.bin
*.old
read_graph
analyze_diskann_graph
degree_distribution.png
micro/degree_distribution.png
policy_results_*
results_*/
experiment_results/
.DS_Store
# The above are inherited from old Power RAG repo
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info
# Virtual environments
.venv
.env
test_indices*/
test_*.py
!tests/**
# Re-ignore common generated artifacts globally (especially after allowlist rules).
**/.DS_Store
**/__pycache__/
**/*.cpython-*.pyc
**/*.cpython-*.pyo
packages/leann-backend-diskann/third_party/DiskANN/_deps/
*.meta.json
*.passages.json
*.npy
*.db
batchtest.py
tests/__pytest_cache__/
tests/__pycache__/
benchmarks/data/
## multi vector
apps/multimodal/vision-based-pdf-multi-vector/multi-vector-colpali-native-weaviate.py
# Ignore all PDFs (keep data exceptions above) and do not track demo PDFs
# If you need to commit a specific demo PDF, remove this negation locally.
# The following line used to force-add a large demo PDF; remove it to satisfy pre-commit:
# !apps/multimodal/vision-based-pdf-multi-vector/pdfs/2004.12832v2.pdf
!apps/multimodal/vision-based-pdf-multi-vector/fig/*
# AUR build directory (Arch Linux)
paru-bin/
merkle-tree-test/
test-code/
localtestmcp/
*.csv
*.pickle