From e2477f7d2d2a4eab870a2bd61534cfd146907915 Mon Sep 17 00:00:00 2001 From: t Date: Thu, 11 Jun 2026 09:08:42 -0600 Subject: libpanto API fixes - FSJSONLStore: don't require `cwd`, instead panto CLI provides it in the session metadata - Lua: expose the `SessionStore` interface and the `FSJSONLStore` and `NullStore` implementations - C: use idiomatic `const char *` for incoming strings - C: expose the `FSJSONLStore` and `NullStore` implementations --- src/main.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 06fd29e..693e88c 100644 --- a/src/main.zig +++ b/src/main.zig @@ -251,7 +251,9 @@ pub fn main(init: std.process.Init) !void { // per-cwd `session_dir` (the CLI owns the cwd→dir grouping; the store // is cwd-agnostic). Must outlive the agent, which appends through a // `Session` handle minted/resolved below. - var session_store_impl = try panto.FileSystemJSONLStore.init(alloc, io, session_dir, cwd); + const session_metadata = try std.fmt.allocPrint(alloc, "{{\"cwd\":{s}}}", .{try std.json.Stringify.valueAlloc(alloc, cwd, .{})}); + defer alloc.free(session_metadata); + var session_store_impl = try panto.FileSystemJSONLStore.initWithMetadata(alloc, io, session_dir, session_metadata); defer session_store_impl.deinit(); const session_store = session_store_impl.store(); -- cgit v1.3