<!– vale off –>

Status

This page tracks the implementation state of REPLy.jl against the canonical OpenSpec definitions.

Summary

REPLy.jl has progressed significantly beyond its initial tracer-bullet state. The core protocol, session management, and a rich set of middleware-driven operations are now fully implemented and verified.

  • Protocol: Fully implemented flat JSON envelopes, correlation by id, and newline-delimited framing.
  • Operations: eval, describe, load-file, interrupt, complete, lookup, stdin, and full session lifecycle (new-session, ls-sessions, close, clone) are all functional.
  • Sessions: Support for ephemeral and named sessions, binding isolation, FIFO serialization, and Revise.jl integration.
  • Transports: TCP and Unix domain sockets (with owner-only permissions) are both supported, including concurrent multi-listeners.
  • Adapter: A complete MCP (Model Context Protocol) reference adapter exists with tool mappings for the core REPLy operations.
  • Security: Resource limits (connections, sessions, message/output size, eval time) and audit logging are implemented.

Capability Status Matrix

CapabilitySpecified in OpenSpecImplemented nowCovered nowNotes
Protocol envelope and JSON framingCovers flat envelopes, echoed id, kebab-case keys, and done-terminated streams.
Core eval flowSupports timeout-ms, silent, store-history, allow-stdin, and module path resolution.
Additional core operationsdescribe, load-file, interrupt, complete, lookup, stdin, clone, close, ls-sessions are all built.
Session managementNamed/ephemeral sessions, FIFO eval, idle timeout sweeping, and Revise integration are complete.
Middleware systemUnified handle_message protocol with descriptor-based metadata and dynamic stack building.
TCP transportFully supported with concurrent client handling.
Unix socket and multi-listener transportSupport for owner-only sockets, stale cleanup, and serve_multi.
Error handlingStructured exception metadata, safe showerror fallbacks, and comprehensive status flags.
Security and resource limitsLimits for connections/sessions/size/time and in-memory/on-disk audit logs are functional.
MCP adapterEight-tool catalog with status mapping and session routing logic is implemented.

Current Implementation Snapshot

AreaStatusNotes
TCP/Unix server (REPLy.serve)✅ implementedStarts listeners and handles concurrent clients.
newline-delimited JSON transport✅ implementedThread-safe framing and bounded line reading.
flat request envelope validation✅ implementedEnforces string id, string op, kebab-case keys, flat values.
eval operation✅ implementedFull support for captured I/O, timeouts, and history.
Additional ops (complete, lookup, ...)✅ implementedHandled by modular middleware handlers.
buffered stdout / stderr✅ implementedPiped capture prevents deadlocks on large output.
structured error responses✅ implementedIncludes err, ex, and stacktrace.
unknown op handling✅ implementedReturns unknown-op status flag via fallback middleware.
concurrent clients✅ implementedTested across TCP and Unix socket transports.
persistent named sessions✅ implementedFull lifecycle management via RPC or Julia API.
Revise.jl integration✅ implementedOptional hook to call revise() before evals.
resource limit enforcement✅ implementedRejects requests exceeding server-wide constraints.
MCP tool catalog✅ implementedExposes core ops as standard MCP tools.

Coverage Map

The project maintains high test coverage (~95%) across unit, integration, and end-to-end layers.

Unit Coverage

Covered in test/unit/*:

  • Protocol parsing and bounded line reading.
  • Request validation (id/op types, kebab-case, flat envelope).
  • Session registry and lifecycle (create/destroy/clone/isolation).
  • Every middleware handler (eval, session, describe, complete, lookup, etc.).
  • Resource limit enforcement and audit log rotation.
  • MCP adapter mapping and stream collection logic.

Integration & End-to-End Coverage

Covered in test/integration/* and test/e2e/*:

  • Multi-middleware pipeline integration.
  • Concurrent client evaluation over TCP.
  • Unix domain socket connection and permission checks.
  • Multi-listener serve_multi scenarios.
  • Graceful shutdown with in-flight eval interruption.

Canonical Spec Index

The canonical capability definitions live in OpenSpec.

Remaining Gaps Relative to Spec

  • Heavy Sessions: Isolation via Malt.jl (planned for post-v1.0).
  • Disconnect Policy: Explicit connection closure after multiple consecutive malformed messages (currently disconnects on the first error).
  • Editor/Tooling Extensions: Higher-level client libraries beyond the wire protocol and MCP adapter.

Commands

just test        # run the full test suite
just smoke-test  # run the TCP end-to-end smoke test
just check       # run lint, tests, and coverage

<!– vale on –>