Commit Graph
761 Commits
Author SHA1 Message Date
Alex Joaquim Pereira 6571238784 Accept only string or number MCP progress tokens (R2.2) (#1899)
The MCP server sent progress notifications whenever a call carried a progressToken field, whatever it held. MCP's token is a string or a number, so a null, object, array or boolean now gets no progress notifications; a valid token still gets them, before the response.
2026-11-15 17:28:49 +07:00
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 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
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 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
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
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 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
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
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
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
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
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
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
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
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
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