summaryrefslogtreecommitdiff
path: root/libpanto/src
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-07 11:42:41 -0600
committert <t@tjp.lol>2026-06-07 11:42:41 -0600
commit11818552dad254649af012df3b4277633943d2b6 (patch)
tree88c60f54b0a71d92adb4b09c7ff984080b5d86ac /libpanto/src
parent457ee6a0d56c5a0470e77fca79d3e85f65f51fec (diff)
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.
Diffstat (limited to 'libpanto/src')
-rw-r--r--libpanto/src/public.zig39
1 files changed, 17 insertions, 22 deletions
diff --git a/libpanto/src/public.zig b/libpanto/src/public.zig
index 44d13a9..951bd3a 100644
--- a/libpanto/src/public.zig
+++ b/libpanto/src/public.zig
@@ -220,30 +220,25 @@ pub const NullStore = null_store_mod.NullStore;
pub const FileSystemJSONLStore = fs_store_mod.FileSystemJSONLStore;
// ===========================================================================
-// TRANSITIONAL internal escape hatches (Phase 4 removes these).
+// Deep-embedder escape hatches.
//
-// The `panto` CLI still imports several internal module namespaces directly.
-// Until the CLI is migrated onto the curated surface above, re-expose them
-// here so the library still presents one root. Each of these is a candidate
-// for deletion once the CLI no longer needs it.
-// ===========================================================================
-
-pub const config = config_mod;
-pub const conversation = conversation_mod;
+// The `panto` CLI is a *deep* embedder: it drives the agent loop at a level
+// the curated `Agent`/`Conversation` façades deliberately do not expose
+// (system-prompt seeding through the agent, `compaction_system_prompt`, the
+// injectable `open_stream_fn` test seam, direct `conversation` field access,
+// raw standalone `Conversation` values, `compactAndPersist`, etc.). Rather
+// than inflate the curated surface to cover one in-tree embedder, these two
+// internal namespaces stay reachable for embedders who opt into the
+// unstable internal API. A C-ABI or language binding should use the curated
+// surface above, not these.
+//
+// FLAGGED (see docs/libpanto-cleanup.md): exposing `agent`/`conversation`
+// internals is a known gap between the curated façade and what a deep
+// embedder needs. Revisit if/when the façade grows the missing operations
+// (e.g. `Conversation` standalone construction, agent system-prompt and
+// compaction-prompt plumbing).
pub const agent = agent_mod;
-pub const stream = stream_mod;
-pub const provider = provider_mod;
-pub const tool = tool_mod;
-pub const tool_source = tool_source_mod;
-pub const pricing = pricing_mod;
-pub const session_store = session_store_mod;
-pub const session_manager = fs_store_mod;
-pub const null_store = null_store_mod;
-// Freestanding result-part helpers, superseded by `ResultParts`. The CLU's
-// Lua bridge still calls these directly; Phase 4 migrates it to `ResultParts`.
-pub const freeResultParts = tool_mod.freeResultParts;
-pub const textResult = tool_mod.textResult;
-pub const ownedTextResult = tool_mod.ownedTextResult;
+pub const conversation = conversation_mod;
// ===========================================================================
// Tests