From 457ee6a0d56c5a0470e77fca79d3e85f65f51fec Mon Sep 17 00:00:00 2001 From: t Date: Sun, 7 Jun 2026 11:39:14 -0600 Subject: Add public.zig as the libpanto root; delete root.zig public.zig is now the sole exported root (build.zig points the panto module at it). It defines the curated public API allowlist: behavioral facades (Agent/Stream/Conversation wrapping a pointer to the heap-pinned internal), the ResultParts struct, Pricing, the session seam, and data-type aliases for the Config/Conversation/Event families. A clearly-marked transitional block re-exports the internal module namespaces and the freestanding result-part helpers the panto CLI still imports directly; Phase 4 trims these as the CLI migrates onto the curated surface. Stream.Phase is now pub so State can alias it. The refAllDecls test contract moved from root.zig into public.zig. --- libpanto/build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpanto/build.zig') diff --git a/libpanto/build.zig b/libpanto/build.zig index 973c75b..65f4093 100644 --- a/libpanto/build.zig +++ b/libpanto/build.zig @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void { // libraries, so the module needs libc + the C translation unit + the // include path for `@cImport`. const panto_mod = b.addModule("panto", .{ - .root_source_file = b.path("src/root.zig"), + .root_source_file = b.path("src/public.zig"), .target = target, .optimize = optimize, .link_libc = true, @@ -18,7 +18,7 @@ pub fn build(b: *std.Build) void { // Unit tests const test_module = b.createModule(.{ - .root_source_file = b.path("src/root.zig"), + .root_source_file = b.path("src/public.zig"), .target = target, .optimize = optimize, .link_libc = true, -- cgit v1.3