Modules
Behaviour for providing host application auditing to Cairnloop.
A default, no-op implementation of the Cairnloop.Auditor behaviour.
Mock execution engine for Scoria integration. Generates structured grounded proposals for operator review.
Behaviour for providing host application AI policy boundaries. Allows host applications to dictate how AI drafts are handled.
Behaviour for providing host application context to Cairnloop.
Default implementation of Cairnloop.AutomationPolicy. Always returns :draft_only to ensure AI generated outputs are treated safely by default.
Default implementation of Cairnloop.ContextProvider.
Returns an empty context {:ok, %{}} for any input to ensure a safe default.
Default, static implementation of Cairnloop.SLAPolicyProvider.
Behaviour for generating vector embeddings from text chunks.
Implementation of Embedder behaviour using an external API. Uses OpenAI's text-embedding-ada-002 as default.
Public facade for the governed-tool proposal system (D-30).
Approval-mode resolver for governed tool proposals.
Total render/1 function for governed tool proposals — hides the live-vs-fallback
branching behind a single public API.
Bounded telemetry for governed tool proposal events.
Optional OpenInference-conformant trace event module for the Cairnloop governed-action evidence lane (Phase 17, D17-01, D17-03).
Append-only audit event record for governed tool proposals.
Durable approval record for a governed tool proposal.
Durable proposal record capturing a governed tool invocation intent, propose-time
snapshots, and idempotency key. Mirrors the ReviewTask idiom exactly (D-20).
Stable telemetry helpers for knowledge-maintenance workflow events.
Parses markdown into chunks for vector embeddings.
Behaviour for notifying the host application of important Cairnloop events.
Normalized retrieval evidence shared across search, grounding, and telemetry summaries.
Stable Cairnloop-native telemetry helpers for retrieval search and draft grounding.
Behaviour for providing SLA policies.
Centralizes telemetry event execution and documentation for Cairnloop.
Governed-tool behaviour and compile-time validating __using__ macro.
Pure data struct carrying compile-time governed-tool metadata.
Manages registration and advisory filtering of host-injected governed tools.
Example governed-write tool: appends an operator-only internal note to the
host-owned cairnloop_messages store.
Optional read-only MCP seam for Cairnloop-governed tools.
Pure total function transform: %Cairnloop.Tool.Spec{} + tool module → MCP tool definition map.
Pure, total presenter for Cairnloop.Governance.ToolProposal structs.
Oban worker that performs the scheduled :pending → :expired flip for governed tool approvals.
Oban worker that re-validates a governed tool approval before it can proceed to execution.
The ONLY place run/3 is ever called in Cairnloop.
Mix Tasks
Scaffolds a Cairnloop.Notifier implementation in your host application
and injects the configuration into config/config.exs.
Rebuild retrieval corpus state through Cairnloop.Retrieval.
Replay failed retrieval jobs through Cairnloop.Retrieval.