Repository navigation
Zpi v0.2.0
Zpi v0.2.0
This release introduces a major connectivity and extensibility upgrade while keeping Zpi small, fast, and zero-dependency: a three-layer Model Catalog with online sync, a unified pure-Zig OAuth engine with interactive TUI /login//logout//auth, OpenAI Codex Responses backend compatibility, complete MCP Streamable HTTP + Legacy SSE + OAuth 2.1 support, and declarative Skill tool registration.
Highlights
- Three-layer Model Catalog (
zpi models sync/list). Ships with a curated compiled-in catalog acrossopenai,openai-codex,anthropic,gemini,github-copilot,openrouter,opencode-go, anddeepseek.zpi models syncqueries native provider/modelsendpoints first and enriches metadata (context windows, output limits, capabilities, and pricing) frommodels.dev/api.jsoninto atomic0600~/.zpi/agent/models-cache.json, while preserving backward-compatiblemodels.jsonoverrides. - Unified pure-Zig OAuth &
auth.jsonengine + TUI/login,/logout,/auth. Stores credentials atomically in0600~/.zpi/agent/auth.jsonwith transparent token refresh and zero secret echoing:openai-codex(PKCE +localhost:1455callback + JWTchatgpt_account_id),github-copilot(RFC 8628 Device Flow + Copilot session token exchange),anthropic/claude(PKCE + Bearer refresh +anthropic-beta: oauth-2025-04-20),gemini(Google Cloud OAuth PKCE + Bearer refresh ongenerativelanguage.googleapis.com),openrouter(official PKCE code-to-key exchange), andopencode-go(--stdin/interactive token). Interactive TUI adds/login,/logout, and/authwith provider selection, slash autocomplete,/hotkeysdocumentation, and live auth reload. - OpenAI Codex Responses backend compatibility. Automatically detects
openai-codex//codex/responsesendpoints, lifts system messages to top-levelinstructions, omitsmax_output_tokens, keepsstore: falseandstream: true, and setstool_choice: "auto",parallel_tool_calls: true, andinclude: ["reasoning.encrypted_content"]. - Complete MCP Streamable HTTP, Legacy SSE, and MCP OAuth 2.1. Extends the MCP client alongside
stdiowith Streamable HTTP (http: JSON + SSE responses,Mcp-Session-Id,DELETEcleanup) and Legacy HTTP+SSE (sse: background SSE reader thread andevent: endpointcorrelation). Enforcesweb_fetchSSRF validation andmcp.start+network.connectpolicy/audit checks, adds--mcp-http,--mcp-sse, andzpi mcp add --url, and supportszpi mcp login <name>(RFC 9728 PRM, RFC 8414 AS Metadata, DCR, PKCE S256, and RFC 8707resource). - Declarative Skill tool registration (
tools.json). Skills can register bounded custom tools (skill__<skill>__<tool>) via a declarativetools.jsonbesideSKILL.mdwith typed argument templates, zero shell interpolation, rejection of model-controlledargv[0]and..traversal,Source.skill+Capability.process_execauthorization/audit + OS sandbox confinement, and--trust-project-skillsgating for project-scoped skills.
See README.md and docs/security.md for usage and security boundaries.