omega-mcp
aien-dev/omega-mcp
Brought by drakestapleton
omega-mcp / evidence / smoke-transcript.jsonl
| 1 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"initialize\", \"params\": {\"protocolVersion\": \"2025-06-18\", \"capabilities\": {}, \"clientInfo\": {\"name\": \"omega-mcp-smoke\", \"version\": \"1\"}}}"} |
| 2 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{\"tools\":{\"listChanged\":false}},\"serverInfo\":{\"name\":\"omega-mcp\",\"version\":\"0.1.0\"},\"instructions\":\"Compile and run Omega (.om) programs with the pinned seeded compiler omc (omega-mv f4df8239, omc sha256 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194). Tools: compile, run (each call gets a fresh sandbox: no network, no host files, cleared environment, cpu/memory/file-size/process limits and a wall clock), explain_error (compiler error 1..30, an `omc: line N: error K` line, or a trap exit 101..114) and lookup (every keyword of the compiler's keyword table, with citations into omega-mv@f4df8239).\"}}"} |
| 3 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"method\": \"notifications/initialized\"}"} |
| 4 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 2, \"method\": \"tools/list\", \"params\": {}}"} |
| 5 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":2,\"result\":{\"tools\":[{\"name\":\"compile\",\"title\":\"Compile Omega source\",\"description\":\"Compile Omega (.om) source with the pinned seeded compiler omc (omega-mv@f4df8239). Returns ok, the binary's size and sha256, or the compile error {line, code, meaning, fix}.\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\",\"description\":\"Omega (.om) source text of one unit\"}},\"required\":[\"source\"],\"additionalProperties\":false}},{\"name\":\"run\",\"title\":\"Compile and run Omega source\",\"description\":\"Compile Omega source and run the program in an isolated sandbox (no network, no host filesystem, empty environment, CPU/memory/file/process limits). Returns the compile result, capped stdout/stderr and the interpreted exit status (normal, trap N with its meaning, or the limit that stopped it).\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\",\"description\":\"Omega (.om) source text of one unit\"},\"stdin\":{\"type\":\"string\",\"description\":\"bytes given to the program on stdin (default empty)\"},\"timeout_ms\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":30000,\"description\":\"wall-clock limit in milliseconds (default 5000)\"}},\"required\":[\"source\"],\"additionalProperties\":false}},{\"name\":\"explain_error\",\"title\":\"Explain an Omega error or trap\",\"description\":\"Explain a compile error code 1..30, an `omc: line N: error K` line, `trap T`, or a program exit status 101..114 (trap). Returns meaning, cause, fix, a minimal example and source citations.\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":[\"string\",\"integer\"],\"description\":\"an error code 1..30, an `omc: line N: error K` line, `trap T` (1..14) or an exit status 101..114; a string of 1..200 bytes or a nonnegative integer\"}},\"required\":[\"query\"],\"additionalProperties\":false}},{\"name\":\"lookup\",\"title\":\"Look up an Omega word or topic\",\"description\":\"Look up any Omega keyword (all 184 entries of the compiler's keyword table) or a topic (requires, ensures, invariant, result, om2, exit_status, packed_list, paths, host_words, compile_errors, traps, loops, contracts): form, arity, types, result, example and citations. A query that is not an exact keyword or topic searches names and summaries (at most 20 results).\",\"inputSchema\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":64,\"description\":\"exact keyword or topic, or a case-insensitive substring to search for\"}},\"required\":[\"query\"],\"additionalProperties\":false}}]}}"} |
| 6 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 3, \"method\": \"tools/call\", \"params\": {\"name\": \"compile\", \"arguments\": {\"source\": \"text msg \\\"hello\\\\n\\\"\\nfn main to int\\nw = write 1 msg 0 len msg\\nret 0\\nend\\n\"}}}"} |
| 7 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":3,\"result\":{\"structuredContent\":{\"ok\":true,\"binary_bytes\":352,\"sha256\":\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\",\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\",\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"ok\\\":true,\\\"binary_bytes\\\":352,\\\"sha256\\\":\\\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\\\",\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\",\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} |
| 8 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 4, \"method\": \"tools/call\", \"params\": {\"name\": \"run\", \"arguments\": {\"source\": \"text msg \\\"hello\\\\n\\\"\\nfn main to int\\nw = write 1 msg 0 len msg\\nret 0\\nend\\n\"}}}"} |
| 9 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":4,\"result\":{\"structuredContent\":{\"compile\":{\"ok\":true,\"binary_bytes\":352,\"sha256\":\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\",\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\"},\"exit\":{\"kind\":\"normal\",\"code\":0},\"stdout\":\"hello\\n\",\"stdout_bytes\":6,\"stdout_truncated\":false,\"stderr\":\"\",\"stderr_bytes\":0,\"stderr_truncated\":false,\"limits\":{\"timeout_ms\":5000,\"cpu_seconds\":10,\"address_space_bytes\":268435456,\"file_size_bytes\":1048576,\"processes\":5},\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"compile\\\":{\\\"ok\\\":true,\\\"binary_bytes\\\":352,\\\"sha256\\\":\\\"24081b70473548ef051eaa3e84f103b54d5b1a548e24d69e5fd53205c6649d98\\\",\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\"},\\\"exit\\\":{\\\"kind\\\":\\\"normal\\\",\\\"code\\\":0},\\\"stdout\\\":\\\"hello\\\\n\\\",\\\"stdout_bytes\\\":6,\\\"stdout_truncated\\\":false,\\\"stderr\\\":\\\"\\\",\\\"stderr_bytes\\\":0,\\\"stderr_truncated\\\":false,\\\"limits\\\":{\\\"timeout_ms\\\":5000,\\\"cpu_seconds\\\":10,\\\"address_space_bytes\\\":268435456,\\\"file_size_bytes\\\":1048576,\\\"processes\\\":5},\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} |
| 10 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 5, \"method\": \"tools/call\", \"params\": {\"name\": \"run\", \"arguments\": {\"source\": \"fn main to int\\nz = int 0\\nret div 7 z\\nend\\n\"}}}"} |
| 11 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":5,\"result\":{\"structuredContent\":{\"compile\":{\"ok\":true,\"binary_bytes\":260,\"sha256\":\"c08c02905120ba58469a9d09ea07625ab2d30ebd5bdda600ab3428aa9f2acf16\",\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\"},\"exit\":{\"kind\":\"trap\",\"trap\":2,\"exit_code\":102,\"meaning\":\"division by zero\",\"note\":\"an explicit exit status 101..114 looks the same as this trap\"},\"stdout\":\"\",\"stdout_bytes\":0,\"stdout_truncated\":false,\"stderr\":\"\",\"stderr_bytes\":0,\"stderr_truncated\":false,\"limits\":{\"timeout_ms\":5000,\"cpu_seconds\":10,\"address_space_bytes\":268435456,\"file_size_bytes\":1048576,\"processes\":5},\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"compile\\\":{\\\"ok\\\":true,\\\"binary_bytes\\\":260,\\\"sha256\\\":\\\"c08c02905120ba58469a9d09ea07625ab2d30ebd5bdda600ab3428aa9f2acf16\\\",\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\"},\\\"exit\\\":{\\\"kind\\\":\\\"trap\\\",\\\"trap\\\":2,\\\"exit_code\\\":102,\\\"meaning\\\":\\\"division by zero\\\",\\\"note\\\":\\\"an explicit exit status 101..114 looks the same as this trap\\\"},\\\"stdout\\\":\\\"\\\",\\\"stdout_bytes\\\":0,\\\"stdout_truncated\\\":false,\\\"stderr\\\":\\\"\\\",\\\"stderr_bytes\\\":0,\\\"stderr_truncated\\\":false,\\\"limits\\\":{\\\"timeout_ms\\\":5000,\\\"cpu_seconds\\\":10,\\\"address_space_bytes\\\":268435456,\\\"file_size_bytes\\\":1048576,\\\"processes\\\":5},\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} |
| 12 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 6, \"method\": \"tools/call\", \"params\": {\"name\": \"compile\", \"arguments\": {\"source\": \"fn main to int\\nret x\\nend\\n\"}}}"} |
| 13 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":6,\"result\":{\"structuredContent\":{\"ok\":false,\"error\":{\"line\":2,\"code\":3,\"meaning\":\"unknown name or field\",\"fix\":\"Declare the name first, or fix its spelling.\",\"compiler_stderr\":\"omc: line 2: error 3\\n\"},\"compiler_sha256\":\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\",\"isolation\":\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\"},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"ok\\\":false,\\\"error\\\":{\\\"line\\\":2,\\\"code\\\":3,\\\"meaning\\\":\\\"unknown name or field\\\",\\\"fix\\\":\\\"Declare the name first, or fix its spelling.\\\",\\\"compiler_stderr\\\":\\\"omc: line 2: error 3\\\\n\\\"},\\\"compiler_sha256\\\":\\\"3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\\\",\\\"isolation\\\":\\\"bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock\\\"}\"}],\"isError\":false}}"} |
| 14 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 7, \"method\": \"tools/call\", \"params\": {\"name\": \"explain_error\", \"arguments\": {\"query\": \"omc: line 2: error 3\"}}}"} |
| 15 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":7,\"result\":{\"structuredContent\":{\"query\":\"omc: line 2: error 3\",\"kind\":\"compile_error\",\"code\":3,\"exit_status\":3,\"line\":2,\"meaning\":\"unknown name or field\",\"cause\":\"A word is used as a name but nothing of that name is in scope (or a struct has no such field).\",\"fix\":\"Declare the name first, or fix its spelling.\",\"citations\":[{\"ref\":\"omega-mv@f4df8239 seed/omc/omc.om:2281\",\"quote\":\"fail 3\"},{\"ref\":\"omega-mv@f4df8239 seed/omc/omc.om:345\",\"quote\":\"fn fail code ulong to void\"},{\"ref\":\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:574\",\"quote\":\"An unknown field is error 3.\"},{\"ref\":\"omega-mv@f4df8239 seed/omc/gate15.sh:154\",\"quote\":\"refusal cases (codes 1..25, 27..30; 24 with its accept side)\"}],\"example\":{\"id\":\"e03\",\"expect\":{\"mode\":\"error\",\"code\":3,\"line\":2},\"source\":\"fn main to int\\nret q\\nend\\n\"}},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"query\\\":\\\"omc: line 2: error 3\\\",\\\"kind\\\":\\\"compile_error\\\",\\\"code\\\":3,\\\"exit_status\\\":3,\\\"line\\\":2,\\\"meaning\\\":\\\"unknown name or field\\\",\\\"cause\\\":\\\"A word is used as a name but nothing of that name is in scope (or a struct has no such field).\\\",\\\"fix\\\":\\\"Declare the name first, or fix its spelling.\\\",\\\"citations\\\":[{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/omc.om:2281\\\",\\\"quote\\\":\\\"fail 3\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/omc.om:345\\\",\\\"quote\\\":\\\"fn fail code ulong to void\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:574\\\",\\\"quote\\\":\\\"An unknown field is error 3.\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/gate15.sh:154\\\",\\\"quote\\\":\\\"refusal cases (codes 1..25, 27..30; 24 with its accept side)\\\"}],\\\"example\\\":{\\\"id\\\":\\\"e03\\\",\\\"expect\\\":{\\\"mode\\\":\\\"error\\\",\\\"code\\\":3,\\\"line\\\":2},\\\"source\\\":\\\"fn main to int\\\\nret q\\\\nend\\\\n\\\"}}\"}],\"isError\":false}}"} |
| 16 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 8, \"method\": \"tools/call\", \"params\": {\"name\": \"lookup\", \"arguments\": {\"query\": \"while\"}}}"} |
| 17 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":8,\"result\":{\"structuredContent\":{\"query\":\"while\",\"match\":\"keyword\",\"name\":\"while\",\"table\":\"kw\",\"id\":69,\"category\":\"structure\",\"profile\":\"OM-1\",\"form\":\"while COND [bound N] / end\",\"arity\":1,\"types\":[\"COND: bool\",\"N: 1..9223372036854775807 (IR mode 1..1000000)\"],\"result\":\"-\",\"summary\":\"Loop while COND holds; past N iterations (default 1000000) it traps 4.\",\"citations\":[{\"ref\":\"omega-mv@f4df8239 seed/omc/omc.om:1144-1145\",\"quote\":\"ret 69\"},{\"ref\":\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:63\",\"quote\":\"while <cond> [bound N] / end\"}],\"example\":{\"id\":\"control\",\"expect\":{\"mode\":\"run\",\"exit\":131},\"source\":\"note while with a bound, continue, break, for, if/else and bool values\\nfn pick c bool to uint\\nif c\\nret 100\\nelse\\nret 1\\nend\\nend\\nfn main to int\\ns = uint 0\\ni = uint 0\\nwhile lt i 100 bound 1000\\ni = add i 1\\nif eq rem i 2 0\\ncontinue\\nend\\nif gt i 9\\nbreak\\nend\\ns = add s i\\nend\\nfor j uint 4\\ns = add s j\\nend\\nt = true\\nf = false\\ns = add s pick and t not f\\nret int s\\nend\\n\"}},\"content\":[{\"type\":\"text\",\"text\":\"{\\\"query\\\":\\\"while\\\",\\\"match\\\":\\\"keyword\\\",\\\"name\\\":\\\"while\\\",\\\"table\\\":\\\"kw\\\",\\\"id\\\":69,\\\"category\\\":\\\"structure\\\",\\\"profile\\\":\\\"OM-1\\\",\\\"form\\\":\\\"while COND [bound N] / end\\\",\\\"arity\\\":1,\\\"types\\\":[\\\"COND: bool\\\",\\\"N: 1..9223372036854775807 (IR mode 1..1000000)\\\"],\\\"result\\\":\\\"-\\\",\\\"summary\\\":\\\"Loop while COND holds; past N iterations (default 1000000) it traps 4.\\\",\\\"citations\\\":[{\\\"ref\\\":\\\"omega-mv@f4df8239 seed/omc/omc.om:1144-1145\\\",\\\"quote\\\":\\\"ret 69\\\"},{\\\"ref\\\":\\\"omega-mv@f4df8239 docs/one_layer/OMEGESE.md:63\\\",\\\"quote\\\":\\\"while <cond> [bound N] / end\\\"}],\\\"example\\\":{\\\"id\\\":\\\"control\\\",\\\"expect\\\":{\\\"mode\\\":\\\"run\\\",\\\"exit\\\":131},\\\"source\\\":\\\"note while with a bound, continue, break, for, if/else and bool values\\\\nfn pick c bool to uint\\\\nif c\\\\nret 100\\\\nelse\\\\nret 1\\\\nend\\\\nend\\\\nfn main to int\\\\ns = uint 0\\\\ni = uint 0\\\\nwhile lt i 100 bound 1000\\\\ni = add i 1\\\\nif eq rem i 2 0\\\\ncontinue\\\\nend\\\\nif gt i 9\\\\nbreak\\\\nend\\\\ns = add s i\\\\nend\\\\nfor j uint 4\\\\ns = add s j\\\\nend\\\\nt = true\\\\nf = false\\\\ns = add s pick and t not f\\\\nret int s\\\\nend\\\\n\\\"}}\"}],\"isError\":false}}"} |
| 18 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 9, \"method\": \"no/such/method\", \"params\": {}}"} |
| 19 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":9,\"error\":{\"code\":-32601,\"message\":\"Method not found\"}}"} |
| 20 | {"dir": "client->server", "line": "not json{"} |
| 21 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":null,\"error\":{\"code\":-32700,\"message\":\"Parse error: the line is not one RFC 8259 JSON value\"}}"} |
| 22 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 10, \"method\": \"tools/call\", \"params\": {\"name\": \"lookup\", \"arguments\": {\"word\": \"while\"}}}"} |
| 23 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":10,\"error\":{\"code\":-32602,\"message\":\"Invalid params: unknown argument; see the tool's inputSchema in tools/list\"}}"} |
| 24 | {"dir": "client->server", "line": "{\"jsonrpc\": \"2.0\", \"id\": 11, \"method\": \"tools/call\", \"params\": {\"name\": \"format_disk\", \"arguments\": {}}}"} |
| 25 | {"dir": "server->client", "line": "{\"jsonrpc\":\"2.0\",\"id\":11,\"error\":{\"code\":-32602,\"message\":\"Invalid params: unknown tool; tools/list names compile, run, explain_error and lookup\"}}"} |
| 26 | {"dir": "server stderr", "line": "omega-mcp: ready; isolation bwrap+prlimit; compiler 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194\nreq initialize id=1 -> ok\nreq notifications/initialized no reply\nreq tools/list id=2 -> ok\nreq tools/call id=3 tool=compile compile=0 ms=13 -> ok\nreq tools/call id=4 tool=run compile=0 ms=11 run=1/0 ms=11 -> ok\nreq tools/call id=5 tool=run compile=0 ms=12 run=2/2 ms=12 -> ok\nreq tools/call id=6 tool=compile compile=1 ms=12 -> ok\nreq tools/call id=7 tool=explain_error -> ok\nreq tools/call id=8 tool=lookup -> ok\nreq no/such/method id=9 -> error -32601\nreq -> error -32700\nreq tools/call id=10 tool=lookup -> error -32602\nreq tools/call id=11 -> error -32602\nomega-mcp: end of input; exiting\n"} |