Closing a socket with unread input resets the connection, and on macOS the reset can discard
the refusal before the client reads it (the oversized-line test failed on the macOS gate). The
port now stops writing, drains what the client is still sending (bounded: 8 MiB, 2 s), then
closes.
Fix-ups on the outside PRs merged in this batch:
* #217: subcommand_usage reads the entries out of USAGE instead of keeping a
second copy, so export, formats and guide search are covered and the two
cannot drift apart.
* #143: the surrogate-pair lookahead slices with get(), not an index.
* #145 (declined, the reader is craft-xml now): pin that signed numeric
character references stay text.
* AUTHORS.md and CHANGELOG.md credit the contributors.
find_command rebuilt the whole registry (~360 specs) on every call, and
macro.history cloned every recorded command's params to list a step.
panic_hunt_every_command (which runs macro.history about 600 times per
session over up to 10,000 steps): over 40 min before, 144 s after (debug,
Windows, this machine). The CLI test's failing file now selects first.
Every undo step keeps the commands it ran; Save As Command rewrites ids of
this document to act on the selection or active layer, or names the step it
can't keep. macro.run is one transactional undo step; macros call only what
a plug-in may, and plug-ins can't call macro.*. anicraft-cli run reads saved
command files. ADR 0097.
Since 0.1 the importer reads bitmaps, sounds and the publish settings from the
package with `?`, so one entry failing its checksum or the archive's limits
refused the whole document (#226). Optional parts are now left out and
reported; damage to DOMDocument.xml still refuses the file. Animate omits the
default white backgroundColor, which imported as black (#163). anicraft-cli
info/render/exports open .fla/.xfl through file.open.
Tests: damaged bitmap/symbol parts (fail before the fix), white stage,
every entry point (file.open, upper-case .FLA, Open Recent, drop routing,
browser vfs) over the corpus, CLI subcommands.
The usage text said only that frames on the command line are 1-based.
It now also says that frame numbers inside JSON params, scripts and
command results are 0-based, as docs/mcp.md already does.
`anicraft-cli <subcommand> --help` (and `-h`) was parsed as a flag missing its
value and failed with "flag --help needs a value". It now prints the usage lines
of that subcommand, as does `anicraft-cli help <subcommand>`. An unknown
subcommand still reports an error with the full usage.
`anicraft --control <port>` opens a JSON-lines control port on 127.0.0.1;
`anicraft-cli mcp --bridge <port>` serves the same five MCP tools against
the open window. The app runs the CLI's own `mcp::call_tool` (now generic
over a `Host`), so live and headless share one dispatcher. A per-run token
is written to control.json in the settings folder and removed on exit.
Edits wait while the person drags, so undo steps never merge.
ADR 0070, docs/control-protocol.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release packaging smoke-tests every build with anicraft-cli --version. The window's
Wayland app_id / X11 class becomes the reverse-DNS id the desktop entry, AppStream, Flatpak
and macOS bundle use (platform::APP_ID), so docks match the window to its launcher.
build.rs fails instead of warning when ANICRAFT_REQUIRE_WINRES=1 and the icon can't be
embedded (set by the Windows packaging).
The shell schedules recovery copies (every minute or 25 changes, set in
Preferences > Files > Autosave, with an off switch) on the engine's
Autosaver, waking itself when the interval runs out; the recovery folder
comes from platform::recovery_dir. A non-blocking window offers work left
by crashed sessions; File > Recover Autosaved Documents brings it back.
Clean exits and saves remove the copy. Preferences scroll when taller
than the window. bench measures one autosave.