Commit Graph
133 Commits
Author SHA1 Message Date
Justin John c7606c4551 Stop a private browser and delete its profile when the app ends without closing it (R2.9, #810) (#1376)
A private browser or driven Electron app was stopped only when its process handle was dropped, which a crash, a kill, a force quit or an MCP server stopped by its client never does, so the browser was left running and its profile stayed in the temp folder. On Unix a small watcher now stops the browser's process group and deletes its `craft-*` profile once the app is gone, and ends by itself as soon as the browser does. Windows children are held by a Job Object; whether one outlives an abrupt exit is left as a roadmap line.

Refs #810
2026-11-09 22:51:21 +07:00
Afloat 234b5dc968 Extract Bun modules' stored source maps and bytecode (R3.11) (#1321)
A Bun program's modules can carry a stored source map and bytecode, which were only counted in a note. They're now listed and extracted as their own members, in a folder whose name doesn't clash with the program's own files.
2026-11-09 20:12:32 +08:00
Afloat a689a4e5d1 Show the size of copied pinned builds in Settings (R2.10) (#1320)
The pin list now reports how many bytes its copied pins take, and Settings shows that total next to the pinned builds.
2026-11-09 20:12:27 +08:00
Tanish Manku 5870bcebed Keep a check that worked while nothing it looks at changes, so an unchanged build isn't built and started again (R2.9) (#1296)
A check round in which every check worked is kept, and the next check reuses its results while nothing it looked at has changed: the app's files, the reference and capture files, the kind, stack and mode, the plugin checks and the project's folder. So a prompt that changes nothing in app/ no longer builds and starts the app again, and the check after the builder's turn doesn't repeat its own check. The feed says when results stand. A round with any failure is never kept, so Try again always looks again; the kept round is saved in the build progress.
2026-11-09 17:47:23 +08:00
Roman Serikoff e440907a93 Play Python packages and built Java jars (R2.7) (#1209)
Play, screenshots and self-tests start a Python project's one package with a __main__.py as python3 -m <name>, and a Maven or Gradle project's one runnable jar (its manifest names a Main-Class, read without loading the jar) with java -jar. Maven now builds with package, so the jar exists after our own build.
2026-11-09 03:03:45 +08:00
Alex Joaquim Pereira 0e7e43f418 Record a builder session's mode so Clean room never resumes a Deep one (R2.9) (#1202)
craft.json keeps the mode a builder's saved session ran in (version 4, with a migration that counts an older saved session as Deep). A build or question resumes a session only in the mode it was saved in, so Clean room never continues one that may have read inside the original, and a Deep session is kept for a later Deep run.
2026-11-09 02:11:26 +08:00
BFlatandAfloat cb0bb9d8fa Bound format readers and resolve launch paths (#1217)
Source-map data URLs ignore their fragment, ZIP directories are told by their attributes, rejected ASAR names count toward the limit, a HAR with a UTF-8 BOM parses, .NET bundle members stay before the manifest, Play starts a Python project's one installed console script, and Godot and Electron get an absolute project path.

Supersedes #1140, #1141, #1142, #1143, #1144, #1145 and #1146.

Co-authored-by: Afloat <ShuffleMonkey@163.com>
2026-11-09 01:55:01 +08:00
NetterSilver 247c262e4f Skip WASM tools with invalid ids instead of panicking on truncate (#1174)
A WASM tool whose id would pass 64 bytes is skipped as invalid, instead of being cut, which could panic inside a multi-byte name.
2026-11-09 01:18:38 +08:00
NetterSilver 12e573c900 Fix ellipsis added to short multibyte script check messages (#1199)
A script check message is cut by characters, not bytes, so short text in multi-byte characters keeps no stray ellipsis.
2026-11-09 01:18:26 +08:00
NetterSilver f672d50f01 Keep adb's clipped text within its byte limit on multi-byte text (#1095)
clip() now cuts at the last character boundary at or below the limit, so a character that straddles it is dropped instead of going over.
2026-11-07 18:14:27 +08:00
Afloat 464935ef96 Launch Go apps with a single command package (R2.7) (#1092)
A Go project with no root main.go and exactly one cmd/<name>/main.go starts with go run ./cmd/<name> for Play, screenshots and self-tests.
2026-11-07 17:24:51 +08:00
Afloat 2a5845c64b Export Unity floating-point textures as PNG (R3.9) (#1088)
RHalf, RGHalf, RGBAHalf, RFloat, RGFloat and RGBAFloat textures now decode: RGB is treated as linear light and clipped, and NaN stays dark.
2026-11-07 16:36:59 +08:00
Tomáš Doubek c7bb13bd1d Bound combined macOS UI observation output (R5.6) (#1087)
A tree and screenshot that would pass the helper's 16 MiB output cap now fit: the tree is cut to a prefix and reported as truncated, keeping the image, and an image that cannot fit alone becomes a screenshot limitation.
2026-11-07 16:32:52 +08:00
Tomáš Doubek 248b671ddd Capture requested macOS window screenshots (R5.6) (#945)
`runtime_ui_read` with `screenshot: true` returns one on-screen window of the pid as a PNG on macOS 14+, restricted by `window_id` when given. Missing permission, a missing window or a failed capture is a limitation with partial coverage, and no permission dialog opens.

Fixes #248
2026-11-07 16:12:35 +08:00
BFlat b700e1deb4 Start the snap a launcher script hands over to, with a snap's profile (#1055)
Ubuntu's /usr/bin/chromium-browser is a script that hands over to the snap; the snap is now started directly, with a profile it can use, so a website build gets past Study.

Closes #1054.
2026-11-07 10:04:12 +08:00
Tanish Manku 315bb12174 A builder's command of several kinds needs each one allowed (R2.9) (#1034)
* A command of several kinds needs each allowed, and an inbox path split by quotes is still the inbox

* A Windows inbox path split by quotes is still the inbox

* A relative path into the inbox, from the project folder or app/, is a system change

* An inbox path written as a PowerShell parameter or with Bash escapes is still the inbox
2026-11-06 15:15:38 -07:00
Tanish Manku 915fe6366b A builder's shell command is checked with its quotes joined, and naming the agent marker counts too (#1033)
The check for the project's records reads a command with quotes and escapes taken out, as the shell joins them, and any mention of `CRAFT_ANYTHING_AGENT` counts as a system change. docs/claude-code.md says these raise the bar and aren't a wall.
2026-11-07 05:01:03 +08:00
Tanish Manku 3122cd1e6d Each project chooses what the builder's approvals get, per kind of action (#1022)
A project can allow, ask about or refuse each kind of builder action (web, commands, outside files, publishing, deletes outside the project, system changes, other tools); a kind it hasn't chosen follows Auto mode as before. `project_approvals_set` sets them, and an agent can only make a kind stricter, including through our CLI from its own shell. "Always" on a push, delete or system card allows that whole kind, and pushes are read word by word in every shell form.
2026-11-07 04:36:10 +08:00
adamsardo 1a694a9d2d Say when macOS Screen Recording blocks a window picture, and stop picturing the wrong window (#1025)
Without Screen Recording the capture is refused before the program starts, with where to allow it. The name fallback matches whole words and never the system's own windows, and a window that's late gets up to 10 more seconds.
2026-11-07 04:23:35 +08:00
BFlat 4390e97e60 Stop Ghidra when the app closes, and skip the analysis of an Electron program's runtime (#1007)
Closing the app stops analyses and waits for them to end. A Deep build no longer waits on Ghidra for an Electron program, whose logic is in `app.asar`.

Closes #946.
Closes #947.
2026-11-07 01:46:35 +08:00
BFlat 17e4200479 Build and run new projects through their toolchains (#1002)
New Python, Go and .NET projects build and launch through one catalogue shared by the build check, the screenshot and Play; a window is found through the program's descendants, then by name.
2026-11-07 01:21:01 +08:00
BFlat 31f6ae6539 List an edited-in-place project's own files (#996)
`build_files_list` defaults to the project folder for a project edited in place and hides our records from that listing; a listing of one of our folders shows what is in it.
2026-11-07 01:18:47 +08:00
BFlat fb8f304417 Say where a build command ran, give API-key builds their asset keys, and respect the macOS accessibility flag (#999)
`build_command_run` says where it ran and warns on `app/app/`. Runs load the saved asset keys. `runtime_ui_read` honours `accessibility: false`. Closes #923. Closes #307.\n\nCo-authored-by: SoldierPePe <ahmed.m.alnajjar1@gmail.com>\nCo-authored-by: justinjohn0306 <justinjohn0306@gmail.com>\nCo-authored-by: Tomáš Doubek <doubektomas16@gmail.com>
2026-11-07 00:54:21 +08:00
BFlat e0922f4ff4 Keep pasted picture names unique, create atomic-write temp files exclusively, and keep distinct replay samples (#995)
Pasted pictures get a counter in their name; atomic-write temp files are created exclusively and private from the start; stand-in replay samples keep differing response details.
2026-11-07 00:50:18 +08:00
Justin John a389ac0d68 Tell the builder what was asked in Just ask when the next message comes (#934)
The next "Change it" message tells the builder the latest five Just ask questions and answers, once, as background. Clean room only gets those asked in Clean room. Closes #857.
2026-11-07 00:29:41 +08:00
Justin John c858a61c8d Find browsers under their other Linux names, and say why one isn't found (#927)
Finds browsers under more Linux names and says why one is missing: a bad set path, or the Flatpak sandbox.
2026-11-07 00:29:35 +08:00
LIN ZHANG 9fc397e515 Mark open plan steps as stopped when a run ends (#876)
A run that ends marks its open plan steps Stopped; the feed format moves to version 5.
2026-11-07 00:29:22 +08:00
60409b684c More format parsers keep to their declared lengths and refuse impossible values (#986)
Network captures, ZIP, Unity, Unreal, Python, pixel, tensor, Mach-O, code signature, PE, Go, .NET, ELF and DOS readers keep to their declared lengths and refuse impossible values. Trailing padding in a ZIP entry's extra field is no longer an error. Closes #974.

Co-authored-by: Afloat <ShuffleMonkey@163.com>
Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
2026-11-07 00:10:42 +08:00
mavericzz ba91c9fbf9 Report a denied macOS Accessibility permission as an error (#887)
A denied permission is a `no_permission` error instead of "read 0 nodes". Closes #240.
2026-11-07 00:06:58 +08:00
Afloat ccfb5d48fc Stabilize loopback request and cancellation fixtures (#767)
Loopback test fixtures read complete request headers, negative probes use port zero, and the stand-in's shutdown test checks its answerer's lifetime rather than a port another test may reuse.
2026-11-06 23:16:46 +08:00
Agapenor fc93bd091e Wait for browser shutdown before cleaning private profiles (#827)
Thanks @Agapenordev! Supervised browser hand-off now waits for process-group/Job Object shutdown, and private-profile removal retries transient locks for up to five seconds. Missing profiles count as already cleaned.

Reviewed source head 6e3398d28b. Hosted Ubuntu CI is green. On AnayPC, the applicable engine/platform tests, clippy, layers, locks, secrets and wasm checks pass. Two Windows UI-automation tests also fail on pristine main because the SSH session cannot create interactive WinForms windows; their baseline and candidate failures are preserved.

Related #810 remains open: this follow-up does not establish that the broader live macOS/Brave issue is fully resolved.
2026-11-05 18:46:31 +01:00
Agapenor f3efc1eb61 Delete private browser profiles when the browser closes (#822)
A browser or Electron app we launch gets its private profile folder removed when it closes or fails to start, after its process is stopped; a removal that fails is logged. Refs #810.
2026-11-04 20:32:06 +07:00
BFlatandFábio Soares cb395ee2c6 Let people fold the builder's plan card away, and keep the fold (#790)
The builder's plan card can be folded away, and the fold is kept in the project's feed until the builder makes a new plan (refs #504).

Supersedes #779.

Co-authored-by: Fábio Soares <fabiodev1123@gmail.com>
2026-11-04 16:01:37 +07:00
BFlatandFábio Soares 1fbff715b5 Stop a build whose checks never find a working build, across Try again (#782)
A build whose checks keep finding no working build stops after 10 in a row, across Try again presses, until a new request starts the count again (kept in craft.json as not_working_checks), and with app/ empty the builder is asked to write the project and show its build's output instead of fixing a build that doesn't exist (refs #736).

Supersedes #776.

Co-authored-by: Fábio Soares <fabiodev1123@gmail.com>
2026-11-04 10:58:49 +07:00
BFlat 0356c4bc88 Find Flatpak browsers on Linux and give sandboxed browsers a profile they can reach (#759)
Chrome, Brave, Chromium and Edge installed as Flatpaks on Linux are found, and a Flatpak or Snap browser keeps its private profile in the home folder its sandbox shares, so it can start and its port can be read (fixes #747).
2026-11-04 10:31:11 +07:00
Afloat eab6a0f01b Address the parser review findings from #722 (#766)
Parser follow-ups to #722: Java reference searches keep earlier hits and report partial coverage, DEX signed LEB128 takes at most five bytes, legacy AAPT long strings recover within a shared budget, and ext indirect metadata is read within bounds.
2026-11-04 10:30:57 +07:00
Aek 42f459ccf9 Check a person's own project by its own build and tests, in any language (#760)
A person's own project, edited in place with nothing to recreate, is checked by its own build and then its own tests, in any language a toolchain table knows (Rust, Node.js, Python, Go, .NET, Maven, Gradle, Make), instead of the checks made for a recreation (no --screenshot option, self-test or MECHANICS.md added to their code). A project with no tests, or one Craft Anything doesn't know how to build, isn't a failure and the note says so.
2026-11-04 09:55:48 +07:00
Aek 7a0d7de0e4 Keep what a project edited in place is built with, read from its own files (#755)
A project edited in place (Work on my project, or rebuild --existing edit) keeps the stack its own files use (an engine's project file, then Cargo.toml or package.json dependencies, then other project files), unless the request names another; a Godot folder no longer gets Unity from a request that reads as a game.
2026-11-04 08:46:52 +07:00
BFlat 7eee1fd13f The pasted-picture test passes when its pastes share a millisecond (#761)
The pasted-picture test accepts a third paste that lands in the same millisecond as the first and takes its freed name, and checks the first paste's content is gone. Test only.
2026-11-04 08:46:46 +07:00
Alex Joaquim Pereira 801f060368 Refuse pictures over 20 MB when they are added (#720)
A picture over 20 MB is refused when it is added (prompt box, drag and drop, Make's picker) with a message, and copy_pictures refuses the whole list before copying anything, instead of dropping it silently when the message is sent.
2026-11-04 02:13:10 +07:00
Ryan Missel 87174476d9 Add Copilot CLI support and shared agent investigations (#455)
GitHub Copilot CLI can be a coding agent over ACP, with its models chosen through the shared agent model catalogue; options that could bypass the app's tool restrictions are refused, and agents share investigation findings safely.
2026-11-04 00:29:11 +07:00
BFlatandsamurai b79fc506e2 Auto mode deletes inside projects whose path has capitals, and reads quoted paths with spaces whole (#682)
Auto mode's delete check compares paths as written and reads quoted or escaped paths with spaces as one argument, so it neither refuses deletes inside a project with capitals in its path nor lets a delete of the folder beside the project through. Replays #357.

Co-authored-by: samurai <samuraideng@gmail.com>
2026-11-03 23:24:57 +07:00
Afloat 2122a619e9 Verify stand-in session cleanup by answerer lifetime (#677)
The stand-in session cleanup test checks that the answerer is released instead of reconnecting to a port another listener may reuse.
2026-11-03 23:14:18 +07:00
Max Mittelstädt 2920a7c40f Restrict Claude Code tools and require approval for unknown tools (#637)
Claude Code chats get no built-in tools and builders an explicit list (commands, files, search, todos), so tools that message other sessions, publish or schedule work never start; in Auto mode a tool without an approval rule is refused (fixes #635).
2026-11-03 22:01:45 +07:00
BFlatandFábio Soares 9fd46b818b Builder limits, OpenRouter tools, a software-renderer fallback, calmer spinners, lean local builders, lldb calls and LM Studio ports (#657)
Replays #576, #577, #581, #589, #624, #625 and #628. Builder steps stop after 25 failed builds in a row, OpenRouter tool requests ask for a provider that supports tools, a start that never opened a window draws in software next time, spinners stop redrawing every frame, local builders get a lean tool list, lldb call observation works and reports failures, and LM Studio is found on other ports.

Co-authored-by: Fábio Soares <fabiodev1123@gmail.com>
2026-11-03 21:16:34 +07:00
YoSiem ad5cd81b6a Paste pictures into the prompt box with Ctrl+V and show attachments as picture tiles (#631)
Pictures can be pasted into the prompt box with Ctrl+V (Cmd+V, Shift+Insert): a copied image is saved as a PNG in the person's own cache folder and attached, copied picture files are attached as they are, and attachments show as picture tiles.
2026-11-03 20:50:05 +07:00
Max Mittelstädt 99bfba88bf Restore originals from long inline source maps (#368)
JavaScript analysis reads a source map comment from the last eight lines of the whole script and keeps its full URL, so originals are restored from large inline source maps.
2026-11-03 20:41:02 +07:00
Ole Bohmbach 472d061921 Keep build tools and approvals from following links out of the project (#623)
Builder file tools and the approval policy follow links the way the file system does, so a symlink or junction inside a project can't lead a builder's read or write outside it (CWE-59); build_files_list shows links without walking into them.
2026-11-03 20:19:16 +07:00
Ole Bohmbach 521947899d Copy only the scripts a web script export can write (#587)
web_scripts_save copies only the scripts that fit its max_scripts and max_bytes; scripts past them are listed by URL only, so a large or hostile capture costs no more than the export's own limits.
2026-11-03 20:19:03 +07:00
Matthias Bodsch 1d66a6ba4b Choose OpenCode models and thinking depth locally or over SSH (#413)
OpenCode can be chosen as a coding agent locally or over SSH, with the chat models its installation offers and the thinking depths each supports.
2026-11-03 19:53:16 +07:00