Skip to content

v0.7.2-bugfix

Pre-release
Pre-release

Choose a tag to compare

@Kayshen-X Kayshen-X released this 14 Apr 13:47
· 21 commits to main since this release
904c033

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