Add nixica flake, polysemy effects, and NixOS VM test
Summary
-
Nixica flake:
flake.nixusingnixica.lib.mkFlakewithcallCabal2nixfor 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:
nixosTestthat 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 buildsucceeds (cabal package builds with polysemy) -
nix flake checkruns the VM test -
Polysemy effects compose correctly in downstream code