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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- windows-latest
- ubuntu-latest
node-version:
- "16"
- "16.20.2"
- "24"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

本文件记录面向用户和集成方的重要变化。完整的发布叙事、升级说明和下载入口见对应版本的中文发布说明;实现证据和测试门禁见技术发布说明。

## [0.5.0] - 2026-08-09

### 新增

- Web UI 改为零输入自动配对:短时一次性 fragment 换取持久设备凭证,服务端只保存凭证哈希。
- 新增服务端存储配置,浏览器写操作仅提交 `profileId`;支持命名配置、`--reset-access` 和“忘记此浏览器”。
- 新增 `--no-open`、SSH 隧道和无桌面环境说明;已有 Web UI 实例会被复用。

### 变更

- 最低 Node.js 版本明确为 16.20.2,CI 同时覆盖 16.20.2 和当前 LTS。
- npm 包和所有发布型 .NET 项目统一为 0.5.0。

### 修复

- 服务固定监听 `127.0.0.1`,并按实际回环 Host/端口校验浏览器 Origin。
- History 搜索增加 300ms 防抖、Enter 立即搜索、旧请求取消和最新响应守卫;切换会话时显示加载状态。
- 浏览器打开器不可用或端口已被占用时给出可操作结果,不再以未处理错误退出。

### 安全

- 匿名首页不再下发写凭证;未配对浏览器不能调用 API 写接口。
- 一次性配对凭证不可重用,且不进入查询参数、HTML 或服务活动日志。

[中文发布说明](docs/release-notes/v0.5.0-zh.md) · [技术发布说明](docs/RELEASE_NOTES_V0.5.0.md)

## [0.4.1] - 2026-08-08

### 新增
Expand Down
250 changes: 130 additions & 120 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions desktop/CodexProviderSync.App/CodexProviderSync.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<AssemblyName>CodexProviderSync</AssemblyName>
<Product>Codex Provider Sync</Product>
<Company>Dailin521</Company>
<Version>0.4.1</Version>
<AssemblyVersion>0.4.1.0</AssemblyVersion>
<FileVersion>0.4.1.0</FileVersion>
<Version>0.5.0</Version>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<Version>0.4.1</Version>
<AssemblyVersion>0.4.1.0</AssemblyVersion>
<FileVersion>0.4.1.0</FileVersion>
<Version>0.5.0</Version>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<Nullable>enable</Nullable>
<AssemblyName>CodexProviderSync.Automation</AssemblyName>
<RootNamespace>CodexProviderSync.Automation</RootNamespace>
<Version>0.4.1</Version>
<AssemblyVersion>0.4.1.0</AssemblyVersion>
<FileVersion>0.4.1.0</FileVersion>
<Version>0.5.0</Version>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions desktop/CodexProviderSync.Core/CodexProviderSync.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.4.1</Version>
<AssemblyVersion>0.4.1.0</AssemblyVersion>
<FileVersion>0.4.1.0</FileVersion>
<Version>0.5.0</Version>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void Verify_AcceptsExpectedConfirmationAndNoUpdateDialogs()
"update-no-update",
"#32770",
"Codex Provider Sync",
["当前已是最新版本(v0.4.0)。", "确定"]);
["当前已是最新版本(v0.5.0)。", "确定"]);

