π OpenHands: AI-Driven Development
fix: bump agent-server SDK to 1.23.1 (#782)
Rohit Malhotra45da5606d6b3
diff --git a/AGENTS.md b/AGENTS.mdindex afe2c3984f..805cc8e525 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -387,10 +387,10 @@ When adding code that needs a new string, decide up front which rule it falls un- `scripts/dev-safe.mjs` uses `uvx` for temporary agent-server installation β no permanent `uv tool install` needed. Environment variables (highest precedence first):- `OH_AGENT_SERVER_LOCAL_PATH` β absolute path to a local `software-agent-sdk` checkout. Runs the local checkout via `uvx` with `--with-editable` for `openhands-sdk`/`openhands-tools`/`openhands-workspace` and `--reinstall` for `openhands-agent-server`, so SDK edits are picked up on restart. Highest precedence.- `OH_AGENT_SERVER_GIT_REF` β git commit SHA or branch name (takes precedence over version)- - `OH_AGENT_SERVER_VERSION` β specific PyPI version (e.g., "1.23.0")+ - `OH_AGENT_SERVER_VERSION` β specific PyPI version (e.g., "1.23.1")- `OH_SECRET_KEY` β secret key for settings encryption; uses a static default for local dev since it's needed for reading persisted encrypted values across restarts- `SESSION_API_KEY` / `OH_SESSION_API_KEYS_0` / `VITE_SESSION_API_KEY` β session API key for agent-server authentication; auto-generated using `crypto.randomBytes(32)` if not set, passed to both agent-server (`OH_SESSION_API_KEYS_0`) and frontend (`VITE_SESSION_API_KEY`)- - Default: released PyPI version `1.23.0` for agent-server SDK libraries+ - Default: released PyPI version `1.23.1` for agent-server SDK libraries- Security: `scripts/dev-safe.mjs` and `scripts/dev-with-automation.mjs` auto-generate random API keys when needed and persist the defaults so static builds, localStorage, and restarted services stay in sync:- `SESSION_API_KEY` β 64-character hex (256-bit) for agent-server API authentication; persisted at `~/.openhands/agent-canvas/session-api-key.txt` unless overridden via env vardiff --git a/__tests__/scripts/dev-safe.test.ts b/__tests__/scripts/dev-safe.test.tsindex 9c0247e51d..eb3033ab4f 100644--- a/__tests__/scripts/dev-safe.test.ts+++ b/__tests__/scripts/dev-safe.test.ts@@ -319,16 +319,16 @@ describe("buildAgentServerCommand", () => {// Defaults to the released PyPI version with all SDK packages pinned to same versionexpect(cmd.args).toEqual(["--from",- "openhands-agent-server==1.23.0",+ "openhands-agent-server==1.23.1","--with",- "openhands-sdk==1.23.0",+ "openhands-sdk==1.23.1","--with",- "openhands-tools==1.23.0",+ "openhands-tools==1.23.1","--with",- "openhands-workspace==1.23.0",+ "openhands-workspace==1.23.1","agent-server",]);- expect(cmd.source).toBe("PyPI (1.23.0, default)");+ expect(cmd.source).toBe("PyPI (1.23.1, default)");});it("uses specific PyPI version when OH_AGENT_SERVER_VERSION is set with all packages pinned", () => {diff --git a/config/defaults.json b/config/defaults.jsonindex c1deb0e830..8e9438cd77 100644--- a/config/defaults.json+++ b/config/defaults.json@@ -2,7 +2,7 @@"_comment": "Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.","versions": {- "agentServer": "1.23.0",+ "agentServer": "1.23.1","automation": "1.0.0a5","automationSdk": "1.22.1"},diff --git a/scripts/check-sdk-version-sync.mjs b/scripts/check-sdk-version-sync.mjsindex fcb575b745..c1ba539a3f 100644--- a/scripts/check-sdk-version-sync.mjs+++ b/scripts/check-sdk-version-sync.mjs@@ -19,7 +19,7 @@** Usage:* node scripts/check-sdk-version-sync.mjs- * EXPECTED_SDK_VERSION=1.23.0 node scripts/check-sdk-version-sync.mjs+ * EXPECTED_SDK_VERSION=1.23.1 node scripts/check-sdk-version-sync.mjs* node scripts/check-sdk-version-sync.mjs --check-pypi** Environment variables:@@ -79,7 +79,7 @@ Triggering from other repos:-H "Authorization: token \$GITHUB_TOKEN" \\-H "Accept: application/vnd.github.v3+json" \\https://api.github.com/repos/OpenHands/agent-canvas/dispatches \\- -d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.23.0"}}'+ -d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.23.1"}}'`);process.exit(0);}@@ -268,9 +268,9 @@ async function fetchPyPIDependencies(packageName, version) {* Parse PyPI requires_dist array and extract SDK package versions** PyPI returns dependencies in PEP 508 format like:- * "openhands-sdk>=1.23.0,<2.0.0"- * "openhands-tools==1.23.0"- * "openhands-workspace (>=1.23.0)"+ * "openhands-sdk>=1.23.1,<2.0.0"+ * "openhands-tools==1.23.1"+ * "openhands-workspace (>=1.23.1)"*/function parseSdkVersionsFromRequiresDist(requiresDist) {const versions = {};@@ -284,7 +284,7 @@ function parseSdkVersionsFromRequiresDist(requiresDist) {}// Extract the version number - look for patterns like:- // ">=1.23.0", "==1.23.0", "(>=1.23.0)", "~=1.23.0"+ // ">=1.23.1", "==1.23.1", "(>=1.23.1)", "~=1.23.1"// After the package name and before any comma or closing parenconst versionPattern = /[><=~!]+\s*([0-9]+(?:\.[0-9]+)*)/;const match = dep.match(versionPattern);diff --git a/scripts/dev-safe.mjs b/scripts/dev-safe.mjsindex d865facb8d..ba0ca4431e 100644--- a/scripts/dev-safe.mjs+++ b/scripts/dev-safe.mjs@@ -337,7 +337,7 @@ export function validateFrontendDependencies(* edits are picked up without a manual reinstall. The agent-server itself* is rebuilt from local source on each invocation (--reinstall).* - OH_AGENT_SERVER_GIT_REF: Git commit SHA or branch name- * - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.23.0")+ * - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.23.1")** If none are set, defaults to the released version specified by* DEFAULT_AGENT_SERVER_VERSION. Set OH_AGENT_SERVER_GIT_REF to use adiff --git a/src/mocks/settings-handlers.ts b/src/mocks/settings-handlers.tsindex ab91a3d3e4..54d4677222 100644--- a/src/mocks/settings-handlers.ts+++ b/src/mocks/settings-handlers.ts@@ -488,7 +488,7 @@ const MOCK_VERIFIED_MODELS_BY_PROVIDER = MOCK_MODELS.reduce<return acc;}, {});-const MOCK_AGENT_SERVER_VERSION = "1.23.0";+const MOCK_AGENT_SERVER_VERSION = "1.23.1";// --- Handlers for options/config/settings ---// Uses wildcard "*" prefix to match both relative paths and absolute URLs