Skip to content

Releases: ZSeven-W/openpencil

v0.7.5 — Quiet bugs, loud now

26 Apr 11:23

Choose a tag to compare

Pre-release

A maintenance pre-release focused on three quietly broken behaviors. All three are user-reported issues from 0.7.4. Binaries for macOS, Windows, and Linux are attached below once the build matrix finishes.

🐛 Fixes

AI providers — fetch failed is now actionable (#121)

Custom OpenAI-compatible providers used to surface Node's opaque TypeError: fetch failed for every network failure — DNS lookup, TLS handshake, connection refused, timeout — all collapsed into one useless string. The real reason was already on error.cause but never reached the UI.

formatFetchError() now walks the cause chain (including the AggregateError undici emits when multiple A records all fail) and prefixes the SystemError code, so the AI Settings dialog and chat stream show:

ENOTFOUND: getaddrinfo ENOTFOUND api.example.com
ECONNREFUSED: connect ECONNREFUSED 127.0.0.1:8080
self-signed certificate in certificate chain

…instead of fetch failed.

Electron — agent-native binary now ships on every platform

The Zig NAPI provisioner had a silent failure mode that bit any matrix entry without a matching prebuilt release: the source-build fallback dropped agent_napi.node at zig-out/napi/…, but electron-builder only ships from packages/agent-native/napi/. Affected installs (commonly Windows) launched fine but died at the dynamic @zseven-w/agent-native import the moment chat was used.

  • Always source-build on the runner — mlugg/setup-zig is provisioned for every workflow
  • Always copy the built binary into napi/agent_napi.node so electron-builder packages it
  • Cross-compile per platform via `ZIG_TARGET` — `mac-x64` on arm64 runners now produces an x86_64 binary, not a wrong-arch arm64 one
  • Strict mode (`OPENPENCIL_REQUIRE_AGENT_NATIVE=1`) plus a dedicated Verify agent-native binary workflow step fails the build loudly if the binary is missing

📚 Docs

Issue What changed
#116 Removed obsolete `op export` references from 15 root READMEs, 15 `apps/cli/` READMEs, AGENTS.md, and CLAUDE.md. The export command was retired in favor of the multi-stage `codegen:plan / submit / assemble` pipeline.
#117 Rewrote `packages/pen-mcp/README.md`. The previous `npx @zseven-w/pen-mcp` quick-start never worked — the package ships TypeScript source against workspace-only deps with no `bin` entry. New section explains how to run the server from the monorepo and how external MCP clients connect over HTTP at `http://localhost:3100/mcp\`.

🧪 Verification

  • 1525 / 1525 unit tests passing (Vitest, 151 files)
  • 0 lint warnings (oxlint, 818 files)
  • 0 TypeScript errors (strict mode)
  • 14 new tests covering `formatFetchError` cause-chain unwrapping and AggregateError handling

⚠️ Pre-release notice

This build is published for early testing of the agent-native packaging fix — particularly on Windows where it most often regressed. If you're on a stable distribution channel and only want shipped releases, wait for v0.7.6 stable.

Full Changelog: v0.7.4...v0.7.5

v0.7.4-enhance

17 Apr 11:27

Choose a tag to compare

v0.7.4-enhance Pre-release
Pre-release

Summary

OpenPencil v0.7.4 focuses on reliable AI design generation on dark themes, smarter incremental edits, and
a hardened native agent runtime (MiniMax tool_use, Windows, openai-compat streaming).

Changes

AI / Design generation

  • fix(ai): stop white section bands on dark-themed pages — skip fixSectionAlternation when parent
    fill luminance < 0.5, and strip stale SAFE_LIGHT_HEXES from earlier runs
  • feat(ai): design.md-driven background + sidebar color pipeline (orchestrator planning, sub-agent
    prompts, and MCP all share the palette policy)
  • feat(ai): append-intent detection — "continue"/"add more" prompts reuse the existing content root,
    and sub-agents get an APPEND MODE preamble listing existing siblings
  • feat(ai): snapshot_layout now emits an overlaps array; when the parent is layout: "none" the
    reason points at absolute x/y stacking so agents fix the parent instead of resizing children
  • docs(ai): horizontal scroll card-row pattern with full clipContent + nested fit_content example
  • chore(ai): enable incremental-add skill in the generation phase

Canvas / Editor

  • fix(canvas): require explicit role:'overlay' to escape auto-layout — badge/pill/tag are
    inline roles again and flow normally instead of collapsing to (0,0). isBadgeOverlayNode renamed to
    isOverlayNode; a deprecated re-export keeps external consumers of @zseven-w/pen-core building
  • fix(canvas): render synchronously on resize to prevent the one-frame white flash when flex layout
    shifts (e.g. right panel mount on first selection)
  • feat(editor): paste anchors to the selected container (or as sibling) instead of always landing at
    document root

Renderer

  • feat(renderer): enable local OS fonts with vector rendering and proper permission handling (#110)

Agent (native)

  • chore(agent): bump agent-native to v0.4.0 — absorbs upstream v0.2.0/v0.3.0 (openai-compat
    tool_calls streaming, HTTP error diagnostics), MiniMax tool_use 400 fix (placeholder text block when
    assistant turn is tool_use-only), auto-detected MiniMax Anthropic-compat quirk, and Windows N-API symbol
    export

MCP / Tooling

  • fix(mcp): run codex via shell on Windows so PATHEXT resolves .cmd/.bat shims (works around the
    Node CVE-2024-27980 execFileSync restriction)
  • ci(publish): check-before-publish; package names derived from each manifest so workflow/manifest
    drift is impossible — fixes the spurious CLI-step 404 on re-runs
  • style(lint): clear 22 oxlint warnings across repo
  • chore: ignore .omx/

Type

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation
  • chore — Build / tooling / dependencies

Checklist

  • npx tsc --noEmit passes
  • bun --bun run test passes
  • No unrelated changes included
  • Commit messages follow Conventional Commits

v0.7.3-enhance

15 Apr 14:42
0154873

Choose a tag to compare

v0.7.3-enhance Pre-release
Pre-release

Summary

v0.7.3 introduces incremental "append mode" for AI design generation — when the user
asks the AI to add content to an existing canvas, the planner now detects append intent and
reuses the current content root instead of redrawing from scratch. Also ships local OS
font support via the Local Font Access API with vector rendering, a design.md-driven
background/sidebar theming pipeline, and a handful of editor, CLI, and cross-platform
fixes.

Changes

AI / design generation

  • feat(ai): append-mode detection before generate_design dispatch —
    detectAppendIntent parses continue/append prompts against the active page
  • feat(ai): sub-agent preamble describes existing sibling sections so added nodes
    integrate seamlessly
  • feat(ai): planner reuses existing content-root in append mode instead of creating a new
    root frame
  • feat(ai): applyAppendContextToPlan helper wires context into the orchestrator plan
  • feat(types): AppendContext + SubTask.existingSectionLabels
  • feat(ai): design.md-driven background + sidebar color pipeline; auto-derives neutral
    page background when design.md has no explicit background role
  • fix(ai): stop white section bands on dark-themed pages
  • docs(ai): horizontal scroll card-row pattern taught to the generation phase;
    overflow.md example fleshed out

Fonts

  • feat(renderer): enable local OS fonts with vector rendering via the Local Font Access
    API; includes permission handling (prompt / granted / denied / unavailable),
    canvas-width heuristic for unknown local fonts, and blob-based registration into CanvasKit
    (#110)

Editor

  • fix(canvas): render synchronously on resize to prevent a one-frame white flash when
    RightPanel mounts on the first selection after idle
  • feat(editor): Cmd/Ctrl+V now pastes into the selected container (if it can hold
    children) or immediately after the selected node as a sibling, falling back to the root
    when nothing is selected

CLI / cross-platform

  • fix(mcp): on Windows, run the Codex CLI through execSync so PATHEXT resolves
    .cmd/.exe/.ps1 shims (works around Node 18.20/20.12 execFileSync EINVAL from
    CVE-2024-27980)

Code hygiene

  • style: apply oxfmt formatting drift across web, renderer, and AI modules
  • style(lint): clear 22 oxlint warnings (useless spread fallbacks, useless spread into
    arrays, control-char regex → \P{ASCII}, unused catch params / imports, unnecessary
    escapes, new Array(n).fill) — repo now lints with 0 warnings, 0 errors
  • chore: ignore .omx/ build artifact directory

Related Issues

  • Merges #110 (local OS fonts with vector rendering and permission handling)

Type

  • feat — New feature
  • fix — Bug fix
  • refactor — Code refactoring (no behavior change)
  • docs — Documentation

Checklist

  • npx tsc --noEmit passes
  • bun --bun run test passes — 1515 tests in apps/web + 47 in packages/pen-mcp,
    all green
  • No unrelated changes included
  • Commit messages follow Conventional Commits
  • bun run lint — 0 warnings, 0 errors (added as a bonus of this rollup)

What's Changed

  • Enable local OS fonts with vector rendering and proper permission handling by @1MochaChan1 in #110

New Contributors

Full Changelog: v0.7.2...v0.7.3

v0.7.2-bugfix

14 Apr 13:47
904c033

Choose a tag to compare

v0.7.2-bugfix Pre-release
Pre-release

Summary

v0.7.2 is a stability release focused on multi-provider AI agent loops,
Mac CLI discovery across managed shells, and drag / reparent / clipping
correctness
on the canvas. It also ships bounded AI codegen handoff so chat
payloads stop hitting provider request-size limits silently.

Changes

AI agent loops — multi-provider correctness

  • OpenAI-compatible providers: fix the second turn. Before, the request
    builder forwarded the message store's Anthropic-style content blocks
    verbatim, so tool-result turns 400'd on GLM / dashscope / StepFun.
    @zseven-w/agent-native v0.3.0 now translates tool_use + tool_result
    blocks into OpenAI's tool_calls + role="tool" form, injects
    system_prompt, and drops unsupported thinking blocks.
  • Tool-call streaming for OpenAI-compat. The SSE parser now accepts
    delta.tool_calls and emits content_block_start / tool_use_delta /
    content_block_stop so tool invocations from GLM / DeepSeek / Qwen /
    dashscope flow through the same pipeline as Anthropic.
  • StepFun step_plan/v1 support. Accept delta.reasoning alongside
    reasoning_content so StepFun's reasoning-heavy stream renders instead of
    stalling the client-side first-text watchdog into an abort → std.http
    panic → Bun segfault cascade.
  • HTTP 451 / content-safety surfacing. Map StepFun's 451 to
    error.InvalidRequest with a specific "Content blocked by provider safety
    filter" message; /api/ai/chat now forwards result.errors[0] so users
    see the real reason instead of Provider error: error_server.
  • firstTextTimeout relaxes on thinking activity. When the model is
    streaming reasoning, the "no first text yet" watchdog stands down —
    noTextTimeout + hardTimeout still bound genuinely runaway reasoning.

Orchestrator sub-agent resilience

  • Minimal-skills fallback. After the full-skills attempt and its retry
    both produce zero nodes, the orchestrator re-runs just the failing subtask
    with a ~3KB kernel prompt (schema + jsonl-format only). Successful earlier
    subtasks are preserved; only the failing one retries.
  • Skip deterministic refusals. Responses matching HTTP 400/401/429/451,
    "content blocked", "censorship", or "authentication failed" short-circuit
    the retry ladder so users aren't charged a second 4-minute StepFun safety
    scan.

Local CLI discovery — Mac / managed-shell users

  • Login-shell probe. New probeViaLoginShell() asks $SHELL (or a zsh /
    bash / fish fallback) -ilc 'command -v <cli>' to source the user's
    real rc/profile. This catches nvm / fnm / pnpm / bun / mise / asdf / volta
    shims that Electron's scrubbed PATH hides.
  • Expanded candidate paths. posixUserBinDirs() now includes
    ~/.bun/bin, ~/.volta/bin, ~/Library/pnpm, ~/.pnpm-global/bin,
    ~/.local/share/mise/shims, ~/.asdf/shims, ~/.cargo/bin, plus
    dynamically enumerated ~/.nvm/versions/node/<ver>/bin and
    ~/.fnm/node-versions/<ver>/installation/bin.
  • Uniform ladder across every resolver. claude / codex / opencode /
    copilot / gemini all run the same PATH → login-shell → npm-prefix →
    user-bin candidates sequence, each step logged to
    ~/.openpencil/logs/server-YYYY-MM-DD.log for remote diagnosis.

Built-in providers

  • Add "StepFun Coding Plan" preset (https://api.stepfun.com/step_plan/v1).

Electron / dev-sync stability (#104)

  • Stabilize Electron dev startup after the upstream sync.
  • Keep localhost probing resilient without relying on proxy-friendly fetch
    behavior.
  • Unblock incomplete local workspaces and keep Codex-related env passthrough
    working.

Drag / reparenting / nested clipping (#104)

  • Preserve absolute/world position when layer moves change parent containers
    — nodes no longer jump visually after reparenting.
  • Stop nested frame / group / shape drags from auto-ejecting to root during
    canvas drags.
  • Promote previously root-only frame clipping to explicit clipContent when
    nested, so corner radius and clip visuals stay intact.

AI handoff / codegen context quality (#104)

  • Export bounded AI codegen asset bundles and structure bundles so chunk /
    assembly prompts reference stable ./assets paths instead of inline
    base64.
  • Enrich sanitized AI consumer views with reusable image / gradient / layout
    / component semantics.
  • Restore code-panel AI bundle and ZIP export affordances.
  • Preserve cropped image fill transform metadata alongside original image
    size through the Figma import path.
  • Guard oversized chat payloads with a client-side rejection before the
    request leaves the browser.

Server / sync plumbing (#104)

  • Harden MCP document sync behavior and related tests.
  • Keep the server-side handoff path consistent with the richer AI bundle
    payloads.

Type

  • feat — StepFun Coding Plan preset, login-shell CLI probe, consumer-view enrichment, minimal-skills fallback
  • fix — OpenAI-compat tool-call streaming, turn-2 request shape, StepFun reasoning + 451, drag reparent, firstTextTimeout, Electron dev sync
  • perf — Bounded AI chat payloads, retry short-circuit on deterministic refusals

Verification

  • npx tsc --noEmit -p apps/web
  • bun --bun run test1492 / 1492 passed across 151 files
  • bun --bun run build
  • bun run electron:build:mac-arm64 ✓ — produces signed DMG + zip +
    latest-mac-arm64.yml
  • Manual: GLM-5 via dashscope /chat/completions end-to-end design flow,
    StepFun step_plan/v1 reasoning stream, Mac login-shell CLI detection
    against nvm / fnm / pnpm / bun / mise / fish

Submodule

  • packages/agent-native 0.2.0 → 0.3.0
    (feat(openai-compat): tool_calls streaming, content-block translation, reasoning + 451)

Workspaces bumped

All 14 workspace package.json files bumped 0.7.1 → 0.7.2.

Breaking changes

None.

What's Changed

  • Stabilize synced main for AI handoff, drag nesting, and Electron dev by @raiscui in #104

New Contributors

Full Changelog: v0.7.1...v0.7.2

v0.7.1-bugfix

13 Apr 13:43
7271a03

Choose a tag to compare

v0.7.1-bugfix Pre-release
Pre-release

Summary

v0.7.1 introduces first-class ACP (Agent Client Protocol) support, a skill-installable CLI, and a suite of production-stability fixes. Users can now connect external ACP-compatible agents (e.g. claude-agent-acp) directly from Settings → Agents and have them operate on the live canvas through OpenPencil's MCP tools.

Changes

ACP (Agent Client Protocol) integration

  • New @zseven-w/pen-acp client package wrapping the ACP TypeScript SDK
  • Settings → Agents → ACP Agents section with local-process + remote-WebSocket support
  • Server-side connection manager with lazy reconnect + globalThis persistence across Vite HMR
  • /api/ai/agent?providerType=acp branch wires session/prompt + session/update into the existing SSE chat stream
  • Auto-starts the OpenPencil MCP server, passes it to ACP via session/new, and auto-approves tool permissions
  • Custom system prompt enforces layered design pipeline (design_skeletondesign_contentdesign_refine) for higher quality output
  • Desktop-only guard for local process spawning (rejected outside Electron / dev mode)

op install CLI

  • New op install / op uninstall commands with target auto-detection (Claude Code, Codex, Cursor, Gemini CLI, OpenCode)
  • Skill files bundled into the CLI binary at build time — no GitHub access required at install time

Production build fixes

  • @zseven-w/agent-native package + native .node binary properly placed under server/node_modules/ so Nitro can resolve it
  • Electron before-quit + dev-script SIGINT handlers kill the detached MCP server (no more orphan processes)
  • webUtils.getPathForFile capture on drag-drop so recent files entries stay clickable after reopening

batch_design robustness (MCP)

  • Multi-line JSON support via bracket/quote-balanced splitter
  • Auto-normalize fill / stroke shorthand (string / single-object forms → canonical arrays)
  • Per-line error collection instead of whole-batch abort; repairs empty keys, trailing commas, smart quotes
  • Bindless I(parent, data) form supported (auto-generated binding)

Codegen / chat polish

  • Compact JSON + strip noise fields (id, parentId, layout-managed x/y, default values) — 60–70% smaller request body to avoid proxy 403 Request not allowed
  • CRUD intent detection routes to lightweight prompt + tool set (no design skills); insert_node supports after parameter for sibling placement
  • agent-native: reset StreamingToolExecutor between turns (fixes tool_use ID mismatch on multi-turn MiniMax / third-party providers); surface upstream HTTP error body via new Provider.lastError() VTable
  • Strip h3 JSON error wrapper on the client so chat shows clean error messages

Layer panel

  • Rectangle nodes now accept drag-to-reparent (they inherit ContainerProps — the restriction was UI-only)

i18n

  • Full ACP translation keys for all 15 locales

Docs

  • MIT LICENSE, README, and CLAUDE.md added/refreshed for every package

Related Issues

#93

Type

  • feat — New feature
  • fix — Bug fix

Checklist

  • npx tsc --noEmit passes
  • bun --bun run test passes
  • No unrelated changes included
  • Commit messages follow Conventional Commits

New Contributors

Full Changelog: v0.7.0...v0.7.1

v0.7.0-Devotion

11 Apr 15:26
e20957b

Choose a tag to compare

v0.7.0-Devotion Pre-release
Pre-release

Summary

v0.7.0 is a platform release: a new framework-free design engine + React SDK, a full Git integration (clone / branch / push / pull / three-way merge), canvas export, parallel agent teams, 50-entry style-guide library, and Anthropic-format support for 8 Chinese LLM providers. Also pulls in hundreds of AI quality, layout, and i18n fixes from real-design debugging.

Changes

Headline features

  • pen-engine + pen-react packages — extracted a framework-free headless design engine (DocumentManager, SelectionManager, HistoryManager, ViewportController, EngineSpatialIndex, VariableManager, PageManager, browser adapter) and a complete React SDK on top (DesignProvider, DesignCanvas, core hooks, LayerPanel, PropertyPanel, Toolbar, shared components). Third-party apps can now embed the editor.
  • Full Git integration — clone wizard with SSH/HTTPS auth retry form, branch picker with create/switch/delete/merge flows, pull/push cascades, remote settings and SSH keys UI, folder-mode divergent merge with on-disk MERGE_HEAD state, and a conflict panel with per-node / per-field three-way cards, inline JSON editor, diff block, and bulk actions. 15-locale i18n sweep across all Phase 5/6/7 UI.
  • pen-core merge module — two-way diffDocuments, 7-grid node classification, tree rebuild from decisions, variables/themes/scalar/pages-order merge.
  • Canvas export — global PNG / JPEG / WEBP / PDF export bound to Cmd+Shift+P.
  • File management UX — native File menu, Save As, Open Recent with persistence, UnsavedChangesDialog replacing window.confirm, freely resizable AI chat panel with maximize.
  • Agent teams — mandatory team mode at concurrency ≥ 2, parallel designers, delegate tool with per-toolCallId routing and skill loading, spawn_member, member canvas indicators, SSE streaming for generate.ts, full generate_design pipeline for the built-in Zig provider.
  • Style Guide system — 50 style guides, vite plugin registry generation, get_style_guide_tags / get_style_guide MCP tools, selection wired into planning and generation.
  • Codegen pipelineread_nodes with depth-limited subtree fetch, incremental MCP codegen, App-side codegen plan store, CLI read-nodes and codegen pipeline commands, validateContract migrated into pen-codegen.
  • MCP debug toolsvalidation_report, logs_tail, screenshot (SkiaEngine readback + SSE RPC) behind a feature flag.
  • Provider expansion — Anthropic format support for Kimi, Zhipu, GLM, DouBao, Ark, Bailian/DashScope, ModelScope, plus Coding Plan presets; auto-switches baseURL on API format change.

Design quality

  • Theme-aware role defaults so dark pages stop getting white navbars.
  • Pure-diagnostics layer with WCAG-aware detectors and severity contracts.
  • Cross-generation diversity tracking for anti-slop.
  • Visual post-pass fixes: button foreground contrast, section background alternation, orphan container contrast, input sibling fill/stroke consistency.
  • Pre-injected fixed mobile status bar for mobile designs.
  • Icon resolver and role inference hardened: WCAG contrast, broad-skill bloat guard, data-viz path isolation, part-word guards, streaming vs non-streaming parity.
  • Layout engine + prompt fixes from real-design debugging.

Performance

  • Lazy-loaded locales (only English bundled statically).
  • Vite manual chunk splitting for vendor bundles; conditional devtools excluded from production.
  • Precision document subscription — only sync on active-page children change.
  • React.memo on 5 heavy panel components.
  • Narrowed git-panel log loader selector to primitive fields.

Refactors

  • Split oversized files: use-keyboard-shortcuts, icon-resolver, variables-panel, chat-message, ai-chat panel + handlers, design-md-panel, agent-settings-dialog, skia-interaction, document-store actions, codegen generators.
  • Consolidated design-md-parser and SVG parser into pen-core, moved MCP code into packages/pen-mcp, extracted mutateWithHistory helper, deduplicated ViewportState / Padding types into pen-types.
  • Added oxlint + oxfmt for linting and formatting.

Infra

  • Prebuilt NAPI binariesagent-native now ships agent_napi-{macos-arm64,macos-x64,linux-x64,windows-x64}.node per release. ensure-agent-native.cjs downloads the asset for the submodule's pinned commit via the release tag — no Zig toolchain needed for normal installs. Source build remains as fallback.
  • CI: global git identity + init.defaultBranch=main for system-git-gated tests; Zig 0.15.2.
  • Dockerfile: Zig 0.14 → 0.15.2 as fallback for non-x64 arches.

Notable fixes

  • #94.fig import ceilings raised (150/300/150 MB → 1 GB / 2 GB / 512 MB) so real design systems import again; error messages now interpolate the active constant.
  • #91 — asset loading and editing workflows.
  • SSH auth form dead-end on first-time pull attempts.
  • Clone wizard staying mounted across the clone round-trip.
  • Git conflict polling errors surfaced inline; conflict resolutions preserved across refreshStatus.
  • Electron: reload / devtools disabled in packaged builds; ELECTRON_RUN_AS_NODE for CopilotClient; MCP dev.ts path corrected; native Save As / Open Recent wired.
  • Renderer: stroked generated shapes without phantom fills; $variable resolution in renderNodeThumbnail.
  • Long design runs stay diagnosable and alive.

Related Issues

  • Fixes #94 — Compressed .fig file exceeds maximum size limit (150MB)
  • Addresses #91 — asset loading and editing workflows

Type

  • feat — New feature
  • fix — Bug fix
  • refactor — Code refactoring (no behavior change)
  • perf — Performance improvement
  • docs — Documentation
  • test — Tests
  • chore — Build / tooling / dependencies

Checklist

  • npx tsc --noEmit passes
  • bun --bun run test passes
  • No unrelated changes included
  • Commit messages follow Conventional Commits

New Contributors

Full Changelog: v0.6.0...v0.7.0

v0.6.0-Embrace

28 Mar 15:13
3c697d8

Choose a tag to compare

v0.6.0-Embrace Pre-release
Pre-release

v0.6.0 introduces a built-in AI Agent SDK with multi-provider support, Agent Team mode for specialized
design delegation, and significant improvements to AI-powered design generation reliability.

Changes

AI Agent SDK & Multi-Provider Support

  • Add built-in agent SDK (packages/agent) with web integration and SSE streaming
  • Add 9+ builtin provider presets (OpenAI, Anthropic, Google Gemini, Mistral, DeepSeek, etc.) with region
    switcher
  • Add Google Gemini support with 3.x series models
  • Support Anthropic API format in custom provider settings
  • Dynamic system prompt via pen-ai-skills for context-aware AI responses
  • Add keep-alive pings for long-running LLM calls (5s interval for Bun compatibility)
  • Add API error classification and auto-retry without tools
  • Add i18n for builtin provider settings (15 locales)

Agent Team Mode

  • Add Team section UI with dedicated design model selector
  • Wire team mode in chat handlers with member delegation events
  • Add source field and team events to AgentEvent type for multi-agent tracing
  • Auto team mode using current chat model when design model is set
  • Make team mode visually distinct in chat UI

Design Generation Pipeline

  • Replace insert_node with generate_design as primary design tool (uses internal CLI design pipeline)
  • Align insert_node with batch_design capability for consistent node creation
  • Auto-replace empty root frames and auto-zoom to fit after insert
  • Clean up partial nodes on generate_design failure
  • Sanitize node data, deep-clone before post-processing to avoid Zustand mutation
  • Prevent duplicate root-level inserts from weaker models

Renderer & Canvas

  • Guard against undefined fill entries in resolveFillColor/resolveStrokeColor
  • Rasterize paragraph image cache at 2x minimum for crisp text on low-DPR displays
  • Skip paragraph image cache when zoomed out below 0.5x or zoomed in
  • Enhance syncFromDocument error handling and normalize document structure

MCP & Live Sync

  • Implement sync URL caching for improved performance
  • Enhance live sync diagnostics and port file management
  • Clear stale sync cache on page load to prevent false dirty state
  • Wire openpencil codex install to config TOML

CI/CD & Distribution

  • Add Homebrew Cask update workflow for OpenPencil releases
  • Fix Scoop/Homebrew tap auto-update in CI
  • Streamline version publishing process

Agent Reliability Fixes

  • Fix SSE timeout, routing, and message format issues
  • Fix sliding window from splitting assistant+tool groups
  • Strip <think> tags from model text output in chat UI
  • Fix tool call args always {} and turn>0 retry
  • Properly serialize non-Error objects in error messages
  • Scope designer tools, streamline delegation, add model hint
  • Route resolveToolResult to correct agent in team mode
  • Clean up pending tool calls on exit and improve error handling

Related Issues

  • Fixes #85
  • Fixes #86 — 无法拉起MCP服务 (MCP service fails to start and doesn't persist)
  • Fixes #87 — "spawn EINVAL" error when connecting GitHub Copilot on Windows

Type

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation
  • test — Tests
  • chore — Build / tooling / dependencies

Checklist

  • npx tsc --noEmit passes
  • bun --bun run test passes
  • No unrelated changes included
  • Commit messages follow Conventional Commits

What's Changed

  • fix(mcp): wire openpencil codex install to config toml by @Smile232323 in #85

New Contributors

Full Changelog: v0.5.2...v0.6.0

v0.5.2-enhance

24 Mar 13:33
2cc2447

Choose a tag to compare

v0.5.2-enhance Pre-release
Pre-release

Summary

v0.5.2 introduces the pen-ai-skills package — a phase-driven prompt skill engine that replaces hardcoded AI
prompts with composable Markdown skill files. It also adds the CLI tool (op), fixes the MCP SSE endpoint for
h3 v2/Bun compatibility, and improves Windows + proxy support for the Claude Agent SDK integration.

Changes

New: pen-ai-skills package

  • Scaffold @zseven-w/pen-ai-skills with core types, skill loader, resolver, and budget module
  • Vite plugin (vite-plugin-skills) compiles .md skill files with YAML frontmatter into a typed registry at
    build time
  • 27 skill files across phases (planning, generation, validation, maintenance), domains (dashboard,
    landing-page, mobile-app, form-ui), and knowledge (design principles, role definitions, icon catalog, copywriting)
  • Document context and generation history memory modules for richer prompt context
  • Wired into orchestrator, sub-agent, and validation pipelines via resolveSkills()
  • Removed old hardcoded prompt files (ai-prompt-sections.ts, orchestrator-prompts.ts, design-principles/,
    role-definitions/*.ts)

New: CLI (apps/cli/)

  • op command-line tool for controlling the desktop app or web server from the terminal
  • Commands: start, stop, status, design, open, save, get, selection, insert, update, delete,
    move, copy, replace, export, import, pages, variables
  • Cross-platform support (macOS, Windows, Linux), bundled into Electron builds

Fix: MCP SSE endpoint (Fixes #80)

  • Rewrote events.get.ts to use h3 v2 createEventStream API instead of raw res.write()
  • Reduced heartbeat interval from 30s to 8s to stay under Bun.serve's 10s idle timeout
  • Fixed MCP server path resolution (dist/out/) and added ELECTRON_RUN_AS_NODE for Electron child process
    spawning

Fix: Claude Agent SDK — Windows & proxy support (Fixes #81)

  • New resolveAgentModel() maps model tiers to proxy model IDs via ANTHROPIC_DEFAULT_*_MODEL env vars when
    ANTHROPIC_BASE_URL is set
  • Pre-create ~/.claude.json, credentials.json, and statsig/ on Windows to prevent EPERM crashes
  • Improved buildSpawnClaudeCodeProcess(): spawn .exe directly, filter empty --setting-sources args in shell
    mode, capture stderr to debug file
  • Enhanced error hints: TLS/certificate errors, DNS failures, invalid API keys, proxy detection, Windows-specific
    guidance
  • Append debug log tail to error messages for better diagnostics

Fix: Electron dev workflow

  • Pre-compile skill registry before esbuild MCP step to fix first-run Could not resolve "../_generated/skill-registry" error

Perf: Renderer

  • Cache pre-rasterized paragraph images (128 MB LRU) to skip per-frame glyph rasterization
  • Stabilize frame label size during zoom (draw in screen-space)

Chore

  • Version bump to 0.5.2 across all packages
  • Add pen-ai-skills to Dockerfile build
  • CI: publish workflow for all @zseven-w/* npm packages
  • Package READMEs for pen-core, pen-codegen, pen-figma, pen-renderer, pen-sdk, pen-types

Related Issues

  • Fixes #80 — MCP server won't start after 0.5.0
  • Fixes #81 — Support third-party API via proxy (ANTHROPIC_BASE_URL model mapping)

Type

  • feat — New feature
  • fix — Bug fix
  • refactor — Code refactoring (no behavior change)
  • perf — Performance improvement
  • docs — Documentation
  • test — Tests
  • chore — Build / tooling / dependencies

Checklist

  • npx tsc --noEmit passes
  • bun --bun run test passes
  • No unrelated changes included
  • Commit messages follow Conventional Commits

What's Changed

Full Changelog: v0.5.1...v0.5.2

v0.5.1-enhance

23 Mar 15:00
2592bf1

Choose a tag to compare

v0.5.1-enhance Pre-release
Pre-release

Summary

v0.5.1 introduces the OpenPencil CLI (op) for terminal control of the design tool, adds a text rendering
performance optimization via paragraph image caching, and fixes Docker multi-platform builds.

New Features

  • CLI tool (apps/cli) — New op command-line tool to control the desktop app or web server from the
    terminal. Commands include app lifecycle (start, stop, status), document operations (open, save, get,
    selection), node manipulation (insert, update, delete, move, copy, replace), design DSL (design),
    multi-platform code export (export), and more. Published as @zseven-w/openpencil-cli on npm.
    (#75)
  • npm publish workflow — New GitHub Actions workflow (publish-cli.yml) for publishing all @zseven-w/*
    packages in topological order, plus a publish:beta script.

Performance

  • Paragraph image caching — Pre-rasterized paragraph images are now cached (128 MB LRU) in the CanvasKit
    renderer, replacing per-frame glyph shaping with drawImageRect on cache hit. Significant frame-time improvement
    for text-heavy documents. (#76)
  • Frame label zoom stability — Frame labels now render in screen-space after viewport transform, eliminating
    flicker at integer zoom boundaries. Shadow rendering is skipped during active zoom for smoother performance.

Bug Fixes

  • Docker multi-platform builds — Fixed monorepo paths and added multi-platform support to the Docker workflow.

Documentation

  • Updated all 15 language README files with CLI installation instructions, usage examples, and expanded
    multi-platform code export documentation.
  • Added README files for all packages (pen-core, pen-codegen, pen-figma, pen-renderer, pen-sdk,
    pen-types).
  • Added apps/cli/CLAUDE.md for CLI development guidance.

Related Issues

Full Changelog: v0.5.0...v0.5.1

v0.5.0-Promise

22 Mar 02:15
6c89c6d

Choose a tag to compare

v0.5.0-Promise Pre-release
Pre-release

Summary

OpenPencil v0.5.0 — Introduces the Design System (design.md) as a specification-driven approach to AI generation. Also adds Electron desktop app, image search & generation pipeline, Gemini CLI integration, and rendering performance improvements.

Changes

Design System Panel (design.md) — Release Highlight

A new markdown-driven design system specification that ensures AI-generated designs strictly follow your design language.

  • Add draggable, resizable floating Design System panel with expandable sections (theme, colors, typography, component styles, layout principles)
  • Import/export .md files in Google Stitch format — shareable and version-controllable across teams
  • One-click auto-generate design.md from existing canvas designs (AI analyzes the node tree → structured spec)
  • Sync color palette to design variables ($primary, $secondary, etc.) individually or in bulk — directly usable in documents and code generation
  • AI generation automatically injects design.md context — colors, fonts, component styles, and layout rules all take effect, replacing the default style policy
  • MCP tool support: get_design_md / set_design_md / export_design_md — external agents can read and write the design system
  • Per-document persistence via localStorage — switching files automatically restores the associated design.md
  • Full i18n support (Chinese, English, Japanese, etc.)

Electron Desktop App

  • Implement desktop application structure with auto-updater
  • Extract IPC handlers to a dedicated module
  • Enhance Windows process spawning for CLI scripts
  • Warn before closing with unsaved changes

Image Search & Generation

  • Add dual-source image search (Openverse + Wikimedia) with results grid UI
  • Add multi-provider image generation endpoint and popover UI
  • Auto-search pipeline: automatically fill images after AI design generation completes
  • MCP: add G() operation for image search in batch design DSL
  • Add Images tab in agent settings for API key and provider configuration
  • Split imageSearchQuery / imagePrompt for better search vs generation precision

Gemini CLI Integration

  • Add Gemini CLI as a supported AI agent (with Docker support and multi-language docs)

Performance

  • Viewport culling: skip draw calls for nodes outside the visible area (#64)
  • Text cache: replace count-based limits with memory-based eviction (#66)

Bug Fixes

  • Fix icon node selection crash caused by string fill values (fixes #61)
  • Fix Claude Code CLI exit code 1 on Windows (fixes #63)
  • Fix 1-frame delay when resizing canvas (#60)

Related Issues

Fixes #61, Fixes #63, Closes #65

Type

  • feat — New feature
  • fix — Bug fix
  • perf — Performance improvement

Checklist

  • npx tsc --noEmit passes
  • bun --bun run test passes
  • No unrelated changes included
  • Commit messages follow Conventional Commits

New Contributors

Full Changelog: v0.4.4...v0.5.0