Assert.True(sync.Passed, sync.Error);
Assert.True(noUpdate.Passed, noUpdate.Error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>CodexProviderSync.GuiE2E</RootNamespace>
<Version>0.4.1</Version>
<AssemblyVersion>0.4.1.0</AssemblyVersion>
<FileVersion>0.4.1.0</FileVersion>
<Version>0.5.0</Version>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions desktop/CodexProviderSync.Mac/CodexProviderSync.Mac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<AssemblyName>CodexProviderSync</AssemblyName>
<Product>Codex Provider Sync</Product>
<Company>Dailin521</Company>
<Version>0.4.1</Version>
<AssemblyVersion>0.4.1.0</AssemblyVersion>
<FileVersion>0.4.1.0</FileVersion>
<Version>0.5.0</Version>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>

Expand Down
10 changes: 7 additions & 3 deletions docs/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE)
[![Community](https://img.shields.io/badge/community-LINUX%20DO-2ea043.svg)](https://linux.do/)

[Download Windows GUI](https://github.com/Dailin521/codex-provider-sync/releases/latest) · [Build macOS GUI](README_MAC_GUI_EN.md) · [中文](../README.md) · English
[Web UI](../README.md) · [中文](README_ZH.md) · [日本語](README_JA.md) · [한국어](README_KO.md) · English

</div>

> The repository root [README](../README.md) is the canonical English documentation and now focuses on the Web UI. This file is retained as a longer legacy reference.

## When You Need It

After switching `model_provider`, older Codex sessions may disappear from Desktop or `/resume`. The sessions are usually still present, but their rollout, SQLite, or project-visibility metadata still points to the previous Provider.
Expand Down Expand Up @@ -45,7 +47,9 @@ If your current switcher already keeps all history visible, you do not need to r

## Quick Start

### Windows GUI
### Desktop GUI (deprecated)

The Desktop GUI is deprecated and is not the recommended interface. Use the local Web UI described in the root README instead.

For normal Windows use, download the standalone GUI from [Releases](https://github.com/Dailin521/codex-provider-sync/releases/latest):

Expand All @@ -70,7 +74,7 @@ See [README_GUI_ZH.md](README_GUI_ZH.md) for the full Windows guide. A self-buil

### CLI

The CLI requires Node.js `16+`:
The CLI requires Node.js `>=16.20.2`:

```bash
npm install -g git+https://github.com/Dailin521/codex-provider-sync.git
Expand Down
98 changes: 98 additions & 0 deletions docs/README_JA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# codex-provider-sync 日本語ガイド

`codex-provider-sync` は、Provider の切り替え後に Codex の過去セッションを再び表示できるようにする、ローカル実行のメタデータ整合性ツールです。セッション本体が削除されたのではなく、rollout、SQLite のスレッド索引、プロジェクト metadata が以前の Provider を参照している場合に使用します。

現在の推奨インターフェースは localhost Web UI です。CLI は自動化と WSL 環境向けに利用できます。Desktop GUI は非推奨で、互換性のための旧版資料のみ残しています。

## クイックスタート:Web UI

Node.js 16.20.2 以降が必要です。

```bash
npm install
npm run web:build
npm run web:start
```

またはグローバルにインストールします。

```bash
npm install -g git+https://github.com/Dailin521/codex-provider-sync.git
codex-provider web
```

既定のアドレス:`http://127.0.0.1:8791`

```bash
codex-provider web --no-open
codex-provider web --port 8792
```

サービスは `127.0.0.1` のみに bind します。プロセスごとにランダムな API セッショントークンを発行し、Origin を検証します。sync、switch、restore、prune などの書き込み操作は同時に一つだけ実行されます。

## Web UI の機能

- Overview:現在の Provider、rollout/SQLite 分布、整合性、プロジェクト可視性を確認。
- Chat History:rollout JSONL を読み取り専用で解析し、ユーザーと agent のメッセージを表示。
- タイトル、プロジェクト、Provider、メッセージ本文の検索と、active/archived フィルター。
- 1 ページ 50 セッションのサーバーサイドページング。
- 詳細画面では最新 200 件の読み取り可能なメッセージを表示し、安全な限定 Markdown とコードブロックをサポート。
- Sync / Switch:config を変更しない同期、Provider 切り替え後の同期、model 方針の選択。
- Backups:metadata v2 バックアップの確認、内容別の復元、古いバックアップの削除。

Chat History は raw JSONL、token、ツール呼び出し引数、`encrypted_content` をブラウザーへ返しません。

## CLI:自動化と WSL

CLI と Web UI は同じ `src/service.js` コアロジックを使用します。

```bash
codex-provider status
codex-provider sync
codex-provider switch apigather
codex-provider switch apigather --model "MiniMax-M3"
codex-provider restore <backup-dir>
codex-provider prune-backups --keep 5
codex-provider watch
```

すべての主要コマンドで `--codex-home <PATH>` と `--sqlite-home <PATH>` を指定できます。Windows の Codex Home と WSL の SQLite を組み合わせる場合は、WSL 内で Linux パスを使って CLI を実行してください。

```bash
codex-provider sync \
--codex-home /mnt/c/Users/you/.codex \
--sqlite-home /home/you/.codex/sqlite
```

## SQLite Home の解決

優先順位は CLI/GUI override → `config.toml` の root `sqlite_home` → `CODEX_SQLITE_HOME` → `<Codex Home>/sqlite` です。明示的に指定された SQLite Home が存在しない場合、別のデータベースへフォールバックしません。旧 `<Codex Home>/state_5.sqlite` を確認できるのは既定レイアウトだけです。

## 安全性と制限

- sync / switch の前に `~/.codex/backups_state/provider-sync/<timestamp>` へバックアップを作成します。
- メッセージ本文、タイトル、認証情報、`auth.json`、`updated_at` は変更しません。
- SQLite がロックされている場合は Codex CLI、Codex App、app-server を終了してから再実行してください。
- ロック中の rollout はスキップされ、セッション終了後に再同期できます。
- `encrypted_content` を含む履歴は一覧に表示できても、Provider/account をまたぐと再開や compact に失敗する場合があります。

## Desktop GUI の状態

Desktop GUI は非推奨です。既存の Windows/macOS 版は互換性のために残っていますが、新機能は Web UI を優先します。

- [Web UI 使用説明(中国語)](README_WEB_UI_ZH.md)
- [English README](../README.md)
- [旧 Windows GUI 説明](README_GUI_ZH.md)

## 開発とテスト

```bash
npm install
npm run web:build
npm test
git diff --check
```

## License

MIT
98 changes: 98 additions & 0 deletions docs/README_KO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# codex-provider-sync 한국어 안내

`codex-provider-sync`는 Provider를 변경한 뒤 Codex의 이전 세션을 다시 표시할 수 있도록 돕는 로컬 메타데이터 정합성 도구입니다. 세션 파일이 삭제된 것이 아니라 rollout, SQLite 스레드 인덱스 또는 프로젝트 metadata가 이전 Provider를 가리킬 때 사용합니다.

현재 권장 인터페이스는 localhost Web UI입니다. CLI는 자동화와 WSL 환경에서 사용합니다. Desktop GUI는 더 이상 권장하지 않으며 호환성을 위한 이전 문서만 유지합니다.

## 빠른 시작: Web UI

Node.js 16.20.2 이상이 필요합니다.

```bash
npm install
npm run web:build
npm run web:start
```

또는 전역 설치:

```bash
npm install -g git+https://github.com/Dailin521/codex-provider-sync.git
codex-provider web
```

기본 주소: `http://127.0.0.1:8791`

```bash
codex-provider web --no-open
codex-provider web --port 8792
```

서비스는 `127.0.0.1`에만 바인딩됩니다. 프로세스마다 임의의 API 세션 토큰을 만들고 Origin을 검증합니다. sync, switch, restore, prune 같은 쓰기 작업은 동시에 하나만 실행됩니다.

## Web UI 기능

- Overview: 현재 Provider, rollout/SQLite 분포, 정합성, 프로젝트 가시성 진단.
- Chat History: rollout JSONL을 읽기 전용으로 분석해 사용자와 agent 메시지를 표시.
- 제목, 프로젝트 경로, Provider, 메시지 본문 검색 및 active/archived 필터.
- 페이지당 기본 50개 세션의 서버 측 페이지네이션.
- 상세 화면에서 최근 200개의 읽을 수 있는 메시지를 표시하고 제한된 안전 Markdown과 코드 블록을 지원.
- Sync / Switch: 설정을 바꾸지 않는 동기화, Provider 전환 후 동기화, model 정책 선택.
- Backups: metadata v2 백업 조회, 내용별 복원, 오래된 백업 정리.

Chat History는 raw JSONL, token, 도구 호출 인자, `encrypted_content`를 브라우저에 반환하지 않습니다.

## CLI: 자동화 및 WSL

CLI와 Web UI는 동일한 `src/service.js` 핵심 로직을 사용합니다.

```bash
codex-provider status
codex-provider sync
codex-provider switch apigather
codex-provider switch apigather --model "MiniMax-M3"
codex-provider restore <backup-dir>
codex-provider prune-backups --keep 5
codex-provider watch
```

주요 명령은 `--codex-home <PATH>` 및 `--sqlite-home <PATH>`를 지원합니다. Windows Codex Home과 WSL SQLite를 함께 사용할 때는 WSL 안에서 Linux 경로로 CLI를 실행하세요.

```bash
codex-provider sync \
--codex-home /mnt/c/Users/you/.codex \
--sqlite-home /home/you/.codex/sqlite
```

## SQLite Home 해석

우선순위는 CLI/GUI override → `config.toml`의 root `sqlite_home` → `CODEX_SQLITE_HOME` → `<Codex Home>/sqlite`입니다. 명시적으로 지정한 SQLite Home이 없으면 다른 데이터베이스로 조용히 fallback하지 않습니다. 기존 `<Codex Home>/state_5.sqlite`를 확인하는 것은 기본 레이아웃에서만 허용됩니다.

## 안전성과 제한

- sync / switch 전에 `~/.codex/backups_state/provider-sync/<timestamp>`에 백업을 생성합니다.
- 메시지 본문, 제목, 인증 정보, `auth.json`, `updated_at`은 변경하지 않습니다.
- SQLite가 잠겨 있으면 Codex CLI, Codex App, app-server를 종료한 뒤 다시 실행하세요.
- 잠긴 rollout 파일은 건너뛰며 활성 세션이 끝난 후 다시 동기화할 수 있습니다.
- `encrypted_content`가 포함된 기록은 목록에는 보일 수 있지만 Provider/account를 넘나들면 재개나 compact가 실패할 수 있습니다.

## Desktop GUI 상태

Desktop GUI는 더 이상 권장하지 않습니다. 기존 Windows/macOS 버전은 호환성을 위해 남아 있지만 새 기능은 Web UI를 우선합니다.

- [Web UI 사용 설명(중국어)](README_WEB_UI_ZH.md)
- [English README](../README.md)
- [기존 Windows GUI 설명](README_GUI_ZH.md)

## 개발 및 테스트

```bash
npm install
npm run web:build
npm test
git diff --check
```

## License

MIT
Loading
Loading