Every Selûne surface in one filterable index: all 20 MoonBit 1.0 RC1 libraries, all 17 agentic CLI commands, all 20 Stateless MCP 2026-07-28 tools (including 3 read-only agentic_wiki_* tools), 4 agent/IDE/Wasm plugins, and 9 formal, MARS 1.0, llm-wiki/ & governance tools. Press / to search across names, problems, and commands.
70 of 70
No matching entries
Clear your search query or select All Surfaces to view all 70 Selûne tools and libraries.
Pinned MoonBit 1.0 RC1 lockfile parser, reproducible SHA-256 ToolchainDigest, and golden output parsers for moon check/test/info/prove and all 9 moon ide subcommands.
Problem Solved
Unpinned compilers, locale drift, and brittle text scraping make agent verification non-reproducible across machines.
How It Works
Hashes canonical toolchain.lock into tc:sha256:<hex>, forces LC_ALL=C TZ=UTC NO_COLOR=1 and --frozen offline execution, and parses compiler/IDE JSON outputs behind golden regression tests.
cd libs/toolchain && moon check --frozen --deny-warn && moon test --frozen && python3 runner/moon_runner.py --cwd . m0-repro --runs 3
Pinned Tree-sitter MoonBit C bridge (mbt-ts-bridge) and pure MoonBit syntax extractor for .mbt, .mbti, moon.pkg, and .mbtp predicate files.
Problem Solved
Regex text surgery corrupts comments, string literals, and nested scopes, while upstream grammar drift breaks unpinned parsers.
How It Works
Wraps pinned tree-sitter-moonbit behind a bounded C bridge returning moonbit-syntax-extract/1 JSON with structural Decl/Name/Signature/Body anchors and protected obligation discovery.
cd libs/syntax && moon test --frozen && ./bridge/mbt-ts-bridge beta-app/ledgerflow/packages/auth/auth.mbt
File-level hashing forces full transitive rebuilds and re-testing on every comment, formatting tweak, or private body edit.
How It Works
Hashes .mbti signatures and package trait coherence sets into InterfaceDigest, canonicalizes function bodies (ignoring whitespace, comments, and local alpha-renaming) into BodyDigest, and computes minimal invalidation plans.
cd libs/identity && moon test --frozen && moon run cli -- pkg-interface-digest ../../beta-app/ledgerflow/packages/auth/pkg.generated.mbti
Stores immutable per-package shards in shards/<sha256>.json via atomic private-tempfile fsync+replace and BEGIN IMMEDIATE SQLite transactions, reusing untouched package shards across revisions and expiring abandoned candidate overlays.
cd libs/facts && moon test --frozen && python3 tools/index_workspace.py --repo ../../beta-app/ledgerflow --store /tmp/selune-store
Typed 7-variant EditOp plans, ReadEntry read sets, OperationLog with transitive rename composition, and deterministic semantic ReplayEngine.
Problem Solved
Raw git unified diffs conflict across concurrent agent PRs whenever nearby lines shift or symbols are renamed.
How It Works
Records semantic intent (Rename, ReplaceBody, ChangeSignature, ExtractFunction, Add/RemoveDependency, ReplaceFileRegion) against LogicalDefId read sets; replays stale plans onto moved heads via compiler-resolved moon ide rename and scoped anchors.
cd libs/edit && moon test --frozen && python3 tools/run_m2_gate.py
Unscoped pass claims let timeouts masquerade as passes, allow stale verdicts to bless mutated candidates, and lack cryptographic provenance.
How It Works
Binds every content-addressed EvidenceId to candidate, closure_digest, obligation, specification_digest, method, and toolchain_digest, prohibiting all status upgrades and marking reverted evidence superseded without deletion.
cd libs/evidence && moon check --frozen --deny-warn && moon test --frozen
Content-addressed evidence cache keyed by (obligation, method, specification_digest, closure_digest, toolchain_digest, policy) with >=1% seeded drift verification.
Problem Solved
Re-running identical checks across thousands of agents wastes compute, while a poisoned or drifted cache causes silent false acceptance.
How It Works
Never serves timeout, tool-error, cancelled, or quarantined flaky entries; re-executes at least 1% of cache hits deterministically and fails closed with CacheDriftError on any verdict discrepancy.
cd libs/cache && moon check --frozen --deny-warn && moon test --frozen
Hermetic Bubblewrap (bwrap --unshare-all --unshare-net) validation worker executing moon check, moon test, and moon prove with strict memory/time caps.
Problem Solved
Agent-authored tests and build scripts are untrusted code that can exfiltrate host credentials, reach the network, or mutate host files.
How It Works
Runs every candidate inside isolated PID/mount/network namespaces with read-only toolchain mounts, cleared env, hard cgroup/timeout limits, and supervisor-provisioned attestation signing.
cd libs/validate && moon test --frozen && python3 runner/test_sandbox_escape.py
Effect v4-inspired structured concurrency runtime: Outcome[A, E], flat multi-reason Cause[E], exit-aware Scope, TxRef STM, TestClock, Schedule, Pool, and isolated async_rt.
Problem Solved
MoonBit core/async TaskGroup::add_defer overwrites prior errors during cleanup and E4188 prohibits combining raise? with async.
How It Works
Keeps Layer 1 pure and synchronous (preserving error polymorphism and deterministic 1M-schedule testing), accumulates every failure and cleanup defect in flat Cause[E], and isolates core/async into async_rt with cancellation-shielded LIFO/parallel finalizers.
cd libs/runtime && moon check --frozen --deny-warn && moon test --frozen --target native
Read-set merge queue with speculative batching (A / A+B / A+B+C), binary bisection, hotspot leases, seam-aware scheduling, Why3/Z3 proved kernel helpers, and Git CAS convergence.
Problem Solved
Naive serial CI stalls at high agent concurrency, while uncoordinated parallel merges break main or silently lose accepted commits.
How It Works
Checks candidate read sets against HEAD, replays stale edits, batches compatible candidates via object-store git merge-tree --write-tree, bisects failing batches, and advances HEAD via atomic CAS git update-ref only on verified trees.
cd libs/queue && moon test --frozen --target native && moon prove proofs
Rare races across speculative batching, cancellation, cache misses, and lease timeouts cannot be caught by unit tests alone.
How It Works
Drives libs/queue directly under deterministic PRNG seeds and TestClock with injected faults, verifying all 5 global commit invariants on 1M schedules and checking 1:1 state projections against Quint ITF traces.
cd libs/sim && moon test --frozen --target native && moon run --target native cmd -- dst --schedules 100000
Coding agents can pass CI trivially by deleting failing tests, weakening QuickCheck counts, loosening proof predicates, or editing held-out suites.
How It Works
Binds execution to an approved compiler-resolved test inventory, blocks weakening diffs with 100% recall on seeded attack corpora, runs scoped mutation testing inside bwrap (classifying tool-error separately from killed), and requires independent reviewer approval for protected changes.
cd libs/policy && moon test --frozen && python3 bridge/policy_engine.py --help
Deterministic, cache-aware moonbit-context-pack/1 builder with staged retrieval, unified total token budget, held-out isolation, and prompt-injection/secret quarantine.
Problem Solved
Dumping raw files wastes fleet tokens and exposes agents to prompt-injection instructions or leaked secrets inside comments and docs.
How It Works
Places stable fleet-shared toolchain and interface prefixes first for prompt-cache reuse, excludes held_out_tests, quarantines injection/secret canaries with grants_permissions=false, and emits deterministic expansion handles for honest gaps.
cd libs/context && moon test --frozen && python3 bridge/context_engine.py --help
Design rationales and recurring root-cause audits live outside source code, yet letting derived knowledge override compiler facts or block commits compromises soundness.
How It Works
Rejects .mbt files from Graphify extraction, parses llm-wiki/ frontmatter/[[wikilink]] graphs and SIM entries with deterministic BM25-style ranking in wiki.mbt, and fails open whenever overlays are unavailable, stale, or corrupt.
cd libs/knowledge && moon test --frozen && ./bin/selune wiki status
Thin stateless MCP 2026-07-28 server (libs/mcp/bin/agentic-mcp.mjs) over stdio and Streamable HTTP with zero session affinity, Origin validation, bearer auth, async polling tasks, and 20 sorted tools (including 3 read-only agentic_wiki_* tools).
Problem Solved
Stateful MCP servers break under horizontal scaling and retry storms when thousands of agents share load-balanced replicas.
How It Works
Holds zero in-memory session state between requests, persists task handles in the backing store so any replica can poll or cancel, enforces strict Origin/MCP-Protocol-Version/repo-root allowlists, and exposes all 20 agentic tools.
Assemble a bounded, cache-aware, injection-hardened moonbit-context-pack/1 for a task and revision.
Problem Solved
Unbounded file reads blow up context budgets and expose agents to untrusted comments and held-out tests.
How It Works
Runs staged compiler-fact retrieval within max_depth, max_entities, and token_budget, redacts/quarantines secrets and injections, and returns deterministic expansion handles.
./libs/cli/bin/agentic --repo <repo> context build --task "Add clock parameter to auth.verify" --revision HEAD
Expand specific opaque handles from an existing context pack under the same redaction and budget rules.
Problem Solved
Agents need progressive disclosure of omitted bodies or callers without re-fetching an entire repository.
How It Works
Resolves pack-bound expansion handles against the immutable revision store, enforcing held-out exclusion and unified redaction on every returned payload.
Create an isolated edit candidate from a base revision and a typed EditPlan JSON file.
Problem Solved
Direct edits in a shared working directory collide across concurrent agents.
How It Works
Materializes an isolated candidate worktree from --base, applies typed EditOps (via scoped AST/compiler rename), captures the read set, and returns a deterministic candidate_id.
Execute hermetic Bubblewrap integrity gates, moon check, moon test, and moon prove against a candidate.
Problem Solved
Unverified or host-executed candidate code compromises security and soundness.
How It Works
Runs the candidate tree in bwrap --unshare-all --unshare-net with evidence cache lookup, emits immutable Draft 2020-12 evidence records, and returns an idempotent polling handle.
Land a verified candidate atomically via read-set check, semantic replay on moved head, and Git CAS update-ref.
Problem Solved
Landing stale or partially validated changes breaks main or silently drops concurrent edits.
How It Works
Verifies complete active evidence for the exact candidate tree, replays stale EditPlans onto moved HEAD when needed, and publishes the verified tree via git commit-tree + atomic CAS git update-ref.
Propose a validated inverse commit through the normal merge queue and mark reverted evidence superseded after landing.
Problem Solved
Ad-hoc git reset --hard destroys audit history and can reintroduce broken code.
How It Works
Materializes the inverse tree before validation, routes it through normal validate + commit gates, and appends an immutable supersession event only after CAS landing succeeds.
Read-only fail-open MCP tool running deterministic BM25-style search over llm-wiki/ compiled pages, [[wikilink]] neighborhoods, and SIM root-cause records.
Problem Solved
Agents need relevant design synthesis and past failure-mode lessons before editing workflows without relying on ad-hoc grep.
How It Works
Scores repo-confined llm-wiki/ pages and SIM entries deterministically with provenance=llm_wiki_compiled, returning fail-open empty results if the wiki is unavailable.
Native MoonBit 1.0 RC1 formal verification for pure kernels via .mbtp predicates, proof_ensure clauses, Why3 1.7.2, Z3 5.3.3, and CVC5 1.4.2.
Problem Solved
Unit tests sample finite cases and cannot exhaustively guarantee invariants like double-entry conservation or overflow safety.
How It Works
Compiles proof_enabled packages to Why3 verification conditions discharged automatically by Z3/CVC5, recording exact named goal counts without upgrading missing-solver errors.
Executable protocol models (commit_queue.qnt, cell_lifecycle.qnt) checked across 11,437,544 bounded finite-instance Veil 2.0 states (0 violations; Level 1 evidence) and 18/18 Lean 4.35.0 protocol-model proofs (0 sorry; code refinement open in QueueImplementation).
Problem Solved
Distributed protocol races in commit queues and worktree reclamation resist manual review and bounded testing.
How It Works
Embeds Quint specs into Lean 4 via quint_module (trusted translation), proves unbounded parametric inductive model invariants (0 sorry, 3 standard axioms), and runs bounded finite-instance Veil MC and ITF conformance traces.
Natural-language PRDs drift from implementation and hide untested claims.
How It Works
Expresses every requirement in EARS syntax (When/While/If/Where ... shall) linked directly to a specification file and executable verification command, hashed by MARS 1.0.
Pre-1.0 (v0.1) platform obligation ledger listing 18/18 platform IDs and TCB statements; distinct from the MARS 1.0 commit-queue module (1/18 coverage in mars-next/examples/selune_commit_queue/).
Problem Solved
Formal claims lose credibility when trusted computing base assumptions or unproved gaps are left implicit.
How It Works
Declares assumed trust boundaries alongside pre-1.0 obligation entries; new projects and strict CI freshness checks use MARS 1.0 (mars-next/).
head -n 45 spec/SELUNE.mars
MARS 1.0 Language, Schemas & Case Studies (mars-next/)
Standalone, project-agnostic MARS 1.0 grammar (8 block kinds + OpenSpec deltas), Draft 2020-12 schemas, 3-level Quint/Veil/Lean separation, and worked examples checked by the pure MoonBit libs/mars compiler.
Problem Solved
Natural-language EARS requirements, finite model checks, and unbounded Lean proofs silently drift unless bound in one content-addressed graph.
How It Works
Enforces typed USES/subject composition, non-vacuity witness/drop checks, hash-pinned DrWatt EARS digests, and OpenSpec ruling-authorized deltas across token_escrow (10/10 checklist) and selune_commit_queue (1/18 requirement slice, 7/7 model proofs).
./bin/selune mars check mars-next/examples/token_escrow/obligations.mars --fresh
Canonical pure MoonBit 1.0 RC1 implementation of MARS 1.0: stateful lexer/parser, canonical UTF-8 SHA-256 row hashing, semantic/delta checker, Draft 2020-12 structural schema validator, live Quint/Veil/Lean 4.35.0 auditing, and built-in self-test & checklist runner.
Problem Solved
Provides a zero-Python, multi-target (wasm, native, js) MARS 1.0 toolchain embeddable directly inside Selûne libraries and agent sandboxes.
How It Works
Splits syntax, checker, emit (with pure MoonBit schema_check.mbt), and cmd packages cleanly against MARS-MBT-CONTRACT.md; passes multi-target MoonBit tests, mars1 self-test, and mars1 verify-checklist with zero Python dependency.
./bin/selune mars self-test && ./bin/selune mars verify-checklist mars-next/examples/token_escrow/checklist.toml
Independent Lean 4.35.0 proof and trust-budget auditor verifying rigid universe equality, transitive axioms, compiler-hook attributes, non-vacuity, and typed OWED obligations.
Problem Solved
Proof authors can accidentally introduce sorryAx, custom axioms, native_decide boundaries, or tautological True codomains that defeat assurance claims.
How It Works
Imports candidate proofs against independently generated expectations with loadExts=false, audits extern/implemented_by/unsafe/partial hooks against trust catalogs, and enforces #mars_depends, #mars_signature, and #mars_literals.
./bin/selune mars audit mars-next/examples/token_escrow/obligations.mars
llm-wiki/ & SIM — Knowledge Base & Self-Improvement Memory
Fail-open repo-local LLM knowledge base (29 compiled pages across 12 sources, 7 entities, 7 concepts, 3 syntheses) + 4 typed SIM root-cause entries, audited by llm-wiki/tools/{lint,sim}.py and accessible via ./bin/selune wiki and agentic_wiki_* MCP tools.
Problem Solved
Repeated workflow regressions (manifest syntax, state explosion, contrast drift, stale metrics) recur across agent sessions unless root causes and verified fixes live in a linted, queryable ledger.
How It Works
Compiles pointers from raw/SOURCES.tsv into cross-linked wiki pages, tracks root-cause edits and observed outcomes in llm-wiki/SIM.md, and stays strictly off the commit path (source_wins=true, commit_path_affected=false).
./bin/selune wiki lint && ./bin/selune wiki sim && ./bin/selune wiki query "MARS"