Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
602a82621a
|
||
|
|
87b4cc4da1
|
||
|
|
70895d4f1c
|
||
|
|
aa87ed97c1
|
||
|
|
a3cd27dba3
|
||
|
|
0812b28527
|
||
|
|
9bf870449b
|
||
|
|
9be4d24d6d
|
||
|
|
a317bfb36f
|
||
|
|
0f888ffe31
|
||
|
|
41ddd9052a |
@@ -0,0 +1,24 @@
|
||||
name: pkg-repo-sync
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "17 */6 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: quattro
|
||||
|
||||
- name: Mirror upstream [omarchy] stable into the Gitea Arch registry
|
||||
env:
|
||||
PKG_SYNC_TOKEN: ${{ secrets.PKG_SYNC_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if ! command -v zstd > /dev/null; then
|
||||
apt-get update -qq && apt-get install -y -qq zstd
|
||||
fi
|
||||
bash packages/sync-omarchy-repo.sh
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
面向中国开发者的 [Omarchy](https://omarchy.org) 下游发行版:完整保留 Omarchy 的 Arch + Hyprland 桌面体验,为中国网络环境、中文使用习惯与国内 AI 服务做系统级增强。
|
||||
|
||||
当前版本 `4.0.0.alpha-cn.1`(基于上游 `quattro` 分支构建的基线 ISO)。
|
||||
当前版本 `4.0.0.alpha-cn.4`(基于上游 `quattro` 分支构建的基线 ISO)。
|
||||
|
||||
## 特性
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
- Btrfs + Snapper 更新前快照与系统回滚
|
||||
- archiso 离线安装镜像,支持无人值守安装与双系统引导
|
||||
|
||||
OmarchyCN 增强(开发中,按路线图逐步交付):
|
||||
|
||||
- **中国镜像管理**:Arch / npm / pip / Cargo / Go 等软件源测速、自动选择与故障切换
|
||||
- **中文环境开箱即用**:zh_CN locale、思源黑体 / 宋体字体栈、高分屏分数缩放预设
|
||||
- **中文输入法**:Fcitx5 + Rime 预配置,Wayland / GTK / Qt / Electron 全栈兼容,快捷键冲突自动处理
|
||||
|
||||
@@ -107,6 +107,14 @@ deepcode)
|
||||
command=(deepcode)
|
||||
[[ -n ${prompt:-} ]] && command+=("$prompt")
|
||||
;;
|
||||
dim)
|
||||
# `dim exec` is the documented one-shot prompt form
|
||||
if [[ -n ${prompt:-} ]]; then
|
||||
command=(dim exec "$prompt")
|
||||
else
|
||||
command=(dim)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported default agent: $agent" >&2
|
||||
exit 1
|
||||
|
||||
@@ -40,7 +40,10 @@ proto=$(cn_ai_harness_field "$harness" protocol)
|
||||
if [[ $proto == "native" ]]; then
|
||||
omarchy-cn-ai-profile-create "$name" "$harness" "$provider" "$model"
|
||||
omarchy-cn-ai-profile-use "$name"
|
||||
echo "$harness 自管鉴权:首次启动时按其官方流程登录/配置"
|
||||
echo "$harness 自管鉴权:首次启动时在 CLI 内完成官方登录"
|
||||
if gum confirm "立即启动并完成官方登录?"; then
|
||||
exec omarchy-cn-ai-launch "$name"
|
||||
fi
|
||||
echo "完成。启动: omarchycn ai launch"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -32,6 +32,17 @@ fi
|
||||
|
||||
case "$source_type" in
|
||||
aur)
|
||||
# Offline installs leave only offline.db in sync; without the official
|
||||
# repo dbs yay treats repo deps as AUR. Upgrades must go through the
|
||||
# omarchy-update pipeline (pacman guard).
|
||||
if [[ ! -f /var/lib/pacman/sync/core.db ]]; then
|
||||
if [[ ! -t 0 ]]; then
|
||||
echo "首次安装应用前请先完成一次系统更新: omarchy-update" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "首次安装应用前需要完成一次系统更新。"
|
||||
omarchy-update
|
||||
fi
|
||||
omarchy-pkg-aur-add "$(jq -r '.package' <<<"$entry")"
|
||||
;;
|
||||
webapp)
|
||||
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# omarchy:summary=Install Kimi Code with the official installer script
|
||||
# omarchy:examples=omarchycn kimi install
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if omarchy-cmd-present kimi; then
|
||||
echo "Kimi Code 已安装"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
installer=$(mktemp)
|
||||
trap 'rm -f "$installer"' EXIT
|
||||
curl -fsSL https://code.kimi.com/kimi-code/install.sh -o "$installer"
|
||||
bash "$installer"
|
||||
|
||||
# The official installer only touches .bashrc PATH; expose kimi now
|
||||
if [[ ! -x $HOME/.kimi-code/bin/kimi ]]; then
|
||||
echo "kimi binary missing after the official installer" >&2
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
ln -sf "$HOME/.kimi-code/bin/kimi" "$HOME/.local/bin/kimi"
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set and launch the default coding agent
|
||||
# omarchy:args=[pi|omp|opencode|ori|claude|codex|grok|agy|copilot|crush|kimi|deepcode]
|
||||
# omarchy:args=[pi|omp|opencode|ori|claude|codex|grok|agy|copilot|crush|kimi|deepcode|dim]
|
||||
# omarchy:examples=omarchy default agent | omarchy default agent codex | omarchy default agent kimi
|
||||
|
||||
installing=false
|
||||
@@ -36,8 +36,9 @@ agy | antigravity | antigravity-cli | gemini | gemini-cli) agent="agy"; name="An
|
||||
copilot | github-copilot) agent="copilot"; name="GitHub Copilot" ;;
|
||||
kimi | kimi-code) agent="kimi"; name="Kimi Code" ;;
|
||||
deepcode | deep-code) agent="deepcode"; name="Deep Code"; agent_package="npm:@vegamo/deepcode-cli" ;;
|
||||
dim | dimcode | dim-agent) agent="dim"; name="Dim Agent"; agent_package="npm:dimcode" ;;
|
||||
*)
|
||||
echo "Usage: omarchy-default-agent <pi|omp|opencode|ori|claude|codex|grok|agy|copilot|crush|kimi|deepcode>"
|
||||
echo "Usage: omarchy-default-agent <pi|omp|opencode|ori|claude|codex|grok|agy|copilot|crush|kimi|deepcode|dim>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -50,13 +51,10 @@ if [[ $agent == "kimi" ]]; then
|
||||
if [[ $installing == "false" ]]; then
|
||||
exec omarchy-launch-floating-terminal-with-presentation omarchy-default-agent --install kimi
|
||||
fi
|
||||
installer=$(mktemp)
|
||||
if ! curl -fsSL https://code.kimi.com/kimi-code/install.sh -o "$installer" || ! bash "$installer"; then
|
||||
rm -f "$installer"
|
||||
if ! omarchy-cn-kimi-install; then
|
||||
echo "Could not install $name with the official installer" >&2
|
||||
exit 1
|
||||
fi
|
||||
rm -f "$installer"
|
||||
fi
|
||||
else
|
||||
if [[ $installing == "false" ]] && ! mise where "$agent_package" &>/dev/null; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"_verified": "2026-08-24",
|
||||
"_verified": "2026-08-25",
|
||||
"harnesses": {
|
||||
"claude-code": {
|
||||
"display_name": "Claude Code",
|
||||
@@ -25,7 +25,7 @@
|
||||
"kimi-code": {
|
||||
"display_name": "Kimi Code CLI",
|
||||
"command": "kimi",
|
||||
"install": "doc:https://www.kimi.com/code/docs/en/",
|
||||
"install": "omarchy-cn-kimi-install",
|
||||
"config_method": "native",
|
||||
"protocol": "native"
|
||||
},
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
4
|
||||
6
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
"setup.default.agent.copilot": {"icon":"","label":"Copilot","checked":"[[ \"$(omarchy-default-agent)\" == \"copilot\" ]]","action":"omarchy-default-agent copilot"},
|
||||
"setup.default.agent.crush": {"icon":"","label":"Crush","checked":"[[ \"$(omarchy-default-agent)\" == \"crush\" ]]","action":"omarchy-default-agent crush"},
|
||||
"setup.default.agent.deepcode": {"icon":"","label":"Deep Code","checked":"[[ \"$(omarchy-default-agent)\" == \"deepcode\" ]]","action":"omarchy-default-agent deepcode"},
|
||||
"setup.default.agent.dim": {"icon":"","label":"Dim Agent","checked":"[[ \"$(omarchy-default-agent)\" == \"dim\" ]]","action":"omarchy-default-agent dim"},
|
||||
"setup.default.agent.grok": {"icon":"","iconFont":"omarchy","label":"Grok","checked":"[[ \"$(omarchy-default-agent)\" == \"grok\" ]]","action":"omarchy-default-agent grok"},
|
||||
"setup.default.agent.kimi": {"icon":"","label":"Kimi Code","checked":"[[ \"$(omarchy-default-agent)\" == \"kimi\" ]]","action":"omarchy-default-agent kimi"},
|
||||
"setup.default.agent.omp": {"icon":"","iconFont":"omarchy","label":"omp","checked":"[[ \"$(omarchy-default-agent)\" == \"omp\" ]]","action":"omarchy-default-agent omp"},
|
||||
@@ -240,11 +241,15 @@
|
||||
"install.terminal.ghostty": {"icon":"","label":"Ghostty","disabled":"omarchy-pkg-present ghostty","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-terminal ghostty'"},
|
||||
"install.terminal.kitty": {"icon":"","label":"Kitty","disabled":"omarchy-pkg-present kitty","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-terminal kitty'"},
|
||||
"install.ai.chatgpt": {"icon":"","iconFont":"omarchy","label":"ChatGPT Desktop","disabled":"omarchy-pkg-present openai-codex-desktop","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-ai-chatgpt"},
|
||||
"install.ai.deep-code": {"icon":"","label":"Deep Code","disabled":"omarchy-cmd-present deepcode","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-mise-install npm:@vegamo/deepcode-cli deepcode && deepcode'"},
|
||||
"install.ai.dictation": {"icon":"","label":"语音听写","disabled":"omarchy-pkg-present voxtype-bin","action":"omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install"},
|
||||
"install.ai.dim": {"icon":"","label":"Dim Agent","disabled":"omarchy-cmd-present dim","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-mise-install npm:dimcode dim && dim'"},
|
||||
"install.ai.grok-bot": {"icon":"","iconFont":"omarchy","label":"Grok Bot","disabled":"omarchy-pkg-present grok-bot","action":"omarchy-install-and-launch 'Grok Bot' grok-bot grok-bot"},
|
||||
"install.ai.kimi-code": {"icon":"","label":"Kimi Code","disabled":"omarchy-cmd-present kimi","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-cn-kimi-install && kimi'"},
|
||||
"install.ai.lm-studio": {"icon":"","iconFont":"omarchy","label":"LM Studio","disabled":"omarchy-pkg-present lmstudio-bin","action":"omarchy-install-app 'LM Studio' lmstudio-bin"},
|
||||
"install.ai.ollama": {"icon":"","iconFont":"omarchy","label":"Ollama","disabled":"omarchy-cmd-present ollama","action":"if omarchy-cmd-present nvidia-smi; then ollama_pkg=ollama-cuda; elif omarchy-cmd-present rocminfo; then ollama_pkg=ollama-rocm; else ollama_pkg=ollama; fi; omarchy-install-app Ollama \"$ollama_pkg\""},
|
||||
"install.ai.t3-code": {"icon":"","iconFont":"omarchy","label":"T3 Code","disabled":"omarchy-pkg-present t3code-bin","action":"omarchy-install-and-launch 'T3 Code' t3code-bin t3code"},
|
||||
"install.ai.cn-hub": {"icon":"","label":"国产模型组合 (AI Hub)","action":"omarchy-launch-floating-terminal-with-presentation omarchy-cn-ai-setup"},
|
||||
"install.gaming.steam": {"icon":"","label":"Steam","disabled":"omarchy-pkg-present steam","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-gaming-steam"},
|
||||
"install.gaming.retroarch": {"icon":"","label":"RetroArch","disabled":"omarchy-pkg-present retroarch","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-gaming-retroarch"},
|
||||
"install.gaming.minecraft": {"icon":"","label":"Minecraft","disabled":"omarchy-pkg-present minecraft-launcher","action":"omarchy-install-and-launch Minecraft minecraft-launcher minecraft-launcher"},
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
#!/bin/bash
|
||||
# Mirrors the upstream [omarchy] stable repo into the OmarchyCN Gitea Arch registry.
|
||||
# Maintainer/CI script (pkg-repo-sync.yml); needs a package-write token, network.
|
||||
|
||||
set -euo pipefail
|
||||
export LC_ALL=C
|
||||
|
||||
GITEA=${GITEA:-https://git.zacharyzhang.com}
|
||||
OWNER=${OWNER:-ZacharyZhang-NY}
|
||||
REPO=${REPO:-omarchy}
|
||||
UPSTREAM=${UPSTREAM:-https://pkgs.omarchy.org/stable/x86_64}
|
||||
: "${PKG_SYNC_TOKEN:?PKG_SYNC_TOKEN (Gitea package-write token) is required}"
|
||||
|
||||
registry="$GITEA/api/packages/$OWNER/arch"
|
||||
mirror="$registry/$REPO/x86_64"
|
||||
|
||||
workdir=$(mktemp -d)
|
||||
trap 'rm -rf "$workdir"' EXIT
|
||||
|
||||
# One "filename name version arch" line per package in a repo db (zstd or gzip tar)
|
||||
db_entries() {
|
||||
local db="$1" dir="$2" desc
|
||||
mkdir -p "$dir"
|
||||
tar --zstd -xf "$db" -C "$dir" 2>/dev/null || tar -xzf "$db" -C "$dir"
|
||||
for desc in "$dir"/*/desc; do
|
||||
[[ -f $desc ]] || continue
|
||||
awk '
|
||||
/^%FILENAME%$/ { getline; f = $0 }
|
||||
/^%NAME%$/ { getline; n = $0 }
|
||||
/^%VERSION%$/ { getline; v = $0 }
|
||||
/^%ARCH%$/ { getline; a = $0 }
|
||||
END {
|
||||
if (f == "" || n == "" || v == "" || a == "") {
|
||||
print "malformed desc: " FILENAME > "/dev/stderr"
|
||||
exit 1
|
||||
}
|
||||
print f, n, v, a
|
||||
}
|
||||
' "$desc"
|
||||
done
|
||||
}
|
||||
|
||||
curl -sSf --retry 3 -o "$workdir/upstream.db" "$UPSTREAM/omarchy.db"
|
||||
db_entries "$workdir/upstream.db" "$workdir/upstream" | sort > "$workdir/upstream.list"
|
||||
|
||||
# Only 404 means first sync; any other failure must not fake an empty mirror,
|
||||
# which would skip deletions and report a bogus success
|
||||
code=$(curl -sS --retry 3 -o "$workdir/mirror.db" -w '%{http_code}' "$mirror/$REPO.db" || true)
|
||||
[[ -z $code ]] && code=000
|
||||
case "$code" in
|
||||
200)
|
||||
db_entries "$workdir/mirror.db" "$workdir/mirror" | sort > "$workdir/mirror.list"
|
||||
;;
|
||||
404)
|
||||
: > "$workdir/mirror.list"
|
||||
;;
|
||||
*)
|
||||
echo "mirror db fetch failed (HTTP $code): $mirror/$REPO.db" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
comm -23 "$workdir/upstream.list" "$workdir/mirror.list" > "$workdir/to-add.list"
|
||||
comm -13 "$workdir/upstream.list" "$workdir/mirror.list" > "$workdir/to-remove.list"
|
||||
echo "upstream: $(wc -l < "$workdir/upstream.list") packages," \
|
||||
"mirror: $(wc -l < "$workdir/mirror.list")," \
|
||||
"to add: $(wc -l < "$workdir/to-add.list")," \
|
||||
"to remove: $(wc -l < "$workdir/to-remove.list")"
|
||||
|
||||
added=0
|
||||
while read -r filename name version arch; do
|
||||
echo "add: $filename"
|
||||
curl -sSf --retry 3 -o "$workdir/pkg" "$UPSTREAM/$filename"
|
||||
code=$(curl -sS --retry 2 -o "$workdir/put.out" -w '%{http_code}' -X PUT \
|
||||
-H "Authorization: token $PKG_SYNC_TOKEN" \
|
||||
--upload-file "$workdir/pkg" "$registry/$REPO")
|
||||
case "$code" in
|
||||
201) added=$((added + 1)) ;;
|
||||
409) echo " already present (409)" ;;
|
||||
*)
|
||||
echo "upload of $filename failed (HTTP $code): $(head -c 300 "$workdir/put.out")" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rm -f "$workdir/pkg"
|
||||
done < "$workdir/to-add.list"
|
||||
|
||||
removed=0
|
||||
while read -r filename name version arch; do
|
||||
echo "remove: $filename"
|
||||
code=$(curl -sS --retry 2 -o "$workdir/del.out" -w '%{http_code}' -X DELETE \
|
||||
-H "Authorization: token $PKG_SYNC_TOKEN" \
|
||||
"$registry/$REPO/$name/$version/$arch")
|
||||
if [[ $code != 2?? && $code != 404 ]]; then
|
||||
echo "removal of $filename failed (HTTP $code): $(head -c 300 "$workdir/del.out")" >&2
|
||||
exit 1
|
||||
fi
|
||||
removed=$((removed + 1))
|
||||
done < "$workdir/to-remove.list"
|
||||
|
||||
echo "Sync complete: $added added, $removed removed"
|
||||
@@ -248,7 +248,7 @@ assertDeepEqual(
|
||||
defaultItems
|
||||
.filter(item => item.parent === 'setup.default.agent')
|
||||
.map(item => item.label),
|
||||
['Antigravity', 'Claude', 'Codex', 'Copilot', 'Crush', 'Deep Code', 'Grok', 'Kimi Code', 'omp', 'OpenCode', 'Ori', 'Pi', '国产模型组合 (AI Hub)'],
|
||||
['Antigravity', 'Claude', 'Codex', 'Copilot', 'Crush', 'Deep Code', 'Dim Agent', 'Grok', 'Kimi Code', 'omp', 'OpenCode', 'Ori', 'Pi', '国产模型组合 (AI Hub)'],
|
||||
'menu sorts coding agents alphabetically'
|
||||
)
|
||||
const expectedDefaults = {
|
||||
|
||||
Reference in New Issue
Block a user