mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 22:27:08 +00:00
MCP: a hidden library keeps the id it was first shown under
A library loaded from outside a confined client's read roots keeps its `loaded/<file name>` id for the session, in ui.inspect, ui.docking and the library commands, so an id taken from an earlier reply still finds the same library after another library with the same file name is loaded. swatch.library.copyToUser leaves out `path` when the file is outside the read roots, as the saves do. The ids come from the engine's concealed_library_ids, which now reads a path written with either separator, counts another platform's absolute path as outside the roots, and keeps each id in the session.
This commit is contained in:
@@ -85,7 +85,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Copy to User Defined",
|
||||
["Window", "Swatch Libraries"],
|
||||
None,
|
||||
"{library: id or name of a loaded library (category \"loaded\", swatch.library.load)} copy it into the user library folder of the desktop app, whose libraries VectorCraft lists as User Defined every time it starts (a loaded library is listed until the app quits): a library file as it is, the swatches of a document or a library loaded from data as a .vcswatches file. A name the folder already has gets a number (\"Brand 2.ase\") and no file is replaced; when the folder already holds the same file, that file is used. The library is then listed as User Defined only, and until the app quits commands given its loaded id use the copy; a User Defined library comes back as it is → {library: its User Defined id, name, count, path, copied: false when nothing was written}",
|
||||
"{library: id or name of a loaded library (category \"loaded\", swatch.library.load)} copy it into the user library folder of the desktop app, whose libraries VectorCraft lists as User Defined every time it starts (a loaded library is listed until the app quits): a library file as it is, the swatches of a document or a library loaded from data as a .vcswatches file. A name the folder already has gets a number (\"Brand 2.ase\") and no file is replaced; when the folder already holds the same file, that file is used. The library is then listed as User Defined only, and until the app quits commands given its loaded id use the copy; a User Defined library comes back as it is → {library: its User Defined id, name, count, path (left out when it is outside the read roots), copied: false when nothing was written}",
|
||||
has_user_folder,
|
||||
copy_to_user
|
||||
),
|
||||
@@ -368,7 +368,9 @@ impl<L: LibraryFile> Libraries<L> {
|
||||
.ok_or_else(|| bad(cmd, format!("`{id}` isn't a loaded library")))?;
|
||||
let (file, bytes) = match source.filter(|p| L::EXTS.contains(&extension(p).as_str())) {
|
||||
Some(p) => {
|
||||
// Outside the request's read roots: the error names no path.
|
||||
// The file's bytes are read: outside the request's read roots, the error names no
|
||||
// path. A document's swatches (the arm below) are written from the loaded library,
|
||||
// and the document is not read again.
|
||||
if !readable(&p) {
|
||||
return Err(bad(cmd, "the library's file is outside the read roots"));
|
||||
}
|
||||
@@ -486,11 +488,15 @@ fn written_elsewhere(path: &str) -> bool {
|
||||
/// The loaded library ids (`loaded/<path>`) whose file the request being served may not read, each
|
||||
/// with the id a reply shows instead: `loaded/<file name>`, as a library loaded without a path is
|
||||
/// named. The file name is the last part of the path after either separator, and a path saved as
|
||||
/// another platform's absolute path counts as one the request may not read. The ids are those of the session's swatch, brush, symbol and graphic style libraries, then
|
||||
/// `others` (ids the UI state refers to). When another id already is or shows that id, the next free
|
||||
/// one of `loaded/<file name> (2)`, `(3)` and so on is shown, so that two libraries stay two. The
|
||||
/// session's libraries are numbered first, in the sorted order of their full ids, so a library shows
|
||||
/// the same id whatever `others` holds; then `others`, in the same order. Without roots in force, none.
|
||||
/// another platform's absolute path counts as one the request may not read. The ids are those of the
|
||||
/// session's swatch, brush, symbol and graphic style libraries, then `others` (ids the UI state refers
|
||||
/// to). When another id already is or shows that id, the next free
|
||||
/// one of `loaded/<file name> (2)`, `(3)` and so on is shown, so that two libraries stay two. A library
|
||||
/// keeps the id it was first shown under for the rest of the session, so an id a client was given
|
||||
/// finds the same library after another one with the same file name is loaded; only a library that
|
||||
/// shows that id itself (one loaded later without a file under that name) moves it to the next free
|
||||
/// one. Libraries shown for the first time are numbered the session's first, in the sorted order of
|
||||
/// their full ids, then `others`, in the same order. Without roots in force, none.
|
||||
pub fn concealed_library_ids(s: &Session, others: impl IntoIterator<Item = String>) -> Vec<(String, String)> {
|
||||
if crate::file_access::current().is_none() {
|
||||
return vec![];
|
||||
@@ -515,16 +521,32 @@ pub fn concealed_library_ids(s: &Session, others: impl IntoIterator<Item = Strin
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut assigned = s.shown_library_ids.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let mut kept = vec![None; hidden.len()];
|
||||
for (slot, (id, _)) in kept.iter_mut().zip(&hidden) {
|
||||
if let Some(shown) = assigned.get(id).filter(|shown| !taken.contains(*shown)) {
|
||||
taken.insert(shown.clone());
|
||||
*slot = Some(shown.clone());
|
||||
}
|
||||
}
|
||||
// A new id is never one given to another library earlier in the session.
|
||||
let mut given: BTreeSet<String> = assigned.values().cloned().collect();
|
||||
hidden
|
||||
.into_iter()
|
||||
.map(|(id, name)| {
|
||||
let mut shown = format!("loaded/{name}");
|
||||
let mut n = 2;
|
||||
while taken.contains(&shown) {
|
||||
shown = format!("loaded/{name} ({n})");
|
||||
n += 1;
|
||||
}
|
||||
taken.insert(shown.clone());
|
||||
.zip(kept)
|
||||
.map(|((id, name), kept)| {
|
||||
let shown = kept.unwrap_or_else(|| {
|
||||
let mut shown = format!("loaded/{name}");
|
||||
let mut n = 2;
|
||||
while taken.contains(&shown) || given.contains(&shown) {
|
||||
shown = format!("loaded/{name} ({n})");
|
||||
n += 1;
|
||||
}
|
||||
taken.insert(shown.clone());
|
||||
given.insert(shown.clone());
|
||||
assigned.insert(id.clone(), shown.clone());
|
||||
shown
|
||||
});
|
||||
(id, shown)
|
||||
})
|
||||
.collect()
|
||||
@@ -759,8 +781,12 @@ fn copy_to_user(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
"user" => (info, lib, false),
|
||||
_ => return Err(bad(C, format!("`{}` is built in and always listed", info.name))),
|
||||
};
|
||||
let path = s.swatch_libraries.shown_path(&info.id);
|
||||
Ok(json!({"library": info.id, "name": info.name, "count": lib.len(), "path": path, "copied": copied}))
|
||||
let mut out = json!({"library": info.id, "name": info.name, "count": lib.len(), "copied": copied});
|
||||
// As the saves with `user: true`: no `path` when the request may not read the file.
|
||||
if let Some(path) = s.swatch_libraries.shown_path(&info.id) {
|
||||
out["path"] = json!(path);
|
||||
}
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
/// The library swatches `names` stand for, each once, with the colour group it goes into (`None`:
|
||||
|
||||
@@ -151,6 +151,9 @@ pub struct Session {
|
||||
pub symbol_libraries: cmd::symbollib::Libraries,
|
||||
/// User Defined and loaded brush libraries (Window → Brush Libraries); not saved.
|
||||
pub brush_libraries: cmd::brushlib::Libraries,
|
||||
/// The id each loaded library outside a request's read roots has been shown under, by its own id
|
||||
/// ([`cmd::swatchlib::concealed_library_ids`]), kept for the session.
|
||||
shown_library_ids: std::sync::Mutex<std::collections::BTreeMap<String, String>>,
|
||||
/// The Libraries panel's libraries of graphics, colours and text styles (`library.*`).
|
||||
pub libraries: cmd::library::Libraries,
|
||||
/// Where the saved PDF presets are kept, one file each; `None`: only for the session
|
||||
|
||||
@@ -80,6 +80,7 @@ impl Session {
|
||||
style_libraries: Default::default(),
|
||||
symbol_libraries: Default::default(),
|
||||
brush_libraries: Default::default(),
|
||||
shown_library_ids: Default::default(),
|
||||
libraries: Default::default(),
|
||||
pdf_preset_dir: None,
|
||||
dictionary_file: None,
|
||||
|
||||
@@ -214,26 +214,53 @@ fn swatch_library_replies_leave_out_paths_outside_the_read_root() {
|
||||
let mine = format!("loaded/{}", text(&inside));
|
||||
let copied = confine(roots.as_ref(), || run(&mut s, "swatch.library.copyToUser", json!({"library": mine})));
|
||||
assert_eq!((copied["library"].as_str(), copied["copied"].as_bool()), (Some("user/Kit.vcswatches"), Some(true)), "{copied}");
|
||||
assert_eq!(copied["path"], Value::Null, "{copied}");
|
||||
assert_eq!(copied.get("path"), None, "{copied}");
|
||||
let saved = confine(roots.as_ref(), || run(&mut s, "swatch.library.save", json!({"user": true, "name": "Mine"})));
|
||||
assert_eq!((saved["library"].as_str(), saved.get("path")), (Some("user/Mine.vcswatches"), None), "{saved}");
|
||||
for reply in [&added, &copied, &saved] {
|
||||
assert!(!holds(reply, &base.join("a")) && !holds(reply, &base.join("user")), "{reply}");
|
||||
}
|
||||
// A library loaded from data under the file name keeps its id; each concealed one takes the next
|
||||
// free one, so no two rows share an id.
|
||||
// A library loaded from data under the file name keeps its id; the concealed one shown under that
|
||||
// id takes the next free one, the other keeps its id, and no two rows share an id.
|
||||
let data = run(&mut s, "swatch.library.save", json!({}))["data"].as_str().unwrap().to_string();
|
||||
run(&mut s, "swatch.library.load", json!({"data": data, "name": "Kit.vcswatches"}));
|
||||
let list = confine(roots.as_ref(), || run(&mut s, "swatch.library.list", json!({})));
|
||||
let ids: Vec<Value> = loaded(&list).into_iter().map(|(id, ..)| id).collect();
|
||||
assert_eq!(ids, [json!("loaded/Kit.vcswatches (2)"), json!("loaded/Kit.vcswatches (3)"), json!("loaded/Kit.vcswatches")], "{list}");
|
||||
assert_eq!(ids, [json!("loaded/Kit.vcswatches (3)"), json!("loaded/Kit.vcswatches (2)"), json!("loaded/Kit.vcswatches")], "{list}");
|
||||
// Copied into the user library folder, it is still found by that id, which no other library takes.
|
||||
confine(roots.as_ref(), || run(&mut s, "swatch.library.copyToUser", json!({"library": "loaded/Kit.vcswatches"})));
|
||||
let list = confine(roots.as_ref(), || run(&mut s, "swatch.library.list", json!({})));
|
||||
let ids: Vec<Value> = loaded(&list).into_iter().map(|(id, ..)| id).collect();
|
||||
assert_eq!(ids, [json!("loaded/Kit.vcswatches (2)"), json!("loaded/Kit.vcswatches (3)")], "{list}");
|
||||
assert_eq!(ids, [json!("loaded/Kit.vcswatches (3)"), json!("loaded/Kit.vcswatches (2)")], "{list}");
|
||||
// The person sees the folder.
|
||||
let saved = run(&mut s, "swatch.library.save", json!({"user": true, "name": "Theirs"}));
|
||||
assert_eq!(saved["path"], json!(text(&base.join("user").join("Theirs.vcswatches"))));
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
/// A concealed library keeps the id a client was shown when another library with the same file name,
|
||||
/// whose full id sorts before it, is loaded later: the id still finds the first library.
|
||||
#[test]
|
||||
fn a_concealed_library_keeps_its_id_after_another_with_its_file_name_loads() {
|
||||
let base = folder("keeps-id");
|
||||
let roots = AutomationRoots::new(&[&base.join("in")], &[&base.join("out")]).unwrap();
|
||||
let (first, later) = (base.join("b").join("Kit.vcswatches"), base.join("a").join("Kit.vcswatches"));
|
||||
let mut s = Session::new();
|
||||
run(&mut s, "file.new", json!({"width": 100, "height": 100}));
|
||||
(SWATCHES.add)(&mut s, "First");
|
||||
run(&mut s, "swatch.library.save", json!({"path": text(&first), "name": "Kit"}));
|
||||
(SWATCHES.add)(&mut s, "Second");
|
||||
run(&mut s, "swatch.library.save", json!({"path": text(&later), "name": "Kit"}));
|
||||
let shown = "loaded/Kit.vcswatches";
|
||||
let count = run(&mut s, "swatch.library.load", json!({"path": text(&first)}))["count"].clone();
|
||||
let list = confine(roots.as_ref(), || run(&mut s, "swatch.library.list", json!({})));
|
||||
assert_eq!(loaded(&list), [(json!(shown), Value::Null, count)], "{list}");
|
||||
run(&mut s, "swatch.library.load", json!({"path": text(&later)}));
|
||||
let list = confine(roots.as_ref(), || run(&mut s, "swatch.library.list", json!({})));
|
||||
let ids: Vec<Value> = loaded(&list).into_iter().map(|(id, ..)| id).collect();
|
||||
assert_eq!(ids, [json!(shown), json!("loaded/Kit.vcswatches (2)")], "{list}");
|
||||
let theirs = run(&mut s, "swatch.library.get", json!({"library": format!("loaded/{}", text(&first))}));
|
||||
let got = confine(roots.as_ref(), || run(&mut s, "swatch.library.get", json!({"library": shown})));
|
||||
assert_eq!((&got["id"], &got["swatches"]), (&json!(shown), &theirs["swatches"]), "the first library: {got}");
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
@@ -787,6 +787,43 @@ fn ui_inspect_and_library_commands_show_a_hidden_library_under_one_id() {
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
/// A library panel command given a hidden library's shown id opens the library and answers with
|
||||
/// that id, not the library's path.
|
||||
#[test]
|
||||
fn a_library_panel_command_answers_with_a_hidden_librarys_shown_id() {
|
||||
let (mut app, tx, base) = confined("panel-shown-id");
|
||||
let path = base.join("outside/x/Kit.gpl");
|
||||
std::fs::create_dir_all(path.parent().unwrap()).unwrap();
|
||||
std::fs::write(&path, "GIMP Palette\nName: Kit\n0 0 0 Black\n").unwrap();
|
||||
app.session.execute("swatch.library.load", &json!({"path": s(path.clone())})).unwrap();
|
||||
let r = request(&mut app, &tx, "engine.execute", json!({"command": "window.swatchLibrary", "params": {"library": "loaded/Kit.gpl"}}));
|
||||
assert_eq!(r["ok"], true, "{r}");
|
||||
assert!(r.to_string().contains("loaded/Kit.gpl") && !r.to_string().contains("outside"), "{r}");
|
||||
assert_eq!(app.ui.library_panels.last().map(|p| p.id.clone()), Some(format!("loaded/{}", s(path))), "the app's own id");
|
||||
// The panel id it answers with names the panel in the panel commands.
|
||||
let panel = r["result"]["panel"].clone();
|
||||
assert_eq!(panel, "library:swatches:loaded/Kit.gpl", "{r}");
|
||||
let r = request(&mut app, &tx, "engine.execute", json!({"command": "ui.libraryPanel", "params": {"panel": panel, "view": "largeList"}}));
|
||||
assert_eq!((&r["ok"], &r["result"]["panel"]), (&json!(true), &panel), "{r}");
|
||||
assert!(!r.to_string().contains("outside"), "{r}");
|
||||
let r = request(
|
||||
&mut app,
|
||||
&tx,
|
||||
"engine.execute",
|
||||
json!({"command": "window.panel.move", "params": {"panel": "swatches", "anchor": panel, "zone": "tab"}}),
|
||||
);
|
||||
assert_eq!(r["ok"], true, "{r}");
|
||||
assert!(!r.to_string().contains("outside"), "{r}");
|
||||
let r = request(&mut app, &tx, "engine.execute", json!({"command": "window.panel.close", "params": {"panel": panel}}));
|
||||
assert_eq!(r["ok"], true, "{r}");
|
||||
assert!(!r.to_string().contains("outside"), "{r}");
|
||||
// Closed, the panel isn't found, and the error names it by the id given.
|
||||
let r = request(&mut app, &tx, "engine.execute", json!({"command": "ui.libraryPanel", "params": {"panel": panel, "view": "largeList"}}));
|
||||
assert_eq!(r["ok"], false, "{r}");
|
||||
assert!(!r.to_string().contains("outside"), "{r}");
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
/// A closed panel's former place, as `ui.docking_hidden` keeps it.
|
||||
fn hidden_place() -> craft_ui::docking::Location<String> {
|
||||
serde_json::from_value(json!({"floating": null, "anchor": null, "placement": {"Tab": {"before": null}}, "size": null, "stack": null})).unwrap()
|
||||
|
||||
+14
-8
@@ -143,11 +143,13 @@ the suite) keep the agent to the folders you give it:
|
||||
params of a recorded action's steps in `ui.action_sets`, also when its panel is closed. A path written with
|
||||
either separator counts as a path, also one saved on another platform, and outside Windows a path that starts
|
||||
with a drive (`C:`) or a `\` counts as outside the roots. When another hidden library has the same
|
||||
file name, the libraries take `loaded/<file name>`, `loaded/<file name> (2)`, `(3)` and so on in the order of
|
||||
their full ids (the libraries loaded in this session first, then those only the UI state names), and each one
|
||||
keeps its id in both replies and in the library commands below. A hidden library skips an id that a library
|
||||
loaded without a path already has. The other entries keep their order, and the app's own state is not
|
||||
changed. A request may name such a library or its panel by the id
|
||||
file name, the libraries take `loaded/<file name>`, `loaded/<file name> (2)`, `(3)` and so on in the order they
|
||||
are first shown. Libraries first shown in the same reply are numbered in the order of their full ids, the
|
||||
libraries loaded in this session first, then those only the UI state names. Each one keeps its id for the rest
|
||||
of the session in both replies and in the library commands below, also after another library with the same
|
||||
file name is loaded. A hidden library skips an id that a library loaded without a path already has, and only a
|
||||
library loaded later from data under that file name, which takes the id itself, moves a hidden one to the next
|
||||
free number. The other entries keep their order, and the app's own state is not changed. A request may name such a library or its panel by the id
|
||||
shown in a `panel`, `library` or `panels` param, in a docking destination (`anchor`, `before`, `onto`, `above`,
|
||||
`below`) and in `window.panel.layout`'s `action` (`ui.set {panel: "library:swatches:loaded/<file name>"}`
|
||||
reopens its panel), and the reply to such a request shows that id and file name wherever the library's id or path
|
||||
@@ -168,9 +170,13 @@ the suite) keep the agent to the folders you give it:
|
||||
`(2)`, `(3)` and so on as in `ui_inspect` when two have the same file name. That id finds the library in the
|
||||
other library commands (`swatch.library.get`, `swatch.library.add`, `brush.library`, `brush.addFromLibrary`,
|
||||
`symbol.library`, `symbol.addFromLibrary`, `graphicStyle.library`, `graphicStyle.addFromLibrary` and the
|
||||
others that take `library`), whose replies show it too. `swatch.library.copyToUser` refuses a library whose file
|
||||
is outside the read roots without naming the file, and it and the library saves with `user: true` leave out
|
||||
`path` when the user library folder is outside the read roots.
|
||||
others that take `library`), whose replies show it too. Over the control channel, `window.swatchLibrary` and
|
||||
the other library panel commands answer with that id and its panel's id (`library:swatches:loaded/<file name>`),
|
||||
and `ui.libraryPanel` and the `window.panel.*` commands take that panel id in `panel`, `anchor`, `before`,
|
||||
`onto`, `above` and `below`. `swatch.library.copyToUser` refuses to copy a library file outside the read roots
|
||||
without naming the file (the swatches of a document loaded from there are written from the loaded library, as
|
||||
for a library loaded from data, and the document is not read again), and it and the library saves with
|
||||
`user: true` leave out `path` when the user library folder is outside the read roots.
|
||||
- Each flag may be given more than once (#3546): a path inside any of the read roots may be read, one inside any
|
||||
of the write roots written, so one session can read a project folder and a shared assets folder, or write to an
|
||||
output folder and a scratch folder, without widening a root to their common parent. A folder given twice
|
||||
|
||||
@@ -750,7 +750,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Scripts folder: File › Scripts lists the `.js` and `.jsx` files of the `Scripts` folder next to the preferences, each named after its file without the extension, with each subfolder as a submenu, above Check Script… and Other Script… (https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/install-and-run-scripts.html). VectorCraft's own rules: the folder is read again when the window becomes active and when the File menu opens (in the macOS menu bar, when any of its menus opens, and the new listing shows the next time the menu opens), links are not followed, and one read stops at 2,048 entries, 512 scripts, 128 subfolders, 4 levels or 250 ms. `script.listInstalled` returns the listing. `crates/engine/src/tests/script_folder.rs`, `crates/ui-egui/src/tests/scripts_menu.rs`.
|
||||
- Open Recent Files under `--automation-read-root`: the control channel's `ui.menu.list` and `file.recentFiles` leave out the recent files outside the read roots, the other rows keep their ids, and `file.openRecentN` for one outside them answers `no such recent file`, as an empty slot does. `crates/ui-egui/src/tests/automation.rs`.
|
||||
- `ui.inspect` under `--automation-read-root`: the documents still opening, the recent files, library panels' files and folder preferences (saved, and in an open Preferences dialog) outside the read roots are left out of the reply, a library loaded from outside them shows by its file name in `ui.inspect` and `ui.docking`, and the app's state is not changed. `crates/ui-egui/src/tests/automation.rs` (`ui_inspect_leaves_out_paths_outside_the_read_root`).
|
||||
- Swatch, brush, symbol and graphic style library lists under `--automation-read-root`: library files and the user library folder outside the read roots are left out, a library loaded from outside them is listed and found by its file name, and the app's own list is not changed. `crates/engine/src/tests/library_roots.rs`.
|
||||
- Swatch, brush, symbol and graphic style library lists under `--automation-read-root`: every library stays listed, the paths of library files and the user library folder outside the read roots are `null`, a library loaded from outside them is listed and found as `loaded/<file name>` and keeps that id for the session, and the app's own list is not changed. `crates/engine/src/tests/library_roots.rs`.
|
||||
- Scripts: `alert`, `confirm` and `prompt` open dialogs during a run, each with a Stop button that ends the run and puts every document back. In the app the run waits at the call for the person's answer; a run over MCP or the command line takes its answers in order from `script.run`'s `answers`, and the report lists each dialog with its answer. `crates/engine/src/tests/script_dialogs.rs`, `crates/ui-egui/src/tests/script_dialogs.rs`.
|
||||
- Parameter keys: the engine refuses a key that a command's params description doesn't name before the command runs, in every build and for every caller, including the app's own calls, the commands a command runs and the steps of `command.batch` and `action.batch`. An action recorded by an older version still plays from the Actions panel and the Batch dialog (`Session::replay`). `crates/engine/tests/it/param_keys.rs`.
|
||||
- MCP server with 33 tools (drawing, text, effects, Pathfinder, transforms, graphs, text wrap, export, screenshots, undo/redo, UI inspect/screenshot aliases, any command), attached to the running app or headless. Headless and remote `command_list` include desktop `UI_COMMANDS` (`ui: true`); a UI-only id still needs `--connect` to run. Eight prompts (poster, icon-set, recolor, trace-and-style, export-set, check-spelling, variables-bind, path-tools). Effect ids are not command ids. Prefer a CLI built from the checkout when a release binary lags (#6460). `vectorcraft://commands/reference` serves the API reference. Tool descriptions and replies agree with the engine: format lists come from its format table, `save_file` says it keeps the document's own format, `inspect_document` reports the paint type's characters show, and selection exports report the encoder's warnings. `--automation-read-root` / `--automation-write-root` (on `vectorcraft-cli mcp` and on `vectorcraft --control`) confine the files commands read and write to chosen folders, links followed, with the flags PhotoCraft takes (#832); each flag may be given more than once, a path inside any of its folders being allowed (#3546, `file_access::tests::several_roots_of_a_kind_each_grant_their_access`, `cli::mcp_automation_roots_take_several_folders`). A long export can be cancelled (`notifications/cancelled` stops it at the next page or group and writes nothing), reports page progress to a client that sent a progress token, and does not make other requests wait: engine-free ones answer at once, the rest are refused as busy after two seconds (#2165, #2171, #2172).
|
||||
|
||||
Reference in New Issue
Block a user