Skip to content

Zpi v0.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 06:39
· 72 commits to main since this release

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 across openai, openai-codex, anthropic, gemini, github-copilot, openrouter, opencode-go, and deepseek. zpi models sync queries native provider /models endpoints first and enriches metadata (context windows, output limits, capabilities, and pricing) from models.dev/api.json into atomic 0600 ~/.zpi/agent/models-cache.json, while preserving backward-compatible models.json overrides.
  • Unified pure-Zig OAuth & auth.json engine + TUI /login, /logout, /auth. Stores credentials atomically in 0600 ~/.zpi/agent/auth.json with transparent token refresh and zero secret echoing: openai-codex (PKCE + localhost:1455 callback + JWT chatgpt_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 on generativelanguage.googleapis.com), openrouter (official PKCE code-to-key exchange), and opencode-go (--stdin/interactive token). Interactive TUI adds /login, /logout, and /auth with provider selection, slash autocomplete, /hotkeys documentation, and live auth reload.
  • OpenAI Codex Responses backend compatibility. Automatically detects openai-codex / /codex/responses endpoints, lifts system messages to top-level instructions, omits max_output_tokens, keeps store: false and stream: true, and sets tool_choice: "auto", parallel_tool_calls: true, and include: ["reasoning.encrypted_content"].
  • Complete MCP Streamable HTTP, Legacy SSE, and MCP OAuth 2.1. Extends the MCP client alongside stdio with Streamable HTTP (http: JSON + SSE responses, Mcp-Session-Id, DELETE cleanup) and Legacy HTTP+SSE (sse: background SSE reader thread and event: endpoint correlation). Enforces web_fetch SSRF validation and mcp.start + network.connect policy/audit checks, adds --mcp-http, --mcp-sse, and zpi mcp add --url, and supports zpi mcp login <name> (RFC 9728 PRM, RFC 8414 AS Metadata, DCR, PKCE S256, and RFC 8707 resource).
  • Declarative Skill tool registration (tools.json). Skills can register bounded custom tools (skill__<skill>__<tool>) via a declarative tools.json beside SKILL.md with typed argument templates, zero shell interpolation, rejection of model-controlled argv[0] and .. traversal, Source.skill + Capability.process_exec authorization/audit + OS sandbox confinement, and --trust-project-skills gating for project-scoped skills.

See README.md and docs/security.md for usage and security boundaries.