Skip to content

Add nixica flake, polysemy effects, and NixOS VM test

Bossypants requested to merge smartypants/nixica-polysemy-vm-test into main

Summary

  • Nixica flake: flake.nix using nixica.lib.mkFlake with callCabal2nix for building, plus a devShell
  • Polysemy effects: Three new effect modules (Ollama.Effects.Chat, Ollama.Effects.Session, Ollama.Effects.ToolDispatch) wrapping the existing IO-based implementations in polysemy effects with interpreters
  • NixOS VM test: nixosTest that starts the Ollama service, verifies connectivity, and exercises the harness CLI

Addresses agent-roster#11 (polysemy request) and ollama-harness#1 (NixOS VM test).

New files

File Purpose
flake.nix Nixica-based flake entry point
nix/default.nix Package, devShell, and VM test check
nix/tests/vm-test.nix NixOS VM integration test
src/Ollama/Effects/Chat.hs Polysemy Chat effect + IO interpreter
src/Ollama/Effects/Session.hs Polysemy Session effect + State interpreter
src/Ollama/Effects/ToolDispatch.hs Polysemy ToolDispatch effect + pure interpreter

Test plan

  • nix build succeeds (cabal package builds with polysemy)
  • nix flake check runs the VM test
  • Polysemy effects compose correctly in downstream code

Merge request reports