Skip to content

sagemathinc/codex-cocalc

Repository files navigation

codex-cocalc

Small builder to produce codex binaries with a CoCalc-specific patch that enriches file_change events (adds pre_contents) for JSONL output from codex exec.

What it does

  • Clones the upstream codex repo at a tag (default rust-v0.76.0).
  • Applies a minimal patch to codex exec JSONL output so file_change events include the original file contents (per path) after a patch apply. This lets downstream tools show diffs/patchflow without re-reading files at event time.
  • Builds codex-cli (and related binaries) and places them in dist/.

Usage (manual)

TAG=rust-v0.76.0 ./build.sh
ls dist/

GitHub Actions

A workflow (.github/workflows/build.yml) runs ./build.sh and uploads the built binaries as an artifact (codex-cocalc-binaries).

Patch files

  • file_change_pre_contents.patch: extends FileChangeItem with optional pre_contents.
  • event_processor_with_jsonl_output.patch: captures pre-contents at patch begin and emits them in the file_change item.

Notes

  • Changes are minimal and upstream-friendly; if upstream changes break the patch, adjust the patch files and rerun.
  • Binaries are suitable for per-project containers or local use (cocalc-plus).

About

Build a slightly forked version of upstream codex-cli for use in cocalc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages