interplane.Get Omega
Read in your language

mailhand

mailhand: agents look after a person's email in seeded Omega. Maildir + MIME parsing, JSONL CLI and MCP, rule triage, policy-gated sending, hash-chained audit. Free (Apache-2.0).

Brought by drakestapleton

branch main Branches Tags History

mailhand / tests / drv / mcp_stub.om

34 lines · 629 bytes Raw Blame History
1note Test-only CLI: report the exact dispatched name and every q_addks argument, including lengths.
2text mcst_op "op"
3text mcst_args "args"
4text mcst_k "key"
5text mcst_v "value"
6text mcst_n "bytes"
7text mcst_fail "stub-fail"
8text mcst_id "id"
9fn cli_run s ulong off ulong n ulong to int
10o_ob
11o_kr mcst_op s off n
12o_k mcst_args
13o_ab
14p = ulong 0
15while lt p s_len S_REQ bound 9223372036854775807
16kl = ulong s_get S_REQ p
17vo = add add p 1 kl
18vl = q_u64 vo
19o_ob
20o_kr mcst_k S_REQ add p 1 kl
21o_kr mcst_v S_REQ add vo 8 vl
22o_ku mcst_n vl
23o_oe
24p = add add vo 8 vl
25end
26o_ae
27o_oe
28o_nl
29o_flush
30if q_is mcst_id mcst_fail
31ret 3
32end
33ret 0
34end