Skip to content

Craft Anything: understand how any software works, and craft your own.

Rust

Add a restricted MCP mode without the tools that act on the machine or reach the network (#1000)

BFlat025d66f86bca
diff --git a/apps/craft-anything-cli/src/main.rs b/apps/craft-anything-cli/src/main.rs
index b9c2df20..0c67b59c 100644
--- a/apps/craft-anything-cli/src/main.rs
+++ b/apps/craft-anything-cli/src/main.rs
@@ -57,6 +57,16 @@ pub enum Command {
/// List every tool instead of the Essentials plus enabled toolsets.
#[arg(long)]
all_tools: bool,
+ /// Run in restricted mode for shared hosts: turn off machine-acting tools,
+ /// and turn off web and capture tools by default.
+ #[arg(long)]
+ restricted: bool,
+ /// Turn on web tools (web_site_open) in restricted mode.
+ #[arg(long)]
+ allow_web: bool,
+ /// Turn on capture tools (web_site_capture, web_page_states_capture) in restricted mode.
+ #[arg(long)]
+ allow_capture: bool,
/// A folder where questions and approvals for the person are posted (`core_person_ask`,
/// `core_action_approve`); the Craft Anything app answers them.
#[arg(long)]
@@ -246,7 +256,7 @@ fn run(cli: Cli) -> u8 {
}
0
}
- Command::Mcp { all_tools, inbox, targets } => {
+ Command::Mcp { all_tools, restricted, allow_web, allow_capture, inbox, targets } => {
let engine = match make_engine(cli.project.as_deref(), cli.deep_for_run()) {
Ok(e) => e,
Err(e) => {
@@ -274,6 +284,9 @@ fn run(cli: Cli) -> u8 {
return 1;
}
opts.all_tools |= *all_tools;
+ opts.restricted |= *restricted;
+ opts.allow_web |= *allow_web;
+ opts.allow_capture |= *allow_capture;
opts.allow_run = cli.allow_run;
match craft_anything_mcp::serve_stdio(engine, opts) {
Ok(()) => 0,
diff --git a/apps/craft-anything-cli/tests/cli.rs b/apps/craft-anything-cli/tests/cli.rs
index ce440988..d192b35b 100644
--- a/apps/craft-anything-cli/tests/cli.rs
+++ b/apps/craft-anything-cli/tests/cli.rs
@@ -265,3 +265,44 @@ fn help_does_not_advise_a_report_format_option() {
assert!(!help.stdout_text().contains("(core-target-open, report"));
assert_eq!(cli(&["report", "--format", "html"], cfg.path()).code, Some(2));
}
+
+/// #855, #856: CLI mcp --restricted omits machine and web tools, and refuses web_site_open.
+#[test]
+fn mcp_restricted_mode_cli() {
+ let cfg = tempfile::tempdir().unwrap();
+ let input = [
+ json!({"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "t", "version": "0"}}}),
+ json!({"jsonrpc": "2.0", "method": "notifications/initialized"}),
+ json!({"jsonrpc": "2.0", "id": 2, "method": "tools/list"}),
+ json!({"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "web_site_open", "arguments": {"url": "https://example.com"}}}),
+ ]
+ .iter()
+ .map(|v| format!("{v}\n"))
+ .collect::<String>();
+
+ let out = Process::new(env!("CARGO_BIN_EXE_craft-anything-cli"))
+ .arg("mcp")
+ .arg("--restricted")
+ .arg("--all-tools")
+ .env("CRAFT_ANYTHING_CONFIG_DIR", cfg.path())
+ .stdin_bytes(input)
+ .timeout(Duration::from_secs(30))
+ .run()
+ .unwrap();
+ assert!(out.success, "{}", out.stderr_text());
+ let msgs: Vec<Value> = out.stdout_text().lines().map(|l| serde_json::from_str(l).unwrap()).collect();
+ let by_id = |id: u64| msgs.iter().find(|m| m["id"] == json!(id)).unwrap().clone();
+
+ // Tools list omits machine tools and web tools
+ let tools = by_id(2)["result"]["tools"].as_array().unwrap().clone();
+ assert!(!tools.iter().any(|t| t["name"] == "web_site_open"));
+ assert!(!tools.iter().any(|t| t["name"] == "web_site_capture"));
+ assert!(!tools.iter().any(|t| t["name"] == "build_command_run"));
+ assert!(tools.iter().any(|t| t["name"] == "core_session_show"));
+
+ // tools/call web_site_open is refused
+ let call_res = by_id(3)["result"].clone();
+ assert_eq!(call_res["isError"], true);
+ let err_obj: Value = serde_json::from_str(call_res["content"][0]["text"].as_str().unwrap()).unwrap();
+ assert!(err_obj["error"]["message"].as_str().unwrap().contains("turned off in restricted mode"));
+}
diff --git a/crates/mcp/src/lib.rs b/crates/mcp/src/lib.rs
index c6143127..03434a37 100644
--- a/crates/mcp/src/lib.rs
+++ b/crates/mcp/src/lib.rs
@@ -18,7 +18,7 @@
pub mod prompts;
use craft_anything_engine::tools::investigation_tools;
-use craft_anything_engine::{CallOptions, Caller, CancelToken, Consent, Engine, Progress, ToolOutput, Toolset};
+use craft_anything_engine::{CallOptions, Caller, CancelToken, Consent, Effects, Engine, Progress, ToolOutput, Toolset};
use craft_anything_evidence::{ErrorCode, ToolError, is_evidence_id};
use craft_anything_platform::sync::Mutex;
use serde_json::{Value, json};
@@ -58,26 +58,64 @@ pub struct ServerOptions {
pub all_tools: bool,
/// Treat every call as consented (the user started the server with `--allow-run`).
pub allow_run: bool,
+ /// Restricted mode for shared hosts (#855, #856): hide tools that act on the host machine,
+ /// and turn off web and capture tools unless explicitly allowed.
+ pub restricted: bool,
+ /// Allow tools that open or reach websites (`web_site_open`) in restricted mode.
+ pub allow_web: bool,
+ /// Allow website capture tools (`web_site_capture`, `web_page_states_capture`) in restricted mode.
+ pub allow_capture: bool,
pub max_response_bytes: usize,
/// Lower the budget for a client known to take less (Claude Code), from its name in
/// `initialize`. Off when the budget was set explicitly.
pub budget_for_client: bool,
}
+/// Tools that change the machine without an effect that says so.
+const ACTS_ON_MACHINE: [&str; 3] = ["plugins_add", "engines_install", "native_cutter_command_run"];
+
impl Default for ServerOptions {
fn default() -> Self {
- ServerOptions { all_tools: false, allow_run: false, max_response_bytes: DEFAULT_MAX_RESPONSE_BYTES, budget_for_client: true }
+ ServerOptions {
+ all_tools: false,
+ allow_run: false,
+ restricted: false,
+ allow_web: false,
+ allow_capture: false,
+ max_response_bytes: DEFAULT_MAX_RESPONSE_BYTES,
+ budget_for_client: true,
+ }
}
}
impl ServerOptions {
- /// Defaults plus `CRAFT_ANYTHING_MCP_ALL_TOOLS=1` and `CRAFT_ANYTHING_MCP_MAX_RESPONSE_BYTES`.
+ /// Defaults plus environment flags:
+ /// - `CRAFT_ANYTHING_MCP_ALL_TOOLS=1`
+ /// - `CRAFT_ANYTHING_MCP_RESTRICTED=1`
+ /// - `CRAFT_ANYTHING_MCP_ALLOW_WEB=1`
+ /// - `CRAFT_ANYTHING_MCP_ALLOW_CAPTURE=1`
+ /// - `CRAFT_ANYTHING_MCP_MAX_RESPONSE_BYTES`
pub fn from_env() -> Self {
+ Self::from_env_vars(|k| std::env::var(k).ok())
+ }
+
+ /// Parse options using a custom environment variable lookup function.
+ pub fn from_env_vars<F: Fn(&str) -> Option<String>>(lookup: F) -> Self {
let mut o = ServerOptions::default();
- if std::env::var("CRAFT_ANYTHING_MCP_ALL_TOOLS").is_ok_and(|v| v == "1" || v.eq_ignore_ascii_case("true")) {
+ let is_truthy = |k: &str| lookup(k).is_some_and(|v| v == "1" || v.eq_ignore_ascii_case("true"));
+ if is_truthy("CRAFT_ANYTHING_MCP_ALL_TOOLS") {
o.all_tools = true;
}
- if let Some(n) = std::env::var("CRAFT_ANYTHING_MCP_MAX_RESPONSE_BYTES").ok().and_then(|v| v.trim().parse::<usize>().ok()) {
+ if is_truthy("CRAFT_ANYTHING_MCP_RESTRICTED") {
+ o.restricted = true;
+ }
+ if is_truthy("CRAFT_ANYTHING_MCP_ALLOW_WEB") {
+ o.allow_web = true;
+ }
+ if is_truthy("CRAFT_ANYTHING_MCP_ALLOW_CAPTURE") {
+ o.allow_capture = true;
+ }
+ if let Some(n) = lookup("CRAFT_ANYTHING_MCP_MAX_RESPONSE_BYTES").and_then(|v| v.trim().parse::<usize>().ok()) {
o.max_response_bytes = n.max(MIN_MAX_RESPONSE_BYTES);
o.budget_for_client = false;
}
@@ -311,13 +349,44 @@ impl Server {
// ---- tools ----
+ /// In restricted mode, the refusal for `name` when it's off: tools that act on the machine or
+ /// reach the network, going by what each declares, not a list that can drift. Web and capture
+ /// tools have flags of their own (#855, #856).
+ fn restricted_refusal(&self, name: &str) -> Option<ToolError> {
+ if !self.opts.restricted {
+ return None;
+ }
+ let spec = self.engine.registry().get(self.engine.registry().canonical(name).unwrap_or(name))?;
+ let effects = spec.effects;
+ let web = spec.id.starts_with("web_") && effects.intersects(Effects::ACCESSES_NETWORK | Effects::LAUNCHES_PROCESS);
+ let capture = web && spec.id.contains("capture");
+ let (off, way_back) = if capture {
+ (!self.opts.allow_capture, "Start the MCP server with --allow-capture to turn capture tools on.")
+ } else if web {
+ (!self.opts.allow_web, "Start the MCP server with --allow-web to turn web tools on.")
+ } else {
+ let machine =
+ effects.needs_consent() || effects.contains(Effects::ACCESSES_NETWORK) || spec.id.starts_with("adb_") || ACTS_ON_MACHINE.contains(&spec.id);
+ (machine, "Start the MCP server without --restricted to allow tools that act on the machine.")
+ };
+ off.then(|| {
+ ToolError::new(craft_anything_evidence::ErrorCode::FeatureMissing, format!("{} is turned off in restricted mode.", spec.id))
+ .with_remediation(way_back)
+ .with_details(json!({"reason": "restricted_mode", "tool": spec.id}))
+ })
+ }
+
fn visible(&self, set: Toolset) -> bool {
self.opts.all_tools || self.enabled.lock().unwrap_or_else(PoisonError::into_inner).contains(&set)
}
/// Whether a tool is on this connection's list: its toolset is shown and, in Clean room, it's
- /// one Clean room runs (the rest would only be refused).
+ /// one Clean room runs (the rest would only be refused). In restricted mode, tools that act on
+ /// the machine or reach the network without allowance are omitted.
fn listed(&self, s: &craft_anything_engine::ToolSpec, clean: bool) -> bool {
+ if self.restricted_refusal(s.id).is_some() {
+ return false;
+ }
self.visible(s.toolset) && (!clean || craft_anything_engine::clean_room::allows(s.id))
}
@@ -446,6 +515,9 @@ impl Server {
}
fn call_engine(&self, name: &str, args: Value, token: &CancelToken, progress_token: Option<&Value>, seq: Arc<AtomicU64>) -> Result<ToolOutput, ToolError> {
+ if let Some(err) = self.restricted_refusal(name) {
+ return Err(err);
+ }
// A tool from a toolset that isn't enabled yet: enable it rather than refusing.
if let Some(spec) = self.engine.registry().get(name)
&& !self.visible(spec.toolset)
@@ -541,7 +613,7 @@ impl Server {
/// The tool declares that its results carry content from the target.
fn carries_target_content(&self, name: &str) -> bool {
- self.engine.registry().get(name).is_some_and(|s| s.effects.contains(craft_anything_engine::Effects::CARRIES_TARGET_CONTENT))
+ self.engine.registry().get(name).is_some_and(|s| s.effects.contains(Effects::CARRIES_TARGET_CONTENT))
}
fn attach_provenance(&self, body: &mut Value, name: &str) {
diff --git a/crates/mcp/src/tests.rs b/crates/mcp/src/tests.rs
index 9f99c787..8e515f77 100644
--- a/crates/mcp/src/tests.rs
+++ b/crates/mcp/src/tests.rs
@@ -361,3 +361,111 @@ fn always_for_this_project_on_a_consent_card_is_remembered() {
// Another tool is still asked about.
assert_eq!(server.ask_consent("browser_other", "why", &cancelled), Some(false));
}
+
+/// #855, #856: In restricted mode, tools that act on the machine (build_command_run, plugins_add,
+/// engines_install, adb_*) and web/capture tools (web_site_open, web_site_capture,
+/// web_page_states_capture) are omitted from tools/list even when --all-tools is set.
+#[test]
+fn restricted_mode_omits_machine_and_web_tools() {
+ let opts = ServerOptions { restricted: true, all_tools: true, ..Default::default() };
+ let out = run_with(opts, &[req(1, "tools/list", json!({}))]);
+ let names = tool_names(&response(&out, 1));
+
+ // Machine-acting tools (#855) are absent
+ assert!(!names.contains(&"build_command_run".to_string()));
+ assert!(!names.contains(&"plugins_add".to_string()));
+ assert!(!names.contains(&"engines_install".to_string()));
+ assert!(!names.iter().any(|n| n.starts_with("adb_")));
+
+ // Web and capture tools (#856) are absent by default
+ assert!(!names.contains(&"web_site_open".to_string()));
+ assert!(!names.contains(&"web_site_capture".to_string()));
+ assert!(!names.contains(&"web_page_states_capture".to_string()));
+
+ // Tools no list named: what each declares keeps them off too.
+ for id in ["project_play", "web_browser_connect", "web_page_screenshot_take", "web_standin_start", "native_cutter_command_run"] {
+ assert!(!names.contains(&id.to_string()), "{id}");
+ }
+
+ // Safe core tools remain available
+ assert!(names.contains(&"core_session_show".to_string()));
+ assert!(names.contains(&"core_investigation_show".to_string()));
+}
+
+/// #855, #856: Calling turned-off tools in restricted mode returns a refusal stating they are off.
+#[test]
+fn restricted_mode_refuses_calling_turned_off_tools() {
+ let opts = ServerOptions { restricted: true, ..Default::default() };
+ let out = run_with(
+ opts,
+ &[
+ req(1, "tools/call", json!({"name": "web_site_open", "arguments": {"url": "https://example.com"}})),
+ req(2, "tools/call", json!({"name": "web_site_capture", "arguments": {}})),
+ req(3, "tools/call", json!({"name": "web_page_states_capture", "arguments": {}})),
+ req(4, "tools/call", json!({"name": "build_command_run", "arguments": {"command": "cargo build"}})),
+ req(5, "tools/call", json!({"name": "plugins_add", "arguments": {}})),
+ req(6, "tools/call", json!({"name": "engines_install", "arguments": {}})),
+ req(7, "tools/call", json!({"name": "adb_device_show", "arguments": {}})),
+ req(8, "tools/call", json!({"name": "mcp__craft-anything__web_site_open", "arguments": {}})),
+ req(9, "tools/call", json!({"name": "web-site-open", "arguments": {}})),
+ ],
+ );
+
+ for (id, tool_name) in [
+ (1, "web_site_open"),
+ (2, "web_site_capture"),
+ (3, "web_page_states_capture"),
+ (4, "build_command_run"),
+ (5, "plugins_add"),
+ (6, "engines_install"),
+ (7, "adb_device_show"),
+ (8, "web_site_open"),
+ (9, "web_site_open"),
+ ] {
+ let r = response(&out, id);
+ assert_eq!(r["result"]["isError"], true, "id {id} ({tool_name}) should be error");
+ let e: Value = serde_json::from_str(r["result"]["content"][0]["text"].as_str().unwrap()).unwrap();
+ assert_eq!(e["error"]["code"], "feature_missing");
+ let msg = e["error"]["message"].as_str().unwrap();
+ assert!(msg.contains("turned off in restricted mode"), "{msg}");
+ assert_eq!(e["error"]["details"]["reason"], "restricted_mode");
+ assert_eq!(e["error"]["details"]["tool"], tool_name);
+ }
+}
+
+/// #856: When the operator allows web or capture tools in restricted mode, they are visible and
+/// callable, while machine-acting tools remain off.
+#[test]
+fn restricted_mode_allows_web_and_capture_tools_when_operator_permits() {
+ // With allow_web
+ let opts = ServerOptions { restricted: true, all_tools: true, allow_web: true, ..Default::default() };
+ let out = run_with(opts, &[req(1, "tools/list", json!({}))]);
+ let names = tool_names(&response(&out, 1));
+ assert!(names.contains(&"web_site_open".to_string()));
+ assert!(!names.contains(&"web_site_capture".to_string()), "--allow-web is only for web tools");
+ assert!(!names.contains(&"web_page_states_capture".to_string()));
+ assert!(!names.contains(&"build_command_run".to_string()));
+ assert!(!names.iter().any(|n| n.starts_with("adb_")));
+
+ // With allow_capture
+ let opts_cap = ServerOptions { restricted: true, all_tools: true, allow_capture: true, ..Default::default() };
+ let out_cap = run_with(opts_cap, &[req(1, "tools/list", json!({}))]);
+ let names_cap = tool_names(&response(&out_cap, 1));
+ assert!(!names_cap.contains(&"web_site_open".to_string()), "--allow-capture is only for capture tools");
+ assert!(names_cap.contains(&"web_site_capture".to_string()));
+ assert!(names_cap.contains(&"web_page_states_capture".to_string()));
+ assert!(!names_cap.contains(&"build_command_run".to_string()));
+ assert!(!names_cap.iter().any(|n| n.starts_with("adb_")));
+}
+
+#[test]
+fn restricted_mode_server_options_from_env() {
+ let map = [("CRAFT_ANYTHING_MCP_RESTRICTED", "1"), ("CRAFT_ANYTHING_MCP_ALLOW_WEB", "true"), ("CRAFT_ANYTHING_MCP_ALLOW_CAPTURE", "1")]
+ .into_iter()
+ .collect::<std::collections::HashMap<_, _>>();
+
+ let opts = ServerOptions::from_env_vars(|k| map.get(k).map(|s| s.to_string()));
+ assert!(opts.restricted);
+ assert!(opts.allow_web);
+ assert!(opts.allow_capture);
+}
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index ea8c00af..416c8f6e 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -524,6 +524,7 @@ Owner: maintainers · Status: in progress
Files (through the Visual Studio Installer's `ProgramData` instance state or developer
environment variables, #669, [PR #726](https://github.com/storytold/craft-anything/pull/726))
— claimed: riyaz, branch `bugfix/r1.6-windows-vs-cpp-tools`
+- [x] Turn off web and capture tools by default in restricted MCP mode (#856, #855).
---
diff --git a/docs/STATUS.md b/docs/STATUS.md
index 7781f79e..a3c811e1 100644
--- a/docs/STATUS.md
+++ b/docs/STATUS.md
@@ -92,6 +92,8 @@ workspace clippy, layers, fmt and the secret scan of all history were clean. Chi
| Runtime assets in pinned builds | Frozen and light pins, size estimates and project copies keep runtime files in `obj` folders. An `obj` directory beside a regular C#, F# or Visual Basic project file is still recognised as compiler output; ambiguous folders are retained. New pins record the direct-launch program relative to the copy so a newer helper cannot replace it; older pins retain discovery behavior | Synthetic filesystem tests cover both pin modes, model bytes, compiler-output controls and project duplication. A Linux tool-level regression starts temporary scripts through `project_pin_open`, with a newer `Build/obj/helper`, and verifies the originally selected program and its output; a missing recorded program is refused. No real pinned application was launched for this correction |
| Desktop app | Simple mode: sidebar with New project and the project history (kept across restarts); New project makes something, works on a project the person already has (Work on my project: its folder's files are the app, edited in place without a question, and the project takes the folder's name), or just looks inside an app or file, a website or a game's files; a Game files screen (a game's archives; pictures from Unreal paks, Unity .assets files and Unity bundles saved as PNG after the person confirms they may unpack the game; uncompressed textures and the block formats DXT1, DXT5 and BC4–BC7), make prompt with picture attachments (picked, dropped, or pasted with Ctrl+V, shown as picture tiles) and, for anything recreated, a Clean room / Deep choice (also in the title bar; in Clean room, Just look inside, Game files, opening a file and the workbench ask for Deep mode instead), project screen (steps with the time spent and the AI cost and tokens of every build, saved in the project's usage.json by the run (a coding agent's figure is shown as an estimate at API prices, not the bill), what the build is on now and its activity as it arrives (kept in `build-activity.log`), pinned builder checklist (its X folds it away between builds, kept in the project, `project_plan_fold`; a later run's checklist shows again; its steps scroll past a height set by dragging the divider above it, or with Up and Down, kept across restarts, #826), feed (each message and answer has a copy button, shown on hover or keyboard focus, #825), question and approval cards, a Continue card when a build was paused or stopped part-way (the app or computer closed; the project shows Interrupted) that carries on the builder's own session instead of starting over, and "It's done" beside Continue or Try again to keep the build as it is (`project_build_finish`), checks with screenshots and the requirements not met yet, the builder's open questions, preview, play, folder, follow-ups while it builds, which Claude Code takes at its next step; Up in the prompt box takes back the last note still waiting). Projects can start in a folder the person picks, whose files are either the app, edited in place (its stack read from those files unless the request names another, and, with nothing to recreate, judged by its own build and tests, whatever it's written in), or material to start from (asked, or the answer remembered in Settings), and are listed from any number of folders (`project_folders`, `project_list`, `rebuild --project-folder`). Make says which AI builds ("Built by": automatic, or any AI that can build, by name); a pick stays with the project and builds its later changes. With nothing to build with, Start offers the coding agents found on the computer. Settings → AI turns an AI off or removes it, and sets how hard the Claude API or Claude Code thinks (every Claude level, low to max; also `ai effort` in the CLI). Each Claude Code AI can keep its sign-in in a folder of its own (its `CLAUDE_CONFIG_DIR`, so its own account; `ai folder` in the CLI, a folder on that computer over SSH), used for its runs, its sign-in check and its kept session, and Add another adds a second Claude Code for a second account. In the prompt box, Up at the very start and Down at the very end go through earlier prompts when no note is waiting. Questions about a build ("Just ask" under the prompt box, or a message starting with `/btw`, the first slash command; `rebuild_question_ask`) are answered in the conversation, where each folds away and is kept in the project, without a build or a round and changing nothing (the next message tells the builder the latest few as background, a Clean room build only those asked in Clean room): Claude Code answers from a read-only copy of the builder's own session. Under each project's prompt box, "Builder's questions: Ask me / Decide yourself" chooses whether the builder's questions come to the person as cards or are decided by the builder, which says what it chose (`project_questions_set`; the default is in Settings and follows Auto mode until picked). Projects can be renamed, duplicated and deleted (right-click in the sidebar, or the project's page; a delete keeps the person's own files). A build can be pinned (Pin this build on its page, or `project_pin_*` from the CLI and MCP): a frozen copy in the project's pinned/ folder (the default) or a light one that shares dependencies and media with the project through hard links (each one's size shown first), opened from the sidebar's collapsible Pinned section (icons with a running dot when folded); a pin or Play runs once per folder unless another copy is asked for, and a start that quits at once says so with its last output. Typed drafts survive a restart. In a narrow window the sidebar folds to icons and the project's details move above its feed; messages float over the screen and errors stay until dismissed. Advanced mode: workbench with every panel wired to real tools, as a screen beside the projects (builds and their questions stay a click away). On macOS the menu bar has the app's actions (open, new project, settings, Simple / Advanced, Clean room / Deep, the command palette, help) with the usual shortcuts | UI unit and smoke tests (egui_kittest), offscreen snapshots of every screen |
| CLI | Every tool, `--deep` or `--clean-room` for one run (never saved), `rebuild` (including `--continue-in`, and `--resume` to carry on a stopped build), `mcp --inbox`, `ai`, `setup`, `doctor`, `report` | CLI integration tests |
+| Desktop app | Simple mode: sidebar with New project and the project history (kept across restarts); New project makes something, works on a project the person already has (Work on my project: its folder's files are the app, edited in place without a question, and the project takes the folder's name), or just looks inside an app or file, a website or a game's files; a Game files screen (a game's archives; pictures from Unreal paks, Unity .assets files and Unity bundles saved as PNG after the person confirms they may unpack the game; uncompressed textures and the block formats DXT1, DXT5 and BC4–BC7), make prompt with picture attachments (picked, dropped, or pasted with Ctrl+V, shown as picture tiles) and, for anything recreated, a Clean room / Deep choice (also in the title bar; in Clean room, Just look inside, Game files, opening a file and the workbench ask for Deep mode instead), project screen (steps with the time spent and the AI cost and tokens of every build, saved in the project's usage.json by the run (a coding agent's figure is shown as an estimate at API prices, not the bill), what the build is on now and its activity as it arrives (kept in `build-activity.log`), pinned builder checklist (its X folds it away between builds, kept in the project, `project_plan_fold`; a later run's checklist shows again; its steps scroll past a height set by dragging the divider above it, or with Up and Down, kept across restarts, #826), feed (each message and answer has a copy button, shown on hover or keyboard focus, #825), question and approval cards, a Continue card when a build was paused or stopped part-way (the app or computer closed; the project shows Interrupted) that carries on the builder's own session instead of starting over, and "It's done" beside Continue or Try again to keep the build as it is (`project_build_finish`), checks with screenshots and the requirements not met yet, the builder's open questions, preview, play, folder, follow-ups while it builds, which Claude Code takes at its next step; Up in the prompt box takes back the last note still waiting). Projects can start in a folder the person picks, whose files are either the app, edited in place (its stack read from those files unless the request names another, and, with nothing to recreate, judged by its own build and tests, whatever it's written in), or material to start from (asked, or the answer remembered in Settings), and are listed from any number of folders (`project_folders`, `project_list`, `rebuild --project-folder`). Make says which AI builds ("Built by": automatic, or any AI that can build, by name); a pick stays with the project and builds its later changes. With nothing to build with, Start offers the coding agents found on the computer. Settings → AI turns an AI off or removes it, and sets how hard the Claude API or Claude Code thinks (every Claude level, low to max; also `ai effort` in the CLI). Each Claude Code AI can keep its sign-in in a folder of its own (its `CLAUDE_CONFIG_DIR`, so its own account; `ai folder` in the CLI, a folder on that computer over SSH), used for its runs, its sign-in check and its kept session, and Add another adds a second Claude Code for a second account. In the prompt box, Up at the very start and Down at the very end go through earlier prompts when no note is waiting. Questions about a build ("Just ask" under the prompt box, or a message starting with `/btw`, the first slash command; `rebuild_question_ask`) are answered in the conversation, where each folds away and is kept in the project, without a build or a round and changing nothing: Claude Code answers from a read-only copy of the builder's own session. Under each project's prompt box, "Builder's questions: Ask me / Decide yourself" chooses whether the builder's questions come to the person as cards or are decided by the builder, which says what it chose (`project_questions_set`; the default is in Settings and follows Auto mode until picked). Projects can be renamed, duplicated and deleted (right-click in the sidebar, or the project's page; a delete keeps the person's own files). A build can be pinned (Pin this build on its page, or `project_pin_*` from the CLI and MCP): a frozen copy in the project's pinned/ folder (the default) or a light one that shares dependencies and media with the project through hard links (each one's size shown first), opened from the sidebar's collapsible Pinned section (icons with a running dot when folded); a pin or Play runs once per folder unless another copy is asked for, and a start that quits at once says so with its last output. Typed drafts survive a restart. In a narrow window the sidebar folds to icons and the project's details move above its feed; messages float over the screen and errors stay until dismissed. Advanced mode: workbench with every panel wired to real tools, as a screen beside the projects (builds and their questions stay a click away). On macOS the menu bar has the app's actions (open, new project, settings, Simple / Advanced, Clean room / Deep, the command palette, help) with the usual shortcuts | UI unit and smoke tests (egui_kittest), offscreen snapshots of every screen |
+| CLI | Every tool, `--deep` or `--clean-room` for one run (never saved), `rebuild` (including `--continue-in`, and `--resume` to carry on a stopped build), `mcp` (`--inbox`, `--restricted`, `--allow-web`, `--allow-capture`), `ai`, `setup`, `doctor`, `report` | CLI integration tests |
| SQLite database files (`db_sqlite_show`) | A rowid alias column (`INTEGER PRIMARY KEY`, including the table-constraint form) shows the rowid; `DESC`, non-`INTEGER` and composite keys keep their stored values | Hand-built fixtures; generated files compared with the official SQLite library |
| SQLite WITHOUT ROWID tables | Read from the index b-tree, interior records and overflow included; rows in primary-key order, values in declaration order, `rowid` null | Hand-built fixtures; generated files compared with the official SQLite library |
| Builder discovery smoke fixture | The missing-builder smoke fixture controls discovery state and supplies a synthetic result. | All original warning, modal, action and build-availability assertions are retained. Source inspection only; automated validation has not yet run for this change. |