Commit Graph

11364 Commits

Author SHA1 Message Date
Michael Bolin
c75c3ab31a core: support dynamic auth tokens for model providers 2026-03-30 13:59:49 -07:00
Michael Bolin
65a3e63f1c core: unify request auth and 401 recovery plumbing 2026-03-30 13:59:49 -07:00
Michael Bolin
47954f929e merge commit for archive created by Sapling 2026-03-30 13:59:22 -07:00
Michael Bolin
46c6201955 core: support dynamic auth tokens for model providers 2026-03-30 13:59:02 -07:00
Michael Bolin
99f4516bac core: unify request auth and 401 recovery plumbing 2026-03-30 13:59:02 -07:00
Michael Bolin
a18f9c883f Merge bcacd8dc8a into sapling-pr-archive-bolinfest 2026-03-30 13:50:09 -07:00
Michael Bolin
bcacd8dc8a core: support dynamic auth tokens for model providers 2026-03-30 13:49:43 -07:00
Michael Bolin
74fb048777 core: unify request auth and 401 recovery plumbing 2026-03-30 13:49:13 -07:00
Michael Bolin
dd2520cd06 merge commit for archive created by Sapling 2026-03-30 13:20:36 -07:00
Michael Bolin
807527f9e7 core: support dynamic auth tokens for model providers 2026-03-30 13:20:28 -07:00
Michael Bolin
1ac9b70fd4 merge commit for archive created by Sapling 2026-03-30 12:47:07 -07:00
Michael Bolin
f0677065e2 add support for dynamic auth token for model provider 2026-03-30 12:46:44 -07:00
Michael Bolin
da3f36bca7 Merge be08ad0e4b into sapling-pr-archive-bolinfest 2026-03-30 12:13:13 -07:00
Michael Bolin
be08ad0e4b add support for dynamic auth token for model provider 2026-03-30 12:13:05 -07:00
Michael Bolin
9313c49e4c fix: close Bazel argument-comment-lint CI gaps (#16253)
## Why

The Bazel-backed `argument-comment-lint` CI path had two gaps:

- Bazel wildcard target expansion skipped inline unit-test crates from
`src/` modules because the generated `*-unit-tests-bin` `rust_test`
targets are tagged `manual`.
- `argument-comment-mismatch` was still only a warning in the Bazel and
packaged-wrapper entrypoints, so a typoed `/*param_name*/` comment could
still pass CI even when the lint detected it.

That left CI blind to real linux-sandbox examples, including the missing
`/*local_port*/` comment in
`codex-rs/linux-sandbox/src/proxy_routing.rs` and typoed argument
comments in `codex-rs/linux-sandbox/src/landlock.rs`.

## What Changed

- Added `tools/argument-comment-lint/list-bazel-targets.sh` so Bazel
lint runs cover `//codex-rs/...` plus the manual `rust_test`
`*-unit-tests-bin` targets.
- Updated `just argument-comment-lint`, `rust-ci.yml`, and
`rust-ci-full.yml` to use that helper.
- Promoted both `argument-comment-mismatch` and
`uncommented-anonymous-literal-argument` to errors in every strict
entrypoint:
  - `tools/argument-comment-lint/lint_aspect.bzl`
  - `tools/argument-comment-lint/src/bin/argument-comment-lint.rs`
  - `tools/argument-comment-lint/wrapper_common.py`
- Added wrapper/bin coverage for the stricter lint flags and documented
the behavior in `tools/argument-comment-lint/README.md`.
- Fixed the now-covered callsites in
`codex-rs/linux-sandbox/src/proxy_routing.rs`,
`codex-rs/linux-sandbox/src/landlock.rs`, and
`codex-rs/core/src/shell_snapshot_tests.rs`.

This keeps the Bazel target expansion narrow while making the Bazel and
prebuilt-linter paths enforce the same strict lint set.

## Verification

- `python3 -m unittest discover -s tools/argument-comment-lint -p
'test_*.py'`
- `cargo +nightly-2025-09-18 test --manifest-path
tools/argument-comment-lint/Cargo.toml`
- `just argument-comment-lint`
2026-03-30 11:59:50 -07:00
Michael Bolin
0822eddb34 merge commit for archive created by Sapling 2026-03-30 11:40:57 -07:00
Michael Bolin
cb2f809c0a fix: address coverage gap in argument-comment-lint 2026-03-30 11:40:51 -07:00
Michael Bolin
0532d91efd merge commit for archive created by Sapling 2026-03-30 11:35:59 -07:00
Michael Bolin
172ae48e90 fix: address coverage gap in argument-comment-lint 2026-03-30 11:35:53 -07:00
Michael Bolin
68935eaae7 merge commit for archive created by Sapling 2026-03-30 11:11:02 -07:00
Michael Bolin
481dcac051 fix: address coverage gap in argument-comment-lint 2026-03-30 11:10:52 -07:00
Michael Bolin
f56789fd70 Merge 81ac8343be into sapling-pr-archive-bolinfest 2026-03-30 10:57:25 -07:00
Michael Bolin
81ac8343be fix: address coverage gap in argument-comment-lint 2026-03-30 10:57:21 -07:00
Michael Bolin
258ba436f1 codex-tools: extract discoverable tool models (#16254)
## Why

`#16193` moved the pure `tool_search` and `tool_suggest` spec builders
into `codex-tools`, but `codex-core` still owned the shared
discoverable-tool model that those builders and the `tool_suggest`
runtime both depend on. This change continues the migration by moving
that reusable model boundary out of `codex-core` as well, so the
discovery/suggestion stack uses one shared set of types and
`core/src/tools` no longer needs its own `discoverable.rs` module.

## What changed

- Moved `DiscoverableTool`, `DiscoverablePluginInfo`, and
`filter_tool_suggest_discoverable_tools_for_client()` into
`codex-rs/tools/src/tool_discovery.rs` alongside the extracted
discovery/suggestion spec builders.
- Added `codex-app-server-protocol` as a `codex-tools` dependency so the
shared discoverable-tool model can own the connector-side `AppInfo`
variant directly.
- Updated `core/src/tools/handlers/tool_suggest.rs`,
`core/src/tools/spec.rs`, `core/src/tools/router.rs`,
`core/src/connectors.rs`, and `core/src/codex.rs` to consume the shared
`codex-tools` model instead of the old core-local declarations.
- Changed `core/src/plugins/discoverable.rs` to return
`DiscoverablePluginInfo` directly, moved the pure client-filter coverage
into `tool_discovery_tests.rs`, and deleted the old
`core/src/tools/discoverable.rs` module.
- Updated `codex-rs/tools/README.md` so the crate boundary documents
that `codex-tools` now owns the discoverable-tool models in addition to
the discovery/suggestion spec builders.

## Test plan

- `cargo test -p codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-discoverable-model cargo test -p
codex-core --lib tools::handlers::tool_suggest::`
- `CARGO_TARGET_DIR=/tmp/codex-core-discoverable-model cargo test -p
codex-core --lib tools::spec::`
- `CARGO_TARGET_DIR=/tmp/codex-core-discoverable-model cargo test -p
codex-core --lib plugins::discoverable::`
- `just bazel-lock-check`
- `just argument-comment-lint`

## References

- #16193
- #16154
- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
- #16132
- #16138
- #16141
2026-03-30 10:48:49 -07:00
Michael Bolin
72e2ebb96b merge commit for archive created by Sapling 2026-03-30 10:46:55 -07:00
Michael Bolin
ed35242bd3 fix: address coverage gap in argument-comment-lint 2026-03-30 10:46:48 -07:00
Michael Bolin
8cdd2027d4 merge commit for archive created by Sapling 2026-03-30 10:40:01 -07:00
Michael Bolin
8928ca61a3 fix: address coverage gap in argument-comment-lint 2026-03-30 10:39:51 -07:00
Michael Bolin
ad5b400f9d Merge 3062345125 into sapling-pr-archive-bolinfest 2026-03-30 10:25:46 -07:00
Michael Bolin
3062345125 fix: address coverage gap in argument-comment-lint 2026-03-30 10:25:42 -07:00
Michael Bolin
45a651e880 Merge fc496ed698 into sapling-pr-archive-bolinfest 2026-03-30 08:58:57 -07:00
Michael Bolin
d309430f49 Merge 7791ad5c24 into sapling-pr-archive-bolinfest 2026-03-30 08:57:24 -07:00
Michael Bolin
7791ad5c24 fix: address coverage gap in argument-comment-lint 2026-03-30 08:57:16 -07:00
Michael Bolin
fe63844e42 Merge 8423981666 into sapling-pr-archive-bolinfest 2026-03-30 08:50:40 -07:00
Michael Bolin
8423981666 fix: address coverage gap in argument-comment-lint 2026-03-30 08:50:31 -07:00
Michael Bolin
fc496ed698 codex-tools: extract discoverable tool models 2026-03-30 08:42:23 -07:00
Michael Bolin
716f7b0428 codex-tools: extract discovery tool specs (#16193)
## Why

`core/src/tools/spec.rs` still owned the pure `tool_search` and
`tool_suggest` spec builders even though that logic no longer needed
`codex-core` runtime state. This change continues the `codex-tools`
migration by moving the reusable discovery and suggestion spec
construction out of `codex-core` so `spec.rs` is left with the
core-owned policy decisions about when these tools are exposed and what
metadata is available.

## What changed

- Added `codex-rs/tools/src/tool_discovery.rs` with the shared
`tool_search` and `tool_suggest` spec builders, plus focused unit tests
in `tool_discovery_tests.rs`.
- Moved the shared `DiscoverableToolAction` and `DiscoverableToolType`
declarations into `codex-tools` so the `tool_suggest` handler and the
extracted spec builders use the same wire-model enums.
- Updated `core/src/tools/spec.rs` to translate `ToolInfo` and
`DiscoverableTool` values into neutral `codex-tools` inputs and delegate
the actual spec building there.
- Removed the old template-based description rendering helpers from
`core/src/tools/spec.rs` and deleted the now-dead helper methods in
`core/src/tools/discoverable.rs`.
- Updated `codex-rs/tools/README.md` to document that discovery and
suggestion models/spec builders now live in `codex-tools`.

## Test plan

- `cargo test -p codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-discovery-specs cargo test -p
codex-core --lib tools::spec::`
- `CARGO_TARGET_DIR=/tmp/codex-core-discovery-specs cargo test -p
codex-core --lib tools::handlers::tool_suggest::`
- `just argument-comment-lint`

## References

- #16154
- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
- #16132
- #16138
- #16141
2026-03-30 08:15:12 -07:00
jif-oai
c74190a622 fix: ma1 (#16237) 2026-03-30 15:42:17 +02:00
jif-oai
213756c9ab feat: add mailbox concept for wait (#16010)
Add a mailbox we can use for inter-agent communication
`wait` is now based on it and don't take target anymore
2026-03-30 11:47:20 +02:00
Eric Traut
bb95ec3ec6 [codex] Normalize Windows path in MCP startup snapshot test (#16204)
## Summary
A Windows-only snapshot assertion in the app-server MCP startup warning
test compared the raw rendered path, so CI saw `C:\tmp\project` instead
of the normalized `/tmp/project` snapshot fixture.

## Fix
Route that snapshot assertion through the existing
`normalize_snapshot_paths(...)` helper so the test remains
platform-stable.
2026-03-29 17:54:17 -06:00
Michael Bolin
ea5b616bed merge commit for archive created by Sapling 2026-03-29 14:48:13 -07:00
Michael Bolin
20c7b1d854 codex-tools: extract discovery tool specs 2026-03-29 14:48:00 -07:00
Michael Bolin
621c6f1041 Merge f14b214b0f into sapling-pr-archive-bolinfest 2026-03-29 14:34:59 -07:00
Michael Bolin
f14b214b0f codex-tools: extract discovery tool specs 2026-03-29 14:34:50 -07:00
Michael Bolin
af568afdd5 codex-tools: extract utility tool specs (#16154)
## Why

The previous `codex-tools` migration steps moved the shared schema
models, local-host specs, collaboration specs, and related adapters out
of `codex-core`, but `core/src/tools/spec.rs` still contained a grab bag
of pure utility tool builders. Those specs do not need session state or
handler logic; they only describe wire shapes for tools that
`codex-core` already knows how to execute.

Moving that remaining low-coupling layer into `codex-tools` keeps the
migration moving in meaningful chunks and trims another large block of
passive tool-spec construction out of `codex-core` without touching the
runtime-coupled handlers.

## What changed

- extended `codex-tools` to own the pure spec builders for:
  - code-mode `exec` / `wait`
  - `js_repl` / `js_repl_reset`
- MCP resource tools `list_mcp_resources`,
`list_mcp_resource_templates`, and `read_mcp_resource`
  - utility tools `list_dir` and `test_sync_tool`
- split those builders across small module files with sibling
`*_tests.rs` coverage, keeping `src/lib.rs` exports-only
- rewired `core/src/tools/spec.rs` to call the extracted builders and
deleted the duplicated core-local implementations
- moved the direct JS REPL grammar seam test out of
`core/src/tools/spec_tests.rs` so it now lives with the extracted
implementation in `codex-tools`
- updated `codex-rs/tools/README.md` so the documented crate boundary
matches the new utility-spec surface

## Test plan

- `CARGO_TARGET_DIR=/tmp/codex-tools-utility-specs cargo test -p
codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-utility-specs cargo test -p
codex-core --lib tools::spec::`
- `just fix -p codex-tools -p codex-core`
- `just argument-comment-lint`

## References

- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
- #16132
- #16138
- #16141
2026-03-29 14:34:36 -07:00
Michael Bolin
f388fa6a02 merge commit for archive created by Sapling 2026-03-29 14:29:46 -07:00
Michael Bolin
850462da30 codex-tools: extract discovery tool specs 2026-03-29 14:29:40 -07:00
Michael Bolin
e2a40b023b merge commit for archive created by Sapling 2026-03-29 14:22:40 -07:00
Michael Bolin
f4d6000fc5 codex-tools: extract utility tool specs 2026-03-29 14:21:45 -07:00
Michael Bolin
ba6e2f65c6 codex-tools: extract discovery tool specs 2026-03-29 14:21:45 -07:00