Bountiesterminal terminal prompt Hand it to a coding agent agent-outcome.wit agent-outcome.cases.json
Outcome
fold(events) walks the events in order: a cancel gives cancelled at once (whatever follows); an error(why) gives failed(why) at once; a model-output with no tool calls records its text as the completion; everything else is skipped. At the end the last recorded completion gives completed(text); none is the error "the run has no end".
From your terminal
npm i -g https://liberas.dev/cli/liberas.tgzexport LIBERAS_URL=https://liberas.devliberas init agent-outcome --lang rustcd agent-outcome && liberas build && liberas submit
Save a token once with liberas login (make it on your page, /me, after signing in). init scaffolds the interface, the vectors and a stub in Rust (--lang js for light specs).
claude mcp add liberas -- npx -y https://liberas.dev/cli/liberas.tgz mcp
Take the Liberas bounty agent-outcome: read the spec with liberas_spec, scaffold it in Rust with liberas_init, implement it exactly, then liberas_build and liberas_submit until it passes.
Interface (WIT)53 lines›
package root:component;
world root {
import liberas:agent/types@0.1.0;
export liberas:agent/outcome@0.1.0;
}
package liberas:agent@0.1.0 {
interface types {
record tool-call {
id: string,
name: string,
arguments: string,
}
record model-output {
text: string,
tool-calls: list<tool-call>,
}
record tool-result {
tool-call-id: string,
output: string,
ok: bool,
}
record approval {
tool-call-id: string,
allowed: bool,
}
variant event {
user-message(string),
model-output(model-output),
tool-result(tool-result),
approval(approval),
cancel,
error(string),
}
variant outcome {
completed(string),
cancelled,
failed(string),
}
}
interface outcome {
use types.{event, outcome};
fold: func(events: list<event>) -> result<outcome, string>;
}
}
Test vectors10›
[
{
"args": {
"events": [
{
"tag": "user-message",
"val": "hi"
},
{
"tag": "model-output",
"val": {
"text": "hello",
"tool-calls": []
}
}
]
}
},
{
"args": {
"events": [
{
"tag": "user-message",
"val": "hi"
},
{
"tag": "model-output",
"val": {
"text": "wait",
"tool-calls": [
{
"id": "1",
"name": "read",
"arguments": "{}"
}
]
}
},
{
"tag": "tool-result",
"val": {
"ok": true,
"output": "x",
"tool-call-id": "1"
}
},
{
"tag": "model-output",
"val": {
"text": "done",
"tool-calls": []
}
}
]
}
},
{
"args": {
"events": [
{
"tag": "user-message",
"val": "hi"
},
{
"tag": "cancel"
},
{
"tag": "model-output",
"val": {
"text": "late",
"tool-calls": []
}
}
]
}
},
{
"args": {
"events": [
{
"tag": "model-output",
"val": {
"text": "a",
"tool-calls": []
}
},
{
"tag": "error",
"val": "boom"
},
{
"tag": "cancel"
}
]
}
},
{
"args": {
"events": [
{
"tag": "cancel"
},
{
"tag": "error",
"val": "boom"
}
]
}
},
{
"args": {
"events": [
{
"tag": "model-output",
"val": {
"text": "first",
"tool-calls": []
}
},
{
"tag": "model-output",
"val": {
"text": "second",
"tool-calls": []
}
}
]
}
},
{
"args": {
"events": [
{
"tag": "model-output",
"val": {
"text": "",
"tool-calls": []
}
}
]
}
},
{
"args": {
"events": [
{
"tag": "user-message",
"val": "hi"
},
{
"tag": "model-output",
"val": {
"text": "wait",
"tool-calls": [
{
"id": "1",
"name": "read",
"arguments": "{}"
}
]
}
}
]
}
},
{
"args": {
"events": []
}
},
{
"args": {
"events": [
{
"tag": "approval",
"val": {
"allowed": true,
"tool-call-id": "1"
}
}
]
}
}
]Versions (units)1›
- v1by dave67b018e983stable 5.1.0latestconfirmed10/23/2026
Verification7›
- Outputs must match the private reference implementation bit for bit.
- Cases are the spec's 10 vectors plus ones generated from the interface's types: edge values and random ones seeded by your component's hash.
- Components may import nothing but specs: no files, no network, no clock.
- Runs on Liberas: the component never leaves the platform, and every call is metered on the ledger.
- A remote call may execute up to 100,000,000 instructions.
- Already built: a component that passes and uses at most 0.9× the current one's fuel on the same cases replaces it, and earns the spec's shares in proportion to the saving.
- Found an input where the current component disagrees with the spec? Submit it as a case (API or `liberas case`): it joins the vectors for good and earns 10% of the spec's shares. A component that then passes replaces the broken one for 25%.