Commit Graph
20 Commits
Author SHA1 Message Date
Ryan Ragona ffe7e2277f artial, broken 2025-04-27 12:42:27 -07:00
Ryan Ragona aef7f25302 cleanup 2025-04-27 08:43:44 -07:00
Ryan Ragona 66a2e970f7 humansize 2025-04-27 08:35:21 -07:00
Ryan Ragona 8c672d5442 cuter job names 2025-04-27 07:49:59 -07:00
Ryan Ragona 2420a6a898 clippy 2025-04-26 15:57:49 -07:00
Ryan Ragona 8ed2704191 in progress cleanup 2025-04-26 15:45:09 -07:00
Ryan Ragona 07911ddc3e cleanup pass 2025-04-26 15:34:08 -07:00
Ryan Ragona 96d8d2a37a save session metadata 2025-04-26 14:25:26 -07:00
Ryan Ragona d0e8aa5233 impl kill 2025-04-26 11:20:46 -07:00
Ryan Ragona 9f10ec53b6 remove tui socket stuff 2025-04-26 10:03:24 -07:00
Ryan Ragona f2b7b14284 draft of tui sock 2025-04-26 09:13:57 -07:00
Ryan Ragona 8f8479fd80 add repl subcommand 2025-04-26 08:10:46 -07:00
Ryan Ragona 9aaa947828 numeric prefix 2025-04-26 07:32:26 -07:00
Ryan Ragona 342ac711ca use dot dir 2025-04-26 07:06:20 -07:00
Ryan Ragona b41f26f484 metadata 2025-04-26 07:05:19 -07:00
Ryan Ragona abf0198a49 progress 2025-04-26 06:53:03 -07:00
Ryan Ragona 314d2216cb codex draft 2025-04-26 06:40:39 -07:00
Michael Bolin ebd2ae4abd fix: remove dependency on expanduser crate (#667)
In putting up https://github.com/openai/codex/pull/665, I discovered
that the `expanduser` crate does not compile on Windows. Looking into
it, we do not seem to need it because we were only using it with a value
that was passed in via a command-line flag, so the shell expands `~` for
us before we see it, anyway. (I changed the type in `Cli` from `String`
to `PathBuf`, to boot.)

If we do need this sort of functionality in the future,
https://docs.rs/shellexpand/latest/shellexpand/fn.tilde.html seems
promising.
2025-04-25 14:20:21 -07:00
Michael Bolin 58f0e5ab74 feat: introduce codex_execpolicy crate for defining "safe" commands (#634)
As described in detail in `codex-rs/execpolicy/README.md` introduced in
this PR, `execpolicy` is a tool that lets you define a set of _patterns_
used to match [`execv(3)`](https://linux.die.net/man/3/execv)
invocations. When a pattern is matched, `execpolicy` returns the parsed
version in a structured form that is amenable to static analysis.

The primary use case is to define patterns match commands that should be
auto-approved by a tool such as Codex. This supports a richer pattern
matching mechanism that the sort of prefix-matching we have done to
date, e.g.:


https://github.com/openai/codex/blob/5e40d9d2211737f46136610497bcd9a8271009e0/codex-cli/src/approvals.ts#L333-L354

Note we are still playing with the API and the `system_path` option in
particular still needs some work.
2025-04-24 17:14:47 -07:00
Michael Bolin 31d0d7a305 feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629)
As stated in `codex-rs/README.md`:

Today, Codex CLI is written in TypeScript and requires Node.js 22+ to
run it. For a number of users, this runtime requirement inhibits
adoption: they would be better served by a standalone executable. As
maintainers, we want Codex to run efficiently in a wide range of
environments with minimal overhead. We also want to take advantage of
operating system-specific APIs to provide better sandboxing, where
possible.

To that end, we are moving forward with a Rust implementation of Codex
CLI contained in this folder, which has the following benefits:

- The CLI compiles to small, standalone, platform-specific binaries.
- Can make direct, native calls to
[seccomp](https://man7.org/linux/man-pages/man2/seccomp.2.html) and
[landlock](https://man7.org/linux/man-pages/man7/landlock.7.html) in
order to support sandboxing on Linux.
- No runtime garbage collection, resulting in lower memory consumption
and better, more predictable performance.

Currently, the Rust implementation is materially behind the TypeScript
implementation in functionality, so continue to use the TypeScript
implmentation for the time being. We will publish native executables via
GitHub Releases as soon as we feel the Rust version is usable.
2025-04-24 13:31:40 -07:00