@codex-native/sdk 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@codex-native/linux-arm64-gnu",
3
- "version": "0.0.1",
2
+ "name": "@codex-native/sdk-linux-arm64-gnu",
3
+ "version": "0.0.3",
4
4
  "cpu": [
5
5
  "arm64"
6
6
  ],
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "codex_native.linux-arm64-gnu.node"
10
10
  ],
11
- "description": "Native bindings that bridge Codex CLI into the JavaScript SDK.",
11
+ "description": "Native NAPI-based Codex SDK - complete standalone implementation.",
12
12
  "engines": {
13
13
  "node": ">=18"
14
14
  },
@@ -1,3 +1,3 @@
1
- # `@openai/codex-native-linux-arm64-musl`
1
+ # `@codex-native/sdk-linux-arm64-musl`
2
2
 
3
- This is the **aarch64-unknown-linux-musl** binary for `@openai/codex-native`
3
+ This is the **aarch64-unknown-linux-musl** binary for `@codex-native/sdk`
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@codex-native/linux-arm64-musl",
3
- "version": "0.0.1",
2
+ "name": "@codex-native/sdk-linux-arm64-musl",
3
+ "version": "0.0.3",
4
4
  "cpu": [
5
5
  "arm64"
6
6
  ],
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "codex_native.linux-arm64-musl.node"
10
10
  ],
11
- "description": "Native bindings that bridge Codex CLI into the JavaScript SDK.",
11
+ "description": "Native NAPI-based Codex SDK - complete standalone implementation.",
12
12
  "engines": {
13
13
  "node": ">=18"
14
14
  },
@@ -1,3 +1,3 @@
1
- # `@openai/codex-native-linux-x64-gnu`
1
+ # `@codex-native/sdk-linux-x64-gnu`
2
2
 
3
- This is the **x86_64-unknown-linux-gnu** binary for `@openai/codex-native`
3
+ This is the **x86_64-unknown-linux-gnu** binary for `@codex-native/sdk`
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@codex-native/linux-x64-gnu",
3
- "version": "0.0.1",
2
+ "name": "@codex-native/sdk-linux-x64-gnu",
3
+ "version": "0.0.3",
4
4
  "cpu": [
5
5
  "x64"
6
6
  ],
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "codex_native.linux-x64-gnu.node"
10
10
  ],
11
- "description": "Native bindings that bridge Codex CLI into the JavaScript SDK.",
11
+ "description": "Native NAPI-based Codex SDK - complete standalone implementation.",
12
12
  "engines": {
13
13
  "node": ">=18"
14
14
  },
@@ -1,3 +1,3 @@
1
- # `@openai/codex-native-linux-x64-musl`
1
+ # `@codex-native/sdk-linux-x64-musl`
2
2
 
3
- This is the **x86_64-unknown-linux-musl** binary for `@openai/codex-native`
3
+ This is the **x86_64-unknown-linux-musl** binary for `@codex-native/sdk`
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@codex-native/linux-x64-musl",
3
- "version": "0.0.1",
2
+ "name": "@codex-native/sdk-linux-x64-musl",
3
+ "version": "0.0.3",
4
4
  "cpu": [
5
5
  "x64"
6
6
  ],
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "codex_native.linux-x64-musl.node"
10
10
  ],
11
- "description": "Native bindings that bridge Codex CLI into the JavaScript SDK.",
11
+ "description": "Native NAPI-based Codex SDK - complete standalone implementation.",
12
12
  "engines": {
13
13
  "node": ">=18"
14
14
  },
@@ -1,3 +1,3 @@
1
- # `@openai/codex-native-win32-arm64-msvc`
1
+ # `@codex-native/sdk-win32-arm64-msvc`
2
2
 
3
- This is the **aarch64-pc-windows-msvc** binary for `@openai/codex-native`
3
+ This is the **aarch64-pc-windows-msvc** binary for `@codex-native/sdk`
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@codex-native/win32-arm64-msvc",
3
- "version": "0.0.1",
2
+ "name": "@codex-native/sdk-win32-arm64-msvc",
3
+ "version": "0.0.3",
4
4
  "cpu": [
5
5
  "arm64"
6
6
  ],
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "codex_native.win32-arm64-msvc.node"
10
10
  ],
