summaryrefslogtreecommitdiff
path: root/docs/libpanto-cleanup.md
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-07 11:39:14 -0600
committert <t@tjp.lol>2026-06-07 11:39:14 -0600
commit457ee6a0d56c5a0470e77fca79d3e85f65f51fec (patch)
tree4f513379a10fb9db2c792d99933a85f4f7991459 /docs/libpanto-cleanup.md
parentb14859b9726185ab873356390068e887b7f486d3 (diff)
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.
Diffstat (limited to 'docs/libpanto-cleanup.md')
-rw-r--r--docs/libpanto-cleanup.md11
1 files changed, 11 insertions, 0 deletions
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.