feat(agent): experimental Prolog-RLM backend #108

Merged
lost-rob0t merged 22 commits from feature/prolog-rlm-integration into master 2026-08-13 04:57:10 +00:00
lost-rob0t commented 2026-08-13 03:06:08 +00:00 (Migrated from github.com)

Summary

Adds an experimental prolog_rlm conversational backend while preserving LangGraph as the default.

Architecture

  • separate SWI-Prolog process per RLM request; never uses Zara's long-lived PySWIP query lock
  • structured JSON Lines IPC with request correlation
  • structured cancellation mapped to rlm_cancel/1, with per-process terminate/kill fallback
  • one capability-gated bridge to Zara's existing calculator tool
  • provider-neutral host publisher is bound into the selected backend
  • structured usage/recursion/trajectory metadata without fake progress
  • fixed Prolog-RLM integration revision: 4cdc9854a510a2d07b559e9ae34491d43d81301a

Nix integration

  • exact non-flake Prolog-RLM source pin in flake.nix + flake.lock
  • dev shell and packaged wrappers receive the pinned RLM source path
  • packaged sidecar path does not depend on $PWD
  • CI builds the packaged default Zara derivation

Validation

  • deterministic backend lifecycle/concurrency/cancellation/correlation tests
  • protocol-edge tests for unexpected child crash, timeout cleanup, request-id mismatch, denied tools, malformed tool arguments, bounded calculator output, and concurrent response routing
  • RuntimeHost backend-publisher regression test
  • real SWI sidecar module-load + exact revision probe under Nix
  • pinned Prolog-RLM runtime/version/module-load contract checks in CI
  • Zara's full regression suite exercises the adapter on Nix SWI-Prolog
  • PR diff whitespace gate
  • Ubuntu + Arch shared-microphone regression jobs
  • opt-in real OpenRouter Zara adapter smoke + depth-1 RLM/tool fixture; CI executes it when OPENROUTER_API_KEY is configured and otherwise reports a clean skip
  • fixed-fixture LangGraph vs Prolog-RLM benchmark harness

Scope intentionally deferred

  • durable artifact handoff experiment
  • Zara memory migration/rewrite
  • broad Zara tool registry exposure
  • persistent RLM sidecar daemon

Approved for merge when CI is green.

## Summary Adds an experimental `prolog_rlm` conversational backend while preserving LangGraph as the default. ### Architecture - separate SWI-Prolog process per RLM request; never uses Zara's long-lived PySWIP query lock - structured JSON Lines IPC with request correlation - structured cancellation mapped to `rlm_cancel/1`, with per-process terminate/kill fallback - one capability-gated bridge to Zara's existing calculator tool - provider-neutral host publisher is bound into the selected backend - structured usage/recursion/trajectory metadata without fake progress - fixed Prolog-RLM integration revision: `4cdc9854a510a2d07b559e9ae34491d43d81301a` ### Nix integration - exact non-flake Prolog-RLM source pin in `flake.nix` + `flake.lock` - dev shell and packaged wrappers receive the pinned RLM source path - packaged sidecar path does not depend on `$PWD` - CI builds the packaged default Zara derivation ### Validation - deterministic backend lifecycle/concurrency/cancellation/correlation tests - protocol-edge tests for unexpected child crash, timeout cleanup, request-id mismatch, denied tools, malformed tool arguments, bounded calculator output, and concurrent response routing - RuntimeHost backend-publisher regression test - real SWI sidecar module-load + exact revision probe under Nix - pinned Prolog-RLM runtime/version/module-load contract checks in CI - Zara's full regression suite exercises the adapter on Nix SWI-Prolog - PR diff whitespace gate - Ubuntu + Arch shared-microphone regression jobs - opt-in real OpenRouter Zara adapter smoke + depth-1 RLM/tool fixture; CI executes it when `OPENROUTER_API_KEY` is configured and otherwise reports a clean skip - fixed-fixture LangGraph vs Prolog-RLM benchmark harness ### Scope intentionally deferred - durable artifact handoff experiment - Zara memory migration/rewrite - broad Zara tool registry exposure - persistent RLM sidecar daemon Approved for merge when CI is green.
Sign in to join this conversation.
No description provided.