Files
vectorcraft/crates/engine/tests
dotCooCoo 460678d341 Plug-ins: filters and plug-in commands read the document's settings, artboards, layers and swatches without a selection
A filter, or a live effect with commands, at plug-in API level 3 lists
`context` (settings, artboards, layers, swatches) with `doc.read` in its
permissions. Each filter or command run is then given those parts of the
active document in `_context.document`, whether or not anything is
selected: the document's name without its folder, color mode, units,
active artboard size, bleed and raster effects resolution; every
artboard's id, index, name, rectangle and whether it is active; every
layer and sublayer with its parent, depth, name, visibility, lock,
template, color and whether it is current; and every swatch as
swatch.list lists it. It holds no path, object or write handle, and
live-effect drawing, exporters and importers get none.

More than 10,000 rows or 4 MiB of them fail the run before the plug-in
starts, with the document unchanged, and each row takes 1,000
instructions from the run's budget. The install prompt names the wider
read. API_LEVEL is now 3, so older hosts refuse such a manifest.
plugin.list and plugin.info give `context`, and their params text names
it and API level 3.

The plug-in fuzz tests add hostile `context` manifests, installed and
run with and without a selection.

Docs: docs/plugins.md (Document information), docs/mcp.md,
docs/target-app-parity.md.
2026-11-22 01:02:00 -08:00
..