Commit Graph
79 Commits
Author SHA1 Message Date
Fadlalla-ai 607d66bba1 Keep the Ghidra lookup test from finding a Ghidra installed on the computer 2026-11-16 18:52:34 +04:00
Fadlalla-ai 5494902239 Look Ghidra up once for Settings → Engines, not on every frame 2026-11-16 18:31:50 +04:00
Justin John 997b89ce4c Keep Settings → AI's tool list from showing an older choice (R5.4) (#1950)
Each change to an AI's tool list runs as its own job, and jobs can finish in any order, so two quick changes could leave Settings showing the first while the second was saved. The row now waits for its save, as the request-rate row does. Also escapes the `|` characters that split the STATUS table row.
2026-11-16 20:52:04 +07:00
Justin John a897fff072 Choose each AI's builder tool list in Settings → AI and with ai tools (R5.4) (#1946)
An API backend's `tools` setting (auto, lean or full) could only be changed by editing config.toml. Settings → AI now has a "Builder's tools" choice per API backend, with a caption saying what Auto works out to for that AI, and `ai tools <name> [auto|lean|full]` shows or sets it from the CLI. Auto is saved as no setting; agent apps are refused, as they choose their own tools.
2026-11-16 19:41:14 +07:00
Trần Quang Đãng 9460af211f Let Claude Code use the model its own settings name by default (#921)
* Let Claude Code use the model its own settings name by default

Claude Code runs are no longer passed a hardcoded --model: with no choice
saved, the agent uses whatever its own settings name (a custom model, an
alias, opusplan…), and `ai model --default` clears a saved override back
to that. The Settings → AI picker lists "Default (its own settings)" first
for Claude Code (saved as `claude-code` or `claude`), choosing it clears
the saved model, and the typed "Another model" field is gone since the
list carries the choice. effort_levels detects Claude Code by adapter id
so the `claude` agent id gets every effort level too.

* Translate "Default (its own settings)" in the remaining eight catalogs

The i18n gate requires every catalog to carry the same key set; the
first commit only added the new picker label to six of them.
2026-11-16 08:59:20 +01:00
Herwin bd405ceeb5 Study websites behind a login: save a sign-in you make in a browser window and reuse it (R2.9) (#1459)
Addresses #1178 (which also consolidates #1277).

## The problem

The website study a build starts with opens a fresh private browser, so a web app behind a login is studied as its sign-in or landing page, and the builder then builds a sign-in page.

## What this adds

- **`web_site_sign_in { url }`** opens a visible browser window on the site. The person signs in there themselves and closes the window. The browser's profile is then saved in Craft Anything's own folder, keyed by the site's host and port. Craft Anything never sees or stores a password and still never reads cookie or storage values.
- **`web_site_open`** uses a saved sign-in for that exact host and port when there is one, by copying it into the usual temporary profile (headless as before, deleted afterwards). `signed_in: false` forces the private profile; `signed_in: true` with nothing saved is a clear error naming the sign-in tool. Nothing else about the private path changes.
- **`web_site_sign_out { url }`** forgets a saved sign-in.
- **A check right after saving.** The sign-in tool reopens the site headless exactly as a later study will, and reports whether it still looks like a sign-in page, plus a screenshot kept in the site's owner-only folder (path, hash and size are returned, not the picture, so the person's account screen is not sent to an agent).
- **Typed facts through to the builder.** `signed_in`, `signed_in_site` and `sign_in_page` are in the open result, the capture result and `capture.json`. The website briefs tell the builder the capture is the signed-in view only when it is signed in and does not look like a sign-in page. A not-signed-in capture with a password field says how to sign in; a signed-in one says the sign-in may have ended.
- The check phase opens the built site with `signed_in: false`.

Because a study already starts with `web_site_open`, a normal build of that site is signed in after one `web_site_sign_in`, with no new build option.

## Decisions for maintainers

These are policy calls I made so the change is usable; each is small to reverse.

1. **Clean room allows the two tools** (two lines in `clean_room.rs`). Reasoning: the person signing in as themselves and looking at pages is watching from outside, as a user would; `visitor_view()` strips exactly what it did before.
2. **A saved sign-in is used by default** for later opens of that site, until `web_site_sign_out`. Saving it is treated as the consent, and the tool text and evidence say so. The alternative is opt-in per study, which needs an option in the Make screen and `rebuild`.
3. **Restricted MCP mode refuses both tools even with `--allow-web`**, since sign-in opens a window on the person's desktop.
4. The saved profile sits on disk (owner-only on Unix; on Windows it relies on the per-user config folder). On Linux it is launched with the basic password store so the visible and headless launches can read the same cookies. The tool text says that anyone who can open the person's files could use the sign-in.

## Trade-offs and limits

- Needs a desktop: on a computer with no display the tool refuses at once with what to do instead.
- Sites that tie a sign-in to the browser, or expire it quickly, will capture signed out; the check after saving and the `sign_in_page` field say so.
- Session-only cookies are kept by setting the profile to continue where it left off; restored tabs are not copied.
- The saved profile can also hold single sign-on providers' sign-ins made in that window. It is used only when that exact host and port is opened.
- Screenshots and page text of a signed-in study contain the person's own account data; the evidence says so. Result URLs drop the query and fragment when a sign-in is used.
- Not in this PR (roadmap lines added under R2.9): a Make-screen button, showing the person the study's first screenshots to confirm before the builder starts, attaching to the person's running browser, refreshing a saved sign-in from a capture, and a live run on a real site and with the Snap browser.

## What was verified

Run locally on Linux (x86-64), on the branch before its final rebase onto `main` (the rebase was clean; after it: `cargo fmt --all --check`, `cargo xtask layers`, `locks`, `secrets`, `tools --check`, `i18n-coverage` pass):

- `cargo test -p craft-anything-engine` (583 passed, 12 ignored), `-p craft-anything-mcp` (22), `-p craft-anything-ai` (580, 3 ignored).
- `cargo clippy -p <crate> --all-targets -- -D warnings` for engine, mcp and ai.
- **Live, with Chromium 157 under a virtual display against a local test site** (the new `#[ignore]` tests in `site_sign_in/tests.rs`; a helper plays the person over the browser's own debugging port and closes the window):
  - a sign-in made in the visible window is seen by a later headless open and capture, including an HttpOnly cookie and a session-only cookie (removing the continue-where-you-left-off setting makes that assertion fail, so the setting is what keeps it);
  - `signed_in: false` and a signed-out site show the signed-out page with the private-profile limitation;
  - a site that forgets the cookie is reported as still a sign-in page by the check after saving;
  - two overlapping signed-in opens both work and leave the saved sign-in byte-identical;
  - the timeout path stops the browser, keeps what was saved and leaves no process behind;
  - with no display the tool refuses immediately.
  - The two existing live website tests still pass.

**Not verified:** a real third-party site; a confined Snap or Flatpak browser (reasoned from the existing profile-location code, not run); Windows and macOS behaviour, including the browser-exit signal (the profile lock going away) and cookie decryption there; the workspace-wide `cargo xtask ci` steps and `--features wasm-plugins` (not enough disk locally, so CI is the first run of those); how the egui app shows the new tools.

An independent review pass was done before opening; its findings (copying only after the browser has exited, not treating one slow probe as a closed window, a whole-or-nothing replacement of the saved profile, reserved Windows names in site keys, owner-only permissions) are fixed in the later commits.
2026-11-15 17:28:04 +01: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 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
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
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
Dylan M. Taylor 5b3f1d818f Add Help > Check for Updates and bump to 0.6.1 (#1706)
* feat(updates): add manual release checks and verified native updates

* chore: bump version to 0.6.1

* fix(flatpak): honor the launcher version choices

* fix(updates): report restart outcomes without UI process side effects

* fix(i18n): translate updater controls in the complete catalogs

* test: document native updater startup as UI plumbing
2026-11-11 19:43:41 -05:00
The viewer 3483d7cc6e Keep build activity visible with long waiting notes (R2.9) (#1587)
A long follow-up pasted into the prompt box during a build made its waiting note taller than the window: the note was drawn outside the conversation's scroll area, so it pushed the prompt box off screen and left no room for the live activity. Waiting notes now sit inside the conversation's scroll area, above the live activity, with their Take back and Send now controls scrolling with them. Up arrow still brings back the last waiting note. A smoke test checks a 160-line note in a 600-point window.
2026-11-11 06:27:16 +07:00
ISTAARI 923c139eb1 Keep the Detect button clear of the Harnesses tab (R2.9) (#1530)
In Settings → AI the "Found on this computer" caption, the Providers and Harnesses tabs and the Detect button shared one row, with Detect pinned to the right, so at narrower widths it covered the Harnesses tab (#1519). The caption now sits on its own line, and the tabs and Detect share one spacing and wrap together. A smoke test checks both modes, empty and populated lists, and widths of 760, 900 and 1280 points, and that the Harnesses tab can still be chosen.
2026-11-11 00:31:16 +07:00
Alex Joaquim Pereira ca6f2f9695 Don't let a key save outlive the backend it belongs to (R5.5) (#1495)
A key save still in flight could write the key back after the backend's removal had deleted its key and configuration, leaving an orphan key that a backend re-added under the same name would silently use. Saving or forgetting a key and removing a backend now take turns, so a save that comes after a remove fails, and Settings keeps a backend's remove button disabled while its key is being saved or forgotten.
2026-11-10 21:40:47 +07:00
Alex Joaquim Pereira 16f05f6f2b Scroll the AI settings page in the add-by-address smoke test (#1492)
The key row #1486 added for every API backend pushed the add-by-address form's Add button below the AI settings page's visible area, so the test's click could land outside it and the test failed now and then. It now scrolls the page first, as a person would.
2026-11-10 21:09:22 +07:00
Alex Joaquim Pereira 6db3a29665 Replace a saved API key from Settings and the CLI (R5.5) (#1486)
A key saved in the app silently wins over the one in the environment, so a rotated key stayed hidden behind the old one unless the backend was removed or the keychain edited by hand. Settings → AI now shows for every API backend whether a key is saved; a saved one can be forgotten, so the environment's is used again, and a new one saved in its place, without removing the backend. The CLI does the same with ai key <name> (--key-env, --key-stdin or --forget), and never prints the key. A new key is read back after saving, and a forget that a locked or failing keychain can't confirm says so instead of reporting success.

Refs #1358
2026-11-10 20:09:44 +07:00
FuryNocturnTV (Tare Fernandez) 62187d5663 Say in Settings when a saved agent program is gone (R2.2) (#1468)
When a coding agent's saved program had gone (an update moved it), another program ran in its place with nothing in Settings saying so. Settings → AI now says under the agent's program that it isn't there any more and which program runs in its place, read on the worker that loads the AI list, and offers "Use it" to save that program when it's a path of its own.

Refs #721
2026-11-10 17:45:03 +07:00
dbzx6r 133e29d619 Find bundled Codex on macOS and check an agent's sign-in (R2.2) (#1414)
Started from the Dock, the app has a short PATH, so a Codex installed inside the ChatGPT or Codex app wasn't found. It's now looked for in those apps' known bundle locations (never the app's own executable), after an explicit program and PATH. Testing a local coding agent in Settings → AI (or `ai test`) now also asks its adapter whether it's signed in, without sending a prompt, and Codex only gives sign-in advice for real authentication failures.
2026-11-10 01:28:29 +07:00
JG Tromp 59fded62c3 Call opening a folder the same everywhere, and shorten a game's folder path (R2.9) (#1243)
A pin's menu says "Open folder", as the project page does, for the same action. A game's chosen folder is shown like every other chosen folder: shortened, cut to fit its row and whole on hover, so a long path no longer widens the page.
2026-11-09 15:09:21 +08:00
JG Tromp 154a091184 Wrap a found AI's description beside its Add button (#1235)
In Settings → AI, a card for an AI found on this computer lays its buttons out first and wraps the name and reason in the width they leave, so a long reason no longer runs under the Add button.
2026-11-09 08:06:14 +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
BFlat 804a05510d Keep a big cost from painting over its caption (#1074)
When a cost and its caption do not fit on one row of the Progress panel, the value takes its own line.
2026-11-07 13:15:37 +08:00
Alex Joaquim Pereira 27985d1d2b Say which AI builds when a project's saved AI is turned off (#1066)
A saved AI that was turned off or removed no longer gets replaced silently: a notice says which AI builds instead, so a build can't quietly use one the person didn't choose.
2026-11-07 11:13:29 +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
kuseidos 97120dcc10 Don't offer to add a brain when the AI picked is turned off (#1019)
When the chosen AI can't start, its error is the answer: the built-in engines no longer reply and offer "Add a brain" as though no AI were set up.
2026-11-07 03:12:05 +08:00
BFlat 827fdb793d Try the next renderer after a Windows start that can't draw, and close the gaps in the Claude desktop hint (#1001)
A Windows start that can't draw moves on through DX12, WARP, Vulkan and OpenGL and keeps the one that works; a start still under way is not a failed one. The Claude desktop hint covers the SSH-only case and the Store package folder. Closes #794.
2026-11-07 01:11:26 +08:00
BFlat 5a65542b88 Keep macOS's own window buttons and frame (#994)
The Mac window keeps its native buttons and frame, the bar keeps its size when zoomed, and room is reserved for the buttons in full screen too.\n\nCo-authored-by: Sanket Dofe <dofesanket@gmail.com>
2026-11-07 00:51:57 +08:00
BFlat 7c158c77cd Add Spanish, Italian and Vietnamese to the app's languages (#990)
Three complete UI languages, in Settings and the coverage check; requests in them keep their project kind.\n\nCo-authored-by: Diego Valadez <49816124+kuseidos@users.noreply.github.com>\nCo-authored-by: Vincenzo Governali <vincigov99@gmail.com>\nCo-authored-by: d41sys <t.d.le1@tue.nl>
2026-11-07 00:21:42 +08:00
BFlat a3da53ad40 Put the switches under the prompt box on two lines when they don't fit (#989)
In a longer language or a narrow window the switches go one under the other, and the /btw hint shortens instead of overlapping. Closes #983.
2026-11-07 00:21:32 +08:00
Vallenn 843d56b031 Hide the home scrollbar when scrolling is not needed (#988)
New project keeps its column fixed while the scrollbar comes and goes, and hides it when there is nothing to scroll.
2026-11-07 00:20:45 +08:00
Justin John 4041784fcb Keep the Advanced console's status clear of its tabs when narrow (#984)
The status is one label that shortens, with the findings count first, so it no longer runs over the tabs.
2026-11-07 00:00:35 +08:00
Sanket Dofe 30ebeb8a24 Keep zoom between 50% and 200% (#908)
The app handles the zoom keys itself and keeps zoom inside 50% to 200% on 10% steps, and a zoom saved outside the range comes back inside it.
2026-11-07 00:00:26 +08:00
NetterSilver ffea6b7420 Truncate long app file names on the Make screen (#869)
A long file name is cut short, with the whole name on hover, so Start stays in the window. Closes #861.
2026-11-07 00:00:17 +08:00
Davit Matchakhelidze 2a4ac2c288 Add Georgian (ka) UI catalog (#775)
Adds Georgian (`ka`) to Settings > General > Language, with the same keys as the other catalogs, and adds it to the coverage check.
2026-11-06 23:51:00 +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
BFlat 12214281a2 Let people resize the plan above the prompt box, and keep the size (#829)
The builder's plan above the prompt box scrolls past 240 px instead of pushing the conversation away, and the divider above it sets that height: drag it, or Tab to it and press Up and Down; a double-click resets it. The height is kept across restarts. Fixes #826.
2026-11-04 21:18:06 +07:00
BFlatandsanketdofe b2d7e89ee8 Give the macOS app a menu bar with its actions (#804)
On macOS the system menu bar has the app's actions with the usual Mac shortcuts (Settings ⌘, · New project ⌘N · Open ⌘O · Command palette ⌘K · Quit ⌘Q, the Simple/Advanced and Clean room/Deep choices, and Help links to this repository), through muda. Other systems are unchanged.

Supersedes #791.

Co-authored-by: sanketdofe <46375884+sanketdofe@users.noreply.github.com>
2026-11-04 17:03:01 +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
BFlatandFuryNocturn b6f61d15ff Say when the Claude desktop app is installed but Claude Code isn't (#789)
When the Claude desktop app is installed but Claude Code isn't, the setup card and ai detect say so and how to install Claude Code (refs #259).

Supersedes #781.

Co-authored-by: FuryNocturn <28540819+FuryNocturn@users.noreply.github.com>
2026-11-04 12:58:46 +07:00
Fábio Soares 42f44257ae Keep long lines in the feed's tool work inside the window (#785)
Long lines in the feed's tool work stay inside the window: a tool-work row with no tool shows its note's first line, cut to fit, as its title, and the notes below wrap (refs #666).
2026-11-04 11:33:38 +07:00
Afloat 686f3429e1 Keep builder availability fixtures independent of live discovery (#773)
The missing-builder UI test marks discovery as already running, so a late real discovery can't replace the test's own results before it checks Start.
2026-11-04 10:05:52 +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
Alex Joaquim Pereira bae2cde305 Wait for picture checks before Send and Make Start (#724)
Send and Make's Start wait for the picture-size checks still running for their own destination, then go with the pictures, instead of leaving them for the next message or starting without them. A refused picture clears the wait, and editing Make meanwhile cancels the waiting Start.
2026-11-04 08:08:40 +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
BFlat 085b7029a5 Type in a model the list doesn't offer in Settings → AI (#730)
Settings → AI has an "Another model" field beside the model list, so a newer model, a variant such as opusplan, or one another harness serves can be chosen without the CLI (fixes #470).
2026-11-04 08:05:40 +07:00
ghzgod 447d1eb729 Add a model server by its address in the first run's AI step (#680)
The first run's AI step has the same "Add an AI by its address" form as Settings → AI, so a model server on another machine can be set up there.
2026-11-04 07:59:12 +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
kler d8915a5bbe Choose Claude Code's folder per AI, so each can use another account (#664)
Each Claude Code AI can have its own folder (CLAUDE_CONFIG_DIR) in Settings → AI or with craft-anything-cli ai folder, so each can use a different account; the sign-in check, runs and sessions use that folder.
2026-11-04 02:58:40 +07:00