fix(devtools): package Codex daemon and use upstream Pi
This commit is contained in:
parent
89bebe5610
commit
037e817b29
9 changed files with 151 additions and 121 deletions
25
packages/codex-package-test.py
Normal file
25
packages/codex-package-test.py
Normal 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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue