mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
Merge origin/main: pull release 0.5.13 updates
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
name: rust-ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
noop:
|
||||
name: No-op CI (placeholder)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Success
|
||||
run: echo "rust-ci placeholder job succeeded"
|
||||
|
||||
results:
|
||||
name: CI results (required)
|
||||
needs: [noop]
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
steps:
|
||||
- run: |
|
||||
[[ "${{ needs.noop.result }}" == "success" ]] || exit 1
|
||||
@@ -0,0 +1,3 @@
|
||||
version = "12"
|
||||
|
||||
[overrides]
|
||||
@@ -7,6 +7,21 @@
|
||||
|
||||
- (none)
|
||||
|
||||
## [0.5.13] - 2025-11-27
|
||||
|
||||
- CLI: bump the npm package and platform binaries to 0.5.13 so installs grab the latest build. (285c8ca7)
|
||||
- CI: add a placeholder rust-ci workflow so required checks stay green during migration. (6d6ee6cf)
|
||||
|
||||
## [0.5.12] - 2025-11-27
|
||||
|
||||
- CLI: bump npm metadata to 0.5.12 so fresh installs pull the latest binaries. (9f79140)
|
||||
- CI: drop the redundant CodeQL workflow to stop conflicting security scans. (ff71e00)
|
||||
|
||||
## [0.5.10] - 2025-11-27
|
||||
|
||||
- CLI: bump the npm package metadata to 0.5.10 so installs pick up the latest build. (16b47ef)
|
||||
- CI: add a Ruby-free CodeQL workflow to keep security scanning enabled without extra dependencies. (ae6a8d3)
|
||||
|
||||
## [0.5.8] - 2025-11-26
|
||||
|
||||
- Docs: publish the new CLAUDE guidance and move working references into docs/working for quicker updates. (da89924b)
|
||||
|
||||
@@ -29,7 +29,56 @@ fn default_pathext_or_default() -> Vec<String> {
|
||||
.map(|s| s.to_ascii_lowercase())
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_else(|| vec![".com".into(), ".exe".into(), ".bat".into(), ".cmd".into()])
|
||||
// Keep a sane default set even if PATHEXT is missing or empty. Include
|
||||
// .ps1 because PowerShell users can invoke scripts without specifying
|
||||
// the extension; CreateProcess still resolves fine when we provide the
|
||||
// full path with extension.
|
||||
.unwrap_or_else(|| vec![
|
||||
".com".into(),
|
||||
".exe".into(),
|
||||
".bat".into(),
|
||||
".cmd".into(),
|
||||
".ps1".into(),
|
||||
])
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn resolve_in_path(command: &str) -> Option<std::path::PathBuf> {
|
||||
use std::path::Path;
|
||||
|
||||
let cmd_path = Path::new(command);
|
||||
|
||||
// Absolute or contains separators: respect it directly if it points to a file.
|
||||
if cmd_path.is_absolute() || command.contains(['\\', '/']) {
|
||||
if cmd_path.is_file() {
|
||||
return Some(cmd_path.to_path_buf());
|
||||
}
|
||||
}
|
||||
|
||||
// Search PATH with PATHEXT semantics and return the first hit.
|
||||
let exts = default_pathext_or_default();
|
||||
let Some(path_os) = std::env::var_os("PATH") else { return None; };
|
||||
let has_ext = cmd_path.extension().is_some();
|
||||
for dir in std::env::split_paths(&path_os) {
|
||||
if dir.as_os_str().is_empty() {
|
||||
continue;
|
||||
}
|
||||
if has_ext {
|
||||
let candidate = dir.join(command);
|
||||
if candidate.is_file() {
|
||||
return Some(candidate);
|
||||
}
|
||||
} else {
|
||||
for ext in &exts {
|
||||
let candidate = dir.join(format!("{command}{ext}"));
|
||||
if candidate.is_file() {
|
||||
return Some(candidate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
|
||||
use crate::agent_defaults::{agent_model_spec, default_params_for};
|
||||
@@ -1077,30 +1126,23 @@ fn command_exists(cmd: &str) -> bool {
|
||||
}
|
||||
} else {
|
||||
// Read-only path: use prior behavior
|
||||
// On Windows, proactively resolve the command to an absolute path so
|
||||
// we bypass PATHEXT quirks (e.g., missing PATHEXT or PowerShell-only
|
||||
// shims). This mirrors the write-path resolver above.
|
||||
#[cfg(target_os = "windows")]
|
||||
if let Some(resolved) = resolve_in_path(&command_for_spawn) {
|
||||
cmd = Command::new(resolved);
|
||||
}
|
||||
|
||||
cmd.args(final_args.clone());
|
||||
match cmd.output().await {
|
||||
Ok(o) => o,
|
||||
Err(e) => {
|
||||
// Only fall back for external CLIs (not the built-in code/codex path)
|
||||
if family == "codex" || family == "code" {
|
||||
return Err(format!("Failed to execute {}: {}", model, e));
|
||||
if e.kind() == std::io::ErrorKind::NotFound {
|
||||
return Err(format_agent_not_found_error(&command, &command_for_spawn));
|
||||
}
|
||||
let mut fb = match current_code_binary_path() {
|
||||
Ok(p) => Command::new(p),
|
||||
Err(e2) => {
|
||||
return Err(format!(
|
||||
"Failed to execute {} and could not resolve built-in fallback: {} / {}",
|
||||
model, e, e2
|
||||
))
|
||||
}
|
||||
};
|
||||
fb.args(final_args.clone());
|
||||
fb.output().await.map_err(|e2| {
|
||||
format!(
|
||||
"Failed to execute {} ({}). Built-in fallback also failed: {}",
|
||||
model, e, e2
|
||||
)
|
||||
})?
|
||||
|
||||
return Err(format!("Failed to execute {}: {}", model, e));
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1173,10 +1215,17 @@ pub(crate) fn should_use_current_exe_for_agent(
|
||||
|
||||
fn resolve_program_path(use_current_exe: bool, command_for_spawn: &str) -> Result<std::path::PathBuf, String> {
|
||||
if use_current_exe {
|
||||
current_code_binary_path()
|
||||
} else {
|
||||
Ok(std::path::PathBuf::from(command_for_spawn))
|
||||
return current_code_binary_path();
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
if let Some(p) = resolve_in_path(command_for_spawn) {
|
||||
return Ok(p);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(std::path::PathBuf::from(command_for_spawn))
|
||||
}
|
||||
|
||||
fn strip_model_flags(args: &mut Vec<String>) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@just-every/code",
|
||||
"version": "0.5.8",
|
||||
"version": "0.5.13",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
|
||||
"bin": {
|
||||
@@ -35,10 +35,10 @@
|
||||
"prettier": "^3.3.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@just-every/code-darwin-arm64": "0.5.8",
|
||||
"@just-every/code-darwin-x64": "0.5.8",
|
||||
"@just-every/code-linux-x64-musl": "0.5.8",
|
||||
"@just-every/code-linux-arm64-musl": "0.5.8",
|
||||
"@just-every/code-win32-x64": "0.5.8"
|
||||
"@just-every/code-darwin-arm64": "0.5.13",
|
||||
"@just-every/code-darwin-x64": "0.5.13",
|
||||
"@just-every/code-linux-x64-musl": "0.5.13",
|
||||
"@just-every/code-linux-arm64-musl": "0.5.13",
|
||||
"@just-every/code-win32-x64": "0.5.13"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## @just-every/code v0.5.8
|
||||
Fresh docs polish plus the npm roll-forward for the 0.5.8 drop.
|
||||
## @just-every/code v0.5.13
|
||||
A maintenance refresh that keeps installs aligned with the latest binaries while ensuring CI stays green during the workflow transition.
|
||||
|
||||
### Changes
|
||||
- Docs: publish the new CLAUDE guidance and move working references into docs/working for quicker updates.
|
||||
- CLI: bump the npm package metadata to 0.5.8 so installs pick up the latest build.
|
||||
- CLI: bump the npm package and platform binaries to 0.5.13 so installs grab the latest build.
|
||||
- CI: add a placeholder rust-ci workflow so required checks stay green during migration.
|
||||
|
||||
### Install
|
||||
```
|
||||
@@ -11,4 +11,4 @@ npm install -g @just-every/code@latest
|
||||
code
|
||||
```
|
||||
|
||||
Compare: https://github.com/just-every/code/compare/v0.5.7...v0.5.8
|
||||
Compare: https://github.com/just-every/code/compare/v0.5.12...v0.5.13
|
||||
|
||||
Reference in New Issue
Block a user