From cda10f4bce530ba293295f9bece60e30dadf79b4 Mon Sep 17 00:00:00 2001 From: YEONGUK LEE Date: Mon, 2 Nov 2026 13:10:59 +0900 Subject: [PATCH 1/2] chore(release): prepare v1.4.0 MCP expansion --- README.ja.md | 4 +-- README.ko.md | 4 +-- README.md | 4 +-- README.zh-CN.md | 4 +-- RELEASING.ja.md | 8 +++++ RELEASING.ko.md | 8 +++++ RELEASING.md | 8 +++++ RELEASING.zh-CN.md | 8 +++++ docs/README.md | 2 ++ docs/cli-reference.md | 18 ++++++++---- docs/i18n-manifest.json | 11 +++---- docs/ja/README.md | 2 ++ docs/ja/cli-reference.md | 18 ++++++++---- docs/ja/mcp.md | 24 ++++++++++----- docs/ja/releases/v1.4.0.md | 34 +++++++++++++++++++++ docs/ko/README.md | 2 ++ docs/ko/cli-reference.md | 18 ++++++++---- docs/ko/mcp.md | 24 ++++++++++----- docs/ko/releases/v1.4.0.md | 34 +++++++++++++++++++++ docs/mcp.md | 24 ++++++++++----- docs/releases/v1.4.0.md | 34 +++++++++++++++++++++ docs/zh-CN/README.md | 2 ++ docs/zh-CN/cli-reference.md | 18 ++++++++---- docs/zh-CN/mcp.md | 24 ++++++++++----- docs/zh-CN/releases/v1.4.0.md | 34 +++++++++++++++++++++ session_peer.py | 2 +- session_peer_core/common.py | 2 +- session_peer_mcp.py | 9 ++++-- tests/docs/test_docs_i18n.py | 2 +- tests/docs/test_stable_candidate.py | 39 ++++++++++++++++++++----- tests/mcp_integration/test_cleanup.py | 18 ++++++++++++ tests/mcp_integration/test_preflight.py | 15 ++++++++++ 32 files changed, 380 insertions(+), 78 deletions(-) create mode 100644 docs/ja/releases/v1.4.0.md create mode 100644 docs/ko/releases/v1.4.0.md create mode 100644 docs/releases/v1.4.0.md create mode 100644 docs/zh-CN/releases/v1.4.0.md diff --git a/README.ja.md b/README.ja.md index 355c6575..864a225f 100644 --- a/README.ja.md +++ b/README.ja.md @@ -33,7 +33,7 @@ session-peer 1.0.2による実際のローカル通信です。CodexがClaude Co ### インストール Python 3.9以上が必要です。基本のローカル・SSH CLIに外部Python依存パッケージはありません。 -ソースバージョン:**1.3.3**。[メンテナンスノート](docs/ja/releases/v1.3.3.md)では、Python 3.14 の検証範囲、投稿手順と文書の保守、互換スキルコピーを説明します。Python の公開、Node Control の配備、独立管理するスキルの更新は別々の作業です。 +ソースバージョン:**1.4.0**(2026-11-02の準備時点:未公開の候補、当時の最新公開済みバージョンは1.3.3)。[リリースノート](docs/ja/releases/v1.4.0.md)では、範囲を制限したMCP探索、配信の事前確認と診断、経路プリセット、独立スキルの提案を説明します。Pythonの公開、Node Controlの配備、独立管理するスキルの更新は別々の作業です。 任意の[MCPエクストラ](docs/ja/mcp.md)は`mcp>=1.30,<2`を必要とします。MCPのPython 3.10+要件と依存関係のないPython 3.9コアは変更しません。既存のMCP環境では明示的なパッケージ更新が必要です。 @@ -105,7 +105,7 @@ Unix、Python 3.11以上、`session-peer[relay]`、固定した識別情報と パッケージの公開はホスト型サービスの可用性を保証しません。 ブラインドRelayはアプリケーションのメッセージ内容を復号できません。 [MCP・Codexプラグイン](https://github.com/abruption/session-peer/blob/main/docs/ja/mcp.md)にはPython 3.10以上と -`session-peer[mcp]` が必要で、MCP wakeには `send` と `wake` の両方の機能(capability)が必要です。 +`session-peer[mcp]` が必要で、MCP の送信で実際に wake を要求するには `send` と `wake` の両方の機能(capability)が必要です。 [Wake](https://github.com/abruption/session-peer/blob/main/docs/ja/wake.md)は明示的に依頼した場合だけ実行し、 ターンの開始、利用枠の消費、プロジェクトファイルの変更を伴う場合があります。 [Antigravityブリッジ](https://github.com/abruption/session-peer/blob/main/docs/ja/antigravity.md)は実験段階です。 diff --git a/README.ko.md b/README.ko.md index 993a4f9b..5a162168 100644 --- a/README.ko.md +++ b/README.ko.md @@ -33,7 +33,7 @@ session-peer 1.0.2를 사용해 실제 로컬 요청과 회신을 주고받았 ### 설치 Python 3.9 이상이 필요합니다. 기본 로컬·SSH CLI는 외부 Python 패키지에 의존하지 않습니다. -소스 버전: **1.3.3**. [유지보수 노트](docs/ko/releases/v1.3.3.md)에서 Python 3.14 검증 범위, 기여 안내·문서 유지보수, 호환 스킬 사본을 설명합니다. Python 공개, Node Control 배포, 별도로 관리하는 스킬의 갱신은 서로 구분합니다. +소스 버전: **1.4.0**(2026-11-02 준비 시점 기준: 미공개 후보, 당시 최신 공개 버전 1.3.3). [릴리스 노트](docs/ko/releases/v1.4.0.md)는 범위를 제한한 MCP 탐색, 전달 사전 점검·진단, 경로 프리셋과 독립 스킬 제안을 설명합니다. Python 공개, Node Control 배포, 별도로 관리하는 스킬의 갱신은 서로 구분합니다. 선택형 [MCP extra](docs/ko/mcp.md)는 이제 `mcp>=1.30,<2`를 요구합니다. MCP의 Python 3.10+ 요건과 의존성 없는 Python 3.9 핵심 CLI는 유지됩니다. 기존 MCP 환경에는 명시적인 패키지 업그레이드가 필요합니다. @@ -105,7 +105,7 @@ Unix·Python 3.11 이상·`session-peer[relay]`, 고정된 기기 신원, 명시 패키지를 공개해도 호스팅 서비스의 가용성이 보장되지는 않습니다. 블라인드 Relay는 애플리케이션 메시지 내용을 복호화할 수 없습니다. [MCP(Model Context Protocol)·Codex 플러그인](https://github.com/abruption/session-peer/blob/main/docs/ko/mcp.md)은 Python 3.10 이상과 -`session-peer[mcp]`가 필요하며, MCP wake 기능에는 `send`와 `wake` 권한이 모두 필요합니다. +`session-peer[mcp]`가 필요하며, MCP 전송에서 실제 wake를 요청하려면 `send`와 `wake` 권한이 모두 필요합니다. [Wake](https://github.com/abruption/session-peer/blob/main/docs/ko/wake.md)는 명시적으로 요청한 경우에만 실행됩니다. 턴을 시작하고 사용량을 소비하거나 프로젝트 파일을 변경할 수 있습니다. [Antigravity 브리지](https://github.com/abruption/session-peer/blob/main/docs/ko/antigravity.md)는 실험 단계입니다. diff --git a/README.md b/README.md index 771982ff..4eec81b9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ in this ~22-second animation, not a screen recording; send success alone is not ### Install Python 3.9+. The core local/SSH CLI has no third-party Python dependencies. -Source version: **1.3.3**. The [maintenance notes](docs/releases/v1.3.3.md) describe the Python 3.14 validation scope, contributor and documentation maintenance, and the compatibility skill snapshot. Python publication, Node Control deployment and independently managed skill updates are separate. +Source version: **1.4.0** (at the 2026-11-02 preparation checkpoint: unpublished candidate; latest published version 1.3.3). The [release notes](docs/releases/v1.4.0.md) describe bounded MCP discovery, delivery preflight and diagnostics, route presets, and the independent skill proposal. Python publication, Node Control deployment and independently managed skill updates are separate. The optional [MCP extra](docs/mcp.md) now requires `mcp>=1.30,<2`; its Python 3.10+ requirement and the dependency-free Python 3.9 core remain unchanged. Existing MCP environments need an explicit package upgrade. @@ -105,7 +105,7 @@ require Unix, Python 3.11+, and `session-peer[relay]`, with pinned identities an explicit receiver policy. Package publication does not guarantee hosted-service availability. The blind Relay cannot decrypt application message content. [MCP / Codex plugin](https://github.com/abruption/session-peer/blob/main/docs/mcp.md) requires Python 3.10+ -and `session-peer[mcp]`; MCP wake requires both `send` and `wake` capabilities. +and `session-peer[mcp]`; MCP sends that actually request wake require both `send` and `wake` capabilities. [Wake](https://github.com/abruption/session-peer/blob/main/docs/wake.md) runs only when explicitly requested and can start a turn, consume usage, and change project files. The [Antigravity bridge](https://github.com/abruption/session-peer/blob/main/docs/antigravity.md) remains experimental. diff --git a/README.zh-CN.md b/README.zh-CN.md index 463f0042..224f299f 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -33,7 +33,7 @@ session-peer使用各智能体自身的收件箱和队列;接收方智能体 ### 安装 需要Python 3.9或更高版本。核心本地与SSH CLI没有第三方Python依赖。 -源码版本:**1.3.3**。[维护说明](docs/zh-CN/releases/v1.3.3.md)介绍 Python 3.14 的验证范围、贡献流程与文档维护,以及兼容技能副本。Python 发布、Node Control 部署及独立管理的技能更新是不同的工作。 +源码版本:**1.4.0**(截至2026-11-02准备检查点:尚未发布的候选版本,当时最新已发布版本为1.3.3)。[发布说明](docs/zh-CN/releases/v1.4.0.md)介绍有限范围的MCP发现、传递预检与诊断、路由预设及独立技能提案。Python发布、Node Control部署及独立管理的技能更新是不同的工作。 可选的[MCP extra](docs/zh-CN/mcp.md)现在要求`mcp>=1.30,<2`;MCP的Python 3.10+要求和无外部依赖的Python 3.9核心保持不变。现有MCP环境需要显式升级软件包。 @@ -105,7 +105,7 @@ Unix、Python 3.11以上和 `session-peer[relay]`,并要求固定设备身份 软件包发布不保证托管服务可用性。 盲转发Relay无法解密应用消息的内容。 [MCP与Codex插件](https://github.com/abruption/session-peer/blob/main/docs/zh-CN/mcp.md)需要Python 3.10以上及 -`session-peer[mcp]`;MCP wake需要同时具备 `send` 和 `wake` 两项能力。 +`session-peer[mcp]`;MCP 发送中实际请求 wake 时,需要同时具备 `send` 和 `wake` 两项能力。 [Wake](https://github.com/abruption/session-peer/blob/main/docs/zh-CN/wake.md)仅在显式请求时运行, 可能启动一轮任务、消耗使用额度或修改项目文件。 [Antigravity桥接](https://github.com/abruption/session-peer/blob/main/docs/zh-CN/antigravity.md)仍处于实验阶段。 diff --git a/RELEASING.ja.md b/RELEASING.ja.md index 6a91265c..28f9f325 100644 --- a/RELEASING.ja.md +++ b/RELEASING.ja.md @@ -1,5 +1,13 @@ # session-peerのリリース +## v1.4.0の準備 + +公開済みv1.3.3を基準に2026-11-02に準備しました。この日付の確認時点では、v1.4.0は未公開の候補です。統合ソース基準はバージョン準備前の`f290973962c63548f24153eeee12a8e3666fd043`であり、最終リリースコミットではありません。[リリースノート](docs/ja/releases/v1.4.0.md)は#356–#359 / #361–#364の範囲を制限したMCP探索、配信の事前確認と診断、承認済み経路プリセットを扱います。統合基準の[CI](https://github.com/abruption/session-peer/actions/runs/41381070618)は37ジョブが成功し、同じ基準の[CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309)も成功しました。いずれも最終準備コミットや保護されたmainの検査を代替しません。 + +既存の互換スナップショットと将来の`SKILL.md`サポート資産は公開済みスキルv0.4.1を維持します。ソースは`263b0c333d539dc4e885b16ae3369a26f33097d8`、UTF-8で27126バイト、SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`、最小0.9.1/full 1.3.2、受信機`codexBin`下限1.0.1で、wheel/sdistの外に置きます。スキル0.5.0/最小0.9.1/full 1.4.0の提案には、実際のランタイム公開と別途承認の後、正確なタグ・ソース・ハッシュのスナップショットPRが必要です。将来のスキルタグがなくてもランタイム準備は妨げません。変更したバイト列を0.4.1として再表示したり、ここでインストール済みスキルを更新したりしません。 + +この準備はマージ、タグ・ドラフト作成、ワークフロー実行、公開や運用作業を承認しません。正確な現行コミットをレビューし、現行コミットの検査と最終的な保護されたmain CIを要求します。別途承認された公開では、`SHA256SUMS`と`release-provenance.json`を含む固定資産7個を正確なタグ・ソースと認証済みattestationに照合し、監査と新規インストール検査を行い、非公開ログイン・接続再確認を省略しても必須のPyPI環境の人による承認を維持します。v1.3.3の記録と以下の過去の運用手順をすべて変更せずに保存し、公開を先取りしない日付付き案内を固定し、実際の公開の根拠を別途追加してから[公開後の文書確認](#post-publication-documentation-check)を行います。新たな実環境のNative/SSH、Windows 3.14やfree-threadedの受け入れ、ACK・重複排除・handoffの保証、所有元app-serverの対応やサポート水準の昇格は主張しません。不明なロール・結果の制限、キュー投入はACKではないこと、自動再試行の禁止は維持します。Python公開、グローバルMCP環境、サービス、Node Control、独立スキルには別途運用承認が必要です。 + ## v1.3.3の準備 公開済みv1.3.2を基準に2026-10-30に準備しました。その準備時点ではv1.3.3は未公開の候補でした。統合ソース基準はバージョン準備前の`ec2f7fc808f1e22519348091d51c28a2fd522caf`であり、最終リリースコミットではありません。[保守リリースの案内](docs/ja/releases/v1.3.3.md)は、#349/#352のPR案内と警告のみの参照検査、#350/#353の通常のCPython 3.14フィクスチャー・パッケージCI、#351/#354の公開後文書整理、公開済みPythonスキルv0.4.1の互換コピーを扱います。将来の`SKILL.md`サポート資産は、`abruption/session-peer-skill`リポジトリの`v0.4.1`タグに対応するコミット`263b0c333d539dc4e885b16ae3369a26f33097d8`、SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`、下限0.9.1/full 1.3.2、受信機`codexBin`下限1.0.1を使います。このコピーはwheel/sdistの外にあり、ランタイム1.3.3とは独立しています。 diff --git a/RELEASING.ko.md b/RELEASING.ko.md index f04996a9..45a9a44b 100644 --- a/RELEASING.ko.md +++ b/RELEASING.ko.md @@ -1,5 +1,13 @@ # session-peer 릴리스 +## v1.4.0 준비 + +공개된 v1.3.3을 기준으로 2026-11-02에 준비했습니다. 이 날짜의 점검 시점에서 v1.4.0은 미공개 후보입니다. 통합 소스 기준은 버전 준비 이전의 `f290973962c63548f24153eeee12a8e3666fd043`이며 최종 릴리스 커밋이 아닙니다. [릴리스 노트](docs/ko/releases/v1.4.0.md)는 #356–#359 / #361–#364의 범위를 제한한 MCP 탐색, 전달 사전 점검·진단과 승인된 경로 프리셋을 다룹니다. 통합 기준의 [CI](https://github.com/abruption/session-peer/actions/runs/41381070618)는 작업 37개가 통과했고 같은 기준의 [CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309)도 통과했습니다. 어느 쪽도 최종 준비 커밋이나 보호된 main 검사를 대신하지 않습니다. + +기존 호환 스냅샷과 향후 `SKILL.md` 지원 자산은 공개된 스킬 v0.4.1을 유지합니다. 소스는 `263b0c333d539dc4e885b16ae3369a26f33097d8`, UTF-8 27126바이트, SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`, 최소 0.9.1/full 1.3.2, 수신기 `codexBin` 하한 1.0.1이며 wheel/sdist 밖에 둡니다. 스킬 0.5.0/최소 0.9.1/full 1.4.0 제안은 실제 런타임 공개와 별도 승인 이후 정확한 태그·소스·해시 스냅샷 PR이 필요합니다. 미래 스킬 태그가 없어도 런타임 준비를 막지 않으며 변경된 바이트를 0.4.1로 다시 표시하거나 여기서 설치된 스킬을 갱신하지 않습니다. + +이 준비는 병합, 태그·초안 생성, 워크플로 실행, 공개나 운영 작업을 승인하지 않습니다. 정확한 현재 커밋을 리뷰하고 현재 커밋 검사와 최종 보호된 main CI를 요구합니다. 별도 승인된 공개에서는 `SHA256SUMS`, `release-provenance.json`을 포함한 고정 자산 7개를 정확한 태그·소스 및 인증된 attestation과 대조하고 감사와 새 환경 설치 검사를 수행하며 비공개 로그인·연결 재확인을 생략해도 필수 PyPI 환경의 사람 승인을 유지해야 합니다. v1.3.3 기록과 아래 과거 운영 절차를 모두 그대로 보존하고 공개를 미리 선언하지 않는 날짜별 안내를 고정하며 실제 공개 근거를 별도로 추가한 뒤 [공개 후 문서 확인](#post-publication-documentation-check)을 수행합니다. 새로운 실제 Native/SSH, Windows 3.14 또는 free-threaded 수락, ACK·중복 제거·handoff 보장, 소유 app-server 지원이나 지원 수준 승격을 주장하지 않습니다. 알 수 없는 역할·결과의 제한, 큐 제출은 ACK가 아니라는 원칙과 자동 재시도 금지는 유지합니다. Python 공개, 전역 MCP 환경, 서비스, Node Control과 독립 스킬에는 별도 운영 승인이 필요합니다. + ## v1.3.3 준비 공개된 v1.3.2를 기준으로 2026-10-30에 준비했습니다. 해당 준비 시점에 v1.3.3은 미공개 후보였습니다. 통합 소스 기준은 버전 준비 이전의 `ec2f7fc808f1e22519348091d51c28a2fd522caf`이며 최종 릴리스 커밋이 아닙니다. [유지보수 안내](docs/ko/releases/v1.3.3.md)는 #349/#352의 PR 안내와 경고 전용 참조 검사, #350/#353의 일반 CPython 3.14의 전용 테스트 구성(fixture) 기반 시험·패키지 CI, #351/#354의 공개 후 문서 정리, 공개된 Python 스킬 v0.4.1의 호환 사본을 다룹니다. 향후 `SKILL.md` 지원 자산은 `abruption/session-peer-skill` 저장소의 `v0.4.1` 태그에 해당하는 커밋 `263b0c333d539dc4e885b16ae3369a26f33097d8`, SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`, 하한 0.9.1/full 1.3.2와 수신기 `codexBin` 하한 1.0.1을 사용합니다. 이 사본은 wheel/sdist 밖에 있으며 런타임 1.3.3과 독립적입니다. diff --git a/RELEASING.md b/RELEASING.md index 7f1764a1..a93977ca 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,5 +1,13 @@ # Releasing session-peer +## v1.4.0 preparation + +Prepared on 2026-11-02 against published v1.3.3. At this dated checkpoint, v1.4.0 is an unpublished candidate. Integrated source base: `f290973962c63548f24153eeee12a8e3666fd043`, before version preparation, not the final release commit. The [release notes](docs/releases/v1.4.0.md) cover #356–#359 / #361–#364: bounded MCP discovery, delivery preflight and diagnostics, and approved route presets. Integrated-base [CI](https://github.com/abruption/session-peer/actions/runs/41381070618) passed 37 jobs and [CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309) passed at the same base; neither replaces final preparation-head or protected-main checks. + +The existing compatibility snapshot and prospective `SKILL.md` support asset remain published skill v0.4.1, source `263b0c333d539dc4e885b16ae3369a26f33097d8`, 27126 UTF-8 bytes, SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`, minimum 0.9.1/full 1.3.2 and receiver `codexBin` floor 1.0.1, outside wheel/sdist. Proposed skill 0.5.0/minimum 0.9.1/full 1.4.0 requires actual runtime publication and separate approval, then an exact tag/source/hash snapshot PR. A missing future skill tag does not block runtime preparation; do not relabel changed bytes as 0.4.1 or update installed skills here. + +This preparation authorizes no merge, tag/draft creation, workflow dispatch, publication or operations. Review the exact current head and require current-head checks and final protected-main CI. Separately authorized publication must verify all 7 frozen assets, including `SHA256SUMS` and `release-provenance.json`, against exact tag/source and authenticated attestations, run audits and fresh installation checks, and retain required human PyPI environment approval even when the private login/binding recheck is skipped. Preserve all v1.3.3 records and the historical runbook below unchanged; freeze publication-neutral dated notes and add actual publication evidence separately before the [post-publication documentation check](#post-publication-documentation-check). No new live Native/SSH, Windows 3.14 or free-threaded acceptance, ACK/deduplication/handoff guarantees, owning app-server support or support promotion is claimed; unknown roles/outcomes, queued-not-ACK and no automatic retry remain. Python publication, global MCP environments, services, Node Control and independent skills require separate operational authorization. + ## v1.3.3 preparation Prepared on 2026-10-30 against published v1.3.2. At that preparation checkpoint, v1.3.3 was an unpublished candidate. Integrated source base: `ec2f7fc808f1e22519348091d51c28a2fd522caf`, before version preparation, not the final release commit. The [maintenance notes](docs/releases/v1.3.3.md) cover #349/#352 PR guidance and warning-only references, #350/#353 standard CPython 3.14 fixture/package CI, #351/#354 post-publication documentation, and the compatibility snapshot of published Python skill v0.4.1. The prospective `SKILL.md` support asset uses commit `263b0c333d539dc4e885b16ae3369a26f33097d8` in `abruption/session-peer-skill` at tag `v0.4.1`, SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`, minimum 0.9.1/full 1.3.2 and receiver `codexBin` floor 1.0.1; it is outside wheel/sdist and independent of runtime 1.3.3. diff --git a/RELEASING.zh-CN.md b/RELEASING.zh-CN.md index e1e050fd..b8c6029c 100644 --- a/RELEASING.zh-CN.md +++ b/RELEASING.zh-CN.md @@ -1,5 +1,13 @@ # 发布session-peer +## v1.4.0准备 + +于2026-11-02基于已发布的v1.3.3准备。在这个注明日期的检查点,v1.4.0尚未发布,仅为候选版本。集成源码基准为版本准备前的`f290973962c63548f24153eeee12a8e3666fd043`,并非最终发布提交。[发布说明](docs/zh-CN/releases/v1.4.0.md)涵盖#356–#359 / #361–#364的有限范围MCP发现、传递预检与诊断,以及获准路由预设。集成基准的[CI](https://github.com/abruption/session-peer/actions/runs/41381070618)共37个任务通过,同一基准的[CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309)也通过。二者都不能替代最终准备提交或受保护main的检查。 + +现有兼容快照与将来的`SKILL.md`支持资产继续采用已发布技能v0.4.1,源码为`263b0c333d539dc4e885b16ae3369a26f33097d8`,UTF-8共27126字节,SHA-256为`fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`,最低0.9.1/full 1.3.2及接收端`codexBin`下限1.0.1,位于wheel/sdist之外。技能0.5.0/最低0.9.1/full 1.4.0提案需要运行时实际发布及另行批准,然后通过准确标签、源码和哈希的快照PR。未来技能标签尚不存在不妨碍运行时准备;不得将修改后的字节重新标作0.4.1,也不在此更新已安装技能。 + +本准备不授权合并、创建标签或草稿、触发工作流、发布或运营操作。须审查准确的当前提交,并要求当前提交检查与最终受保护main CI通过。另行授权的发布须将包含`SHA256SUMS`和`release-provenance.json`的7个固定资产与准确标签、源码及经过认证的attestation核对,执行审计和全新安装检查,即使省略私有登录或绑定复查,也必须保留PyPI环境必需的人工批准。完整保留v1.3.3记录与下方历史操作流程,冻结不预告发布的日期说明,另行加入实际发布依据后再进行[发布后文档检查](#post-publication-documentation-check)。不声称新增实际Native/SSH、Windows 3.14或free-threaded验收、ACK或去重或handoff保证、所属app-server支持或支持级别提升;未知角色与结果的限制、入队不代表ACK及禁止自动重试的原则保持不变。Python发布、全局MCP环境、服务、Node Control及独立技能均需要另行运营授权。 + ## v1.3.3准备 于2026-10-30以已发布的v1.3.2为基准准备。在当时的准备检查点,v1.3.3尚未发布,仅作为候选版本。集成源码基准为版本准备前的`ec2f7fc808f1e22519348091d51c28a2fd522caf`,并非最终发布提交。[维护说明](docs/zh-CN/releases/v1.3.3.md)涵盖#349/#352的PR说明与仅警告的引用检查、#350/#353的常规CPython 3.14测试夹具及软件包CI、#351/#354的发布后文档整理,以及已发布Python技能v0.4.1的兼容副本。将来的`SKILL.md`支持资产采用`abruption/session-peer-skill`仓库`v0.4.1`标签对应的提交`263b0c333d539dc4e885b16ae3369a26f33097d8`、SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`、下限0.9.1/full 1.3.2及接收端`codexBin`下限1.0.1。该副本位于wheel/sdist之外,独立于运行时1.3.3。 diff --git a/docs/README.md b/docs/README.md index da0ae5b0..2a627284 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,6 +24,8 @@ installation paths. ## Development and history +- [v1.4.0 preparation](releases/v1.4.0.md) records the merged MCP policy, preflight, diagnostics and preset changes at the 2026-11-02 source checkpoint; publication and independent skill adoption remain separate. + - [v1.3.3 maintenance preparation](releases/v1.3.3.md) covers Python 3.14 CI/metadata, contributor and publication guidance, and the verified compatibility skill v0.4.1 snapshot. Publication and operational deployment remain separate. - [v1.3.2 maintenance notes](releases/v1.3.2.md) explain macOS firewall approval, Direct listener/TLS diagnostics, the MCP SDK floor and the Control security update outside Python archives, which requires a separate rollout. diff --git a/docs/cli-reference.md b/docs/cli-reference.md index 5e57f029..3a9f95e4 100644 --- a/docs/cli-reference.md +++ b/docs/cli-reference.md @@ -1,5 +1,7 @@ # session-peer CLI reference +Source checkpoint 2026-11-02: the v1.4.0 source features below are prepared against published v1.3.3, not an availability announcement. Check the [release notes](releases/v1.4.0.md) and actual GitHub/PyPI publication before using them. + [Back to the overview](../README.md) Detailed command behavior, installation options, transport limits, and historical validation follow below. @@ -85,7 +87,9 @@ This scope is text-only: combining `--explain` with `--json` or `--output-format For send, the normal message requirement and limits still apply: supply `--message`, `--message-file` or stdin as usual; no placeholder body is generated. Explanation fields do not include the body or receipt secrets. Normal explanations use stdout; failed results or unexpected submission evidence use stderr, without moving existing summary/error output. Unknown evidence stays unknown, and an uncertain actual send must never trigger automatic resend. -### Unreleased v1.4.0 candidate: structured send preview (#357) + + +### v1.4.0 source: structured send preview (#357) `send --dry-run --explain-json` opts into a versioned, allowlisted JSON explanation for local or SSH validation. It uses the same classification as the text preview and the native response before SSH adapter shaping. Normal message inputs and limits apply; no placeholder body is generated. The output excludes message contents, raw errors and paths. Unknown or unexpected submission evidence fails validation and does not authorize automatic retry. @@ -219,9 +223,11 @@ Checked ancestors must be owned by root or the current user and not writable by On macOS, mounts that ignore ownership are refused with `preset_ownership_unenforced`; an unavailable or unverifiable mount query is refused with `preset_mount_unverifiable`. Mode bits alone are not treated as proof that ownership is enforced. On Linux, ACLs on ancestors are also refused, as are filesystems whose ACL state cannot be verified. After an interrupted management command, inspect the current configuration because the change may already be visible; directory-sync failures are not silently accepted. -### Unreleased v1.4.0 candidate: MCP presets (#359) + + +### v1.4.0 source: MCP presets (#359) -Candidate input signatures: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +Input signatures: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. MCP preset lookup and selection use an explicit operator allowlist and the existing secure snapshot reader; they add no CLI preset-management commands or automatic selection. See [MCP preset policy and limits](mcp.md). MCP selection expands an approved route instead of combining CLI `--preset` with explicit routing flags. Existing CLI output, revision and filesystem-security contracts remain unchanged. @@ -433,7 +439,7 @@ Repeat `--host` to operate on several SSH destinations. `--json` is available on ### JSON response contract -Every JSON result object starts with the same schema-versioned envelope: +Ordinary `--json` results from `list`, `send`, `doctor`, and `update` use the following schema-versioned envelope. The opt-in `--explain-json` output (`send.preflight`) and MCP metadata/preflight projections have separate documented schemas and intentionally omit `host`; do not add a host or infer a route from its absence: ```json { @@ -919,9 +925,9 @@ executable and bounded home/state DB candidates, unsupported DB schemas, and permission or unknown failures as distinct codes. It does not connect to an inbox, write a queue, scan arbitrary directories, or alter agent/SSH settings. -Unreleased v1.4.0 candidate (#358): `doctor --agent NAME` restricts checks and declared agent capabilities to the selected registered agent, including execution over SSH. It also skips the shared installed-skill inventory. `doctor --agent codex --selected-home-only --codex-home /absolute/home` checks only the selected Codex home and skips the inventory of other homes. These options do not enable reverse-route checks. Without them, existing all-agent and bounded multi-home diagnostics keep their behavior. +v1.4.0 source (#358): `doctor --agent NAME` restricts checks and declared agent capabilities to the selected registered agent, including execution over SSH. It also skips the shared installed-skill inventory. `doctor --agent codex --selected-home-only --codex-home /absolute/home` checks only the selected Codex home and skips the inventory of other homes. These options do not enable reverse-route checks. Without them, existing all-agent and bounded multi-home diagnostics keep their behavior. -The candidate MCP wrapper supports only the following checks and effects: +The MCP wrapper supports only the following checks and effects: | Mode / agent | Checked facts | Process / connection effects | | --- | --- | --- | diff --git a/docs/i18n-manifest.json b/docs/i18n-manifest.json index ef87ab95..200989eb 100644 --- a/docs/i18n-manifest.json +++ b/docs/i18n-manifest.json @@ -7,21 +7,21 @@ "zh-CN" ], "sources": { - "README.md": "61c50aee1b44a414334605c5536b649cc4598d37dac228719b6c22ba46006570", - "RELEASING.md": "4f39f1e5eb7e4cdb0f57dc68eb7eb04f67c6d027543252fe0adc5474c48adc79", + "README.md": "c0544fa8aed25891574805e6c9098dc8ee824b8669e16c34607cf82ec546a77f", + "RELEASING.md": "641babb664eb71da2425ec3ae666b843773350017a489076dcae29cd3a320db1", "SECURITY.md": "8f018f6f98002312e143609b9734aeb971ca5217e146597c06b57b5645031046", - "docs/README.md": "fff6dd61610f01c466969164005df237a2b39aa1e3bdd478bdb2c83fada18c57", + "docs/README.md": "28c870c47298c52bd7d3d27d7b940d74e7bdd4a9b7a69000ed2bee7ea5d6fd0b", "docs/agent-adapters.md": "bf185d3121c94829bb412071a25c4d943302e10a6b2e713111e653b8f8c3ea91", "docs/ai-assistant-guide.md": "9624ec96b92fb688fae3be3c94cb3564c77985091be451fbf1f056a1af9b9d9c", "docs/antigravity.md": "f2b5122a0ce6e6fb5bd4d8ed50ce2c8bd2dc9c98ec8ce328405cf7c2cd24229d", "docs/architecture/agent-transports.md": "01a4e3942e87acb476595859f2e37f9653ea1e3bc19ebc68dced1adf20a6966f", - "docs/cli-reference.md": "86f292fbbd9aa46d44c62051875105b21d465aeb8e0c438436fab7457548a3bf", + "docs/cli-reference.md": "c7836b27ffd6e1a4f0988846de4d3746a0a3242c9b5c54ae82c22e13e95065a7", "docs/compatibility-v1.md": "7e551aad37a369faff7e370728376763efb54c2c9e9cfd8556a0c19aabc3d103", "docs/contracts/handoff-v1.md": "46a953010c49214bd8f969412f26713384fbe09a0ba78ebf0fef75da40d0d889", "docs/diagnostics.md": "0949e53612eeab2cd7c7bbda498e14d71e9cb1b1189aa7722030cb8702cd8481", "docs/download-metrics.md": "a537300d3fe2b60273b6f4bd84e0ae0944364fda3881d7fb7e32ce665dc2c724", "docs/handoff-runtime.md": "a236e48392c91eca0f7c3734a6008a991955ae66d16fd71f97691aac5bf0091f", - "docs/mcp.md": "bc98e35b1d2584cc3628ea73387e2e388e7e93427030aaecbddf7a95852e3349", + "docs/mcp.md": "e9d562abbe1c5e7a80f740f8466603f8d5b0be0ce7bc420554faa52fd41a1058", "docs/multi-home-list.md": "f8d8e3adf727e4842ea7c4d45e8f6523b11d0513bf2509d4d1204645875e6489", "docs/paired-devices.md": "1c6cf45187fdbac5a21e43968bc0cc39aee05af19904b4d176f1dd2a70065303", "docs/relay-auth.md": "e6da5291ce6a9da31e79e66ceeff7e9fef7e95046359acbf04d708c96ffab62f", @@ -56,6 +56,7 @@ "docs/releases/v1.3.1.md": "1600b3f6e708ded1cd5d0cad7b5f2d78244e0e4b01d122d727f2a692fccaf652", "docs/releases/v1.3.2.md": "980437303a02644814116b12279d14bf83e6b50c87eab2e0c88e433808f372e3", "docs/releases/v1.3.3.md": "bb2707cc5ef4b763ee61a804fd8ce75b762731b16681ac6c322636a35657b892", + "docs/releases/v1.4.0.md": "6ab3365b9c286f81395cac99bb896e06ee1ee3ea759267b6bbe0e1623c76832f", "docs/validation/69-rc.md": "e490c6a9ad0fec9108b91c74922cedac7ddf214ed405f8f5523da22f48a4b222", "docs/validation/85-antigravity.md": "f89b175191cd98ab03d4029b487065133814b3c8dd8de8cd0a5cc367e2579e4f", "docs/wake.md": "cde135da2ea7be21c815bb265e694f737dbe467d8e76bb82eb118e3b86e29d22", diff --git a/docs/ja/README.md b/docs/ja/README.md index 7b32e35e..1b3011f6 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -23,6 +23,8 @@ ## 開発と履歴 +- [v1.4.0準備](releases/v1.4.0.md)は、2026-11-02のソース確認時点でマージ済みのMCPポリシー、事前検査、診断、プリセットの変更を記録します。公開と独立したスキルの適用は別です。 + - [v1.3.3 メンテナンス準備](releases/v1.3.3.md)は、Python 3.14 の CI・メタデータ、投稿・公開の案内、検証済みの互換スキル v0.4.1 コピーを扱います。公開と運用への配備は別です。 - [v1.3.2メンテナンス案内](releases/v1.3.2.md)ではmacOSのファイアウォール承認、Directリスナー・TLS診断、MCP SDK下限、Python配布物の外にあるControlのセキュリティ更新と別途の配備について説明します。 diff --git a/docs/ja/cli-reference.md b/docs/ja/cli-reference.md index b873d107..11ec8228 100644 --- a/docs/ja/cli-reference.md +++ b/docs/ja/cli-reference.md @@ -1,5 +1,7 @@ # session-peer CLI リファレンス +2026-11-02のソース確認時点では、以下のv1.4.0ソース機能は公開済みv1.3.3を基に準備したもので、利用可能になったことの告知ではありません。利用前に[リリースノート](releases/v1.4.0.md)と実際のGitHub/PyPIの公開状況を確認してください。 + [概要に戻る](../../README.ja.md) ## 受信セッションの世代を固定する条件(開発中) @@ -118,7 +120,9 @@ Handoff status は読み取り専用スナップショットを再利用し、in Send の通常のメッセージ入力要件と上限は変わりません。従来どおり `--message`、`--message-file` または stdin を使い、仮の本文は自動生成しません。説明フィールドに本文や receipt の秘密値は含めません。通常の説明は stdout に、失敗した結果や予期しない投入の証拠に関する説明は stderr に出力し、既存の要約・エラーの出力先は変えません。不明な証拠は不明のまま表示し、実際の送信結果が不確実な場合は自動再送しません。 -### 未リリースの v1.4.0 候補: 構造化された送信プレビュー (#357) + + +### v1.4.0 ソース: 構造化された送信プレビュー (#357) `send --dry-run --explain-json` は、ローカルまたは SSH の検証について、バージョン付きで許可されたフィールドだけの JSON 説明を出力する選択肢です。テキストプレビューと同じ分類を使用し、SSH アダプターによる整形前のネイティブ応答を基にします。通常のメッセージ入力と上限が適用され、仮の本文は生成しません。出力にメッセージ本文、生のエラー、パスは含めません。結果が不明な場合や予期しない投入の証拠がある場合は検証に失敗し、自動再試行を許可しません。 @@ -209,9 +213,11 @@ UUID は現在の一覧で確認した値に、ハッシュは選択したプリ macOS で所有権を無視するマウントは `preset_ownership_unenforced`、マウント照会が利用できない、または検証できない場合は `preset_mount_unverifiable` で拒否します。モードビットだけを所有権が強制される証拠とは扱いません。Linux では上位経路の ACL も、ACL 状態を検証できないファイルシステムも拒否します。管理コマンドを中断した後は、変更が既に見えている可能性があるため現在の設定を確認してください。ディレクトリの同期失敗を黙って成功とは扱いません。 -### 未リリースの v1.4.0 候補: MCP プリセット (#359) + + +### v1.4.0 ソース: MCP プリセット (#359) -候補版の入力シグネチャ: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +入力シグネチャ: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. MCP プリセットの参照と選択では、オペレーターの明示的な許可リストと既存の安全なスナップショット読み取り関数を使います。CLI のプリセット管理コマンドや自動選択は追加しません。[MCP プリセットのポリシーと制限](mcp.md)を参照してください。MCP の選択では、CLI の `--preset` と明示的な経路フラグを組み合わせず、承認済みの経路を展開します。既存の CLI 出力、リビジョン、ファイルシステムの安全性に関する契約は変わりません。 @@ -424,7 +430,7 @@ session-peer send --to 'session-peer://v1/reply?agent=claude&session=api-worker& ### JSON レスポンス規約 -すべての JSON 結果オブジェクトは、同じスキーマバージョン付きのエンベロープで始まります: +`list`、`send`、`doctor`、`update` の通常の `--json` 結果には、次のスキーマバージョン付きエンベロープを使います。選択式の `--explain-json` 出力(`send.preflight`)と MCP のメタデータ・事前検査応答は、別途文書化されたスキーマを使い、`host` を意図的に省きます。ホストを補ったり、フィールドの欠如から経路を推測したりしないでください: ```json { @@ -864,9 +870,9 @@ Codex メッセージは、測定された Codex サーバーの制限ではな 不明な障害を個別のコードとして報告します。受信トレイへの接続、キューへの書き込み、 任意のディレクトリのスキャン、エージェント/SSH 設定の変更は行いません。 -未リリースの v1.4.0 候補 (#358): `doctor --agent NAME` は SSH 経由も含め、チェックと宣言されたエージェント機能を選択した登録済みエージェントに限定し、共通のインストール済みスキル一覧の検査も省略します。`doctor --agent codex --selected-home-only --codex-home /absolute/home` は選択した Codex ホームのみを検査し、他のホームの一覧確認を省略します。これらのオプションは逆方向経路のチェックを有効にしません。省略すると、既存の全エージェントおよび制限付き複数ホーム診断の動作を維持します。 +v1.4.0 ソース (#358): `doctor --agent NAME` は SSH 経由も含め、チェックと宣言されたエージェント機能を選択した登録済みエージェントに限定し、共通のインストール済みスキル一覧の検査も省略します。`doctor --agent codex --selected-home-only --codex-home /absolute/home` は選択した Codex ホームのみを検査し、他のホームの一覧確認を省略します。これらのオプションは逆方向経路のチェックを有効にしません。省略すると、既存の全エージェントおよび制限付き複数ホーム診断の動作を維持します。 -候補版 MCP ラッパーが対応する検査と実行上の影響は、次の範囲に限られます。 +MCP ラッパーが対応する検査と実行上の影響は、次の範囲に限られます。 | モード / エージェント | 確認する事実 | プロセス / 接続への影響 | | --- | --- | --- | diff --git a/docs/ja/mcp.md b/docs/ja/mcp.md index b00ef27a..1dc67819 100644 --- a/docs/ja/mcp.md +++ b/docs/ja/mcp.md @@ -1,5 +1,7 @@ # オプションの Codex MCP 統合 +2026-11-02のソース確認時点では、以下のv1.4.0機能は公開済みv1.3.3を基に準備したもので、公開の告知ではありません。利用前に[リリースノート](releases/v1.4.0.md)と実際のGitHub/PyPIの公開状況を確認してください。 + Python 3.10 以降でインストールします: `pipx install 'session-peer[mcp]'`(または隔離された venv にエクストラをインストール)。依存関係のない Python 3.9 CLI および `install.sh` は引き続きサポートされます。シェルインストーラーは MCP の依存関係をインストールしません。Python 3.9 では、MCP エントリポイントが Python 3.10+ が必要である旨を報告します。 任意のエクストラはMCP SDK `mcp>=1.30,<2`を必要とします。上流の1.xセキュリティ修正を含む版まで依存関係の下限を引き上げるもので、stdio専用のこのサーバーで悪用可能な欠陥を確認したという意味ではありません。HTTP転送、OAuthサーバー経路、MCPクライアント経路は有効にしません。既存環境では明示的なパッケージ更新が必要で、宣言の変更だけではインストール済みSDKは更新されません。 @@ -29,21 +31,27 @@ Python 3.10 以降でインストールします: `pipx install 'session-peer[mc `codex mcp add session-peer -- /absolute/path/session-peer-mcp --config /absolute/path/policy.json` を使用して登録するか、リポジトリの `plugins/session-peer` バンドルを使用します: `codex plugin marketplace add /absolute/path/to/session-peer`、続いて `codex plugin add session-peer@session-peer`。このプラグインは PATH から `session-peer-mcp` を起動し、環境変数に設定されている場合は `SESSION_PEER_MCP_CONFIG` を読み取ります。最初に Python エクストラをインストールしてください。Python パッケージをインストールしても、既存の Codex 設定が変更されることはありません。 -## 未リリースの v1.4.0 候補: 宛先メタデータの取得 (#356) + + +## v1.4.0 ソース: 宛先メタデータの取得 (#356) `list_destinations()` は引数を取らず、オペレーターのポリシーのメタデータだけを返します。`schemaVersion` は 1 で、各項目には `destination`、`transport`、`agents`、`capabilities` が含まれます。子プロセスの起動やネットワークリクエストは行いません。SSH ホストの値と Codex ホームのパスは省略されます。送信先の名前は信頼できないデータとして扱ってください。設定されたケーパビリティはポリシー上の権限を示し、ネイティブエージェントとの互換性は示しません。 応答には制約を明示します: `callerIdentity="unavailable"`、`readiness="not_checked"`、`submission="not_attempted"`、`consumption="not_checked"`、`ack="not_checked"`。このツールは宛先が64件を超える場合や、IDに表示できない文字がある場合、UTF-8で128バイトを超える場合に取得を拒否します。テキストと構造化データを合わせたMCPツール結果は64 KiB以内で、外側のJSON-RPCエンベロープは含みません。これは取得ツールの制限であり、ポリシーの読み込みと既存ツールの動作は変わりません。表示可能な文字の判定は、実行中のPythonのUnicodeデータベースに従います。既定のローカル一覧取得専用ポリシーは変わりません。 -## 未リリースの v1.4.0 候補: 送信の事前検証 (#357) + + +## v1.4.0 ソース: 送信の事前検証 (#357) -`preflight_send(destination, target, message, wake=false, wake_timeout=30)` は、既存の CLI dry-run 検査で通常のメッセージを検証します。オペレーターのポリシーは `schemaVersion` 2 を使用し、送信先とエージェントに対して `preflight` を明示的に許可する必要があります。バージョン 1 の既存のケーパビリティには新たな権限を追加せず、既定はローカル一覧取得専用のままです。事前検証に `send` は不要で、送信を許可するものではありません。wake の適格性を調べる場合は別途 `wake` が必要ですが、モデルの起動や wake 予算の予約は行いません。 +`preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)` は、既存の CLI dry-run 検査で通常のメッセージを検証します。オペレーターのポリシーは `schemaVersion` 2 を使用し、送信先とエージェントに対して `preflight` を明示的に許可する必要があります。バージョン 1 の既存のケーパビリティには新たな権限を追加せず、既定はローカル一覧取得専用のままです。事前検証に `send` は不要で、送信を許可するものではありません。wake の適格性を調べる場合は別途 `wake` が必要ですが、モデルの起動や wake 予算の予約は行いません。 バージョン付きの説明は、SSH アダプターによる整形前のネイティブ応答から許可された事実だけを抽出し、定められた拒否・不明の理由とオペレーターの対処を示します。メッセージ本文、生のエラー、認証情報、ホスト・ホームのパス、ネイティブの記録は含めません。結果が不明な場合や予期しない投入の証拠がある場合は、`retryAllowed=false` として検証に失敗します。自動再送しないでください。事前検証はメッセージの投入や handoff 権限の作成を行いません。デバイスと handoff のモードには対応しません。 既存の dry-run 検査はローカル・バージョン確認のプロセスや SSH 接続を開始する場合があり、SSH 設定自体がコマンドを実行する場合もあります。このため、このツールは `readOnlyHint=false` と `openWorldHint=true` を使用します。ホストの承認はポリシーの権限とは別です。合格は検査時点の結果であり、経路の予約、有効なストレージの証明、承認、後の送信の保証、消費、ACK を意味しません。 -## 未リリースの v1.4.0 候補: 制限付き診断 (#358) + + +## v1.4.0 ソース: 制限付き診断 (#358) `diagnose_destination(destination="local", agent=null, active_probe=false)` には、`schemaVersion` 2 ポリシーで明示的な `diagnostics` 権限が必要です。既定モードはポリシーのメタデータと宣言されたエージェント機能のみを返し、CLI や検出プロセスの起動、ネットワーク要求は行いません。送信先 ID には送信先検出と同じ、表示可能文字と UTF-8 128 バイトの制限が適用されます。バージョン 1 と既定ポリシーは診断権限を付与しません。 既定モードの `declaredCapabilities` はアダプターの宣言に基づくブール値であり、実際の配信や準備状態を証明しません。 @@ -53,7 +61,7 @@ Python 3.10 以降でインストールします: `pipx install 'session-peer[mc 状態・チェックのフィールドが欠落または不正な場合、一部のチェックが不完全な場合、チェック一覧が切り詰められた場合は、正常とはせず不明・不完全(`diagnostic_incomplete`)として報告します。通信段階 `tcpAccept`、`tls`、`peerAuthentication` はすべて `not_checked` のままで、診断では個別に検証しません。 -候補版 MCP ラッパーが対応する検査と実行上の影響は、次の範囲に限られます。 +MCP ラッパーが対応する検査と実行上の影響は、次の範囲に限られます。 | モード / エージェント | 確認する事実 | プロセス / 接続への影響 | | --- | --- | --- | @@ -69,9 +77,11 @@ Python 3.10 以降でインストールします: `pipx install 'session-peer[mc `tcpAccept`、`tls`、`peerAuthentication` の段階は `not_checked` のままです。ここでの `peerAuthentication` はペアリングされたデバイスの認証を指し、順方向 SSH 認証とは別です。`sshFailure` は `authentication_failed` や `host_key_failed` など、サニタイズされた順方向 SSH 失敗の分類だけを報告します。TCP、TLS、ペアリングされたデバイス、返信先ホストへのプローブは追加しません。 -## 未リリースの v1.4.0 候補: MCP プリセット (#359) + + +## v1.4.0 ソース: MCP プリセット (#359) -候補版の入力シグネチャ: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +入力シグネチャ: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. `list_presets(destination)` は承認済みの経路メタデータだけを読みます。`schemaVersion` 2 のポリシーで `presets` を明示的に許可し、宛先ごとの `presets` リストに `[a-z][a-z0-9_-]{0,63}` に一致する承認済みの名前を 1 件以上、128 件以下で指定する必要があります。バージョン 1 は新しいケーパビリティとフィールドを拒否します。ストアを読む前に権限を確認します。結果には宛先と一致する承認済みの `name`、`agent`、`transport`、`revision` と既存の `dp1:` トークンだけが含まれ、実際のホスト、ホーム、ストアのパスは省略されます。保存済み経路の参照では、セッションの探索、対象の選択、SSH・ネイティブ・バージョン確認のプローブ、データの更新を行いません。バージョン付きのテキストと構造化されたツール結果は、合計 64 KiB に制限されます。 diff --git a/docs/ja/releases/v1.4.0.md b/docs/ja/releases/v1.4.0.md new file mode 100644 index 00000000..48eaa28f --- /dev/null +++ b/docs/ja/releases/v1.4.0.md @@ -0,0 +1,34 @@ +# v1.4.0のリリース準備 + +公開済みv1.3.3を基準に2026-11-02に準備しました。この日付の確認時点では、v1.4.0は未公開のソース候補です。統合基準はバージョン準備前の`f290973962c63548f24153eeee12a8e3666fd043`であり、最終リリースコミットではありません。この準備はマージ、タグ・ドラフト作成、ワークフロー実行、公開や運用環境への配備を承認しません。 + +コアPython 3.9、MCP Python 3.10+、SDK要件`mcp>=1.30,<2`は変更しません。 + +## 変更内容 + +- #356 / #361: ポリシーから導出したメタデータのみを返すMCP `list_destinations`を追加します。別名は最大64件、各別名はUTF-8で128バイト、ツール結果はJSON-RPCの外枠を除き64 KiBに制限します。このメタデータ照会はポリシーバージョン1と既定ポリシーでも動作し、ポリシーバージョン2を要求しません。list/Send権限で絞り込まず、設定されたすべてのポリシー項目を投影します。 +- #357 / #362: 単一対象のCLI `--dry-run --explain-json`配信説明を追加します。従来の出力形式に整形する前に生のSSH情報を収集し、既存のテキスト・JSON出力の契約を維持します。MCP `preflight_send`にはポリシーバージョン2の別の`preflight`権限が必要で、preflightが暗黙にSendを許可することはありません。Wake preflightには別のwake権限も必要で、モデルを起動せずwake予算を予約しません。 +- #358 / #363: 既定モードで`diagnostics`権限が必要なメタデータ専用の診断を追加します。能動プローブには追加で`diagnostics_probe`が必要で、Mac/Linuxのみ対応します。クリーンアップを除く実行上限はエージェント3件と20秒で、各パイプと結果は64 KiBに制限します。非ブロッキングリーダーがプロセス範囲を抜けたパイプ保持者を扱い、クリーンアップ中もキャンセルを優先します。 +- doctorで選択したエージェント・homeが実際の収集範囲を定め、共有スキルの走査は省略します。OK結果は収集の成功を意味し、エージェントの利用可能性、DBの証明や逆方向プローブは意味しません。 +- #359 / #364: 承認済みの名前と動作ごとの正確な経路を使うポリシーバージョン2の経路プリセットを追加します。どのNative呼び出しよりも前に両方の検査を完了します。まず経路を確認し、次にリビジョンを確認します。実際の送信には明示的な送信対象とリビジョンが必要です。単一のスナップショットとその`dp1`フィンガープリントは宛先の識別子やACKではありません。既存のlist/send JSONは維持し、安全な照会経路から修復動作には切り替えません。プリセットはMac/Linuxのローカル・SSHのClaude CodeとCodex経路に限定し、wake、URI、Antigravity、device、handoff、Windowsの対応は拡大しません。 +- リリース準備では、固定の`send.preflight`スキーマに含まれない通常のネイティブプロトコルの応答ルートフィールド(`submitted`、`consumptionConfirmed`、`status`、`dryRun`、`queueId`)もMCP preflightで防御的に拒否します。通常の本番CLIの反例、誤ったルーティングやセキュリティ事故が観測されたわけではありません。この防御検査は機能・プロトコル・ACK・権限を追加しません。内部MCPプロセスヘルパーは明示的に渡されたタイムアウトを守るようになり、既定の130秒の`CLI_TIMEOUT`動作は維持します。この修正は現在の通常の呼び出し元への影響や障害の発生を主張しません。 + +## 正確なソースと検証 + +マージ済みソースは#361 `444959c08acadc85ec48722c03354a3905fac174`、#362 `e68f1c8f224f30701a9b69bb693f4e99055880ee`、#363 `7f85cb12cf6661db2facd5d74b2b31d7ee8514bd`、#364 `f290973962c63548f24153eeee12a8e3666fd043`です。 + +統合基準の[CI](https://github.com/abruption/session-peer/actions/runs/41381070618)は37ジョブが成功し、同じ基準の[CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309)も成功しました。これは統合ソースの根拠であり、準備の最終コミットや最終的な保護されたmainのリリースソースの検証ではありません。 + +## 独立スキルの互換性 + +既存の互換コピーと将来の`SKILL.md`サポート資産は、独立して公開済みの[Pythonスキルv0.4.1](https://github.com/abruption/session-peer-skill/releases/tag/v0.4.1)を維持します。ソースは`263b0c333d539dc4e885b16ae3369a26f33097d8`、UTF-8で27126バイト、SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`です。最小ランタイム0.9.1、文書上の全機能対応範囲1.3.2、受信機`codexBin`下限1.0.1は変更しません。サポートコピーはwheel/sdistの外に置きます。 + +別のスキル0.5.0提案は最小0.9.1を維持し、実際のランタイム公開と別途承認の後にのみ全機能対応範囲1.4.0を文書化します。後続のスナップショットPRで正確なスキルタグ・ソース・ハッシュを検証する必要があります。将来のタグが未作成でも、このランタイム準備は妨げません。変更したバイト列をスキル0.4.1として再表示してはいけません。この準備では提案したスキルを公開・インストールしません。 + +## 境界とリリース条件 + +この拡張は、新たな実環境のNative/SSH、Windows 3.14やfree-threadedの受け入れ、ACK・重複排除・handoffの保証、所有元app-serverの対応やサポート水準の昇格を追加しません。不明なロールや結果の制限は維持します。キューへの投入はACKではなく、不確実性が自動再試行を許可することはありません。 + +正確な現行コミットをレビューし、現行コミットの検査と最終的な保護されたmain CIの成功を要求し、公開済みv1.3.3のタグ・資産・過去の記録をすべて保全します。公開を先取りしないこの日付付き案内を固定します。別途承認された公開では、`SHA256SUMS`と`release-provenance.json`を含む固定資産7個を正確なタグ・ソースと認証済みattestationに照合し、依存関係監査と新規インストール検査を行い、必須のPyPI環境の人による承認を維持します。非公開のPyPIログイン・接続再確認の省略は、その承認を免除しません。 + +提供状況の案内を更新する前に実際のGitHub・PyPI公開の根拠を別途記録し、将来の公開を宣言しません。Python公開、グローバルMCP環境の更新、サービス変更、Node Control配備、独立してインストールしたスキルは、それぞれ別途承認が必要な作業です。 diff --git a/docs/ko/README.md b/docs/ko/README.md index 8bcd77ec..c9f9dac2 100644 --- a/docs/ko/README.md +++ b/docs/ko/README.md @@ -23,6 +23,8 @@ ## 개발과 이력 +- [v1.4.0 준비](releases/v1.4.0.md)는 2026-11-02 소스 확인 시점에 병합된 MCP 정책·사전검사·진단·프리셋 변경을 기록합니다. 발행과 별도 스킬 적용은 구분합니다. + - [v1.3.3 유지보수 준비](releases/v1.3.3.md)는 Python 3.14 CI·메타데이터, 기여·공개 안내, 검증된 호환 스킬 v0.4.1 사본을 다룹니다. 발행과 운영 배포는 별개입니다. - [v1.3.2 유지보수 안내](releases/v1.3.2.md)에서 macOS 방화벽 승인, Direct 리스너·TLS 진단, MCP SDK 하한과 Python 배포물 밖의 Control 보안 업데이트 및 별도 배포 필요성을 설명합니다. diff --git a/docs/ko/cli-reference.md b/docs/ko/cli-reference.md index 33f58ec3..b2d4f7ec 100644 --- a/docs/ko/cli-reference.md +++ b/docs/ko/cli-reference.md @@ -1,5 +1,7 @@ # session-peer CLI 레퍼런스 +2026-11-02 소스 확인 시점: 아래 v1.4.0 소스 기능은 공개된 v1.3.3을 기준으로 준비한 내용이며 사용 가능 여부를 알리는 발행 공지가 아닙니다. 사용 전 [릴리스 노트](releases/v1.4.0.md)와 실제 GitHub/PyPI 공개 상태를 확인하십시오. + [개요로 돌아가기](../../README.ko.md) ## 수신 세션 세대 고정 조건 (개발 중) @@ -119,7 +121,9 @@ Handoff status는 읽기 전용 스냅샷을 재사용하며 intent·receipt cap Send의 메시지 입력 요구사항과 한도는 동일합니다. 평소처럼 `--message`, `--message-file` 또는 stdin을 사용하며 임시 본문을 자동 생성하지 않습니다. 설명 필드에는 본문이나 receipt 비밀값을 넣지 않습니다. 일반 설명은 stdout에, 실패 결과나 예상 밖 제출 증거의 설명은 stderr에 표시하며 기존 요약·오류 출력의 위치는 바꾸지 않습니다. 확인할 수 없는 증거는 그대로 알 수 없음으로 표시하고, 실제 전송 결과가 불확실하면 자동 재전송하지 않습니다. -### 미출시 v1.4.0 후보: 구조화된 전송 미리 보기 (#357) + + +### v1.4.0 소스: 구조화된 전송 미리 보기 (#357) `send --dry-run --explain-json`은 로컬 또는 SSH 검증에 대해 버전이 지정되고 허용된 필드로만 구성된 JSON 설명을 선택합니다. 텍스트 미리 보기와 동일한 분류를 사용하며 SSH 어댑터가 결과를 가공하기 전의 네이티브 응답을 기준으로 합니다. 일반 메시지 입력과 제한이 적용되며 임시 본문을 생성하지 않습니다. 출력에 메시지 내용, 원시 오류와 경로는 포함되지 않습니다. 결과가 불확실하거나 예상치 못한 제출 증거가 있으면 검증에 실패하며 자동 재시도 권한을 부여하지 않습니다. @@ -209,9 +213,11 @@ UUID는 현재 목록에서 확인한 값으로, 해시는 선택한 프리셋 Mac에서 소유권을 무시하는 마운트는 `preset_ownership_unenforced`로, 마운트 조회를 수행하거나 검증할 수 없으면 `preset_mount_unverifiable`로 거부합니다. 파일 모드만으로 소유권 강제를 증명했다고 취급하지 않습니다. Linux에서는 상위 경로의 ACL도 거부하며 ACL 상태를 검증할 수 없는 파일시스템도 거부합니다. 관리 명령을 중단했을 때는 변경이 이미 보일 수 있으므로 현재 설정을 확인하세요. 디렉터리 동기화 실패를 조용히 성공으로 처리하지 않습니다. -### 미출시 v1.4.0 후보: MCP 프리셋 (#359) + + +### v1.4.0 소스: MCP 프리셋 (#359) -후보 버전 입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +후보 버전 입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. MCP 프리셋 조회와 선택은 운영자의 명시적 허용 목록과 기존 보안 스냅샷 읽기 함수를 사용하며, CLI 프리셋 관리 명령이나 자동 선택을 추가하지 않습니다. [MCP 프리셋 정책과 제한](mcp.md)을 참고하십시오. MCP 선택은 CLI `--preset`과 명시적 경로 플래그를 함께 사용하는 대신 승인된 경로를 확장합니다. 기존 CLI 출력, 리비전 및 파일 시스템 보안 규약은 유지됩니다. @@ -423,7 +429,7 @@ OS 사용자를 가리키는 URI는 로컬 전달로 정규화되어 불필요 ### JSON 응답 규약 -모든 JSON 결과 객체는 동일한 스키마 버전 관리형 봉투로 시작합니다: +`list`, `send`, `doctor`, `update`의 일반 `--json` 결과는 다음과 같은 스키마 버전 관리형 봉투를 사용합니다. 선택형 `--explain-json` 출력(`send.preflight`)과 MCP 메타데이터·사전검사 응답은 별도의 문서화된 스키마를 사용하며 `host`를 의도적으로 생략합니다. 호스트를 임의로 추가하거나 필드가 없다는 이유로 경로를 추정하지 마십시오: ```json { @@ -861,9 +867,9 @@ SSH 실패나 시간 초과가 발생해도 성공·거부 및 네이티브 제 연결하거나, 큐에 쓰거나, 임의의 디렉터리를 검색하거나, 에이전트/SSH 설정을 변경하지 않습니다. -미출시 v1.4.0 후보 (#358): `doctor --agent NAME`은 SSH 경유 실행에서도 검사와 선언된 에이전트 기능을 선택한 등록 에이전트로 제한하며, 공통 설치 스킬 목록 검사도 건너뜁니다. `doctor --agent codex --selected-home-only --codex-home /absolute/home`은 선택한 Codex 홈만 검사하고 다른 홈 목록은 확인하지 않습니다. 이 옵션은 역방향 경로 검사를 활성화하지 않습니다. 옵션을 생략하면 기존의 전체 에이전트 및 제한된 다중 홈 진단 동작이 유지됩니다. +v1.4.0 소스 (#358): `doctor --agent NAME`은 SSH 경유 실행에서도 검사와 선언된 에이전트 기능을 선택한 등록 에이전트로 제한하며, 공통 설치 스킬 목록 검사도 건너뜁니다. `doctor --agent codex --selected-home-only --codex-home /absolute/home`은 선택한 Codex 홈만 검사하고 다른 홈 목록은 확인하지 않습니다. 이 옵션은 역방향 경로 검사를 활성화하지 않습니다. 옵션을 생략하면 기존의 전체 에이전트 및 제한된 다중 홈 진단 동작이 유지됩니다. -후보 MCP 래퍼가 지원하는 검사와 실행 효과는 다음으로 제한됩니다. +MCP 래퍼가 지원하는 검사와 실행 효과는 다음으로 제한됩니다. | 모드 / 에이전트 | 확인하는 사실 | 프로세스 / 연결 효과 | | --- | --- | --- | diff --git a/docs/ko/mcp.md b/docs/ko/mcp.md index 81f1c00e..10be4b2c 100644 --- a/docs/ko/mcp.md +++ b/docs/ko/mcp.md @@ -1,5 +1,7 @@ # 선택형 Codex MCP 연동 +2026-11-02 소스 확인 시점: 아래 v1.4.0 기능은 공개된 v1.3.3을 기준으로 준비한 내용이며 발행 공지가 아닙니다. 사용 전 [릴리스 노트](releases/v1.4.0.md)와 실제 GitHub/PyPI 공개 상태를 확인하십시오. + Python 3.10 이상에서 설치하십시오: `pipx install 'session-peer[mcp]'`(또는 격리된 venv에 extra 설치). 의존성이 없는 Python 3.9 CLI 및 `install.sh`는 계속 지원됩니다. 셸 설치기는 MCP 의존성을 설치하지 않습니다. Python 3.9에서 MCP 엔트리 포인트는 Python 3.10+이 필요하다고 보고합니다. 선택형 extra는 MCP SDK `mcp>=1.30,<2`를 요구합니다. 업스트림 1.x 보안 수정이 포함된 버전으로 의존성 하한을 올리는 것으로, stdio만 사용하는 이 서버에서 악용 가능한 결함이 확인됐다는 뜻은 아닙니다. 이번 변경으로 HTTP 전송, OAuth 서버 경로, MCP 클라이언트 경로가 활성화되지는 않습니다. 기존 환경에는 명시적인 패키지 업그레이드가 필요하며, 선언 변경만으로 설치된 SDK가 업데이트되지는 않습니다. @@ -29,21 +31,27 @@ Python 3.10 이상에서 설치하십시오: `pipx install 'session-peer[mcp]'`( `codex mcp add session-peer -- /absolute/path/session-peer-mcp --config /absolute/path/policy.json`을 사용하여 등록하거나, 저장소의 `plugins/session-peer` 번들을 사용하십시오: `codex plugin marketplace add /absolute/path/to/session-peer` 실행 후 `codex plugin add session-peer@session-peer`. 플러그인은 PATH에서 `session-peer-mcp`를 실행하고 환경에 설정된 경우 `SESSION_PEER_MCP_CONFIG`를 읽습니다. 먼저 Python extra를 설치하십시오. Python 패키지를 설치해도 기존 Codex 설정은 수정되지 않습니다. -## 미출시 v1.4.0 후보: 목적지 조회 (#356) + + +## v1.4.0 소스: 목적지 조회 (#356) `list_destinations()`는 인자를 받지 않으며 운영자 정책의 메타데이터만 반환합니다. `schemaVersion`은 1이고 각 항목은 `destination`, `transport`, `agents`, `capabilities`를 포함합니다. 자식 프로세스를 시작하거나 네트워크 요청을 보내지 않습니다. SSH 호스트 값과 Codex 홈 경로는 생략됩니다. 목적지 이름은 신뢰할 수 없는 데이터입니다. 구성된 기능은 정책상 권한을 나타내며 네이티브 에이전트와의 호환성을 나타내지는 않습니다. 응답은 한계를 명시합니다: `callerIdentity="unavailable"`, `readiness="not_checked"`, `submission="not_attempted"`, `consumption="not_checked"`, `ack="not_checked"`. 이 도구는 목적지가 64개를 넘거나 ID에 출력할 수 없는 문자가 있거나 UTF-8 기준 128바이트를 넘으면 조회를 거부합니다. 텍스트와 구조화된 내용을 합친 MCP 도구 결과는 64 KiB 이내이며, 바깥 JSON-RPC 봉투는 이 한도에 포함되지 않습니다. 이는 조회 도구의 제한으로, 정책 읽기와 기존 도구의 동작은 바뀌지 않습니다. 출력 가능한 문자 판정에는 실행 중인 Python의 유니코드 데이터베이스를 사용합니다. 기본 로컬 목록 조회 전용 정책은 그대로 유지됩니다. -## 미출시 v1.4.0 후보: 전송 사전 검증 (#357) + + +## v1.4.0 소스: 전송 사전 검증 (#357) -`preflight_send(destination, target, message, wake=false, wake_timeout=30)`는 기존 CLI dry-run 검사로 일반 메시지를 검증합니다. 운영자 정책은 `schemaVersion` 2를 사용하고 해당 목적지와 에이전트에 `preflight`를 명시적으로 허용해야 합니다. 버전 1의 기존 기능 집합에는 새 권한이 추가되지 않으며, 기본값은 로컬 목록 조회 전용으로 유지됩니다. 사전 검증에는 `send`가 필요하지 않으며 전송 권한을 부여하지 않습니다. wake 적격성을 검사하려면 별도로 `wake`가 필요하지만, 모델을 활성화하거나 wake 예산을 예약하지는 않습니다. +`preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`는 기존 CLI dry-run 검사로 일반 메시지를 검증합니다. 운영자 정책은 `schemaVersion` 2를 사용하고 해당 목적지와 에이전트에 `preflight`를 명시적으로 허용해야 합니다. 버전 1의 기존 기능 집합에는 새 권한이 추가되지 않으며, 기본값은 로컬 목록 조회 전용으로 유지됩니다. 사전 검증에는 `send`가 필요하지 않으며 전송 권한을 부여하지 않습니다. wake 적격성을 검사하려면 별도로 `wake`가 필요하지만, 모델을 활성화하거나 wake 예산을 예약하지는 않습니다. 버전이 지정된 설명은 SSH 어댑터가 결과를 가공하기 전의 네이티브 응답에서 허용된 사실만 추출하고, 정해진 거부·불확실 사유와 운영자 조치를 제공합니다. 메시지 내용, 원시 오류, 자격 증명, 호스트·홈 경로와 네이티브 기록은 제외됩니다. 결과가 불확실하거나 예상치 못한 제출 증거가 있으면 `retryAllowed=false`로 검증에 실패합니다. 자동으로 재전송하지 마십시오. 사전 검증은 메시지를 제출하거나 handoff 권한을 만들지 않습니다. 기기 및 handoff 모드는 지원하지 않습니다. 기존 dry-run 검사는 로컬·버전 확인 프로세스와 SSH 연결을 시작할 수 있으며, SSH 설정 자체도 명령을 실행할 수 있습니다. 따라서 이 도구는 `readOnlyHint=false`와 `openWorldHint=true`를 사용합니다. 호스트 승인은 정책 권한과 별개입니다. 통과는 검사 시점의 결과이며, 경로 예약, 유효 저장소의 증명, 승인, 이후 전송의 보장, 소비 또는 ACK를 뜻하지 않습니다. -## 미출시 v1.4.0 후보: 제한된 진단 (#358) + + +## v1.4.0 소스: 제한된 진단 (#358) `diagnose_destination(destination="local", agent=null, active_probe=false)`는 `schemaVersion` 2 정책의 명시적인 `diagnostics` 권한이 필요합니다. 기본 모드는 정책 메타데이터와 선언된 에이전트 기능만 반환하며, CLI나 검색 프로세스를 시작하거나 네트워크를 요청하지 않습니다. 목적지 ID에는 목적지 조회와 같은 출력 가능 문자 및 UTF-8 128바이트 제한이 적용됩니다. 버전 1과 기본 정책은 진단 권한을 부여하지 않습니다. 기본 모드의 `declaredCapabilities`는 어댑터 선언에서 가져온 불리언 값이며, 실제 전달이나 준비 상태를 입증하지 않습니다. @@ -53,7 +61,7 @@ Python 3.10 이상에서 설치하십시오: `pipx install 'session-peer[mcp]'`( 상태·검사 필드가 없거나 잘못되었거나, 일부 검사가 누락되거나 검사 목록이 잘린 경우에는 정상으로 표시하지 않고 알 수 없음·불완전(`diagnostic_incomplete`)으로 보고합니다. 전송 단계 `tcpAccept`, `tls`, `peerAuthentication`은 모두 `not_checked`로 남으며 진단에서 별도로 검증하지 않습니다. -후보 MCP 래퍼가 지원하는 검사와 실행 효과는 다음으로 제한됩니다. +MCP 래퍼가 지원하는 검사와 실행 효과는 다음으로 제한됩니다. | 모드 / 에이전트 | 확인하는 사실 | 프로세스 / 연결 효과 | | --- | --- | --- | @@ -69,9 +77,11 @@ Python 3.10 이상에서 설치하십시오: `pipx install 'session-peer[mcp]'`( `tcpAccept`, `tls`, `peerAuthentication` 단계는 `not_checked`로 유지됩니다. 여기서 `peerAuthentication`은 페어링된 기기의 인증을 뜻하며 정방향 SSH 인증과 별개입니다. `sshFailure`는 `authentication_failed` 또는 `host_key_failed`처럼 정제된 정방향 SSH 실패 범주만 보고합니다. TCP, TLS, 페어링된 기기 또는 회신 호스트 검사는 추가하지 않습니다. -## 미출시 v1.4.0 후보: MCP 프리셋 (#359) + + +## v1.4.0 소스: MCP 프리셋 (#359) -후보 버전 입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +후보 버전 입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. `list_presets(destination)`는 승인된 경로 메타데이터만 읽습니다. `schemaVersion` 2 정책은 `presets`를 명시적으로 허용하고, 목적지별 `presets` 목록에 `[a-z][a-z0-9_-]{0,63}` 형식의 승인된 이름을 1개 이상 128개 이하로 지정해야 합니다. 버전 1은 새 기능과 필드를 거부합니다. 저장소를 읽기 전에 권한을 확인합니다. 결과는 목적지와 일치하는 승인된 `name`, `agent`, `transport`, `revision` 값과 기존 `dp1:` 토큰만 노출하며 실제 호스트, 홈 및 저장소 경로는 생략합니다. 저장된 경로 조회는 세션을 검색하거나 대상을 고르거나 SSH·네이티브·버전 확인 검사를 실행하거나 데이터를 새로 고치지 않습니다. 버전이 지정된 텍스트와 구조화된 도구 결과를 합친 크기는 64 KiB로 제한됩니다. diff --git a/docs/ko/releases/v1.4.0.md b/docs/ko/releases/v1.4.0.md new file mode 100644 index 00000000..8dc68c4c --- /dev/null +++ b/docs/ko/releases/v1.4.0.md @@ -0,0 +1,34 @@ +# v1.4.0 릴리스 준비 + +공개된 v1.3.3을 기준으로 2026-11-02에 준비했습니다. 이 날짜의 점검 시점에서 v1.4.0은 미공개 소스 후보입니다. 통합 기준은 버전 준비 이전의 `f290973962c63548f24153eeee12a8e3666fd043`이며 최종 릴리스 커밋이 아닙니다. 이 준비는 병합, 태그·초안 생성, 워크플로 실행, 공개나 운영 배포를 승인하지 않습니다. + +코어 Python 3.9, MCP Python 3.10+와 SDK 요건 `mcp>=1.30,<2`는 변경하지 않습니다. + +## 변경 사항 + +- #356 / #361: 정책에서 파생한 메타데이터만 반환하는 MCP `list_destinations`를 추가합니다. 별칭은 최대 64개, 각 별칭은 UTF-8 128바이트, 도구 결과는 JSON-RPC 외피를 제외하고 64 KiB로 제한합니다. 이 메타데이터 조회는 정책 버전 1과 기본 정책에서도 동작하며 정책 버전 2를 요구하지 않습니다. list/Send 권한으로 필터링하지 않고 설정된 모든 정책 항목을 투영합니다. +- #357 / #362: 단일 대상 CLI `--dry-run --explain-json` 전달 설명을 추가합니다. 기존 출력 형태로 가공하기 전에 원시 SSH 사실을 수집하며 기존 텍스트·JSON 출력 계약을 유지합니다. MCP `preflight_send`에는 정책 버전 2의 별도 `preflight` 권한이 필요하며 preflight가 Send를 암묵적으로 허용하지 않습니다. Wake preflight에는 별도의 wake 권한도 필요하며 모델을 시작하거나 wake 예산을 예약하지 않습니다. +- #358 / #363: 기본 모드에서 `diagnostics` 권한이 필요한 메타데이터 전용 진단을 추가합니다. 능동 프로브에는 추가로 `diagnostics_probe`가 필요하고 Mac/Linux만 지원합니다. 정리를 제외한 실행 한도는 에이전트 3개와 20초이며 각 파이프와 결과는 64 KiB로 제한합니다. 비차단 리더가 프로세스 범위를 벗어난 파이프 보유자를 처리하며 정리 중에도 취소가 우선합니다. +- doctor에서 선택한 에이전트·home이 실제 수집 범위를 정하며 공유 스킬 스캔은 생략합니다. OK 결과는 수집 성공을 뜻하며 에이전트 가용성, DB 증명이나 역방향 프로브를 뜻하지 않습니다. +- #359 / #364: 승인된 이름과 동작별 정확한 경로를 사용하는 정책 버전 2 경로 프리셋을 추가합니다. 어떤 Native 호출보다도 먼저 두 검사를 모두 완료합니다. 경로를 먼저 확인하고 리비전을 다음으로 확인합니다. 실제 전송에는 명시적인 수신 대상과 리비전이 필요합니다. 단일 스냅샷과 그 `dp1` 지문은 대상 식별자나 ACK가 아닙니다. 기존 list/send JSON은 유지하며 안전한 조회 경로에서 복구 동작으로 대체하지 않습니다. 프리셋은 Mac/Linux의 로컬·SSH Claude Code와 Codex 경로로 제한하며 wake, URI, Antigravity, device, handoff와 Windows 지원을 확장하지 않습니다. +- 릴리스 준비에서는 고정된 `send.preflight` 스키마에 없는 일반 네이티브 프로토콜의 응답 루트 필드(`submitted`, `consumptionConfirmed`, `status`, `dryRun`, `queueId`)도 MCP preflight에서 방어적으로 거부합니다. 정상 운영 CLI의 반례, 잘못된 라우팅이나 보안 사고가 관찰된 것은 아닙니다. 이 방어 검사는 기능·프로토콜·ACK·권한을 추가하지 않습니다. 내부 MCP 프로세스 헬퍼는 이제 명시적으로 전달된 시간 제한을 따르며 기본 130초 `CLI_TIMEOUT` 동작은 유지합니다. 이 수정은 현재 정상 호출자에 대한 영향이나 장애가 있었다고 주장하지 않습니다. + +## 정확한 소스와 검증 + +병합된 소스는 #361 `444959c08acadc85ec48722c03354a3905fac174`, #362 `e68f1c8f224f30701a9b69bb693f4e99055880ee`, #363 `7f85cb12cf6661db2facd5d74b2b31d7ee8514bd`, #364 `f290973962c63548f24153eeee12a8e3666fd043`입니다. + +통합 기준의 [CI](https://github.com/abruption/session-peer/actions/runs/41381070618)는 작업 37개가 성공했고 같은 기준의 [CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309)도 성공했습니다. 이는 통합 소스의 근거이며 준비의 최종 커밋이나 최종 보호된 main 릴리스 소스의 검증은 아닙니다. + +## 독립 스킬 호환성 + +기존 호환 사본과 향후 `SKILL.md` 지원 자산은 별도로 공개된 [Python 스킬 v0.4.1](https://github.com/abruption/session-peer-skill/releases/tag/v0.4.1)을 유지합니다. 소스는 `263b0c333d539dc4e885b16ae3369a26f33097d8`, UTF-8 27126바이트, SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`입니다. 최소 런타임 0.9.1, 문서상 전체 지원 범위 1.3.2와 수신기 `codexBin` 하한 1.0.1은 변경하지 않습니다. 지원 사본은 wheel/sdist 밖에 둡니다. + +별도 스킬 0.5.0 제안은 최소 0.9.1을 유지하고 실제 런타임 공개와 별도 승인 이후에만 전체 지원 범위를 1.4.0으로 문서화합니다. 후속 스냅샷 PR에서 정확한 스킬 태그·소스·해시를 검증해야 합니다. 미래 태그가 없다는 이유로 이 런타임 준비를 막지 않으며 변경된 바이트를 스킬 0.4.1로 다시 표시해서는 안 됩니다. 이 준비는 제안한 스킬을 공개하거나 설치하지 않습니다. + +## 경계와 릴리스 조건 + +이 확장은 새로운 실제 Native/SSH, Windows 3.14 또는 free-threaded 수락, ACK·중복 제거·handoff 보장, 소유 app-server 지원이나 지원 수준 승격을 추가하지 않습니다. 알 수 없는 역할과 결과의 제한은 유지합니다. 큐 제출은 ACK가 아니며 불확실성은 자동 재시도를 허용하지 않습니다. + +정확한 현재 커밋을 리뷰하고 현재 커밋 검사와 최종 보호된 main CI의 성공을 요구하며 공개된 v1.3.3 태그·자산·과거 기록을 모두 보존합니다. 공개를 미리 선언하지 않는 이 날짜별 안내를 고정합니다. 별도 승인된 공개에서는 `SHA256SUMS`, `release-provenance.json`을 포함한 고정 자산 7개를 정확한 태그·소스 및 인증된 attestation과 대조하고 의존성 감사와 새 환경 설치 검사를 수행하며 필수 PyPI 환경의 사람 승인을 유지해야 합니다. 비공개 PyPI 로그인·연결 재확인 생략은 이 승인을 면제하지 않습니다. + +제공 여부 안내를 갱신하기 전에 실제 GitHub·PyPI 공개 근거를 별도로 기록하고 미래 공개를 선언하지 않습니다. Python 공개, 전역 MCP 환경 갱신, 서비스 변경, Node Control 배포와 별도로 설치된 스킬은 각각 별도 승인이 필요한 작업입니다. diff --git a/docs/mcp.md b/docs/mcp.md index 497b90bc..e58df8e7 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1,5 +1,7 @@ # Optional Codex MCP integration +Source checkpoint 2026-11-02: the v1.4.0 features below are prepared against published v1.3.3, not a publication announcement. Check the [release notes](releases/v1.4.0.md) and actual GitHub/PyPI availability before adopting them. + Install with Python 3.10 or later: `pipx install 'session-peer[mcp]'` (or install the extra in an isolated venv). The dependency-free Python 3.9 CLI and `install.sh` remain supported. The shell installer does not install MCP dependencies. On Python 3.9 the MCP entry point reports that Python 3.10+ is required. The optional extra requires MCP SDK `mcp>=1.30,<2`. This raises the dependency floor past upstream 1.x security fixes; it does not establish an exploitable issue in this stdio-only server. HTTP transports, OAuth server paths and MCP client paths are not enabled by this change. Existing environments need an explicit package upgrade; changing the manifest does not update an installed SDK. @@ -29,21 +31,27 @@ Use the actual username and SSH destination, configured keys and known_hosts. No Register using `codex mcp add session-peer -- /absolute/path/session-peer-mcp --config /absolute/path/policy.json`, or use the repository's `plugins/session-peer` bundle: `codex plugin marketplace add /absolute/path/to/session-peer`, then `codex plugin add session-peer@session-peer`. The plugin launches `session-peer-mcp` from PATH and reads `SESSION_PEER_MCP_CONFIG` when set in its environment. Install the Python extra first. Existing Codex settings are not modified by installing the Python package. -## Unreleased v1.4.0 candidate: destination discovery (#356) + + +## v1.4.0 source: destination discovery (#356) `list_destinations()` takes no arguments and returns only operator-policy metadata: `schemaVersion` is 1, and each entry contains `destination`, `transport`, `agents`, and `capabilities`. It starts no child process and makes no network request. SSH host values and Codex home paths are omitted. Destination labels are untrusted data. Configured capabilities describe policy permissions, not native-agent compatibility. The response includes explicit limits: `callerIdentity="unavailable"`, `readiness="not_checked"`, `submission="not_attempted"`, `consumption="not_checked"`, and `ack="not_checked"`. This tool rejects inventories over 64 destinations or IDs that are not printable or exceed 128 UTF-8 bytes. Its complete MCP tool result (text and structured content together) is bounded to 64 KiB, excluding the surrounding JSON-RPC envelope. These are lookup limits; policy loading and existing tools keep their previous behavior. Printability follows the running Python Unicode database. The default local-list-only policy is unchanged. -## Unreleased v1.4.0 candidate: send preflight (#357) + + +## v1.4.0 source: send preflight (#357) -`preflight_send(destination, target, message, wake=false, wake_timeout=30)` validates a normal message through the existing CLI dry-run checks. Operator policy must use `schemaVersion` 2 and explicitly grant `preflight` for the destination and agent. Version 1 keeps its existing capability set and acquires no new permission; the default remains local-list-only. Preflight does not require `send` and cannot authorize sending. Requested wake eligibility additionally requires `wake`, without activating a model or reserving a wake budget. +`preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)` validates a normal message through the existing CLI dry-run checks. Operator policy must use `schemaVersion` 2 and explicitly grant `preflight` for the destination and agent. Version 1 keeps its existing capability set and acquires no new permission; the default remains local-list-only. Preflight does not require `send` and cannot authorize sending. Requested wake eligibility additionally requires `wake`, without activating a model or reserving a wake budget. The versioned explanation projects allowlisted facts from the native response before SSH adapter shaping, with fixed refusal/unknown reasons and operator actions. It excludes message contents, raw errors, credentials, host/home paths and native transcripts. Unknown or unexpected submission evidence fails validation with `retryAllowed=false`; never automatically resend. Preflight neither submits a message nor creates handoff authority. Device and handoff modes are unsupported. Existing dry-run checks may start local/version processes and SSH connections; SSH configuration may itself execute commands. The tool therefore uses `readOnlyHint=false` and `openWorldHint=true`. Host approvals remain separate from policy permission. Passing records point-in-time checks, not a route reservation, effective-storage attestation, approval, later-send guarantee, consumption or ACK. -## Unreleased v1.4.0 candidate: bounded diagnostics (#358) + + +## v1.4.0 source: bounded diagnostics (#358) `diagnose_destination(destination="local", agent=null, active_probe=false)` requires an explicit `diagnostics` permission in a `schemaVersion` 2 policy. The default mode returns policy metadata and declared agent capabilities only; it starts no CLI or discovery process and makes no network request. The destination ID follows the same printable, 128 UTF-8 byte limit as destination discovery. Version 1 and the default policy grant no diagnostic permission. Default-mode `declaredCapabilities` contains typed booleans from adapter declarations; these declarations do not demonstrate delivery or readiness. @@ -53,7 +61,7 @@ Responses expose allowlisted statuses and diagnostic codes, omitting raw errors, Missing or malformed status/check fields, partial checks, or truncated check lists are reported as unknown/incomplete (`diagnostic_incomplete`), never as healthy. The transport stages `tcpAccept`, `tls`, and `peerAuthentication` remain `not_checked`; diagnostics do not separately verify them. -The candidate MCP wrapper supports only the following checks and effects: +The MCP wrapper supports only the following checks and effects: | Mode / agent | Checked facts | Process / connection effects | | --- | --- | --- | @@ -69,9 +77,11 @@ Representative allowlisted codes include `sessions_dir_missing`, `inbox_present` The stages `tcpAccept`, `tls` and `peerAuthentication` remain `not_checked`. Here `peerAuthentication` refers to paired-device authentication, separate from forward SSH authentication. `sshFailure` reports only a sanitized forward SSH failure category, such as `authentication_failed` or `host_key_failed`. No TCP, TLS, paired-device or return-host probe is added. -## Unreleased v1.4.0 candidate: MCP presets (#359) + + +## v1.4.0 source: MCP presets (#359) -Candidate input signatures: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +Input signatures: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. `list_presets(destination)` reads only approved route metadata. A `schemaVersion` 2 policy must explicitly grant `presets` and provide a nonempty per-destination `presets` list of at most 128 approved names matching `[a-z][a-z0-9_-]{0,63}`. Version 1 rejects the new capability and field. Authorization precedes any store read. The result exposes only matching approved `name`, `agent`, `transport` and `revision` values, with the existing `dp1:` token; raw hosts, homes and store paths are omitted. Saved-route lookup does not discover sessions, choose a target, run SSH/native/version probes or refresh data. The versioned text and structured tool result together are bounded to 64 KiB. diff --git a/docs/releases/v1.4.0.md b/docs/releases/v1.4.0.md new file mode 100644 index 00000000..ad289129 --- /dev/null +++ b/docs/releases/v1.4.0.md @@ -0,0 +1,34 @@ +# v1.4.0 release preparation + +Prepared on 2026-11-02 against published v1.3.3. At this dated checkpoint, v1.4.0 is an unpublished source candidate. The integrated base is `f290973962c63548f24153eeee12a8e3666fd043`, before version preparation; it is not the final release commit. This preparation authorizes no merge, tag, draft, workflow dispatch, publication or operational rollout. + +Core Python 3.9, MCP Python 3.10+ and SDK requirement `mcp>=1.30,<2` are unchanged. + +## Changes + +- #356 / #361: add MCP `list_destinations` returning only policy-derived metadata, bounded to 64 aliases, 128 UTF-8 bytes per alias and 64 KiB per tool result, excluding the JSON-RPC envelope. This metadata query also works with policy version 1 and the default policy; it does not require policy version 2. It projects all configured policy entries without filtering by list/Send permission. +- #357 / #362: add single-target CLI `--dry-run --explain-json` delivery explanations. Raw SSH facts are captured before legacy output shaping; existing text and JSON output retain their contracts. MCP `preflight_send` requires the separate `preflight` capability in policy version 2; preflight never implicitly grants Send. Wake preflight also needs its separate wake capability, starts no model and reserves no wake budget. +- #358 / #363: add metadata-only diagnostics requiring the `diagnostics` capability in default mode. Active probing additionally requires `diagnostics_probe`, supports Mac/Linux only, and limits execution to 3 agents and 20 seconds excluding cleanup, with each pipe and the result bounded to 64 KiB. Nonblocking readers handle escaped pipe holders; cancellation wins during cleanup. +- Selected doctor agent/home scopes the actual collection; shared skill scanning is skipped. An OK result means collection succeeded, not agent availability, DB attestation or a reverse probe. +- #359 / #364: add policy version 2 route presets with approved names and exact action routes. Complete both checks before any Native invocation: first the route, then its revision; actual send requires an explicit target and revision. One snapshot and its `dp1` fingerprint are neither destination identity nor ACK. Existing list/send JSON remains unchanged; safe query paths do not fall back to repair. Presets remain limited to Mac/Linux local/SSH Claude Code and Codex routes; wake, URI, Antigravity, device, handoff and Windows support is not expanded. +- Release preparation also defensively rejects MCP preflight response-root fields from the ordinary native protocol (`submitted`, `consumptionConfirmed`, `status`, `dryRun`, `queueId`), which the fixed `send.preflight` schema does not contain. No normal production CLI counterexample, misrouting or security incident was observed; this guard adds no capability, protocol, ACK or permission. The internal MCP process helper now honors an explicitly supplied timeout while the default 130-second `CLI_TIMEOUT` behavior remains unchanged; this correction makes no claim of impact on current normal callers or of an outage. + +## Exact source and validation + +The merged sources are #361 `444959c08acadc85ec48722c03354a3905fac174`, #362 `e68f1c8f224f30701a9b69bb693f4e99055880ee`, #363 `7f85cb12cf6661db2facd5d74b2b31d7ee8514bd` and #364 `f290973962c63548f24153eeee12a8e3666fd043`. + +Integrated-base [CI](https://github.com/abruption/session-peer/actions/runs/41381070618) succeeded with 37 jobs, and [CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309) succeeded at the same base. This is integrated-source evidence, not validation of the preparation's final head or the final protected-main release source. + +## Independent skill compatibility + +The existing compatibility copy and prospective `SKILL.md` support asset remain the independently published [Python skill v0.4.1](https://github.com/abruption/session-peer-skill/releases/tag/v0.4.1), from source `263b0c333d539dc4e885b16ae3369a26f33097d8`: 27126 UTF-8 bytes, SHA-256 `fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`. Its minimum runtime 0.9.1, documented full coverage 1.3.2 and receiver `codexBin` floor 1.0.1 are unchanged. The support copy stays outside wheel/sdist. + +A separate skill 0.5.0 proposal would retain minimum 0.9.1 and document full coverage 1.4.0 only after actual runtime publication and separate approval. A later snapshot PR must verify the exact skill tag, source and hash. An absent future tag does not block this runtime preparation; never relabel changed bytes as skill 0.4.1. This preparation does not publish or install that proposal. + +## Boundaries and release gates + +These extensions add no new live Native/SSH, Windows 3.14 or free-threaded acceptance, ACK/deduplication/handoff guarantees, owning app-server support or support promotion. Unknown roles and unknown outcomes retain their limits; queued submission is not ACK, and uncertainty never authorizes automatic retry. + +Review the exact current head, require successful current-head checks and final protected-main CI, and preserve every published v1.3.3 tag, asset and historical record. Freeze these publication-neutral dated notes. A separately authorized publication must verify all 7 frozen assets, including `SHA256SUMS` and `release-provenance.json`, against the exact tag/source and authenticated attestations, run dependency audits and fresh installation checks, and retain required human PyPI environment approval. Skipping the private PyPI login/binding recheck does not waive that approval. + +Record actual GitHub and PyPI publication evidence separately before updating availability statements; do not announce a future publication. Python publication, global MCP environment upgrades, service changes, Node Control deployment and independently installed skills remain separately authorized operations. diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 1196c314..7b963515 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -22,6 +22,8 @@ ## 开发与历史 +- [v1.4.0准备](releases/v1.4.0.md)记录2026-11-02源码检查时点已合并的MCP策略、预检、诊断和预设变更;发布与独立技能的采用仍是不同步骤。 + - [v1.3.3 维护准备](releases/v1.3.3.md)涵盖 Python 3.14 CI/元数据、贡献与发布指南,以及已核验的兼容技能 v0.4.1 副本。发布与运维部署相互独立。 - [v1.3.2维护说明](releases/v1.3.2.md)说明macOS防火墙授权、Direct监听器/TLS诊断、MCP SDK下限,以及位于Python分发包之外且需要单独部署的Control安全更新。 diff --git a/docs/zh-CN/cli-reference.md b/docs/zh-CN/cli-reference.md index 1724b5c6..5035b44b 100644 --- a/docs/zh-CN/cli-reference.md +++ b/docs/zh-CN/cli-reference.md @@ -1,5 +1,7 @@ # session-peer CLI 参考 +2026-11-02 源码检查时点:下述 v1.4.0 源码功能是在已发布 v1.3.3 的基础上准备的内容,并非可用性公告。使用前请查看[发布说明](releases/v1.4.0.md)及实际 GitHub/PyPI 发布状态。 + [返回概览](../../README.zh-CN.md) ## 固定接收会话代次的前置条件(开发中) @@ -97,7 +99,9 @@ Handoff status 复用只读快照,不创建 intent、receipt capability、wait Send 的消息输入要求和限制保持不变。按原有方式使用 `--message`、`--message-file` 或 stdin,不自动生成占位正文。说明字段不包含正文或 receipt 秘密值。常规说明输出到 stdout,失败结果或意外提交证据的说明输出到 stderr,不改变现有摘要和错误的输出位置。未知证据仍显示为未知,实际发送结果不确定时禁止自动重发。 -### 尚未发布的 v1.4.0 候选版本:结构化发送预览 (#357) + + +### v1.4.0 源码:结构化发送预览 (#357) `send --dry-run --explain-json` 可为本地或 SSH 验证选择带有版本且仅含允许字段的 JSON 说明。它与文本预览使用相同的分类,并基于 SSH 适配器加工前的原生响应。普通消息输入要求和限制仍适用,不会生成占位正文。输出不包含消息内容、原始错误和路径。结果未知或存在意外提交证据时,验证失败,且不会授权自动重试。 @@ -164,9 +168,11 @@ session-peer preset remove work-mac --expect-revision 'dp1:' 在 macOS 上,忽略所有权的挂载会以 `preset_ownership_unenforced` 被拒绝,无法查询或验证挂载状态时则以 `preset_mount_unverifiable` 被拒绝。不会仅凭模式位断定所有权已强制执行。Linux 也会拒绝上级路径中的 ACL,以及无法验证 ACL 状态的文件系统。中断管理命令后请检查当前配置,因为更改可能已经可见;目录同步失败不会被静默当作成功。 -### 尚未发布的 v1.4.0 候选版本:MCP 预设 (#359) + + +### v1.4.0 源码:MCP 预设 (#359) -候选版本输入签名: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +输入签名: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. MCP 预设查询和选择使用操作员的显式允许列表及现有安全快照读取函数,不新增 CLI 预设管理命令或自动选择。参见 [MCP 预设策略与限制](mcp.md)。MCP 选择会展开已批准的路径,而不会将 CLI `--preset` 与显式路由选项组合。现有 CLI 输出、修订令牌和文件系统安全约定保持不变。 @@ -345,7 +351,7 @@ session-peer send --to 'session-peer://v1/reply?agent=claude&session=api-worker& ### JSON 响应契约 -每个 JSON 结果对象都以相同的、带模式版本的信封开头: +`list`、`send`、`doctor`、`update` 的普通 `--json` 结果使用以下带模式版本的信封。可选的 `--explain-json` 输出(`send.preflight`)及 MCP 元数据和预检响应使用各自文档规定的模式,并有意省略 `host`;不要补入主机,也不要因字段缺失而推断路径: ```json { @@ -620,9 +626,9 @@ Codex 消息限制为 32 KiB 的 UTF-8 文本(包括发送者/回复头), `doctor` 在拥有会话的机器上执行只读检查。它报告 Claude 配置的会话目录和收件箱可用性,Codex 的可执行文件和有界目录/状态数据库候选,不支持的数据库模式,并将权限或未知失败报告为不同的代码。它不会连接到收件箱、写入队列、扫描任意目录或更改代理/SSH 设置。 -尚未发布的 v1.4.0 候选版本 (#358):`doctor --agent NAME` 将检查和声明的代理功能限制为所选的已注册代理,包括通过 SSH 运行时,并跳过共享的已安装技能清单检查。`doctor --agent codex --selected-home-only --codex-home /absolute/home` 仅检查所选 Codex 主目录,跳过其他主目录的清单。这些选项不启用反向路由检查。省略时,现有的全代理和有界多主目录诊断行为保持不变。 +v1.4.0 源码 (#358):`doctor --agent NAME` 将检查和声明的代理功能限制为所选的已注册代理,包括通过 SSH 运行时,并跳过共享的已安装技能清单检查。`doctor --agent codex --selected-home-only --codex-home /absolute/home` 仅检查所选 Codex 主目录,跳过其他主目录的清单。这些选项不启用反向路由检查。省略时,现有的全代理和有界多主目录诊断行为保持不变。 -候选版 MCP 包装层仅支持以下检查及执行效果: +MCP 包装层仅支持以下检查及执行效果: | 模式 / 代理 | 检查的事实 | 进程 / 连接效果 | | --- | --- | --- | diff --git a/docs/zh-CN/mcp.md b/docs/zh-CN/mcp.md index 2c7f6529..1f21287a 100644 --- a/docs/zh-CN/mcp.md +++ b/docs/zh-CN/mcp.md @@ -1,5 +1,7 @@ # 可选 Codex MCP 集成 +2026-11-02 源码检查时点:下述 v1.4.0 功能是在已发布 v1.3.3 的基础上准备的内容,并非发布公告。采用前请查看[发布说明](releases/v1.4.0.md)及实际 GitHub/PyPI 发布状态。 + 在 Python 3.10 或更高版本下安装:`pipx install 'session-peer[mcp]'`(或在隔离的 venv 中安装 extra)。仍支持无依赖的 Python 3.9 CLI 和 `install.sh`。shell 安装程序不安装 MCP 依赖项。在 Python 3.9 上,MCP 入口点会报告需要 Python 3.10+。 可选extra要求MCP SDK `mcp>=1.30,<2`。这是将依赖版本下限提高到包含上游1.x安全修复的版本,并不表示已在这个仅使用stdio的服务器中确认可利用漏洞。本次变更不启用HTTP传输、OAuth服务器路径或MCP客户端路径。现有环境需要显式升级软件包;仅修改声明不会更新已安装的SDK。 @@ -29,21 +31,27 @@ 使用 `codex mcp add session-peer -- /absolute/path/session-peer-mcp --config /absolute/path/policy.json` 进行注册,或使用仓库的 `plugins/session-peer` 捆绑包:`codex plugin marketplace add /absolute/path/to/session-peer`,然后 `codex plugin add session-peer@session-peer`。该插件从 PATH 启动 `session-peer-mcp`,并在其环境中设置了 `SESSION_PEER_MCP_CONFIG` 时读取该配置。请先安装 Python extra。安装 Python 软件包不会修改现有的 Codex 设置。 -## 尚未发布的 v1.4.0 候选版本:目的地发现 (#356) + + +## v1.4.0 源码:目的地发现 (#356) `list_destinations()` 不接受参数,仅返回操作员策略的元数据:`schemaVersion` 为 1,每个条目包含 `destination`、`transport`、`agents` 和 `capabilities`。它不会启动子进程,也不会发起网络请求。SSH 主机配置值和 Codex 主目录路径会被省略。目的地名称是不可信数据。已配置的功能表示策略权限,不表示原生代理的兼容性。 响应明确列出限制:`callerIdentity="unavailable"`、`readiness="not_checked"`、`submission="not_attempted"`、`consumption="not_checked"` 和 `ack="not_checked"`。目的地超过 64 个、ID 含不可打印字符或 UTF-8 编码超过 128 字节时,此工具拒绝查询。文本与结构化内容合计的 MCP 工具结果不超过 64 KiB,不包括外层 JSON-RPC 信封。这些限制仅适用于查询工具,策略加载及现有工具的行为保持不变。可打印字符的判定遵循运行中 Python 的 Unicode 数据库。默认的仅限本地列表查询的策略保持不变。 -## 尚未发布的 v1.4.0 候选版本:发送预检 (#357) + + +## v1.4.0 源码:发送预检 (#357) -`preflight_send(destination, target, message, wake=false, wake_timeout=30)` 通过现有 CLI dry-run 检查验证普通消息。操作员策略必须使用 `schemaVersion` 2,并为目的地和代理显式授予 `preflight`。版本 1 保留原有的功能集合,不会自动获得新权限;默认策略仍仅允许本地列表查询。预检不需要 `send`,也不能授予发送权限。如需检查唤醒资格,还必须单独具有 `wake`,但不会激活模型或预留唤醒额度。 +`preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)` 通过现有 CLI dry-run 检查验证普通消息。操作员策略必须使用 `schemaVersion` 2,并为目的地和代理显式授予 `preflight`。版本 1 保留原有的功能集合,不会自动获得新权限;默认策略仍仅允许本地列表查询。预检不需要 `send`,也不能授予发送权限。如需检查唤醒资格,还必须单独具有 `wake`,但不会激活模型或预留唤醒额度。 带有版本的说明会在 SSH 适配器加工结果前,从原生响应中提取允许的事实,并提供固定的拒绝或未知原因及操作员处置建议。它不包含消息内容、原始错误、凭据、主机或主目录路径、原生记录。结果未知或存在意外提交证据时,验证失败并返回 `retryAllowed=false`;切勿自动重发。预检不会提交消息或创建 handoff 授权。不支持设备和 handoff 模式。 现有 dry-run 检查可能启动本地或版本查询进程、建立 SSH 连接;SSH 配置本身也可能执行命令。因此该工具使用 `readOnlyHint=false` 和 `openWorldHint=true`。宿主批准独立于策略权限。通过仅表示检查时点的结果,不代表预留路由、证明有效存储、批准、保证后续发送、消费或 ACK。 -## 尚未发布的 v1.4.0 候选版本:有界诊断 (#358) + + +## v1.4.0 源码:有界诊断 (#358) `diagnose_destination(destination="local", agent=null, active_probe=false)` 要求在 `schemaVersion` 2 策略中显式授予 `diagnostics` 权限。默认模式仅返回策略元数据和声明的代理功能,不启动 CLI 或发现进程,也不发起网络请求。目的地 ID 采用与目的地发现相同的可打印字符及 UTF-8 128 字节限制。版本 1 和默认策略均不授予诊断权限。 默认模式的 `declaredCapabilities` 包含来自适配器声明的布尔值,不证明实际送达或就绪状态。 @@ -53,7 +61,7 @@ 状态或检查字段缺失、格式错误、检查不完整或检查列表被截断时,结果报告为未知或不完整(`diagnostic_incomplete`),不会报告为健康。传输阶段 `tcpAccept`、`tls` 和 `peerAuthentication` 均保持 `not_checked`;诊断不会单独验证这些阶段。 -候选版 MCP 包装层仅支持以下检查及执行效果: +MCP 包装层仅支持以下检查及执行效果: | 模式 / 代理 | 检查的事实 | 进程 / 连接效果 | | --- | --- | --- | @@ -69,9 +77,11 @@ `tcpAccept`、`tls` 和 `peerAuthentication` 阶段保持 `not_checked`。这里的 `peerAuthentication` 指配对设备身份验证,与正向 SSH 身份验证不同。`sshFailure` 仅报告经过脱敏的正向 SSH 失败类别,例如 `authentication_failed` 或 `host_key_failed`。不会新增 TCP、TLS、配对设备或回复主机探测。 -## 尚未发布的 v1.4.0 候选版本:MCP 预设 (#359) + + +## v1.4.0 源码:MCP 预设 (#359) -候选版本输入签名: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +输入签名: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. `list_presets(destination)` 仅读取已批准的路径元数据。`schemaVersion` 2 策略必须显式授予 `presets`,并在每个目的地的 `presets` 列表中提供 1 至 128 个符合 `[a-z][a-z0-9_-]{0,63}` 的已批准名称。版本 1 拒绝新增功能和字段。任何存储读取之前都先检查授权。结果仅公开与目的地匹配的已批准 `name`、`agent`、`transport` 和 `revision` 值及现有 `dp1:` 令牌,省略实际主机、主目录和存储路径。查询已保存的路径不会发现会话、选择目标、执行 SSH/原生/版本探测或刷新数据。带版本的文本与结构化工具结果合计限制为 64 KiB。 diff --git a/docs/zh-CN/releases/v1.4.0.md b/docs/zh-CN/releases/v1.4.0.md new file mode 100644 index 00000000..7d3325fa --- /dev/null +++ b/docs/zh-CN/releases/v1.4.0.md @@ -0,0 +1,34 @@ +# v1.4.0发布准备 + +于2026-11-02基于已发布的v1.3.3准备。在这个注明日期的检查点,v1.4.0仍是未发布的源码候选版本。集成基准为版本准备前的`f290973962c63548f24153eeee12a8e3666fd043`,并非最终发布提交。本准备不授权合并、创建标签或草稿、触发工作流、发布或生产部署。 + +核心Python 3.9、MCP Python 3.10+及SDK要求`mcp>=1.30,<2`保持不变。 + +## 变更 + +- #356 / #361:增加仅返回策略派生元数据的MCP `list_destinations`,最多64个别名,每个别名最多128个UTF-8字节,每次工具结果最多64 KiB,不含JSON-RPC外层封装。此元数据查询也适用于策略版本1和默认策略,不要求策略版本2。它投影所有已配置的策略条目,不按list/Send权限筛选。 +- #357 / #362:增加针对单一目标的CLI `--dry-run --explain-json`传递说明。在转换为旧有输出格式前收集原始SSH事实;现有文本和JSON输出契约保持不变。MCP `preflight_send`要求策略版本2中的独立`preflight`能力,preflight不隐含Send权限。Wake preflight还需要单独的wake能力,不启动模型,也不预留wake预算。 +- #358 / #363:增加默认模式下需具备`diagnostics`能力的仅元数据诊断。主动探测还需要`diagnostics_probe`,仅支持Mac/Linux,执行上限为3个代理、20秒,不含清理时间;每条管道与结果均限制为64 KiB。非阻塞读取器处理逃离进程范围的管道持有者,清理期间仍优先响应取消。 +- doctor中选择的代理与home决定实际收集范围,并跳过共享技能扫描。OK结果表示收集成功,不证明代理可用性、DB认证或反向探测。 +- #359 / #364:增加策略版本2的路由预设,采用获准名称和各动作的精确路由。任何Native调用之前都须完成两项检查:先检查路由,再检查其修订;实际发送须显式指定接收目标和修订。单次快照及其`dp1`指纹都不是目标身份或ACK。现有list/send JSON保持不变;安全查询路径不会退回修复操作。预设仍仅支持Mac/Linux上的本地或SSH Claude Code与Codex路由;不扩展wake、URI、Antigravity、device、handoff或Windows支持。 +- 发布准备还在MCP preflight中防御性地拒绝普通原生协议的响应根字段(`submitted`、`consumptionConfirmed`、`status`、`dryRun`、`queueId`),因为固定的`send.preflight`模式不包含这些字段。未观察到正常生产CLI的反例、错误路由或安全事件;此防护不增加能力、协议、ACK或权限。内部MCP进程辅助函数现会遵守显式传入的超时值,默认130秒的`CLI_TIMEOUT`行为保持不变;此修正不声称当前正常调用方受到影响或曾发生故障。 + +## 准确源码与验证 + +已合并源码为#361 `444959c08acadc85ec48722c03354a3905fac174`、#362 `e68f1c8f224f30701a9b69bb693f4e99055880ee`、#363 `7f85cb12cf6661db2facd5d74b2b31d7ee8514bd`及#364 `f290973962c63548f24153eeee12a8e3666fd043`。 + +集成基准的[CI](https://github.com/abruption/session-peer/actions/runs/41381070618)共37个任务成功,同一基准的[CodeQL](https://github.com/abruption/session-peer/actions/runs/41381070309)也成功。这是集成源码的依据,不能代替准备分支最终提交或最终受保护main发布源码的验证。 + +## 独立技能兼容性 + +现有兼容副本及将来的`SKILL.md`支持资产继续采用独立发布的[Python技能v0.4.1](https://github.com/abruption/session-peer-skill/releases/tag/v0.4.1),源码为`263b0c333d539dc4e885b16ae3369a26f33097d8`:UTF-8共27126字节,SHA-256为`fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed`。最低运行时0.9.1、文档完整覆盖范围1.3.2及接收端`codexBin`下限1.0.1均保持不变。支持副本仍位于wheel/sdist之外。 + +单独的技能0.5.0提案会保留最低版本0.9.1,并仅在运行时实际发布及另行批准后将文档完整覆盖范围记为1.4.0。后续快照PR必须核验准确的技能标签、源码和哈希。未来标签尚不存在不妨碍本次运行时准备;不得把已修改的字节重新标作技能0.4.1。本准备不发布或安装该提案。 + +## 边界与发布条件 + +这些扩展不增加新的实际Native/SSH、Windows 3.14或free-threaded验收,不增加ACK、去重或handoff保证,也不增加所属app-server支持或提升支持级别。未知角色与未知结果的限制保持不变;进入队列不代表ACK,不确定性绝不授权自动重试。 + +审查准确的当前提交,要求当前提交检查与最终受保护main CI成功,并保留所有已发布v1.3.3标签、资产及历史记录。冻结这份不预告发布的日期记录。另行授权的发布必须将包含`SHA256SUMS`和`release-provenance.json`的7个固定资产与准确标签、源码及经过认证的attestation核对,执行依赖审计与全新安装检查,并保留PyPI环境必需的人工批准。省略私有PyPI登录或绑定复查不免除该批准。 + +更新可用性说明前,须另行记录实际GitHub和PyPI发布依据,不得宣告将来已发布。Python发布、全局MCP环境升级、服务变更、Node Control部署和独立安装的技能均是需要另行授权的操作。 diff --git a/session_peer.py b/session_peer.py index 2b6c9a66..54dd871a 100644 --- a/session_peer.py +++ b/session_peer.py @@ -45,7 +45,7 @@ except ImportError: # Native Windows uses its own read-only writer inspection. fcntl = None -__version__ = "1.3.3" +__version__ = "1.4.0" GITHUB_REPO = "abruption/session-peer" # Claude Code refuses a same-machine message once its serialized form passes diff --git a/session_peer_core/common.py b/session_peer_core/common.py index 809f8688..24dcf853 100644 --- a/session_peer_core/common.py +++ b/session_peer_core/common.py @@ -45,7 +45,7 @@ except ImportError: # Native Windows uses its own read-only writer inspection. fcntl = None -__version__ = "1.3.3" +__version__ = "1.4.0" GITHUB_REPO = "abruption/session-peer" # Claude Code refuses a same-machine message once its serialized form passes diff --git a/session_peer_mcp.py b/session_peer_mcp.py index 4a2b7ba3..0851a288 100644 --- a/session_peer_mcp.py +++ b/session_peer_mcp.py @@ -114,7 +114,8 @@ async def invoke_bounded_diagnostic(argv, *, timeout, output_limit): return stdout, process.returncode -async def invoke_posix(argv, message, *, timeout=CLI_TIMEOUT, output_limit=None): +async def invoke_posix(argv, message, *, timeout=None, output_limit=None): + timeout = CLI_TIMEOUT if timeout is None else timeout if output_limit is not None: if message is not None: raise ValueError("Diagnostics do not accept stdin") @@ -142,7 +143,7 @@ def feed(): interrupted = False completed = False try: - stdout, _, _ = await asyncio.wait_for(asyncio.shield(io), CLI_TIMEOUT) + stdout, _, _ = await asyncio.wait_for(asyncio.shield(io), timeout) completed = True finally: grace = (WAKE_CLI_CLEANUP_GRACE if '--wake' in argv and not completed @@ -701,7 +702,9 @@ async def preflight_send(self, destination: str, target: str, message: str, if not isinstance(value, dict): value = {"reason": "outcome_unknown"} checked = value.get("checked") - valid = (type(value.get("schemaVersion")) is int and value["schemaVersion"] == 1 + valid = (not any(key in value for key in ( + "submitted", "consumptionConfirmed", "status", "dryRun", "queueId")) + and type(value.get("schemaVersion")) is int and value["schemaVersion"] == 1 and value.get("command") == "send.preflight" and isinstance(checked, dict) and checked.get("agent") == agent and isinstance(checked.get("validation"), str) and checked.get("validation") in { diff --git a/tests/docs/test_docs_i18n.py b/tests/docs/test_docs_i18n.py index 6418188e..5c48d602 100644 --- a/tests/docs/test_docs_i18n.py +++ b/tests/docs/test_docs_i18n.py @@ -64,7 +64,7 @@ class DocumentationTranslationsTest(unittest.TestCase): def test_every_canonical_document_has_each_translation(self): sources = canonical_documents() - self.assertEqual(53, len(sources), "Update the translation manifest for new canonical docs") + self.assertEqual(54, len(sources), "Update the translation manifest for new canonical docs") canonical_docs = { path.relative_to(ROOT / "docs") for path in (ROOT / "docs").rglob("*.md") diff --git a/tests/docs/test_stable_candidate.py b/tests/docs/test_stable_candidate.py index 931a27eb..32f974ca 100644 --- a/tests/docs/test_stable_candidate.py +++ b/tests/docs/test_stable_candidate.py @@ -11,6 +11,31 @@ class StableCandidate(unittest.TestCase): + def test_v140_preparation_separates_source_publication_and_skill_contracts(self): + for locale in ('', 'ko/', 'ja/', 'zh-CN/'): + notes = (ROOT / ('docs/' + locale + 'releases/v1.4.0.md')).read_text(encoding='utf-8') + for marker in ('2026-11-02', '1.4.0', '1.3.3', + 'f290973962c63548f24153eeee12a8e3666fd043', + '#356', '#357', '#358', '#359', '#361', '#362', '#363', '#364', + '41381070618', '41381070309', 'SHA256SUMS', 'release-provenance.json', + '0.4.1', '0.5.0', '0.9.1', '1.3.2', '1.0.1', + 'fdf5697c04f4a37194986622afb3a7966bb02631c128cf18a323e3fbe5ae90ed'): + self.assertIn(marker, notes) + english = (ROOT / 'docs/releases/v1.4.0.md').read_text(encoding='utf-8') + for marker in ('unpublished', 'not the final release commit', + 'human PyPI environment approval', '7 frozen assets'): + self.assertIn(marker, english) + + def test_json_guide_distinguishes_ordinary_and_specialized_schemas(self): + for locale in ('', 'ko/', 'ja/', 'zh-CN/'): + text = (ROOT / ('docs/' + locale + 'cli-reference.md')).read_text(encoding='utf-8') + block = text.split('"version": "0.8.0"')[0].rsplit('### ', 1)[-1] + self.assertIn('`--json`', block) + self.assertIn('`--explain-json`', block) + self.assertIn('`send.preflight`', block) + self.assertIn('MCP', block) + self.assertIn('"host": "mac-mini.example.ts.net"', block) + def test_v133_preparation_preserves_source_and_publication_boundaries(self): localized_gates = { "": ("unpublished candidate", "does not authorize merge, tag creation or publication", @@ -291,8 +316,8 @@ def test_source_version_keeps_experimental_acceptance_gates(self): self.assertIn(marker, english) def test_package_and_generated_core_version_agree(self): - self.assertEqual(session_peer.__version__, "1.3.3") - self.assertIn('__version__ = "1.3.3"', + self.assertEqual(session_peer.__version__, "1.4.0") + self.assertIn('__version__ = "1.4.0"', (ROOT / "session_peer_core/common.py").read_text(encoding="utf-8")) def test_current_readmes_and_runbooks_match_source_version(self): @@ -331,16 +356,16 @@ def test_release_notes_keep_scope_and_limits_visible(self): def test_stable_release_keeps_operational_deployment_separate(self): profiles = ( - ("", "Source version: **1.3.3**.", + ("", "Source version: **1.4.0**", "At the 2026-10-28 preparation checkpoint, the last verified published stable release was **1.3.1**.", "Development candidate 1.2.1 is unpublished"), - (".ko", "소스 버전: **1.3.3**.", + (".ko", "소스 버전: **1.4.0**", "2026-10-28 준비 시점의 마지막 확인 공개 안정판은 **1.3.1**이었습니다.", "개발 후보 1.2.1은 미공개입니다"), - (".ja", "ソースバージョン:**1.3.3**。", + (".ja", "ソースバージョン:**1.4.0**", "2026-10-28の準備時点で、最後に確認した公開済み安定版は**1.3.1**でした。", "開発候補1.2.1は未公開です"), - (".zh-CN", "源码版本:**1.3.3**。", + (".zh-CN", "源码版本:**1.4.0**", "在2026-10-28的准备检查时,最后确认的已发布稳定版本为**1.3.1**。", "开发候选版本1.2.1尚未发布"), ) @@ -348,7 +373,7 @@ def test_stable_release_keeps_operational_deployment_separate(self): text = (ROOT / ("README" + suffix + ".md")).read_text(encoding="utf-8") self.assertIn(source_version, text) self.assertNotIn(obsolete_checkpoint, text) - self.assertIn("releases/v1.3.3.md", text) + self.assertIn("releases/v1.4.0.md", text) for stale_version in ("1.2.0", "1.2.1", "1.3.0"): self.assertNotIn(stale_unpublished.replace("1.2.1", stale_version), text) self.assertIn("https://github.com/abruption/session-peer/releases", text) diff --git a/tests/mcp_integration/test_cleanup.py b/tests/mcp_integration/test_cleanup.py index 6e820a21..b23db56e 100644 --- a/tests/mcp_integration/test_cleanup.py +++ b/tests/mcp_integration/test_cleanup.py @@ -17,6 +17,24 @@ @unittest.skipUnless(sys.platform in ('darwin', 'linux'), 'POSIX process groups') class Cleanup(unittest.IsolatedAsyncioTestCase): + async def test_explicit_timeout_overrides_default_without_leaving_leader(self): + original = subprocess.Popen + children = [] + def spawn(*args, **kwargs): + child = original(*args, **kwargs) + # Darwin cleanup may run its own bounded ps inspection. Track the + # requested Python leader, not that separate cleanup subprocess. + if args[0][0] == sys.executable: + children.append(child) + return child + with patch.object(mcp.subprocess, 'Popen', side_effect=spawn), \ + patch.object(mcp, 'CLI_TIMEOUT', 30): + with self.assertRaises(asyncio.TimeoutError): + await asyncio.wait_for(mcp.invoke_posix( + [sys.executable, '-c', 'import time; time.sleep(30)'], None, timeout=.02), 3) + self.assertEqual(len(children), 1) + self.assertIsNotNone(children[0].returncode) + async def test_timeout_and_cancellation_kill_term_resistant_descendants(self): for mode in ('timeout', 'cancel'): with self.subTest(mode=mode), tempfile.TemporaryDirectory() as directory: diff --git a/tests/mcp_integration/test_preflight.py b/tests/mcp_integration/test_preflight.py index 84072bb1..b5b0e670 100644 --- a/tests/mcp_integration/test_preflight.py +++ b/tests/mcp_integration/test_preflight.py @@ -107,6 +107,21 @@ async def test_contradictory_or_missing_projection_evidence_fails_closed(self): self.adapter.invoke.return_value = missing self.assertFalse((await self.adapter.preflight_send('local', 'fixture', 'message'))['ok']) + async def test_native_root_evidence_cannot_be_ignored_by_structured_projection(self): + for key, field in (('submitted', True), ('submitted', False), + ('consumptionConfirmed', True), ('status', 'queued'), + ('dryRun', False), ('queueId', 'fixture-native-queue')): + value = preview() + value[key] = field + self.adapter.invoke.return_value = value + output = await self.adapter.preflight_send('local', 'fixture', 'message') + self.assertFalse(output['ok']) + self.assertEqual(output['checked']['validation'], 'unknown') + self.assertEqual(output['limitations']['submission'], 'unknown') + self.assertFalse(output['retryAllowed']) + self.assertEqual(output['reason'], 'preflight_response_unavailable') + self.assertEqual(self.adapter.invoke.await_count, 6) + async def test_missing_wake_evidence_cannot_pass(self): self.adapter.invoke.return_value = preview('codex', wake=True) output = await self.adapter.preflight_send('wake', 'codex:' + THREAD, 'message', wake=True) From 1bea6cbb246279d5355375780e6e6fa19fc0eaee Mon Sep 17 00:00:00 2001 From: YEONGUK LEE Date: Mon, 2 Nov 2026 13:20:22 +0900 Subject: [PATCH 2/2] docs(release): address independent document and regression review --- docs/i18n-manifest.json | 2 +- docs/ja/mcp.md | 2 ++ docs/ko/cli-reference.md | 2 +- docs/ko/mcp.md | 4 +++- docs/mcp.md | 2 ++ docs/zh-CN/mcp.md | 2 ++ tests/mcp_integration/test_cleanup.py | 14 +++++++++++--- tests/mcp_integration/test_preflight.py | 4 ++-- 8 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/i18n-manifest.json b/docs/i18n-manifest.json index 200989eb..9fdb421f 100644 --- a/docs/i18n-manifest.json +++ b/docs/i18n-manifest.json @@ -21,7 +21,7 @@ "docs/diagnostics.md": "0949e53612eeab2cd7c7bbda498e14d71e9cb1b1189aa7722030cb8702cd8481", "docs/download-metrics.md": "a537300d3fe2b60273b6f4bd84e0ae0944364fda3881d7fb7e32ce665dc2c724", "docs/handoff-runtime.md": "a236e48392c91eca0f7c3734a6008a991955ae66d16fd71f97691aac5bf0091f", - "docs/mcp.md": "e9d562abbe1c5e7a80f740f8466603f8d5b0be0ce7bc420554faa52fd41a1058", + "docs/mcp.md": "80341daf0ae71ba618a6fea836921f2c8a42338cb27210cc030bae53d0da95f6", "docs/multi-home-list.md": "f8d8e3adf727e4842ea7c4d45e8f6523b11d0513bf2509d4d1204645875e6489", "docs/paired-devices.md": "1c6cf45187fdbac5a21e43968bc0cc39aee05af19904b4d176f1dd2a70065303", "docs/relay-auth.md": "e6da5291ce6a9da31e79e66ceeff7e9fef7e95046359acbf04d708c96ffab62f", diff --git a/docs/ja/mcp.md b/docs/ja/mcp.md index 1dc67819..6d7544d1 100644 --- a/docs/ja/mcp.md +++ b/docs/ja/mcp.md @@ -97,6 +97,8 @@ MCP ラッパーが対応する検査と実行上の影響は、次の範囲に ## ツールとパーミッション +以下の二つのシグネチャは既存の基本インターフェースを説明します。v1.4.0ソースのツールと省略可能なプリセット引数は、上の各節と初期化済みMCPの`tools/list`スキーマを確認してください。ツールが表示されても、ポリシー上の権限が付与されるわけではありません。 + - `list_sessions(destination="local", agent=null, include_inactive=false)` は CLI の構造化された一覧を返します。Agent は `claude` または `codex` です。省略した場合は許可されたエージェントを一覧表示します。 - `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30)` は、`send` が明示的に許可されている場所にのみ 1 回送信します。Target は Claude 名/PID、`codex:`、または設定されたホストとホームに正確に一致する Reply-To URI です。 diff --git a/docs/ko/cli-reference.md b/docs/ko/cli-reference.md index b2d4f7ec..fc94a31c 100644 --- a/docs/ko/cli-reference.md +++ b/docs/ko/cli-reference.md @@ -217,7 +217,7 @@ Mac에서 소유권을 무시하는 마운트는 `preset_ownership_unenforced` ### v1.4.0 소스: MCP 프리셋 (#359) -후보 버전 입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. MCP 프리셋 조회와 선택은 운영자의 명시적 허용 목록과 기존 보안 스냅샷 읽기 함수를 사용하며, CLI 프리셋 관리 명령이나 자동 선택을 추가하지 않습니다. [MCP 프리셋 정책과 제한](mcp.md)을 참고하십시오. MCP 선택은 CLI `--preset`과 명시적 경로 플래그를 함께 사용하는 대신 승인된 경로를 확장합니다. 기존 CLI 출력, 리비전 및 파일 시스템 보안 규약은 유지됩니다. diff --git a/docs/ko/mcp.md b/docs/ko/mcp.md index 10be4b2c..61234c2e 100644 --- a/docs/ko/mcp.md +++ b/docs/ko/mcp.md @@ -81,7 +81,7 @@ MCP 래퍼가 지원하는 검사와 실행 효과는 다음으로 제한됩니 ## v1.4.0 소스: MCP 프리셋 (#359) -후보 버전 입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. +입력 시그니처: `list_sessions(destination="local", agent=null, include_inactive=false, preset=null, preset_revision=null)`; `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30, preset=null, preset_revision=null)`; `preflight_send(destination, target, message, wake=false, wake_timeout=30, preset=null, preset_revision=null)`. `list_presets(destination)`는 승인된 경로 메타데이터만 읽습니다. `schemaVersion` 2 정책은 `presets`를 명시적으로 허용하고, 목적지별 `presets` 목록에 `[a-z][a-z0-9_-]{0,63}` 형식의 승인된 이름을 1개 이상 128개 이하로 지정해야 합니다. 버전 1은 새 기능과 필드를 거부합니다. 저장소를 읽기 전에 권한을 확인합니다. 결과는 목적지와 일치하는 승인된 `name`, `agent`, `transport`, `revision` 값과 기존 `dp1:` 토큰만 노출하며 실제 호스트, 홈 및 저장소 경로는 생략합니다. 저장된 경로 조회는 세션을 검색하거나 대상을 고르거나 SSH·네이티브·버전 확인 검사를 실행하거나 데이터를 새로 고치지 않습니다. 버전이 지정된 텍스트와 구조화된 도구 결과를 합친 크기는 64 KiB로 제한됩니다. @@ -97,6 +97,8 @@ MCP 래퍼가 지원하는 검사와 실행 효과는 다음으로 제한됩니 ## 도구 및 권한 +아래 두 시그니처는 기존 기본 인터페이스를 설명합니다. v1.4.0 소스 도구와 선택형 프리셋 인자는 위 절과 초기화된 MCP의 `tools/list` 스키마를 확인하십시오. 도구가 표시된다는 사실은 정책 권한을 부여하지 않습니다. + - `list_sessions(destination="local", agent=null, include_inactive=false)`는 CLI의 구조화된 목록을 반환합니다. Agent는 `claude` 또는 `codex`일 수 있으며, 생략 시 허용된 에이전트를 나열합니다. - `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30)`는 `send`가 명시적으로 허용된 곳에만 1회 제출합니다. Target은 Claude 이름/PID, `codex:`, 또는 구성된 호스트 및 홈과 정확히 일치하는 Reply-To URI입니다. diff --git a/docs/mcp.md b/docs/mcp.md index e58df8e7..ebcc3383 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -97,6 +97,8 @@ If any approved item is missing or its route mismatches policy, the whole metada ## Tools and permissions +The two signatures below describe the original baseline interface. For v1.4.0 source tools and optional preset selectors, use the sections above and the initialized MCP `tools/list` schema. Tool availability does not grant policy permission. + - `list_sessions(destination="local", agent=null, include_inactive=false)` returns the CLI's structured listing. Agent may be `claude` or `codex`; omission lists permitted agents. - `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30)` submits once, only where `send` is explicitly allowed. Target is a Claude name/PID, `codex:`, or a Reply-To URI matching the configured host and home exactly. diff --git a/docs/zh-CN/mcp.md b/docs/zh-CN/mcp.md index 1f21287a..4be0878f 100644 --- a/docs/zh-CN/mcp.md +++ b/docs/zh-CN/mcp.md @@ -97,6 +97,8 @@ MCP 包装层仅支持以下检查及执行效果: ## 工具与权限 +以下两个签名说明原有的基本接口。v1.4.0源码工具及可选预设参数请参阅上文各节和初始化后的MCP `tools/list`模式。工具可见并不授予策略权限。 + - `list_sessions(destination="local", agent=null, include_inactive=false)` 返回 CLI 的结构化列表。Agent 可以是 `claude` 或 `codex`;省略则列出允许的代理。 - `send_message(destination, target, message, dry_run=false, wake=false, wake_timeout=30)` 仅在显式允许 `send` 的情况下提交一次。Target 是 Claude 名称/PID、`codex:` 或与配置的主机和主目录完全匹配的 Reply-To URI。 diff --git a/tests/mcp_integration/test_cleanup.py b/tests/mcp_integration/test_cleanup.py index b23db56e..c5ad2c5f 100644 --- a/tests/mcp_integration/test_cleanup.py +++ b/tests/mcp_integration/test_cleanup.py @@ -29,9 +29,17 @@ def spawn(*args, **kwargs): return child with patch.object(mcp.subprocess, 'Popen', side_effect=spawn), \ patch.object(mcp, 'CLI_TIMEOUT', 30): - with self.assertRaises(asyncio.TimeoutError): - await asyncio.wait_for(mcp.invoke_posix( - [sys.executable, '-c', 'import time; time.sleep(30)'], None, timeout=.02), 3) + task = asyncio.create_task(mcp.invoke_posix( + [sys.executable, '-c', 'import time; time.sleep(30)'], None, timeout=.02)) + try: + done, _ = await asyncio.wait({task}, timeout=3) + self.assertIn(task, done, 'Explicit helper timeout did not fire before watchdog') + with self.assertRaises(asyncio.TimeoutError): + await task + finally: + if not task.done(): + task.cancel() + await asyncio.gather(task, return_exceptions=True) self.assertEqual(len(children), 1) self.assertIsNotNone(children[0].returncode) diff --git a/tests/mcp_integration/test_preflight.py b/tests/mcp_integration/test_preflight.py index b5b0e670..da8472fb 100644 --- a/tests/mcp_integration/test_preflight.py +++ b/tests/mcp_integration/test_preflight.py @@ -110,7 +110,7 @@ async def test_contradictory_or_missing_projection_evidence_fails_closed(self): async def test_native_root_evidence_cannot_be_ignored_by_structured_projection(self): for key, field in (('submitted', True), ('submitted', False), ('consumptionConfirmed', True), ('status', 'queued'), - ('dryRun', False), ('queueId', 'fixture-native-queue')): + ('dryRun', False), ('queueId', 'fixture-native-queue'), ('submitted', None)): value = preview() value[key] = field self.adapter.invoke.return_value = value @@ -120,7 +120,7 @@ async def test_native_root_evidence_cannot_be_ignored_by_structured_projection(s self.assertEqual(output['limitations']['submission'], 'unknown') self.assertFalse(output['retryAllowed']) self.assertEqual(output['reason'], 'preflight_response_unavailable') - self.assertEqual(self.adapter.invoke.await_count, 6) + self.assertEqual(self.adapter.invoke.await_count, 7) async def test_missing_wake_evidence_cannot_pass(self): self.adapter.invoke.return_value = preview('codex', wake=True)