From 11818552dad254649af012df3b4277633943d2b6 Mon Sep 17 00:00:00 2001 From: t Date: Sun, 7 Jun 2026 11:42:41 -0600 Subject: Migrate panto CLI onto the public.zig surface Move the CLI off the internal libpanto module namespaces onto the curated public API: data-type aliases (Config family, Message/MessageRole/ effectiveSystemBlocks, Event, Pricing/PricingRegistry, the session seam, FileSystemJSONLStore, ContentBlockType), process lifecycle (panto.init/ deinit), and ResultParts.fromText/fromTextOwned/deinit in place of the freestanding textResult/ownedTextResult/freeResultParts. The CLI remains on two flagged internal namespaces, panto.agent and panto.conversation: it is a deep embedder that drives the loop below the curated Agent/Conversation facades (system-prompt seeding through the agent, compaction_system_prompt, the open_stream_fn test seam, standalone Conversation values, compactAndPersist). These stay re-exported from public.zig as a documented deep-embedder escape hatch; trimming the transitional block removed every other internal re-export. --- docs/libpanto-cleanup.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docs/libpanto-cleanup.md') diff --git a/docs/libpanto-cleanup.md b/docs/libpanto-cleanup.md index 914285b..5fb8db3 100644 --- a/docs/libpanto-cleanup.md +++ b/docs/libpanto-cleanup.md @@ -106,6 +106,29 @@ natural there as well.) --- +> **Updated during implementation (CLI migration landed):** the `panto` CLI +> now consumes the curated `public.zig` surface for all data types +> (`Config`/`ProviderConfig`/`ReasoningEffort`/..., `Message`/`MessageRole`/ +> `effectiveSystemBlocks`, `Event`, `Pricing`/`PricingRegistry`, +> `Session`/`SessionStore`/`WireIdentity`/`PersistentMessage`, +> `FileSystemJSONLStore`, `ContentBlockType`), for process lifecycle +> (`panto.init`/`panto.deinit`), and for result-part ergonomics +> (`ResultParts.fromText`/`fromTextOwned`/`deinit`, replacing the freestanding +> `textResult`/`ownedTextResult`/`freeResultParts`). +> +> **FLAGGED:** the CLI still reaches two internal namespaces — `panto.agent` +> and `panto.conversation` — because it is a *deep* embedder that drives the +> loop below the curated `Agent`/`Conversation` façades: it needs +> system-prompt seeding *through* the agent (`agent.addSystemMessage`), +> `compaction_system_prompt`, the injectable `open_stream_fn` test seam, +> direct `agent.conversation` field access, raw standalone `Conversation` +> values (the façade `Conversation` only wraps a pointer to an agent-owned +> one), and `compactAndPersist`. These two namespaces remain re-exported from +> `public.zig` as a documented deep-embedder escape hatch (not part of the +> stable surface a C-ABI/binding should use). Closing this gap — growing the +> façade with standalone `Conversation` construction and agent +> system-prompt/compaction plumbing — is the natural follow-up. + ## The two jobs the API must serve Everything below is derived from two user jobs, not from "the CLI happens to -- cgit v1.3