axon-emcp 0.3.0

axon-emcp — the official ℰMCP (Epistemic Model Context Protocol) server for AXON. A stdio JSON-RPC 2.0 MCP server that exposes the AXON language to AI coding agents (Claude Code, Codex, Cursor, …): every primitive's grammar + semantic constraints + idiomatic examples, plus live validation via the same `axon-frontend` lexer/parser/type-checker the `axon` CLI uses. Hydrated from a diff-reviewable markdown knowledge base under `src/knowledge/`.
Documentation
---
name: socket_websocket_chat
title: WebSocket transport bound to a session protocol
summary: A `socket` transports a `session` over RFC 6455 WebSocket — `protocol:` resolves to the typed dialogue declaration; `backpressure:` adds credit-flow control.
topic: session_types
primitives:
  - session
  - socket
---

// A socket is the transport; the session is the type-of-connection.
// Compile-time the parser verifies the protocol reference resolves
// and the two session roles are algebraic duals.

type Utterance { text: String }
type Token     { piece: String }

session ChatProto {
    client: [
        select {
            ask:    [send Utterance, branch {
                        token: [receive Token, end],
                        done:  [end]
                    }]
        }
    ]
    server: [
        branch {
            ask:    [receive Utterance, select {
                        token: [send Token, end],
                        done:  [end]
                    }]
        }
    ]
}

socket ChatWS {
    protocol:     ChatProto
    backpressure: credit(8)
    reconnect:    cognitive_state
    legal_basis:  legitimate_interest
}