Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/update_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def get_github_latest_release(repo_url: str) -> tuple[str | None, list[str]]:
tag = data.get("tag_name", "")
# Strip 'v' prefix if present
version = tag.lstrip("v") if tag else None
# Normalize to semver (x.y -> x.y.0)
if version and re.match(r"^\d+\.\d+$", version):
version = f"{version}.0"
assets = [a["name"] for a in data.get("assets", [])]
return version, assets

Expand Down Expand Up @@ -320,6 +323,10 @@ def apply_binary_update(agent_path: Path, agent_data: dict, new_version: str) ->
# Update version field
agent_data["version"] = new_version

# For URLs, also handle x.y.0 <-> x.y conversions
old_short = re.sub(r"\.0$", "", old_version) # 1.6.0 -> 1.6
new_short = re.sub(r"\.0$", "", new_version) # 1.7.0 -> 1.7

# Update all binary archive URLs
binary_dist = agent_data["distribution"]["binary"]
for platform, target in binary_dist.items():
Expand All @@ -331,6 +338,11 @@ def apply_binary_update(agent_path: Path, agent_data: dict, new_version: str) ->
new_url = new_url.replace(f"-{old_version}-", f"-{new_version}-")
new_url = new_url.replace(f"_{old_version}.", f"_{new_version}.")
new_url = new_url.replace(f"_{old_version}_", f"_{new_version}_")
# Also handle short versions (x.y) in URLs when semver is x.y.0
if old_short != old_version:
new_url = new_url.replace(f"/{old_short}/", f"/{new_short}/")
new_url = new_url.replace(f"-{old_short}.", f"-{new_short}.")
new_url = new_url.replace(f"-{old_short}-", f"-{new_short}-")
target["archive"] = new_url

# Write back
Expand Down
18 changes: 9 additions & 9 deletions _not_yet_unsupported/kimi/agent.json → kimi/agent.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "kimi",
"name": "Kimi CLI",
"version": "1.6",
"version": "1.6.0",
"description": "Moonshot AI's coding assistant",
"repository": "https://github.com/MoonshotAI/kimi-cli",
"authors": [
Expand All @@ -11,31 +11,31 @@
"distribution": {
"binary": {
"darwin-aarch64": {
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/0.72/kimi-0.72-aarch64-apple-darwin.tar.gz",
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/1.6/kimi-1.6-aarch64-apple-darwin.tar.gz",
"cmd": "./kimi",
"args": [
"--acp"
"acp"
]
},
"linux-aarch64": {
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/0.72/kimi-0.72-aarch64-unknown-linux-gnu.tar.gz",
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/1.6/kimi-1.6-aarch64-unknown-linux-gnu.tar.gz",
"cmd": "./kimi",
"args": [
"--acp"
"acp"
]
},
"linux-x86_64": {
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/0.72/kimi-0.72-x86_64-unknown-linux-gnu.tar.gz",
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/1.6/kimi-1.6-x86_64-unknown-linux-gnu.tar.gz",
"cmd": "./kimi",
"args": [
"--acp"
"acp"
]
},
"windows-x86_64": {
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/0.72/kimi-0.72-x86_64-pc-windows-msvc.zip",
"archive": "https://github.com/MoonshotAI/kimi-cli/releases/download/1.6/kimi-1.6-x86_64-pc-windows-msvc.zip",
"cmd": "./kimi.exe",
"args": [
"--acp"
"acp"
]
}
}
Expand Down
File renamed without changes
Loading