openpencil/packages/core
Danila Poyarkov 31e2e84b08
fix(core): send image tool results in the AI SDK's file shape (#857)
AI SDK 7 has no 'media' tool output part; images are { type: 'file', mediaType, data: { type: 'data', data } }. After diff_visual, export_image, or any other image result, the next step's prompt failed validation with AI_InvalidPromptError and the chat run stopped. toModelOutput is now typed against the SDK's ToolResultPart output, and a test validates the resulting tool message with the SDK's own schema.
2026-10-04 01:00:27 +04:00
..
assets
src fix(core): send image tool results in the AI SDK's file shape (#857) 2026-10-04 01:00:27 +04:00
tests fix(core): send image tool results in the AI SDK's file shape (#857) 2026-10-04 01:00:27 +04:00
AGENTS.md refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
package.json feat: add visual diff and patch apply tools and openpencil diff (#810) 2026-10-03 21:00:13 +04:00
README.md docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
tsconfig.json fix: explain unsupported browsers instead of a blank window (#745) 2026-09-22 14:40:59 +04:00
tsconfig.test.json test(core): move the editor suite into the package (#792) 2026-09-30 10:22:42 +04:00
tsdown.config.ts fix(figma-api): validate effects like Figma (#794) 2026-09-30 21:18:20 +04:00

@open-pencil/core

Editor engine for OpenPencil: the CanvasKit (Skia WASM) renderer, Yoga layout, the framework-agnostic editor with undo and selection, the Figma Plugin API compatibility layer, the AI/MCP tool definitions, clipboard and vector conversion, and format-neutral document I/O.

It depends on @open-pencil/scene-graph, @open-pencil/pen, @open-pencil/kiwi, and @open-pencil/fig, and keeps browser DOM out so it runs in the app, the CLI, the MCP server, and headless scripts alike.

Import the root barrel or the targeted subpaths listed in package.json exports, for example @open-pencil/core/io, @open-pencil/core/geometry, and @open-pencil/core/canvaskit.

MIT License.