From 1eddee33902757f7e06993825a3ad1011e7ec346 Mon Sep 17 00:00:00 2001 From: t Date: Sun, 7 Jun 2026 14:49:20 -0600 Subject: Plug the deep-embedder holes; remove public.zig escape hatch Close the gap that forced the CLI to import internal libpanto namespaces, then delete the transitional re-exports. The CLI now uses only the curated public surface. Additions to the public Agent facade: - init/deinit (heap-pin the inner; the handle is a copyable value). - addSystemMessage (.append) and setSystemPrompt (.replace). - compact(override_system_prompt, extra) falling back to the config prompt. - sessionId() accessor. CompactionConfig gains compaction_prompt, which owns the compaction system prompt for both auto-compaction and the explicit compact() default; the Agent.compaction_system_prompt field is deleted. ConversationData is the public name for the owned conversation value type (Session.load returns it, Agent.init adopts it), distinct from the borrowed Conversation handle. Agent.addSystemMessage/setSystemPrompt are kept on Agent (they persist with the SystemMode) rather than dropped as the plan first proposed. --- src/compaction.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compaction.zig') diff --git a/src/compaction.zig b/src/compaction.zig index 4ec5732..5d64f98 100644 --- a/src/compaction.zig +++ b/src/compaction.zig @@ -22,7 +22,7 @@ pub fn register(registry: *command.Registry) !void { fn run(args: []const u8, ctx: *command.Context) anyerror!void { const extra: ?[]const u8 = if (args.len > 0) args else null; - const res = ctx.agent.compactAndPersist(ctx.compaction_prompt, extra) catch |err| { + const res = ctx.agent.compact(ctx.compaction_prompt, extra) catch |err| { try ctx.stdout.print("\n[compaction failed: {s}]\n> ", .{@errorName(err)}); try ctx.stdout_file.flush(); return; -- cgit v1.3