From fb285b17e47eaa20ac2812d5e2eefb9245add162 Mon Sep 17 00:00:00 2001 From: Hare Date: Wed, 29 Jul 2026 19:36:05 +0900 Subject: [PATCH] build: rename server runtime binaries --- crates/worker-runtime/Cargo.toml | 2 +- crates/worker-runtime/README.md | 4 +- crates/worker-runtime/src/main.rs | 6 +-- crates/workspace-server/Cargo.toml | 5 ++ crates/workspace-server/src/config.rs | 2 +- crates/workspace-server/src/identity.rs | 2 +- crates/workspace-server/src/main.rs | 21 ++++---- crates/yoi/src/main.rs | 8 +-- docker.nix | 4 +- docs/design/workspace-runtime-docker.md | 6 +-- docs/development/server-runtime-auth.md | 64 ++++++++++++------------ package.nix | 24 ++++----- resources/workspace-backend.default.toml | 6 +-- scripts/dev-workspace.sh | 12 ++--- web/workspace/README.md | 6 +-- web/workspace/deno.json | 2 +- 16 files changed, 90 insertions(+), 84 deletions(-) diff --git a/crates/worker-runtime/Cargo.toml b/crates/worker-runtime/Cargo.toml index 35e6c487..4d3af0e3 100644 --- a/crates/worker-runtime/Cargo.toml +++ b/crates/worker-runtime/Cargo.toml @@ -7,7 +7,7 @@ license.workspace = true autobins = false [[bin]] -name = "worker-runtime-rest-server" +name = "yoi-runtime" path = "src/main.rs" required-features = ["ws-server", "fs-store"] diff --git a/crates/worker-runtime/README.md b/crates/worker-runtime/README.md index bc4cdfdf..0b71377e 100644 --- a/crates/worker-runtime/README.md +++ b/crates/worker-runtime/README.md @@ -9,7 +9,7 @@ From the repository root: ```bash cargo run -p worker-runtime \ --features ws-server,fs-store \ - --bin worker-runtime-rest-server \ + --bin yoi-runtime \ -- --bind 127.0.0.1:38800 ``` @@ -24,7 +24,7 @@ To bind another address explicitly: ```bash cargo run -p worker-runtime \ --features ws-server,fs-store \ - --bin worker-runtime-rest-server \ + --bin yoi-runtime \ -- --bind 0.0.0.0:38800 ``` diff --git a/crates/worker-runtime/src/main.rs b/crates/worker-runtime/src/main.rs index 8ab36bc2..ca9cd7a1 100644 --- a/crates/worker-runtime/src/main.rs +++ b/crates/worker-runtime/src/main.rs @@ -30,7 +30,7 @@ fn main() -> ExitCode { match run() { Ok(()) => ExitCode::SUCCESS, Err(error) => { - eprintln!("worker-runtime-rest-server: {error}"); + eprintln!("yoi-runtime: {error}"); if let ProcessError::Usage(_) = error { eprintln!(); eprintln!("{}", usage()); @@ -64,7 +64,7 @@ fn run() -> Result<(), ProcessError> { let local_addr = listener.local_addr()?; let worker_runtime = build_runtime(&config)?; eprintln!( - "worker-runtime REST server listening on {local_addr}; intended client is a trusted backend/proxy, not a browser" + "yoi-runtime listening on {local_addr}; intended client is a trusted backend/proxy, not a browser" ); worker_runtime::http_server::serve_runtime_http_with_auth( worker_runtime, @@ -796,7 +796,7 @@ fn run_trust_server_command(mut args: VecDeque) -> Result<(), ProcessErr } fn usage() -> &'static str { - r#"Usage: worker-runtime-rest-server [OPTIONS] + r#"Usage: yoi-runtime [OPTIONS] Starts a worker-backed Runtime REST command API for a trusted backend/proxy. Browsers must not connect to this Runtime process directly. diff --git a/crates/workspace-server/Cargo.toml b/crates/workspace-server/Cargo.toml index 003bf1b0..911c1c83 100644 --- a/crates/workspace-server/Cargo.toml +++ b/crates/workspace-server/Cargo.toml @@ -4,6 +4,11 @@ version = "0.1.0" edition.workspace = true license.workspace = true publish = false +autobins = false + +[[bin]] +name = "yoi-server" +path = "src/main.rs" [dependencies] async-trait.workspace = true diff --git a/crates/workspace-server/src/config.rs b/crates/workspace-server/src/config.rs index dc5b3d97..a31c9945 100644 --- a/crates/workspace-server/src/config.rs +++ b/crates/workspace-server/src/config.rs @@ -306,7 +306,7 @@ impl WorkspaceBackendConfigFile { match fs::read_to_string(&path) { Ok(local) => Ok(ConfigDiff::new(WORKSPACE_BACKEND_CONFIG_TEMPLATE, &local)), Err(error) if error.kind() == io::ErrorKind::NotFound => Err(Error::Config(format!( - "workspace backend local config `{}` does not exist; run `yoi-workspace-server init --workspace {}` first", + "workspace backend local config `{}` does not exist; run `yoi-server init --workspace {}` first", path.display(), workspace_root.display() ))), diff --git a/crates/workspace-server/src/identity.rs b/crates/workspace-server/src/identity.rs index f41a778c..2067ef0f 100644 --- a/crates/workspace-server/src/identity.rs +++ b/crates/workspace-server/src/identity.rs @@ -46,7 +46,7 @@ impl WorkspaceIdentity { Ok(raw) => Self::parse_str(&raw, &path), Err(error) if error.kind() == ErrorKind::NotFound => { Err(Error::WorkspaceIdentity(format!( - "workspace is not initialized at {}; run `yoi-workspace-server init --workspace {}` first", + "workspace is not initialized at {}; run `yoi-server init --workspace {}` first", workspace_root.as_ref().display(), workspace_root.as_ref().display() ))) diff --git a/crates/workspace-server/src/main.rs b/crates/workspace-server/src/main.rs index 6165a3ed..c78e7124 100644 --- a/crates/workspace-server/src/main.rs +++ b/crates/workspace-server/src/main.rs @@ -65,7 +65,7 @@ async fn main() -> ExitCode { match run().await { Ok(()) => ExitCode::SUCCESS, Err(error) => { - eprintln!("yoi-workspace-server: {error}"); + eprintln!("yoi-server: {error}"); ExitCode::FAILURE } } @@ -160,7 +160,7 @@ async fn run_init_with_database_path( })?; eprintln!( - "yoi-workspace-server: initialized workspace `{}` ({}) in server DB `{}`", + "yoi-server: initialized workspace `{}` ({}) in server DB `{}`", options.workspace.display(), identity.workspace_id, database_path.display() @@ -572,7 +572,7 @@ async fn run_serve(options: ServeOptions) -> Result<(), Box Result Err(CliError( - "server DB has no workspace records; run `yoi-workspace-server init --workspace `".to_string(), + "server DB has no workspace records; run `yoi-server init --workspace `" + .to_string(), )), [workspace] => Ok(workspace.clone()), _ => Err(CliError(format!( @@ -825,31 +826,31 @@ fn parse_listen(value: &str) -> Result { fn print_help() { println!( - "yoi-workspace-server\n\nUsage:\n yoi-workspace-server init [OPTIONS]\n yoi-workspace-server config [OPTIONS]\n yoi-workspace-server identity init --server-id [--replace]\n yoi-workspace-server identity show [--json]\n yoi-workspace-server trust-runtime add --runtime-id --base-url --public-key [--display-name ] [--replace]\n yoi-workspace-server trust-runtime list [--json] [--include-revoked]\n yoi-workspace-server trust-runtime revoke --runtime-id \n yoi-workspace-server skills [OPTIONS]\n yoi-workspace-server serve [OPTIONS]\n\nOptions:\n -h, --help Print help" + "yoi-server\n\nUsage:\n yoi-server init [OPTIONS]\n yoi-server config [OPTIONS]\n yoi-server identity init --server-id [--replace]\n yoi-server identity show [--json]\n yoi-server trust-runtime add --runtime-id --base-url --public-key [--display-name ] [--replace]\n yoi-server trust-runtime list [--json] [--include-revoked]\n yoi-server trust-runtime revoke --runtime-id \n yoi-server skills [OPTIONS]\n yoi-server serve [OPTIONS]\n\nOptions:\n -h, --help Print help" ); } fn print_init_help() { println!( - "yoi-workspace-server init\n\nUsage:\n yoi-workspace-server init [OPTIONS]\n\nDescription:\n Initializes a Workspace identity, copies the packaged Backend config template to .yoi/workspace-backend.local.toml, and registers the Workspace in the Yoi server DB.\n\nOptions:\n --workspace Workspace root to initialize (defaults to cwd)\n -h, --help Print help" + "yoi-server init\n\nUsage:\n yoi-server init [OPTIONS]\n\nDescription:\n Initializes a Workspace identity, copies the packaged Backend config template to .yoi/workspace-backend.local.toml, and registers the Workspace in the Yoi server DB.\n\nOptions:\n --workspace Workspace root to initialize (defaults to cwd)\n -h, --help Print help" ); } fn print_config_help() { println!( - "yoi-workspace-server config\n\nUsage:\n yoi-workspace-server config default\n yoi-workspace-server config diff [OPTIONS]\n\nDescription:\n Prints the packaged Workspace Backend config template or compares it with the workspace-local config.\n\nOptions for diff:\n --workspace Workspace root (defaults to cwd)\n -h, --help Print help" + "yoi-server config\n\nUsage:\n yoi-server config default\n yoi-server config diff [OPTIONS]\n\nDescription:\n Prints the packaged Workspace Backend config template or compares it with the workspace-local config.\n\nOptions for diff:\n --workspace Workspace root (defaults to cwd)\n -h, --help Print help" ); } fn print_skills_help() { println!( - "yoi-workspace-server skills\n\nUsage:\n yoi-workspace-server skills list [OPTIONS]\n yoi-workspace-server skills lint [OPTIONS]\n yoi-workspace-server skills show [OPTIONS]\n\nDescription:\n Uses the Workspace backend Skill catalog/lint/detail authority. Catalog output is lightweight and omits full SKILL.md bodies; detail output includes the body. allowed-tools and scripts are diagnostics only.\n\nOptions:\n --workspace Workspace root (defaults to cwd)\n -h, --help Print help" + "yoi-server skills\n\nUsage:\n yoi-server skills list [OPTIONS]\n yoi-server skills lint [OPTIONS]\n yoi-server skills show [OPTIONS]\n\nDescription:\n Uses the Workspace backend Skill catalog/lint/detail authority. Catalog output is lightweight and omits full SKILL.md bodies; detail output includes the body. allowed-tools and scripts are diagnostics only.\n\nOptions:\n --workspace Workspace root (defaults to cwd)\n -h, --help Print help" ); } fn print_serve_help() { println!( - "yoi-workspace-server serve\n\nUsage:\n yoi-workspace-server serve [OPTIONS]\n\nDescription:\n Serves the Workspace recorded in the Yoi server DB. Workspace records are stored in the XDG/Yoi data directory, and runtime sources are loaded from XDG runtimes.toml.\n\nOptions:\n --listen Listen address (default 127.0.0.1:8787)\n -h, --help Print help" + "yoi-server serve\n\nUsage:\n yoi-server serve [OPTIONS]\n\nDescription:\n Serves the Workspace recorded in the Yoi server DB. Workspace records are stored in the XDG/Yoi data directory, and runtime sources are loaded from XDG runtimes.toml.\n\nOptions:\n --listen Listen address (default 127.0.0.1:8787)\n -h, --help Print help" ); } diff --git a/crates/yoi/src/main.rs b/crates/yoi/src/main.rs index 80dcd26f..61469028 100644 --- a/crates/yoi/src/main.rs +++ b/crates/yoi/src/main.rs @@ -1671,8 +1671,8 @@ Backend-only commands: login Run Backend device login and save the API token Standalone binaries: - yoi-workspace-server Workspace Backend server/admin CLI - worker-runtime-rest-server Worker Runtime REST server + yoi-server Workspace Backend server/admin CLI + yoi-runtime Worker Runtime REST server Options: -h, --help Print help @@ -1826,8 +1826,8 @@ backend = "shared" assert!(TOP_LEVEL_HELP.contains("--backend ")); assert!(TOP_LEVEL_HELP.contains("/client/config.toml")); assert!(TOP_LEVEL_HELP.contains("/.yoi/client.config.toml")); - assert!(TOP_LEVEL_HELP.contains("yoi-workspace-server")); - assert!(TOP_LEVEL_HELP.contains("worker-runtime-rest-server")); + assert!(TOP_LEVEL_HELP.contains("yoi-server")); + assert!(TOP_LEVEL_HELP.contains("yoi-runtime")); assert!(!TOP_LEVEL_HELP.contains("yoi workspace")); assert!(!TOP_LEVEL_HELP.contains("yoi server")); assert!(!TOP_LEVEL_HELP.contains("TARGET_OPTIONS")); diff --git a/docker.nix b/docker.nix index d4b4e99d..ce56e548 100644 --- a/docker.nix +++ b/docker.nix @@ -231,7 +231,7 @@ in tag = imageTag; copyToRoot = runtimeRoot; config = { - Entrypoint = [ "/bin/worker-runtime-rest-server" ]; + Entrypoint = [ "/bin/yoi-runtime" ]; Cmd = [ "--bind" "0.0.0.0:38800" @@ -259,7 +259,7 @@ in tag = imageTag; copyToRoot = serverRoot; config = { - Entrypoint = [ "/bin/yoi-workspace-server" ]; + Entrypoint = [ "/bin/yoi-server" ]; Cmd = [ "serve" "--listen" diff --git a/docs/design/workspace-runtime-docker.md b/docs/design/workspace-runtime-docker.md index 03a08230..1b01f37c 100644 --- a/docs/design/workspace-runtime-docker.md +++ b/docs/design/workspace-runtime-docker.md @@ -32,10 +32,10 @@ Current image roles: ```text yoi-runtime:latest - worker-runtime-rest-server + yoi-runtime yoi-server:latest - yoi-workspace-server + yoi-server yoi-webui:latest nginx serving built WebUI assets and proxying API requests @@ -62,7 +62,7 @@ docker/workspace/.yoi/workspace.toml docker/workspace/.yoi/workspace-backend.local.toml ``` -The WebUI container serves static assets and proxies `/api` to the Backend Server. The Backend Server registers the Runtime container as a remote Runtime such as `docker-runtime`. The Runtime container runs `worker-runtime-rest-server` and owns Worker spawning/materialization for that runtime. +The WebUI container serves static assets and proxies `/api` to the Backend Server. The Backend Server registers the Runtime container as a remote Runtime such as `docker-runtime`. The Runtime container runs `yoi-runtime` and owns Worker spawning/materialization for that runtime. Container user and writable data directories matter: runtime/server images must be able to write their configured data directories and named volumes. The current local-image Compose setup avoids an image-level `User` override and sets data-directory permissions accordingly. diff --git a/docs/development/server-runtime-auth.md b/docs/development/server-runtime-auth.md index c2965608..7cc2090d 100644 --- a/docs/development/server-runtime-auth.md +++ b/docs/development/server-runtime-auth.md @@ -28,13 +28,13 @@ RUNTIME_BASE_URL=http://127.0.0.1:38800 From the Workspace Server host: ```bash -yoi-workspace-server identity init --server-id server-main +yoi-server identity init --server-id server-main ``` Show the public identity and copy the `public_key` value: ```bash -yoi-workspace-server identity show --json +yoi-server identity show --json ``` The Server private identity is stored in the Yoi data directory under the Server data root, currently: @@ -50,13 +50,13 @@ On Unix this file is written with `0600` permissions. Do not copy the private ke From the Runtime host, using the same Runtime storage flags that the Runtime server process will use: ```bash -worker-runtime-rest-server identity init --runtime-id runtime-main +yoi-runtime identity init --runtime-id runtime-main ``` Show the public identity and copy the `public_key` value: ```bash -worker-runtime-rest-server identity show --json +yoi-runtime identity show --json ``` By default, Runtime auth state is stored at: @@ -70,21 +70,21 @@ If the Runtime process is launched with `--fs-root` or `--fs-runtime-dir`, pass Example with explicit Runtime storage: ```bash -worker-runtime-rest-server identity init \ +yoi-runtime identity init \ --runtime-id runtime-main \ --fs-root /var/lib/yoi-runtime -worker-runtime-rest-server identity show \ +yoi-runtime identity show \ --json \ --fs-root /var/lib/yoi-runtime ``` ## 3. Register the Server public key on Runtime -On the Runtime host, register the Server public key copied from `yoi-workspace-server identity show --json`: +On the Runtime host, register the Server public key copied from `yoi-server identity show --json`: ```bash -worker-runtime-rest-server trust-server add \ +yoi-runtime trust-server add \ --server-id server-main \ --public-key '' ``` @@ -92,7 +92,7 @@ worker-runtime-rest-server trust-server add \ With explicit Runtime storage, keep using the same storage flags: ```bash -worker-runtime-rest-server trust-server add \ +yoi-runtime trust-server add \ --server-id server-main \ --public-key '' \ --fs-root /var/lib/yoi-runtime @@ -101,27 +101,27 @@ worker-runtime-rest-server trust-server add \ Verify: ```bash -worker-runtime-rest-server trust-server list --json +yoi-runtime trust-server list --json ``` ## 4. Register the Runtime public key and endpoint on Server -On the Workspace Server host, register the Runtime public key copied from `worker-runtime-rest-server identity show --json`: +On the Workspace Server host, register the Runtime public key copied from `yoi-runtime identity show --json`: ```bash -yoi-workspace-server trust-runtime add \ +yoi-server trust-runtime add \ --runtime-id runtime-main \ --base-url http://127.0.0.1:38800 \ --public-key '' \ --display-name 'Runtime main' ``` -This writes a trusted Runtime record to the Server DB. During `yoi-workspace-server serve`, active trusted Runtime records are loaded as remote Runtime sources and receive signed capability tokens. You do not need to duplicate the same Runtime in `runtimes.toml` for this trust-backed path. +This writes a trusted Runtime record to the Server DB. During `yoi-server serve`, active trusted Runtime records are loaded as remote Runtime sources and receive signed capability tokens. You do not need to duplicate the same Runtime in `runtimes.toml` for this trust-backed path. Verify: ```bash -yoi-workspace-server trust-runtime list --json +yoi-server trust-runtime list --json ``` ## 5. Start Runtime and Workspace Server @@ -129,7 +129,7 @@ yoi-workspace-server trust-runtime list --json Start Runtime with the same storage flags used during Runtime identity/trust setup: ```bash -worker-runtime-rest-server \ +yoi-runtime \ --bind 127.0.0.1:38800 ``` @@ -138,26 +138,26 @@ For repository builds, the equivalent cargo command is: ```bash cargo run -p worker-runtime \ --features ws-server,fs-store \ - --bin worker-runtime-rest-server \ + --bin yoi-runtime \ -- --bind 127.0.0.1:38800 ``` Start Workspace Server: ```bash -yoi-workspace-server serve --listen 127.0.0.1:8787 +yoi-server serve --listen 127.0.0.1:8787 ``` For repository builds: ```bash -cargo run -p yoi-workspace-server -- serve --listen 127.0.0.1:8787 +cargo run -p yoi-workspace-server --bin yoi-server -- serve --listen 127.0.0.1:8787 ``` If the Server DB has no workspace record yet, initialize it first: ```bash -yoi-workspace-server init --workspace +yoi-server init --workspace ``` ## Smoke checks @@ -165,8 +165,8 @@ yoi-workspace-server init --workspace Check both trust stores: ```bash -yoi-workspace-server trust-runtime list --json -worker-runtime-rest-server trust-server list --json +yoi-server trust-runtime list --json +yoi-runtime trust-server list --json ``` Check that Workspace Server can see Runtime workers through the authenticated path. From the CLI: @@ -186,13 +186,13 @@ Identity and trust records are intentionally not overwritten by default. Rotate Server identity: ```bash -yoi-workspace-server identity init --server-id server-main --replace +yoi-server identity init --server-id server-main --replace ``` After Server identity rotation, every Runtime that trusts that Server must be updated with the new Server public key: ```bash -worker-runtime-rest-server trust-server add \ +yoi-runtime trust-server add \ --server-id server-main \ --public-key '' \ --replace @@ -201,13 +201,13 @@ worker-runtime-rest-server trust-server add \ Rotate Runtime identity: ```bash -worker-runtime-rest-server identity init --runtime-id runtime-main --replace +yoi-runtime identity init --runtime-id runtime-main --replace ``` After Runtime identity rotation, Server must be updated with the new Runtime public key: ```bash -yoi-workspace-server trust-runtime add \ +yoi-server trust-runtime add \ --runtime-id runtime-main \ --base-url http://127.0.0.1:38800 \ --public-key '' \ @@ -219,13 +219,13 @@ yoi-workspace-server trust-runtime add \ Revoke a trusted Runtime on Server: ```bash -yoi-workspace-server trust-runtime revoke --runtime-id runtime-main +yoi-server trust-runtime revoke --runtime-id runtime-main ``` Remove a trusted Server from Runtime: ```bash -worker-runtime-rest-server trust-server revoke --server-id server-main +yoi-runtime trust-server revoke --server-id server-main ``` ## Troubleshooting @@ -235,7 +235,7 @@ worker-runtime-rest-server trust-server revoke --server-id server-main The Server DB contains trusted Runtime records, but the Server signing identity file does not exist. Run: ```bash -yoi-workspace-server identity init --server-id server-main +yoi-server identity init --server-id server-main ``` If the identity was created in another environment, ensure the Server process is using the same Yoi data directory. @@ -245,8 +245,8 @@ If the identity was created in another environment, ensure the Server process is Runtime only enables signed capability-token auth when both a Runtime identity and at least one trusted Server are present in its auth file. Check: ```bash -worker-runtime-rest-server identity show --json -worker-runtime-rest-server trust-server list --json +yoi-runtime identity show --json +yoi-runtime trust-server list --json ``` Also confirm the Runtime process was started with the same `--fs-root` / `--fs-runtime-dir` used for setup. @@ -256,8 +256,8 @@ Also confirm the Runtime process was started with the same `--fs-root` / `--fs-r Confirm the `--runtime-id` registered on Server exactly matches the Runtime identity id: ```bash -worker-runtime-rest-server identity show --json -yoi-workspace-server trust-runtime list --json +yoi-runtime identity show --json +yoi-server trust-runtime list --json ``` `RUNTIME_ID` is the token audience; mismatches are rejected by Runtime. diff --git a/package.nix b/package.nix index f079abe1..1250811e 100644 --- a/package.nix +++ b/package.nix @@ -43,7 +43,7 @@ rustPlatform.buildRustPackage rec { filter = sourceFilter; }; - cargoHash = "sha256-iZaTREhL/aLixn67A1+Gi9opqh2j/yyFuGMyBBvuATM="; + cargoHash = "sha256-R33Ty4414wGkqnwCt08zbDQbVu9ggMC5I3ZawgloNT0="; depsExtraArgs = { # Older fetchCargoVendor utilities used crates.io's API download endpoint, @@ -92,8 +92,8 @@ rustPlatform.buildRustPackage rec { ]; postBuild = '' - cargo build --offline --profile release -p yoi-workspace-server --bin yoi-workspace-server - cargo build --offline --profile release -p worker-runtime --bin worker-runtime-rest-server --features ws-server,fs-store + cargo build --offline --profile release -p yoi-workspace-server --bin yoi-server + cargo build --offline --profile release -p worker-runtime --bin yoi-runtime --features ws-server,fs-store ''; # The package check is a credential-free install smoke check below. Running the @@ -105,16 +105,16 @@ rustPlatform.buildRustPackage rec { runHook preInstall yoi_bin=$(find . -type f -name yoi | head -n 1) - workspace_server_bin=$(find . -type f -name yoi-workspace-server | head -n 1) - worker_runtime_bin=$(find . -type f -name worker-runtime-rest-server | head -n 1) + workspace_server_bin=$(find . -type f -name yoi-server | head -n 1) + worker_runtime_bin=$(find . -type f -name yoi-runtime | head -n 1) if [ -z "$yoi_bin" ] || [ -z "$workspace_server_bin" ] || [ -z "$worker_runtime_bin" ]; then echo "built binaries not found" >&2 - find . -maxdepth 6 -type f \( -name yoi -o -name yoi-workspace-server -o -name worker-runtime-rest-server \) -print >&2 + find . -maxdepth 6 -type f \( -name yoi -o -name yoi-server -o -name yoi-runtime \) -print >&2 exit 1 fi install -Dm755 "$yoi_bin" "$out/bin/yoi" - install -Dm755 "$workspace_server_bin" "$out/bin/yoi-workspace-server" - install -Dm755 "$worker_runtime_bin" "$out/bin/worker-runtime-rest-server" + install -Dm755 "$workspace_server_bin" "$out/bin/yoi-server" + install -Dm755 "$worker_runtime_bin" "$out/bin/yoi-runtime" runHook postInstall ''; @@ -125,10 +125,10 @@ rustPlatform.buildRustPackage rec { "$out/bin/yoi" worker --help >/dev/null test -x "$out/bin/yoi" - test -x "$out/bin/yoi-workspace-server" - test -x "$out/bin/worker-runtime-rest-server" - "$out/bin/yoi-workspace-server" --help >/dev/null - "$out/bin/worker-runtime-rest-server" --help >/dev/null + test -x "$out/bin/yoi-server" + test -x "$out/bin/yoi-runtime" + "$out/bin/yoi-server" --help >/dev/null + "$out/bin/yoi-runtime" --help >/dev/null test ! -e "$out/bin/yoi-pod" test ! -e "$out/share/yoi/resources" if "$out/bin/yoi" --session not-a-uuid 2>yoi.err; then diff --git a/resources/workspace-backend.default.toml b/resources/workspace-backend.default.toml index 49707930..4502ae1d 100644 --- a/resources/workspace-backend.default.toml +++ b/resources/workspace-backend.default.toml @@ -1,14 +1,14 @@ # Workspace Backend local config template. # -# `yoi-workspace-server init` copies this packaged template to +# `yoi-server init` copies this packaged template to # `.yoi/workspace-backend.local.toml` without overwriting an existing file. # The `.local` file is intentionally git-ignored. # # Print the latest packaged template with: -# yoi-workspace-server config default +# yoi-server config default # # Compare the local config with the latest packaged template with: -# yoi-workspace-server config diff +# yoi-server config diff # # Omit a key to use the built-in fallback. TOML has no `null`, so optional # settings are represented by leaving the key commented out. diff --git a/scripts/dev-workspace.sh b/scripts/dev-workspace.sh index 349db6c3..45eca3e4 100644 --- a/scripts/dev-workspace.sh +++ b/scripts/dev-workspace.sh @@ -57,8 +57,8 @@ usage() { Usage: $(basename "$0") Manage the local Yoi development stack for this checkout: - runtime target/debug/worker-runtime-rest-server --bind $RUNTIME_BIND - backend target/debug/yoi-workspace-server serve --listen $BACKEND_LISTEN + runtime target/debug/yoi-runtime --bind $RUNTIME_BIND + backend target/debug/yoi-server serve --listen $BACKEND_LISTEN frontend deno run -A npm:vite@7.2.7 dev --host $FRONTEND_HOST --port $FRONTEND_PORT (cwd: web/workspace) Actions: @@ -307,7 +307,7 @@ build_runtime_backend() { log "building runtime binary" ( cd "$ROOT_DIR" - run_cargo build -p worker-runtime --features ws-server,fs-store --bin worker-runtime-rest-server + run_cargo build -p worker-runtime --features ws-server,fs-store --bin yoi-runtime ) else log "runtime disabled by YOI_DEV_RUNTIME_ENABLED=0; skipping runtime build" @@ -316,7 +316,7 @@ build_runtime_backend() { log "building backend binary" ( cd "$ROOT_DIR" - run_cargo build -p yoi-workspace-server --bin yoi-workspace-server + run_cargo build -p yoi-workspace-server --bin yoi-server ) } @@ -327,7 +327,7 @@ start_runtime() { fi local port runtime_bin port="$(port_for_addr "$RUNTIME_BIND")" - runtime_bin="$ROOT_DIR/target/debug/worker-runtime-rest-server" + runtime_bin="$ROOT_DIR/target/debug/yoi-runtime" if [[ ! -x "$runtime_bin" ]]; then printf 'runtime binary not found or not executable: %s\n' "$runtime_bin" >&2 return 1 @@ -339,7 +339,7 @@ start_runtime() { start_backend() { local port backend_bin port="$(port_for_addr "$BACKEND_LISTEN")" - backend_bin="$ROOT_DIR/target/debug/yoi-workspace-server" + backend_bin="$ROOT_DIR/target/debug/yoi-server" if [[ ! -x "$backend_bin" ]]; then printf 'backend binary not found or not executable: %s\n' "$backend_bin" >&2 return 1 diff --git a/web/workspace/README.md b/web/workspace/README.md index 613364d8..91957522 100644 --- a/web/workspace/README.md +++ b/web/workspace/README.md @@ -3,7 +3,7 @@ SvelteKit static SPA for the Yoi workspace control plane. The frontend is intentionally static. Workspace authority, validation, and API -behavior live in the Rust `yoi-workspace-server` backend. +behavior live in the Rust `yoi-server` backend. ## Development @@ -30,12 +30,12 @@ printed by `deno task dev`. If you want to run the backend from the repository root instead: ```bash -cargo run -p yoi-workspace-server -- serve --listen 127.0.0.1:8787 +cargo run -p yoi-workspace-server --bin yoi-server -- serve --listen 127.0.0.1:8787 ``` The backend reads Workspace records from the Yoi server DB at `/server/server.db`. Run -`cargo run -p yoi-workspace-server -- init --workspace .` first when the server +`cargo run -p yoi-workspace-server --bin yoi-server -- init --workspace .` first when the server DB has not been initialized. ## Static build diff --git a/web/workspace/deno.json b/web/workspace/deno.json index 54985b29..91c45a35 100644 --- a/web/workspace/deno.json +++ b/web/workspace/deno.json @@ -4,7 +4,7 @@ "tasks": { "install": "deno install", "dev": "deno run -A npm:vite@7.2.7 dev", - "dev:backend": "cd ../.. && cargo run -p yoi-workspace-server -- serve --listen 127.0.0.1:8787", + "dev:backend": "cd ../.. && cargo run -p yoi-workspace-server --bin yoi-server -- serve --listen 127.0.0.1:8787", "check": "deno run -A npm:@sveltejs/kit@2.49.4 sync && deno run -A npm:svelte-check@4.3.4 --tsconfig ./tsconfig.json", "test": "deno test --allow-read=src --allow-env=VSCODE_TEXTMATE_DEBUG src/lib/workspace/auth/model.test.ts src/lib/workspace/api/http.test.ts src/lib/workspace/console/chat-submit.test.ts src/lib/workspace/console/composer-command.test.ts src/lib/workspace/console/composer-completion.test.ts src/lib/workspace/console/markdown.test.ts src/lib/workspace/console/model.test.ts src/lib/workspace/console/worker-console.ui.test.ts src/lib/workspace/settings/model.test.ts src/lib/workspace/sidebar/workers.test.ts src/lib/workspace/sidebar/worker-launch.test.ts src/lib/workspace/sidebar/repository-nav.test.ts", "build": "deno run -A npm:vite@7.2.7 build",