Repository navigation
feat: add pyhon cli for all language and platform - #67
Merged
Merged
Conversation
… CLI Make the Python agentarts CLI the single CLI for all language SDKs by adding Java agent support and a PyInstaller-built standalone binary. Java support (branch on base.language == java*): - init: add java-basic / java-agentscope templates (pom.xml, Agent.java, eclipse-temurin Dockerfile). Basic template main() now reads PORT/HOST env so dev can spawn it without a launcher. - config: detect_dependency_file() now recognizes pom.xml; generate_dockerfile emits the Java Dockerfile for Java agents. - dev: new dev_java.py -- mvn compile + build-classpath, assemble classpath, spawn "java -cp <cp> <mainClass>" via @argfile (bypasses cmdline length limits), poll /ping for readiness, 750ms source-mtime poll hot reload with process-group termination. No DevServerLauncher -- zero Java CLI code needed. - deploy: run "mvn -DskipTests package" before docker build for Java agents so the Dockerfile's "COPY target/<name>.jar" resolves. Standalone binary: - packaging/agentarts.spec: onefile bundle, collect_all for agentarts + huaweicloudsdkcore/agentidentity/iam/swr + uvicorn/starlette, hidden import six (huaweicloudsdk dynamic imports). Minimal set -- no fastapi/mcp. - .github/workflows/release-binary.yml: ubuntu/windows/macos matrix build, per-command smoke test (all 9 commands --help), attach to GitHub Release. - .gitignore: un-ignore packaging/agentarts.spec. Verified: Java init->dev(hot reload)->invoke, Python regression, and a 30MB binary running all 9 commands with no Python on PATH.
Add a curl|sh installer and document the standalone binary install path so Linux/macOS users get a one-click install with no Python required. - install.sh: detects OS/arch, downloads the matching Release asset, extracts the generic-named `agentarts` binary, installs to ~/.local/bin (or /usr/local/bin under sudo), prints PATH help, and notes the JDK+Maven prerequisite for Java agents. AGENTARTS_DOWNLOAD_URL / AGENTARTS_BIN_DIR overrides for mirrors/custom locations. - release-binary.yml: add ubuntu-24.04-arm (linux/arm64) to the matrix; archive contains the generic name `agentarts` so the installer extracts a consistent binary name; Windows code-sign step moved before archiving and signs release/agentarts.exe. - README: "Install the standalone CLI binary" subsection with the one-liner, manual-download table, and the Java toolchain caveat. Verified the installer end-to-end against a local tarball (download, extract, install, --version).
…jects The "user has existing code, just wants a config" path goes through `agentarts config`, not `init`. But `add_agent` built BaseConfig without setting language/base_image, so they defaulted to python3/python:3.10-slim -- meaning a Java user who ran `agentarts config -e com.example.Agent --dependency-file pom.xml` got language=python3, and `dev`/`deploy` would not take the Java branch. - add_agent: add a `language` param; when not given, infer from dependency_file (pom.xml -> java17) / entrypoint (no-colon dotted -> java17); set the matching base_image (eclipse-temurin:17-jre vs python:3.10-slim). Applies on both the new-agent and update paths. - config command: add a --language/-l override; docstring now points existing-code users here (instead of init). - helpers: infer_language(), default_base_image(). Verified: `agentarts config -n demo -e com.example.Agent --dependency-file pom.xml` now yields language=java17 + base_image=eclipse-temurin:17-jre + Java Dockerfile; requirements.txt yields python3 + python:3.10-slim + Python Dockerfile.
…tall Close the Windows gap so all three platforms have a zero-prerequisite one-command install, and document the uv (package-managed) path alongside. - install.ps1: PowerShell equivalent of install.sh. Downloads the Windows zip from the latest GitHub Release, extracts agentarts.exe, installs to %LOCALAPPDATA%\Programs\agentarts, and adds the dir to the user PATH (persistent). Uses throw (not exit) on error so `irm | iex` reports the failure without closing the user's terminal. Same AGENTARTS_BIN_DIR / AGENTARTS_DOWNLOAD_URL env overrides as install.sh. JDK+Maven note for Java agents included. - README "Install the standalone CLI binary": now lists Linux/macOS (curl|sh) and Windows (irm|iex) one-liners side by side, then an optional `uv tool install agentarts-sdk` section (isolated, upgradable; uv itself is a one-line install) for users who prefer a package-managed install. Manual-download table unchanged. Note: install.ps1 was reviewed statically (PowerShell not available on the dev machine); install.sh remains the live-tested path. The first GitHub Release will exercise install.ps1 on Windows via the matrix smoke test.
Member
🤖 Stale Bot⏰ 已 60 天无活动,标记为过期。如有更新将自动取消。14 天后无活动将自动关闭。 集中管理 · 详见 治理规范 |
Add INITING ("Initing") to PingStatus so agents can report a
startup/loading phase via a custom @app.ping handler; the control
plane treats it as "wait, not ready to route traffic".
Also fix two status-resolution bugs:
- a custom ping handler that raises or returns an unrecognized value
now fails safe to UNHEALTHY instead of silently reporting HEALTHY
- force_ping_status now takes precedence over the custom handler
(graceful shutdown/maintenance) instead of being overwritten by it
Co-Authored-By: Claude Code <noreply@anthropic.com>
Zhiyue-Wang
force-pushed
the
feature/test
branch
from
November 13, 2026 06:43
1f6ab10 to
e368c31
Compare
create_dockerfile() gained a required name argument in 74ae31e (the Java templates render `COPY target/{name}.jar` from it), but the unit tests were not updated and failed with TypeError. Pass name in the three stale call sites and add a Java-template case covering the jar copy the parameter exists for. Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
How Has This Been Tested?
Checklist
Related Issues
Screenshots (if applicable)