Commit Graph
139 Commits
Author SHA1 Message Date
Afloat fdf958e443 Note non-minimal DER lengths in signatures and certificates (R3.12) (#1646)
The DER reader accepted redundant length encodings (a long form under 128, or a leading zero length byte) without saying so. Each element now records whether its length is minimal; certificate, CMS, Authenticode and certificate-chain views keep everything they read and add one note that an element is not strict DER, and signatures over those bytes are checked as before.
2026-11-11 17:26:06 +07:00
Afloat 25f6c0720d Warn about undefined Python bytecode header flags (R3.12) (#1595)
A modern .pyc header's flag word defines only its two low bits, and other bits were read without comment. Undefined bits are now reported as a header warning, while the invalidation mode, source fields and code are read from the defined bits as before, so a file from a future Python release that adds a flag stays readable. Legacy headers, which have a timestamp in that position, are unaffected.
2026-11-11 13:08:26 +07:00
FredApps 9a3eee4b95 Read the process list on FreeBSD: one ps -o per column (#1487)
POSIX makes everything after = in a ps -o argument the header, so FreeBSD's ps read pid=,ppid= as a single pid column headed ",ppid=". The process tree then had no parents, a runner's child window was never found there, and snapshot_finds_an_owned_child_on_this_host failed on every FreeBSD run since it was added.
2026-11-10 13:55:50 +01:00
김준호 c95d361218 Read a text source as text outside a build (R3.11) (#1480)
A text file outside a build (a script, Markdown, settings, a log) could only be searched byte by byte: the native tools refused it and build_file_read works only in a build. The new core_text_read (Deep mode) reads one as text, a page of lines at a time: UTF-8, or UTF-16 with a byte-order mark, invalid bytes shown as U+FFFD and counted, very long lines cut and named, and a file with zero bytes near its start refused as binary. Nothing is run.

Fixes #539
2026-11-10 18:13:09 +07:00
Justin John 1ce50d5005 Wait only 5 s for a program that was stopped, so a check's time limit and Pause always take effect (R5.3) (#1454)
When a run's time limit or a cancel fired, the program was stopped through a call that then waited for it with no limit (and on Windows for a job message the system doesn't promise to send), so a program that outlived its stop held the run past every deadline, Pause included. The program and whatever it started are still stopped, but the run now waits at most 5 seconds for them to be gone, then logs a warning and carries on.

Refs #1438
2026-11-10 11:45:08 +07:00
Tanish Manku a56e0cc3f7 Pace the jobs list's progress bar (R5.2) (#1440)
A job of unknown length drew its progress bar with egui's animated ProgressBar, which asks for a frame every frame, so the window redrew at the display's rate for as long as the job ran, even in the background (as the spinner did before #579). The jobs list now uses our own progress bar: filled to a known fraction with no frames asked for, or sweeping at the animation's pace (once a second in the background) when the fraction isn't known.
2026-11-10 10:27:07 +07:00
mytrade2909-design c813f6bec5 Stop waiting on a builder's process once its stream says it's done (#1426)
A coding agent's turn ended only when its process exited, so when Claude Code printed its final result and then kept running (a shutdown hook, logging), a finished build stayed on "Building" or "Pausing" for as long as the idle limit allowed, hours for a builder turn. The turn now ends a short grace (5 s) after the stream's own result, without being reported as stopped or failed; a deadline hit before any result still stops the turn as before.
2026-11-10 03:30:50 +07:00
Afloat 69e7f5773d Refuse incomplete tar engine installs after GNU metadata stops (#1394)
When a tar listing stopped at a GNU long name or link it refused (too long, or cut short), the engine installer still wrote the files listed before it and reported success, which could replace a working engine with part of one. The listing now says why it stopped, and the installer refuses such an archive before writing anything, with a plain-English error. An archive missing only its end marker still installs.
2026-11-09 23:34:38 +07:00
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
Fábio Soares a2d6f22975 Count each Claude Code turn's own cost, not the session's total (#1294)
Claude Code reports the whole session's running cost on every turn, and a build resumes the same session each turn, so adding each turn's figure made a long build's estimate grow far past what it cost. The last total of each session is now kept in the config folder, and a resumed turn counts only what it added; a new session's first turn counts its total, and a resumed or forked session with nothing kept counts nothing rather than an inflated figure.

Refs #1187
2026-11-09 19:33:02 +08:00
Thanh Nguyen 28cccdb998 Stop a build's check rounds from stalling silently (#1287)
A round of the builder's own checks now has a 30-minute limit, Pause is looked at before each check and stops a running build step, and every check is said as its own step ("Checking its work (2 of 4): …"), so a check that stalls names itself instead of holding the build for hours. The limit reaches the checks' own program runs, a step is refused before it starts once the round is past its limit or paused, a check that can't run is reported as not run with its reason, and a caught bug leaves the project at "Needs you" instead of "Checking". Real check rounds keep no limit. Addresses the stalls reported in #981 and #1198; a live Windows run is still to do.
2026-11-09 16:50:18 +08:00
Fábio Soares 2307e12df5 Keep one OpenCode Go session id per installation (#1293)
OpenCode Go backends that weren't added through Settings (from an older version, or found from an environment key) had no saved session id, so each run sent a new one. The app and the CLI now save one at startup for any OpenCode Go backend that has none, before any session lock is taken, and keep it across restarts. An OpenCode error that comes without a message now shows its name, HTTP status and the start of the response body instead of "no error details".

Refs #1225
2026-11-09 16:41:55 +08:00
Justin John 7bb67227c1 Ask OpenRouter again for an answer the key can afford when it refuses the full length (R5.5, #1213) (#1280)
With no `max_tokens`, OpenRouter holds a model's whole output limit against the key's credit, so a key that still had money was refused with 402 "can only afford N" before the model ran. On that refusal the request is now sent once more with the answer capped at what the key can afford, and the cap is kept for the conversation. A cap under 4,096 tokens, a repeat refusal and other providers stay a billing error as before.

Fixes #1213
2026-11-09 15:10:10 +08:00
Justin John 764aa37c3e Say Ollama's context is too small when it drops the request to fit, and don't retry it (R5.4, #1245) (#1276)
Ollama fits a prompt that is too long for its context by dropping the oldest messages; once the person's request is among them, a Qwen 3.8 model refuses what's left with 500 "no user query found in messages". That refusal is now reported as a context overflow, saying how to give the model a larger context or send less, and it is no longer retried, since the same request would be refused again. Other server errors are still retried.

Fixes #1245
2026-11-09 14:22:12 +08:00
Nathaniel Caldwell 22126eae77 Discover OpenCode's models with a private server (#1232)
OpenCode model discovery, which also runs before every OpenCode turn, now uses --standalone unless the person chose a --server. Plain opencode api started OpenCode's shared service, which resumes every unfinished session on the computer, in any project, and carries on with its commands.

Part of #1115.
2026-11-09 06:52:37 +08:00
Nathaniel Caldwell 309adc7fc2 Remove STATUS.md's doubled rows and opencode.md's doubled paragraph (#1226)
Five STATUS rows that merges had kept twice, with different updates in each copy, are now one row each, the most complete copy (OpenCode models and thinking now says once that SSH runs get the tools), and opencode.md loses its older doubled paragraph. A pitfall says how to merge a conflicting table row.
2026-11-09 04:41:22 +08:00
Nathaniel Caldwell 8826ce266f Read tool calls a model writes in Qwen's markup, and answer calls to tools it wasn't offered (R5.4) (#1173)
A reply in Qwen's <tool_call> markup that a server handed back as text is read as the calls it makes, with arguments typed from the tool's schema; a call to a tool the model wasn't offered gets a plain answer naming its tools, instead of ending the turn.
2026-11-09 01:57:47 +08:00
Nathaniel Caldwell f379a4ec3f Stop sending builders that can't see pictures to screenshots (R5.4) (#1159)
A builder in the API loop, which can't open pictures, is no longer sent to look at screenshots: every brief and check that pointed it at a picture tells it what to use instead (capture.json's layouts, the UI tree, or asking the person). Agent apps keep the picture wording.
2026-11-09 01:57:41 +08:00
Nathaniel Caldwell 4d95d6c1ba Stop the secrets check refusing the committer's own name (R5.2) (#1160)
Git's own author variables are no longer taken for secrets while the hook runs, so a claim that names its author passes; other AUTH-named variables are still checked, and a Unix home folder is listed once.
2026-11-09 01:44:12 +08:00
Roman Serikoff 26b68359cd Make the preview connection-limit test pass on macOS (R5.2) (#1207)
The test sets its read timeout while the connection is still open, as macOS refuses socket options on one it reset.
2026-11-09 01:39:34 +08:00
BFlat 4ddf72bc0a Keep the start guard tests from releasing each other's lock (#1097)
The two start guard tests share the process-wide held mark, so one's opened() could drop the other's lock mid-test and fail main now and then. They now take a shared test lock.
2026-11-07 19:12:43 +08:00
Alex Joaquim Pereira c9b81ff492 Tell a running build what was asked in Just ask (R2.9) (#1094)
A note sent while a build runs now carries the latest Just ask answers its mode may show, including through Claude Code's note hook, and they count as told only once the builder has them. A Clean room run never gets Deep answers.
2026-11-07 17:58:14 +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
gtxy27 ab0d0cbda9 Send DeepSeek Harness tasks through stdin (#1067)
The preamble and task go on stdin instead of the command line, so a multi-line or long task no longer fails in the Windows desktop app's batch launcher.
2026-11-07 11:46:54 +08:00
Tomáš Doubek 74176f2cbe Test watched descendant shutdown on every system (#1030)
The test that a stopped launch takes its descendants with it uses a parent and child started without a shell, so it runs the same on Unix and Windows, and a failed start still stops what it launched.
2026-11-07 05:37:27 +08:00
Tanish Manku 9017d51c19 Choose a project's approvals from a menu under the prompt box or with /approvals (#1026)
An Approvals menu beside the builder's-questions switch offers Default, Allow, Ask or Refuse for each kind of action, and `/approvals <kind> <choice>` does the same from the prompt box without sending anything to the builder.
2026-11-07 05:10:13 +08: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
Tomáš Doubek 05bd9e9e92 Resolve remote setup fixture utilities from the host path (#1020)
The remote setup test looks `mkdir`, `chmod` and `mv` up on the host instead of assuming `/bin`, which left dangling links where they live elsewhere.
2026-11-07 03:25:58 +08:00
+9 b186f01af1 Say how a batch of squash messages lost their co-authors, and credit them here (#1012)
The squash messages of #987, #990, #992, #993, #994, #995, #996, #997, #999, #1001, #1002, #1003 and #1004 carried their co-authors as plain text or lost them, so GitHub credited nobody. This commit names them.

Co-authored-by: Dev Maktuporia <devmaktuporia@gmail.com>
Co-authored-by: Diego Valadez <49816124+kuseidos@users.noreply.github.com>
Co-authored-by: Vincenzo Governali <vincigov99@gmail.com>
Co-authored-by: d41sys <t.d.le1@tue.nl>
Co-authored-by: monarchsofchaos004-gif <302326616+monarchsofchaos004-gif@users.noreply.github.com>
Co-authored-by: anoscetia <198573042+anoscetia@users.noreply.github.com>
Co-authored-by: 00xJ0 <56056764+00xJ0@users.noreply.github.com>
Co-authored-by: Sanket Dofe <dofesanket@gmail.com>
Co-authored-by: POJ <info@padmondjung.de>
Co-authored-by: Afloat <132809511+Afloat16@users.noreply.github.com>
Co-authored-by: SoldierPePe <ahmed.m.alnajjar1@gmail.com>
Co-authored-by: justinjohn0306 <justinjohn0306@gmail.com>
Co-authored-by: Tomáš Doubek <doubektomas16@gmail.com>
Co-authored-by: AlexJoaquimPereira <alexpereira1781@gmail.com>
Co-authored-by: FuryNocturn <28540819+FuryNocturn@users.noreply.github.com>
Co-authored-by: Aymen <jelassiaymen94@users.noreply.github.com>
Co-authored-by: jayzed80 <jzinkant@gmail.com>
Co-authored-by: Huyvux12 <Huyvux12@users.noreply.github.com>
2026-11-07 01:45:21 +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 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
BFlat 73fe0b661b Stop programs started alongside a console capture from holding it open (#997)
Program starts and console opens share one lock, and a timeout ends the whole process tree first.\n\nCo-authored-by: SoldierPePe <ahmed.m.alnajjar1@gmail.com>
2026-11-07 00:44:00 +08:00
SoldierPePe 826d3f640b Count cached tokens in usage.json (#958)
A turn's input now counts its cached tokens, so `usage.json` shows real totals.
2026-11-07 00:26:55 +08:00
Cleyson 6ec2888128 Find Node in nvm for Windows' folders and say when it's missing (#985)
On Windows with nvm and no version in use, npm shims such as `claude.cmd` find Node in nvm's version folders; if it's still missing the error names `node` and `nvm use`.
2026-11-07 00:08:09 +08:00
Justin John 8a587bc0b3 Start the Advanced console's prompt box at three lines (#979)
The console's prompt box starts tall enough to read, its panel can be dragged, and it no longer grows on its first frame. Closes #942.
2026-11-06 23:34:51 +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
advokat11 92109f08f9 Give native OpenCode runs the Craft Anything tools and show their tool calls (#800)
A run with an explicit OpenCode model or thinking choice used to be refused. The adapter now writes our MCP server to a temp config file named by OPENCODE_CONFIG and runs `opencode run --standalone`, and reads OpenCode V2's tool call ids so tool calls reach the feed. Runs over SSH still have no Craft Anything tools.
2026-11-06 23:16:39 +08:00
Afloat cf414ff4b9 Apply replay body limits after redaction (R3.11) (#717)
A website stand-in charges its per-body and total byte limits on the text it actually keeps after redaction, and drops repeated samples before charging them, so polling no longer uses up the budget. A cached 304 whose body was left out stays unavailable (R3.11).
2026-11-04 20:32:58 +07:00
Rares Cristea 1eb4d0afe0 Read a plugin's whole tools/list line, however long (#797)
An MCP plugin whose `tools/list` answer is one JSON-RPC line over 1 MiB never loaded: the process reader cut long lines into fragments that never parsed, so the plugin timed out. The partial-line cap is now the 16 MiB the MCP client already allows, with a regression test for a multi-megabyte line.
2026-11-04 19:29:24 +07:00
BFlat 282a4bca5c Start a program that was just written, instead of failing with Text file busy (#787)
A program whose file is busy (just written, still open for writing in a child another thread is starting, so Linux says Text file busy) is tried again for about 0.3 s before its start fails. Fixes flaky test failures and a start just after an agent's CLI updates.
2026-11-04 11:32:54 +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
Fábio Soares 41d2175e25 Say when app/ is empty in the build check and the stop message (#771)
When app/ is empty, a failed build check and the stop after two unchanged turns say the builder hasn't written the project (refs #736).
2026-11-04 10:06:23 +07:00
Tanish Manku 8cf29dfa08 The keep-awake helper ends by itself once the app it serves is gone (#762)
The keep-awake helper ends by itself once the app it serves is gone (Windows checks the process every 30 s, macOS uses caffeinate -w), so closing the window during a build no longer keeps the computer awake.
2026-11-04 10:06:18 +07:00
FuryNocturnTV (Tare Fernandez) 0fc381c206 Count Antigravity's second folder in the Windows search path test (#770)
The Windows search-path test counts Antigravity's second folder, added by #748.
2026-11-04 10:06:02 +07:00
Fábio Soares bbc06cb9c1 Start the window on Macs whose Metal compiler rejects the OS's shader version (#744)
The window opens on Macs whose Metal compiler rejects the shader language version wgpu takes from the macOS version: a patched wgpu-hal 30.0.1 (identical to the released crate except for this probe) compiles a tiny kernel with each version up to the OS's and keeps the first one accepted. A lost device on a Mac no longer points at the Windows-only software renderer setting (fixes #742).
2026-11-04 08:22:28 +07:00
Fábio Soares 7b5ce085a3 Find Ghidra in the folders people unzip it to, and don't download it again (#745)
Ghidra is found where people unzip it (Program Files, the home folder, Downloads, Desktop, /Applications, Homebrew's cask and the usual Linux folders), by folder name a set number of levels down, and the guided install uses a copy already on the computer instead of downloading it again (fixes #740).
2026-11-04 08:08:26 +07:00
Aek 66bda5607d Keep Make off the folder picked on Work on my project, and don't read an address in its request as an original (#750)
Leaving "Work on my project" forgets a folder it would edit in place, and a folder dialog that ends after leaving that door is dropped, so a version made on Make can't edit the person's own project. An address in that door's request stays part of the request instead of becoming an original to recreate. Follow-up to #686's review.
2026-11-04 08:05:51 +07:00
Tanish Manku bb66fa576a The pictures UI test waits for the worker that checks their sizes (#743) 2026-11-03 16:59:48 -07:00
BFlat fb7ac863a3 Pick the coding agents' tab before testing Add another (#732)
Fixes main: the account folder test picks the coding agents' tab of what Detect found before pressing Add another, which #687 moved there.
2026-11-04 03:36:43 +07:00