fix(devtools): package Codex daemon and use upstream Pi

This commit is contained in:
Rasyidan Akbar F. 2026-10-02 19:09:42 +07:00
commit 037e817b29
9 changed files with 151 additions and 121 deletions

View file

@ -0,0 +1,25 @@
"""Check the layout required by Codex daemon provisioning."""
import json
import os
from pathlib import Path
import sys
root = Path(sys.argv[1]).resolve()
version, target = sys.argv[2:]
manifest = json.loads((root / "codex-package.json").read_text())
assert manifest == {
"layoutVersion": 1,
"version": version,
"target": target,
"entrypoint": "bin/codex",
}
required = ["bin/codex", "bin/codex-code-mode-host", "codex-path/rg"]
if "linux" in target:
required.append("codex-resources/bwrap")
for name in required:
path = root / name
assert path.is_file() and os.access(path, os.X_OK), name
for path in root.rglob("*"):
assert path.resolve().is_relative_to(root), f"Escaping link: {path}"
assert not (path.is_symlink() and path.is_dir()), f"Directory link: {path}"
print("Codex package layout checks passed")