Skip to content

greynewell/mist-go

Repository files navigation

mist-go

Shared library for the MIST stack. Zero external dependencies.

CI Go License: MIT Zero Dependencies

Install

go get github.com/greynewell/mist-go

Tools

Repo What
matchspec Eval framework
infermux Inference router
schemaflux Data compiler
tokentrace Observability

Packages

Package What
protocol Message envelope, types, versioning, typed payloads
transport HTTP, file, stdio, channel transports
cli Subcommands, typed flags, help generation
config TOML parser, env var overrides, validation
output JSON lines, aligned tables
server HTTP server, graceful shutdown
errors Structured error codes, JSON marshaling
trace Distributed tracing, W3C Trace Context
logging Structured JSON logging
retry Exponential backoff with jitter
health Liveness/readiness probes
checkpoint Durable progress checkpointing
lifecycle Startup/shutdown orchestration
circuitbreaker Circuit breaker
metrics Counters, gauges, histograms
parallel Worker pool, rate limiting, backpressure
resource Memory/goroutine limits
platform Cross-platform file locking
misttest Test helpers

Usage

a, b := transport.NewChannelPair(64)
defer a.Close()
defer b.Close()

msg := protocol.New("myapp", "eval.run", map[string]any{
    "suite": "swe-bench-lite",
    "samples": 10,
})
a.Send(context.Background(), msg)
got, _ := b.Receive(context.Background())

Transports are URL-addressed:

t, _ := transport.Dial("http://localhost:8081")
t, _ := transport.Dial("file:///tmp/data.jsonl")
t, _ := transport.Dial("stdio://")
t, _ := transport.Dial("chan://")

Test

go test ./...                                        # 652 tests
go test -race ./...                                  # race detection
go test -fuzz=FuzzUnmarshal -fuzztime=30s ./protocol/
go test -fuzz=FuzzParseTOML -fuzztime=30s ./config/

Architecture: ARCHITECTURE.md