diff options
| author | t <t@tjp.lol> | 2026-06-11 09:08:42 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-11 09:23:28 -0600 |
| commit | e2477f7d2d2a4eab870a2bd61534cfd146907915 (patch) | |
| tree | 197dae8b7476558d7f105d3129778f30b91503e1 /src/main.zig | |
| parent | 813ebd014a7614fdcdf4df5570b50944f2626076 (diff) | |
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
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |
