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. --- docs/libpanto-cleanup.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/libpanto-cleanup.md') diff --git a/docs/libpanto-cleanup.md b/docs/libpanto-cleanup.md index fbb4708..914285b 100644 --- a/docs/libpanto-cleanup.md +++ b/docs/libpanto-cleanup.md @@ -13,6 +13,17 @@ types, provider-loop internals). The smaller the surface, the better. This is a **prerequisite for Phase 1** of the bindings work: you cannot wrap a C ABI cleanly over an API whose boundary is undefined. +> **Updated during implementation (public.zig landed):** `public.zig` is now +> the module root (`build.zig` points `panto` at it) and `root.zig` is +> deleted; its `refAllDecls` test contract moved into `public.zig`. The +> curated façade (behavioral wrappers `Agent`/`Stream`/`Conversation`, +> `ResultParts`, the data aliases) is in place. `public.zig` *also* carries a +> clearly-marked **transitional** block re-exporting the internal module +> namespaces (`agent`, `conversation`, `session_store`, etc.) and the +> freestanding `textResult`/`ownedTextResult`/`freeResultParts` that the +> `panto` CLI still imports; Phase 4 trims these as the CLI migrates onto the +> curated surface. `Stream.Phase` was made `pub` so `State` can alias it. + ## Guiding principle: the public API is additive, expressed in one file We do **not** rewrite the internals. Almost everything we want already exists. -- cgit v1.3