샘플
@openai/codex 0.149.1
검증된 샘플 — npm @openai/codex 0.149.1. node 22 · linux debian/x64 · docker에서 contract를 실행해 통과했습니다: @openai/codex package manifest defines version 0.149.1 and…
sha256:a53be5ed5f64af28895f1d9f20d7e3b214d8a4865540732bc6bd22d735dac946
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 2
- 빌드한 서명 키
- 1
선언된 환경
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | SKIPPED | compile:SKIPPED · contract:SKIPPED · load:SKIPPED · resolve:FAIL CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-08 |
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-08 |
케이스
HOW- 목표
- verify pkg:npm/%40openai/codex@0.149.1
- 환경
- node 22.23.2
- 생성일
- 2026-09-07T16:39:03Z
컨트랙트
- @openai/codex package manifest defines version 0.149.1 and executable bin mapping for codex
- direct import of @openai/codex fails confirming CLI distribution without library export
- executing codex CLI with --version flag prints codex-cli version matching 0.149.1
- executing codex CLI with --help flag displays usage options and subcommand reference
파일
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.js
- test/contract.mjs
소스
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:npm/%40openai/codex@0.149.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40openai/codex@0.149.1
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:c7628393cab5d1ec7d8126f5648bf242aaecdbdd324b8594a1fe6e1fbe6b508b","contract":["@openai/codex package manifest defines version 0.149.1 and executable bin mapping for codex","direct import of @openai/codex fails confirming CLI distribution without library export","executing codex CLI with --version flag prints codex-cli version matching 0.149.1","executing codex CLI with --help flag displays usage options and subcommand reference"],"goal":"verify pkg:npm/%40openai/codex@0.149.1","kind":"HOW","packages":["pkg:npm/%40openai/codex@0.149.1"],"schemaVersion":1},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"cjs","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40openai/codex@0.149.1"],"schemaVersion":1,"subject":"pkg:npm/%40openai/codex@0.149.1","verifierAdapter":"node-typescript@1"}
{
"name": "sample-openai-codex",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-openai-codex",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@openai/codex": "0.149.1"
}
},
"node_modules/@openai/codex": {
"version": "0.149.1",
"resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.1.tgz",
"integrity": "sha512-6q5pbcpFbJbqOpkubSDBwXmktQ55aD8eUzGzBF1zASob2DjwhBKDSNGtdZKalfrNJUdTDTPDMmzCXEXs5tMBYA==",
"license": "Apache-2.0",
"bin": {
"codex": "bin/codex.js"
},
"engines": {
"node": ">=16"
},
"optionalDependencies": {
"@openai/codex-darwin-arm64": "npm:@openai/codex@0.149.1-darwin-arm64",
"@openai/codex-darwin-x64": "npm:@openai/codex@0.149.1-darwin-x64",
"@openai/codex-linux-arm64": "npm:@openai/codex@0.149.1-linux-arm64",
"@openai/codex-linux-x64": "npm:@openai/codex@0.149.1-linux-x64",
"@openai/codex-win32-arm64": "npm:@openai/codex@0.149.1-win32-arm64",
"@openai/codex-win32-x64": "npm:@openai/codex@0.149.1-win32-x64"
}
},
"node_modules/@openai/codex-darwin-arm64": {
"name": "@openai/codex",
"version": "0.149.1-darwin-arm64",
"resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.1-darwin-arm64.tgz",
"integrity": "sha512-6X84kTCbnTgPIJ2EdcPsrvwS0Wxsqpa+bCswGmRf4BjhcQ5nPMnBC6yCAaCMj+vrbXQHj+L6sa9FaR4QkmA1qw==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=16"
}
},
"node_modules/@openai/codex-darwin-x64": {
"name": "@openai/codex",
"version": "0.149.1-darwin-x64",
"resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.1-darwin-x64.tgz",
"integrity": "sha512-MfLBQLfcElJL9tvj6y45qVHHMGSXCPnQOixuD3/Zq0g1BW/eFizkrGLdn48cFpc+l8cK+gt5nYG5pQYwVs6g4A==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=16"
}
},
"node_modules/@openai/codex-linux-arm64": {
"name": "@openai/codex",
"version": "0.149.1-linux-arm64",
"resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.1-linux-arm64.tgz",
"integrity": "sha512-OqxUfZ1TVvHd18zHPKK/8ZRlpk8Vy11mg5CMHaLxNWldTbwVImDKtSLWT+m8m4NM5Sz4PbjtZMrVT/RfpBW/mQ==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=16"
}
},
"node_modules/@openai/codex-linux-x64": {
"name": "@openai/codex",
"version": "0.149.1-linux-x64",
"resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.1-linux-x64.tgz",
"integrity": "sha512-Of5fGYgr7tAMsyj6vhXb4/RM/UoA3Zq8BLegUBDC09UNy1XTLGYP/2XD+UX8z3qh0NDwxYdCjFIWdDNijKZggQ==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=16"
}
},
"node_modules/@openai/codex-win32-arm64": {
"name": "@openai/codex",
"version": "0.149.1-win32-arm64",
"resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.1-win32-arm64.tgz",
"integrity": "sha512-5K0DmOKGK9Bos627p8sK8ATHjovPK0sDyT6h9Cb+4v+5CW5SGw1HLgjGxoLfJ8g3cg6mtg/pRCXXo2L/j71UVA==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=16"
}
},
"node_modules/@openai/codex-win32-x64": {
"name": "@openai/codex",
"version": "0.149.1-win32-x64",
"resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.1-win32-x64.tgz",
"integrity": "sha512-G3QXGAg7nyyhqOeooAMUekBCeHd8a1QByhKcVAFyzNBaI06t6Ft7nsF+1SzFS0spuIdU4YyMi5YD26ukADBQUQ==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=16"
}
}
}
}
{
"name": "sample-openai-codex",
"version": "1.0.0",
"private": true,
"description": "verify pkg:npm/%40openai/codex@0.149.1",
"main": "src/index.js",
"license": "MIT-0",
"dependencies": {
"@openai/codex": "0.149.1"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/%40openai/codex@0.149.1",
"kind": "HOW",
"packages": [
"pkg:npm/%40openai/codex@0.149.1"
]
}
const { execFileSync } = require('node:child_process');
const fs = require('node:fs');
const path = require('node:path');
/**
* Reads and returns the package.json manifest of the installed @openai/codex package.
* @returns {object} The parsed package.json object.
*/
function getPackageManifest() {
const manifestPath = require.resolve('@openai/codex/package.json');
const content = fs.readFileSync(manifestPath, 'utf8');
return JSON.parse(content);
}
/**
* Resolves the path to the codex binary entry script.
* @returns {string} Absolute path to bin/codex.js.
*/
function getCodexBinPath() {
const manifest = getPackageManifest();
const manifestDir = path.dirname(require.resolve('@openai/codex/package.json'));
const binRelative = manifest.bin && manifest.bin.codex ? manifest.bin.codex : 'bin/codex.js';
return path.resolve(manifestDir, binRelative);
}
/**
* Runs the codex CLI with the specified arguments and returns stdout as a string.
* @param {string[]} args Array of command-line arguments to pass to codex.
* @returns {string} The standard output from the execution.
*/
function runCodex(args = []) {
const binPath = getCodexBinPath();
return execFileSync(process.execPath, [binPath, ...args], {
encoding: 'utf8',
env: { ...process.env },
});
}
/**
* Gets the version string reported by `codex --version`.
* @returns {string} Trimmed version output (e.g. "codex-cli 0.149.1").
*/
function getCodexVersion() {
return runCodex(['--version']).trim();
}
/**
* Gets the help text reported by `codex --help`.
* @returns {string} Help output from codex.
*/
function getCodexHelp() {
return runCodex(['--help']);
}
module.exports = {
getPackageManifest,
getCodexBinPath,
runCodex,
getCodexVersion,
getCodexHelp,
};
import assert from 'node:assert';
import { createRequire } from 'node:module';
import fs from 'node:fs';
const require = createRequire(import.meta.url);
const {
getPackageManifest,
getCodexBinPath,
runCodex,
getCodexVersion,
getCodexHelp,
} = require('../src/index.js');
// 1. @openai/codex package manifest defines version 0.149.1 and executable bin mapping for codex
const manifest = getPackageManifest();
assert.strictEqual(manifest.name, '@openai/codex', 'package name must be @openai/codex');
assert.strictEqual(manifest.version, '0.149.1', 'package version must be 0.149.1');
assert.ok(manifest.bin && typeof manifest.bin.codex === 'string', 'bin.codex must be defined');
assert.strictEqual(manifest.bin.codex, 'bin/codex.js', 'bin.codex must point to bin/codex.js');
const binPath = getCodexBinPath();
assert.ok(fs.existsSync(binPath), 'codex bin script file must exist on disk');
// 2. direct import of @openai/codex fails confirming CLI distribution without library export
assert.throws(
() => {
require('@openai/codex');
},
{
code: 'MODULE_NOT_FOUND',
},
'direct require of @openai/codex should fail with MODULE_NOT_FOUND'
);
// 3. executing codex CLI with --version flag prints codex-cli version matching 0.149.1
const versionOutput = getCodexVersion();
assert.strictEqual(versionOutput, 'codex-cli 0.149.1', 'version output must match codex-cli 0.149.1');
// 4. executing codex CLI with --help flag displays usage options and subcommand reference
const helpOutput = getCodexHelp();
assert.ok(helpOutput.includes('Usage: codex [OPTIONS]'), 'help output must contain Usage: codex');
assert.ok(helpOutput.includes('--version'), 'help output must document --version');
assert.ok(helpOutput.includes('--help'), 'help output must document --help');
console.log('All contract tests passed.');
오리진 시더
익명