Compare commits

...
4 Commits
Author SHA1 Message Date
bherbruck 66d13059dd Release 0.13.1 2026-10-15 21:56:43 +00:00
bherbruckandClaude Opus 5.5 800ea40c0d Release 0.13.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:56:35 +00:00
bherbruck 20442eecd3 Agent chat on Windows: start npm agents through their .cmd shim
npm puts a Unix shell script with the bare name (codex-acp,
claude-code-acp, gemini) beside the .cmd shim. The lookup tried the bare
name first, so every npm-installed agent failed with "not a valid Win32
application (os error 193)". Windows now only considers .exe/.cmd/.bat,
and a command saved with the bare path runs the shim beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 60ea8c69d2)
2026-10-15 21:51:01 +00:00
bherbruckandClaude Opus 5.5 5823900439 Release 0.13.0 (#1506)
Version 0.13.0, plus the Windows 32-bit and macOS release-build fixes from #1513.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:22:28 -04:00
4 changed files with 59 additions and 20 deletions

No files matched your search

Generated
+15 -15
View File
@@ -3704,7 +3704,7 @@ dependencies = [
[[package]]
name = "solidcraft"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"block2 0.6.2",
"eframe",
@@ -3733,7 +3733,7 @@ dependencies = [
[[package]]
name = "solidcraft-cli"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"serde_json",
"solidcraft-engine",
@@ -3742,7 +3742,7 @@ dependencies = [
[[package]]
name = "solidcraft-derive"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"proc-macro2",
"quote",
@@ -3751,7 +3751,7 @@ dependencies = [
[[package]]
name = "solidcraft-doc"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"log",
"serde",
@@ -3768,7 +3768,7 @@ dependencies = [
[[package]]
name = "solidcraft-engine"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"log",
"serde",
@@ -3784,7 +3784,7 @@ dependencies = [
[[package]]
name = "solidcraft-geom"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"serde",
"serde_json",
@@ -3793,7 +3793,7 @@ dependencies = [
[[package]]
name = "solidcraft-gpu"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"log",
"naga",
@@ -3806,7 +3806,7 @@ dependencies = [
[[package]]
name = "solidcraft-io"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"quick-xml",
"serde",
@@ -3821,7 +3821,7 @@ dependencies = [
[[package]]
name = "solidcraft-kernel"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"log",
"rayon",
@@ -3839,7 +3839,7 @@ dependencies = [
[[package]]
name = "solidcraft-mcp"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"serde_json",
"solidcraft-engine",
@@ -3847,7 +3847,7 @@ dependencies = [
[[package]]
name = "solidcraft-render"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"image",
"moxcms",
@@ -3860,7 +3860,7 @@ dependencies = [
[[package]]
name = "solidcraft-sketch"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"serde",
"serde_json",
@@ -3871,7 +3871,7 @@ dependencies = [
[[package]]
name = "solidcraft-ui-egui"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"egui",
"egui-wgpu",
@@ -3892,7 +3892,7 @@ dependencies = [
[[package]]
name = "solidcraft-web"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"eframe",
"egui",
@@ -5381,7 +5381,7 @@ checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7"
[[package]]
name = "xtask"
version = "0.13.0"
version = "0.13.1"
dependencies = [
"serde_json",
"sha2",
+1 -1
View File
@@ -5,7 +5,7 @@ members = ["crates/*", "apps/*", "xtask"]
exclude = ["vendor"]
[workspace.package]
version = "0.13.0"
version = "0.13.1"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
+39 -3
View File
@@ -184,13 +184,30 @@ pub fn search_dirs() -> Vec<PathBuf> {
dirs
}
/// The first `program` in `dirs` (on Windows also with `.exe`/`.cmd`).
/// The first `program` in `dirs` (on Windows with `.exe`/`.cmd`/`.bat`).
pub fn find_in(program: &str, dirs: &[PathBuf]) -> Option<PathBuf> {
let names: Vec<String> =
if cfg!(windows) { ["", ".exe", ".cmd", ".bat"].iter().map(|e| format!("{program}{e}")).collect() } else { vec![program.to_string()] };
let names = names_for(program, cfg!(windows));
dirs.iter().flat_map(|d| names.iter().map(move |n| d.join(n))).find(|p| p.is_file())
}
/// The file names `program` can have. On Windows only ones it can run: npm puts a Unix shell
/// script with the bare name next to the `.cmd` shim, and starting that fails with "not a valid
/// Win32 application".
fn names_for(program: &str, windows: bool) -> Vec<String> {
if windows { [".exe", ".cmd", ".bat"].iter().map(|e| format!("{program}{e}")).collect() } else { vec![program.to_string()] }
}
/// A Windows command saved without an extension (`…\npm\codex-acp`, from an older version's
/// lookup): the `.exe`/`.cmd`/`.bat` beside it, if there is one.
pub fn runnable_sibling(program: &Path) -> Option<PathBuf> {
if program.extension().is_some() {
return None;
}
let dir = program.parent()?;
let name = program.file_name()?.to_str()?;
names_for(name, true).into_iter().map(|n| dir.join(n)).find(|p| p.is_file())
}
/// `program --version`'s first line, or `None` after `limit` (the probe is then stopped).
fn version(program: &Path, limit: Duration) -> Option<String> {
let mut cmd = if cfg!(windows) && program.extension().is_some_and(|e| e.eq_ignore_ascii_case("cmd") || e.eq_ignore_ascii_case("bat")) {
@@ -279,6 +296,25 @@ mod tests {
let _ = std::fs::remove_dir_all(root);
}
#[test]
fn on_windows_only_runnable_shims_are_candidates() {
// npm's bare `codex-acp` is a shell script; Windows can't start it (os error 193).
assert_eq!(names_for("codex-acp", true), ["codex-acp.exe", "codex-acp.cmd", "codex-acp.bat"]);
assert_eq!(names_for("codex-acp", false), ["codex-acp"]);
}
#[test]
fn a_saved_bare_npm_path_runs_its_cmd_shim() {
let root = std::env::temp_dir().join(format!("sc-agent-shim-{}", std::process::id()));
std::fs::create_dir_all(&root).unwrap();
std::fs::write(root.join("codex-acp"), "#!/bin/sh").unwrap();
std::fs::write(root.join("codex-acp.cmd"), "@echo off").unwrap();
assert_eq!(runnable_sibling(&root.join("codex-acp")), Some(root.join("codex-acp.cmd")));
assert_eq!(runnable_sibling(&root.join("codex-acp.cmd")), None);
assert_eq!(runnable_sibling(&root.join("gemini")), None);
let _ = std::fs::remove_dir_all(root);
}
#[test]
fn the_version_number_is_picked_out_of_the_line() {
assert_eq!(version_of("@agentclientprotocol/codex-acp 2.2.2"), "2.2.2");
+4 -1
View File
@@ -51,8 +51,11 @@ impl ProcessHandle {
}
}
/// On Windows, npm installs `.cmd` shims, which only `cmd.exe` runs.
/// On Windows, npm installs `.cmd` shims, which only `cmd.exe` runs. A command saved as the bare
/// npm path (a shell script there) runs the shim beside it.
fn command_for(program: &str) -> Command {
let shim = if cfg!(windows) { super::discover::runnable_sibling(std::path::Path::new(program)) } else { None };
let program = shim.as_deref().and_then(|p| p.to_str()).unwrap_or(program);
let lower = program.to_ascii_lowercase();
if cfg!(windows) && (lower.ends_with(".cmd") || lower.ends_with(".bat")) {
let mut c = Command::new("cmd");