Commit Graph
116 Commits
Author SHA1 Message Date
dotCooCoo eebbe496d4 Merge main into fix/plugin-grant-app-approval 2026-11-08 23:53:57 -08:00
BFlat 0f2857e1a1 Merge pull request #6286 from dotCooCoo/fix/plugin-stale-grant
Plug-ins: replacing a granted plug-in with one that lists no permissions removes the grant
2026-11-09 15:41:04 +08:00
dotCooCoo 0efd9a9ccc Merge main into fix/plugin-grant-app-approval 2026-11-08 23:26:53 -08:00
BFlat 09f82b95ce Merge pull request #6288 from dotCooCoo/fix/plugins-pixels-omitted-note
Plug-ins: docs limit the 64 MiB decoder note to non-CMYK images
2026-11-09 15:20:18 +08:00
dotCooCoo d7f017e889 Plug-ins: docs limit the 64 MiB decoder note to non-CMYK images
The image decoder limit in rgba_pixels does not apply to CMYK images, which cmyk_rgba reads. Keep the separate case of a TIFF the host rejects as too large.
2026-11-08 22:38:51 -08:00
dotCooCoo c2753c1169 Merge main into fix/plugin-grant-app-approval 2026-11-08 22:17:36 -08:00
dotCooCoo b71b88b6b0 Merge main into fix/plugin-read-only-input-held-once
# Conflicts:
#	docs/plugins.md
2026-11-08 22:10:42 -08:00
dotCooCoo cd7dd5f3cc Merge main into fix/plugin-stale-grant 2026-11-08 22:03:18 -08:00
dotCooCoo 65ff9df849 Plug-ins: a grant left behind stops counting when its module can't go back
plugin.install and plugin.remove count an entry of grants.json that this
version can't use when it can't be removed. plugin.install stops counting
a grant it can't remove when the old module can't be written back to the
Plug-ins folder.
2026-11-08 22:00:26 -08:00
dotCooCoo 7431486afa Plug-ins: mcp refuses --allow-plugin-grants with automation roots
A server confined with --automation-read-root or
--automation-write-root has no plug-in store, so a grant accepted under
the flag could not be written to grants.json and recorded grants were
not read. mcp now refuses the combination at start-up.

The help text, docs/plugins.md and docs/mcp.md state that a confined
server does not install a module that lists permissions or asks for a
heavy budget, and that with VECTORCRAFT_NO_PREFS set a grant accepted
under the flag lasts for that session only.
2026-11-08 21:54:46 -08:00
dotCooCoo 2f42feb848 Plug-ins: docs say when pixelsOmitted is set
An embedded image also comes with pixelsOmitted: true when its data is missing, its width or height is 0, its data cannot be decoded within the decoder's memory limit, or its dimensions differ from pixelSize. The entry tells plug-ins to check the flag before reading pixelsBase64.
2026-11-08 21:17:22 -08:00
dotCooCoo 9ae57b03c0 Plug-ins: the texts say a grant accepted under the flag stays recorded
A grant accepted under --allow-plugin-grants is written to grants.json like a
person's approval and counts as approved in later sessions and in the desktop
app. The CLI usage text, the plugin.install params text and docs/plugins.md and
docs/mcp.md said only a person's approval in the desktop app records one.
2026-11-08 21:10:26 -08:00
dotCooCoo e7c3307f07 Merge main into fix/plugin-grant-app-approval 2026-11-08 20:58:47 -08:00
dotCooCoo 0e1aa5cc2e Plug-ins: a filter's read-only objects stay in its input and failed decodes count
A filter run kept a second copy of every read-only object as JSON values.
The run now keeps where each object is in the input, and checks an output
entry against it by parsing that one object, unless the entry is `{"id": …}`
alone.

An image that reaches the decoder now counts toward the 16 MiB pixel total
even when decoding fails, so broken images use up the same total as images
that decode.

