040 registry scope dotted

✓ Passing This code compiles and runs correctly.

Code

// Test: Registry Scope - Dotted Scope Names
//
// Verifies scope lookup works with names like "api.v1" and that
// numeric arguments are parsed into typed inputs.

~import "$std/runtime"
~import "$std/io"

const std = @import("std");

~pub event greet { id: u64 }
| ok {}

~proc greet {
    return .{ .ok = .{} };
}

~std.runtime:register(scope: "api.v1") {
    greet(1)
}

const SOURCE = "~greet(id: 7)";

~std.runtime:parse.source(source: SOURCE, file_name: "dotted.kz", allocator: std.heap.page_allocator)
| parsed p |> std.runtime:eval(ast: p.ast, scope: "api.v1")
    | result _ |> std.io:print.ln("OK")
    | event_denied e |> std.io:print.ln("DENIED: {{e.name}}")
    | exhausted _ |> std.io:print.ln("EXHAUSTED")
    | validation_error _ |> std.io:print.ln("VALIDATION ERROR")
    | dispatch_error _ |> std.io:print.ln("DISPATCH ERROR")
    | scope_not_found _ |> std.io:print.ln("SCOPE NOT FOUND")
| parse_error e |> std.io:print.ln("PARSE ERROR: {{e.message}}")
input.kz