Move the editor control protocol crate into the libraries folder (#4694)

This commit is contained in:
Keavon Chambers authored and GitHub committed 2026-10-13 21:14:47 -07:00
1 parent 4dfc9d3596
commit 1bfddeefd6
11 files changed
+21 -21

No files matched your search

Generated
+10 -10
View File
@@ -830,6 +830,15 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
[[package]]
name = "control-protocol"
version = "0.0.0"
dependencies = [
"glam 0.33.10",
"serde",
"serde_json",
]
[[package]]
name = "convert_case"
version = "0.12.0"
@@ -2427,15 +2436,6 @@ dependencies = [
"zip",
]
[[package]]
name = "graphite-editor-control-protocol"
version = "0.0.0"
dependencies = [
"glam 0.33.10",
"serde",
"serde_json",
]
[[package]]
name = "graphite-proc-macros"
version = "0.0.0"
@@ -6926,9 +6926,9 @@ version = "0.0.0"
dependencies = [
"base64",
"clap",
"control-protocol",
"getrandom 0.3.3",
"glam 0.33.10",
"graphite-editor-control-protocol",
"image",
"interprocess",
"serde",
+2 -2
View File
@@ -12,13 +12,13 @@ members = [
"document/graph-storage",
"document/container",
"editor",
"editor/control-protocol",
"frontend/wrapper",
"libraries/dyn-any",
"libraries/math-parser",
"libraries/ipsum",
"libraries/snapping",
"libraries/wgpu-sync",
"libraries/control-protocol",
"node-graph/libraries/graphene-hash",
"node-graph/libraries/*",
"node-graph/nodes/*",
@@ -111,7 +111,7 @@ wgpu-executor = { path = "node-graph/libraries/wgpu-executor" }
wgpu-sync = { path = "libraries/wgpu-sync" }
graphite-proc-macros = { path = "proc-macros" }
graphite-editor = { path = "editor" }
graphite-editor-control-protocol = { path = "editor/control-protocol" }
control-protocol = { path = "libraries/control-protocol" }
graphene-canvas-utils = { path = "node-graph/libraries/canvas-utils" }
ipsum = { path = "libraries/ipsum" }
@@ -1,5 +1,5 @@
[package]
name = "graphite-editor-control-protocol"
name = "control-protocol"
description = "The commands, results, and scenarios that scripts, QA, and agents use to operate the Graphite editor"
version.workspace = true
license.workspace = true
File renamed without changes.
+1 -1
View File
@@ -16,7 +16,7 @@ workspace = true
[dependencies]
# Local dependencies
graphite-editor-control-protocol = { workspace = true }
control-protocol = { workspace = true }
# Workspace dependencies
serde = { workspace = true }
+2 -2
View File
@@ -8,7 +8,7 @@ Drives the Graphite web editor the way a person does. Every action is real mouse
The driver runs its own copy of Chromium, downloaded into this directory, with a fresh profile every session. It never touches a browser, profile, or history already on the machine.
It is written in Rust, apart from the small Node.js process in `playwright/` that delivers input and takes screenshots through Playwright. The commands, their results, and scenario files are defined by the editor control protocol in `editor/control-protocol`.
It is written in Rust, apart from the small Node.js process in `playwright/` that delivers input and takes screenshots through Playwright. The commands, their results, and scenario files are defined by the editor control protocol in `libraries/control-protocol`.
The TypeScript in `playwright/` follows the frontend's lint rules, using the tools the frontend installs. Check it with `npm run check` in that folder, and fix what can be fixed automatically with `npm run fix`.
@@ -68,7 +68,7 @@ A scenario file holds the same commands the command line performs, one per line
Scenario files are named for what they do, ending in `.jsonl`, such as `draw-rectangle.jsonl`.
The commands and their fields are defined by `Command` in `editor/control-protocol/src/lib.rs`.
The commands and their fields are defined by `Command` in `libraries/control-protocol/src/lib.rs`.
## QA
+1 -1
View File
@@ -1,6 +1,6 @@
use base64::Engine;
use control_protocol::{MouseButton, Rectangle};
use glam::{DVec2, UVec2};
use graphite_editor_control_protocol::{MouseButton, Rectangle};
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
+1 -1
View File
@@ -1,6 +1,6 @@
//! Starting, reaching, and stopping the session host, which owns the browser so separate invocations can act on the same editor one after another.
use graphite_editor_control_protocol::{ClientMessage, Command, CommandResult, HostMessage, PROTOCOL_VERSION};
use control_protocol::{ClientMessage, Command, CommandResult, HostMessage, PROTOCOL_VERSION};
use interprocess::local_socket::{RecvHalf, SendHalf, Stream, prelude::*};
use serde::{Deserialize, Serialize};
use std::io::BufReader;
+1 -1
View File
@@ -1,6 +1,6 @@
//! The long-lived process that owns the browser, which `start` runs in the background and every later invocation connects to.
use graphite_editor_control_protocol::{ClientMessage, Command, CommandResult, HostMessage, PROTOCOL_VERSION};
use control_protocol::{ClientMessage, Command, CommandResult, HostMessage, PROTOCOL_VERSION};
use interprocess::local_socket::{ListenerOptions, Stream, prelude::*};
use std::io::BufReader;
use std::sync::{Arc, Mutex, PoisonError};
+1 -1
View File
@@ -11,8 +11,8 @@ mod session;
mod socket;
use clap::{Args, Parser, Subcommand, ValueEnum};
use control_protocol::{Command, Filmstrip, MouseButton, Rectangle, Space, parse_scenario};
use glam::{DVec2, UVec2};
use graphite_editor_control_protocol::{Command, Filmstrip, MouseButton, Rectangle, Space, parse_scenario};
use serde::Serialize;
use std::num::NonZeroU32;
use std::path::{Path, PathBuf};
+1 -1
View File
@@ -1,5 +1,5 @@
use control_protocol::{Command, CommandResult, Filmstrip, Located, MouseButton, Rectangle, SessionStatus, Space};
use glam::{DVec2, UVec2};
use graphite_editor_control_protocol::{Command, CommandResult, Filmstrip, Located, MouseButton, Rectangle, SessionStatus, Space};
use std::num::NonZeroU32;
use std::path::Path;
use std::sync::Arc;