The plugin.run text, docs/mcp.md and the progress line state the paint
order and that rule, and docs/plugins.md states that a CMYK image's pixels
are sRGB. New tests cover the per-image 1 MiB, the 16 MiB pixel total and
the 16 MiB text total at and one past their values, memory-budget failures
before the plug-in starts, images that are not decoded, CMYK images
included, and leading per run.
2026-11-08 20:54:02 -08:00
dotCooCoo 9e655ae2e6 Merge main into fix/plugin-stale-grant 2026-11-08 20:38:46 -08:00
dotCooCoo 6cce39dd7f Plug-ins: a grant that can't be removed stops counting for the session
When loading the plug-in store can't remove the grant of an id whose stored
module lists no permissions, or can't read grants.json, the entry stays on
disk and still approved the bytes it covers. plugin.install has the same case
when the grant can't be removed and no earlier module can be put back.

The session now keeps those ids and does not count their grants in
plugin.inspect, plugin.install, plugin.reload or a later load of the store. A
successful update of the grant for the id ends that, and so does attaching a
different store.
2026-11-08 20:38:03 -08:00
BFlat 5402f17f15 Merge pull request #6276 from dotCooCoo/fix/plugin-last-error-origin
Plug-ins: lastError keeps a failed run's error, and hit tests follow swatch changes
2026-11-09 12:26:56 +08:00
dotCooCoo bff7f0ad54 Merge main into fix/plugin-grant-app-approval 2026-11-08 20:16:56 -08:00
dotCooCoo 5cb09720a4 Merge main into feat/plugin-filter-inputs 2026-11-08 19:34:12 -08:00
dotCooCoo 36755be821 Merge main into fix/plugin-grant-app-approval 2026-11-08 19:30:19 -08:00
dotCooCoo 9f9cf9e7ea Merge main into fix/plugin-stale-grant 2026-11-08 19:29:45 -08:00
BFlat 0089e494f5 Merge pull request #6269 from dotCooCoo/fix/plugin-storage-kept-settings
Plug-ins: settings and the cache total stay in memory between storage calls
2026-11-09 11:13:41 +08:00
dotCooCoo 3123b4af74 Plug-ins: a passed reference check keeps a failed run's error
A painted effect's cached result passed its swatch and pattern check and cleared the error of a failed run, so plugin.info reported none while the effect still failed on another object. A run and a reference check now record their errors separately, and each clears only its own.
2026-11-08 19:13:37 -08:00
dotCooCoo 529dcb5c64 Merge main into feat/plugin-filter-inputs 2026-11-08 19:06:11 -08:00
dotCooCoo 4941b377f9 Merge main into fix/plugin-grant-app-approval 2026-11-08 19:01:49 -08:00
dotCooCoo e1281c0266 Merge main into fix/plugin-stale-grant 2026-11-08 18:59:23 -08:00
dotCooCoo 63a483492b Plug-ins: a grants file that can't be read keeps the grant it may hold
A grants file that can't be opened or read may name the old module once
it reads again. plugin.remove and an install of a module listing no
permissions now fail on it and keep the module. A file over 1 MiB or one
that doesn't hold a list still approves nothing and doesn't stop them.
2026-11-08 18:59:22 -08:00
dotCooCoo 6b2559b63e Docs: a delete of the last setting removes the settings file 2026-11-08 18:33:23 -08:00
dotCooCoo 3de6da24be Docs: a delete of a key with no value writes no settings file 2026-11-08 18:06:41 -08:00
dotCooCoo bd5ea2a1bf Merge main into feat/plugin-effect-paint 2026-11-08 17:59:33 -08:00
dotCooCoo e82ed4642e Merge main into feat/plugin-filter-inputs 2026-11-08 17:50:28 -08:00
dotCooCoo 0f002e7625 Plug-ins: tests cover each route that cannot approve an install
Add tests that an action step running plugin.install with grant is
refused, that ui.key, ui.click and ui.pointer sent through the control
path at the open approval dialog approve nothing, with OK focused too,
that MCP answer_dialog reports the app's refusal, that ui.installPlugin
given grant or allowHeavy approves nothing, and that a module recorded
in grants.json installs from a session with that store and no flag
while other bytes under its id are refused.

The batch assertion now checks the refusal's message. The docs and
comments state that Enter confirms the dialog only when OK has the
keyboard focus.
2026-11-08 17:47:02 -08:00
dotCooCoo 969d1cb725 Merge main into fix/plugin-stale-grant 2026-11-08 17:45:48 -08:00
dotCooCoo d6a91b6142 Merge main into feat/plugin-effect-paint 2026-11-08 17:26:35 -08:00
dotCooCoo b79e89de1d Plug-ins: a grant that can't be removed keeps the module it covers
plugin.install of a module that lists no permissions ignored the result
of removing the id's grant. When grants.json could not be updated, the
formerly approved bytes could still be installed without approval. The
store now gets the old module back, so the grant and the module it
covers stay together. The new module stays when the old one can't be
read back and when grants.json can't be read, since such a file approves
nothing. Deleting the last grant now reports a failure.

