From f8c6d45755acb5abf9ac68931268b7945da0fae0 Mon Sep 17 00:00:00 2001 From: t Date: Mon, 15 Jun 2026 22:11:53 -0600 Subject: display fixes: markdown rendering, tool-specific components --- libpanto/src/public.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libpanto/src/public.zig') diff --git a/libpanto/src/public.zig b/libpanto/src/public.zig index 8a55e47..d547af3 100644 --- a/libpanto/src/public.zig +++ b/libpanto/src/public.zig @@ -218,6 +218,17 @@ pub const Agent = agent_mod.Agent; pub const Pricing = pricing_mod.Pricing; pub const PricingRegistry = pricing_mod.Registry; +/// Compute the cost of a single turn's `Usage` under the given `Pricing`, +/// in micro-cents (1/1,000,000 of a cent per token). Returns null when any +/// priced component of any nonzero category is null (the poison rule — +/// don't pretend a turn with unknown cache pricing is free). Aliased +/// through `libpanto` because the embedder accumulates session totals +/// across potentially-switched models. +pub const costMicroCents = pricing_mod.costMicroCents; +/// Add a turn's micro-cents cost to a running session total. Either +/// side null => result null. The single accumulation point for the +/// per-turn session cost (see `pricing.zig` for why). +pub const addCost = pricing_mod.addCost; // =========================================================================== // Sessions -- cgit v1.3