Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .agents/skills/cc-remote-deploy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ Check the daily CLI and Wrapper's actual connection to the **same official
daemon**, not just matching session files or a healthy Web UI. Accounts keep
separate `CODEX_HOME` boundaries; Work's private control plane is not changed.

Release installers print Wrapper startup's per-account connection result. This
uses the actual service user/environment and a fresh release/process-bound
receipt; it never sends a model turn. Treat it as transport readiness only:
normal terminal auto-discovery still requires the acceptance evidence below.
Startup reuses existing native servers without restarting them or changing
Codex's separate cloud remote-control setting. Preserve and report explicit
`off`, missing CLI, incompatible versions or failed probes.

Do not assume npm versus standalone decides sharing. Verify ordinary
`codex resume <session-id>` routing; explicit `--remote` success is not proof of
automatic discovery. Never kill a live CLI, force takeover, modify shell aliases,
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ jobs:
PYTHONPATH="$bundle" "$bundle/.smoke-venv/bin/python" \
-m deploy.release_manifest "$bundle" \
--role "$RELEASE_ROLE" --os "$RELEASE_OS" --arch "$RELEASE_ARCH"
PYTHONPATH="$bundle" "$bundle/.smoke-venv/bin/python" -m cc_remote --help
PYTHONPATH="$bundle" "$bundle/.smoke-venv/bin/python" -m cc_remote update --help
if [ "$RELEASE_ROLE" = wrapper ]; then
PYTHONPATH="$bundle" "$bundle/.smoke-venv/bin/python" -c \
'from cc_remote.wrapper.machine import WrapperMachine; assert WrapperMachine'
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@

[中文](CHANGELOG_zh.md)

## Unreleased
## v4.0.1

Add managed release updates and verify Codex shared connections after activation.
The wire protocol remains v72. See the bilingual [release notes](docs/releases/v4.0.1.md)
for the one-time upgrade from v4.0.0.

- Add `cc-remote update` for installer-managed local Relay/Wrapper releases,
with stable-version discovery, check-only and pinned-version modes, verified
bundles, preserved service identity, exclusive activation and protocol-change
guards. Reuse immutable installation and rollback; leave independent Claude
services and custom deployments under their existing lifecycle.
- Preserve operator-provided macOS Wrapper environment settings during upgrades.
- Prepare account-scoped Codex daemons without restarting active native clients,
check CLI and Wrapper transport readiness, and print the result after activation.
Report unavailable shared connections instead of silently falling back to a
private server; preserve explicit opt-outs and existing terminal tasks.

## v4.0.0

Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

[English](CHANGELOG.md)

## 未发布
## v4.0.1

新增 Release 更新命令,并在激活后检查 Codex 共享连接。通信协议仍为 v72。
从 v4.0.0 首次升级的方法见[双语发布说明](docs/releases/v4.0.1.md)。

- 新增 `cc-remote update`,用于安装器管理的本机 Relay/Wrapper:发现最新稳定版、
只查更新、指定版本、校验安装包、保留服务身份、避免并发激活,并拦截未协调的协议
升级。复用不可变安装与回滚,独立 Claude 服务和自定义部署保留原有生命周期。
- macOS Wrapper 升级时保留用户原有环境配置。
- 按账号准备 Codex 共享 daemon,保留正在运行的原生客户端,检查 CLI 与 Wrapper
的实际连接并在安装后显示结果。默认共享连接不可用时明确报错;保留用户关闭共享的
设置,旧的独立终端任务结束后再重新打开。

## v4.0.0

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

自托管 · 多会话 · 多设备 · 实时工具过程 · Code / Work · Web / PWA / TUI

**产品版本:v4.0.0** · Wire protocol v72
**产品版本:v4.0.1** · Wire protocol v72

[English](README_en.md) · [功能对照](#引擎与功能) · [快速开始](#快速开始) ·
[终端工作台](#terminal-workspace) · [安装与升级](#安装与升级) · [文档](#文档) · [更新记录](CHANGELOG_zh.md)
Expand Down Expand Up @@ -218,6 +218,10 @@ CLAUDE_BIN=

## 安装与升级

包含管理命令的 Release 安装支持 `cc-remote update --check` 检查更新、
`cc-remote update` 升级。v4.0.0 首次过渡、角色选择和协议协调升级见
[后续更新](docs/installation.md#后续更新)。

| 场景 | 文档 |
|---|---|
| 使用当前功能(推荐)、部署开发分支 | [源码部署](docs/installation.md#source-install):使用同一份测试通过的快照 |
Expand Down
7 changes: 6 additions & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Self-hosted · Multiple sessions and devices · Live tool activity · Code / Work · Web / PWA / TUI

**Product version: v4.0.0** · Wire protocol v72
**Product version: v4.0.1** · Wire protocol v72

[中文](README.md) · [Engine comparison](#engines-and-features) · [Quick start](#quick-start) ·
[Terminal workspace](#terminal-workspace) · [Install and upgrade](#install-and-upgrade) · [Documentation](#documentation) · [Changelog](CHANGELOG.md)
Expand Down Expand Up @@ -243,6 +243,11 @@ below or configure a restricted LAN/Tailscale entry point.

## Install and upgrade

Release installations that include the management CLI support
`cc-remote update --check` and `cc-remote update`; see
[subsequent updates](docs/installation_en.md#subsequent-updates) for the initial
upgrade from v4.0.0, role selection and coordinated protocol upgrades.

| Scenario | Guide |
|---|---|
| Use current features (recommended) or a development branch | [Source deployment](docs/installation_en.md#source-install): use one tested snapshot |
Expand Down
2 changes: 1 addition & 1 deletion cc_remote/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
- control link: client <-> relay(WS) <-> wrapper <-> ClaudeSDKClient <-> cc
"""

__version__ = "4.0.0"
__version__ = "4.0.1"
38 changes: 38 additions & 0 deletions cc_remote/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""Release-management CLI: python -m cc_remote (or cc-remote)."""
from __future__ import annotations

import argparse
import sys

from cc_remote import __version__
from cc_remote.update import UpdateError, update


def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(prog="cc-remote")
parser.add_argument("--version", action="version", version=f"cc-remote {__version__}")
commands = parser.add_subparsers(dest="command", required=True)
command = commands.add_parser("update", help="update a local Release installation")
command.add_argument("--check", action="store_true", help="check without downloading or restarting")
command.add_argument("--version", dest="target_version", help="select an exact stable version")
command.add_argument("--role", choices=("relay", "wrapper"), help="required when both roles are installed")
command.add_argument(
"--allow-protocol-change", action="store_true",
help="activate a protocol change during a coordinated multi-machine upgrade",
)
args = parser.parse_args(argv)
try:
return update(
role=args.role, target_version=args.target_version, check=args.check,
allow_protocol_change=args.allow_protocol_change,
)
except (UpdateError, OSError) as exc:
print(f"ERROR: {exc}", file=sys.stderr)
return 1
except KeyboardInterrupt:
print("Update interrupted. Inspect the installation before retrying.", file=sys.stderr)
return 130


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading