diff --git a/Cargo.lock b/Cargo.lock index 2782667..d3a9c73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2941,7 +2941,7 @@ checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "xgen-adapter-filesystem" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "cap-fs-ext", "cap-std", @@ -2960,7 +2960,7 @@ dependencies = [ [[package]] name = "xgen-adapter-process" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "cap-fs-ext", "cap-std", @@ -2983,7 +2983,7 @@ dependencies = [ [[package]] name = "xgen-adapter-reference" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "jsonschema", "serde", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "xgen-cli" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "cap-fs-ext", "cap-std", @@ -3038,7 +3038,7 @@ dependencies = [ [[package]] name = "xgen-domain" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "serde", "serde_json", @@ -3046,7 +3046,7 @@ dependencies = [ [[package]] name = "xgen-local-store" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "libc", "rusqlite", @@ -3064,7 +3064,7 @@ dependencies = [ [[package]] name = "xgen-policy" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "serde_json", "thiserror 2.0.20", @@ -3073,7 +3073,7 @@ dependencies = [ [[package]] name = "xgen-protocol" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "jsonschema", "serde", @@ -3086,7 +3086,7 @@ dependencies = [ [[package]] name = "xgen-provider-openai" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "jsonschema", "serde", @@ -3105,7 +3105,7 @@ dependencies = [ [[package]] name = "xgen-runtime" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "jsonschema", "serde", @@ -3124,7 +3124,7 @@ dependencies = [ [[package]] name = "xgen-workgraph" -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" dependencies = [ "proptest", "serde", diff --git a/Cargo.toml b/Cargo.toml index 18a3d02..8272b21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ members = [ resolver = "3" [workspace.package] -version = "0.1.0-rc.7" +version = "0.1.0-rc.8" edition = "2024" rust-version = "1.98" license = "Apache-2.0" diff --git a/MEMORY.md b/MEMORY.md index 9837a7a..49f2d5f 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -17,8 +17,10 @@ 2026-11-19 구현·로컬 검증: [최초 사용과 기본 preview 설치](docs/adr/0088-first-use-preview-distribution.md). 실행 파일 없는 bootstrap을 기본 설치로 받는 문제를 고쳐 첫 stable 전에는 검증한 launcher preview를 `latest`로 제공한다. Provider/model 오입력 재선택과 정적 오류 복구 안내, 현재 OpenAI preset 안내를 -추가했다. Rust800개·npm19개·격리한 CLI의 3개 edit/test/approval-resume layout과 TUI smoke를 통과했다. -rc.7 게시·공개 registry 기본 설치는 검증 예정이며 실제 모델 품질 평가는 인증 부재로 미실행이다. +추가했다. Rust800개·npm20개·격리한 CLI의 3개 edit/test/approval-resume layout과 TUI smoke를 통과했다. +rc.7은 5개 release build 뒤 assembly의 npm 의존성 누락으로 미게시 실패했다. Verifier의 무의존성 +경계를 복원하고 rc.8로 재배포한다. 공개 registry 기본 설치는 검증 예정이며 실제 모델 품질 평가는 +인증 부재로 미실행이다. 소유자는 xgen CLI·npm 배포 경로다. 도구 검색·browser-use·SEV 알고리즘은 이번 변경 대상이 아니다. 2026-11-19 구현·로컬 검증 완료: [Run별 capability 범위](docs/development/capability-scope.md), [PR #144](https://github.com/PlateerLab/xgen-cli/pull/144). diff --git a/README.md b/README.md index 556da0f..40ec0d5 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ Linux/macOS: installer=$(mktemp "${TMPDIR:-/tmp}/xgen-installer.XXXXXX") curl -q --proto '=https' --proto-redir '=https' --tlsv1.2 \ --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo "$installer" \ - https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.7/xgen-installer.sh -sh "$installer" --version v0.1.0-rc.7 + https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.8/xgen-installer.sh +sh "$installer" --version v0.1.0-rc.8 rm -f "$installer" export PATH="$HOME/.local/bin:$PATH" ``` @@ -36,9 +36,9 @@ Windows PowerShell: ```powershell $installer = Join-Path ([System.IO.Path]::GetTempPath()) "xgen-installer-$([Guid]::NewGuid().ToString('N')).ps1" -curl.exe -q --proto "=https" --proto-redir "=https" --tlsv1.2 --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo $installer "https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.7/xgen-installer.ps1" +curl.exe -q --proto "=https" --proto-redir "=https" --tlsv1.2 --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo $installer "https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.8/xgen-installer.ps1" if ($LASTEXITCODE -ne 0) { throw "XGEN installer download failed" } -& $installer -Version v0.1.0-rc.7 +& $installer -Version v0.1.0-rc.8 Remove-Item -LiteralPath $installer $env:Path = "$env:LOCALAPPDATA\XGEN\bin;$env:Path" ``` diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index ca6c1f2..a347692 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -6728,7 +6728,7 @@ limitations under the License. License: Apache License 2.0 Used by: -- xgen-cli 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) +- xgen-cli 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) ============================================================================== The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: @@ -7199,16 +7199,16 @@ limitations under the License. License: Apache License 2.0 Used by: -- xgen-adapter-filesystem 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-adapter-process 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-adapter-reference 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-domain 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-local-store 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-policy 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-protocol 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-provider-openai 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-runtime 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) -- xgen-workgraph 0.1.0-rc.7 (https://github.com/PlateerLab/xgen-cli) +- xgen-adapter-filesystem 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-adapter-process 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-adapter-reference 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-domain 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-local-store 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-policy 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-protocol 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-provider-openai 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-runtime 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) +- xgen-workgraph 0.1.0-rc.8 (https://github.com/PlateerLab/xgen-cli) - allocator-api2 0.2.21 (https://github.com/zakarumych/allocator-api2) - anyhow 1.0.104 (https://github.com/dtolnay/anyhow) - async-trait 0.1.92 (https://github.com/dtolnay/async-trait) diff --git a/docs/adr/0088-first-use-preview-distribution.md b/docs/adr/0088-first-use-preview-distribution.md index e4c4575..1e5c43c 100644 --- a/docs/adr/0088-first-use-preview-distribution.md +++ b/docs/adr/0088-first-use-preview-distribution.md @@ -1,7 +1,7 @@ # ADR-0088: 기본 preview 설치와 최초 모델 연결 복구 - 날짜: 2026-11-19 -- 상태: 채택, rc.7 게시 검증 예정 +- 상태: 채택, rc.7 조립 실패·미게시, rc.8 게시 검증 예정 - 범위: 일반 배포·CLI 표시. Planner 입력·journal·권한·자동 재시도 계약은 바꾸지 않는다. ## 문제와 근거 @@ -22,7 +22,8 @@ RC6 뒤의 OpenAI parameter style, TUI idle redraw와 Run capability scope도 Stable이 하나라도 게시됐거나 더 높은 version이 존재하면 preview로 `latest`를 갱신하지 않는다. 잘못된 registry version, 존재하지 않는 candidate/alias, `next` 불일치는 fail-closed한다. SemVer 비교는 private npm workspace의 고정 `semver@7.8.6` devDependency로 한다. Launcher runtime과 -native binary에는 이 의존성이 들어가지 않는다. `verify-release`의 tag 판정도 같은 parser를 사용한다. +native binary에는 이 의존성이 들어가지 않는다. 의존성을 설치하지 않는 assembly verifier는 기존 +dependency-free 경계를 유지한다. 그 경로의 tag 문법은 build metadata를 허용하지 않는다. Platform package는 exact optional dependency이므로 기본 alias를 옮기지 않는다. Alias 갱신 실패는 동일 release job 재실행으로 복구하며 tarball을 덮어쓰지 않는다. 기존 release concurrency group으로 @@ -50,7 +51,7 @@ README 첫 화면은 일반 설치·모델 연결·작은 작업·복구 순서 - Rust 800 passed, 0 failed, 4 ignored. Clippy·fmt·release build·license·문서/workflow 검사 통과. - Pinned graph-tool-call과 compiled CLI를 사용한 Python 검사 162개 통과(10 skipped). Python 3.14의 기존 SQLite ResourceWarning은 남지만 실패는 없었다. -- npm 정책 검사 19개: 서로 다른 prerelease 계열, 낮은 stable·build metadata의 hyphen, +- npm 정책 검사 20개(assembly 무의존성 import 회귀 추가): 서로 다른 prerelease 계열, 낮은 stable·build metadata의 hyphen, 더 높은 preview, 잘못된 metadata, 동일 게시 재실행·SRI/provenance 경계를 검증했다. - `scripts/smoke-first-use.py`: 격리한 config/state와 실제 CLI에서 provider/model 오입력 뒤 설정 성공, 실패한 재설정의 기존 profile 보존, compatibility 재검사, Python·JSON 설계 layout과 별도 text layout의 @@ -68,5 +69,17 @@ README 첫 화면은 일반 설치·모델 연결·작은 작업·복구 순서 ## 배포 결과 -rc.7 후보는 RC6 뒤 변경을 함께 포함한다. GitHub/npm 게시와 5개 플랫폼 release 검증 결과는 게시 후 -추가한다. 이 문서의 로컬 통과를 게시 완료나 일반 사용자 작업 성공률의 근거로 해석하지 않는다. +rc.7 태그의 source `ca5392b`는 main CI 7개와 release 5개 native build·설치 검사를 통과했지만, +[release run](https://github.com/PlateerLab/xgen-cli/actions/runs/44460752126)의 assembly에서 +`ERR_MODULE_NOT_FOUND`로 실패했다. Assembly는 npm 의존성을 설치하지 않는데 verifier에 private +`semver` import를 추가한 실수였다. GitHub Release와 npm package는 게시되지 않았다. +태그는 이동하거나 재사용하지 않고 rc.8로 다시 진행한다. + +수정은 verifier의 기존 무의존성 경계를 복원하는 것이다. `semver`는 기존 `npm ci` 뒤에 실행하는 +publisher에서만 사용한다. 깨끗한 임시 checkout에서 verifier를 import하는 검사를 추가해 수정 전 +실패·수정 후 통과를 확인했다. rc.7의 실제 5개 build artifact를 받아 `node_modules` 없는 checkout에서 +launcher까지 6개 package의 assembly verifier를 재생해 통과했다. Artifact 재사용 게시가 아니라 +실패 경로의 수정 검증이며 rc.8은 새 source/tag에서 다시 빌드한다. + +rc.8의 GitHub/npm 게시와 공개 설치 결과는 완료 후 추가한다. 로컬 fixture 통과를 실제 모델의 작업 +성공률 근거로 해석하지 않는다. diff --git a/docs/development/model-onboarding.md b/docs/development/model-onboarding.md index 4047542..d2d8e1e 100644 --- a/docs/development/model-onboarding.md +++ b/docs/development/model-onboarding.md @@ -114,14 +114,19 @@ endpoint는 진단에 추가하지 않는다. 제공자·model 번호를 잘못 - `credential_not_found`: `xgen model list`에서 profile 이름을 확인하고 `xgen model setup --name PROFILE`로 key를 로컬에서 다시 입력한다. Headless는 secret manager에서 `XGEN_OPENAI_API_KEY`를 process에 주입할 수 있다. - `authentication_rejected`: 저장된 key가 폐기됐다면 `xgen model logout PROFILE`로 지운 뒤 `xgen model setup --name PROFILE`로 다시 입력한다. 기존 key가 남아 있으면 setup이 재사용한다. Environment key가 있으면 그 값이 우선이므로 로컬에서 갱신하거나 해제한다. -- `model_not_advertised`: `xgen model setup`에서 목록에 있는 정확한 model ID를 고른다. +- `model_not_advertised`: 서버가 광고한 정확한 ID를 `xgen model setup --name PROFILE --model MODEL_ID`로 지정한다. 기존 profile은 저장된 model을 재사용하므로 `setup`만 다시 실행하면 번호 선택창이 나오지 않는다. - `request_rejected` / `chat_completions_incompatible`: response format·parameter style과 응답의 exact model ID를 확인한다. Alias가 다른 snapshot ID를 반환하면 그 snapshot을 목록에서 선택한다. - `provider_output_truncated`: `xgen model setup --max-output-tokens 4096`처럼 출력 예산을 조정하고 compatibility를 다시 검사한다. - `timeout` / `rate_limited`: provider 상태·할당량을 확인하고 재검사한다. 느린 model은 `--inference-timeout SECONDS`로 조정할 수 있다. +기존 profile의 model 교체는 `--name PROFILE --model MODEL_ID`로 지정한다. `PROFILE`과 `MODEL_ID`는 +실제 이름·서버가 광고한 ID로 바꾼다. `xgen model list`는 저장된 profile 목록이며 서버 model 목록은 아니다. +서버 목록을 번호로 다시 고르려면 새로운 profile 이름과 provider로 `model setup`을 실행한다. + 이전 OpenAI profile은 저장된 옵션을 자동으로 바꾸지 않으므로 다음처럼 명시적으로 갱신한다. +아래는 `default` profile 예시이며 다른 이름이면 `--name` 값을 바꾼다. ```bash -xgen model setup --provider openai --response-format json_object --parameter-style openai +xgen model setup --name default --provider openai --response-format json_object --parameter-style openai xgen model check --compatibility ``` diff --git a/docs/development/releasing.md b/docs/development/releasing.md index ae029bd..e0d3156 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -62,7 +62,7 @@ XGEN Intel macOS binary와 installer 검증 범위에는 영향이 없다. Version을 올린 변경을 먼저 PR로 merge한 뒤 main head에 tag를 만든다. `main`에는 직접 push하지 않는다. ```bash -release_version=0.1.0-rc.7 +release_version=0.1.0-rc.8 release_tag="v$release_version" git fetch origin main git tag -a "$release_tag" origin/main -m "XGEN $release_version" diff --git a/docs/getting-started.md b/docs/getting-started.md index eec5b43..2e82f34 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,6 +1,6 @@ # XGEN 설치와 첫 실행 -이 문서는 Developer Preview `v0.1.0-rc.7` release artifact가 게시된 뒤 binary 하나를 설치하고 +이 문서는 Developer Preview `v0.1.0-rc.8` release artifact가 게시된 뒤 binary 하나를 설치하고 OpenAI-compatible model에 연결해 파일 읽기부터 프로젝트 탐색·수정·test/build까지 실행하는 최소 절차다. 현재 preview는 exact `--allow-file`, `--allow-dir` workspace discovery, atomic write/patch와 host-catalogued shell-free @@ -66,7 +66,7 @@ Node.js 22.14 이상이 이미 있는 개발자는 release가 npm에 게시된 설치한다. 설치 중 GitHub download나 source compile을 하지 않는다. ```bash -npm install --global @xgen-ai/cli@0.1.0-rc.7 +npm install --global @xgen-ai/cli@0.1.0-rc.8 xgen --version xgen licenses ``` @@ -81,7 +81,7 @@ Node.js를 설치하고 싶지 않거나 GitHub attestation까지 직접 확인 Installer를 먼저 파일로 받은 뒤 검토·실행한다. Installer는 shell profile이나 user PATH를 자동으로 수정하지 않고 관리자 권한을 요청하지 않는다. 현재 version은 prerelease이므로 stable release만 가리키는 `releases/latest` 대신 아래 exact tag를 사용한다. 후보 version PR의 merge만으로 artifact가 생기지는 -않으므로 GitHub Release에 `v0.1.0-rc.7`가 게시된 것을 확인한 뒤 실행한다. +않으므로 GitHub Release에 `v0.1.0-rc.8`가 게시된 것을 확인한 뒤 실행한다. Linux/macOS: @@ -89,8 +89,8 @@ Linux/macOS: installer=$(mktemp "${TMPDIR:-/tmp}/xgen-installer.XXXXXX") curl -q --proto '=https' --proto-redir '=https' --tlsv1.2 \ --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo "$installer" \ - https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.7/xgen-installer.sh -sh "$installer" --version v0.1.0-rc.7 + https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.8/xgen-installer.sh +sh "$installer" --version v0.1.0-rc.8 rm -f "$installer" export PATH="$HOME/.local/bin:$PATH" ``` @@ -99,9 +99,9 @@ Windows PowerShell: ```powershell $installer = Join-Path ([System.IO.Path]::GetTempPath()) "xgen-installer-$([Guid]::NewGuid().ToString('N')).ps1" -curl.exe -q --proto "=https" --proto-redir "=https" --tlsv1.2 --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo $installer "https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.7/xgen-installer.ps1" +curl.exe -q --proto "=https" --proto-redir "=https" --tlsv1.2 --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo $installer "https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.8/xgen-installer.ps1" if ($LASTEXITCODE -ne 0) { throw "XGEN installer download failed" } -& $installer -Version v0.1.0-rc.7 +& $installer -Version v0.1.0-rc.8 Remove-Item -LiteralPath $installer $env:Path = "$env:LOCALAPPDATA\XGEN\bin;$env:Path" ``` @@ -134,16 +134,16 @@ xgen licenses installer=$(mktemp "${TMPDIR:-/tmp}/xgen-installer.XXXXXX") curl -q --proto '=https' --proto-redir '=https' --tlsv1.2 \ --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo "$installer" \ - https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.7/xgen-installer.sh -sh "$installer" --version v0.1.0-rc.7 + https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.8/xgen-installer.sh +sh "$installer" --version v0.1.0-rc.8 rm -f "$installer" ``` ```powershell $installer = Join-Path ([System.IO.Path]::GetTempPath()) "xgen-installer-$([Guid]::NewGuid().ToString('N')).ps1" -curl.exe -q --proto "=https" --proto-redir "=https" --tlsv1.2 --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo $installer "https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.7/xgen-installer.ps1" +curl.exe -q --proto "=https" --proto-redir "=https" --tlsv1.2 --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSLo $installer "https://github.com/PlateerLab/xgen-cli/releases/download/v0.1.0-rc.8/xgen-installer.ps1" if ($LASTEXITCODE -ne 0) { throw "XGEN installer download failed" } -& $installer -Version v0.1.0-rc.7 +& $installer -Version v0.1.0-rc.8 Remove-Item -LiteralPath $installer ``` @@ -444,7 +444,7 @@ npm 설치본은 새 exact version을 다시 설치해 업데이트한다. `next 가리킬 수 있으므로 파일럿과 장애 재현에는 사용하지 않는다. ```bash -npm install --global --include=optional @xgen-ai/cli@0.1.0-rc.7 +npm install --global --include=optional @xgen-ai/cli@0.1.0-rc.8 xgen --version ``` diff --git a/npm/package-lock.json b/npm/package-lock.json index 88cc7a5..3ab2340 100644 --- a/npm/package-lock.json +++ b/npm/package-lock.json @@ -1,12 +1,12 @@ { "name": "xgen-npm-distribution-workspace", - "version": "0.1.0-rc.7", + "version": "0.1.0-rc.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "xgen-npm-distribution-workspace", - "version": "0.1.0-rc.7", + "version": "0.1.0-rc.8", "devDependencies": { "semver": "7.8.6" }, diff --git a/npm/package.json b/npm/package.json index e2162b6..a8a17ba 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "xgen-npm-distribution-workspace", - "version": "0.1.0-rc.7", + "version": "0.1.0-rc.8", "private": true, "type": "module", "packageManager": "npm@11.19.0", diff --git a/npm/packages/cli/README.md b/npm/packages/cli/README.md index 15f2c07..3860904 100644 --- a/npm/packages/cli/README.md +++ b/npm/packages/cli/README.md @@ -12,7 +12,7 @@ xgen 첫 실행에서 provider, 숨김 API key와 model을 선택하면 연결을 검증하고 설정을 저장해. 최초 stable 게시 전까지 기본 설치는 검증된 최신 preview를 가리키고, 그 뒤에는 stable을 따라. -Preview 채널은 `@xgen-ai/cli@next`, 고정 설치는 `@xgen-ai/cli@0.1.0-rc.7`이야. +Preview 채널은 `@xgen-ai/cli@next`, 고정 설치는 `@xgen-ai/cli@0.1.0-rc.8`이야. 현재 OS/CPU의 exact-version optional dependency 하나에 담긴 Rust 실행 파일을 사용해. 설치 script, 추가 download, native compile은 없어. `--omit=optional`은 실행 파일을 빼므로 지원하지 않아. diff --git a/npm/packages/cli/package.json b/npm/packages/cli/package.json index c1168c1..980ec8d 100644 --- a/npm/packages/cli/package.json +++ b/npm/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@xgen-ai/cli", - "version": "0.1.0-rc.7", + "version": "0.1.0-rc.8", "description": "Local-first XGEN agent CLI and harness", "license": "Apache-2.0", "repository": { @@ -25,11 +25,11 @@ "LICENSE" ], "optionalDependencies": { - "@xgen-ai/cli-linux-x64-musl": "0.1.0-rc.7", - "@xgen-ai/cli-linux-arm64-musl": "0.1.0-rc.7", - "@xgen-ai/cli-darwin-x64": "0.1.0-rc.7", - "@xgen-ai/cli-darwin-arm64": "0.1.0-rc.7", - "@xgen-ai/cli-win32-x64": "0.1.0-rc.7" + "@xgen-ai/cli-linux-x64-musl": "0.1.0-rc.8", + "@xgen-ai/cli-linux-arm64-musl": "0.1.0-rc.8", + "@xgen-ai/cli-darwin-x64": "0.1.0-rc.8", + "@xgen-ai/cli-darwin-arm64": "0.1.0-rc.8", + "@xgen-ai/cli-win32-x64": "0.1.0-rc.8" }, "publishConfig": { "access": "public", diff --git a/npm/scripts/verify-release.mjs b/npm/scripts/verify-release.mjs index 25cd74e..be6f3a7 100644 --- a/npm/scripts/verify-release.mjs +++ b/npm/scripts/verify-release.mjs @@ -1,5 +1,4 @@ import assert from 'node:assert/strict'; -import semver from 'semver'; import { spawn } from 'node:child_process'; import { createHash } from 'node:crypto'; import { lstat, readFile } from 'node:fs/promises'; @@ -124,7 +123,8 @@ export async function verifyRelease(directory, tag) { const { catalog, launcher, version } = await distributionMetadata(); assert.match(tag, /^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?$/); assert.equal(tag, `v${version}`); - const distTag = semver.prerelease(version) ? 'next' : 'latest'; + // The validated tag grammar excludes build metadata, so only prereleases contain '-'. + const distTag = version.includes('-') ? 'next' : 'latest'; const launcherTarball = path.join(directory, 'xgen-cli.tgz'); const expectedTarballs = [launcherTarball]; for (const specification of catalog.platforms) { diff --git a/npm/tests/assembly-contract.test.mjs b/npm/tests/assembly-contract.test.mjs new file mode 100644 index 0000000..93cfb53 --- /dev/null +++ b/npm/tests/assembly-contract.test.mjs @@ -0,0 +1,33 @@ +import assert from 'node:assert/strict'; +import { spawnSync } from 'node:child_process'; +import { copyFile, mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import test from 'node:test'; + +import { npmRoot } from '../scripts/config.mjs'; + +test('assembly verifier loads from a fresh checkout without npm dependencies', async () => { + const root = await mkdtemp(path.join(os.tmpdir(), 'xgen-assembly-contract-')); + try { + const scripts = path.join(root, 'npm', 'scripts'); + await mkdir(scripts, { recursive: true }); + for (const filename of ['config.mjs', 'verify-release.mjs']) { + await copyFile(path.join(npmRoot, 'scripts', filename), path.join(scripts, filename)); + } + const runner = path.join(root, 'probe.mjs'); + await writeFile(runner, ` + import assert from 'node:assert/strict'; + import { normalizeDryRunReport } from './npm/scripts/verify-release.mjs'; + assert.equal(normalizeDryRunReport({ id: 'fixture@1.0.0' }).id, 'fixture@1.0.0'); + `); + const env = { ...process.env }; + delete env.NODE_PATH; + delete env.NODE_OPTIONS; + const result = spawnSync(process.execPath, [runner], { env, encoding: 'utf8' }); + assert.equal(result.status, 0, result.stderr); + } finally { + // This directory is created above and contains only the copied public sources and probe. + await rm(root, { recursive: true, force: true }); + } +});