18 Commits

Author SHA1 Message Date
Adam Curtis
5f16b6f23c codex: fix MCP transport changes with mutable settings
With mutableSettings, config.toml is merged recursively, so switching a
declared MCP server from command to url kept command and args next to
the new url, and switching back kept url and the HTTP options. Codex
refuses such a server and does not start: "failed to load bootstrap
configuration … url is not supported for stdio in
`
mcp_servers.<name>`".

When a declared server sets url or command, remove the keys that only
the other transport accepts. Keys both transports share, and those
Codex adds, such as tool approvals, are kept.
2026-10-23 10:17:04 -05:00
Aly Raffauf
acd21c5a34 codex: add mutable settings option
Merge declared settings into writable TOML files with mkImpureConfigMerger. Preserve user settings and support transitions between mutable and immutable configurations.

Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
2026-10-02 20:00:54 -05:00
Austin Horstman
d330408f81 codex: avoid IFD for derived paths
Normalize derived skills and hooks during builds, and defer plugin, marketplace, and rule validation outside evaluation.
2026-08-16 19:46:12 -05:00
Austin Horstman
0d33882bd4 codex: support path-backed hooks
Allow path-backed hook bundles to provide both hooks.json and supporting scripts through programs.codex.hooks.
2026-07-06 12:20:20 -05:00
Austin Horstman
d456f483f1 codex: add profile config support
Codex 0.134.0 stopped reading profile settings from [profiles.<name>] in config.toml and no longer supports the top-level profile selector.

Add a dedicated programs.codex.profiles option so Home Manager can write CODEX_HOME/<name>.config.toml files that match the current CLI --profile behavior. For Codex 0.134.0 and later, legacy programs.codex.settings.profiles entries are migrated into profile files with a warning, and removed legacy profile keys are omitted from config.toml so strict config loading keeps working. Older Codex versions keep the legacy config shape.
2026-06-18 08:19:47 -05:00
Pat L.
df4e046571 codex: Add support for installing plugins and marketplaces
Install the referenced plugins into $CONFIG_DIR/plugins and add them to
the marketplace file in `~/.agents/plugins/marketplace.json`. The
plugins are then enabled in `$CONFIG_DIR/config.toml`.

Also add support for custom plugin marketplaces via the `marketplaces`
option. Each marketplace entry is a local directory (or fetched package)
that Codex can browse to discover additional plugins. Marketplaces are
registered in `$CONFIG_DIR/config.toml` under [marketplaces.<name>] with
`source_type = "local"` pointing at the provided path. Setting either
`plugins` or `marketplaces` automatically enables the `features.plugins`
flag in the generated config.

Warn that if a derivation is being used as the source of the plugin, the
name of the derivation needs to match the plugin name in the manifest.
2026-06-16 15:35:13 -05:00
Austin Horstman
d181e6ac2a treewide: support store path strings for skills dirs
Filtered or generated skill directories can evaluate to Nix store path
strings rather than path values. The previous top-level skills handling
only used lib.isPath, so those directory values fell through instead of
being linked or expanded.

Treat store-path strings as path-like for the top-level skills option in
Codex, Claude Code, Gemini CLI, and OpenCode, matching the behavior
already used for individual skill entries. Add NMT coverage for
store-path-string skill directories.
2026-05-01 09:54:56 -05:00
Vinicius Deolindo
447796d64a codex: migrate custom-instructions to context 2026-04-12 10:53:57 -05:00
Austin Horstman
41e6e2ab37 codex: add support for managed rules files 2026-04-01 23:29:17 -05:00
Austin Horstman
b8cb89f2c4 codex: support store-path skill sources
Handle per-skill values that come through as store-path strings, such as fetcher outputs with subdirectories appended. This restores the previously working pattern for packaged skill directories and adds a regression test for both directory and file sources.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-24 12:03:06 -05:00
Austin Horstman
6f2cb27ea6 tests/codex: consolidate tests
Reduce test case setup to cover same logic branches.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-01 09:18:14 -06:00
Austin Horstman
e0bcb05ce9 tests/codex: update skills tests
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-01 09:18:14 -06:00
Austin Horstman
6c8def1df8 codex: add enableMcpIntegration option
Work with the shared mcp module for integration and transformation.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-09 07:14:50 -06:00
Hauke Schnau
f1b5f20210 codex: unify skills option and tests 2026-01-15 15:26:27 -06:00
Hauke Schnau
34a9ab0fae codex: add skills options 2026-01-15 15:26:27 -06:00
Thierry Delafontaine
faa5b42eca codex: support XDG Base Directory specification
- Configuration file is now placed in XDG_CONFIG_HOME/codex/config.toml by default for versions >=0.2.0 when preferXdgDirectories is enabled.
- Falls back to ~/.codex/config.yaml for versions <0.2.0 and to ~/.codex/config.toml when preferXdgDirectories is disabled
- Sets CODEX_HOME environment variable to $XDG_CONFIG_HOME/codex when using XDG directories.
- Updated tests to verify XDG directory behavior and environment variable presence.
2025-08-07 14:04:33 -05:00
Thierry Delafontaine
502d9b7d30 codex: starting with v0.2.0 codex uses a TOML configuration file (#7388)
Updated related settings and test files to reflect the new format.
2025-07-06 08:58:22 -05:00
Thierry Delafontaine
427c96044f codex: init 2025-06-09 22:33:16 -05:00