Commit Graph
922 Commits
Author SHA1 Message Date
muraa-p bdd7141509 Say at startup when the settings file couldn't be loaded (#1834) (#1834)
When config.toml can't be read or set aside, the app runs on default settings and refuses every save. The window now says so as soon as it opens, with the file's name and why, instead of only in the log.
2026-11-14 11:05:38 +07:00
Nathaniel Caldwell 75d0fa0b4d Say what to do when a builder overwrites the build's progress record (R5.3) (#1810) (#1810)
A builder that kept its own notes in inbox/build-progress.json stopped every later run with an unexplained parse error. The run still stops on a progress record it can't read, but now says the file is Craft Anything's record of the build, that something else changed it, and to rename or delete it to go on; a record from a newer version still says to update. Every brief now names craft.json, feed.json and inbox/ as Craft Anything's own records.
2026-11-14 02:48:40 +07:00
Nathaniel Caldwell c8149b3974 Let each AI's builder tool list be Auto, Lean or Full (R5.4) (#1801) (#1801)
Every builder on a local model got the lean tool list and no memory steps, whatever its window. Each API backend now has tools = auto, lean or full in config.toml: Lean keeps today's local list, Full offers every tool and the memory steps, and Auto (the default) is Full on a paid service and on a local model whose conversation budget is at least 49,152 tokens (a 64k window), else Lean, choosing again before each turn once the server names its window. A chat keeps every tool.
2026-11-14 02:48:32 +07:00
Nicolas Bohn 6a1588e706 Read config.toml again for up to 2 s at startup before using defaults (R2.9) (#1828) (#1828)
A config.toml that another program or a virus scan held for a moment at startup left the whole session on defaults that refuse every save (#1735). Startup now reads it again after short waits, 2 s in all, before falling back, but not for a missing file or a folder in its place; edits deferred at the last exit are merged only once the file could be read, so they aren't lost while it stays unreadable.
2026-11-14 00:53:34 +07:00
Nicolas Bohn 77f2b4434b Use the ASAR reader's check to pick a target's kind (R3.12) (#1826) (#1826)
Target detection recognised an ASAR only when its header JSON began exactly with {"files":, so a valid archive written with a space or another key first wasn't an ASAR target although the reader opened it. Detection now uses the reader's own check (pickle size 4 and a JSON object at byte 16), so the two agree.
2026-11-13 23:43:43 +07:00
BFlat 1c7d619a2d Find the CLI from Cargo's newer test binary folder, so main's CI passes on Rust 1.100 (R5.2) (#1802) (#1802)
CI's stable Rust moved to 1.100, whose Cargo runs a test binary from target/<profile>/build/<package>/<hash>/out instead of target/<profile>/deps, so self_cli_path no longer found the CLI built into target/<profile> and two rebuild tests failed on main and every pull request. It now looks in target/<profile> from that folder too; the earlier checks are unchanged.
2026-11-13 22:28:46 +07:00
Alex Joaquim Pereira 52f1daa668 Say how many report limitations were omitted (R5.6) (#1796) (#1796)
core_report_write lists at most 30 distinct limitations; past that, its Markdown and HTML reports now end the list with how many more were omitted, instead of dropping the rest without a word. A report with 30 or fewer is unchanged.
2026-11-13 01:11:05 +07:00
Alex Joaquim Pereira 26ea91abd3 Resolve and disclose application graph import facts (R3.12) (#1795) (#1795)
An application graph resolved only the first 2,000 imports of a module and dropped which per-file fact lists were cut, so later dependencies lost their edge and role and nothing said a list was cut. Every retained import is now resolved, the cut lists are named in a facts_truncated limitation, and js_app_map reports partial coverage for such a graph.
2026-11-13 00:47:39 +07:00
Alex Joaquim Pereira c64b74ec83 Report complete comparison row totals (R3.12) (#1792) (#1792)
app_graphs_compare and js_exports_compare cut added, removed, bundle-module and vendor rows at 2,000 without saying so, and the app comparison's summary reported the cut lengths as totals. Each list now carries its complete total beside the capped rows, the summary uses those totals, and a cut comparison is marked rows_capped with a limitation and partial coverage.
2026-11-13 00:07:18 +07:00
Alex Joaquim Pereira c727d788a0 Cap and disclose .gitignore reads (R3.11) (#1786) (#1786)
Folder walks read each .gitignore whole, whatever its size. They now read it through the capped, regular-file-checked reader with a 1 MiB limit; one that is too large, not a regular file, not UTF-8 or unreadable is skipped, and app_source_import, js_source_bundle_compare and the managed source reader say so in a gitignore_skipped limitation, since its rules no longer hide files.
2026-11-12 23:11:56 +07:00
Alex Joaquim Pereira 1fb6cf697a Mark archive comparison rows capped (R3.11) (#1782) (#1782)
core_archives_compare counted every added, removed, changed and moved file but cut each list at max_rows without saying so. It now marks a cut comparison rows_capped, with a limitation that the counts are complete and partial coverage; a comparison that fits keeps its evidence as before.
2026-11-12 21:11:00 +07:00
FuryNocturnTV (Tare Fernandez) ccca7421e9 Send OpenCode its message on stdin, off the command line (R2.2) (#1775) (#1775)
OpenCode's message (with its preamble) now goes in on stdin instead of as opencode run's last argument, which it reads when given no message argument, so a long brief can't pass Windows' command-line limit (os error 206, #402). The roadmap line is split: Aider, Hermes, Maki, Devin and Antigravity still take theirs on the command line.
2026-11-12 20:35:53 +07:00
Alex Joaquim Pereira 71dda0be00 Disclose application-graph edges dropped at the cap (R3.12) (#1780) (#1780)
An application graph dropped edges past 4 x max_nodes without saying so, and js_app_map reported complete coverage even for a graph cut by its node or edge cap. The builder now counts edges the cap turns away and records an edge_cap limitation beside node_cap, and js_app_map marks coverage partial when either cap cut the graph, on every module page.
2026-11-12 20:34:52 +07:00
Alex Joaquim Pereira 664ce030d1 Keep source-bundle comparison totals honest under the row cap (R3.12) (#1778) (#1778)
A source-to-bundle comparison with more scripts than max_rows reported the examined window's counts as if they covered the whole tree, and its count of bundle units without a source was the capped row count. It now says how many scripts were examined beside the total, counts every unclaimed unit while still listing at most max_rows, and marks a capped result with a rows_capped limitation and partial coverage.
2026-11-12 19:46:46 +07:00
FuryNocturnTV (Tare Fernandez) 290c2fde44 Probe a port no other test can take in the JEB refused-connection test (R5.2) (#1773) (#1773)
The JEB test's nothing-listens-here check bound a port and released it, so a stand-in server in a test running beside it could take that port and answer, failing the test now and then. It now uses 127.0.0.1:1, which binding port 0 never hands out.
2026-11-12 19:20:30 +07:00
Alex Joaquim Pereira 2c80fdb799 Use one sourceMappingURL reader in the JS analyzer (R3.12) (#1772) (#1772)
The JavaScript analyzer had its own copy of the sourceMappingURL reader, which missed #1731's fix: it now uses the formats one, so the no-space annotation is found, tabs and repeated spaces are accepted, a URL with whitespace is refused, and an annotation up to 64 lines from the end is seen, on the parsed and lexer paths alike.
2026-11-12 18:58:53 +07:00
GAlun b512474615 Keep engine downloads on HTTPS across redirects (R2.9) (#1771) (#1771)
The shared engine downloader already required an HTTPS starting address but followed a redirect from HTTPS to plain HTTP. Every redirect hop is now held to HTTPS before connecting, and a refused redirect says so without printing the address, which can carry a signed query or credentials. Tested against local TLS servers with certificates made for each run.
2026-11-12 18:58:47 +07:00
Alex Joaquim Pereira 4649335681 Bound the JavaScript lexer fallback's endpoint and exposed lists (R3.12) (#1769) (#1769)
When a bundle is too large or can't be parsed, the token-level fallback now caps its fetch calls, URL literals and exposeInMainWorld objects at the same list limit the syntax-tree pass uses, and records endpoints as truncated when a fetch call is dropped, so a huge bundle can't grow those lists without limit.
2026-11-12 18:38:56 +07:00
Alex Joaquim Pereira d56fa23860 Mark sources of unread external source-map sections uncertain (R3.12) (#1767) (#1767)
An index-map section that points at an external map, which is never fetched, adds no sources, so an application graph treated the map's list as complete. Such sections are now counted (through nested index maps), the graph names them in a limitation, and comparing a reference source tree with the bundle reports an otherwise unmatched source as uncertain with partial coverage instead of absent.
2026-11-12 18:12:13 +07:00
YAO Changsong 9574a2f728 Drop the constants a skipped AArch64 page load overwrites (R3.11) (#1764) (#1764)
AArch64 page loads and import-slot loads are shown through what uses them, but skipping them also skipped forgetting what their destination held, so movz x9; adrp x9; movk x9 folded the MOVK with a constant the page load had replaced, and an argument register reloaded by adrp could show its old value. Those loads now forget every register they write.
2026-11-12 17:47:38 +07:00
d7do7e 28f0357bd7 Normalize leading dot-slash before app/ prefix check in build tools (R5.4) (#1763) (#1763)
A build tool path that already names app/, written as ./app/... or app/..., or one that resolves inside app/, is never moved into a nested app/app/ by the fallback #1752 added.
2026-11-12 17:23:03 +07:00
YAO Changsong b82f43a4ae Fold an AArch64 MOVZ/MOVK pair into one constant (R3.11) (#1761) (#1761)
mov w9, #0x2493 followed by movk w9, #0x9249, lsl #16 now lifts to pseudo-C as the one constant it builds (w9 = 0x92492493;) instead of two statements, through a full 64-bit chain of MOVKs too; a W pair stays 32-bit, and the two statements stay when anything reads or writes the register between them.
2026-11-12 17:21:42 +07:00
htjulia eac9d5700b Keep Clean room's run check from reading inside an app bundle (R2.4) (#1760) (#1760)
The console-run check names the original so that a usage line printing the program's name still matches. Since #1759 that name came from reading an app bundle's Info.plist in every mode; Clean room now takes it from the picked path's own name and reads nothing inside, and Deep mode keeps the program the bundle names.
2026-11-12 17:12:19 +07:00
htjulia 4a4b06d281 Study a macOS app bundle through the program its Info.plist names (R2.4) (#1759) (#1759)
An app picked as Name.app was studied as a plain folder, so Deep mode skipped Ghidra, the console runs and the window picture, and the app-screenshot check had nothing to compare with. A folder ending in .app now resolves to the program its Info.plist names, or the one named like the bundle; a bundle with no program, and any other folder, stay as picked. Fixes #1757.
2026-11-12 16:29:14 +07:00
GAlun fb3428280b Reject required WASM font builds when filtering leaves no fonts (R2.9) (#1755) (#1755)
With CRAFT_FONTS_REQUIRED set, a browser build whose craft-fonts manifest lists fonts but none the web allowlist keeps now fails with that reason, instead of building with an empty font table. Optional builds, native builds and an empty manifest's own error are unchanged.
2026-11-12 16:18:22 +07:00
Justin John 0a5ab0dba7 Stop a launched program without an unlimited wait under its lock (R5.3) (#1756) (#1756)
Play's Stop (and stopping a project's running app) sent the kill and then waited for the program with no limit while holding the launch's lock, which the watcher and every is-it-running check also take. It now sends the kill under the lock and waits outside it for at most five seconds, logging a program that is still there and returning false, as for other runs since #1438.
2026-11-12 15:57:32 +07:00
Nathaniel Caldwell f513e2d329 Read the context window from the server (R5.4) (#1754) (#1754)
Before a backend's first request (and once more while the server hasn't said), the agent asks its server for the context window it has loaded: the model list's context fields for OpenAI-compatible services and OpenRouter, and on this computer or its network llama.cpp's props, llama-swap's upstream (only for a model already loaded), LM Studio's loaded length and Ollama's /api/ps. A local model's budget becomes three quarters of that window instead of a fixed 24k; for a paid service a window read this way only lowers the 150k default. A refusal's window and a budget the person set still win.
2026-11-12 15:40:55 +07:00
d7do7e 7049097d35 Fall back to app/ for relative build tool paths (R5.4) (#1752) (#1752)
Commands run by build_command_run work inside app/, so compiler errors name files relative to it. build_files_list, build_file_read and build_file_edit now find such a path inside app/ when nothing is at it in the project root, and build_file_write writes there when the folder already exists in app/ and not in the root; anything else resolves as before, still inside the project.
2026-11-12 15:26:06 +07:00
YAO Changsong bd72993604 Keep the extension on AArch64 memory index operands (R3.11) (#1745) (#1745)
A register-offset AArch64 memory operand such as ldr w0, [x1, w2, sxtw #2] now keeps its index at its written width with its extension or shift, so pseudo-C shows the sign-extended index ((int64_t)(int32_t)w2 << 2) instead of a plain unsigned x2 * 4. An unchanged index stays plain, and x86 scaled indices render as before.
2026-11-12 14:54:11 +07:00
Justin John b9de86c149 Bound Ghidra's jump tables that have no bounds check before decompiling (R1.5) (#1743) (#1743)
A jump through a byte-indexed table of offsets with no bounds check, as Rust's async state machines use, made Ghidra read 256 entries, follow the ones inside other code and decompile without end (#1715). Before decompiling, the bridge now finds such tables, works out where each ends from a linear pass over the function (its .pdata extent on Windows) and gives Ghidra their real targets as a switch override, in memory for this run; guarded tables only get their targets added. A 60-stage Rust async program decompiled in 16 s instead of falling back after 938 s. Fixes #1715.
2026-11-12 14:12:52 +07:00
RRFZ d67583b183 Recognize HTTP extension methods in packet captures (R3.12) (#1741) (#1741)
A captured request using a WebDAV or other extension method (PROPFIND, MKCOL, REPORT…) now reads as HTTP with its method, target and Host, instead of only the nine common methods: any valid HTTP method token counts, case kept, with the same start-line and version checks as before.
2026-11-12 13:33:56 +07:00
RRFZ ff7311ae94 Separate SQLite column names at SQL line breaks (R3.12) (#1740) (#1740)
A CREATE TABLE whose column names are followed by a carriage return or form feed now reads them apart from their types, as SQLite does, so an INTEGER PRIMARY KEY written that way is still the rowid alias and its rows show the stored rowid instead of NULL. Quoted names keep those characters.
2026-11-12 13:32:43 +07:00
RRFZ a61879758a Stop TAR listings at invalid local PAX sizes (R3.12) (#1739) (#1739)
A member's own PAX header with a size that isn't plain decimal digits (a word, a sign, spaces, an overflow) now stops the listing before that member with a warning, as an invalid global size already did, instead of quietly falling back to the ordinary header and reporting a complete archive. Earlier members stay readable.
2026-11-12 13:26:30 +07:00
RRFZ befb291a1f Keep quoted delimiters inside XML plist tags (R3.12) (#1738) (#1738)
An XML plist tag with an attribute such as note="a>b" no longer ends at the quoted >: quotes are tracked while finding the tag's end, so valid documents parse, and an attribute whose quote never closes is refused instead of turning later markup into a value.
2026-11-12 13:18:12 +07:00
Fury a01669bc23 Bound folder walks by the entries examined, not only the files kept (R3.11) (#1737) (#1737)
A folder walk is now limited by the entries it examines and the path bytes it holds, not only the files it keeps, so a tree of empty folders or links or one folder with millions of names no longer walks or loads without end. A cut listing keeps the first names in name order, the same every time; the walk stops at the first file or entry over a limit and says so, cancel is checked inside a long folder listing, and an ASAR's unpacked folder and JavaScript source folders now report when they were cut short.
2026-11-12 13:03:51 +07:00
Fury 2c97ec7e8a Fail a build that requires craft-fonts when CRAFT_FONTS_DIR is missing (R2.9) (#1736) (#1736)
CRAFT_FONTS_REQUIRED without CRAFT_FONTS_DIR is now a build error naming both, instead of a build with no fallback fonts where non-Latin scripts show as boxes. A manifest listing no fonts counts as a bad folder, and CRAFT_FONTS_REQUIRED set to nothing or 0 means not required. The decision is one tested function in build.rs.
2026-11-12 13:03:41 +07:00
Fury 699464db8d Never save defaults over a config.toml that couldn't be read (R2.9) (#1735) (#1735)
Only a missing config.toml gives plain defaults now. A file another program holds, the account can't read, or that isn't UTF-8 no longer loads as defaults that the next save writes over it: one that can't be understood is set aside under the first free config.toml.broken name (an earlier copy is never replaced), and one that can't be read or set aside stays where it is while saves, deferred saves, settings_set and plugins_add refuse with BadSettings.
2026-11-12 12:57:24 +07:00
RRFZ 52e6817bf0 Stop CArchive listings at unterminated member names (R3.12) (#1733) (#1733)
A packed Python executable's table entry whose name has no terminating NUL is now read as damage: the listing stops there, keeps the members before it and says why, instead of taking the record's padding as a file name.
2026-11-12 12:29:49 +07:00
RRFZ 726fa4d25b Keep ordinary EVM metadata arrays typed (R3.12) (#1732) (#1732)
A contract's CBOR metadata no longer turns every array of three integers into a dotted version string: only the solc and vyper fields read as compiler versions, so an entry such as sizes: [1, 2, 3] stays an array.
2026-11-12 12:23:25 +07:00
RRFZ 744e5c9838 Read source map annotations with optional marker spacing (R3.12) (#1731) (#1731)
A script's trailing sourceMappingURL annotation is found with no space, a tab or several spaces after the //#, //@ or /*# marker, as the source map standard allows; an annotation whose URL contains whitespace is ignored.
2026-11-12 12:13:49 +07:00
RRFZ 5756393c83 Keep CRLF when adding the first JSONC object (R3.12) (#1730) (#1730)
Creating the first object in a whitespace-only or comment-only CRLF settings file now uses the file's line endings, as adding to an existing object already did. Comments and a BOM stay in place; a new empty file still uses LF.
2026-11-12 12:08:33 +07:00
htjulia 0453ec4a9b Keep the shift on AArch64 shifted and extended register operands (R3.11) (#1729)
Shifted-register operands lost their shift and extended registers their extension, so add w9, w10, w9, lsr #31 read as w9 = w10 + w9; and sub w9, w9, w9, lsl #3 as w9 -= w9; (#1725). Operands now carry a shift or extension (LSL, LSR, ASR, ROR and the eight extensions), dropped only when it changes nothing, and pseudo-C spells out what C needs, such as ((uint32_t)w9 >> 31) and sign or zero extension before a shift.
2026-11-12 12:07:02 +07:00
htjulia b2c221971a Keep the value of AArch64 MOVK and MOVN immediates (R3.11) (#1728)
MOVK replaces 16 bits and keeps the rest, but lifted as a whole move (mov w9, #0x2493; movk w9, #0x9249, lsl #16 read as w9 = 0x92490000;), and MOVN's value is the inverted immediate but lifted as the immediate (mov w0, #-1 read as w0 = 0;) (#1724). MOVK now decodes as an insert carrying the shifted immediate and the mask of the bits kept, printed as w9 = (w9 & 0xffff) | 0x92490000;, and MOVN carries the inverted value, shown for a W register as the signed value the assembler shows.
2026-11-12 12:06:44 +07:00
htjulia 96bf9c2017 Move the source, not the zero register, in AArch64 move aliases (R3.11) (#1727)
mov xd, xm and mov wd, #bitmask are ORR from the zero register, and the lifter took the zero register as the value moved, so mov x19, x0 read as x19 = xzr; and a loop then read from address 0 (#1723). The A64 decoder now recognises the ORR form of mov from its operands, with or without formatted text, and keeps only the destination and the moved value; pseudo-C prints x19 = x0; and constant tracking follows a known value through the move. A shifted source or a real first source is still an ORR.
2026-11-12 12:06:26 +07:00
RRFZ e0c70c2926 Normalize XML plist line endings before decoding text (R3.12) (#1726)
XML plists saved with Windows line endings kept carriage returns inside string values and dictionary keys, so a key written across lines couldn't be found under the name a conforming XML reader returns. Literal CRLF and CR now become LF before tokenizing, as XML 1.0 requires, in UTF-8 and both UTF-16 byte orders; a &#13; character reference still gives a carriage return.
2026-11-12 12:02:39 +07:00
Justin John 573d84e751 Say in the feed while a decompile waits on Ghidra, and for how long (R1.5) (#1722)
While native_function_pseudocode waited on Ghidra the feed showed only "start native function pseudocode" for up to 15 minutes, because the tool runs in our MCP server inside the coding agent and its progress reaches only the agent (#1714). A decompile now says, once a minute, how long it has waited (or that it is queued behind another decompile), as the tool's progress and as a line in the project's inbox; the run shows each new line in the feed, the line goes when the wait ends, and a run starts by clearing lines a stopped tool left.
2026-11-12 11:50:40 +07:00
Hasnain 88d67cebf4 Refuse Clean room for native Aider runs (R2.2) (#1110)
Aider's adapter refuses a Clean room run in validate_access, but only the ACP path called it, so rebuild --clean-room with the Aider backend still started Aider and its unchecked reads. run_cli now checks the run's access mode before the setup check, so an agent that can't hold a Clean room run is refused on the native path too, before its program starts. Only Aider and Grok (ACP-only) override the check, so no other agent changes.
2026-11-12 11:00:59 +07:00
Nicolas Bohn 12aad97757 Keep the sources of a source map refused for bad mappings or section offsets (R3.12) (#1717)
A map with malformed mappings or section offsets was reported unreadable, although its sources list is usually whole, and the list is all an application graph keeps. A new sourcemap::parse_sources reads the sources, content, names and ignore list without decoding mappings or checking section offsets; the application graph re-reads a map parse refuses for those reasons this way, lists its sources with a source_map_mappings_unreadable limitation, and compares them as usual. A map whose decodable mappings name a source past the end of its list, or with a malformed section, is still unreadable.
2026-11-12 09:26:47 +07:00
Nicolas Bohn 438c80082a Report sources of unreadable source maps as uncertain, not missing (R3.12) (#1708)
A source map that was malformed, had an undecodable data URL or was listed but not loaded left its sources looking absent, so a source comparison reported them as confirmed missing. Such a map is now marked unreadable with a limitation, and the comparison reports otherwise unmatched sources as uncertain with partial coverage. A stand-alone .map beside an analysed script is read like a referenced one; other .map files stay listed and unread, so they can't make a comparison uncertain or match code that doesn't ship.
2026-11-12 08:50:04 +07:00
Nicolas Bohn ab79ec87a4 Count source-map sections, check skipped values and keep refused maps' sources uncertain (R3.12) (#1705)
Follow-up to #1703. A sections array of non-objects could cost several times the old parser's memory, skipped values weren't checked as a full read checks them so some broken maps read as valid, entries a repeated key replaces still used the budget, and the analyzer read a map refused at a limit as one with no sources. Index-map sections now count against the entry budget and non-map sections stay small, skipped values get the same string, number and nesting checks, a replaced list is freed and gives its entries back, the default limit is 4,000,000 so a million sources with content fit, and a map refused at any of the parser's limits leaves its sources uncertain with a limitation, while a malformed map is read as before.
2026-11-12 02:43:59 +07:00