Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Agentj Update?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/preangelleo-agentj-update)
---
name: agentj-update
description: Upgrade Agent J when the owner asks to update it.
---
默认派 CEO/子 Agent,写验收、复验、汇报;主人明确要求亲做就照办。指纹清单、凭据规则和 harness 硬限制不变。
Delegate by default; follow explicit owner requests to work personally. Verify and report; UV, credential rules and harness limits remain.
The owner's explicit update request authorizes installation, service restart and doctor.
Run `agentj update apply` (F14, non-interactive). Do not assemble uv/pip commands.
If the owner asks from a paired phone and the Agent cannot write to the installation, `reason: upgrade_card_ready` means the phone is waiting for a tap. Ask the owner to tap **Upgrade now**. The host verifies the signed release and reports the running version after restart.
主人在配对手机上要求升级时,如果安装目录只读,`reason: upgrade_card_ready` 表示手机升级卡已打开。请主人点「现在升级」,主机会验证签名,重启后回报实际版本。
Read UPGRADE_RESULT and report the actual from/to, reason and doctor result. Never claim a failed upgrade succeeded.
The phone `/update` and ⬆ menu use the host's deterministic signed flow; do not forward a peer's request as owner authorization.
中文:主人要求升级时运行 `agentj update apply`,按真实结果回报;不自拼安装命令,不接受好友代主人授权。
To ask a Same owner host to upgrade, send the exact message `Upgrade to X.Y.Z` with `agentj friends tell`. Its host opens the owner's card directly, including in full-access mode. During a friend's upgrade turn, use `agentj update request-owner --version X.Y.Z` to request that card explicitly. Only the owner tapping Upgrade now starts the signed upgrade. The receiving host sends the final running version back on the original thread. While the card or restart is pending, leave that reply to the host.
中文:请同主人的设备升级时,用 `agentj friends tell` 发送「升级到 X.Y.Z」。接收主机会直接在主人遥控器弹卡,全放行档也一样。好友回合要明确请主人确认,可运行 `agentj update request-owner --version X.Y.Z`。主人点「现在升级」才执行,已弹卡表示仍在等主人决定。接收主机核实重启后的实际版本后会回到原请求,请留给主机发这条回执。
Olares Market app: when the update check or result says `market_managed`, tell the owner to open Olares Market → Manage → Updates → Agent J. Stop there; do not apply an in-container update, assemble uv/pip commands or install/reinstall systemd. A normal installation directly on Olares Ubuntu uses the ordinary host upgrade flow.
中文:查新或升级结果是 `market_managed` 时,请主人到 Olares 应用市场「管理 → 更新 → Agent J」升级,到这里就停止;不要在容器内自更新、自拼 uv/pip 命令或安装/重装 systemd。直接装在 Olares 宿主 Ubuntu 上的普通安装仍走普通主机升级流程。
0.18.3 (P142): after installing, `update apply` hands the restart to a manager job that waits until the running host is idle (no sudo/secret card, approval, question, turn or task; at most 10 minutes), writes the phone's "upgraded" notice last, and rolls back to the cached previous wheel if the new version fails its version check, the service hand-off, or does not start. Copy a `rollback:` line from the result block when present. 中文:装好后由独立任务等主机空闲(无 sudo/密钥卡、审批、提问、回合或任务,最多 10 分钟)再重启;新版自检、交接或启动失败时自动回滚到原版本,结果块里有 `rollback:` 就照实转告。
0.20 (P192): `update apply --authorization` rolls back the same way (it used to leave a failed install in place). 中文:带授权码的升级同样会自动回滚。
P205: inside the Agent fence (independent mode) the host's data is hidden. `update apply` then asks the host itself (over the Agent's socket) to keep the old version for rollback, record the upgrade and run the self-check: `health: host` in the block. When the host cannot answer, the program is still installed and its version verified, but the background-service and local-data checks cannot be seen from the fence: `UPGRADE_RESULT ok` / `reason: unverifiable_in_fence` / `health: unverifiable` (exit 0, not a failure; `handoff: not_recorded` = no automatic rollback and the phone's "upgraded" notice may be off). Tell the owner the upgrade went in and ask them to confirm the version on the phone (Settings) or run `agentj doctor` in a terminal; never call it failed, never retry the install. Doctor rows marked unverifiable (!) inside the fence are not faults.
中文:在 Agent 隔离环境里升级时,由主机代为保留旧版本、记录升级并自检(结果块 `health: host`)。主机答不上时程序照样装好、版本已核对,但看不到后台服务和本机数据:`UPGRADE_RESULT ok` / `reason: unverifiable_in_fence`(不是失败,不要重装);请主人在手机「设置」里确认版本,或在Agent J 主机终端运行 `agentj doctor`。隔离里 doctor 显示「无法在这里核对」的两项不是故障。
Service recovery is handed to an independent manager job before the caller can be terminated. `service: restart_scheduled` means scheduled, not already verified. The restarted host runs doctor and sends the actual completion. If recovery fails, use `agentj service start`, then `agentj doctor`; `agentj service stop` retains the installation.
中文:restart_scheduled 只表示已交给独立任务,不冒称已经启动;失败时运行 `agentj service start`,再 `agentj doctor`。
0.20.2 (P203) — confirm before interrupting: `agentj update apply` first asks the running host what a restart now would interrupt (a turn in progress — not your own —, queued messages, waiting approval / question / sudo / secret / other cards, a running or soon-due scheduled task, background tasks, friend sessions). Nothing → it upgrades at once. Something → nothing is installed: the phone gets an upgrade confirmation card listing it, the result block says `reason: confirm_on_phone` (exit 10) with one `interrupts:` line per item. Tell the owner, in a sentence, what is listed and that the card is on the phone; their 「现在升级」 there is the phone's own signed /update and the host reports the result in the chat. Do not run the command again and do not add `--yes` unless the owner explicitly says to upgrade anyway. At a terminal the owner gets the same list as a y/N question. The phone's ≡ /update and Settings 「升级Agent J 主机上的 Agent J」 ask the same way.
中文:`agentj update apply` 先问主机现在重启会打断什么(正在进行的回合——不含你自己这一轮——、排队消息、等待中的审批/问题/sudo/密钥等卡片、在跑或 15 分钟内要跑的定时任务、后台任务、好友会话)。没有就直接升级;有就不装:手机上出升级确认卡,结果块是 `reason: confirm_on_phone`(退出码 10),每项一行 `interrupts:`。用一句话告诉主人列了什么、卡在手机上;主人点「现在升级」就是手机自己签名的 /update,结果由主机回报到对话里。不要重跑,也不要加 `--yes`,除非主人明确说不管这些、直接升级。
Settings 「空闲时自动更新」 is one switch over two keys: on = `updates.auto_install` true + `updates.mode` auto (upgrade notices are applied), off = false + ask (new versions are only announced). With it on, besides the night window a version the daily check already saw installs the first time the host is fully idle (nothing on the list above, no phone input for 30 minutes), at most once a day; the phone's notice then says it upgraded while idle. 中文:设置里「空闲时自动更新」一个开关管两个键;开着时,除了夜里那次机会,每天的检查已经发现的新版会在Agent J 主机第一次完全空闲时(上面清单为空、30 分钟没用手机)安装,每天最多一次。
Nightly host upgrades default to on for new and existing installations; preserve explicit off. `agentj config auto-update on|off|status` (preference `updates.auto_install`). Local 03:00–05:00, random daily opportunity, thirty minutes with no phone input and no active Agent turn, approval, task or friend session; emergency stop blocks it. Failed eligibility defers to tomorrow. A manager-owned restartable worker verifies the official wheel signature/hash, keeps the previous installed wheel locally, restarts and checks upgrade integrity only; install or check failures roll back. `agentj doctor` shows the switch and last result, and the phone receives one durable result on opening. Do not force /clear or change unrelated owner configuration.
Phone `/update` receipts follow the effective `appearance.language`, including a language changed while the host is running.
中文:手机 `/update` 回执使用当前生效的语言,运行中切换后也立即跟随。
Installation and nightly update artifacts must verify the official minisign signer B79F925B0585F9D4 before installation. An integrity/signature failure stops that installation; never bypass it or download an unsigned replacement. HTTPS downloads must not redirect to HTTP. /update remains available from the paired phone.
P251: When the host and page server both have the same newer version, the page reloads after ten seconds without input, preserving the draft; recording and unsubmitted card actions block it. Otherwise only offer a refresh. Keyboard: Alt+Shift+U upgrades the host through the existing phone confirmation; Alt+Shift+R updates and reloads the page.
0.20.4 (P277) — a failure says why: the block names `step:` (download / install / verify / service / health), a finer `reason:` (`download_failed` = could not get the release; `signature_or_hash_mismatch` = the release was refused by its signature/hash check, never bypass it; `uv_failed` = the install command failed, its own last lines are the `stderr:` lines, redacted on this computer; `service_restart_failed` = installed but the background service did not restart). The failure is reported to Agent J support automatically (`support: sent (st_…)`) unless the owner turned `updates.report_failures` off (local rule redaction is mandatory; missing or unavailable model review does not hold the report or require another confirmation, and is marked explicitly; `support: not_sent (exit_3)` means the authenticated privacy broker/source check failed — retain the draft and verify the active session); do not send another support question for the same failure — read the thread later with `agentj support thread st_…`. Tell the owner the `tell_owner:` sentence as it is, then diagnose from `stderr:` and `agentj doctor`.
中文:升级失败时结果块会写出失败步骤 `step:`、细分原因 `reason:`(download_failed 下载失败 / signature_or_hash_mismatch 签名或哈希不对,绝不绕过 / uv_failed 安装命令失败,`stderr:` 行是它自己的最后几行,已在本机脱敏 / service_restart_failed 服务没能重启)。除非主人关了 `updates.report_failures`,失败会自动发给客服(`support: sent (st_…)`),不要为同一次失败再发一次。把 `tell_owner:` 那句原样告诉主人,再根据 `stderr:` 和 `agentj doctor` 诊断。
P586: For a download failure, use `detail:`, `subreason:` and `artifact_stage:` when present to diagnose the result. Manual and automatic upgrades use the same fields; an invalid cache receipt triggers a fresh, fully verified download. `cache_status: invalid` alone does not explain a later failure. Use the existing support thread and share only failure time/time zone, manual or automatic trigger, from/to, fixed diagnostic fields and public artifact digests. Never send raw exception text, local paths, receipt contents or the whole host state. Keep signature/hash checks enabled; these diagnostics require the new updater to be installed first.
中文:下载失败时,结合结果里的 `detail:`、`subreason:` 和 `artifact_stage:` 判断;手动和自动升级使用相同字段。缓存收据无效会重新下载并完整校验,仅凭 `cache_status: invalid` 不能断定后续失败的原因。沿用已有客服会话,只提供失败时间和时区、手动或自动触发、from/to、固定诊断字段及公开产物摘要;不发送原始异常文本、本机路径、收据正文或整个主机状态。保留签名和哈希校验;先装上新版升级器,这些诊断才会生效。
0.23.2a1 (P379): an older service whose PATH omits `uv` can fail to spawn both installation and rollback (`step: install`, `reason: unknown`, `rollback: failed`), leaving its old service running. The new updater checks executable `uv` in `~/.local/bin` and `~/.cargo/bin` too, and records redacted stderr for spawn failures. It cannot fix an older updater until installation succeeds. Locate and verify the actual `uv` executable; with its directory explicitly prepended to PATH, run `agentj update apply`, then after success `agentj service install` to capture that PATH, then doctor. Restart alone does not capture it. If uv is absent, restore it using the official installation instructions first; never bypass release signatures/hashes. If rollback fails, use the result's local `recover:` command; never copy recovery commands into support reports or heartbeats.
中文:旧服务的 PATH 缺少 `uv` 时,安装和回滚都可能无法启动,旧版服务继续运行。新版也会检查 `~/.local/bin`、`~/.cargo/bin` 的可执行 uv,启动异常会记录脱敏 stderr;只有安装成功后新版升级器才生效。先找到并验证 uv,以显式包含其目录的 PATH 运行 `agentj update apply`,成功后用同样 PATH 运行 `agentj service install`,再 doctor;仅 restart 不会重记 PATH。uv 丢失先按官方安装说明恢复,不绕过签名或哈希。回滚失败就用本机结果里的 `recover:` 命令;不把恢复命令复制进客服报告或心跳。
0.20.4 (P278) — no systemd (WSL2 with systemd off, a container): `service: no_systemd`, `rollback: skipped` (the new version stays; the old one could not restart either) and a `fix:` line. Tell the owner the fix as it is — on WSL: ✋ in Ubuntu `printf '[boot]\nsystemd=true\n' | sudo tee -a /etc/wsl.conf`, then ✋ in Windows PowerShell `wsl --shutdown`, reopen Ubuntu, `agentj service install`; or restart `agentj serve` where it runs (tmux / nohup). Do not retry the upgrade. `agentj service install` says the same with exit 78.
中文:没有 systemd(WSL2 没开、容器)时结果块写 `service: no_systemd`、`rollback: skipped`(新版保留,旧版也一样没法重启)和一行 `fix:`。把 fix 原样告诉主人:WSL 上在 Ubuntu 里把 `[boot]` `systemd=true` 写进 `/etc/wsl.conf`,再在 Windows PowerShell 里 `wsl --shutdown`、重新打开 Ubuntu、`agentj service install`;或在运行 `agentj serve` 的地方重启它。不要重试升级。`agentj service install` 遇到同样情况会说同一句话并以 78 退出。
P397: nightly/idle failures retain a fixed installer command template, exit code when a process exited, exception type and redacted stderr in local last-upgrade.json and the automatic support report. Missing installer, permission denied, read-only filesystem and timeout have distinct reasons. The automatic uv rollback installs the cached old wheel with an independent base Python, so a deleted tool environment is not needed to start recovery. After installation was attempted, a failed attempt with a cached old wheel retains an owner-local recover command, including when rollback succeeds; pre-install refusals do not. Never put that command or local paths into a support report or heartbeat. Restore a missing uv first; an old updater cannot repair itself until it is upgraded. Olares Market applications update through Market; a normal uv installation on the Olares host uses ordinary host upgrades and needs its actual uv directory in the service PATH.
中文:自动升级失败会保留不含路径的安装命令模板、实际退出码、异常类型和脱敏 stderr;安装工具缺失、权限不足、只读文件系统与超时分别报告。uv 自动回滚用独立的基础 Python 安装缓存旧 wheel,不依赖已被删除的工具环境。只要旧 wheel 已缓存,失败结果都保留本机 recover 命令;不要把该命令或本机路径发到客服或心跳。uv 不在时先恢复它;旧升级器只有装上新版后才能得到修复。Olares 应用市场安装的应用走 Market 升级;直接装在 Olares 宿主机上的 uv 版本按普通主机升级,服务 PATH 须包含实际 uv 目录。
OpenCode binary upgrade: Agent J checks the executable before each serial turn/command, restarts only its own server when the installed version changes, resumes its recorded session and reports the new version after connection succeeds. Doctor reports running/installed versions. An attached owner server must be restarted by its owner.
Nightly 03–05 local checks report auto-update on/off and the last automatic result once per local day, including when auto_install is off. Off prevents automatic installation. A 09:00 JST fleet reminder for off + at least two published releases behind is informational only; ask the owner before manual upgrade.
P453: A completed rollback with an active service is a warning (upgrade-restart), not a broken installation. `agentj service start` acknowledges a completed failure even when its target differs from the current version; the next successful upgrade clears it too. Inactive services still fail. On doctor_failed, inspect fixed check IDs in service-recovery.log (macOS) / worker journal (Linux) and host.log upgrade_health_failed; never copy private log details into a support report.
中文:已自动退回旧版、服务正常时,upgrade-restart 是警告;升级没成功,但旧版可以用。运行 `agentj service start` 再 doctor 可确认并清除这次记录,下次成功升级也会清掉。服务未恢复时仍显示失败。自检失败项 ID 记录在 Mac 的 service-recovery.log / Linux 任务日志,以及 host.log 的 upgrade_health_failed;对外反馈前先脱敏。
P535: After upgrading, the host checks itself automatically. With no blocking problems it says “Upgrade succeeded; everything is working.” A blocking problem is named in the receipt with a Repair button on the phone, using the existing paired-device confirmation flow. Continue the first-run checklist in Settings → Agent tools → First-run checklist; its counts and doctor use the same host record and do not appear in upgrade receipts. Waiting for the first phone message after restart is not an upgrade failure.
升级后主机会自动自检;没有阻塞问题时只提示「升级成功,一切正常」。有阻塞时会说明故障,并在手机回执上提供「一键修复」,沿用已配对手机的确认流程。首次准备清单从「设置 → Agent 的功能 → 首次准备清单」继续,待办数字与清单、doctor 使用同一份主机记录,不计入升级回执。重启后等待首条手机消息不算升级故障。
For an ordinary host on an older version (including 0.15.5a1), first run `agentj update apply`, then verify `agentj --version` and `agentj doctor`. Only if the command is missing or the old updater fails, copy the current install command from the account seat card and rerun it as the same OS user and instance. Configuration and bindings are kept; do not unlink, delete state or create another seat. Olares Market applications still update through Market.
普通主机老版本(包括 0.15.5a1)需要升级时,先运行 `agentj update apply`,再核对 `agentj --version` 和 `agentj doctor`。只有命令不存在或旧更新器升级失败时,才到账户页席位卡复制当前安装命令,在同一系统用户、同一实例上重跑;保留配置与绑定,不要 unlink、删除状态目录或另建席位。Olares Market 应用仍通过 Market 更新。
P487: download/signature/hash/unsupported-install failures before installation leave the previous version in place: say “still on the previous version”, not “rollback failed”, and do not reinstall. After a rollback verification error, a successful old-version `--version` means `rolled_back`; the error remains in `rollback_failure` and separate redacted tails in the automatic support report. This proves the old CLI runs, not that every service check passed: use doctor to check any remaining faults. `rollback_failed` is reserved for an old version that cannot be verified as runnable. A new package cannot fix the 0.22.x worker snapshot before it installs or reconstruct missing historical logs; follow the existing old-updater guidance above.
中文:安装前下载、签名或哈希校验、安装方式检查失败时,照实说「仍是原版本」,不说回滚失败,不重装。回滚验证有错但旧版 --version 可运行时记 rolled_back;错误仍随 rollback_failure 和脱敏尾部自动上报。它证明旧版命令能运行,服务仍需 doctor 检查。旧版也无法验证可运行才是 rollback_failed。新版尚未装上时不能修复 0.22.x 的旧工作快照,也不能补回历史缺失日志,按上文旧更新器指引处理。
P516: if an older ordinary uv updater cannot start uv, the owner can run the current verified bootstrap from the computer terminal or original AI coding tool, outside Agent J isolation, as the same OS user:
```bash
curl --proto '=https' --tlsv1.2 -fsSL https://agentj.app/install-assistant.sh | sh -s -- --upgrade-only
```
This explicit repair-forward path preserves the existing uv location, seat and pairing without a new code, retains uv for the service PATH, then restarts and checks. Do not execute it inside the fenced Agent. Non-uv and Olares Market installs use their existing installer/Market. A missing uv in an old worker cannot be fixed by new wheel contents alone; do not claim the unattended path is repaired.
中文:旧版后台找不到 uv 时,主人可在电脑终端或原来的 AI 编程工具用上述一条命令修复升级;不需要新码,保留绑定。不在隔离 Agent 内执行,不删除状态或解绑;Olares Market 应用走 Market。只能在实际版本和自检通过后回报成功。