jev-dsl
Early-alpha Haskell DSL that encodes typed question packets and decodes answers; HTTP transport is left to the caller.
# jev-dsl A Haskell DSL for agents that would rather have a question judged than guessed. A packet of labelled questions is written once as an expression; its type is inferred, it renders to the exact request JSON for [TypeSafe's Jev](https://docs.typesafe.ai), and the answers come back under the same labels as records read by field. A choice is consumed through exhaustive labelled handlers or its carried payload, with a policy when needed. The branch that runs is one the program wrote and carries the payload it was offered with. No schema, no instance, no codec, no network. **Early alpha.** The interface is still moving, and this repository is the only place it has been used. See [Status](#status) for what is unsettled. `Jev.Operators` is the whole surface, and the guide written for a model is [docs/authoring.md](docs/authoring.md). `Jev.Core` is the same library polymorphic over the JSON type, for an environment that cannot load aeson. Every example below is compiled, by `test/Readme.hs` or as part of `examples/Guard.hs`. ## What Jev is [Jev](https://docs.typesafe.ai) is a hosted judgment model from TypeSafe. It is not a chat model and there is no prompt. You send it a **state** — whatever the situation is, as JSON — and a **map of labelled questions** about that state, and it answers all of them in one call, as probabilities rather than prose. There are three kinds of question and nothing else: | Kind | Asks | Comes back as | |---|---|---| | **Noul** | a proposition | one probability that it holds | | **choice** | which one of these labelled alternatives applies | the winner, a mass for every alternative, and a confidence | | **score** | where this falls on an ordered rubric of one to ten levels | a mass per level and an expectation | That is the whole vocabu