62 Commits
Author SHA1 Message Date
FredApps 7a1a75b894 refactor(cli): anicraft-cli follows RFC-0018 (clap, typed errors, run(args, out, err), exit codes 0/1/2) 2026-11-26 23:25:02 +01:00
Tanish Manku 95feb87d49 chore: merge main (parity batch, core batch 3) into legacy .fla import (M4)
Open reports the import's fields from either importer; the imported path now comes with the
session's info, as main does. Both web tests kept.
2026-11-24 21:50:16 -07:00
Tanish Manku 43bf7cdb80 chore: merge main into feat/legacy-fla-review (M4) 2026-11-24 19:23:38 -07:00
Tanish Manku 05b44a2dcf chore: merge main into the second batch of small outside fixes (M8)
# Conflicts:
#	CHANGELOG.md
#	crates/cli/src/lib.rs
2026-11-24 19:23:33 -07:00
Dylan M. Taylor 1bf696b08f packaging(linux): support co-installable nightly packages (#610)
Linux nightly packaging by @dylanmtaylor, with the per-app Nightly flavor commits stacked on his branch.

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-24 19:16:47 -06:00
Tanish Manku 540ea7b1a3 fix(cli): every subcommand refuses an option it doesn't read, from one table checked against the usage (M8) 2026-11-24 15:17:31 -07:00
Tanish Manku b365ebd3df Merge outside PR #542: Fix CLI export destination precedence 2026-11-24 15:13:47 -07:00
Tanish Manku 602388c29c Merge outside PR #544: fix(cli): honor BOM-prefixed quit requests in serve 2026-11-24 15:13:46 -07:00
Tanish Manku 6b8e20e6f0 Merge outside PR #552: fix(cli): reject unknown options for single-frame render 2026-11-24 15:13:45 -07:00
Rob CoenenandClaude Opus 5.5 37df736299 chore: merge main into feat/legacy-fla-import
Resolves the Cargo.toml conflict by keeping both new workspace
dependencies: craft-cfb (this branch) and craft-text (main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 17:23:29 +01:00
Tanish Manku 58c116e7fb chore: merge main into fix/backlog-stage-tools 2026-11-23 17:56:13 -07:00
Tanish Manku 0a0885fa57 chore: merge main into fix/backlog-model-hardening 2026-11-23 13:16:48 -07:00
Rob CoenenandClaude Opus 5.5 3144fed2c6 fix(fla): read each stream by its own entry; tests and ADR say what they check
These come from CodeRabbit's first review, where they sat in the review
body rather than in threads.

Container and dump:
- `Compound::read_entry` reads the entry itself, and a stream path's
  first entry is indexed. A damaged file that lists one path twice now
  dumps each entry's own bytes beside its own size, and lookups no
  longer scan the directory.
- `fla-dump --stream` reads only that stream (`dump_only`), so another
  stream's damage can't fail it. A stream the file doesn't have is said.

Tests:
- The FAT-loop test needs the file to open, and needs the stream's loop
  refused.
- The test writer marks its FAT sectors FATSECT, as [MS-CFB] 2.3 says.
- The corpus tests compare the scene count.
- A twin member that is listed but can't be read fails the test instead
  of shrinking what is compared.
- The stage test covers every pinned pair.
- Text runs compare the full character position.
- The one tolerated text-bounds difference is pinned to the value seen.
- The own-media test fails on any twin that doesn't import, and on any
  corpus folder it can't list. It knows the two downloads that are zips
  of documents.

ADR 0120:
- the Stage 1 scope reads as history;
- the openspec path is gone;
- the shape check names what it compares (edges and style indices);
- the text check says 372 records pair and 371 match field for field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:29:53 +01:00
Rob CoenenandClaude Opus 5.5 10117b1c54 refactor(fla): read the container through craft-cfb; ADR 0096 becomes 0120
At review, the compound binary container moves to the shared craft-cfb reader
from craft-libs (rev b67b9f9, the one craft-xfl and craft-xml already use).
crates/fla's own MS-CFB reader is removed. The `cfb` module keeps only the
importer's policy: the ADR 0054 caps (1 GiB per file, 256 MiB per stream),
stream lookup by full path, and one-sentence errors. Chain walks, cycle
guards and directory bounds are craft-cfb's.

Container errors that named one structural fault each (bad header,
truncated, looping chain or tree) are now `Damaged`, carrying craft-cfb's
reason. craft-cfb is more tolerant in two places, and the tests now pin it:
- a FAT count the file could hold but its DIFAT doesn't list opens;
- a root that overstates its mini stream opens, read to the file's end at
  most.
In both cases nothing past the file is reserved. The test of the removed
reader's internal chain budget (`the_directory_reads_no_further_than_the_most_entries`)
is dropped with the code it tested.

Checked against the nine EDAP legacy files: the same streams, sizes and
record tags in `fla-dump`, the same `info`, and byte-identical frame
renders with the old and the new reader.

The ADR is renumbered to 0120, reserved for this PR (0096 is the guide
search ADR on main). Its references move with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 01:39:24 +01:00
Tanish Manku 96f22a2e65 fix(cli): the stroke bench builds for the web, with a test of its steps (M8) 2026-11-21 14:52:04 -07:00
Tanish Manku 0454782d3c docs: ADR 0129, the long-stroke numbers, and P-003 and P-005 in the roadmap and parity matrix (M8) 2026-11-21 14:11:49 -07:00
Tanish Manku bd127b811e feat(cli): bench --stroke measures a long Brush stroke, and --stroke-file a document's artwork (M8) 2026-11-21 14:11:41 -07:00
Tanish Manku d9b8bcadd1 feat(engine): exports, info and the MCP render say when a frame's artwork was left out (M8) 2026-11-21 13:28:27 -07:00
Tanish Manku 654e4efbe4 test: polling deadlines are a minute, not two seconds; the stroke test skips work it never read (M8) 2026-11-21 13:06:27 -07:00
Mex 2546c8a344 fix(cli): reject unknown options for single-frame render 2026-11-21 19:46:15 +01:00
Mex 018ef23b64 fix(cli): honor BOM-prefixed quit requests in serve 2026-11-21 19:07:02 +01:00
Mex 8168488eda Fix CLI export destination precedence 2026-11-21 18:35:08 +01:00
Rob CoenenandClaude Opus 5.5 27c675b0e6 fix(engine,cli): check a .fla's size before reading it, and read it bounded
file.open read the whole .fla through vfs before its size check (the check
used to come first); it now checks the length, then reads at most one byte
past MAX_FLA_BYTES with the new vfs::read_bounded, both importer branches
unchanged. fla-dump likewise refuses a file over the legacy container's
1 GiB cap by its size and reads it bounded, and marks a stream whose tag scan
stopped at its budget with "tags_truncated".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 15:32:43 +01:00
Rob Coenen 57bc336c0a feat(cli): fla-dump, the legacy Flash container's stream microscope
anicraft-cli fla-dump <legacy.fla> [--stream <name>] prints a Flash 8–CS4
.fla's stream tree, prologues and record tags as JSON. It is the
reverse-engineering microscope for the legacy import (ADR 0096) and makes
triaging user files observable.
2026-11-21 15:31:18 +01:00
Tanish Manku 00679e8d36 fix(engine): links after a missing folder are followed, ffmpeg gets the checked path, plug-in folder links and the soundtrack's staging file are covered (M8) 2026-11-20 07:12:59 -07:00
Tanish Manku ba4ba1c2fd fix(engine): paths on another computer and device paths are refused by their spelling under automation roots; the CLI takes --flag=value (M8) 2026-11-20 06:35:49 -07:00
Tanish Manku 8993a6011f feat(cli): mcp refuses to start without --automation-read-root and --automation-write-root; the bridge carries them to the window (M8) 2026-11-20 06:18:05 -07:00
Tanish Manku 51a6cbdf8b feat(export): Export SVG Sequence, one SVG file per frame (#504) (M8) 2026-11-20 04:12:14 -07:00
Tanish Manku 1807f424eb fix(cli): no command takes an ffmpeg path over serve or mcp (M8)
main gained Import Video, video info and relinking a layer's video,
each with the ffmpeg parameter Export Video has. The rule from outside
PR #122 named one command; it now refuses the parameter by name, and a
test walks the registry so the next command that runs ffmpeg is covered.
2026-11-19 19:15:10 -07:00
Tanish Manku 78c55de32f Merge outside PR #122: fix(cli): refuse a caller-supplied ffmpeg over serve/mcp; bound request lines (M8)
# Conflicts:
#	CHANGELOG.md
#	crates/cli/src/mcp.rs
2026-11-19 14:46:01 -07:00
Mex af2eaf3a71 fix(cli): reject nonfinite frame rates and scales (M8) 2026-11-18 23:31:38 +01:00
Tanish Manku 3f214d7ccd fix(control): close a refused connection gracefully so the client reads the reply (M8)
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.
2026-11-17 17:52:50 -07:00
Tanish Manku ef3fc8b2e0 chore: merge main (outside core batch) into the outside features batch (M8) 2026-11-17 17:11:07 -07:00
Tanish Manku 2fb798f12c fix(control): leave the control port and its getrandom out of wasm32 builds (M8) 2026-11-17 13:59:24 -07:00
Tanish Manku 34d94154a0 fix(control): free the port with the window, drop silent connections, exclusive token file, portable installs (M8) 2026-11-17 13:46:04 -07:00
Tanish Manku 1331de2caa fix(cli): derive subcommand help from the usage text; bounds-checked lexer slice; credits (M8)
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.
2026-11-17 13:36:47 -07:00
Tanish Manku 6f1adc4ea2 Merge outside PR #216: feat(control): live control port and MCP bridge (ADR 0104) (M8)
# Conflicts:
#	CHANGELOG.md
#	docs/roadmap.md
#	src/main.rs
2026-11-17 13:34:18 -07:00
Tanish Manku 5f37023bcc Merge outside PR #217: fix(cli): subcommand --help prints that subcommand's usage
# Conflicts:
#	crates/cli/src/lib.rs
2026-11-17 13:34:12 -07:00
Tanish Manku a6d85424b4 Merge outside PR #221: docs(cli): say which frame numbers are 1-based and which are 0-based
# Conflicts:
#	crates/cli/src/lib.rs
2026-11-17 13:33:49 -07:00
Tanish Manku 780c08d342 Merge outside PR #337: fix(mcp): correct render caption dimension separator 2026-11-17 13:32:40 -07:00
Dylan M. Taylor ebab5589cc Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	CHANGELOG.md
2026-11-16 22:15:41 -05:00
Tanish Manku 4a25817937 chore: merge main (guide search and context help) into saved commands (M6)
Context help gains the macro namespace and the Save As Command and Manage Saved Commands
windows; the guide's chapter list numbers both new chapters.
2026-11-16 18:26:04 -07:00
Tanish Manku 8bf45991ac perf(engine): registry lookups built once; macro.history checks steps without copying them (M6)
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.
2026-11-14 04:13:02 -07:00
Tanish Manku f167ebe3da feat(engine): command macros: history records each step's commands, macro.* commands (M6)
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.
2026-11-14 04:13:01 -07:00
macallantheroot c454446677 fix(mcp): correct render caption dimension separator 2026-11-14 12:43:05 +03:00
Tanish Manku 3ae20fe24f feat(guide): search in the bundled guide (prebuilt index, offline search page, same ranking in anicraft-cli guide search) (M8) 2026-11-13 23:44:33 -07:00
Tanish Manku e92cdf98b6 feat(engine): exporter plug-ins (file.export_plugin, file.export_formats) and plug-in eases; anicraft-cli export and formats (M6) 2026-11-13 17:35:49 -07:00
Tanish Manku c1b5941f12 fix(xfl): one damaged part no longer refuses a .fla, white default stage, the CLI opens Animate files (M8)
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.
2026-11-12 12:59:10 -07:00
jayzed80 2cc96ba8f0 docs(cli): say which frame numbers are 1-based and which are 0-based (#152)
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.
2026-11-12 10:39:11 +00:00
jayzed80 a3c1a7d8ec fix(cli): subcommand --help prints that subcommand's usage (#153)
`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.
2026-11-12 09:12:27 +00:00