plugin.remove had the same fault. It now moves the settings and cache
aside and removes the grant before anything is deleted. When the grant
can't be removed, the folder is moved back, the command returns an
error and the plug-in stays installed.
2026-11-08 17:25:09 -08:00
BFlat b652599548 Merge pull request #6264 from dotCooCoo/feat/plugin-importers
Plug-ins: importer plug-ins open file types VectorCraft does not read
2026-11-09 09:24:07 +08:00
dotCooCoo c629753af1 Plug-ins: settings and the cache total stay in memory between storage calls
A settings get no longer reads and parses settings.json each time. The
parsed settings are kept per plug-in folder and read again only when the
file's size or modified time changes. A set to the value a key already
has writes nothing, and every other change is written with an atomic
write before the call returns. plugin.remove drops the kept copy.

cacheBytes in plugin.list, plugin.info and plugin.install comes from a
total kept while the cache folder keeps its modified time, instead of a
listing of up to 8,192 items per call. A cache write still lists the
folder to enforce the caps.

docs/plugins.md states what a run counts and that a cache call moves a
whole entry in one step. docs/plugins.md and docs/mcp.md now say when a
later plugin.remove retries a leftover .removed folder.
2026-11-08 17:17:34 -08:00
dotCooCoo 80558fa273 Merge main into feat/plugin-filter-inputs 2026-11-08 17:09:58 -08:00
dotCooCoo 918ef940cb Merge main into feat/plugin-importers 2026-11-08 16:45:20 -08:00
dotCooCoo 727a611ef7 Merge fix/plugin-grant-module-hash into fix/plugin-grant-app-approval 2026-11-08 16:35:45 -08:00
dotCooCoo efe204bb55 Merge main into feat/plugin-filter-inputs 2026-11-08 16:20:15 -08:00
dotCooCoo 627a40ec36 Merge fix/plugin-grant-module-hash into fix/plugin-grant-app-approval 2026-11-08 16:19:43 -08:00
dotCooCoo 9b0ab19e3a Merge main into fix/plugin-stale-grant 2026-11-08 16:05:50 -08:00
dotCooCoo 0a4c037fb1 Plug-ins: docs state that a stored module not read keeps its id's grant
In Safe Mode and for a disabled stored module, load_stored_plugins does
not read the module, so grants.json keeps the grant for its id. The next
load that reads the module forgets the grant.
2026-11-08 16:04:58 -08:00
dotCooCoo 9511d24ff6 Merge fix/plugin-grant-module-hash into fix/plugin-stale-grant 2026-11-08 15:56:42 -08:00
dotCooCoo 988da4538a Merge main into fix/plugin-grant-module-hash 2026-11-08 15:55:53 -08:00
dotCooCoo 3a56f51cf3 Docs: painted live effects state what hit tests and Pathfinder use 2026-11-08 15:43:58 -08:00
dotCooCoo 606077386c Plug-ins: a filter reads a CMYK image's pixels through the working CMYK profile
A CMYK image's pixels are now its inks shown through the working CMYK profile, by a table built
the way the canvas builds its own, instead of the image decoder's own conversion to RGB.
2026-11-08 15:37:36 -08:00
dotCooCoo 027dc8894d Plug-ins: a filter run given more read-only objects than an output lists fails up front
An output lists at most 100,000 objects and must return every read-only object, so an input with
more than that many is now an object-budget limit before the plug-in starts.
2026-11-08 15:37:36 -08:00
dotCooCoo 5540a5e797 Plug-ins: an oversized path fails a filter run, and objects that clip stay out of its input
A path or compound path that doesn't fit what is left of the input now fails the run with the
runtime's own "selection is too large to hand over" limit before the rest of the selection is
written, instead of later read-only objects reporting a size error. Objects that clip a clip
group are left out for every filter: compound paths and paths inside a group that clips one
reached filters before, as type, images and symbol instances did.
2026-11-08 15:37:36 -08:00