11
- "description": "Native bindings that bridge Codex CLI into the JavaScript SDK.",
11
+ "description": "Native NAPI-based Codex SDK - complete standalone implementation.",
12
12
  "engines": {
13
13
  "node": ">=18"
14
14
  },
@@ -1,3 +1,3 @@
1
- # `@openai/codex-native-win32-x64-msvc`
1
+ # `@codex-native/sdk-win32-x64-msvc`
2
2
 
3
- This is the **x86_64-pc-windows-msvc** binary for `@openai/codex-native`
3
+ This is the **x86_64-pc-windows-msvc** binary for `@codex-native/sdk`
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@codex-native/win32-x64-msvc",
3
- "version": "0.0.1",
2
+ "name": "@codex-native/sdk-win32-x64-msvc",
3
+ "version": "0.0.3",
4
4
  "cpu": [
5
5
  "x64"
6
6
  ],
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "codex_native.win32-x64-msvc.node"
10
10
  ],
11
- "description": "Native bindings that bridge Codex CLI into the JavaScript SDK.",
11
+ "description": "Native NAPI-based Codex SDK - complete standalone implementation.",
12
12
  "engines": {
13
13
  "node": ">=18"
14
14
  },
package/package.json CHANGED
@@ -1,33 +1,64 @@
1
1
  {
2
2
  "name": "@codex-native/sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Native NAPI-based Codex SDK - complete standalone implementation.",
5
- "main": "dist/index.js",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
6
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
15
+ "bin": {
16
+ "codex-native": "dist/cli.cjs"
17
+ },
7
18
  "files": [
8
19
  "dist",
9
20
  "README.md",
10
21
  "npm",
11
- "*.node"
22
+ "*.node",
23
+ "index.js",
24
+ "index.d.ts"
12
25
  ],
26
+ "dependencies": {
27
+ "@modelcontextprotocol/sdk": "^1.22.0",
28
+ "@opencode-ai/sdk": "^1.0.68",
29
+ "@toon-format/toon": "^1.0.0",
30
+ "pyright": "^1.1.386",
31
+ "typescript-language-server": "^4.3.3",
32
+ "vscode-jsonrpc": "^8.2.1",
33
+ "vscode-languageserver-types": "^3.17.5"
34
+ },
13
35
  "scripts": {
14
- "build": "npm run build:napi && npm run build:ts",
15
- "build:napi": "napi build --platform --release",
16
- "build:napi:debug": "napi build --platform",
36
+ "clean": "rm -rf dist *.node npm target/release/*.node && cargo clean --release",
37
+ "clean:all": "rm -rf dist *.node npm target node_modules && cargo clean",
38
+ "build": "npm run build:rust && npm run build:napi && npm run build:ts && npm run verify:build",
39
+ "build:ci": "npm run build:napi && npm run build:ts && npm run verify:build",
40
+ "build:rust": "cargo fmt && cargo clippy --release --features napi-bindings -- -D warnings",
41
+ "build:napi": "napi build --platform --release --features napi-bindings",
42
+ "build:napi:debug": "napi build --platform --features napi-bindings",
17
43
  "build:ts": "tsup",
44
+ "verify:build": "node -e \"const fs=require('fs');const hasNode=fs.readdirSync('.').some(f=>f.endsWith('.node'));const hasDist=fs.existsSync('dist/index.mjs')&&fs.existsSync('dist/index.d.ts');const hasLoader=fs.existsSync('index.js');if(!hasNode||!hasDist||!hasLoader){console.error('Build incomplete: missing .node, dist, or loader index.js');process.exit(1)}require('./index.js');console.log('✓ Build verification passed')\"",
45
+ "verify:pack": "node ./scripts/verify-pack.mjs",
18
46
  "create-npm-dirs": "napi create-npm-dirs",
19
47
  "artifacts": "napi artifacts",
20
48
  "prepublishOnly": "napi prepublish -t npm",
21
- "pretest": "npm run build:ts",
22
- "test": "NODE_OPTIONS=--experimental-vm-modules jest",
23
- "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
24
- "coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
49
+ "pretest": "node -e \"const fs=require('fs');const hasNode=fs.readdirSync('.').some(f=>f.endsWith('.node'));if(!hasNode){process.exitCode=1;console.error('missing .node binary; run npm run build:ci');} else {console.log('✓ native binary present; skipping rebuild');}\"",
50
+ "test": "node ./scripts/run-jest.mjs --runInBand",
51
+ "test:watch": "node ./scripts/run-jest.mjs --watch",
52
+ "coverage": "node ./scripts/run-jest.mjs --coverage",
53
+ "typecheck": "tsc --noEmit",
54
+ "lint": "cargo fmt --check && cargo clippy --release --features napi-bindings -- -D warnings && npm run typecheck",
25
55
  "version": "napi version",
26
56
  "release:patch": "npm version patch && npm run release",
27
57
  "release:minor": "npm version minor && npm run release",
28
58
  "release:major": "npm version major && npm run release",
29
- "release": "npm run build && npm run test && npm publish",
30
- "release:dry": "npm run build && npm run test && npm publish --dry-run"
59
+ "publish:platforms": "npm run create-npm-dirs && node scripts/publish-platform-packages.mjs",
60
+ "release": "npm run build && npm run test && npm run verify:pack && npm run publish:platforms && node scripts/publish-sdk.mjs",
61
+ "release:dry": "npm run build && npm run test && npm run verify:pack && npm publish --dry-run"
31
62
  },
32
63
  "napi": {
33
64
  "binaryName": "codex_native",
@@ -43,14 +74,14 @@
43
74
  ]
44
75
  },
