diff options
| author | t <t@tjp.lol> | 2026-06-07 11:42:41 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-07 11:42:41 -0600 |
| commit | 11818552dad254649af012df3b4277633943d2b6 (patch) | |
| tree | 88c60f54b0a71d92adb4b09c7ff984080b5d86ac /src/config_file.zig | |
| parent | 457ee6a0d56c5a0470e77fca79d3e85f65f51fec (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 'src/config_file.zig')
| -rw-r--r-- | src/config_file.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/config_file.zig b/src/config_file.zig index f1ae65f..229a5b2 100644 --- a/src/config_file.zig +++ b/src/config_file.zig @@ -51,7 +51,7 @@ const models_toml = @import("models_toml.zig"); // constructors/mutators. const tvalue = toml.value_mod; -pub const APIStyle = panto.config.APIStyle; +pub const APIStyle = panto.APIStyle; // =========================================================================== // Resolved config model @@ -109,7 +109,7 @@ pub const Policy = struct { } }; -/// Build a `panto.config.ProviderConfig` for a chosen `<provider>:<alias>` model +/// Build a `panto.ProviderConfig` for a chosen `<provider>:<alias>` model /// reference, combining the resolved provider (transport/auth) with the /// model definition from `models.toml` (wire name + knobs). /// @@ -117,19 +117,19 @@ pub const Policy = struct { /// a missing alias falls back to using the alias verbatim as the wire /// model name with default knobs. Returns the assembled `Config` plus the /// wire model id (borrowed from `defs`/`ref` — valid as long as both -/// outlive the returned config's use). The `panto.config.ProviderConfig` itself +/// outlive the returned config's use). The `panto.ProviderConfig` itself /// borrows the provider/model strings; the caller must keep `cfg` (the /// `Config`) and `defs` alive for its lifetime. pub fn buildProviderConfig( cfg: *const Config, defs: *const models_toml.ModelRegistry, ref: ModelRef, -) ResolveError!panto.config.ProviderConfig { +) ResolveError!panto.ProviderConfig { const prov = cfg.provider(ref.provider) orelse return error.UnknownProvider; const def_opt = defs.get(ref.provider, ref.model); const wire_model: []const u8 = if (def_opt) |d| d.model else ref.model; - const reasoning: panto.config.ReasoningEffort = if (def_opt) |d| d.reasoning else .default; + const reasoning: panto.ReasoningEffort = if (def_opt) |d| d.reasoning else .default; const max_tokens: u32 = if (def_opt) |d| (d.max_tokens orelse 64_000) else 64_000; switch (prov.style) { @@ -944,7 +944,7 @@ test "buildProviderConfig: missing alias uses the alias verbatim as wire model" const pc = try buildProviderConfig(&cfg, &models, ref); try testing.expectEqual(APIStyle.openai_chat, pc.style()); try testing.expectEqualStrings("gpt-4o", pc.openai_chat.model); - try testing.expectEqual(panto.config.ReasoningEffort.default, pc.openai_chat.reasoning); + try testing.expectEqual(panto.ReasoningEffort.default, pc.openai_chat.reasoning); } test "buildProviderConfig: unknown provider errors" { |
