From eb4179f9958deeae408a0a06b1f8ae6437e089db Mon Sep 17 00:00:00 2001 From: t Date: Sun, 7 Jun 2026 15:19:57 -0600 Subject: Sync Agent/Stream internals to public names; alias Stream Push the API-shaping we'd done in the public facade down into the internal types, collapsing the wrappers: - Stream: rename phase->state, Phase->State; underscore-prefix the internal fields (_agent/_queue/_response/_start/_persisted/_pending_error). state is the one intended-public field. public.zig now aliases Stream; run returns *Stream. - Agent compaction: pure transform compact()->private _compactInPlace; compactAndPersist()->compact() (the public name, persists). - Agent system prompt: addSystemMessage(text,mode) split into addSystemMessage(text) + setSystemPrompt(text) over a private _persistSystemMessage. - UserMessage moved off Agent to module scope. - Underscore-prefix pure-internal Agent fields: _open_stream_fn, _auto_compacted, _retry_prng. The Agent facade is now pure 1:1 forwarders; it stays a wrapper only because init heap-pins the inner (copyable, move-safe handle) and conversation()/ sessionId() are accessors. Conversation and Stream are plain aliases. --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.zig b/src/main.zig index 2887730..a4d524b 100644 --- a/src/main.zig +++ b/src/main.zig @@ -99,7 +99,7 @@ const CLIRenderer = struct { switch (b.block) { .Thinking => try self.stdout.writeAll("\x1b[0m\n"), // Append the tool name now that we know it for certain. - .ToolUse => |tu| try self.stdout.print("\x1b[36m : ({s})\x1b[0m\n", .{tu.name}), + .ToolUse => |tu| try self.stdout.print("\x1b[36m : ({s})\x1b[0m", .{tu.name}), else => {}, } try self.file.flush(); -- cgit v1.3