Commit Graph
683 Commits
Author SHA1 Message Date
Nathaniel Caldwell 7b9b2f9a31 Keep an OpenCode builder's edits off Craft Anything's records (R2.2) (#1853)
An OpenCode builder runs with `--auto`, so it once wrote its notes into `inbox/build-progress.json` and stopped the build. A build's OpenCode config now carries permission rules that deny its edit tool every record Craft Anything keeps in the project (`craft.json`, `feed.json`, `inbox/`, `investigation.cany/`, `reference/`…, from `workspace::OWN_NAMES`), except `checks/`, in either project layout. Chats and questions are unchanged. Its shell and folders outside the project aren't covered (roadmap R2.2).
2026-11-14 14:55:00 +07:00
Justin John 7be84b7c8d Take the Ghidra sweep's next function without a loop that always breaks (R1.5) (#1851)
The jump-table sweep found the next function with a `for` loop that always stopped on its first pass, which failed SonarCloud's reliability gate on main (java:S1751). It now takes the first function from the iterator, and the sweep still ends at the memory block's end when there's none. Behaviour is unchanged; the live Ghidra tests pass.
2026-11-14 14:39:38 +07:00
Rudy Mizrahi Celekli a3db764949 Show ACP token counts as unknown when the agent does not report them (R2.2) (#1843)
Agents over ACP report context use, not a turn's tokens, so their turns now say the token count is unknown instead of 0, in the CLI, the build's activity and the app. Project and session totals keep what was reported: "Unknown" when nothing was, and a lower bound such as "1.9M+" when some turns had no count. usage.json gains `tokens_incomplete`; older files read as before.
2026-11-14 14:36:22 +07:00
Rudy Mizrahi Celekli f5a3d2d5e4 Verify Mac call observation with a real debugger (R2.4) (#1844)
An opt-in macOS test compiles a small program, runs `apple_calls_observe` on it under LLDB, checks that both function hits are recorded in order, and that a file LLDB can't debug is an error with a fix. Run on arm64 macOS with Apple LLDB.
2026-11-14 14:15:21 +07:00
Rudy Mizrahi Celekli ddd82831ff Check the browser exit diagnostic without timing the whole tool call (R5.2) (#1840)
The test of a browser that exits before it's ready checked a 20 s stopwatch over the whole call, which also timed process startup and cleanup and failed under load. It now checks the error code and the exit diagnostic, which already tell the exit apart from the deadline.
2026-11-14 14:15:15 +07:00
Justin John 1ea701bce2 Stop a new Rust build before its first turn when Cargo isn't installed (R2.9) (#1846)
A new build whose stack needs a program this computer doesn't have now stops before the builder's first turn, saying what's missing and how to get it, instead of failing at its first check. The stacks in stacks.toml name their program (Cargo for Bevy and the Rust stacks). A project already in app/ and a build over SSH aren't checked (part of #1837).
2026-11-14 13:38:17 +07:00
Justin John 2f99163b1b Let OpenAI-style AIs be set to think harder, sent only once chosen (R2.9) (#1818)
The Effort setting in Settings → AI appeared only for the Claude API and Claude Code. OpenAI, OpenRouter, Gemini and OpenAI-compatible AIs now offer OpenAI's levels (none to xhigh), starting at default, which sends nothing; once a level is picked, requests carry reasoning_effort (OpenRouter: reasoning.effort), and craft-anything-cli ai effort lists and sets the same levels. Claude no longer accepts none or minimal. Refs #1813.
2026-11-14 12:20:31 +07:00
muraa-p 053a59a541 Record reading the roadmap from main, not the checked-out branch (#1836) (#1836)
A pitfall: the roadmap read on an old branch showed work main had already done as open. Read it from `origin/main`, and check the state of a PR a pending line names.
2026-11-14 11:57:27 +07:00
Justin John c196ac88e0 Say before a Just ask question is sent when the project's builder can't answer it (R2.2) (#1815)
Just ask goes only to an agent that can be held to reading; with any other builder (Codex, OpenCode) the question was sent and only then refused. With Just ask on, the ask box now says beforehand that this builder isn't asked questions and to ask with Claude Code or an AI with an API key, and Send keeps such a question in the box with the same reason. Refs #1695.
2026-11-14 11:49:13 +07:00
Justin John b85f118bf9 Say in a new website's README how to build and serve it outside the app (R2.9) (#1816) (#1816)
A website build only needs a build script, since Craft Anything serves the built folder itself, so outside the app nothing said how to run one (#1590). A new website's brief now asks the builder for an app/README.md saying which commands build it and which folder to serve with any static server; a person's own project isn't asked for it.
2026-11-14 11:35:19 +07:00
muraa-p c8e99b8bce Write a failure log when an API backend's model turn stops (#1835) (#1835)
A model turn on an API backend that stops after its fallbacks now writes a log to `logs/` in the config folder, as a failed agent CLI does: the backend, the server's message and code, and the fix. The error the person sees names the file.
2026-11-14 11:27:05 +07:00
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