Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/windows-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Windows prerelease preparation

on:
workflow_dispatch:
inputs:
mode:
description: Prepare a draft version PR, or build assets on a draft release (never publishes)
required: true
type: choice
options: [prepare, draft]
immutable_policy_confirmed:
description: I independently verified immutable releases are enabled and will not change policy/config or publish during this run (manual acknowledgement)
required: true
type: boolean
default: false

permissions:
contents: read

concurrency:
group: windows-prerelease-preparation
cancel-in-progress: false

jobs:
release-please:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
outputs:
source_sha: ${{ steps.source.outputs.source_sha }}
release_id: ${{ steps.source.outputs.release_id }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: '24'
package-manager-cache: false
- name: Refuse published releases and subsequent version preparation
id: preflight
env:
GH_TOKEN: ${{ github.token }}
OPERATION: ${{ inputs.mode }}
IMMUTABLE_POLICY_CONFIRMED: ${{ inputs.immutable_policy_confirmed }}
run: node scripts/windows-prerelease-cli.mjs preflight
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
if: ${{ steps.preflight.outputs.run_release_please == 'true' }}
with:
token: ${{ github.token }}
target-branch: main
config-file: release-please-windows-config.json
manifest-file: .release-please-windows-manifest.json
skip-github-release: ${{ inputs.mode == 'prepare' }}
skip-github-pull-request: ${{ inputs.mode == 'draft' }}
- name: Resolve and verify draft source (also supports retries)
if: ${{ inputs.mode == 'draft' }}
id: source
env:
GH_TOKEN: ${{ github.token }}
CREATED_SHA: ${{ steps.release.outputs['experimental/windows-rust-diagnostics--sha'] }}
CREATED_TAG: ${{ steps.release.outputs['experimental/windows-rust-diagnostics--tag_name'] }}
run: node scripts/windows-prerelease-cli.mjs resolve

build:
needs: release-please
if: ${{ inputs.mode == 'draft' && needs.release-please.outputs.source_sha != '' }}
permissions:
contents: read
uses: ./.github/workflows/windows-rust-diagnostics.yml
with:
source_ref: ${{ needs.release-please.outputs.source_sha }}

attach:
needs: [release-please, build]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
actions: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: '24'
package-manager-cache: false
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
artifact-ids: ${{ needs.build.outputs.preview_artifact_id }}
path: ${{ runner.temp }}/windows-preview
merge-multiple: true
- name: Verify provenance and attach bytes to draft only
env:
GH_TOKEN: ${{ github.token }}
SOURCE_SHA: ${{ needs.release-please.outputs.source_sha }}
RELEASE_ID: ${{ needs.release-please.outputs.release_id }}
IMMUTABLE_POLICY_CONFIRMED: ${{ inputs.immutable_policy_confirmed }}
run: node scripts/windows-prerelease-cli.mjs attach "$RUNNER_TEMP/windows-preview"
50 changes: 48 additions & 2 deletions .github/workflows/windows-rust-diagnostics.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
name: Windows Rust diagnostics

on:
workflow_call:
inputs:
source_ref:
description: Immutable source commit to validate (defaults to github.sha)
type: string
required: false
default: ''
outputs:
preview_artifact_id:
description: Validated Windows preview artifact ID
value: ${{ jobs.windows.outputs.preview_artifact_id }}
workflow_dispatch:
inputs:
source_ref:
description: Immutable 40-character source commit (blank uses github.sha)
type: string
required: false
default: ''
pull_request:
branches: [main]
paths:
Expand All @@ -19,14 +37,31 @@ jobs:
windows:
runs-on: windows-2022
timeout-minutes: 15
outputs:
preview_artifact_id: ${{ steps.preview-upload.outputs.artifact-id }}
defaults:
run:
shell: pwsh
working-directory: experimental/windows-rust-diagnostics
steps:
- name: Validate immutable source ref
id: source
working-directory: .
env:
SOURCE_REF: ${{ inputs.source_ref || github.sha }}
run: |
if ($env:SOURCE_REF -cnotmatch '^[a-f0-9]{40}$') { throw 'source_ref must be an immutable commit SHA' }
"sha=$env:SOURCE_REF" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ steps.source.outputs.sha }}
- name: Verify checked-out source
env:
SOURCE_REF: ${{ steps.source.outputs.sha }}
run: |
$actual = git rev-parse HEAD
if ($LASTEXITCODE -ne 0 -or $actual -cne $env:SOURCE_REF) { throw 'Source checkout mismatch' }
- name: Install pinned toolchain
run: |
rustup toolchain install 1.90.0 --profile minimal --component rustfmt --component clippy
Expand All @@ -36,6 +71,13 @@ jobs:
cargo --version
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- run: cargo fetch --locked
- name: Read expected Cargo version
run: |
$metadata = cargo metadata --no-deps --locked --offline --format-version 1
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$packages = @(($metadata | ConvertFrom-Json).packages | Where-Object { $_.name -ceq 'codex-unlock-windows-diagnostic' })
if ($packages.Count -ne 1) { throw 'Expected one diagnostic Cargo package' }
"PREVIEW_EXPECTED_VERSION=$($packages[0].version)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- run: cargo fmt --check
- run: cargo clippy --locked --offline --all-targets -- -D warnings
- name: Create private synthetic parent and test
Expand Down Expand Up @@ -86,8 +128,10 @@ jobs:
experimental/windows-rust-diagnostics/target/debug/deps/windows-*.exe
experimental/windows-rust-diagnostics/target/debug/artifact-manifest.json
- name: Validate preview packaging contracts
run: node --test scripts/preview.test.mjs
run: node --test scripts/*.test.mjs
- name: Build Windows x86_64 diagnostic preview
env:
RUSTFLAGS: -C target-feature=+crt-static
run: |
cargo build --locked --offline --release --target x86_64-pc-windows-msvc --bin codex-unlock-windows
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Expand All @@ -99,11 +143,12 @@ jobs:
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$version = & $binary --version
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if (($version -join "`n").Trim() -cne 'codex-unlock-windows 0.0.0') { throw 'Unexpected CLI version' }
if (($version -join "`n").Trim() -cne "codex-unlock-windows $env:PREVIEW_EXPECTED_VERSION") { throw 'Unexpected CLI version' }
$capabilities = & $binary capabilities --json
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$cap = $capabilities | ConvertFrom-Json -ErrorAction Stop
$capabilities
if ($cap.version -cne $env:PREVIEW_EXPECTED_VERSION) { throw 'Unexpected capabilities version' }
if ($cap.schema -ne 'codex-unlock-windows-preview' -or $cap.safeToUnlock -ne $false -or $cap.recoveryAvailable -ne $false) { throw 'Invalid capabilities contract' }
if ($cap.diagnosticsAvailable -ne $false -or $cap.context.state -ne 'observed' -or $cap.context.elevated -isnot [bool] -or $cap.context.appContainer -isnot [bool] -or $cap.context.integrityRid -isnot [long]) { throw 'This refusal gate requires an observed unsupported caller; Medium is measured separately' }
if ($cap.context.appContainer) { $expectedReason = 'app_container_refused' }
Expand Down Expand Up @@ -134,6 +179,7 @@ jobs:
-SourceSha $sourceSha `
-ExpectedSha256 $env:PREVIEW_TESTED_SHA256
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
id: preview-upload
with:
name: windows-diagnostics-preview-windows-x86_64
retention-days: 7
Expand Down
3 changes: 3 additions & 0 deletions .release-please-windows-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"experimental/windows-rust-diagnostics": "0.0.0"
}
10 changes: 8 additions & 2 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ codex-unlock inspect <thread-id>

## クイックスタート

macOS または Linux、Node.js **22.13 以上(22.x)または 24.x**、および `lsof` が必要です。
Windows と Node.js 26 はサポートしていません。
安定版 npm CLI には macOS または Linux、Node.js **22.13 以上(22.x)または 24.x**、および `lsof` が必要です。
この CLI は Windows と Node.js 26 をサポートしていません。

`list` と `inspect` は Codex のネイティブロックファイルや会話記録ファイルの内容を変更しませんが、各プローブで Codex の調整ロックを短時間取得します。対話形式でコマンドを実行すると、主な結果を出力した後に `codex-unlock` の更新案内キャッシュを別途更新することがあります。詳しくは[更新の動作](docs/cli-reference.md#updates)を参照してください。
再検証により、対象ロックを所有しているのが同一ユーザーの Codex プロセス1つだけだと確認できた場合に限り、`unlock` は `SIGTERM` を送ります。
Expand Down Expand Up @@ -67,6 +67,12 @@ npm install --global codex-unlock@latest
`check-update` はパッケージレジストリで更新を確認するだけで、インストールは行いません。
自動通知は参考情報にすぎません。詳しくは[更新の動作](docs/cli-reference.md#updates)を参照してください。

## Windows 診断プレリリース

独立した Windows 診断専用 **0.5.0-alpha.1** プレリリースのタグは `windows-v0.5.0-alpha.1` で、安定版 npm CLI には影響しません。公開状況と ZIP の入手可否は [GitHub Releases](https://github.com/abruption/codex-unlock/releases) で確認してください。単体実行用 ZIP に含まれる実行ファイルには Node.js、Rust、`lsof` のインストールは不要です。

対象はローカル NTFS 上の Windows x64 で、実際のトークンが Medium 整合性レベル、非昇格、非 AppContainer であることを確認する必要があります。測定の根拠は Defender のリアルタイム保護が無効な指定の Windows 10 x64 ホストに限られます。Windows 11 は未測定で、この根拠では他のセキュリティ構成も検証済みとはいえません。Windows のロック解除・復旧機能はなく、指定した PID はロック保持者を確定する根拠にはなりません。`safeToUnlock` は常に `false` です。[Windows の対応範囲とダウンロード案内](docs/platform-support.md#windows-diagnostic-prerelease)を参照してください。

## ドキュメント

詳細なリファレンス文書は現在英語のみです。
Expand Down
8 changes: 7 additions & 1 deletion README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ codex-unlock inspect <thread-id>

## 빠른 시작

macOS 또는 Linux, Node.js **22.13 이상(22.x) 또는 24.x**, 그리고 `lsof`가 필요합니다. Windows와 Node.js 26은 지원하지 않습니다.
안정판 npm CLI는 macOS 또는 Linux, Node.js **22.13 이상(22.x) 또는 24.x**, 그리고 `lsof`가 필요합니다. 이 CLI는 Windows와 Node.js 26을 지원하지 않습니다.

`list`와 `inspect`는 Codex의 네이티브 잠금 파일이나 대화 기록 파일의 내용을 바꾸지 않지만, 잠금을 검사할 때마다 Codex의 조정 잠금을 잠시 획득합니다. 대화형 명령에서는 기본 결과를 출력한 뒤 `codex-unlock`의 업데이트 안내 캐시를 별도로 갱신할 수 있습니다. 자세한 내용은 [업데이트 동작](docs/cli-reference.md#updates)을 참고하세요.

Expand Down Expand Up @@ -61,6 +61,12 @@ npm install --global codex-unlock@latest

`check-update`는 레지스트리에서 업데이트를 확인할 뿐, 설치하지는 않습니다. 자동 알림은 참고용입니다. [업데이트 동작](docs/cli-reference.md#updates)을 참고하세요.

## Windows 진단 프리릴리스

별도 Windows 진단 전용 **0.5.0-alpha.1** 프리릴리스의 태그는 `windows-v0.5.0-alpha.1`이며, 안정판 npm CLI에는 영향을 주지 않습니다. 공개 상태와 ZIP 다운로드 가능 여부는 [GitHub Releases](https://github.com/abruption/codex-unlock/releases)에서 확인하세요. 독립 실행형 ZIP에 포함된 실행 파일을 실행하는 데 Node.js, Rust, `lsof` 설치는 필요하지 않습니다.

대상 범위는 로컬 NTFS를 사용하는 Windows x64이며, 실제 토큰이 Medium 무결성 수준이고 권한 상승 및 AppContainer 상태가 아님을 확인해야 합니다. 측정 근거는 Defender 실시간 보호가 꺼진 지정 Windows 10 x64 호스트에 한정됩니다. Windows 11은 측정하지 않았으며, 이 근거로 다른 보안 구성까지 검증되었다고 볼 수 없습니다. Windows 잠금 해제·복구 기능은 없고, 사용자가 지정한 PID로 잠금 보유자를 확정하지 않으며, `safeToUnlock`은 항상 `false`입니다. [Windows 지원 범위 및 다운로드 안내](docs/platform-support.md#windows-diagnostic-prerelease)를 참고하세요.

## 문서

- [CLI 참고 문서](docs/cli-reference.md) — 명령, 안전성, 옵션, 종료 코드, 소스 설치
Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ recovery only when every safety check passes.

## Quick Start

Requires macOS or Linux, Node.js **22.13+ (22.x) or 24.x**, and `lsof`.
Windows and Node.js 26 are not supported.
The stable npm CLI requires macOS or Linux, Node.js **22.13+ (22.x) or 24.x**, and `lsof`.
That CLI does not support Windows or Node.js 26.

`list` and `inspect` do not change the contents of Codex's native lock or
transcript files, though each probe briefly takes Codex's coordination lock.
Expand Down Expand Up @@ -74,6 +74,22 @@ npm install --global codex-unlock@latest
`check-update` checks the registry; it does not install anything.
Automatic notices are advisory only. See [update behavior](docs/cli-reference.md#updates).

## Windows diagnostic prerelease

The separate Windows diagnostic-only **0.5.0-alpha.1** prerelease uses tag
`windows-v0.5.0-alpha.1` and does not change the stable npm CLI. Consult
[GitHub Releases](https://github.com/abruption/codex-unlock/releases) for its
publication status and ZIP availability. Running the standalone ZIP's executable
requires no Node.js, Rust or `lsof` installation.

Its scope is Windows x64 on local NTFS, with a verified Medium-integrity,
non-elevated, non-AppContainer token. Measurements cover a designated Windows
10 x64 host with Defender real-time protection disabled. Windows 11 was not
measured, and other security configurations are not qualified by this evidence.
There is no Windows unlock or recovery, a supplied
PID does not establish the lock holder, and `safeToUnlock` is always `false`.
See [Windows scope and download guidance](docs/platform-support.md#windows-diagnostic-prerelease).

## Docs

- [CLI reference](docs/cli-reference.md) — commands, safety, options, exit codes, and source installation
Expand Down
10 changes: 8 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ codex-unlock inspect <thread-id>

## 快速开始

需要 macOS 或 Linux、Node.js **22.13+(22.x)或 24.x**,以及 `lsof`。
不支持 Windows 和 Node.js 26。
稳定版 npm CLI 需要 macOS 或 Linux、Node.js **22.13+(22.x)或 24.x**,以及 `lsof`。
此 CLI 不支持 Windows 和 Node.js 26。

`list` 和 `inspect` 不会修改 Codex 原生锁文件或对话记录文件的内容,但每次探测都会短暂获取 Codex 的协调锁。
在交互式命令输出主要结果后,`codex-unlock` 可能会单独刷新更新提示缓存。详见[更新行为](docs/cli-reference.md#updates)。
Expand Down Expand Up @@ -66,6 +66,12 @@ npm install --global codex-unlock@latest

`check-update` 只检查软件包注册表中的版本,不会安装更新。自动提示仅供参考。详见[更新行为](docs/cli-reference.md#updates)。

## Windows 诊断预发布版

独立的 Windows 仅诊断 **0.5.0-alpha.1** 预发布版使用标签 `windows-v0.5.0-alpha.1`,不改变稳定版 npm CLI。请在 [GitHub Releases](https://github.com/abruption/codex-unlock/releases) 查看发布状态及 ZIP 是否可供下载。运行独立 ZIP 中的可执行文件无需安装 Node.js、Rust 或 `lsof`。

适用范围为使用本地 NTFS 的 Windows x64,且必须确认实际令牌为 Medium 完整性级别、未提升权限且不处于 AppContainer 中。测量依据仅来自关闭 Defender 实时保护的指定 Windows 10 x64 主机。Windows 11 尚未测量,此依据也不能证明其他安全配置已通过验证。不提供 Windows 解锁或恢复功能,用户指定的 PID 不能证明锁的持有者身份,`safeToUnlock` 始终为 `false`。详见 [Windows 适用范围与下载说明](docs/platform-support.md#windows-diagnostic-prerelease)。

## 文档

详细参考文档目前仅提供英文版本。
Expand Down
Loading
Loading