45
76
  "optionalDependencies": {
46
- "@codex-native/sdk-darwin-arm64": "0.0.1",
47
- "@codex-native/sdk-darwin-x64": "0.0.1",
48
- "@codex-native/sdk-linux-arm64-gnu": "0.0.1",
49
- "@codex-native/sdk-linux-x64-gnu": "0.0.1",
50
- "@codex-native/sdk-linux-arm64-musl": "0.0.1",
51
- "@codex-native/sdk-linux-x64-musl": "0.0.1",
52
- "@codex-native/sdk-win32-arm64-msvc": "0.0.1",
53
- "@codex-native/sdk-win32-x64-msvc": "0.0.1"
77
+ "@codex-native/sdk-darwin-arm64": "0.0.3",
78
+ "@codex-native/sdk-darwin-x64": "0.0.3",
79
+ "@codex-native/sdk-linux-arm64-gnu": "0.0.3",
80
+ "@codex-native/sdk-linux-x64-gnu": "0.0.3",
81
+ "@codex-native/sdk-linux-arm64-musl": "0.0.3",
82
+ "@codex-native/sdk-linux-x64-musl": "0.0.3",
83
+ "@codex-native/sdk-win32-arm64-msvc": "0.0.3",
84
+ "@codex-native/sdk-win32-x64-msvc": "0.0.3"
54
85
  },
55
86
  "engines": {
56
87
  "node": ">=18"
@@ -59,12 +90,20 @@
59
90
  "access": "public"
60
91
  },
61
92
  "devDependencies": {
93
+ "@babel/core": "7.25.2",
94
+ "@babel/preset-env": "7.25.4",
95
+ "@babel/preset-typescript": "7.28.5",
62
96
  "@jest/globals": "^29.7.0",
63
97
  "@napi-rs/cli": "^3.4.1",
64
- "@openai/agents": "^0.2.1",
98
+ "@openai/agents": "^0.3.0",
99
+ "@types/jest": "29.5.11",
65
100
  "@types/node": "^22.0.0",
101
+ "babel-jest": "29.7.0",
66
102
  "jest": "^29.7.0",
103
+ "ts-jest": "^29.1.1",
67
104
  "tsup": "^8.5.0",
68
- "typescript": "^5.7.2"
105
+ "tsx": "^4.20.6",
106
+ "typescript": "^5.7.2",
107
+ "zod": "^3.25.76"
69
108
  }
70
109
  }