Commit Graph
1162 Commits
Author SHA1 Message Date
Alex Joaquim Pereira f2b86778dd Bound the firmware PE carve by the optional header (R3.12) (#1898)
The firmware carver read a PE's header size and certificate directory at fixed offsets without checking the optional header's declared size, so a short header could borrow bytes after it, inflate the region and carve into the next embedded object. Those fields are now read only inside the declared optional header, and a header too short for its fixed fields gives no PE region.
2026-11-15 16:59:43 +07:00
scks1 1d8a3b4f60 Check the section-by-section signature hash against the test kit's own (R3.11) (#1051)
The hash of a signed Windows program is now checked against a second implementation: the test kit signs its fixtures with its own copy of the steps, covering gaps between sections, section order, data after the last section, sections that share bytes and 97 sections. A file that declares more sections than were read is refused instead of being hashed with some left out.
2026-11-15 16:52:18 +07:00
Alex Joaquim Pereira 2e7dfa5e34 Bound the .NET PE reader by the optional header (R3.12) (#1897)
The .NET reader read the data-directory count and the CLI directory at fixed offsets without checking the optional header's declared size, so a file whose header ended earlier could be read as a .NET assembly from section-table bytes, or refused with a misleading section error. It now reads those fields only inside the declared optional header and refuses a short one as truncated.
2026-11-15 16:22:57 +07:00
Justin John 6d80d99272 Drop a grouped -m from Aider's saved arguments too (R2.2) (#1895)
A saved message in a short-option group was still passed to Aider: -vm "old task" means -v -m "old task", so the saved task replaced the request in its file. A group of Aider's valueless flags (-v, -h) followed by m now loses the m and its message and keeps the other flags. Any other short option is kept whole.
2026-11-15 15:13:02 +07:00
Justin John 761f195df5 Check a stack's program for an API builder over SSH too (R2.9) (#1896)
A new build is stopped before its first turn when its stack's program (Cargo, for Rust) isn't on this computer, but the check was skipped for any backend with an SSH host. An API builder over SSH still builds on this computer, so it found the missing program only after a whole turn. Only a coding agent over SSH, which builds on the other computer, skips the check now.
2026-11-15 15:04:23 +07:00
Justin John a5fa1cd739 Stop Ghidra's analysis when the project that started it is deleted (R1.5) (#1893)
In Deep mode a build starts Ghidra's one-time analysis on its own thread, and it kept running after its project was deleted, using a core and about 12 GB of memory until the app closed. The analysis now also stops once the project's record is known to be gone, checked on its existing polls. Pausing is unchanged, and a record that can't be read for a moment doesn't stop it. Fixes #948.
2026-11-15 14:08:51 +07:00
RRFZ 501e6b2da0 Read GraphQL and tRPC endpoints only from a URL's path (R3.12) (#1890)
A URL with no path has its first slash in the query or fragment, so https://auth.example.test?next=/graphql was read as a GraphQL endpoint; and a :// in a query made /api/graphql?next=https://x.test lose its path. A scheme now counts only before any /, ? or #, the host ends at the first of those, and run-time text in a partly literal URL ends neither.
2026-11-15 12:17:05 +07:00
RRFZ d821d01c35 Add numbers and read number literals by value in JavaScript constant text (R3.12) (#1889)
Text read through constants joined both sides of every + as written, so '/v' + (1 + 2) read as /v12 and '/w' + 0x10 as /w0x10, both marked literal. Two numbers now add, a number literal reads as JavaScript turns it into text (0x10 is 16), and a + whose sides are neither known text nor two numbers is no longer reported as literal.
2026-11-15 11:59:54 +07:00
Justin John 78a16be096 Keep a saved Aider --message from replacing the request in its file (R2.2) (#1884)
Aider handles a --message before it reads --message-file, so a --message saved in a backend's extra arguments ran instead of the person's request once the request went in a file. When the message is in a file, saved --message, --msg and -m arguments (and their joined forms) are now left out; other saved arguments are kept. With the message in argv nothing changes: it comes last and wins.
2026-11-15 11:35:38 +07:00
RRFZ 18aa351c73 Read a one-module webpack chunk only with a factory and webpack evidence (R3.12) (#1888)
A push of [[ids], {one property}] was read as a webpack chunk whatever the object held, so ordinary code such as queue.push([[1], { callback }]) became a webpack module and marked the file as bundled. A one-property object now counts only when the property is a module factory and the file names webpack or uses its chunk-global push.
2026-11-15 11:15:09 +07:00
RRFZ 5353f81948 Match export lists to function bindings, wherever the list is (R3.12) (#1887)
An export list marked functions exported by name among those seen so far: a list before the declaration marked nothing, and one after it marked every function of that name, nested ones included. Listed names are now resolved to bindings and matched to functions after the walk, whether the function was declared, initialised a variable or was assigned to one.
2026-11-15 11:15:03 +07:00
RRFZ fc22ad1fee Read .cts files as CommonJS and .mts files as ES modules (R3.12) (#1886)
.cts and .mts got the same source type as .ts, where the parser decides between module and script from the syntax, so their reported source kind could be wrong. As in Node and TypeScript, .cts is now always CommonJS and .mts always an ES module.
2026-11-15 11:14:56 +07:00
Rudy Mizrahi Celekli 63eaef1889 Show how to retry when project approvals refuse a builder action (R2.9) (#1848)
When Auto mode or a project's approval setting refuses an action, the build feed now names the kind and how to be asked next time, for example /approvals publish ask for a refused push. The refusal itself is unchanged. Repeated refusals of one kind share one notice, and the next build clears old notices.
2026-11-15 11:10:08 +07:00
Rudy Mizrahi Celekli b9a0f81d14 Let people set an AI backend's request rate in Settings (#1841)
An API backend's requests per minute could only be set by editing config.toml. Settings → AI now has a field for it on each API backend, and the CLI has ai request-rate <name> [n]; zero removes the limit. Agent apps send their own requests, so they have no such setting. The save runs on a worker through the hub's usual save path.
2026-11-15 11:06:55 +07:00
Justin John 76de31d925 Give Aider its message in a file, so a long one starts on Windows (R2.2) (#1883)
Aider got its whole message, brief included, as one --message argument, and a builder's brief can pass Windows' 32,767-character command line, so the run failed before Aider started. A run on this computer now writes the message to a private file in the temp folder, passes it with --message-file and removes it when the run is over. Over SSH, or when the file can't be written, the message still goes in --message. Refs #402.
2026-11-15 10:01:41 +07:00
FuryNocturnTV (Tare Fernandez) 5bd84b1b80 Ask OpenCode for its models once more when its plugins are still starting (R2.2) (#1882)
OpenCode's private server can answer the model check with a 503 ServiceUnavailableError while its plugins start, which stopped a question or build before it began. The check now asks once more after a two-second pause when that typed answer is what it got. Any other failure, a timeout or a stop isn't retried, and a second 503 is the error as before. For #1859.
2026-11-15 08:22:10 +07:00
FuryNocturnTV (Tare Fernandez) 47dff57f1d Say how to approve a tool Codex refused when setup doesn't approve it (R2.2) (#1881)
When codex exec refused one of our tools, the feed always said to run setup --client codex, which changes nothing for a tool setup doesn't approve, such as build_command_run. For those tools the message now says how to approve the tool in Codex's own config.toml; the setup hint stays for the tools setup approves. Fixes the wrong hint in #1867.
2026-11-15 08:16:23 +07:00
Nicolas Bohn 3c1926cd23 Save Unity sounds: a WAV for 16-bit PCM, else the FMOD bank (R3.9) (#1879)
game_unity_asset_export now takes AudioClips (Unity 5 and later). The sound is read from the .resource file beside the serialized file or inside the bundle, 256 MiB at most. A single 16-bit PCM sample in mono or stereo is saved as a WAV; anything else (Vorbis, ADPCM, a bank that isn't read) is saved as the FMOD bank it's stored in, with a limitation saying so. The output's extension is set to .wav or .fsb to match.
2026-11-15 05:54:21 +07:00
Steven Mathew 8c235c38f8 Resume Codex conversations across builder turns (R2.2) (#1872)
Codex started a fresh conversation on every turn. The adapter now continues the thread Codex reported (codex exec resume) on later turns and when a saved project is reopened, with the same model, sandbox and tool configuration and the prompt on stdin. A saved thread Codex no longer has is cleared and the next turn starts fresh. Codex's --ephemeral and --worktree options are refused before a run, since neither can continue a saved conversation.
2026-11-15 04:45:09 +07:00
Alex Joaquim Pereira 9b3676825f Count the remaining JavaScript nesting shapes (R3.12) (#1870)
Four shapes still estimated one or two levels and then overflowed the parser's stack: an else-if chain whose links end with ";", a class extends chain, a run of prefix ++, and brackets hidden in a false regex after an update operator or a member name. The estimate now counts each, and "/" after those tokens is read as division. A regex after yield is read only when it closes on the line; its brackets and operators are counted too, and a source where the regex and division readings can't be told apart takes the lexer fallback.
2026-11-15 02:08:28 +07:00
Alex Joaquim Pereira 58748a7463 Keep comparison analysis limitations (R3.12) (#1817)
app_graphs_compare and js_exports_compare dropped the analysis limitations of the graphs they compared (a malformed source map, a truncated inventory, dynamic IPC names), so a comparison read as complete when one side was partial. Each side's limitations, from a path or from saved js_app_map evidence, now go into the comparison's evidence labelled left: or right:.
2026-11-14 23:34:18 +07:00
muraa-p 66da5c38e6 Count a program reached through a symlinked PATH folder once in doctor (#1866)
doctor compared the paths of craft-anything-cli on PATH as text, so a PATH folder that links to another (/bin -> /usr/bin) looked like a second installed copy. It now compares where the paths really lead and keeps the first spelling for the message. Helps with #1550.
2026-11-14 23:30:30 +07:00
Alex Joaquim Pereira f8f1207fae Report complete native string reference counts (R3.12) (#1797)
native_strings_find listed at most 32 references per matching string with no count or flag. Each match now carries its complete reference_count and a references_capped flag, and a search with a cut list adds a references_capped limitation.
2026-11-14 23:05:27 +07:00
RRFZ 50fafd176c Bound the text JavaScript facts read through constants (R3.12) (#1864)
Concatenating a constant with itself doubled its text with each declaration, so a file under 1 KB could ask for gigabytes. Text built from several parts is now at most 4 KiB, and all constants in a file share a budget of the source's size plus 1 MiB; longer text reads as not literal. A redeclared name drops its earlier value once the new initializer has been read.
2026-11-14 22:46:49 +07:00
RRFZ 5d8ef28f5b Count call chains and label runs in the JavaScript nesting estimate (R3.12) (#1863)
Calls, index reads and tagged templates that follow one another, and labels in a row, each nest the syntax tree one level, but the estimate stayed flat, so a source with millions of links was sent to the parser and overflowed its stack. The estimate now counts each link, keeps the count across a closed bracket the expression goes on after, and skips comments. The tokenizer also treats JavaScript's non-ASCII spaces and the vertical tab as whitespace.
2026-11-14 22:46:41 +07:00
BFlat d30b610ea5 One design system for the desktop app: a shared scale and one set of controls on every screen (R2.9) (#1862) 2026-11-14 22:37:49 +07:00
muraa-p d3bb9ad455 Say when a light pin had to copy what it meant to share (R2.10) (#220)
A light pin hard-links dependencies and media from the project and copies a file it can't link (a drive without hard links, a file at its link limit). That fallback was silent, so the pin just looked bigger. Pins now record `copied_shared_bytes`, and the app says how much was copied instead of shared. Older pins read it as zero.
2026-11-14 17:06:12 +07:00
muraa-p c204d3ea18 Let a project's builder be chosen from the CLI and MCP (#1833)
`project_builder_set` chooses the AI that builds a project's later changes by an enabled backend's name, `default` gives it back to the app's own choice, and with no name it says which is chosen and which builds now. A name that is off or unknown is refused before anything is saved. It runs in Clean room, since it never looks at the target. The project page's own control is still open (R2.9).
2026-11-14 16:32:33 +07:00
muraa-p 3394cad58f Record a website's traffic in Deep mode and tell the builder about the stand-in backend (#1838)
A Deep website study now records the start page's requests and answers to `capture/original.har` (bodies within their cap, credential headers and declared secrets left out as in every capture; a failure is noted in how-it-works.md, not fatal). When that recording is there, the brief tells the builder that `web_standin_build` and `web_standin_start` can serve those answers to its own front end. Clean room is unchanged. Starting a stand-in automatically stays open (R3.11).
2026-11-14 16:30:07 +07:00
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