summaryrefslogtreecommitdiff
path: root/libpanto/src/provider.zig
AgeCommit message (Collapse)Author
38 hoursMove libpanto projects to libpantograph dependencyHEADmaint
Remove the in-repo libpanto sources and binding projects from pantograph. Consume libpantograph through the Zig package URL at code.tjp.lol/libpantograph.git, including the Lua module artifact used by CLI extensions.
2026-06-23libpanto ponytail-audit simplificationst
2026-06-15Add Codex Responses support and session debuggingt
Teach provider config and auth resolution about the Codex Responses dialect, including user-facing `style = "openai_responses"` with `dialect = "codex"`. Serialize and parse Responses traffic with provider-specific reasoning replay, assistant phase metadata, and robust function-call assembly keyed by `output_index` so streamed tool inputs survive proxy quirks and empty terminal payloads. Also persist thinking origins and message metadata across sessions, add the Anthropic interleaved-thinking header switch, write per-session debug logs, and improve the TUI and scripts for inspecting tool output and session costs.
2026-06-15auth: openai_responses provider for Codex subscription (Tier 2)t
Add the OpenAI Responses API wire dialect (openai_responses APIStyle + OpenAIResponsesConfig), a request serializer (instructions/input items, flat function tools, reasoning, store:false, include encrypted reasoning), and a streaming state machine over the typed response.* SSE events mapping to the shared block model. Wire dispatch, buildProviderConfig, the C-ABI free switch, and the reasoning selectors. Ship a commented Codex example in the default config. Implemented from the Responses API docs + the open-source Codex client and covered by fixture tests; live verification against a ChatGPT plan is still required (documented).
2026-06-15auth: thread provider extra_headers into request headers (C6)t
Add provider.mergeHeaders and use it in both the openai_chat and anthropic_messages providers so config extra_headers ride on the model request, merged onto the built-in header set.
2026-06-12improve errors: retries, surfacing provider errors to the usert
2026-06-07R1: move tool registry off Config onto Agentt
The tool set is no longer part of the per-turn Config snapshot. Agent now owns a ToolRegistry (created empty at init), populated via the new Agent.registerTool / registerToolSource methods. openStream and OpenStreamFn take the registry as an explicit parameter rather than reading it from cfg.registry, so swapping provider/model between turns (setConfig) no longer disturbs the tool set. CLI migrated to register the Lua tool source onto the agent instead of a locally-owned registry. Test harnesses updated to stage tools on the agent.
2026-06-05refactor: Agent.run() -> Stream -> Stream.next() -> Eventt
converted the main agent loop from push-based (into callbacks on a Receiver vtable) to pull-based, where `next()` re-enters a state-machine Stream until the next event can be returned.
2026-06-04failure retries schemet
2026-06-02compactiont
2026-06-01Rename system extension layer to base for clarityt
Replace all references to the "system" layer with "base" to better reflect its role as the foundational extension/tool layer in panto's hierarchy. The layer hierarchy now consistently uses: project > user > base. Includes: - Update agent README and build.zig documentation - Refactor tool registry and config module to support layered lookups - Add TestHarness abstraction for cleaner test setup - Improve JSON serialization with wire-encoded tool names - Add glob pattern matching for tool/extension discovery
2026-05-27session filesT
2026-05-27separate event for providing tool detailsT
OpenAI and Anthropic have tool details (id, name) converge on different timelines. In all cases they are available in `onBlockComplete` which comes with the full block, and previously we had an optional `BlockMeta` argument to `onBlockStart` - the anthropic timeline. We removed the `BlockMeta` from `onBlockStart` since it was always going to be unreliable, and now have an explicit `onToolDetails` instead. This allows us to provide the tool id and name as early as possible from the openai provider (could be in the middle of content deltas), and provide a reliable signal across providers. Also, fix test output.
2026-05-27Stream OpenAI tool_use as discrete blocks; drop BlockMetaT
Close each tool_use on next-index delta (and at finalize) so receivers see one start/delta/complete trio per tool, matching Anthropic. Log+drop fragments for already-closed indices. Remove BlockMeta from the Receiver interface: tool id/name can't be reliably known at onBlockStart under OpenAI's streaming model. Receivers get identity from the assembled ContentBlock at onBlockComplete. CLI renders 'tool: {args} : (name)' accordingly.
2026-05-26phase 3 part 1T
2026-05-25phase 2 doneT
2026-05-25phase 1 doneT
2026-05-25workT