diff --git a/harness/.env.example b/harness/.env.example new file mode 100644 index 00000000..1444248f --- /dev/null +++ b/harness/.env.example @@ -0,0 +1,27 @@ +# ThothII profile: server (full rebuild) | workstation (read REST + optional upsert) +THOTH_PROFILE=server + +# Workspace DB (relational, direct transport) — example: chirone +THOTH_DB_HOST= +THOTH_DB_PORT=5432 +THOTH_DB_USER= +THOTH_DB_PASSWORD= + +# Vector REST — LETTURA (rpc search_similar) sul Supabase remoto +THOTH_VEC_REST_URL=https://host/vector/v1/ +THOTH_VEC_API_KEY= + +# Vector REST — SCRITTURA controllata (upsert only) da client remoti autorizzati +THOTH_VEC_WRITE_API_KEY= + +# Vector direct loading (server-only) +THOTH_VEC_HOST=localhost +THOTH_VEC_PORT=5438 +THOTH_VEC_USER=postgres +THOTH_VEC_PASSWORD= + +# Embeddings (Ollama) +THOTH_OLLAMA_URL=http://localhost:11434 + +# TLS (optional, internal CA) +THOTH_SSL_CA= diff --git a/harness/.gitignore b/harness/.gitignore new file mode 100644 index 00000000..e38bdab7 --- /dev/null +++ b/harness/.gitignore @@ -0,0 +1,9 @@ +__pycache__/ +*.pyc +.env +.venv/ +sessions/ +indexes/ +*.egg-info/ +dist/ +build/ diff --git a/harness/nsp/__init__.py b/harness/nsp/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/harness/pyproject.toml b/harness/pyproject.toml new file mode 100644 index 00000000..57358035 --- /dev/null +++ b/harness/pyproject.toml @@ -0,0 +1,34 @@ +[project] +name = "nsp" +version = "0.1.0" +description = "ThothII harness — deterministic CLI for the NL→SQL workflow" +requires-python = ">=3.12" +dependencies = [ + "typer>=0.12", + "pydantic>=2.0", + "pyyaml>=6.0", + "sqlalchemy>=2.0", + "psycopg2-binary>=2.9", + "datasketch>=1.6", + "sqlglot>=23.0", + "python-dotenv>=1.0", + "rich>=13.0", + "requests>=2.31", + "tqdm>=4.66", +] + +[project.scripts] +nsp = "nsp.cli:app" + +[project.optional-dependencies] +dev = [ + "pytest>=8.0", + "testcontainers[postgres]>=4.0", + "ruff>=0.5", +] + +[tool.ruff] +line-length = 100 + +[tool.pytest.ini_options] +testpaths = ["tests"]