localharness 0.78.0

Agents that own themselves: one Rust crate that's both an agent SDK (streaming, tools, hooks, policies, triggers, MCP) and a wallet-owning, self-sovereign agent that runs in the browser.
Documentation
1
2
3
4
5
6
7
8
9
10
11
{
  "id": "181",
  "prompt": "A dashboard gauge: a needle sweeps a half-circle arc of 17 blocks (indices from a 32-entry sine table; the arc runs from pointing left, up over the top, to pointing right). The value 0..100 is a clamped random walk in a state slot; arc blocks color green under 60, amber under 85, red above; big numeric readout under the pivot.",
  "solution_rl": "fn sv(i: i32) -> i32 {\n    let tab = [0, 25, 49, 71, 90, 106, 117, 124, 127, 124, 117, 106, 90, 71, 49, 25, 0, -25, -49, -71, -90, -106, -117, -124, -127, -124, -117, -106, -90, -71, -49, -25];\n    tab[i & 31]\n}\n\nfn frame(t: i32) {\n    let w: i32 = host::display::width();\n    let h: i32 = host::display::height();\n    let cx: i32 = w / 2;\n    let cy: i32 = h / 2 + 60;\n    let r: i32 = if w < h { w / 2 - 40 } else { h / 2 - 40 };\n    if host::display::state_get(0) == 0 {\n        host::display::state_set(0, 1);\n        host::display::state_set(1, 40);\n        host::display::state_set(2, 3);\n    }\n    let seed: i32 = host::display::state_get(2) * 1103515245 + 12345;\n    host::display::state_set(2, seed);\n    let mut v: i32 = host::display::state_get(1) + ((seed >> 16) & 7) - 3;\n    if v < 0 { v = 0; }\n    if v > 100 { v = 100; }\n    host::display::state_set(1, v);\n    host::display::clear(0x0c0c10);\n    let mut k: i32 = 0;\n    while k < 17 {\n        let bv: i32 = k * 100 / 16;\n        let col: i32 = if bv < 60 { 0x30b050 } else { if bv < 85 { 0xd0a020 } else { 0xd03030 } };\n        let idx: i32 = (24 + k) & 31;\n        let x: i32 = cx + sv(idx) * r / 127;\n        let y: i32 = cy - sv(idx + 8) * r / 127;\n        host::display::fill_rect(x - 6, y - 6, 13, 13, col);\n        k = k + 1;\n    }\n    let na: i32 = (24 + v * 16 / 100) & 31;\n    let nx: i32 = cx + sv(na) * (r - 24) / 127;\n    let ny: i32 = cy - sv(na + 8) * (r - 24) / 127;\n    host::display::draw_line(cx, cy, nx, ny, 0xffffff);\n    host::display::fill_rect(cx - 4, cy - 4, 9, 9, 0xffffff);\n    host::display::draw_number(cx - 16, cy + 20, v, 0xffffff, 3);\n    host::display::draw_string(cx - 70, cy + 52, \"GREEN<60 AMBER<85 RED\", 0x808080, 1);\n    host::display::present();\n}\n",
  "tags": [
    "gauge",
    "trig-table",
    "prng",
    "state"
  ]
}