Works through a UX and security review of 0.2.0. The themes are the filesystem
authority of an MCP tool, overwrite protection that covers a whole destination
rather than half of one, and telling a caller what actually happened.
Security
- Every path an MCP tool takes from an agent is confined to the project.
out,out_dir,reference_images, andimagewere resolved against the
working directory and never checked, so../../.ssh/id_rsawas a readable
reference and../../../etc/cron.d/x.pngwas a writable destination.
assets.ymlalready had a containment check;within()andrealish()moved
tocore/fsx.tsand every path site now calls the same one.SECURITY.md
states the scope: a path from an agent is in scope, a path typed into a shell
is not. spx init --dry-runno longer prints the merged configuration file. The
preview was built by merging subpixel's entry into the user's existing config
and serialising the result, so a dry run ofspx init claudeprinted back
every other MCP server's API keys. Each writer renders only subpixel's own
entry now.- The sidecar is treated as half of the destination.
writeManifest
replaced<image>.jsonunconditionally, and it ran after the image had
landed: findinghero.pngfree was enough to claim it, and the run then
destroyed a neighbouring JSON nobody passed--overwritefor. The slot is
checked while the destination is still being chosen, and the manifest is then
published withlink()/EEXISTlike the image beside it, so the only file it
can replace is one it has just read and recognised as subpixel's. A slot that
cannot be read at all — a directory, a permission error — is not an empty
slot, and the run steps to a sibling name.
Added
spx generatereports progress on stderr. A multi-image run printed nothing
until it finished. A TTY gets one rewritten line, a pipe gets one line per
event, stdout stays the artifact paths and nothing else, and--quiet
silences it.--jsonreports the variants that were written, the widths that were skipped,
and a format redirect. The payload described only the primary image, so a
caller consumingspx generate --jsoncould not see which variant widths
existed or that its requested format had been changed.
Changed
spx sync --checkreads the bytes back. A cache-key match says the inputs
are unchanged. It says nothing about the file, which a half-finished copy can
truncate and an optimiser can rewrite while the sidecar beside it still
matches. Every artifact is verified, the primary and each variant: a variant
is a file nothing in the cache key describes, so existing was not evidence of
being intact.syncitself deliberately does not, because it is about to
consult the cache and write anyway. A sidecar written before this release
records no digest per variant and is taken on trust rather than reported as
drift.- Bad enum values and impossible dimensions are refused before a request is
sent.--quality ultraand--format gifreached the backend and came back
as a provider error after the wait, and--size 999999999x999999999reached
aspect-ratio arithmetic and threw a rawRangeError. The accepted values are
declared once incore/types.tsand shared by the Commander options, the
manifest validator, the MCP tool schemas, project config, and theassets.yml
schema, so the five cannot drift. Dimensions are bounded at 16384. - A reference image is refused at its
stat, before it is read. The 12 MiB cap
was applied to a buffer that was already resident, so the 3 GiB file someone
pointed at by mistake was in the process before anything objected, and the
objection was an allocation failure. The whole-request budget is threaded
through the set, so the file that breaks the 32 MiB cap is named rather than
reported as a grand total after every remaining file has been read. - A JSONC configuration file is handed the exact entry to paste rather than
pointed at--force. There is still no JSONC parser: the comments belong to
the user and a round-trip would eat them. spx sync --checkhashes its references instead of loading them.
referenceHashesbuilt a base64 data URL for a request body — a second copy
of every file, a third longer than the first — and then read one field off the
result. A check sends nothing anywhere, so all of it was discarded, once per
reference per asset, on every run. The size caps still apply.spx iconspacks the ICO from the PNGs it has already rendered.
buildIconPackresized the source five times for the pack and three more for
the ICO, two of them at 16 and 32 — sizes it had just written out. Eight
resizes become six, and the ICO payloads are byte-identical to the files
beside them.
Fixed
- A partial
syncover MCP no longer discards the report. When some assets
synced and one failed, the server threw and the successful half of the report
went with it. Error metadata travels on aSymbol.for("subpixel.details")
property, so the report survives without collapsing the error taxonomy or the
exit code the way wrapping would.