Compare commits
113
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8b02d9bf7 | ||
|
|
cfeeaf99d4 | ||
|
|
901dbdbfda | ||
|
|
5974a03281 | ||
|
|
3944fc1292 | ||
|
|
6a7e286383 | ||
|
|
bf8f6e7452 | ||
|
|
5a52d27e51 | ||
|
|
24423f5712 | ||
|
|
df1ee09ec5 | ||
|
|
a33ad93996 | ||
|
|
ece1dfece0 | ||
|
|
989f55defa | ||
|
|
8057603d0c | ||
|
|
3ccef20ef4 | ||
|
|
96d8e34712 | ||
|
|
74dcce594d | ||
|
|
4907f0c2c3 | ||
|
|
5013d10824 | ||
|
|
a781761eda | ||
|
|
8a6a34be75 | ||
|
|
93c79046d6 | ||
|
|
390b73133b | ||
|
|
3694b48a82 | ||
|
|
69b76e9d07 | ||
|
|
c14623d04c | ||
|
|
b4f0f3eff1 | ||
|
|
f959e7fc98 | ||
|
|
3e39e92f03 | ||
|
|
2a320fedb5 | ||
|
|
31e428a1ef | ||
|
|
c2b3e3b4f5 | ||
|
|
b17f30eb2a | ||
|
|
e639e8c4bd | ||
|
|
1d65ccabd5 | ||
|
|
4fe02f4fcf | ||
|
|
31372078d1 | ||
|
|
806a4b66c9 | ||
|
|
ff78e21215 | ||
|
|
2696e7199b | ||
|
|
6f65b9a98c | ||
|
|
176af2b510 | ||
|
|
61f5a84930 | ||
|
|
283bc4cf01 | ||
|
|
97dce078c5 | ||
|
|
322e33512b | ||
|
|
61ff4d087e | ||
|
|
1acb722e8a | ||
|
|
32b65bbf7a | ||
|
|
3b4186986f | ||
|
|
1ec3def0b5 | ||
|
|
77e7ce1374 | ||
|
|
4dde907d27 | ||
|
|
829f5b6b59 | ||
|
|
220f5b76b2 | ||
|
|
db6e676afc | ||
|
|
bbbea91960 | ||
|
|
be0dfcfbea | ||
|
|
2e69966cd8 | ||
|
|
01f89c8c59 | ||
|
|
c26f961b85 | ||
|
|
5283522939 | ||
|
|
9a79536e6b | ||
|
|
7b40e3523f | ||
|
|
1882719b30 | ||
|
|
66f0220c56 | ||
|
|
f6500886b7 | ||
|
|
50eee505a3 | ||
|
|
cbcf1f8ca3 | ||
|
|
4cc6a4bab5 | ||
|
|
7aab4b04bf | ||
|
|
00dc5ea397 | ||
|
|
510bce9927 | ||
|
|
c660e2b644 | ||
|
|
18fe1d9fe3 | ||
|
|
ff50b47dce | ||
|
|
c5a9a95ab6 | ||
|
|
354807920e | ||
|
|
2cf2a6a844 | ||
|
|
e476fc16ce | ||
|
|
8d80b0176a | ||
|
|
d69828e18b | ||
|
|
b539e3e72b | ||
|
|
39ee1b96b0 | ||
|
|
d1d11cac05 | ||
|
|
8751fd3fcb | ||
|
|
9fe689783d | ||
|
|
02c326f646 | ||
|
|
c553cea9ea | ||
|
|
bbe1006890 | ||
|
|
330ae6a516 | ||
|
|
4147824509 | ||
|
|
49614a0391 | ||
|
|
55bc38a22b | ||
|
|
63f8f547c0 | ||
|
|
d2484697b1 | ||
|
|
266dcbfe5b | ||
|
|
83c4934e45 | ||
|
|
6e0c8b4517 | ||
|
|
f0ad028a74 | ||
|
|
33cc928d33 | ||
|
|
a22e3d0b82 | ||
|
|
802c98cab4 | ||
|
|
e0ac5d3c15 | ||
|
|
27f22b54ae | ||
|
|
7c22d376e5 | ||
|
|
67009bc53f | ||
|
|
3310fc8ae5 | ||
|
|
b16d2858f5 | ||
|
|
ff31ba8d0a | ||
|
|
e65e480e0d | ||
|
|
b294638bb5 | ||
|
|
fbd575ab4a |
No files matched your search
@@ -1,17 +1,104 @@
|
||||
---
|
||||
name: remote-tests
|
||||
description: How to run tests using remote executor.
|
||||
description: Testing against remote executors in integration tests.
|
||||
---
|
||||
|
||||
Some Codex integration tests select `local`, `docker`, or `wine-exec` through
|
||||
`CODEX_TEST_ENVIRONMENT`. The legacy `CODEX_TEST_REMOTE_ENV=<container>` still
|
||||
selects Docker; otherwise execution is local.
|
||||
Remote executor tests exercise the app-server/exec-server split to ensure that agent features work
|
||||
in both local and remote execution environments.
|
||||
|
||||
Docker container is built and initialized via ./scripts/test-remote-env.sh
|
||||
Remote executor tests currently require an x86_64 Linux host machine. There are two flavors:
|
||||
|
||||
On x86-64 Linux, run Wine exec with
|
||||
`bazel test //codex-rs/core:core-all-wine-exec-test --test_output=errors`.
|
||||
Temporary blockers belong beside the test in `skip_if_wine_exec!` calls.
|
||||
1. Docker (Linux exec-server)
|
||||
2. Wine (Windows exec-server)
|
||||
|
||||
## Test Fixtures
|
||||
|
||||
Individual test cases must opt-in to being run against a remote executor.
|
||||
|
||||
### codex_core
|
||||
|
||||
Use `TestCodexBuilder::build_with_auto_env()` to opt-in to remote execution in core integration
|
||||
tests unless the test needs more precise control over its executor.
|
||||
|
||||
### app-server
|
||||
|
||||
Start the server with `TestAppServer::new_with_auto_env()` unless the test defines its own
|
||||
`$CODEX_HOME/environments.toml` or will define custom environments at runtime.
|
||||
|
||||
Start threads with `TestAppServer::send_thread_start_request_with_auto_env()` if you've created the
|
||||
server with the `auto_env` approach. Omit `ThreadStartParams.environments` (leave it as `None`) when
|
||||
doing so.
|
||||
|
||||
## Test Skips
|
||||
|
||||
If a test doesn't pass in a particular remote executor configuration you can skip it in just that
|
||||
configuration. Include a string reason for future readers when the selected skip macro supports
|
||||
one.
|
||||
|
||||
Choose the skip macro by what causes the test to fail:
|
||||
|
||||
- `skip_if_target_windows!`: Windows target behavior.
|
||||
- `skip_if_wine_exec!`: Wine-exec runner constraints.
|
||||
- `skip_if_host_windows!`: Windows host constraints.
|
||||
- `skip_if_remote!`: Local-only test behavior.
|
||||
- `skip_if_no_remote_env!`: Remote-only test behavior.
|
||||
|
||||
Prefer defining tests that run in all host/target configurations by default. See the `$path-types`
|
||||
skill for the most common changes required to make tests compatible.
|
||||
|
||||
## Docker
|
||||
|
||||
Docker container is built and initialized via ./scripts/test-remote-env.sh. Sourcing this script
|
||||
in bash also provides the `codex_remote_env_cleanup` function to use after testing.
|
||||
|
||||
To run core integration tests against a Docker remote executor:
|
||||
|
||||
```bash
|
||||
bash -c '
|
||||
set -euo pipefail
|
||||
unset CODEX_TEST_REMOTE_EXEC_SERVER_URL
|
||||
source scripts/test-remote-env.sh
|
||||
trap codex_remote_env_cleanup EXIT
|
||||
|
||||
cd codex-rs
|
||||
just test -p codex-core --test all
|
||||
'
|
||||
```
|
||||
|
||||
To run app-server integration tests against a Docker remote executor:
|
||||
|
||||
```bash
|
||||
bash -c '
|
||||
set -euo pipefail
|
||||
unset CODEX_TEST_REMOTE_EXEC_SERVER_URL
|
||||
source scripts/test-remote-env.sh
|
||||
trap codex_remote_env_cleanup EXIT
|
||||
|
||||
cd codex-rs
|
||||
just test -p codex-app-server --test all
|
||||
'
|
||||
```
|
||||
|
||||
## Wine
|
||||
|
||||
These tests build an exec-server for Windows and run it under Wine, with the app-server staying on
|
||||
the Linux host. The cross-platform build dependency means they only run in Bazel.
|
||||
|
||||
For core integration tests:
|
||||
|
||||
```sh
|
||||
bazel test //codex-rs/core:core-all-wine-exec-test
|
||||
```
|
||||
|
||||
For app-server integration tests:
|
||||
|
||||
```sh
|
||||
bazel test //codex-rs/app-server:app-server-all-wine-exec-test
|
||||
```
|
||||
|
||||
## Devboxes
|
||||
|
||||
You can use a devbox to run these tests if you are running on a macOS machine.
|
||||
|
||||
You can list devboxes via `applied_devbox ls`, pick the one with `codex` in the name.
|
||||
Connect to devbox via `ssh <devbox_name>`.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Core crate ownership.
|
||||
/codex-rs/core/ @openai/codex-core-agent-team
|
||||
/codex-rs/exec-server-protocol/ @openai/codex-core-agent-team
|
||||
/codex-rs/ext/extension-api/ @openai/codex-core-agent-team
|
||||
/codex-rs/prompts/ @openai/codex-core-agent-team
|
||||
/codex-rs/utils/path-uri/ @openai/codex-core-agent-team
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
name: check-clean-worktree
|
||||
description: Fail when a CI job leaves tracked changes or untracked files in the repository worktree.
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Check for a clean worktree
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
status="$(git -C "${GITHUB_WORKSPACE}" status --porcelain=v1 --untracked-files=normal --ignore-submodules=none)"
|
||||
if [[ -z "${status}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "::error::CI job left tracked changes or untracked files in the repository worktree"
|
||||
printf '%s\n' "${status}"
|
||||
exit 1
|
||||
@@ -34,6 +34,10 @@ runs:
|
||||
|
||||
- name: Set up Bazel
|
||||
uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
|
||||
# Without an explicit Bazelisk version, setup-bazel leaves PATH unchanged
|
||||
# and Windows can use the runner's standalone Bazel, ignoring .bazelversion.
|
||||
with:
|
||||
bazelisk-version: 1.28.1
|
||||
|
||||
- name: Configure Bazel repository cache
|
||||
id: configure_bazel_repository_cache
|
||||
|
||||
@@ -134,6 +134,10 @@ jobs:
|
||||
path: ${{ steps.prepare_bazel.outputs.repository-cache-path }}
|
||||
key: ${{ steps.prepare_bazel.outputs.repository-cache-key }}
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
test-windows-shard:
|
||||
# Split the Windows Bazel test leg across separate Windows hosts. Jobs with
|
||||
# BuildBuddy credentials use Linux RBE for build actions; test execution
|
||||
@@ -239,6 +243,10 @@ jobs:
|
||||
path: ${{ runner.temp }}/bazel-execution-logs
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
test-windows:
|
||||
# Preserve the existing required-check surface while the real work happens
|
||||
# in the sharded Windows jobs above.
|
||||
@@ -333,6 +341,10 @@ jobs:
|
||||
path: ${{ steps.prepare_bazel.outputs.repository-cache-path }}
|
||||
key: ${{ steps.prepare_bazel.outputs.repository-cache-key }}
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
clippy:
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
@@ -433,6 +445,10 @@ jobs:
|
||||
path: ${{ steps.prepare_bazel.outputs.repository-cache-path }}
|
||||
key: ${{ steps.prepare_bazel.outputs.repository-cache-key }}
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
verify-release-build:
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
@@ -545,3 +561,7 @@ jobs:
|
||||
with:
|
||||
path: ${{ steps.prepare_bazel.outputs.repository-cache-path }}
|
||||
key: ${{ steps.prepare_bazel.outputs.repository-cache-key }}
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
@@ -32,3 +32,7 @@ jobs:
|
||||
--head "$HEAD_SHA" \
|
||||
--max-bytes 512000 \
|
||||
--allowlist .github/blob-size-allowlist.txt
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
@@ -32,3 +32,7 @@ jobs:
|
||||
with:
|
||||
rust-version: 1.95.0
|
||||
manifest-path: ./codex-rs/Cargo.toml
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
@@ -88,3 +88,7 @@ jobs:
|
||||
|
||||
- name: Prettier (run `pnpm run format:fix` to fix)
|
||||
run: pnpm run format
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
@@ -28,3 +28,7 @@ jobs:
|
||||
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
|
||||
with:
|
||||
ignore_words_file: .codespellignore
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
@@ -58,6 +58,10 @@ jobs:
|
||||
echo "codex=$codex" >> "$GITHUB_OUTPUT"
|
||||
echo "workflows=$workflows" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
# --- Fast Cargo-native PR checks -------------------------------------------
|
||||
general:
|
||||
name: Format / etc
|
||||
@@ -83,6 +87,10 @@ jobs:
|
||||
- name: Rust benchmark smoke test
|
||||
run: just bench-smoke
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
cargo_shear:
|
||||
name: cargo shear
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -103,6 +111,10 @@ jobs:
|
||||
- name: cargo shear
|
||||
run: cargo shear --deny-warnings
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
argument_comment_lint_package:
|
||||
name: Argument comment lint package
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -154,6 +166,10 @@ jobs:
|
||||
env:
|
||||
RUST_MIN_STACK: "8388608" # 8 MiB
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
argument_comment_lint_prebuilt:
|
||||
name: Argument comment lint - ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.runs_on || matrix.runner }}
|
||||
@@ -205,6 +221,10 @@ jobs:
|
||||
target: ${{ runner.os }}
|
||||
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled() && steps.argument_comment_lint_gate.outputs.run == 'true'
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
# --- Gatherer job that you mark as the ONLY required status -----------------
|
||||
results:
|
||||
name: CI results (required)
|
||||
|
||||
@@ -41,6 +41,10 @@ jobs:
|
||||
/tmp/uv/bin/uv run --frozen --no-sync pytest
|
||||
'
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
sdks:
|
||||
runs-on:
|
||||
group: ${{ github.event.repository.name }}-runners
|
||||
@@ -161,3 +165,7 @@ jobs:
|
||||
path: |
|
||||
~/.cache/bazel-repo-cache
|
||||
key: bazel-cache-x86_64-unknown-linux-gnu-${{ hashFiles('MODULE.bazel', 'codex-rs/Cargo.lock', 'codex-rs/Cargo.toml') }}
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
@@ -97,6 +97,10 @@ jobs:
|
||||
echo "${output}"
|
||||
echo "${output}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.variant }} ${{ matrix.target }}
|
||||
needs: metadata
|
||||
@@ -322,6 +326,10 @@ jobs:
|
||||
name: v8-canary-${{ needs.metadata.outputs.v8_version }}-${{ matrix.variant }}-${{ matrix.target }}
|
||||
path: dist/${{ matrix.target }}/*
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
build-windows-source:
|
||||
name: Build ptrcomp-sandbox ${{ matrix.target }} from source
|
||||
needs: metadata
|
||||
@@ -459,3 +467,7 @@ jobs:
|
||||
with:
|
||||
name: v8-canary-${{ needs.metadata.outputs.v8_version }}-ptrcomp-sandbox-${{ matrix.target }}
|
||||
path: dist/${{ matrix.target }}/*
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
@@ -60,6 +60,8 @@ yarn-error.log*
|
||||
# ci
|
||||
.vercel/
|
||||
.netlify/
|
||||
/.tmp/sdk-ci/
|
||||
/upstream-rusty-v8/
|
||||
|
||||
# patches
|
||||
apply_patch/
|
||||
|
||||
@@ -35,9 +35,8 @@ In the codex-rs folder where the rust code lives:
|
||||
- When working with MCP tool calls, prefer using `codex-rs/codex-mcp/src/mcp_connection_manager.rs` to handle mutation of tools and tool calls. Aim to minimize the footprint of changes and leverage existing abstractions rather than plumbing code through multiple levels of function calls.
|
||||
- Do not call `reset_client_session` unnecessarily; let the incremental check logic decide whether to reuse the previous request.
|
||||
- If you change Rust dependencies (`Cargo.toml` or `Cargo.lock`), run `just bazel-lock-update` from the
|
||||
repo root to refresh `MODULE.bazel.lock`, and include that lockfile update in the same change.
|
||||
- After dependency changes, run `just bazel-lock-check` from the repo root so lockfile drift is caught
|
||||
locally before CI.
|
||||
repo root to refresh `MODULE.bazel.lock`, and include that lockfile update in the same change. CI
|
||||
verifies lockfile drift.
|
||||
- Bazel does not automatically make source-tree files available to compile-time Rust file access. If
|
||||
you add `include_str!`, `include_bytes!`, `sqlx::migrate!`, or similar build-time file or
|
||||
directory reads, update the crate's `BUILD.bazel` (`compile_data`, `build_script_data`, or test
|
||||
@@ -220,10 +219,13 @@ Use `just bench-smoke` to dry-run the benchmark for a single iteration to ensure
|
||||
- Under Bazel, binaries and resources may live under runfiles; use `codex_utils_cargo_bin::cargo_bin` to resolve absolute paths that remain stable after `chdir`.
|
||||
- When locating fixture files or test resources under Bazel, avoid `env!("CARGO_MANIFEST_DIR")`. Prefer `codex_utils_cargo_bin::find_resource!` so paths resolve correctly under both Cargo and Bazel runfiles.
|
||||
|
||||
### Integration tests (core)
|
||||
### Integration tests
|
||||
|
||||
#### codex_core integration testing
|
||||
|
||||
- Prefer the utilities in `core_test_support::responses` when writing end-to-end Codex tests.
|
||||
|
||||
- Use `TestCodexBuilder::build_with_auto_env()` by default to ensure that new tests work with
|
||||
foreign app/exec OSes. See $remote-tests for details.
|
||||
- All `mount_sse*` helpers return a `ResponseMock`; hold onto it so you can assert against outbound `/responses` POST bodies.
|
||||
- Use `ResponseMock::single_request()` when a test should only issue one POST, or `ResponseMock::requests()` to inspect every captured `ResponsesRequest`.
|
||||
- `ResponsesRequest` exposes helpers (`body_json`, `input`, `function_call_output`, `custom_tool_call_output`, `call_output`, `header`, `path`, `query_param`) so assertions can target structured payloads instead of manual JSON digging.
|
||||
@@ -247,6 +249,14 @@ Use `just bench-smoke` to dry-run the benchmark for a single iteration to ensure
|
||||
// assert using request.function_call_output(call_id) or request.json_body() or other helpers.
|
||||
```
|
||||
|
||||
#### app-server integration testing
|
||||
|
||||
- Tests should exercise app-server's public JSON-RPC API.
|
||||
- Use similar server mocking as for core integration tests.
|
||||
- Use `TestAppServer::new_with_auto_env()` and `TestAppServer::send_thread_start_request_with_auto_env()`
|
||||
by default to ensure that new tests work with foreign app/exec OSes. See `$remote-tests` for
|
||||
details.
|
||||
|
||||
## App-server API Development Best Practices
|
||||
|
||||
These guidelines apply to app-server protocol work in `codex-rs`, especially:
|
||||
@@ -307,3 +317,6 @@ closest `pyproject.toml`'s `requires-python` field to see what minimum runtime v
|
||||
## Platform Support
|
||||
|
||||
Tests and features must support Linux, macOS and Windows unless feature is explicitly OS-specific.
|
||||
|
||||
Codex supports running connected app-server and exec-server on different operating systems. See the
|
||||
`$remote-tests` skill for details about integration testing these configurations.
|
||||
Generated
+2
-2
@@ -1449,8 +1449,8 @@
|
||||
"resolv-conf_0.7.6": "{\"dependencies\":[],\"features\":{\"system\":[]}}",
|
||||
"rfc6979_0.4.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"hex-literal\",\"req\":\"^0.3\"},{\"default_features\":false,\"features\":[\"reset\"],\"name\":\"hmac\",\"req\":\"^0.12\"},{\"kind\":\"dev\",\"name\":\"sha2\",\"req\":\"^0.10\"},{\"default_features\":false,\"name\":\"subtle\",\"req\":\"^2\"}],\"features\":{}}",
|
||||
"ring_0.17.14": "{\"dependencies\":[{\"default_features\":false,\"kind\":\"build\",\"name\":\"cc\",\"req\":\"^1.2.8\"},{\"default_features\":false,\"name\":\"cfg-if\",\"req\":\"^1.0.0\"},{\"name\":\"getrandom\",\"req\":\"^0.2.10\"},{\"default_features\":false,\"name\":\"libc\",\"req\":\"^0.2.148\",\"target\":\"cfg(all(any(all(target_arch = \\\"aarch64\\\", target_endian = \\\"little\\\"), all(target_arch = \\\"arm\\\", target_endian = \\\"little\\\")), any(target_os = \\\"android\\\", target_os = \\\"linux\\\")))\"},{\"default_features\":false,\"name\":\"libc\",\"req\":\"^0.2.155\",\"target\":\"cfg(all(all(target_arch = \\\"aarch64\\\", target_endian = \\\"little\\\"), target_vendor = \\\"apple\\\", any(target_os = \\\"ios\\\", target_os = \\\"macos\\\", target_os = \\\"tvos\\\", target_os = \\\"visionos\\\", target_os = \\\"watchos\\\")))\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"libc\",\"req\":\"^0.2.148\",\"target\":\"cfg(any(unix, windows, target_os = \\\"wasi\\\"))\"},{\"name\":\"untrusted\",\"req\":\"^0.9\"},{\"default_features\":false,\"features\":[\"std\"],\"kind\":\"dev\",\"name\":\"wasm-bindgen-test\",\"req\":\"^0.3.37\",\"target\":\"cfg(all(target_arch = \\\"wasm32\\\", target_os = \\\"unknown\\\"))\"},{\"features\":[\"Win32_Foundation\",\"Win32_System_Threading\"],\"name\":\"windows-sys\",\"req\":\"^0.52\",\"target\":\"cfg(all(all(target_arch = \\\"aarch64\\\", target_endian = \\\"little\\\"), target_os = \\\"windows\\\"))\"}],\"features\":{\"alloc\":[],\"default\":[\"alloc\",\"dev_urandom_fallback\"],\"dev_urandom_fallback\":[],\"less-safe-getrandom-custom-or-rdrand\":[],\"less-safe-getrandom-espidf\":[],\"slow_tests\":[],\"std\":[\"alloc\"],\"test_logging\":[],\"unstable-testing-arm-no-hw\":[],\"unstable-testing-arm-no-neon\":[],\"wasm32_unknown_unknown_js\":[\"getrandom/js\"]}}",
|
||||
"rmcp-macros_1.7.0": "{\"dependencies\":[{\"name\":\"darling\",\"req\":\"^0.23\"},{\"name\":\"proc-macro2\",\"req\":\"^1\"},{\"name\":\"quote\",\"req\":\"^1\"},{\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"features\":[\"full\"],\"name\":\"syn\",\"req\":\"^2\"}],\"features\":{\"local\":[]}}",
|
||||
"rmcp_1.7.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"anyhow\",\"req\":\"^1.0\"},{\"name\":\"async-trait\",\"req\":\"^0.1.89\"},{\"kind\":\"dev\",\"name\":\"async-trait\",\"req\":\"^0.1\"},{\"default_features\":false,\"features\":[\"http1\",\"tokio\"],\"kind\":\"dev\",\"name\":\"axum\",\"req\":\"^0.8\"},{\"name\":\"base64\",\"optional\":true,\"req\":\"^0.22\"},{\"name\":\"bytes\",\"optional\":true,\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"serde\",\"clock\",\"std\",\"oldtime\"],\"name\":\"chrono\",\"req\":\"^0.4.38\",\"target\":\"cfg(all(target_family = \\\"wasm\\\", target_os = \\\"unknown\\\"))\"},{\"default_features\":false,\"features\":[\"serde\",\"now\"],\"name\":\"chrono\",\"req\":\"^0.4.38\",\"target\":\"cfg(not(all(target_family = \\\"wasm\\\", target_os = \\\"unknown\\\")))\"},{\"name\":\"futures\",\"req\":\"^0.3\"},{\"name\":\"http\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"http-body\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"http-body-util\",\"optional\":true,\"req\":\"^0.1\"},{\"features\":[\"client\",\"http1\"],\"name\":\"hyper\",\"optional\":true,\"req\":\"^1\"},{\"features\":[\"server\",\"http1\"],\"kind\":\"dev\",\"name\":\"hyper\",\"req\":\"^1\"},{\"features\":[\"tokio\"],\"name\":\"hyper-util\",\"optional\":true,\"req\":\"^0.1\"},{\"features\":[\"tokio\"],\"kind\":\"dev\",\"name\":\"hyper-util\",\"req\":\"^0.1\"},{\"name\":\"jsonwebtoken\",\"optional\":true,\"req\":\"^10\"},{\"default_features\":false,\"name\":\"oauth2\",\"optional\":true,\"req\":\"^5.0\"},{\"name\":\"pastey\",\"optional\":true,\"req\":\"^0.2.0\"},{\"name\":\"pin-project-lite\",\"req\":\"^0.2\"},{\"features\":[\"tokio1\"],\"name\":\"process-wrap\",\"optional\":true,\"req\":\"^9.0\"},{\"name\":\"rand\",\"optional\":true,\"req\":\"^0.10\"},{\"default_features\":false,\"features\":[\"json\",\"stream\"],\"name\":\"reqwest\",\"optional\":true,\"req\":\"^0.13.2\"},{\"name\":\"rmcp-macros\",\"optional\":true,\"req\":\"^1.7.0\"},{\"features\":[\"chrono04\"],\"name\":\"schemars\",\"optional\":true,\"req\":\"^1.0\"},{\"features\":[\"chrono04\"],\"kind\":\"dev\",\"name\":\"schemars\",\"req\":\"^1.1.0\"},{\"features\":[\"derive\",\"rc\"],\"name\":\"serde\",\"req\":\"^1.0\"},{\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"name\":\"sse-stream\",\"optional\":true,\"req\":\"^0.2\"},{\"name\":\"thiserror\",\"req\":\"^2\"},{\"features\":[\"sync\",\"macros\",\"rt\",\"time\"],\"name\":\"tokio\",\"req\":\"^1\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1\"},{\"name\":\"tokio-stream\",\"optional\":true,\"req\":\"^0.1\"},{\"name\":\"tokio-util\",\"req\":\"^0.7\"},{\"name\":\"tower-service\",\"optional\":true,\"req\":\"^0.3\"},{\"kind\":\"dev\",\"name\":\"tower-service\",\"req\":\"^0.3\"},{\"name\":\"tracing\",\"req\":\"^0.1\"},{\"features\":[\"env-filter\",\"std\",\"fmt\"],\"kind\":\"dev\",\"name\":\"tracing-subscriber\",\"req\":\"^0.3\"},{\"name\":\"url\",\"optional\":true,\"req\":\"^2.4\"},{\"kind\":\"dev\",\"name\":\"url\",\"req\":\"^2.4\"},{\"features\":[\"v4\"],\"name\":\"uuid\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"which\",\"optional\":true,\"req\":\"^8\"}],\"features\":{\"__reqwest\":[\"dep:reqwest\"],\"auth\":[\"dep:oauth2\",\"__reqwest\",\"dep:url\"],\"auth-client-credentials-jwt\":[\"auth\",\"dep:jsonwebtoken\",\"uuid\"],\"client\":[\"dep:tokio-stream\"],\"client-side-sse\":[\"dep:sse-stream\",\"dep:http\"],\"default\":[\"base64\",\"macros\",\"server\"],\"elicitation\":[\"dep:url\"],\"local\":[\"rmcp-macros?/local\"],\"macros\":[\"dep:rmcp-macros\",\"dep:pastey\"],\"reqwest\":[\"__reqwest\",\"reqwest?/rustls\"],\"reqwest-native-tls\":[\"__reqwest\",\"reqwest?/native-tls\"],\"reqwest-tls-no-provider\":[\"__reqwest\",\"reqwest?/rustls-no-provider\"],\"schemars\":[\"dep:schemars\"],\"server\":[\"transport-async-rw\",\"dep:schemars\",\"dep:pastey\"],\"server-side-http\":[\"uuid\",\"dep:rand\",\"dep:tokio-stream\",\"dep:http\",\"dep:http-body\",\"dep:http-body-util\",\"dep:bytes\",\"dep:sse-stream\",\"tower\"],\"tower\":[\"dep:tower-service\"],\"transport-async-rw\":[\"tokio/io-util\",\"tokio-util/codec\"],\"transport-child-process\":[\"transport-async-rw\",\"tokio/process\",\"dep:process-wrap\"],\"transport-io\":[\"transport-async-rw\",\"tokio/io-std\"],\"transport-streamable-http-client\":[\"client-side-sse\",\"transport-worker\"],\"transport-streamable-http-client-reqwest\":[\"transport-streamable-http-client\",\"__reqwest\"],\"transport-streamable-http-client-unix-socket\":[\"transport-streamable-http-client\",\"dep:hyper\",\"dep:hyper-util\",\"dep:http-body-util\",\"dep:http\",\"dep:bytes\",\"tokio/net\"],\"transport-streamable-http-server\":[\"transport-streamable-http-server-session\",\"server-side-http\",\"transport-worker\"],\"transport-streamable-http-server-session\":[\"transport-async-rw\",\"dep:tokio-stream\"],\"transport-worker\":[\"dep:tokio-stream\"],\"which-command\":[\"transport-child-process\",\"dep:which\"]}}",
|
||||
"rmcp-macros_1.8.0": "{\"dependencies\":[{\"name\":\"darling\",\"req\":\"^0.23\"},{\"name\":\"proc-macro2\",\"req\":\"^1\"},{\"name\":\"quote\",\"req\":\"^1\"},{\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"features\":[\"full\"],\"name\":\"syn\",\"req\":\"^2\"}],\"features\":{\"local\":[]}}",
|
||||
"rmcp_1.8.0": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"anyhow\",\"req\":\"^1.0\"},{\"name\":\"async-trait\",\"req\":\"^0.1.89\"},{\"kind\":\"dev\",\"name\":\"async-trait\",\"req\":\"^0.1\"},{\"default_features\":false,\"features\":[\"http1\",\"tokio\"],\"kind\":\"dev\",\"name\":\"axum\",\"req\":\"^0.8\"},{\"name\":\"base64\",\"optional\":true,\"req\":\"^0.22\"},{\"name\":\"bytes\",\"optional\":true,\"req\":\"^1\"},{\"default_features\":false,\"features\":[\"serde\",\"clock\",\"std\",\"oldtime\"],\"name\":\"chrono\",\"req\":\"^0.4.38\",\"target\":\"cfg(all(target_family = \\\"wasm\\\", target_os = \\\"unknown\\\"))\"},{\"default_features\":false,\"features\":[\"serde\",\"now\"],\"name\":\"chrono\",\"req\":\"^0.4.38\",\"target\":\"cfg(not(all(target_family = \\\"wasm\\\", target_os = \\\"unknown\\\")))\"},{\"name\":\"futures\",\"req\":\"^0.3\"},{\"name\":\"http\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"http-body\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"http-body-util\",\"optional\":true,\"req\":\"^0.1\"},{\"features\":[\"client\",\"http1\"],\"name\":\"hyper\",\"optional\":true,\"req\":\"^1\"},{\"features\":[\"server\",\"http1\"],\"kind\":\"dev\",\"name\":\"hyper\",\"req\":\"^1\"},{\"features\":[\"tokio\"],\"name\":\"hyper-util\",\"optional\":true,\"req\":\"^0.1\"},{\"features\":[\"tokio\"],\"kind\":\"dev\",\"name\":\"hyper-util\",\"req\":\"^0.1\"},{\"name\":\"jsonwebtoken\",\"optional\":true,\"req\":\"^10\"},{\"default_features\":false,\"name\":\"oauth2\",\"optional\":true,\"req\":\"^5.0\"},{\"name\":\"pastey\",\"optional\":true,\"req\":\"^0.2.0\"},{\"name\":\"pin-project-lite\",\"req\":\"^0.2\"},{\"features\":[\"tokio1\"],\"name\":\"process-wrap\",\"optional\":true,\"req\":\"^9.0\"},{\"name\":\"rand\",\"optional\":true,\"req\":\"^0.10\"},{\"default_features\":false,\"features\":[\"json\",\"stream\"],\"name\":\"reqwest\",\"optional\":true,\"req\":\"^0.13.2\"},{\"name\":\"rmcp-macros\",\"optional\":true,\"req\":\"^1.8.0\"},{\"features\":[\"chrono04\"],\"name\":\"schemars\",\"optional\":true,\"req\":\"^1.0\"},{\"features\":[\"chrono04\"],\"kind\":\"dev\",\"name\":\"schemars\",\"req\":\"^1.1.0\"},{\"features\":[\"derive\",\"rc\"],\"name\":\"serde\",\"req\":\"^1.0\"},{\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"name\":\"sse-stream\",\"optional\":true,\"req\":\"^0.2\"},{\"name\":\"thiserror\",\"req\":\"^2\"},{\"features\":[\"sync\",\"macros\",\"rt\",\"time\"],\"name\":\"tokio\",\"req\":\"^1\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1\"},{\"name\":\"tokio-stream\",\"optional\":true,\"req\":\"^0.1\"},{\"name\":\"tokio-util\",\"req\":\"^0.7\"},{\"name\":\"tower-service\",\"optional\":true,\"req\":\"^0.3\"},{\"kind\":\"dev\",\"name\":\"tower-service\",\"req\":\"^0.3\"},{\"name\":\"tracing\",\"req\":\"^0.1\"},{\"features\":[\"env-filter\",\"std\",\"fmt\"],\"kind\":\"dev\",\"name\":\"tracing-subscriber\",\"req\":\"^0.3\"},{\"name\":\"url\",\"optional\":true,\"req\":\"^2.4\"},{\"kind\":\"dev\",\"name\":\"url\",\"req\":\"^2.4\"},{\"features\":[\"v4\"],\"name\":\"uuid\",\"optional\":true,\"req\":\"^1\"},{\"name\":\"which\",\"optional\":true,\"req\":\"^8\"}],\"features\":{\"__reqwest\":[\"dep:reqwest\"],\"auth\":[\"dep:oauth2\",\"__reqwest\",\"dep:url\"],\"auth-client-credentials-jwt\":[\"auth\",\"dep:jsonwebtoken\",\"uuid\"],\"client\":[\"dep:tokio-stream\"],\"client-side-sse\":[\"dep:sse-stream\",\"dep:http\"],\"default\":[\"base64\",\"macros\",\"server\"],\"elicitation\":[\"dep:url\"],\"local\":[\"rmcp-macros?/local\"],\"macros\":[\"dep:rmcp-macros\",\"dep:pastey\"],\"reqwest\":[\"__reqwest\",\"reqwest?/rustls\"],\"reqwest-native-tls\":[\"__reqwest\",\"reqwest?/native-tls\"],\"reqwest-tls-no-provider\":[\"__reqwest\",\"reqwest?/rustls-no-provider\"],\"schemars\":[\"dep:schemars\"],\"server\":[\"transport-async-rw\",\"dep:schemars\",\"dep:pastey\"],\"server-side-http\":[\"uuid\",\"dep:rand\",\"dep:tokio-stream\",\"dep:http\",\"dep:http-body\",\"dep:http-body-util\",\"dep:bytes\",\"dep:sse-stream\",\"tower\"],\"tower\":[\"dep:tower-service\"],\"transport-async-rw\":[\"tokio/io-util\",\"tokio-util/codec\"],\"transport-child-process\":[\"transport-async-rw\",\"tokio/process\",\"dep:process-wrap\"],\"transport-io\":[\"transport-async-rw\",\"tokio/io-std\"],\"transport-streamable-http-client\":[\"client-side-sse\",\"transport-worker\"],\"transport-streamable-http-client-reqwest\":[\"transport-streamable-http-client\",\"__reqwest\"],\"transport-streamable-http-client-unix-socket\":[\"transport-streamable-http-client\",\"dep:hyper\",\"dep:hyper-util\",\"dep:http-body-util\",\"dep:http\",\"dep:bytes\",\"tokio/net\"],\"transport-streamable-http-server\":[\"transport-streamable-http-server-session\",\"server-side-http\",\"transport-worker\"],\"transport-streamable-http-server-session\":[\"transport-async-rw\",\"dep:tokio-stream\"],\"transport-worker\":[\"dep:tokio-stream\"],\"which-command\":[\"transport-child-process\",\"dep:which\"]}}",
|
||||
"rtrb_0.3.3": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"criterion\",\"req\":\"^0.8\"},{\"default_features\":false,\"kind\":\"dev\",\"name\":\"crossbeam-utils\",\"req\":\"^0.8\"},{\"kind\":\"dev\",\"name\":\"rand\",\"req\":\"^0.10\"}],\"features\":{\"default\":[\"std\"],\"std\":[]}}",
|
||||
"rust-embed-impl_8.11.0": "{\"dependencies\":[{\"name\":\"proc-macro2\",\"req\":\"^1\"},{\"name\":\"quote\",\"req\":\"^1\"},{\"name\":\"rust-embed-utils\",\"req\":\"^8.11.0\"},{\"name\":\"shellexpand\",\"optional\":true,\"req\":\"^3\"},{\"default_features\":false,\"features\":[\"derive\",\"parsing\",\"proc-macro\",\"printing\"],\"name\":\"syn\",\"req\":\"^2\"},{\"name\":\"walkdir\",\"req\":\"^2.3.1\"}],\"features\":{\"compression\":[],\"debug-embed\":[],\"deterministic-timestamps\":[],\"include-exclude\":[\"rust-embed-utils/include-exclude\"],\"interpolate-folder-path\":[\"shellexpand\"],\"mime-guess\":[\"rust-embed-utils/mime-guess\"]}}",
|
||||
"rust-embed-utils_8.11.0": "{\"dependencies\":[{\"name\":\"globset\",\"optional\":true,\"req\":\"^0.4.8\"},{\"name\":\"mime_guess\",\"optional\":true,\"req\":\"^2.0.4\"},{\"name\":\"sha2\",\"req\":\"^0.10.5\"},{\"name\":\"walkdir\",\"req\":\"^2.3.1\"}],\"features\":{\"debug-embed\":[],\"include-exclude\":[\"globset\"],\"mime-guess\":[\"mime_guess\"]}}",
|
||||
|
||||
Generated
+54
-18
@@ -402,6 +402,7 @@ dependencies = [
|
||||
"codex-app-server-protocol",
|
||||
"codex-config",
|
||||
"codex-core",
|
||||
"codex-exec-server",
|
||||
"codex-features",
|
||||
"codex-login",
|
||||
"codex-models-manager",
|
||||
@@ -1975,6 +1976,7 @@ dependencies = [
|
||||
"codex-chatgpt",
|
||||
"codex-cloud-config",
|
||||
"codex-config",
|
||||
"codex-connectors",
|
||||
"codex-core",
|
||||
"codex-core-plugins",
|
||||
"codex-exec-server",
|
||||
@@ -2162,6 +2164,7 @@ dependencies = [
|
||||
"codex-core",
|
||||
"codex-login",
|
||||
"codex-model-provider",
|
||||
"codex-protocol",
|
||||
"codex-state",
|
||||
"codex-uds",
|
||||
"codex-utils-absolute-path",
|
||||
@@ -2291,7 +2294,6 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
"codex-app-server-protocol",
|
||||
"codex-connectors",
|
||||
"codex-core",
|
||||
"codex-git-utils",
|
||||
@@ -2405,6 +2407,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2 0.10.9",
|
||||
"system-configuration",
|
||||
"tempfile",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
@@ -2534,7 +2537,6 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.22.1",
|
||||
"codex-app-server-protocol",
|
||||
"codex-execpolicy",
|
||||
"codex-features",
|
||||
"codex-file-system",
|
||||
@@ -2581,7 +2583,6 @@ name = "codex-connectors"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"codex-app-server-protocol",
|
||||
"codex-config",
|
||||
"pretty_assertions",
|
||||
"serde",
|
||||
@@ -2614,6 +2615,7 @@ dependencies = [
|
||||
"bm25",
|
||||
"chrono",
|
||||
"clap",
|
||||
"codex-agent-graph-store",
|
||||
"codex-analytics",
|
||||
"codex-api",
|
||||
"codex-app-server-protocol",
|
||||
@@ -2766,6 +2768,7 @@ dependencies = [
|
||||
"codex-protocol",
|
||||
"codex-tools",
|
||||
"codex-utils-absolute-path",
|
||||
"codex-utils-path",
|
||||
"codex-utils-path-uri",
|
||||
"codex-utils-plugins",
|
||||
"dirs",
|
||||
@@ -2773,6 +2776,7 @@ dependencies = [
|
||||
"indexmap 2.14.0",
|
||||
"libc",
|
||||
"pretty_assertions",
|
||||
"regex",
|
||||
"reqwest 0.12.28",
|
||||
"semver",
|
||||
"serde",
|
||||
@@ -2796,7 +2800,6 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"codex-analytics",
|
||||
"codex-app-server-protocol",
|
||||
"codex-config",
|
||||
"codex-context-fragments",
|
||||
"codex-exec-server",
|
||||
@@ -2882,12 +2885,13 @@ dependencies = [
|
||||
"bytes",
|
||||
"clatter",
|
||||
"codex-api",
|
||||
"codex-app-server-protocol",
|
||||
"codex-client",
|
||||
"codex-exec-server-protocol",
|
||||
"codex-file-system",
|
||||
"codex-network-proxy",
|
||||
"codex-otel",
|
||||
"codex-protocol",
|
||||
"codex-sandboxing",
|
||||
"codex-shell-command",
|
||||
"codex-test-binary-support",
|
||||
"codex-utils-absolute-path",
|
||||
"codex-utils-path-uri",
|
||||
@@ -2897,6 +2901,8 @@ dependencies = [
|
||||
"futures",
|
||||
"http 1.4.0",
|
||||
"libc",
|
||||
"opentelemetry",
|
||||
"opentelemetry_sdk",
|
||||
"pretty_assertions",
|
||||
"prost 0.14.3",
|
||||
"reqwest 0.12.28",
|
||||
@@ -2911,11 +2917,28 @@ dependencies = [
|
||||
"tokio-util",
|
||||
"toml 0.9.11+spec-1.1.0",
|
||||
"tracing",
|
||||
"tracing-opentelemetry",
|
||||
"tracing-subscriber",
|
||||
"uuid",
|
||||
"windows-sys 0.52.0",
|
||||
"wiremock",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codex-exec-server-protocol"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"codex-file-system",
|
||||
"codex-network-proxy",
|
||||
"codex-protocol",
|
||||
"codex-shell-command",
|
||||
"codex-utils-path-uri",
|
||||
"pretty_assertions",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codex-execpolicy"
|
||||
version = "0.0.0"
|
||||
@@ -3160,8 +3183,10 @@ dependencies = [
|
||||
name = "codex-image-generation-extension"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"codex-api",
|
||||
"codex-core",
|
||||
"codex-exec-server",
|
||||
"codex-extension-api",
|
||||
"codex-login",
|
||||
"codex-model-provider",
|
||||
@@ -3177,6 +3202,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3243,7 +3269,6 @@ dependencies = [
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
"codex-agent-identity",
|
||||
"codex-app-server-protocol",
|
||||
"codex-client",
|
||||
"codex-config",
|
||||
"codex-keyring-store",
|
||||
@@ -3478,7 +3503,6 @@ name = "codex-model-provider-info"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"codex-api",
|
||||
"codex-app-server-protocol",
|
||||
"codex-protocol",
|
||||
"codex-utils-absolute-path",
|
||||
"http 1.4.0",
|
||||
@@ -3495,7 +3519,6 @@ name = "codex-models-manager"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"codex-app-server-protocol",
|
||||
"codex-collaboration-mode-templates",
|
||||
"codex-login",
|
||||
"codex-otel",
|
||||
@@ -3531,6 +3554,7 @@ dependencies = [
|
||||
"rama-tcp",
|
||||
"rama-tls-rustls",
|
||||
"rama-unix",
|
||||
"rand 0.9.3",
|
||||
"rustls-native-certs",
|
||||
"schannel",
|
||||
"security-framework 3.5.1",
|
||||
@@ -3571,7 +3595,6 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"codex-api",
|
||||
"codex-app-server-protocol",
|
||||
"codex-protocol",
|
||||
"codex-utils-absolute-path",
|
||||
"codex-utils-string",
|
||||
@@ -3604,6 +3627,7 @@ dependencies = [
|
||||
"codex-config",
|
||||
"codex-protocol",
|
||||
"codex-utils-absolute-path",
|
||||
"codex-utils-path-uri",
|
||||
"codex-utils-plugins",
|
||||
"pretty_assertions",
|
||||
"thiserror 2.0.18",
|
||||
@@ -3759,7 +3783,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"codex-file-search",
|
||||
"codex-git-utils",
|
||||
"codex-login",
|
||||
"codex-otel",
|
||||
"codex-protocol",
|
||||
"codex-state",
|
||||
@@ -3815,6 +3838,18 @@ dependencies = [
|
||||
"which 8.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codex-schema-evolution"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"codex-utils-cargo-bin",
|
||||
"pretty_assertions",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"toml 0.9.11+spec-1.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codex-secrets"
|
||||
version = "0.0.0"
|
||||
@@ -3978,6 +4013,7 @@ dependencies = [
|
||||
"chrono",
|
||||
"codex-git-utils",
|
||||
"codex-install-context",
|
||||
"codex-otel",
|
||||
"codex-protocol",
|
||||
"codex-rollout",
|
||||
"codex-state",
|
||||
@@ -3996,8 +4032,8 @@ dependencies = [
|
||||
name = "codex-tools"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"codex-app-server-protocol",
|
||||
"codex-code-mode",
|
||||
"codex-connectors",
|
||||
"codex-features",
|
||||
"codex-file-system",
|
||||
"codex-protocol",
|
||||
@@ -9448,7 +9484,7 @@ version = "5.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d"
|
||||
dependencies = [
|
||||
"base64 0.21.7",
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
"getrandom 0.2.17",
|
||||
"http 1.4.0",
|
||||
@@ -10534,7 +10570,7 @@ version = "0.14.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7"
|
||||
dependencies = [
|
||||
"heck 0.4.1",
|
||||
"heck 0.5.0",
|
||||
"itertools 0.14.0",
|
||||
"log",
|
||||
"multimap",
|
||||
@@ -11454,9 +11490,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rmcp"
|
||||
version = "1.7.0"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0810a9f717d9828f475fe1f629f4c305c8464b7f496c3a854b58d29e65f4058e"
|
||||
checksum = "1d1f571c72940a19d9532fe52dbea8bc9912bf1d766c2970bb824056b86f3f59"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64 0.22.1",
|
||||
@@ -11489,9 +11525,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rmcp-macros"
|
||||
version = "1.7.0"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6aefac48c364756e97f04c0401ba3231e8607882c7c1d92da0437dc16307904d"
|
||||
checksum = "1aad0035b69380782d78ea95b508327e6deaa2235909053e596eea8f27b5e1d5"
|
||||
dependencies = [
|
||||
"darling 0.23.0",
|
||||
"proc-macro2",
|
||||
|
||||
+7
-3
@@ -44,6 +44,7 @@ members = [
|
||||
"secrets",
|
||||
"exec",
|
||||
"file-system",
|
||||
"exec-server-protocol",
|
||||
"exec-server",
|
||||
"execpolicy",
|
||||
"execpolicy-legacy",
|
||||
@@ -81,6 +82,7 @@ members = [
|
||||
"responses-api-proxy",
|
||||
"response-debug-context",
|
||||
"sandboxing",
|
||||
"schema-evolution",
|
||||
"stdio-to-uds",
|
||||
"otel",
|
||||
"tui",
|
||||
@@ -171,6 +173,7 @@ codex-core-plugins = { path = "core-plugins" }
|
||||
codex-core-skills = { path = "core-skills" }
|
||||
codex-exec = { path = "exec" }
|
||||
codex-file-system = { path = "file-system" }
|
||||
codex-exec-server-protocol = { path = "exec-server-protocol" }
|
||||
codex-exec-server = { path = "exec-server" }
|
||||
codex-execpolicy = { path = "execpolicy" }
|
||||
codex-extension-api = { path = "ext/extension-api" }
|
||||
@@ -215,6 +218,7 @@ codex-rmcp-client = { path = "rmcp-client" }
|
||||
codex-rollout = { path = "rollout" }
|
||||
codex-rollout-trace = { path = "rollout-trace" }
|
||||
codex-sandboxing = { path = "sandboxing" }
|
||||
codex-schema-evolution = { path = "schema-evolution" }
|
||||
codex-secrets = { path = "secrets" }
|
||||
codex-shell-command = { path = "shell-command" }
|
||||
codex-shell-escalation = { path = "shell-escalation" }
|
||||
@@ -368,7 +372,7 @@ rcgen = { version = "0.14.7", default-features = false, features = [
|
||||
regex = "1.12.3"
|
||||
regex-lite = "0.1.8"
|
||||
reqwest = { version = "0.12", features = ["cookies"] }
|
||||
rmcp = { version = "1.7.0", default-features = false }
|
||||
rmcp = { version = "1.8.0", default-features = false }
|
||||
runfiles = { git = "https://github.com/dzbarsky/rules_rust", rev = "b56cbaa8465e74127f1ea216f813cd377295ad81" }
|
||||
rustls = { version = "0.23", default-features = false, features = [
|
||||
"aws_lc_rs",
|
||||
@@ -380,7 +384,7 @@ schemars = "0.8.22"
|
||||
seccompiler = "0.5.0"
|
||||
semver = "1.0"
|
||||
sentry = "0.46.0"
|
||||
serde = "1"
|
||||
serde = { version = "1", features = ["rc"] }
|
||||
serde_ignored = "0.1.14"
|
||||
serde_json = "1"
|
||||
serde_path_to_error = "0.1.20"
|
||||
@@ -409,6 +413,7 @@ strum_macros = "0.28.0"
|
||||
supports-color = "3.0.2"
|
||||
syntect = "5"
|
||||
sys-locale = "0.3.2"
|
||||
system-configuration = "0.7"
|
||||
tar = { version = "=0.4.45", default-features = false }
|
||||
tempfile = "3.23.0"
|
||||
test-log = "0.2.19"
|
||||
@@ -501,7 +506,6 @@ unwrap_used = "deny"
|
||||
# silence the false positive here instead of deleting a real dependency.
|
||||
[workspace.metadata.cargo-shear]
|
||||
ignored = [
|
||||
"codex-agent-graph-store",
|
||||
"icu_provider",
|
||||
"openssl-sys",
|
||||
"codex-v8-poc",
|
||||
|
||||
@@ -22,4 +22,4 @@ thiserror = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
|
||||
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "sync"] }
|
||||
@@ -9,4 +9,5 @@ pub use error::AgentGraphStoreError;
|
||||
pub use error::AgentGraphStoreResult;
|
||||
pub use local::LocalAgentGraphStore;
|
||||
pub use store::AgentGraphStore;
|
||||
pub use store::AgentGraphStoreFuture;
|
||||
pub use types::ThreadSpawnEdgeStatus;
|
||||
@@ -4,7 +4,7 @@ use std::sync::Arc;
|
||||
|
||||
use crate::AgentGraphStore;
|
||||
use crate::AgentGraphStoreError;
|
||||
use crate::AgentGraphStoreResult;
|
||||
use crate::AgentGraphStoreFuture;
|
||||
use crate::ThreadSpawnEdgeStatus;
|
||||
|
||||
/// SQLite-backed implementation of [`AgentGraphStore`] using an existing state runtime.
|
||||
@@ -29,65 +29,83 @@ impl LocalAgentGraphStore {
|
||||
}
|
||||
|
||||
impl AgentGraphStore for LocalAgentGraphStore {
|
||||
async fn upsert_thread_spawn_edge(
|
||||
fn upsert_thread_spawn_edge(
|
||||
&self,
|
||||
parent_thread_id: ThreadId,
|
||||
child_thread_id: ThreadId,
|
||||
status: ThreadSpawnEdgeStatus,
|
||||
) -> AgentGraphStoreResult<()> {
|
||||
self.state_db
|
||||
.upsert_thread_spawn_edge(parent_thread_id, child_thread_id, to_state_status(status))
|
||||
.await
|
||||
.map_err(internal_error)
|
||||
) -> AgentGraphStoreFuture<'_, ()> {
|
||||
Box::pin(async move {
|
||||
self.state_db
|
||||
.upsert_thread_spawn_edge(
|
||||
parent_thread_id,
|
||||
child_thread_id,
|
||||
to_state_status(status),
|
||||
)
|
||||
.await
|
||||
.map_err(internal_error)
|
||||
})
|
||||
}
|
||||
|
||||
async fn set_thread_spawn_edge_status(
|
||||
fn set_thread_spawn_edge_status(
|
||||
&self,
|
||||
child_thread_id: ThreadId,
|
||||
status: ThreadSpawnEdgeStatus,
|
||||
) -> AgentGraphStoreResult<()> {
|
||||
self.state_db
|
||||
.set_thread_spawn_edge_status(child_thread_id, to_state_status(status))
|
||||
.await
|
||||
.map_err(internal_error)
|
||||
) -> AgentGraphStoreFuture<'_, ()> {
|
||||
Box::pin(async move {
|
||||
self.state_db
|
||||
.set_thread_spawn_edge_status(child_thread_id, to_state_status(status))
|
||||
.await
|
||||
.map_err(internal_error)
|
||||
})
|
||||
}
|
||||
|
||||
async fn list_thread_spawn_children(
|
||||
fn list_thread_spawn_children(
|
||||
&self,
|
||||
parent_thread_id: ThreadId,
|
||||
status_filter: Option<ThreadSpawnEdgeStatus>,
|
||||
) -> AgentGraphStoreResult<Vec<ThreadId>> {
|
||||
if let Some(status) = status_filter {
|
||||
return self
|
||||
.state_db
|
||||
.list_thread_spawn_children_with_status(parent_thread_id, to_state_status(status))
|
||||
.await
|
||||
.map_err(internal_error);
|
||||
}
|
||||
) -> AgentGraphStoreFuture<'_, Vec<ThreadId>> {
|
||||
Box::pin(async move {
|
||||
if let Some(status) = status_filter {
|
||||
return self
|
||||
.state_db
|
||||
.list_thread_spawn_children_with_status(
|
||||
parent_thread_id,
|
||||
to_state_status(status),
|
||||
)
|
||||
.await
|
||||
.map_err(internal_error);
|
||||
}
|
||||
|
||||
self.state_db
|
||||
.list_thread_spawn_children(parent_thread_id)
|
||||
.await
|
||||
.map_err(internal_error)
|
||||
self.state_db
|
||||
.list_thread_spawn_children(parent_thread_id)
|
||||
.await
|
||||
.map_err(internal_error)
|
||||
})
|
||||
}
|
||||
|
||||
async fn list_thread_spawn_descendants(
|
||||
fn list_thread_spawn_descendants(
|
||||
&self,
|
||||
root_thread_id: ThreadId,
|
||||
status_filter: Option<ThreadSpawnEdgeStatus>,
|
||||
) -> AgentGraphStoreResult<Vec<ThreadId>> {
|
||||
match status_filter {
|
||||
Some(status) => self
|
||||
.state_db
|
||||
.list_thread_spawn_descendants_with_status(root_thread_id, to_state_status(status))
|
||||
.await
|
||||
.map_err(internal_error),
|
||||
None => self
|
||||
.state_db
|
||||
.list_thread_spawn_descendants(root_thread_id)
|
||||
.await
|
||||
.map_err(internal_error),
|
||||
}
|
||||
) -> AgentGraphStoreFuture<'_, Vec<ThreadId>> {
|
||||
Box::pin(async move {
|
||||
match status_filter {
|
||||
Some(status) => self
|
||||
.state_db
|
||||
.list_thread_spawn_descendants_with_status(
|
||||
root_thread_id,
|
||||
to_state_status(status),
|
||||
)
|
||||
.await
|
||||
.map_err(internal_error),
|
||||
None => self
|
||||
.state_db
|
||||
.list_thread_spawn_descendants(root_thread_id)
|
||||
.await
|
||||
.map_err(internal_error),
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
use std::future::Future;
|
||||
use std::pin::Pin;
|
||||
|
||||
use codex_protocol::ThreadId;
|
||||
|
||||
use crate::AgentGraphStoreResult;
|
||||
use crate::ThreadSpawnEdgeStatus;
|
||||
|
||||
/// Future returned by [`AgentGraphStore`] operations.
|
||||
pub type AgentGraphStoreFuture<'a, T> =
|
||||
Pin<Box<dyn Future<Output = AgentGraphStoreResult<T>> + Send + 'a>>;
|
||||
|
||||
/// Storage-neutral boundary for persisted thread-spawn parent/child topology.
|
||||
///
|
||||
/// Implementations are expected to return stable ordering for list methods so callers can merge
|
||||
@@ -17,7 +24,7 @@ pub trait AgentGraphStore: Send + Sync {
|
||||
parent_thread_id: ThreadId,
|
||||
child_thread_id: ThreadId,
|
||||
status: ThreadSpawnEdgeStatus,
|
||||
) -> impl std::future::Future<Output = AgentGraphStoreResult<()>> + Send;
|
||||
) -> AgentGraphStoreFuture<'_, ()>;
|
||||
|
||||
/// Update the persisted lifecycle status of a spawned thread's incoming edge.
|
||||
///
|
||||
@@ -26,7 +33,7 @@ pub trait AgentGraphStore: Send + Sync {
|
||||
&self,
|
||||
child_thread_id: ThreadId,
|
||||
status: ThreadSpawnEdgeStatus,
|
||||
) -> impl std::future::Future<Output = AgentGraphStoreResult<()>> + Send;
|
||||
) -> AgentGraphStoreFuture<'_, ()>;
|
||||
|
||||
/// List direct spawned children of a parent thread.
|
||||
///
|
||||
@@ -37,7 +44,7 @@ pub trait AgentGraphStore: Send + Sync {
|
||||
&self,
|
||||
parent_thread_id: ThreadId,
|
||||
status_filter: Option<ThreadSpawnEdgeStatus>,
|
||||
) -> impl std::future::Future<Output = AgentGraphStoreResult<Vec<ThreadId>>> + Send;
|
||||
) -> AgentGraphStoreFuture<'_, Vec<ThreadId>>;
|
||||
|
||||
/// List spawned descendants breadth-first by depth, then by thread id.
|
||||
///
|
||||
@@ -49,5 +56,5 @@ pub trait AgentGraphStore: Send + Sync {
|
||||
&self,
|
||||
root_thread_id: ThreadId,
|
||||
status_filter: Option<ThreadSpawnEdgeStatus>,
|
||||
) -> impl std::future::Future<Output = AgentGraphStoreResult<Vec<ThreadId>>> + Send;
|
||||
) -> AgentGraphStoreFuture<'_, Vec<ThreadId>>;
|
||||
}
|
||||
@@ -62,6 +62,10 @@ use crate::facts::HookRunInput;
|
||||
use crate::facts::InputError;
|
||||
use crate::facts::InvocationType;
|
||||
use crate::facts::PluginInstallFailedInput;
|
||||
use crate::facts::PluginInstallRequestSource;
|
||||
use crate::facts::PluginInstallRequested;
|
||||
use crate::facts::PluginInstallRequestedInput;
|
||||
use crate::facts::PluginInstallRequestedPlugin;
|
||||
use crate::facts::PluginState;
|
||||
use crate::facts::PluginStateChangedInput;
|
||||
use crate::facts::PluginUsedInput;
|
||||
@@ -168,6 +172,17 @@ use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
const TEST_PRODUCT_CLIENT_ID: &str = "codex_work_desktop";
|
||||
|
||||
fn test_tracking_context(thread_id: &str, turn_id: &str) -> TrackEventsContext {
|
||||
TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: thread_id.to_string(),
|
||||
turn_id: turn_id.to_string(),
|
||||
product_client_id: TEST_PRODUCT_CLIENT_ID.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
fn sample_thread_with_metadata(
|
||||
thread_id: &str,
|
||||
ephemeral: bool,
|
||||
@@ -177,6 +192,7 @@ fn sample_thread_with_metadata(
|
||||
) -> Thread {
|
||||
Thread {
|
||||
id: thread_id.to_string(),
|
||||
extra: None,
|
||||
session_id: format!("session-{thread_id}"),
|
||||
forked_from_id: None,
|
||||
parent_thread_id,
|
||||
@@ -219,7 +235,7 @@ fn sample_thread_start_response(
|
||||
cwd: test_path_buf("/tmp").abs(),
|
||||
runtime_workspace_roots: Vec::new(),
|
||||
instruction_sources: Vec::new(),
|
||||
approval_policy: AppServerAskForApproval::OnFailure,
|
||||
approval_policy: AppServerAskForApproval::OnRequest,
|
||||
approvals_reviewer: AppServerApprovalsReviewer::User,
|
||||
sandbox: AppServerSandboxPolicy::DangerFullAccess,
|
||||
active_permission_profile: None,
|
||||
@@ -284,7 +300,7 @@ fn sample_thread_resume_response_with_source(
|
||||
cwd: test_path_buf("/tmp").abs(),
|
||||
runtime_workspace_roots: Vec::new(),
|
||||
instruction_sources: Vec::new(),
|
||||
approval_policy: AppServerAskForApproval::OnFailure,
|
||||
approval_policy: AppServerAskForApproval::OnRequest,
|
||||
approvals_reviewer: AppServerApprovalsReviewer::User,
|
||||
sandbox: AppServerSandboxPolicy::DangerFullAccess,
|
||||
active_permission_profile: None,
|
||||
@@ -1023,11 +1039,7 @@ fn normalize_path_for_skill_id_repo_root_not_in_skill_path_uses_absolute_path()
|
||||
|
||||
#[test]
|
||||
fn app_mentioned_event_serializes_expected_shape() {
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
let event = TrackEventRequest::AppMentioned(CodexAppMentionedEventRequest {
|
||||
event_type: "codex_app_mentioned",
|
||||
event_params: codex_app_metadata(
|
||||
@@ -1051,7 +1063,7 @@ fn app_mentioned_event_serializes_expected_shape() {
|
||||
"thread_id": "thread-1",
|
||||
"turn_id": "turn-1",
|
||||
"app_name": "Calendar",
|
||||
"product_client_id": originator().value,
|
||||
"product_client_id": TEST_PRODUCT_CLIENT_ID,
|
||||
"invoke_type": "explicit",
|
||||
"model_slug": "gpt-5"
|
||||
}
|
||||
@@ -1061,11 +1073,7 @@ fn app_mentioned_event_serializes_expected_shape() {
|
||||
|
||||
#[test]
|
||||
fn app_used_event_serializes_expected_shape() {
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-2".to_string(),
|
||||
turn_id: "turn-2".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-2", "turn-2");
|
||||
let event = TrackEventRequest::AppUsed(CodexAppUsedEventRequest {
|
||||
event_type: "codex_app_used",
|
||||
event_params: codex_app_metadata(
|
||||
@@ -1089,7 +1097,7 @@ fn app_used_event_serializes_expected_shape() {
|
||||
"thread_id": "thread-2",
|
||||
"turn_id": "turn-2",
|
||||
"app_name": "Google Drive",
|
||||
"product_client_id": originator().value,
|
||||
"product_client_id": TEST_PRODUCT_CLIENT_ID,
|
||||
"invoke_type": "implicit",
|
||||
"model_slug": "gpt-5"
|
||||
}
|
||||
@@ -1380,16 +1388,8 @@ fn app_used_dedupe_is_keyed_by_turn_and_connector() {
|
||||
invocation_type: Some(InvocationType::Implicit),
|
||||
};
|
||||
|
||||
let turn_1 = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let turn_2 = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-2".to_string(),
|
||||
};
|
||||
let turn_1 = test_tracking_context("thread-1", "turn-1");
|
||||
let turn_2 = test_tracking_context("thread-1", "turn-2");
|
||||
|
||||
assert_eq!(queue.should_enqueue_app_used(&turn_1, &app), true);
|
||||
assert_eq!(queue.should_enqueue_app_used(&turn_1, &app), false);
|
||||
@@ -3008,11 +3008,7 @@ async fn subagent_tool_items_inherit_parent_connection_metadata() {
|
||||
|
||||
#[test]
|
||||
fn plugin_used_event_serializes_expected_shape() {
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-3".to_string(),
|
||||
turn_id: "turn-3".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-3", "turn-3");
|
||||
let event = TrackEventRequest::PluginUsed(CodexPluginUsedEventRequest {
|
||||
event_type: "codex_plugin_used",
|
||||
event_params: codex_plugin_used_metadata(&tracking, sample_plugin_metadata()),
|
||||
@@ -3026,12 +3022,13 @@ fn plugin_used_event_serializes_expected_shape() {
|
||||
"event_type": "codex_plugin_used",
|
||||
"event_params": {
|
||||
"plugin_id": "sample@test",
|
||||
"remote_plugin_id": null,
|
||||
"plugin_name": "sample",
|
||||
"marketplace_name": "test",
|
||||
"has_skills": true,
|
||||
"mcp_server_count": 2,
|
||||
"connector_ids": ["calendar", "drive"],
|
||||
"product_client_id": originator().value,
|
||||
"product_client_id": TEST_PRODUCT_CLIENT_ID,
|
||||
"mcp_server_names": ["mcp-1", "mcp-2"],
|
||||
"thread_id": "thread-3",
|
||||
"turn_id": "turn-3",
|
||||
@@ -3056,6 +3053,7 @@ fn plugin_management_event_serializes_expected_shape() {
|
||||
"event_type": "codex_plugin_installed",
|
||||
"event_params": {
|
||||
"plugin_id": "sample@test",
|
||||
"remote_plugin_id": null,
|
||||
"plugin_name": "sample",
|
||||
"marketplace_name": "test",
|
||||
"has_skills": true,
|
||||
@@ -3085,6 +3083,7 @@ fn plugin_install_failed_event_serializes_expected_shape() {
|
||||
"event_type": "codex_plugin_install_failed",
|
||||
"event_params": {
|
||||
"plugin_id": "sample@test",
|
||||
"remote_plugin_id": null,
|
||||
"plugin_name": "sample",
|
||||
"marketplace_name": "test",
|
||||
"has_skills": true,
|
||||
@@ -3098,7 +3097,7 @@ fn plugin_install_failed_event_serializes_expected_shape() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_management_event_can_use_remote_plugin_id_override() {
|
||||
fn plugin_management_event_keeps_plugin_id_local_when_remote_id_exists() {
|
||||
let mut plugin = sample_plugin_metadata();
|
||||
plugin.remote_plugin_id = Some("plugins~Plugin_remote".to_string());
|
||||
let event = TrackEventRequest::PluginInstalled(CodexPluginEventRequest {
|
||||
@@ -3109,20 +3108,26 @@ fn plugin_management_event_can_use_remote_plugin_id_override() {
|
||||
let payload = serde_json::to_value(&event).expect("serialize plugin installed event");
|
||||
|
||||
assert_eq!(
|
||||
payload["event_params"]["plugin_id"],
|
||||
"plugins~Plugin_remote"
|
||||
payload,
|
||||
json!({
|
||||
"event_type": "codex_plugin_installed",
|
||||
"event_params": {
|
||||
"plugin_id": "sample@test",
|
||||
"remote_plugin_id": "plugins~Plugin_remote",
|
||||
"plugin_name": "sample",
|
||||
"marketplace_name": "test",
|
||||
"has_skills": true,
|
||||
"mcp_server_count": 2,
|
||||
"connector_ids": ["calendar", "drive"],
|
||||
"product_client_id": originator().value
|
||||
}
|
||||
})
|
||||
);
|
||||
assert_eq!(payload["event_params"]["plugin_name"], "sample");
|
||||
assert_eq!(payload["event_params"]["marketplace_name"], "test");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hook_run_event_serializes_expected_shape() {
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-3".to_string(),
|
||||
turn_id: "turn-3".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-3", "turn-3");
|
||||
let event = TrackEventRequest::HookRun(CodexHookRunEventRequest {
|
||||
event_type: "codex_hook_run",
|
||||
event_params: codex_hook_run_metadata(
|
||||
@@ -3144,6 +3149,7 @@ fn hook_run_event_serializes_expected_shape() {
|
||||
"event_params": {
|
||||
"thread_id": "thread-3",
|
||||
"turn_id": "turn-3",
|
||||
"product_client_id": TEST_PRODUCT_CLIENT_ID,
|
||||
"model_slug": "gpt-5",
|
||||
"hook_name": "PreToolUse",
|
||||
"hook_source": "user",
|
||||
@@ -3155,11 +3161,7 @@ fn hook_run_event_serializes_expected_shape() {
|
||||
|
||||
#[test]
|
||||
fn hook_run_metadata_maps_sources_and_statuses() {
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
|
||||
let system = serde_json::to_value(codex_hook_run_metadata(
|
||||
&tracking,
|
||||
@@ -3210,11 +3212,7 @@ fn hook_run_metadata_maps_sources_and_statuses() {
|
||||
|
||||
#[test]
|
||||
fn hook_run_metadata_maps_stopped_status() {
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
|
||||
let stopped = serde_json::to_value(codex_hook_run_metadata(
|
||||
&tracking,
|
||||
@@ -3240,16 +3238,8 @@ fn plugin_used_dedupe_is_keyed_by_turn_and_plugin() {
|
||||
};
|
||||
let plugin = sample_plugin_metadata();
|
||||
|
||||
let turn_1 = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let turn_2 = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-2".to_string(),
|
||||
};
|
||||
let turn_1 = test_tracking_context("thread-1", "turn-1");
|
||||
let turn_2 = test_tracking_context("thread-1", "turn-2");
|
||||
|
||||
assert_eq!(queue.should_enqueue_plugin_used(&turn_1, &plugin), true);
|
||||
assert_eq!(queue.should_enqueue_plugin_used(&turn_1, &plugin), false);
|
||||
@@ -3260,11 +3250,7 @@ fn plugin_used_dedupe_is_keyed_by_turn_and_plugin() {
|
||||
async fn reducer_ingests_skill_invoked_fact() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
let skill_path = PathBuf::from("/Users/abc/.codex/skills/doc/SKILL.md");
|
||||
let expected_skill_id = skill_id_for_local_skill(
|
||||
/*repo_url*/ None,
|
||||
@@ -3297,7 +3283,7 @@ async fn reducer_ingests_skill_invoked_fact() {
|
||||
"skill_id": expected_skill_id,
|
||||
"skill_name": "doc",
|
||||
"event_params": {
|
||||
"product_client_id": originator().value,
|
||||
"product_client_id": TEST_PRODUCT_CLIENT_ID,
|
||||
"skill_scope": "user",
|
||||
"plugin_id": null,
|
||||
"repo_url": null,
|
||||
@@ -3314,11 +3300,7 @@ async fn reducer_ingests_skill_invoked_fact() {
|
||||
async fn reducer_includes_plugin_id_for_plugin_skill_invocations() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
let skill_path =
|
||||
PathBuf::from("/Users/abc/.codex/plugins/cache/test/sample/skills/doc/SKILL.md");
|
||||
|
||||
@@ -3353,11 +3335,7 @@ async fn reducer_ingests_hook_run_fact() {
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Custom(CustomAnalyticsFact::HookRun(HookRunInput {
|
||||
tracking: TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
},
|
||||
tracking: test_tracking_context("thread-1", "turn-1"),
|
||||
hook: HookRunFact {
|
||||
event_name: HookEventName::PostToolUse,
|
||||
hook_source: HookSource::Unknown,
|
||||
@@ -3380,11 +3358,7 @@ async fn reducer_ingests_hook_run_fact() {
|
||||
async fn reducer_ingests_app_and_plugin_facts() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
let tracking = TrackEventsContext {
|
||||
model_slug: "gpt-5".to_string(),
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
};
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
|
||||
reducer
|
||||
.ingest(
|
||||
@@ -3427,6 +3401,18 @@ async fn reducer_ingests_app_and_plugin_facts() {
|
||||
assert_eq!(payload[0]["event_type"], "codex_app_mentioned");
|
||||
assert_eq!(payload[1]["event_type"], "codex_app_used");
|
||||
assert_eq!(payload[2]["event_type"], "codex_plugin_used");
|
||||
assert_eq!(
|
||||
payload[0]["event_params"]["product_client_id"],
|
||||
TEST_PRODUCT_CLIENT_ID
|
||||
);
|
||||
assert_eq!(
|
||||
payload[1]["event_params"]["product_client_id"],
|
||||
TEST_PRODUCT_CLIENT_ID
|
||||
);
|
||||
assert_eq!(
|
||||
payload[2]["event_params"]["product_client_id"],
|
||||
TEST_PRODUCT_CLIENT_ID
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
@@ -3453,6 +3439,7 @@ async fn reducer_ingests_plugin_state_changed_fact() {
|
||||
"event_type": "codex_plugin_disabled",
|
||||
"event_params": {
|
||||
"plugin_id": "sample@test",
|
||||
"remote_plugin_id": null,
|
||||
"plugin_name": "sample",
|
||||
"marketplace_name": "test",
|
||||
"has_skills": true,
|
||||
@@ -3464,6 +3451,66 @@ async fn reducer_ingests_plugin_state_changed_fact() {
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn reducer_ingests_plugin_install_requested_fact() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
let tracking = test_tracking_context("thread-1", "turn-1");
|
||||
let request = PluginInstallRequested {
|
||||
suggestion_id: "request_plugin_install_call-1".to_string(),
|
||||
plugins: vec![
|
||||
PluginInstallRequestedPlugin {
|
||||
plugin_id: "calendar@openai-curated-remote".to_string(),
|
||||
remote_plugin_id: Some("plugin_calendar".to_string()),
|
||||
plugin_name: "Calendar".to_string(),
|
||||
connector_ids: vec!["connector_calendar".to_string()],
|
||||
},
|
||||
PluginInstallRequestedPlugin {
|
||||
plugin_id: "github@openai-curated-remote".to_string(),
|
||||
remote_plugin_id: None,
|
||||
plugin_name: "GitHub".to_string(),
|
||||
connector_ids: vec!["connector_github".to_string()],
|
||||
},
|
||||
],
|
||||
source: PluginInstallRequestSource::EndpointRecommendation,
|
||||
};
|
||||
|
||||
reducer
|
||||
.ingest(
|
||||
AnalyticsFact::Custom(CustomAnalyticsFact::PluginInstallRequested(
|
||||
PluginInstallRequestedInput { tracking, request },
|
||||
)),
|
||||
&mut events,
|
||||
)
|
||||
.await;
|
||||
|
||||
assert_eq!(
|
||||
serde_json::to_value(&events).expect("serialize events"),
|
||||
json!([{
|
||||
"event_type": "codex_plugin_install_requested",
|
||||
"event_params": {
|
||||
"suggestion_id": "request_plugin_install_call-1",
|
||||
"plugins": [{
|
||||
"plugin_id": "calendar@openai-curated-remote",
|
||||
"remote_plugin_id": "plugin_calendar",
|
||||
"plugin_name": "Calendar",
|
||||
"connector_ids": ["connector_calendar"],
|
||||
}, {
|
||||
"plugin_id": "github@openai-curated-remote",
|
||||
"remote_plugin_id": null,
|
||||
"plugin_name": "GitHub",
|
||||
"connector_ids": ["connector_github"],
|
||||
}],
|
||||
"source": "endpoint_recommendation",
|
||||
"thread_id": "thread-1",
|
||||
"turn_id": "turn-1",
|
||||
"model_slug": "gpt-5",
|
||||
"product_client_id": originator().value,
|
||||
}
|
||||
}])
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn reducer_ingests_plugin_install_failed_fact() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
@@ -3488,6 +3535,7 @@ async fn reducer_ingests_plugin_install_failed_fact() {
|
||||
"event_type": "codex_plugin_install_failed",
|
||||
"event_params": {
|
||||
"plugin_id": "sample@test",
|
||||
"remote_plugin_id": null,
|
||||
"plugin_name": "sample",
|
||||
"marketplace_name": "test",
|
||||
"has_skills": true,
|
||||
@@ -3505,7 +3553,7 @@ async fn reducer_ingests_plugin_install_failed_fact_without_detail() {
|
||||
let mut reducer = AnalyticsReducer::default();
|
||||
let mut events = Vec::new();
|
||||
let plugin = PluginTelemetryMetadata {
|
||||
plugin_id: PluginId::parse("unknown@openai-curated-remote").expect("valid plugin id"),
|
||||
plugin_id: None,
|
||||
remote_plugin_id: Some("plugins~Plugin_00000000000000000000000000000000".to_string()),
|
||||
capability_summary: None,
|
||||
};
|
||||
@@ -3528,9 +3576,10 @@ async fn reducer_ingests_plugin_install_failed_fact_without_detail() {
|
||||
json!([{
|
||||
"event_type": "codex_plugin_install_failed",
|
||||
"event_params": {
|
||||
"plugin_id": "plugins~Plugin_00000000000000000000000000000000",
|
||||
"plugin_name": "unknown",
|
||||
"marketplace_name": "openai-curated-remote",
|
||||
"plugin_id": null,
|
||||
"remote_plugin_id": "plugins~Plugin_00000000000000000000000000000000",
|
||||
"plugin_name": null,
|
||||
"marketplace_name": null,
|
||||
"has_skills": null,
|
||||
"mcp_server_count": null,
|
||||
"connector_ids": null,
|
||||
@@ -4569,7 +4618,7 @@ async fn turn_completed_without_started_notification_emits_null_started_at() {
|
||||
|
||||
fn sample_plugin_metadata() -> PluginTelemetryMetadata {
|
||||
PluginTelemetryMetadata {
|
||||
plugin_id: PluginId::parse("sample@test").expect("valid plugin id"),
|
||||
plugin_id: Some(PluginId::parse("sample@test").expect("valid plugin id")),
|
||||
remote_plugin_id: None,
|
||||
capability_summary: Some(PluginCapabilitySummary {
|
||||
config_name: "sample@test".to_string(),
|
||||
|
||||
@@ -16,6 +16,8 @@ use crate::facts::ExternalAgentConfigImportFailureInput;
|
||||
use crate::facts::HookRunFact;
|
||||
use crate::facts::HookRunInput;
|
||||
use crate::facts::PluginInstallFailedInput;
|
||||
use crate::facts::PluginInstallRequested;
|
||||
use crate::facts::PluginInstallRequestedInput;
|
||||
use crate::facts::PluginState;
|
||||
use crate::facts::PluginStateChangedInput;
|
||||
use crate::facts::SkillInvocation;
|
||||
@@ -38,6 +40,7 @@ use codex_app_server_protocol::ServerResponse;
|
||||
use codex_login::AuthManager;
|
||||
use codex_login::CodexAuth;
|
||||
use codex_login::default_client::create_client;
|
||||
use codex_plugin::PluginId;
|
||||
use codex_plugin::PluginTelemetryMetadata;
|
||||
use codex_protocol::request_permissions::RequestPermissionsResponse;
|
||||
use std::collections::HashSet;
|
||||
@@ -173,7 +176,15 @@ impl AnalyticsEventsQueue {
|
||||
if emitted.len() >= ANALYTICS_EVENT_DEDUPE_MAX_KEYS {
|
||||
emitted.clear();
|
||||
}
|
||||
emitted.insert((tracking.turn_id.clone(), plugin.plugin_id.as_key()))
|
||||
let Some(plugin_id) = plugin
|
||||
.plugin_id
|
||||
.as_ref()
|
||||
.map(PluginId::as_key)
|
||||
.or_else(|| plugin.remote_plugin_id.clone())
|
||||
else {
|
||||
return true;
|
||||
};
|
||||
emitted.insert((tracking.turn_id.clone(), plugin_id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,6 +312,19 @@ impl AnalyticsEventsClient {
|
||||
)));
|
||||
}
|
||||
|
||||
pub fn track_plugin_install_requested(
|
||||
&self,
|
||||
tracking: TrackEventsContext,
|
||||
request: PluginInstallRequested,
|
||||
) {
|
||||
self.record_fact(AnalyticsFact::Custom(
|
||||
CustomAnalyticsFact::PluginInstallRequested(PluginInstallRequestedInput {
|
||||
tracking,
|
||||
request,
|
||||
}),
|
||||
));
|
||||
}
|
||||
|
||||
pub fn track_compaction(&self, event: crate::facts::CodexCompactionEvent) {
|
||||
self.record_fact(AnalyticsFact::Custom(CustomAnalyticsFact::Compaction(
|
||||
Box::new(event),
|
||||
|
||||
@@ -277,6 +277,7 @@ fn sample_thread_archive_request() -> ClientRequest {
|
||||
fn sample_thread(thread_id: &str) -> Thread {
|
||||
Thread {
|
||||
id: thread_id.to_string(),
|
||||
extra: None,
|
||||
session_id: format!("session-{thread_id}"),
|
||||
forked_from_id: None,
|
||||
parent_thread_id: None,
|
||||
@@ -309,7 +310,7 @@ fn sample_thread_start_response() -> ClientResponsePayload {
|
||||
cwd: test_path_buf("/tmp").abs(),
|
||||
runtime_workspace_roots: Vec::new(),
|
||||
instruction_sources: Vec::new(),
|
||||
approval_policy: AppServerAskForApproval::OnFailure,
|
||||
approval_policy: AppServerAskForApproval::OnRequest,
|
||||
approvals_reviewer: AppServerApprovalsReviewer::User,
|
||||
sandbox: AppServerSandboxPolicy::DangerFullAccess,
|
||||
active_permission_profile: None,
|
||||
@@ -327,7 +328,7 @@ fn sample_thread_resume_response() -> ClientResponsePayload {
|
||||
cwd: test_path_buf("/tmp").abs(),
|
||||
runtime_workspace_roots: Vec::new(),
|
||||
instruction_sources: Vec::new(),
|
||||
approval_policy: AppServerAskForApproval::OnFailure,
|
||||
approval_policy: AppServerAskForApproval::OnRequest,
|
||||
approvals_reviewer: AppServerApprovalsReviewer::User,
|
||||
sandbox: AppServerSandboxPolicy::DangerFullAccess,
|
||||
active_permission_profile: None,
|
||||
@@ -346,7 +347,7 @@ fn sample_thread_fork_response() -> ClientResponsePayload {
|
||||
cwd: test_path_buf("/tmp").abs(),
|
||||
runtime_workspace_roots: Vec::new(),
|
||||
instruction_sources: Vec::new(),
|
||||
approval_policy: AppServerAskForApproval::OnFailure,
|
||||
approval_policy: AppServerAskForApproval::OnRequest,
|
||||
approvals_reviewer: AppServerApprovalsReviewer::User,
|
||||
sandbox: AppServerSandboxPolicy::DangerFullAccess,
|
||||
active_permission_profile: None,
|
||||
|
||||
@@ -14,6 +14,7 @@ use crate::facts::CompactionTrigger;
|
||||
use crate::facts::GoalEventKind;
|
||||
use crate::facts::HookRunFact;
|
||||
use crate::facts::InvocationType;
|
||||
use crate::facts::PluginInstallRequested;
|
||||
use crate::facts::PluginState;
|
||||
use crate::facts::SubAgentThreadStartedInput;
|
||||
use crate::facts::ThreadInitializationMode;
|
||||
@@ -26,6 +27,7 @@ use crate::now_unix_millis;
|
||||
use codex_app_server_protocol::CodexErrorInfo;
|
||||
use codex_app_server_protocol::CommandExecutionSource;
|
||||
use codex_login::default_client::originator;
|
||||
use codex_plugin::PluginId;
|
||||
use codex_plugin::PluginTelemetryMetadata;
|
||||
use codex_protocol::approvals::NetworkApprovalProtocol;
|
||||
use codex_protocol::models::AdditionalPermissionProfile;
|
||||
@@ -79,6 +81,7 @@ pub(crate) enum TrackEventRequest {
|
||||
#[allow(dead_code)]
|
||||
ReviewEvent(CodexReviewEventRequest),
|
||||
PluginUsed(CodexPluginUsedEventRequest),
|
||||
PluginInstallRequested(CodexPluginInstallRequestedEventRequest),
|
||||
PluginInstalled(CodexPluginEventRequest),
|
||||
PluginUninstalled(CodexPluginEventRequest),
|
||||
PluginEnabled(CodexPluginEventRequest),
|
||||
@@ -772,6 +775,7 @@ pub(crate) struct CodexAppUsedEventRequest {
|
||||
pub(crate) struct CodexHookRunMetadata {
|
||||
pub(crate) thread_id: Option<String>,
|
||||
pub(crate) turn_id: Option<String>,
|
||||
pub(crate) product_client_id: Option<String>,
|
||||
pub(crate) model_slug: Option<String>,
|
||||
pub(crate) hook_name: Option<String>,
|
||||
pub(crate) hook_source: Option<&'static str>,
|
||||
@@ -933,6 +937,7 @@ pub(crate) struct CodexTurnSteerEventRequest {
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexPluginMetadata {
|
||||
pub(crate) plugin_id: Option<String>,
|
||||
pub(crate) remote_plugin_id: Option<String>,
|
||||
pub(crate) plugin_name: Option<String>,
|
||||
pub(crate) marketplace_name: Option<String>,
|
||||
pub(crate) has_skills: Option<bool>,
|
||||
@@ -951,6 +956,31 @@ pub(crate) struct CodexPluginUsedMetadata {
|
||||
pub(crate) model_slug: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexPluginInstallRequestedPluginMetadata {
|
||||
pub(crate) plugin_id: String,
|
||||
pub(crate) remote_plugin_id: Option<String>,
|
||||
pub(crate) plugin_name: String,
|
||||
pub(crate) connector_ids: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexPluginInstallRequestedMetadata {
|
||||
pub(crate) suggestion_id: String,
|
||||
pub(crate) plugins: Vec<CodexPluginInstallRequestedPluginMetadata>,
|
||||
pub(crate) source: crate::facts::PluginInstallRequestSource,
|
||||
pub(crate) thread_id: String,
|
||||
pub(crate) turn_id: String,
|
||||
pub(crate) model_slug: String,
|
||||
pub(crate) product_client_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexPluginInstallRequestedEventRequest {
|
||||
pub(crate) event_type: &'static str,
|
||||
pub(crate) event_params: CodexPluginInstallRequestedMetadata,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub(crate) struct CodexPluginEventRequest {
|
||||
pub(crate) event_type: &'static str,
|
||||
@@ -1028,23 +1058,32 @@ pub(crate) fn codex_app_metadata(
|
||||
thread_id: Some(tracking.thread_id.clone()),
|
||||
turn_id: Some(tracking.turn_id.clone()),
|
||||
app_name: app.app_name,
|
||||
product_client_id: Some(originator().value),
|
||||
product_client_id: Some(tracking.product_client_id.clone()),
|
||||
invoke_type: app.invocation_type,
|
||||
model_slug: Some(tracking.model_slug.clone()),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn codex_plugin_metadata(plugin: PluginTelemetryMetadata) -> CodexPluginMetadata {
|
||||
codex_plugin_metadata_with_product_client_id(plugin, originator().value)
|
||||
}
|
||||
|
||||
fn codex_plugin_metadata_with_product_client_id(
|
||||
plugin: PluginTelemetryMetadata,
|
||||
product_client_id: String,
|
||||
) -> CodexPluginMetadata {
|
||||
let PluginTelemetryMetadata {
|
||||
plugin_id,
|
||||
remote_plugin_id,
|
||||
capability_summary,
|
||||
} = plugin;
|
||||
let event_plugin_id = remote_plugin_id.unwrap_or_else(|| plugin_id.as_key());
|
||||
CodexPluginMetadata {
|
||||
plugin_id: Some(event_plugin_id),
|
||||
plugin_name: Some(plugin_id.plugin_name),
|
||||
marketplace_name: Some(plugin_id.marketplace_name),
|
||||
plugin_id: plugin_id.as_ref().map(PluginId::as_key),
|
||||
remote_plugin_id,
|
||||
plugin_name: plugin_id
|
||||
.as_ref()
|
||||
.map(|plugin_id| plugin_id.plugin_name.clone()),
|
||||
marketplace_name: plugin_id.map(|plugin_id| plugin_id.marketplace_name),
|
||||
has_skills: capability_summary
|
||||
.as_ref()
|
||||
.map(|summary| summary.has_skills),
|
||||
@@ -1058,6 +1097,30 @@ pub(crate) fn codex_plugin_metadata(plugin: PluginTelemetryMetadata) -> CodexPlu
|
||||
.map(|connector_id| connector_id.0)
|
||||
.collect()
|
||||
}),
|
||||
product_client_id: Some(product_client_id),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn codex_plugin_install_requested_metadata(
|
||||
tracking: &TrackEventsContext,
|
||||
request: PluginInstallRequested,
|
||||
) -> CodexPluginInstallRequestedMetadata {
|
||||
CodexPluginInstallRequestedMetadata {
|
||||
suggestion_id: request.suggestion_id,
|
||||
plugins: request
|
||||
.plugins
|
||||
.into_iter()
|
||||
.map(|plugin| CodexPluginInstallRequestedPluginMetadata {
|
||||
plugin_id: plugin.plugin_id,
|
||||
remote_plugin_id: plugin.remote_plugin_id,
|
||||
plugin_name: plugin.plugin_name,
|
||||
connector_ids: plugin.connector_ids,
|
||||
})
|
||||
.collect(),
|
||||
source: request.source,
|
||||
thread_id: tracking.thread_id.clone(),
|
||||
turn_id: tracking.turn_id.clone(),
|
||||
model_slug: tracking.model_slug.clone(),
|
||||
product_client_id: Some(originator().value),
|
||||
}
|
||||
}
|
||||
@@ -1135,7 +1198,10 @@ pub(crate) fn codex_plugin_used_metadata(
|
||||
.as_ref()
|
||||
.map(|summary| summary.mcp_server_names.clone());
|
||||
CodexPluginUsedMetadata {
|
||||
plugin: codex_plugin_metadata(plugin),
|
||||
plugin: codex_plugin_metadata_with_product_client_id(
|
||||
plugin,
|
||||
tracking.product_client_id.clone(),
|
||||
),
|
||||
mcp_server_names,
|
||||
thread_id: Some(tracking.thread_id.clone()),
|
||||
turn_id: Some(tracking.turn_id.clone()),
|
||||
@@ -1150,6 +1216,7 @@ pub(crate) fn codex_hook_run_metadata(
|
||||
CodexHookRunMetadata {
|
||||
thread_id: Some(tracking.thread_id.clone()),
|
||||
turn_id: Some(tracking.turn_id.clone()),
|
||||
product_client_id: Some(tracking.product_client_id.clone()),
|
||||
model_slug: Some(tracking.model_slug.clone()),
|
||||
hook_name: Some(analytics_hook_event_name(hook.event_name).to_owned()),
|
||||
hook_source: Some(analytics_hook_source(hook.hook_source)),
|
||||
|
||||
@@ -41,17 +41,20 @@ pub struct TrackEventsContext {
|
||||
pub model_slug: String,
|
||||
pub thread_id: String,
|
||||
pub turn_id: String,
|
||||
pub product_client_id: String,
|
||||
}
|
||||
|
||||
pub fn build_track_events_context(
|
||||
model_slug: String,
|
||||
thread_id: String,
|
||||
turn_id: String,
|
||||
product_client_id: String,
|
||||
) -> TrackEventsContext {
|
||||
TrackEventsContext {
|
||||
model_slug,
|
||||
thread_id,
|
||||
turn_id,
|
||||
product_client_id,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +142,7 @@ impl TurnCodexErrorFact {
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum CodexErrKind {
|
||||
TurnAborted,
|
||||
SessionBudgetExceeded,
|
||||
Stream,
|
||||
ContextWindowExceeded,
|
||||
ThreadNotFound,
|
||||
@@ -195,6 +199,7 @@ impl From<&CodexErr> for CodexErrKind {
|
||||
fn from(error: &CodexErr) -> Self {
|
||||
match error {
|
||||
CodexErr::TurnAborted => CodexErrKind::TurnAborted,
|
||||
CodexErr::SessionBudgetExceeded => CodexErrKind::SessionBudgetExceeded,
|
||||
CodexErr::Stream(..) => CodexErrKind::Stream,
|
||||
CodexErr::ContextWindowExceeded => CodexErrKind::ContextWindowExceeded,
|
||||
CodexErr::ThreadNotFound(_) => CodexErrKind::ThreadNotFound,
|
||||
@@ -503,6 +508,7 @@ pub(crate) enum CustomAnalyticsFact {
|
||||
AppUsed(AppUsedInput),
|
||||
HookRun(HookRunInput),
|
||||
PluginUsed(PluginUsedInput),
|
||||
PluginInstallRequested(PluginInstallRequestedInput),
|
||||
PluginStateChanged(PluginStateChangedInput),
|
||||
PluginInstallFailed(PluginInstallFailedInput),
|
||||
ExternalAgentConfigImportCompleted(ExternalAgentConfigImportCompletedInput),
|
||||
@@ -540,6 +546,33 @@ pub(crate) struct PluginUsedInput {
|
||||
pub plugin: PluginTelemetryMetadata,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum PluginInstallRequestSource {
|
||||
EndpointRecommendation,
|
||||
LegacyDiscovery,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct PluginInstallRequested {
|
||||
pub suggestion_id: String,
|
||||
pub plugins: Vec<PluginInstallRequestedPlugin>,
|
||||
pub source: PluginInstallRequestSource,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct PluginInstallRequestedPlugin {
|
||||
pub plugin_id: String,
|
||||
pub remote_plugin_id: Option<String>,
|
||||
pub plugin_name: String,
|
||||
pub connector_ids: Vec<String>,
|
||||
}
|
||||
|
||||
pub(crate) struct PluginInstallRequestedInput {
|
||||
pub tracking: TrackEventsContext,
|
||||
pub request: PluginInstallRequested,
|
||||
}
|
||||
|
||||
pub(crate) struct PluginStateChangedInput {
|
||||
pub plugin: PluginTelemetryMetadata,
|
||||
pub state: PluginState,
|
||||
|
||||
@@ -42,6 +42,9 @@ pub use facts::GoalEventKind;
|
||||
pub use facts::HookRunFact;
|
||||
pub use facts::InputError;
|
||||
pub use facts::InvocationType;
|
||||
pub use facts::PluginInstallRequestSource;
|
||||
pub use facts::PluginInstallRequested;
|
||||
pub use facts::PluginInstallRequestedPlugin;
|
||||
pub use facts::SkillInvocation;
|
||||
pub use facts::SubAgentThreadStartedInput;
|
||||
pub use facts::ThreadInitializationMode;
|
||||
|
||||
@@ -28,6 +28,7 @@ use crate::events::CodexOnboardingExternalAgentImportFailureMetadata;
|
||||
use crate::events::CodexPluginEventRequest;
|
||||
use crate::events::CodexPluginInstallFailedEventRequest;
|
||||
use crate::events::CodexPluginInstallFailedMetadata;
|
||||
use crate::events::CodexPluginInstallRequestedEventRequest;
|
||||
use crate::events::CodexPluginUsedEventRequest;
|
||||
use crate::events::CodexReviewEventParams;
|
||||
use crate::events::CodexReviewEventRequest;
|
||||
@@ -60,6 +61,7 @@ use crate::events::codex_app_metadata;
|
||||
use crate::events::codex_compaction_event_params;
|
||||
use crate::events::codex_goal_event_params;
|
||||
use crate::events::codex_hook_run_metadata;
|
||||
use crate::events::codex_plugin_install_requested_metadata;
|
||||
use crate::events::codex_plugin_metadata;
|
||||
use crate::events::codex_plugin_used_metadata;
|
||||
use crate::events::plugin_state_event_type;
|
||||
@@ -76,6 +78,7 @@ use crate::facts::ExternalAgentConfigImportCompletedInput;
|
||||
use crate::facts::ExternalAgentConfigImportFailureInput;
|
||||
use crate::facts::HookRunInput;
|
||||
use crate::facts::PluginInstallFailedInput;
|
||||
use crate::facts::PluginInstallRequestedInput;
|
||||
use crate::facts::PluginState;
|
||||
use crate::facts::PluginStateChangedInput;
|
||||
use crate::facts::PluginUsedInput;
|
||||
@@ -517,6 +520,9 @@ impl AnalyticsReducer {
|
||||
CustomAnalyticsFact::PluginUsed(input) => {
|
||||
self.ingest_plugin_used(input, out);
|
||||
}
|
||||
CustomAnalyticsFact::PluginInstallRequested(input) => {
|
||||
self.ingest_plugin_install_requested(input, out);
|
||||
}
|
||||
CustomAnalyticsFact::PluginStateChanged(input) => {
|
||||
self.ingest_plugin_state_changed(input, out);
|
||||
}
|
||||
@@ -729,7 +735,7 @@ impl AnalyticsReducer {
|
||||
turn_id: Some(tracking.turn_id.clone()),
|
||||
invoke_type: Some(invocation.invocation_type),
|
||||
model_slug: Some(tracking.model_slug.clone()),
|
||||
product_client_id: Some(originator().value),
|
||||
product_client_id: Some(tracking.product_client_id.clone()),
|
||||
repo_url,
|
||||
skill_scope: Some(skill_scope.to_string()),
|
||||
plugin_id: invocation.plugin_id,
|
||||
@@ -775,6 +781,20 @@ impl AnalyticsReducer {
|
||||
}));
|
||||
}
|
||||
|
||||
fn ingest_plugin_install_requested(
|
||||
&mut self,
|
||||
input: PluginInstallRequestedInput,
|
||||
out: &mut Vec<TrackEventRequest>,
|
||||
) {
|
||||
let PluginInstallRequestedInput { tracking, request } = input;
|
||||
out.push(TrackEventRequest::PluginInstallRequested(
|
||||
CodexPluginInstallRequestedEventRequest {
|
||||
event_type: "codex_plugin_install_requested",
|
||||
event_params: codex_plugin_install_requested_metadata(&tracking, request),
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
fn ingest_plugin_state_changed(
|
||||
&mut self,
|
||||
input: PluginStateChangedInput,
|
||||
|
||||
+19
-1
@@ -125,7 +125,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -210,6 +209,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "Absolute path for the root in the selected environment.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
@@ -1723,6 +1723,13 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"skills": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/SkillMigration"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"subagents": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -3407,6 +3414,17 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillMigration": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillsConfigWriteParams": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
|
||||
@@ -241,6 +241,24 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconDarkAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -450,7 +468,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -574,6 +591,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -2585,6 +2603,12 @@
|
||||
},
|
||||
"ModelSafetyBufferingUpdatedNotification": {
|
||||
"properties": {
|
||||
"fasterModel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2594,6 +2618,9 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"showBufferingUi": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2610,6 +2637,7 @@
|
||||
"required": [
|
||||
"model",
|
||||
"reasons",
|
||||
"showBufferingUi",
|
||||
"threadId",
|
||||
"turnId",
|
||||
"useCases"
|
||||
@@ -3616,6 +3644,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -3755,6 +3784,10 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadGoal": {
|
||||
"properties": {
|
||||
"createdAt": {
|
||||
@@ -4430,7 +4463,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -5101,6 +5134,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
+55
-2
@@ -6406,6 +6406,24 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconDarkAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -6864,7 +6882,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -7044,6 +7061,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "Absolute path for the root in the selected environment.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
@@ -7070,6 +7088,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -12391,6 +12410,13 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"skills": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/v2/SkillMigration"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"subagents": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -12642,6 +12668,12 @@
|
||||
"ModelSafetyBufferingUpdatedNotification": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"fasterModel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -12651,6 +12683,9 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"showBufferingUi": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -12667,6 +12702,7 @@
|
||||
"required": [
|
||||
"model",
|
||||
"reasons",
|
||||
"showBufferingUi",
|
||||
"threadId",
|
||||
"turnId",
|
||||
"useCases"
|
||||
@@ -16327,6 +16363,17 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillMigration": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillScope": {
|
||||
"enum": [
|
||||
"user",
|
||||
@@ -16821,6 +16868,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -17042,6 +17090,10 @@
|
||||
"title": "ThreadDeletedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadForkParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
|
||||
@@ -18024,7 +18076,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/v2/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/v2/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -19689,6 +19741,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
+55
-2
@@ -532,6 +532,24 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconDarkAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -990,7 +1008,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -1170,6 +1187,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "Absolute path for the root in the selected environment.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
@@ -3310,6 +3328,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -8795,6 +8814,13 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"skills": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/SkillMigration"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"subagents": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -9046,6 +9072,12 @@
|
||||
"ModelSafetyBufferingUpdatedNotification": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"fasterModel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -9055,6 +9087,9 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"showBufferingUi": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -9071,6 +9106,7 @@
|
||||
"required": [
|
||||
"model",
|
||||
"reasons",
|
||||
"showBufferingUi",
|
||||
"threadId",
|
||||
"turnId",
|
||||
"useCases"
|
||||
@@ -14106,6 +14142,17 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillMigration": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillScope": {
|
||||
"enum": [
|
||||
"user",
|
||||
@@ -14600,6 +14647,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -14821,6 +14869,10 @@
|
||||
"title": "ThreadDeletedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadForkParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
|
||||
@@ -15803,7 +15855,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -17468,6 +17520,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -78,6 +78,24 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconDarkAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -78,6 +78,24 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"iconDarkAssets": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -173,7 +173,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
|
||||
-1
@@ -15,7 +15,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
|
||||
+18
@@ -117,6 +117,13 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"skills": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/SkillMigration"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"subagents": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -166,6 +173,17 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillMigration": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SubagentMigration": {
|
||||
"properties": {
|
||||
"name": {
|
||||
|
||||
+18
@@ -117,6 +117,13 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"skills": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/SkillMigration"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"subagents": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -166,6 +173,17 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillMigration": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SubagentMigration": {
|
||||
"properties": {
|
||||
"name": {
|
||||
|
||||
+1
-1
@@ -1106,7 +1106,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
|
||||
@@ -1106,7 +1106,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
|
||||
+10
@@ -1,6 +1,12 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"fasterModel": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -10,6 +16,9 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"showBufferingUi": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -26,6 +35,7 @@
|
||||
"required": [
|
||||
"model",
|
||||
"reasons",
|
||||
"showBufferingUi",
|
||||
"threadId",
|
||||
"turnId",
|
||||
"useCases"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -1250,7 +1251,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1438,6 +1439,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -112,6 +111,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -1059,6 +1059,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -1165,6 +1166,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1751,7 +1756,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -2017,6 +2022,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -865,6 +866,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -971,6 +973,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1557,7 +1563,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1823,6 +1829,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
+8
-1
@@ -33,6 +33,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -865,6 +866,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -971,6 +973,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1557,7 +1563,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1823,6 +1829,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -865,6 +866,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -971,6 +973,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1557,7 +1563,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1823,6 +1829,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -112,6 +111,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -1059,6 +1059,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -1165,6 +1166,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1751,7 +1756,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -2017,6 +2022,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -865,6 +866,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -971,6 +973,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1557,7 +1563,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1823,6 +1829,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
-1
@@ -39,7 +39,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -74,6 +73,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "Absolute path for the root in the selected environment.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
@@ -112,6 +111,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -1059,6 +1059,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -1165,6 +1166,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1751,7 +1756,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -2017,6 +2022,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
+8
-1
@@ -33,6 +33,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -865,6 +866,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -971,6 +973,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1557,7 +1563,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1823,6 +1829,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -865,6 +866,7 @@
|
||||
"description": "Optional Git metadata captured when the thread was created."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"modelProvider": {
|
||||
@@ -971,6 +973,10 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadExtra": {
|
||||
"description": "Extra app-server data for a thread.",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1557,7 +1563,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1823,6 +1829,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
+3
-1
@@ -30,6 +30,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -1250,7 +1251,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1438,6 +1439,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
{
|
||||
"enum": [
|
||||
"untrusted",
|
||||
"on-failure",
|
||||
"on-request",
|
||||
"never"
|
||||
],
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -1250,7 +1251,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1438,6 +1439,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"sessionBudgetExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
@@ -1250,7 +1251,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"$ref": "#/definitions/AbsolutePathBuf"
|
||||
"$ref": "#/definitions/LegacyAppPathString"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
@@ -1438,6 +1439,7 @@
|
||||
"description": "Only populated when the Turn's status is failed."
|
||||
},
|
||||
"id": {
|
||||
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
*
|
||||
* When converting from [`PathUri`], "native" refers to the supplied
|
||||
* [`PathConvention`], which may be foreign to the operating system running
|
||||
* this process. The inner string is private so path-producing code must convert
|
||||
* from [`AbsolutePathBuf`] or use [`Self::from_path_uri`] instead of bypassing
|
||||
* the intended conversion boundary. Non-UTF-8 paths are converted to UTF-8
|
||||
* lossily because this API value is serialized as a JSON string.
|
||||
* this process. The inner string is private so path-producing code must use a
|
||||
* path conversion method instead of bypassing the intended conversion
|
||||
* boundary. Non-UTF-8 paths are converted to UTF-8 lossily because this API
|
||||
* value is serialized as a JSON string.
|
||||
*
|
||||
* Deserialization accepts any UTF-8 string without interpreting or validating
|
||||
* it. That unrestricted construction path is intentionally available only to
|
||||
|
||||
@@ -2,4 +2,9 @@
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Identifier for a Codex thread.
|
||||
*
|
||||
* Codex-generated thread IDs are UUIDv7, and some use cases rely on that.
|
||||
*/
|
||||
export type ThreadId = string;
|
||||
@@ -7,7 +7,7 @@ import type { AppMetadata } from "./AppMetadata";
|
||||
/**
|
||||
* EXPERIMENTAL - app metadata returned by app-list APIs.
|
||||
*/
|
||||
export type AppInfo = { id: string, name: string, description: string | null, logoUrl: string | null, logoUrlDark: string | null, distributionChannel: string | null, branding: AppBranding | null, appMetadata: AppMetadata | null, labels: { [key in string]?: string } | null, installUrl: string | null, isAccessible: boolean,
|
||||
export type AppInfo = { id: string, name: string, description: string | null, logoUrl: string | null, logoUrlDark: string | null, iconAssets: { [key in string]?: string } | null, iconDarkAssets: { [key in string]?: string } | null, distributionChannel: string | null, branding: AppBranding | null, appMetadata: AppMetadata | null, labels: { [key in string]?: string } | null, installUrl: string | null, isAccessible: boolean,
|
||||
/**
|
||||
* Whether this app is enabled in config.toml.
|
||||
* Example:
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type AskForApproval = "untrusted" | "on-failure" | "on-request" | { "granular": { sandbox_approval: boolean, rules: boolean, skill_approval: boolean, request_permissions: boolean, mcp_elicitations: boolean, } } | "never";
|
||||
export type AskForApproval = "untrusted" | "on-request" | { "granular": { sandbox_approval: boolean, rules: boolean, skill_approval: boolean, request_permissions: boolean, mcp_elicitations: boolean, } } | "never";
|
||||
+5
-1
@@ -5,4 +5,8 @@
|
||||
/**
|
||||
* Location used to resolve a selected capability root.
|
||||
*/
|
||||
export type CapabilityRootLocation = { "type": "environment", environmentId: string, path: string, };
|
||||
export type CapabilityRootLocation = { "type": "environment", environmentId: string,
|
||||
/**
|
||||
* Absolute path for the root in the selected environment.
|
||||
*/
|
||||
path: string, };
|
||||
@@ -9,4 +9,4 @@ import type { NonSteerableTurnKind } from "./NonSteerableTurnKind";
|
||||
* When an upstream HTTP status is available (for example, from the Responses API or a provider),
|
||||
* it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.
|
||||
*/
|
||||
export type CodexErrorInfo = "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | { "httpConnectionFailed": { httpStatusCode: number | null, } } | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | { "responseStreamDisconnected": { httpStatusCode: number | null, } } | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } | { "activeTurnNotSteerable": { turnKind: NonSteerableTurnKind, } } | "other";
|
||||
export type CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | { "httpConnectionFailed": { httpStatusCode: number | null, } } | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | { "responseStreamDisconnected": { httpStatusCode: number | null, } } | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } | { "activeTurnNotSteerable": { turnKind: NonSteerableTurnKind, } } | "other";
|
||||
@@ -6,6 +6,7 @@ import type { HookMigration } from "./HookMigration";
|
||||
import type { McpServerMigration } from "./McpServerMigration";
|
||||
import type { PluginsMigration } from "./PluginsMigration";
|
||||
import type { SessionMigration } from "./SessionMigration";
|
||||
import type { SkillMigration } from "./SkillMigration";
|
||||
import type { SubagentMigration } from "./SubagentMigration";
|
||||
|
||||
export type MigrationDetails = { plugins: Array<PluginsMigration>, sessions: Array<SessionMigration>, mcpServers: Array<McpServerMigration>, hooks: Array<HookMigration>, subagents: Array<SubagentMigration>, commands: Array<CommandMigration>, };
|
||||
export type MigrationDetails = { plugins: Array<PluginsMigration>, skills: Array<SkillMigration>, sessions: Array<SessionMigration>, mcpServers: Array<McpServerMigration>, hooks: Array<HookMigration>, subagents: Array<SubagentMigration>, commands: Array<CommandMigration>, };
|
||||
Generated
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ModelSafetyBufferingUpdatedNotification = { threadId: string, turnId: string, model: string, useCases: Array<string>, reasons: Array<string>, };
|
||||
export type ModelSafetyBufferingUpdatedNotification = { threadId: string, turnId: string, model: string, useCases: Array<string>, reasons: Array<string>, showBufferingUi: boolean, fasterModel: string | null, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type SkillMigration = { name: string, };
|
||||
+24
-41
@@ -8,87 +8,70 @@ import type { ThreadSource } from "./ThreadSource";
|
||||
import type { ThreadStatus } from "./ThreadStatus";
|
||||
import type { Turn } from "./Turn";
|
||||
|
||||
export type Thread = { id: string,
|
||||
/**
|
||||
export type Thread = {/**
|
||||
* Identifier for this thread. Codex-generated thread IDs are UUIDv7.
|
||||
*/
|
||||
id: string, /**
|
||||
* Session id shared by threads that belong to the same session tree.
|
||||
*/
|
||||
sessionId: string,
|
||||
/**
|
||||
sessionId: string, /**
|
||||
* Source thread id when this thread was created by forking another thread.
|
||||
*/
|
||||
forkedFromId: string | null,
|
||||
/**
|
||||
forkedFromId: string | null, /**
|
||||
* The ID of the parent thread. This will only be set if this thread is a subagent.
|
||||
*/
|
||||
parentThreadId: string | null,
|
||||
/**
|
||||
parentThreadId: string | null, /**
|
||||
* Usually the first user message in the thread, if available.
|
||||
*/
|
||||
preview: string,
|
||||
/**
|
||||
preview: string, /**
|
||||
* Whether the thread is ephemeral and should not be materialized on disk.
|
||||
*/
|
||||
ephemeral: boolean,
|
||||
/**
|
||||
ephemeral: boolean, /**
|
||||
* Model provider used for this thread (for example, 'openai').
|
||||
*/
|
||||
modelProvider: string,
|
||||
/**
|
||||
modelProvider: string, /**
|
||||
* Unix timestamp (in seconds) when the thread was created.
|
||||
*/
|
||||
createdAt: number,
|
||||
/**
|
||||
createdAt: number, /**
|
||||
* Unix timestamp (in seconds) when the thread was last updated.
|
||||
*/
|
||||
updatedAt: number,
|
||||
/**
|
||||
updatedAt: number, /**
|
||||
* Unix timestamp (in seconds) used for thread recency ordering.
|
||||
*/
|
||||
recencyAt: number | null,
|
||||
/**
|
||||
recencyAt: number | null, /**
|
||||
* Current runtime status for the thread.
|
||||
*/
|
||||
status: ThreadStatus,
|
||||
/**
|
||||
status: ThreadStatus, /**
|
||||
* [UNSTABLE] Path to the thread on disk.
|
||||
*/
|
||||
path: string | null,
|
||||
/**
|
||||
path: string | null, /**
|
||||
* Working directory captured for the thread.
|
||||
*/
|
||||
cwd: AbsolutePathBuf,
|
||||
/**
|
||||
cwd: AbsolutePathBuf, /**
|
||||
* Version of the CLI that created the thread.
|
||||
*/
|
||||
cliVersion: string,
|
||||
/**
|
||||
cliVersion: string, /**
|
||||
* Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).
|
||||
*/
|
||||
source: SessionSource,
|
||||
/**
|
||||
source: SessionSource, /**
|
||||
* Optional analytics source classification for this thread.
|
||||
*/
|
||||
threadSource: ThreadSource | null,
|
||||
/**
|
||||
threadSource: ThreadSource | null, /**
|
||||
* Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
|
||||
*/
|
||||
agentNickname: string | null,
|
||||
/**
|
||||
agentNickname: string | null, /**
|
||||
* Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
|
||||
*/
|
||||
agentRole: string | null,
|
||||
/**
|
||||
agentRole: string | null, /**
|
||||
* Optional Git metadata captured when the thread was created.
|
||||
*/
|
||||
gitInfo: GitInfo | null,
|
||||
/**
|
||||
gitInfo: GitInfo | null, /**
|
||||
* Optional user-facing thread title.
|
||||
*/
|
||||
name: string | null,
|
||||
/**
|
||||
name: string | null, /**
|
||||
* Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read`
|
||||
* (when `includeTurns` is true) responses.
|
||||
* For all other responses and notifications returning a Thread,
|
||||
* the turns field will be an empty list.
|
||||
*/
|
||||
turns: Array<Turn>, };
|
||||
turns: Array<Turn>};
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Extra app-server data for a thread.
|
||||
*/
|
||||
export type ThreadExtra = Record<string, never>;
|
||||
@@ -105,4 +105,4 @@ reasoningEffort: ReasoningEffort | null,
|
||||
/**
|
||||
* Last known status of the target agents, when available.
|
||||
*/
|
||||
agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "subAgentActivity", id: string, kind: SubAgentActivityKind, agentThreadId: string, agentPath: string, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: AbsolutePathBuf, } | { "type": "sleep", id: string, durationMs: number, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, savedPath?: AbsolutePathBuf, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, };
|
||||
agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "subAgentActivity", id: string, kind: SubAgentActivityKind, agentThreadId: string, agentPath: string, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: LegacyAppPathString, } | { "type": "sleep", id: string, durationMs: number, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, savedPath?: AbsolutePathBuf, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, };
|
||||
+5
-1
@@ -6,7 +6,11 @@ import type { TurnError } from "./TurnError";
|
||||
import type { TurnItemsView } from "./TurnItemsView";
|
||||
import type { TurnStatus } from "./TurnStatus";
|
||||
|
||||
export type Turn = { id: string,
|
||||
export type Turn = {
|
||||
/**
|
||||
* Identifier for this turn. Codex-generated turn IDs are UUIDv7.
|
||||
*/
|
||||
id: string,
|
||||
/**
|
||||
* Thread items currently included in this turn payload.
|
||||
*/
|
||||
|
||||
@@ -363,6 +363,7 @@ export type { SkillDependencies } from "./SkillDependencies";
|
||||
export type { SkillErrorInfo } from "./SkillErrorInfo";
|
||||
export type { SkillInterface } from "./SkillInterface";
|
||||
export type { SkillMetadata } from "./SkillMetadata";
|
||||
export type { SkillMigration } from "./SkillMigration";
|
||||
export type { SkillScope } from "./SkillScope";
|
||||
export type { SkillSummary } from "./SkillSummary";
|
||||
export type { SkillToolDependency } from "./SkillToolDependency";
|
||||
@@ -395,6 +396,7 @@ export type { ThreadCompactStartResponse } from "./ThreadCompactStartResponse";
|
||||
export type { ThreadDeleteParams } from "./ThreadDeleteParams";
|
||||
export type { ThreadDeleteResponse } from "./ThreadDeleteResponse";
|
||||
export type { ThreadDeletedNotification } from "./ThreadDeletedNotification";
|
||||
export type { ThreadExtra } from "./ThreadExtra";
|
||||
export type { ThreadForkParams } from "./ThreadForkParams";
|
||||
export type { ThreadForkResponse } from "./ThreadForkResponse";
|
||||
export type { ThreadGoal } from "./ThreadGoal";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
mod experimental_api;
|
||||
mod export;
|
||||
mod jsonrpc_lite;
|
||||
mod protocol;
|
||||
pub mod rpc;
|
||||
mod schema_fixtures;
|
||||
|
||||
pub use experimental_api::*;
|
||||
@@ -12,7 +12,6 @@ pub use export::generate_json_with_experimental;
|
||||
pub use export::generate_ts;
|
||||
pub use export::generate_ts_with_options;
|
||||
pub use export::generate_types;
|
||||
pub use jsonrpc_lite::*;
|
||||
pub use protocol::common::*;
|
||||
pub use protocol::event_mapping::*;
|
||||
pub use protocol::item_builders::*;
|
||||
@@ -40,6 +39,7 @@ pub use protocol::v1::SandboxSettings;
|
||||
pub use protocol::v1::Tools;
|
||||
pub use protocol::v1::UserSavedConfig;
|
||||
pub use protocol::v2::*;
|
||||
pub use rpc::*;
|
||||
pub use schema_fixtures::SchemaFixtureOptions;
|
||||
#[doc(hidden)]
|
||||
pub use schema_fixtures::generate_typescript_schema_fixture_subtree_for_tests;
|
||||
|
||||
@@ -641,12 +641,12 @@ client_request_definitions! {
|
||||
serialization: None,
|
||||
response: v2::ThreadTurnsListResponse,
|
||||
},
|
||||
#[experimental("thread/turns/items/list")]
|
||||
ThreadTurnsItemsList => "thread/turns/items/list" {
|
||||
params: v2::ThreadTurnsItemsListParams,
|
||||
#[experimental("thread/items/list")]
|
||||
ThreadItemsList => "thread/items/list" {
|
||||
params: v2::ThreadItemsListParams,
|
||||
// Explicitly concurrent: this primarily reads append-only rollout storage.
|
||||
serialization: None,
|
||||
response: v2::ThreadTurnsItemsListResponse,
|
||||
response: v2::ThreadItemsListResponse,
|
||||
},
|
||||
/// Append raw Responses API items to the thread history without starting a user turn.
|
||||
ThreadInjectItems => "thread/inject_items" {
|
||||
@@ -2090,17 +2090,17 @@ mod tests {
|
||||
};
|
||||
assert_eq!(thread_turns_list.serialization_scope(), None);
|
||||
|
||||
let thread_turns_items_list = ClientRequest::ThreadTurnsItemsList {
|
||||
let thread_items_list = ClientRequest::ThreadItemsList {
|
||||
request_id: request_id(),
|
||||
params: v2::ThreadTurnsItemsListParams {
|
||||
params: v2::ThreadItemsListParams {
|
||||
thread_id: "thread-1".to_string(),
|
||||
turn_id: "turn-1".to_string(),
|
||||
turn_id: None,
|
||||
cursor: None,
|
||||
limit: None,
|
||||
sort_direction: None,
|
||||
},
|
||||
};
|
||||
assert_eq!(thread_turns_items_list.serialization_scope(), None);
|
||||
assert_eq!(thread_items_list.serialization_scope(), None);
|
||||
|
||||
let mcp_resource_read = ClientRequest::McpResourceRead {
|
||||
request_id: request_id(),
|
||||
@@ -2573,6 +2573,7 @@ mod tests {
|
||||
response: v2::ThreadStartResponse {
|
||||
thread: v2::Thread {
|
||||
id: "67e55044-10b1-426f-9247-bb680e5fe0c8".to_string(),
|
||||
extra: None,
|
||||
session_id: "67e55044-10b1-426f-9247-bb680e5fe0c7".to_string(),
|
||||
forked_from_id: None,
|
||||
parent_thread_id: None,
|
||||
@@ -2604,7 +2605,7 @@ mod tests {
|
||||
"/tmp/AGENTS.md",
|
||||
)),
|
||||
],
|
||||
approval_policy: v2::AskForApproval::OnFailure,
|
||||
approval_policy: v2::AskForApproval::OnRequest,
|
||||
approvals_reviewer: v2::ApprovalsReviewer::User,
|
||||
sandbox: v2::SandboxPolicy::DangerFullAccess,
|
||||
active_permission_profile: None,
|
||||
@@ -2622,6 +2623,7 @@ mod tests {
|
||||
"response": {
|
||||
"thread": {
|
||||
"id": "67e55044-10b1-426f-9247-bb680e5fe0c8",
|
||||
"extra": null,
|
||||
"sessionId": "67e55044-10b1-426f-9247-bb680e5fe0c7",
|
||||
"forkedFromId": null,
|
||||
"parentThreadId": null,
|
||||
@@ -2651,7 +2653,7 @@ mod tests {
|
||||
"cwd": absolute_path_string("tmp"),
|
||||
"runtimeWorkspaceRoots": [],
|
||||
"instructionSources": [absolute_path_string("tmp/AGENTS.md")],
|
||||
"approvalPolicy": "on-failure",
|
||||
"approvalPolicy": "on-request",
|
||||
"approvalsReviewer": "user",
|
||||
"sandbox": {
|
||||
"type": "dangerFullAccess"
|
||||
@@ -3392,9 +3394,11 @@ mod tests {
|
||||
v2::ModelSafetyBufferingUpdatedNotification {
|
||||
thread_id: "thr_123".to_string(),
|
||||
turn_id: "turn_123".to_string(),
|
||||
model: "gpt-5.4".to_string(),
|
||||
model: "current-model".to_string(),
|
||||
use_cases: vec!["cyber".to_string()],
|
||||
reasons: vec!["user_risk".to_string()],
|
||||
show_buffering_ui: true,
|
||||
faster_model: Some("faster-model".to_string()),
|
||||
},
|
||||
);
|
||||
assert_eq!(
|
||||
@@ -3403,9 +3407,11 @@ mod tests {
|
||||
"params": {
|
||||
"threadId": "thr_123",
|
||||
"turnId": "turn_123",
|
||||
"model": "gpt-5.4",
|
||||
"model": "current-model",
|
||||
"useCases": ["cyber"],
|
||||
"reasons": ["user_risk"]
|
||||
"reasons": ["user_risk"],
|
||||
"showBufferingUi": true,
|
||||
"fasterModel": "faster-model"
|
||||
}
|
||||
}),
|
||||
serde_json::to_value(¬ification)?,
|
||||
|
||||
@@ -386,6 +386,7 @@ impl ThreadHistoryBuilder {
|
||||
RolloutItem::Compacted(payload) => self.handle_compacted(payload),
|
||||
RolloutItem::ResponseItem(item) => self.handle_response_item(item),
|
||||
RolloutItem::InterAgentCommunication(_)
|
||||
| RolloutItem::InterAgentCommunicationMetadata { .. }
|
||||
| RolloutItem::TurnContext(_)
|
||||
| RolloutItem::SessionMeta(_) => {}
|
||||
}
|
||||
@@ -836,7 +837,7 @@ impl ThreadHistoryBuilder {
|
||||
fn handle_view_image_tool_call(&mut self, payload: &ViewImageToolCallEvent) {
|
||||
let item = ThreadItem::ImageView {
|
||||
id: payload.call_id.clone(),
|
||||
path: payload.path.clone(),
|
||||
path: payload.path.clone().into(),
|
||||
};
|
||||
self.upsert_item_in_current_turn(item);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,8 @@ pub struct AppInfo {
|
||||
pub description: Option<String>,
|
||||
pub logo_url: Option<String>,
|
||||
pub logo_url_dark: Option<String>,
|
||||
pub icon_assets: Option<HashMap<String, String>>,
|
||||
pub icon_dark_assets: Option<HashMap<String, String>>,
|
||||
pub distribution_channel: Option<String>,
|
||||
pub branding: Option<AppBranding>,
|
||||
pub app_metadata: Option<AppMetadata>,
|
||||
|
||||
@@ -574,6 +574,13 @@ pub struct PluginsMigration {
|
||||
pub plugin_names: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct SkillMigration {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
@@ -618,6 +625,8 @@ pub struct MigrationDetails {
|
||||
#[serde(default)]
|
||||
pub plugins: Vec<PluginsMigration>,
|
||||
#[serde(default)]
|
||||
pub skills: Vec<SkillMigration>,
|
||||
#[serde(default)]
|
||||
pub sessions: Vec<SessionMigration>,
|
||||
#[serde(default)]
|
||||
pub mcp_servers: Vec<McpServerMigration>,
|
||||
|
||||
@@ -356,7 +356,10 @@ pub enum ThreadItem {
|
||||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(rename_all = "camelCase")]
|
||||
ImageView { id: String, path: AbsolutePathBuf },
|
||||
ImageView {
|
||||
id: String,
|
||||
path: LegacyAppPathString,
|
||||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(rename_all = "camelCase")]
|
||||
Sleep {
|
||||
@@ -855,7 +858,7 @@ impl From<CoreTurnItem> for ThreadItem {
|
||||
},
|
||||
CoreTurnItem::ImageView(image) => ThreadItem::ImageView {
|
||||
id: image.id,
|
||||
path: image.path,
|
||||
path: image.path.into(),
|
||||
},
|
||||
CoreTurnItem::Sleep(sleep) => ThreadItem::Sleep {
|
||||
id: sleep.id,
|
||||
|
||||
@@ -172,4 +172,6 @@ pub struct ModelSafetyBufferingUpdatedNotification {
|
||||
pub model: String,
|
||||
pub use_cases: Vec<String>,
|
||||
pub reasons: Vec<String>,
|
||||
pub show_buffering_ui: bool,
|
||||
pub faster_model: Option<String>,
|
||||
}
|
||||
@@ -70,6 +70,7 @@ pub enum NonSteerableTurnKind {
|
||||
#[ts(export_to = "v2/")]
|
||||
pub enum CodexErrorInfo {
|
||||
ContextWindowExceeded,
|
||||
SessionBudgetExceeded,
|
||||
UsageLimitExceeded,
|
||||
ServerOverloaded,
|
||||
CyberPolicy,
|
||||
@@ -115,6 +116,7 @@ impl From<CoreCodexErrorInfo> for CodexErrorInfo {
|
||||
fn from(value: CoreCodexErrorInfo) -> Self {
|
||||
match value {
|
||||
CoreCodexErrorInfo::ContextWindowExceeded => CodexErrorInfo::ContextWindowExceeded,
|
||||
CoreCodexErrorInfo::SessionBudgetExceeded => CodexErrorInfo::SessionBudgetExceeded,
|
||||
CoreCodexErrorInfo::UsageLimitExceeded => CodexErrorInfo::UsageLimitExceeded,
|
||||
CoreCodexErrorInfo::ServerOverloaded => CodexErrorInfo::ServerOverloaded,
|
||||
CoreCodexErrorInfo::CyberPolicy => CodexErrorInfo::CyberPolicy,
|
||||
@@ -163,7 +165,6 @@ pub enum AskForApproval {
|
||||
#[serde(rename = "untrusted")]
|
||||
#[ts(rename = "untrusted")]
|
||||
UnlessTrusted,
|
||||
OnFailure,
|
||||
OnRequest,
|
||||
#[experimental("askForApproval.granular")]
|
||||
Granular {
|
||||
@@ -182,7 +183,6 @@ impl AskForApproval {
|
||||
pub fn to_core(self) -> CoreAskForApproval {
|
||||
match self {
|
||||
AskForApproval::UnlessTrusted => CoreAskForApproval::UnlessTrusted,
|
||||
AskForApproval::OnFailure => CoreAskForApproval::OnFailure,
|
||||
AskForApproval::OnRequest => CoreAskForApproval::OnRequest,
|
||||
AskForApproval::Granular {
|
||||
sandbox_approval,
|
||||
@@ -206,7 +206,6 @@ impl From<CoreAskForApproval> for AskForApproval {
|
||||
fn from(value: CoreAskForApproval) -> Self {
|
||||
match value {
|
||||
CoreAskForApproval::UnlessTrusted => AskForApproval::UnlessTrusted,
|
||||
CoreAskForApproval::OnFailure => AskForApproval::OnFailure,
|
||||
CoreAskForApproval::OnRequest => AskForApproval::OnRequest,
|
||||
CoreAskForApproval::Granular(granular_config) => AskForApproval::Granular {
|
||||
sandbox_approval: granular_config.sandbox_approval,
|
||||
|
||||
@@ -168,6 +168,7 @@ fn thread_resume_response_round_trips_initial_turns_page() {
|
||||
let response = ThreadResumeResponse {
|
||||
thread: Thread {
|
||||
id: "thr_123".to_string(),
|
||||
extra: None,
|
||||
session_id: "thr_123".to_string(),
|
||||
forked_from_id: None,
|
||||
parent_thread_id: None,
|
||||
@@ -195,7 +196,7 @@ fn thread_resume_response_round_trips_initial_turns_page() {
|
||||
cwd: absolute_path("tmp"),
|
||||
runtime_workspace_roots: Vec::new(),
|
||||
instruction_sources: Vec::new(),
|
||||
approval_policy: AskForApproval::OnFailure,
|
||||
approval_policy: AskForApproval::OnRequest,
|
||||
approvals_reviewer: ApprovalsReviewer::User,
|
||||
sandbox: SandboxPolicy::DangerFullAccess,
|
||||
active_permission_profile: None,
|
||||
@@ -223,10 +224,10 @@ fn thread_resume_response_round_trips_initial_turns_page() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn thread_turns_items_list_round_trips() {
|
||||
let params = ThreadTurnsItemsListParams {
|
||||
fn thread_items_list_round_trips() {
|
||||
let params = ThreadItemsListParams {
|
||||
thread_id: "thr_123".to_string(),
|
||||
turn_id: "turn_456".to_string(),
|
||||
turn_id: Some("turn_456".to_string()),
|
||||
cursor: Some("cursor_1".to_string()),
|
||||
limit: Some(50),
|
||||
sort_direction: Some(SortDirection::Asc),
|
||||
@@ -242,7 +243,7 @@ fn thread_turns_items_list_round_trips() {
|
||||
"sortDirection": "asc",
|
||||
})
|
||||
);
|
||||
let response = ThreadTurnsItemsListResponse {
|
||||
let response = ThreadItemsListResponse {
|
||||
data: vec![ThreadItem::ContextCompaction {
|
||||
id: "item_1".to_string(),
|
||||
}],
|
||||
@@ -258,6 +259,32 @@ fn thread_turns_items_list_round_trips() {
|
||||
"backwardsCursor": "cursor_0",
|
||||
})
|
||||
);
|
||||
|
||||
let params_without_turn = ThreadItemsListParams {
|
||||
thread_id: "thr_123".to_string(),
|
||||
turn_id: None,
|
||||
cursor: None,
|
||||
limit: None,
|
||||
sort_direction: None,
|
||||
};
|
||||
|
||||
assert_eq!(
|
||||
serde_json::to_value(¶ms_without_turn).expect("serialize params without turn"),
|
||||
json!({
|
||||
"threadId": "thr_123",
|
||||
"turnId": null,
|
||||
"cursor": null,
|
||||
"limit": null,
|
||||
"sortDirection": null,
|
||||
})
|
||||
);
|
||||
assert_eq!(
|
||||
serde_json::from_value::<ThreadItemsListParams>(json!({
|
||||
"threadId": "thr_123",
|
||||
}))
|
||||
.expect("deserialize params without turn"),
|
||||
params_without_turn
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -2573,14 +2600,14 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
|
||||
|
||||
let image_view_item = TurnItem::ImageView(ImageViewItem {
|
||||
id: "view-image-1".to_string(),
|
||||
path: test_path_buf("/tmp/view-image.png").abs(),
|
||||
path: PathUri::from_abs_path(&test_path_buf("/tmp/view-image.png").abs()),
|
||||
});
|
||||
|
||||
assert_eq!(
|
||||
ThreadItem::from(image_view_item),
|
||||
ThreadItem::ImageView {
|
||||
id: "view-image-1".to_string(),
|
||||
path: test_path_buf("/tmp/view-image.png").abs(),
|
||||
path: LegacyAppPathString::from_abs_path(&test_path_buf("/tmp/view-image.png").abs()),
|
||||
}
|
||||
);
|
||||
|
||||
@@ -3689,7 +3716,7 @@ fn thread_lifecycle_responses_default_missing_optional_fields() {
|
||||
"modelProvider": "openai",
|
||||
"serviceTier": null,
|
||||
"cwd": absolute_path_string("tmp"),
|
||||
"approvalPolicy": "on-failure",
|
||||
"approvalPolicy": "on-request",
|
||||
"approvalsReviewer": "user",
|
||||
"sandbox": { "type": "dangerFullAccess" },
|
||||
"reasoningEffort": null
|
||||
|
||||
@@ -1088,10 +1088,15 @@ pub struct ThreadListParams {
|
||||
/// Optional substring filter for the extracted thread title.
|
||||
#[ts(optional = nullable)]
|
||||
pub search_term: Option<String>,
|
||||
/// Optional direct parent thread filter.
|
||||
/// Optional direct parent thread filter. Mutually exclusive with `ancestorThreadId`.
|
||||
#[experimental("thread/list.parentThreadId")]
|
||||
#[ts(optional = nullable)]
|
||||
pub parent_thread_id: Option<String>,
|
||||
/// Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the
|
||||
/// ancestor itself. Mutually exclusive with `parentThreadId`.
|
||||
#[experimental("thread/list.ancestorThreadId")]
|
||||
#[ts(optional = nullable)]
|
||||
pub ancestor_thread_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
@@ -1316,9 +1321,11 @@ pub struct ThreadTurnsListResponse {
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadTurnsItemsListParams {
|
||||
pub struct ThreadItemsListParams {
|
||||
pub thread_id: String,
|
||||
pub turn_id: String,
|
||||
/// Optional turn id to filter by. When omitted, returns items across the thread.
|
||||
#[ts(optional = nullable)]
|
||||
pub turn_id: Option<String>,
|
||||
/// Opaque cursor to pass to the next call to continue after the last item.
|
||||
#[ts(optional = nullable)]
|
||||
pub cursor: Option<String>,
|
||||
@@ -1333,7 +1340,7 @@ pub struct ThreadTurnsItemsListParams {
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadTurnsItemsListResponse {
|
||||
pub struct ThreadItemsListResponse {
|
||||
pub data: Vec<ThreadItem>,
|
||||
/// Opaque cursor to pass to the next call to continue after the last item.
|
||||
/// if None, there are no more items to return.
|
||||
|
||||
@@ -2,6 +2,7 @@ use super::CodexErrorInfo;
|
||||
use super::ThreadItem;
|
||||
use super::ThreadStatus;
|
||||
use super::TurnStatus;
|
||||
use codex_experimental_api_macros::ExperimentalApi;
|
||||
use codex_protocol::protocol::SessionSource as CoreSessionSource;
|
||||
use codex_protocol::protocol::SubAgentSource as CoreSubAgentSource;
|
||||
use codex_protocol::protocol::ThreadSource as CoreThreadSource;
|
||||
@@ -120,6 +121,12 @@ impl From<ThreadSource> for CoreThreadSource {
|
||||
}
|
||||
}
|
||||
|
||||
/// Extra app-server data for a thread.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(rename_all = "camelCase", export_to = "v2/")]
|
||||
pub struct ThreadExtra {}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
@@ -129,11 +136,15 @@ pub struct GitInfo {
|
||||
pub origin_url: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, ExperimentalApi)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct Thread {
|
||||
/// Identifier for this thread. Codex-generated thread IDs are UUIDv7.
|
||||
pub id: String,
|
||||
/// Optional implementation-specific thread data.
|
||||
#[experimental("thread.extra")]
|
||||
pub extra: Option<ThreadExtra>,
|
||||
/// Session id shared by threads that belong to the same session tree.
|
||||
pub session_id: String,
|
||||
/// Source thread id when this thread was created by forking another thread.
|
||||
@@ -186,6 +197,7 @@ pub struct Thread {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct Turn {
|
||||
/// Identifier for this turn. Codex-generated turn IDs are UUIDv7.
|
||||
pub id: String,
|
||||
/// Thread items currently included in this turn payload.
|
||||
pub items: Vec<ThreadItem>,
|
||||
|
||||
File renamed without changes.
@@ -46,12 +46,13 @@ cargo run -p codex-app-server-test-client -- \
|
||||
|
||||
Use `--capture-file /tmp/plugin-analytics.jsonl` to select the output path.
|
||||
The command validates one `codex_plugin_disabled`, `codex_plugin_enabled`, and
|
||||
`codex_plugin_used` event with the expected local plugin identity and capability
|
||||
metadata. The enabled and disabled events come from successful writes to the
|
||||
temporary config; the command does not mutate the remote enabled state. It
|
||||
prints the events and leaves the JSONL file in place for inspection. It does not
|
||||
install or uninstall plugins and does not modify the profile's persistent
|
||||
config.
|
||||
`codex_plugin_used` event with the expected local and remote plugin identities
|
||||
and capability metadata. Each event includes the local ID in `plugin_id` and the
|
||||
backend ID in `remote_plugin_id`. The enabled and disabled events come from
|
||||
successful writes to the temporary config; the command does not mutate the
|
||||
remote enabled state. It prints the events and leaves the JSONL file in place
|
||||
for inspection. It does not install or uninstall plugins and does not modify
|
||||
the profile's persistent config.
|
||||
|
||||
### Testing remote install and uninstall analytics
|
||||
|
||||
@@ -63,9 +64,11 @@ or CI.
|
||||
Choose a remote plugin that is available to the active account and is not
|
||||
currently installed. The command refuses to run when the plugin is already
|
||||
installed, installs it, validates `codex_plugin_installed`, uninstalls it, and
|
||||
verifies that the original uninstalled state was restored. The current install
|
||||
event uses the backend ID as `plugin_id`. Uninstall is part of cleanup but is
|
||||
not yet an analytics assertion.
|
||||
validates `codex_plugin_uninstalled`, and verifies that the original
|
||||
uninstalled state was restored.
|
||||
|
||||
The mutation events include the local Codex ID in `plugin_id` and the backend ID
|
||||
in `remote_plugin_id`.
|
||||
|
||||
`--remote-plugin-id` takes the backend ID, such as `plugins~Plugin_...`, not the
|
||||
local `<plugin>@<marketplace>` ID.
|
||||
@@ -83,7 +86,7 @@ Analytics use the normal queue, reduction, batching, and serialization path,
|
||||
but the debug capture destination suppresses analytics network delivery. The
|
||||
command prints one of these final states:
|
||||
|
||||
- `PASS`: the install event validated and the plugin is uninstalled.
|
||||
- `PASS`: the install and uninstall events validated and the plugin is uninstalled.
|
||||
- `FAIL-CLEAN`: validation failed, but the original uninstalled state was
|
||||
restored.
|
||||
- `FAIL-LOCAL-CACHE`: the backend is uninstalled, but local cleanup reported
|
||||
|
||||
@@ -1222,6 +1222,7 @@ async fn thread_list(endpoint: &Endpoint, config_overrides: &[String], limit: u3
|
||||
source_kinds: None,
|
||||
archived: None,
|
||||
parent_thread_id: None,
|
||||
ancestor_thread_id: None,
|
||||
cwd: None,
|
||||
use_state_db_only: false,
|
||||
search_term: None,
|
||||
|
||||
@@ -35,7 +35,7 @@ pub(super) fn read_events_for_remote_plugin(
|
||||
matching.extend(
|
||||
events
|
||||
.iter()
|
||||
.filter(|event| event["event_params"]["plugin_id"] == remote_plugin_id)
|
||||
.filter(|event| event["event_params"]["remote_plugin_id"] == remote_plugin_id)
|
||||
.cloned(),
|
||||
);
|
||||
}
|
||||
@@ -44,6 +44,7 @@ pub(super) fn read_events_for_remote_plugin(
|
||||
|
||||
pub(super) struct PluginEventIdentity<'a> {
|
||||
pub(super) plugin_id: &'a str,
|
||||
pub(super) remote_plugin_id: &'a str,
|
||||
pub(super) plugin_name: &'a str,
|
||||
pub(super) marketplace_name: &'a str,
|
||||
}
|
||||
@@ -52,25 +53,29 @@ pub(super) fn validate_mutation_events(
|
||||
events: Vec<Value>,
|
||||
expected: PluginEventIdentity<'_>,
|
||||
) -> Result<Vec<Value>> {
|
||||
let event_type = "codex_plugin_installed";
|
||||
let matching = events
|
||||
.iter()
|
||||
.filter(|event| event["event_type"] == event_type)
|
||||
.collect::<Vec<_>>();
|
||||
let [event] = matching.as_slice() else {
|
||||
bail!(
|
||||
"expected exactly one `{event_type}` event for `{}`, found {}",
|
||||
expected.plugin_id,
|
||||
matching.len()
|
||||
);
|
||||
};
|
||||
validate_event(event, &expected)?;
|
||||
Ok(vec![(*event).clone()])
|
||||
let mut validated = Vec::new();
|
||||
for event_type in ["codex_plugin_installed", "codex_plugin_uninstalled"] {
|
||||
let matching = events
|
||||
.iter()
|
||||
.filter(|event| event["event_type"] == event_type)
|
||||
.collect::<Vec<_>>();
|
||||
let [event] = matching.as_slice() else {
|
||||
bail!(
|
||||
"expected exactly one `{event_type}` event for `{}`, found {}",
|
||||
expected.remote_plugin_id,
|
||||
matching.len()
|
||||
);
|
||||
};
|
||||
validate_event(event, &expected)?;
|
||||
validated.push((*event).clone());
|
||||
}
|
||||
Ok(validated)
|
||||
}
|
||||
|
||||
fn validate_event(event: &Value, expected: &PluginEventIdentity<'_>) -> Result<()> {
|
||||
let params = &event["event_params"];
|
||||
require_string(params, "plugin_id", expected.plugin_id)?;
|
||||
require_string(params, "remote_plugin_id", expected.remote_plugin_id)?;
|
||||
require_string(params, "plugin_name", expected.plugin_name)?;
|
||||
require_string(params, "marketplace_name", expected.marketplace_name)?;
|
||||
for field in [
|
||||
|
||||
@@ -14,15 +14,17 @@ const REMOTE_PLUGIN_ID: &str = "plugins~Plugin_test";
|
||||
fn reads_and_validates_remote_plugin_mutation_events() {
|
||||
let path = unique_capture_path("valid");
|
||||
let installed = mutation_event("codex_plugin_installed");
|
||||
let uninstalled = mutation_event("codex_plugin_uninstalled");
|
||||
let unrelated = json!({
|
||||
"event_type": "codex_plugin_installed",
|
||||
"event_params": {
|
||||
"plugin_id": "plugins~Plugin_other"
|
||||
"plugin_id": "other@openai-curated-remote",
|
||||
"remote_plugin_id": "plugins~Plugin_other"
|
||||
}
|
||||
});
|
||||
let contents = [
|
||||
json!({"events": [unrelated]}),
|
||||
json!({"events": [installed]}),
|
||||
json!({"events": [installed, uninstalled]}),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|payload| serde_json::to_string(&payload).expect("serialize capture payload"))
|
||||
@@ -35,7 +37,7 @@ fn reads_and_validates_remote_plugin_mutation_events() {
|
||||
let validated =
|
||||
validate_mutation_events(events, expected_identity()).expect("validate mutation events");
|
||||
|
||||
assert_eq!(validated, vec![installed]);
|
||||
assert_eq!(validated, vec![installed, uninstalled]);
|
||||
fs::remove_file(path).expect("remove capture file");
|
||||
}
|
||||
|
||||
@@ -62,7 +64,8 @@ fn mutation_event(event_type: &str) -> Value {
|
||||
json!({
|
||||
"event_type": event_type,
|
||||
"event_params": {
|
||||
"plugin_id": REMOTE_PLUGIN_ID,
|
||||
"plugin_id": "sample@openai-curated-remote",
|
||||
"remote_plugin_id": REMOTE_PLUGIN_ID,
|
||||
"plugin_name": "sample",
|
||||
"marketplace_name": "openai-curated-remote",
|
||||
"has_skills": true,
|
||||
@@ -75,7 +78,8 @@ fn mutation_event(event_type: &str) -> Value {
|
||||
|
||||
fn expected_identity() -> PluginEventIdentity<'static> {
|
||||
PluginEventIdentity {
|
||||
plugin_id: REMOTE_PLUGIN_ID,
|
||||
plugin_id: "sample@openai-curated-remote",
|
||||
remote_plugin_id: REMOTE_PLUGIN_ID,
|
||||
plugin_name: "sample",
|
||||
marketplace_name: "openai-curated-remote",
|
||||
}
|
||||
|
||||
@@ -312,13 +312,19 @@ fn run_mutation_sequence(
|
||||
state_err
|
||||
}
|
||||
})?;
|
||||
wait_for_remote_plugin_event(
|
||||
capture_path,
|
||||
&expected.remote_plugin_id,
|
||||
"codex_plugin_uninstalled",
|
||||
)?;
|
||||
|
||||
let captured_events =
|
||||
read_events_for_remote_plugin(capture_path, &expected.remote_plugin_id)?;
|
||||
let events = validate_mutation_events(
|
||||
captured_events,
|
||||
PluginEventIdentity {
|
||||
plugin_id: &expected.remote_plugin_id,
|
||||
plugin_id: &expected.plugin_id,
|
||||
remote_plugin_id: &expected.remote_plugin_id,
|
||||
plugin_name: &expected.plugin_name,
|
||||
marketplace_name: &expected.marketplace_name,
|
||||
},
|
||||
|
||||
@@ -159,6 +159,7 @@ fn wait_for_plugin_usage(
|
||||
#[derive(Debug)]
|
||||
struct ExpectedPlugin {
|
||||
plugin_id: String,
|
||||
remote_plugin_id: String,
|
||||
plugin_name: String,
|
||||
marketplace_name: String,
|
||||
}
|
||||
@@ -208,13 +209,15 @@ fn expected_plugin(response: &PluginInstalledResponse, plugin_id: &str) -> Resul
|
||||
plugin.availability
|
||||
);
|
||||
}
|
||||
plugin
|
||||
let remote_plugin_id = plugin
|
||||
.remote_plugin_id
|
||||
.as_ref()
|
||||
.with_context(|| format!("plugin `{plugin_id}` does not have a remote plugin id"))?;
|
||||
.with_context(|| format!("plugin `{plugin_id}` does not have a remote plugin id"))?
|
||||
.clone();
|
||||
|
||||
Ok(ExpectedPlugin {
|
||||
plugin_id: plugin.id.clone(),
|
||||
remote_plugin_id,
|
||||
plugin_name: plugin.name.clone(),
|
||||
marketplace_name: marketplace.name.clone(),
|
||||
})
|
||||
@@ -444,6 +447,7 @@ fn event_count(events: &[Value], event_type: &str) -> usize {
|
||||
fn validate_identity(event: &Value, expected: &ExpectedPlugin) -> Result<()> {
|
||||
let params = &event["event_params"];
|
||||
require_string(params, "plugin_id", &expected.plugin_id)?;
|
||||
require_string(params, "remote_plugin_id", &expected.remote_plugin_id)?;
|
||||
require_string(params, "plugin_name", &expected.plugin_name)?;
|
||||
require_string(params, "marketplace_name", &expected.marketplace_name)
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ uuid = { workspace = true, features = ["serde", "v7"] }
|
||||
[dev-dependencies]
|
||||
chrono = { workspace = true }
|
||||
codex-config = { workspace = true }
|
||||
codex-protocol = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
tokio = { workspace = true, features = ["test-util"] }
|
||||
@@ -18,7 +18,6 @@ use crate::transport::CHANNEL_CAPACITY;
|
||||
use crate::transport::ConnectionOrigin;
|
||||
use crate::transport::TransportEvent;
|
||||
use base64::Engine;
|
||||
use codex_app_server_protocol::AuthMode;
|
||||
use codex_app_server_protocol::ConfigWarningNotification;
|
||||
use codex_app_server_protocol::JSONRPCMessage;
|
||||
use codex_app_server_protocol::RemoteControlConnectionStatus;
|
||||
@@ -36,6 +35,7 @@ use codex_login::CodexAuth;
|
||||
use codex_login::save_auth;
|
||||
use codex_login::token_data::TokenData;
|
||||
use codex_login::token_data::parse_chatgpt_jwt_claims;
|
||||
use codex_protocol::auth::AuthMode;
|
||||
use codex_state::RemoteControlEnrollmentRecord;
|
||||
use codex_state::StateRuntime;
|
||||
use futures::SinkExt;
|
||||
|
||||
@@ -1813,7 +1813,6 @@ mod tests {
|
||||
use crate::transport::remote_control::protocol::StreamId;
|
||||
use crate::transport::remote_control::protocol::normalize_remote_control_url;
|
||||
use chrono::Utc;
|
||||
use codex_app_server_protocol::AuthMode;
|
||||
use codex_app_server_protocol::ConfigWarningNotification;
|
||||
use codex_app_server_protocol::JSONRPCMessage;
|
||||
use codex_app_server_protocol::JSONRPCNotification;
|
||||
@@ -1826,6 +1825,7 @@ mod tests {
|
||||
use codex_login::save_auth;
|
||||
use codex_login::token_data::TokenData;
|
||||
use codex_login::token_data::parse_chatgpt_jwt_claims;
|
||||
use codex_protocol::auth::AuthMode;
|
||||
use codex_state::StateRuntime;
|
||||
use futures::StreamExt;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -11,6 +11,7 @@ codex_rust_crate(
|
||||
"//codex-rs/rmcp-client:test_stdio_server",
|
||||
],
|
||||
integration_test_timeout = "long",
|
||||
run_tests_with_wine_exec = True,
|
||||
test_shard_counts = {
|
||||
# Note app-server-all-test has a large number of integration tests, so
|
||||
# even a single shard can be quite slow. When there is a legitimate
|
||||
|
||||
@@ -33,6 +33,7 @@ codex-analytics = { workspace = true }
|
||||
codex-arg0 = { workspace = true }
|
||||
codex-cloud-config = { workspace = true }
|
||||
codex-config = { workspace = true }
|
||||
codex-connectors = { workspace = true }
|
||||
codex-core = { workspace = true }
|
||||
codex-core-plugins = { workspace = true }
|
||||
codex-home = { workspace = true }
|
||||
|
||||
@@ -137,15 +137,15 @@ Example with notification opt-out:
|
||||
|
||||
## API Overview
|
||||
|
||||
- `thread/start` — create a new thread; emits `thread/started` (including the current `thread.status`) and auto-subscribes you to turn/item events for that thread. When the request includes a `cwd` and the resolved sandbox is `workspace-write` or full access, app-server also marks that project as trusted in the user `config.toml`. Pass `sessionStartSource: "clear"` when starting a replacement thread after clearing the current session so `SessionStart` hooks receive `source: "clear"` instead of the default `"startup"`. Experimental `runtimeWorkspaceRoots` replaces the thread-scoped runtime workspace roots used to materialize `:workspace_roots`; paths must be absolute. For permissions, prefer experimental `permissions` profile selection by id; the legacy `sandbox` shorthand is still accepted but cannot be combined with `permissions`. Experimental `multiAgentMode` selects the initial thread mode and defaults to `explicitRequestOnly` when omitted; use `none` to keep multi-agent tools available without injecting mode instructions. Experimental `environments` selects the sticky execution environments for turns on the thread; omit it to use the server default, pass `[]` to disable environments, or pass explicit environment ids with per-environment `cwd`. Experimental `selectedCapabilityRoots` selects environment-owned plugin or standalone-skill roots. Skills found below those roots are listed and read through the owning environment. Stdio MCP servers declared by selected plugins are also started in that environment; HTTP MCP declarations remain inactive.
|
||||
- `thread/start` — create a new thread; emits `thread/started` (including the current `thread.status`) and auto-subscribes you to turn/item events for that thread. When the request includes a `cwd` and the resolved sandbox is `workspace-write` or full access, app-server also marks that project as trusted in the user `config.toml`. Pass `sessionStartSource: "clear"` when starting a replacement thread after clearing the current session so `SessionStart` hooks receive `source: "clear"` instead of the default `"startup"`. Experimental `runtimeWorkspaceRoots` replaces the thread-scoped runtime workspace roots used to materialize `:workspace_roots`; paths must be absolute. For permissions, prefer experimental `permissions` profile selection by id; the legacy `sandbox` shorthand is still accepted but cannot be combined with `permissions`. Experimental `multiAgentMode` selects the initial thread mode and defaults to `explicitRequestOnly` when omitted; use `none` to keep multi-agent tools available without injecting mode instructions. Experimental `environments` selects the sticky execution environments for turns on the thread; omit it to use the server default, pass `[]` to disable environments, or pass explicit environment ids with per-environment `cwd`. Experimental `selectedCapabilityRoots` selects environment-owned plugin or standalone-skill roots using environment-native absolute paths. Skills found below those roots are listed and read through the owning environment. Stdio MCP servers declared by selected plugins are also started in that environment; HTTP MCP declarations remain inactive.
|
||||
- `thread/resume` — reopen an existing thread by id so subsequent `turn/start` calls append to it. Accepts the same permission override rules as `thread/start`. Multi-agent mode restores the last effective mode from rollout history when available; clients can select another mode on the first `turn/start`.
|
||||
- `thread/fork` — fork an existing thread into a new thread id by copying the stored history; if the source thread is currently mid-turn, the fork records the same interruption marker as `turn/interrupt` instead of inheriting an unmarked partial turn suffix. The returned `thread.forkedFromId` points at the source thread when known. Accepts `ephemeral: true` for an in-memory temporary fork, emits `thread/started` (including the current `thread.status`), and auto-subscribes you to turn/item events for the new thread. Experimental clients can pass `excludeTurns: true` when they plan to page fork history via `thread/turns/list` instead of receiving the full turn array immediately. Accepts the same permission override rules as `thread/start`.
|
||||
- `thread/start`, `thread/resume`, and `thread/fork` responses include the legacy `sandbox` compatibility projection. `instructionSources` lists loaded instruction files using each source environment's native absolute path syntax, including files loaded from remote environments. Experimental clients can read `runtimeWorkspaceRoots` for the thread-scoped runtime roots and `activePermissionProfile` for the named or implicit built-in profile identity/provenance when known. Their experimental `multiAgentMode` field, and the corresponding thread setting, report the thread's current mode. Turn construction separately determines whether that mode is applicable to the selected model and runtime configuration.
|
||||
- `thread/list` — page through stored threads; supports cursor-based pagination and optional `modelProviders`, `sourceKinds`, `archived`, `cwd`, and `searchTerm` filters. Experimental clients can use `parentThreadId` to filter direct spawned children represented by persisted spawn-edge state. Review and Guardian threads are not included because they do not participate in that spawn-edge lifecycle. Each returned `thread` includes `status` (`ThreadStatus`), defaulting to `notLoaded` when the thread is not currently loaded. Subagent threads also include `parentThreadId` when the immediate parent is known.
|
||||
- `thread/list` — page through stored threads; supports cursor-based pagination and optional `modelProviders`, `sourceKinds`, `archived`, `cwd`, and `searchTerm` filters. Experimental clients can use `parentThreadId` for direct spawned children or `ancestorThreadId` for spawned descendants at any depth; the two filters are mutually exclusive. Review and Guardian threads are not included because they do not participate in that spawn-edge lifecycle. Each returned `thread` includes `status` (`ThreadStatus`), defaulting to `notLoaded` when the thread is not currently loaded. Subagent threads also include `parentThreadId` when the immediate parent is known.
|
||||
- `thread/loaded/list` — list the thread ids currently loaded in memory.
|
||||
- `thread/read` — read a stored thread by id without resuming it; optionally include turns via `includeTurns`. The returned `thread` includes `status` (`ThreadStatus`), defaulting to `notLoaded` when the thread is not currently loaded.
|
||||
- `thread/turns/list` — experimental; page through a stored thread’s turn history without resuming it; supports cursor-based pagination with `sortDirection`, `itemsView`, `nextCursor`, and `backwardsCursor`.
|
||||
- `thread/turns/items/list` — experimental; reserved for paging full items for one turn. The API shape is present, but app-server currently returns an unsupported-method JSON-RPC error.
|
||||
- `thread/items/list` — experimental; page through persisted thread items without resuming the thread. Pass `turnId` to restrict results to one turn, or omit it to page items across the thread. The active thread store must support item pagination.
|
||||
- `thread/metadata/update` — patch stored thread metadata in sqlite; currently supports updating persisted `gitInfo` fields and returns the refreshed `thread`.
|
||||
- `thread/settings/update` — experimental; queue a partial update to a loaded thread’s next-turn settings without starting a turn or adding transcript items. Omitted fields leave settings unchanged; `serviceTier: null` clears the tier; `multiAgentMode` selects `none`, `explicitRequestOnly`, or `proactive` for subsequent turns; `sandboxPolicy` and `permissions` cannot be combined. Returns `{}` when the update is accepted and emits `thread/settings/updated` with the full effective settings only if they actually change. `turn/start` settings overrides emit the same notification when they change the stored settings.
|
||||
- `thread/memoryMode/set` — experimental; set a thread’s persisted memory eligibility to `"enabled"` or `"disabled"` for either a loaded thread or a stored rollout; returns `{}` on success.
|
||||
@@ -238,8 +238,8 @@ Example with notification opt-out:
|
||||
- `windowsSandbox/setupStart` — start Windows sandbox setup for the selected mode (`elevated` or `unelevated`); accepts an optional absolute `cwd` to target setup for a specific workspace, returns `{ started: true }` immediately, and later emits `windowsSandbox/setupCompleted`.
|
||||
- `feedback/upload` — submit a feedback report (classification + optional reason/logs, conversation_id, and optional `extraLogFiles` attachments array); returns the tracking thread id.
|
||||
- `config/read` — fetch the effective config on disk after resolving config layering, including opaque `desktop` values stored in `config.toml`.
|
||||
- `externalAgentConfig/detect` — detect migratable external-agent artifacts with `includeHome` and optional `cwds`; each detected item includes `cwd` (`null` for home), and plugin/session migration items may additionally include structured `details` grouping plugin ids or session metadata.
|
||||
- `externalAgentConfig/import` — apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home) and any plugin/session `details` returned by detect. Callers may pass `source` to identify the product that initiated the import; omitted or `null` means unspecified. The response acknowledges the synchronous import phase with an `importId`. Expected migration failures are reported as per-item failures rather than JSON-RPC errors, so the server still returns that `importId` and emits `externalAgentConfig/import/completed` with the same ID once all synchronous and background work finishes. The completion notification contains type-level `itemTypeResults` with successes and failures, including raw failure messages for the client to report separately.
|
||||
- `externalAgentConfig/detect` — detect migratable external-agent artifacts with `includeHome` and optional `cwds`; each detected item includes `cwd` (`null` for home), and multi-item migrations may additionally include structured `details` with plugin ids, skill names, session metadata, or other artifact names.
|
||||
- `externalAgentConfig/import` — apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home) and any `details` returned by detect. Callers may pass `source` to identify the product that initiated the import; omitted or `null` means unspecified. The response acknowledges the synchronous import phase with an `importId`. Expected migration failures are reported as per-item failures rather than JSON-RPC errors, so the server still returns that `importId` and emits `externalAgentConfig/import/completed` with the same ID once all synchronous and background work finishes. The completion notification contains type-level `itemTypeResults` with successes and failures, including raw failure messages for the client to report separately.
|
||||
- `config/value/write` — write a single config key/value to the user's config.toml on disk; dotted paths such as `desktop.someKey` use the same generic write surface.
|
||||
- `config/batchWrite` — apply multiple config edits atomically to the user's config.toml on disk, with optional `reloadUserConfig: true` to hot-reload loaded threads, including multiple `desktop.*` edits.
|
||||
- `configRequirements/read` — fetch loaded requirements constraints from `requirements.toml` and/or MDM (or `null` if none are configured), including allow-lists (`allowedApprovalPolicies`, `allowedSandboxModes`, `allowedWebSearchModes`), the layered permission-profile allow map (`allowedPermissionProfiles`), the managed permission-profile default (`defaultPermissions`), lifecycle hook lockdown (`allowManagedHooksOnly`), remote-control policy (`allowRemoteControl`; `false` force-disables remote control while `true` or `null` preserves existing behavior), computer use policy (`computerUse`), pinned feature values (`featureRequirements`), managed lifecycle hooks (`hooks`), `enforceResidency`, and `network` constraints such as canonical domain/socket permissions plus `managedAllowedDomainsOnly` and `dangerFullAccessDenylistOnly`.
|
||||
@@ -267,7 +267,6 @@ Start a fresh thread when you need a new Codex conversation.
|
||||
"location": {
|
||||
"type": "environment",
|
||||
"environmentId": "workspace",
|
||||
// Opaque to app-server; interpreted in the selected environment.
|
||||
"path": "/opt/cca/plugins/github"
|
||||
}
|
||||
}
|
||||
@@ -404,18 +403,19 @@ Example:
|
||||
|
||||
When `nextCursor` is `null`, you’ve reached the final page.
|
||||
|
||||
### Example: List direct child threads
|
||||
### Example: List descendant threads
|
||||
|
||||
Enable `capabilities.experimentalApi` during initialization, then use `thread/list` with `parentThreadId` to page through a thread's direct spawned children from persisted spawn-edge state. Results do not recursively include grandchildren. Review and Guardian threads are not included because they do not participate in the spawn-edge lifecycle. When `modelProviders` or `sourceKinds` is omitted, parent-filtered requests include every provider or source kind, respectively. Explicit filters retain the ordinary `thread/list` behavior, including the interactive-only default for an empty `sourceKinds` list.
|
||||
Enable `capabilities.experimentalApi` during initialization, then use `thread/list` with `ancestorThreadId` to page through every spawned descendant of a thread from persisted spawn-edge state. The ancestor itself is excluded, and each result's `parentThreadId` remains its immediate parent. Use `parentThreadId` instead when only direct children are wanted; sending both filters is invalid. Review and Guardian threads are not included because they do not participate in the spawn-edge lifecycle. When `modelProviders` or `sourceKinds` is omitted, relationship-filtered requests include every provider or source kind, respectively. Explicit filters retain the ordinary `thread/list` behavior, including the interactive-only default for an empty `sourceKinds` list.
|
||||
|
||||
```json
|
||||
{ "method": "thread/list", "id": 21, "params": {
|
||||
"parentThreadId": "00000000-0000-0000-0000-000000000100",
|
||||
"ancestorThreadId": "00000000-0000-0000-0000-000000000100",
|
||||
"limit": 25
|
||||
} }
|
||||
{ "id": 21, "result": {
|
||||
"data": [
|
||||
{ "id": "00000000-0000-0000-0000-000000000101", "parentThreadId": "00000000-0000-0000-0000-000000000100", "status": { "type": "notLoaded" } }
|
||||
{ "id": "00000000-0000-0000-0000-000000000101", "parentThreadId": "00000000-0000-0000-0000-000000000100", "status": { "type": "notLoaded" } },
|
||||
{ "id": "00000000-0000-0000-0000-000000000102", "parentThreadId": "00000000-0000-0000-0000-000000000101", "status": { "type": "notLoaded" } }
|
||||
],
|
||||
"nextCursor": null,
|
||||
"backwardsCursor": null
|
||||
@@ -514,10 +514,10 @@ Every returned `Turn` includes `itemsView`, which tells clients whether the `ite
|
||||
} }
|
||||
```
|
||||
|
||||
`thread/turns/items/list` is the planned hydration API for fetching full items for one turn:
|
||||
`thread/items/list` pages full persisted items across a thread, optionally filtered to one turn:
|
||||
|
||||
```json
|
||||
{ "method": "thread/turns/items/list", "id": 25, "params": {
|
||||
{ "method": "thread/items/list", "id": 25, "params": {
|
||||
"threadId": "thr_123",
|
||||
"turnId": "turn_456",
|
||||
"limit": 100,
|
||||
@@ -525,7 +525,7 @@ Every returned `Turn` includes `itemsView`, which tells clients whether the `ite
|
||||
} }
|
||||
```
|
||||
|
||||
This method currently returns JSON-RPC `-32601` with message `thread/turns/items/list is not supported yet`.
|
||||
Omit `turnId` or pass `null` to page items across the thread. Thread stores that do not implement item pagination return JSON-RPC `-32601` with message `thread/items/list is not supported yet`.
|
||||
|
||||
### Example: Update stored thread metadata
|
||||
|
||||
@@ -714,9 +714,11 @@ If the thread does not already have an active turn, the server starts a standalo
|
||||
Turns attach user input (text or images) to a thread and trigger Codex generation. The `input` field is a list of discriminated unions:
|
||||
|
||||
- `{"type":"text","text":"Explain this diff"}`
|
||||
- `{"type":"image","url":"https://…png"}`
|
||||
- `{"type":"image","url":"data:image/png;base64,…"}`
|
||||
- `{"type":"localImage","path":"/tmp/screenshot.png"}`
|
||||
|
||||
The `image` variant accepts inline data URLs. Remote HTTP(S) image URLs are rejected; use a data URL or `localImage` instead.
|
||||
|
||||
You can optionally specify config overrides on the new turn. If specified, these settings become the default for subsequent turns on the same thread. `outputSchema` applies only to the current turn. Experimental `environments` is turn-scoped: omit it to inherit the thread's sticky environments, pass `[]` to run the turn with no environments, or pass explicit environment ids to override the sticky selection for this turn only.
|
||||
|
||||
`approvalsReviewer` accepts:
|
||||
@@ -828,7 +830,7 @@ Invoke a plugin by including a UI mention token such as `@sample` in the text in
|
||||
|
||||
### Example: Inject raw history items
|
||||
|
||||
Use `thread/inject_items` to append prebuilt Responses API items to a loaded thread’s prompt history without starting a user turn. These items are persisted to the rollout and included in subsequent model requests.
|
||||
Use `thread/inject_items` to append prebuilt Responses API items to a loaded thread’s prompt history without starting a user turn. These items are persisted to the rollout and included in subsequent model requests. Any `input_image` items must use inline data URLs; remote HTTP(S) image URLs are rejected.
|
||||
|
||||
```json
|
||||
{ "method": "thread/inject_items", "id": 36, "params": {
|
||||
@@ -1353,7 +1355,7 @@ The app-server streams JSON-RPC notifications while a turn is running. Each turn
|
||||
- `turn/completed` — `{ turn }` where `turn.status` is `completed`, `interrupted`, or `failed`; failures carry `{ error: { message, codexErrorInfo?, additionalDetails? } }`.
|
||||
- `turn/diff/updated` — `{ threadId, turnId, diff }` represents the up-to-date snapshot of the turn-level unified diff, emitted after every FileChange item. `diff` is the latest aggregated unified diff across every file change in the turn. UIs can render this to show the full "what changed" view without stitching individual `fileChange` items.
|
||||
- `turn/plan/updated` — `{ turnId, explanation?, plan }` whenever the agent shares or changes its plan; each `plan` entry is `{ step, status }` with `status` in `pending`, `inProgress`, or `completed`.
|
||||
- `model/safetyBuffering/updated` — `{ threadId, turnId, model, useCases, reasons }` when a response enters safety buffering. This notification is transient and is not persisted in rollout history.
|
||||
- `model/safetyBuffering/updated` — `{ threadId, turnId, model, useCases, reasons, showBufferingUi, fasterModel }` when a response enters safety buffering. `fasterModel` is nullable. This notification is transient and is not persisted in rollout history.
|
||||
- `model/rerouted` — `{ threadId, turnId, fromModel, toModel, reason }` when the backend reroutes a request to a different model (for example, due to high-risk cyber safety checks).
|
||||
- `model/verification` — `{ threadId, turnId, verifications }` when the backend flags additional account verification, such as `trustedAccessForCyber`.
|
||||
- `turn/moderationMetadata` — experimental; `{ threadId, turnId, metadata }` when a first-party backend supplies turn-scoped moderation metadata for client-side presentation.
|
||||
@@ -1422,6 +1424,7 @@ There are additional item-specific events:
|
||||
`codexErrorInfo` maps to the `CodexErrorInfo` enum. Common values:
|
||||
|
||||
- `ContextWindowExceeded`
|
||||
- `SessionBudgetExceeded`
|
||||
- `UsageLimitExceeded`
|
||||
- `HttpConnectionFailed { httpStatusCode? }`: upstream HTTP failures including 4xx/5xx
|
||||
- `ResponseStreamConnectionFailed { httpStatusCode? }`: failure to connect to the response SSE stream
|
||||
@@ -1585,7 +1588,7 @@ The server also emits item lifecycle notifications around the request:
|
||||
3. Client response.
|
||||
4. `item/completed` with `item.type = "dynamicToolCall"`, final `status`, and the returned `contentItems`/`success`.
|
||||
|
||||
The client must respond with content items. Use `inputText` for text and `inputImage` for image URLs/data URLs:
|
||||
The client must respond with content items. Use `inputText` for text and `inputImage` for inline data URLs. Remote HTTP(S) image URLs make the dynamic tool response invalid.
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -1784,7 +1787,7 @@ To disable a non-managed hook, upsert a state entry at `hooks.state` with `confi
|
||||
To re-enable it, upsert the same hook key with `"enabled": true`.
|
||||
## Apps
|
||||
|
||||
Use `app/list` to fetch available apps (connectors). Each entry includes metadata like the app `id`, display `name`, `installUrl`, `branding`, `appMetadata`, `labels`, whether it is currently accessible, and whether it is enabled in config.
|
||||
Use `app/list` to fetch available apps (connectors). Each entry includes metadata like the app `id`, display `name`, `installUrl`, legacy logo URLs, structured light and dark icon assets, `branding`, `appMetadata`, `labels`, whether it is currently accessible, and whether it is enabled in config.
|
||||
|
||||
```json
|
||||
{ "method": "app/list", "id": 50, "params": {
|
||||
@@ -1801,6 +1804,10 @@ Use `app/list` to fetch available apps (connectors). Each entry includes metadat
|
||||
"description": "Example connector for documentation.",
|
||||
"logoUrl": "https://example.com/demo-app.png",
|
||||
"logoUrlDark": null,
|
||||
"iconAssets": {
|
||||
"256_square": "https://example.com/demo-app-square.png"
|
||||
},
|
||||
"iconDarkAssets": null,
|
||||
"distributionChannel": null,
|
||||
"branding": null,
|
||||
"appMetadata": null,
|
||||
@@ -1831,6 +1838,10 @@ The server also emits `app/list/updated` notifications whenever either source (a
|
||||
"description": "Example connector for documentation.",
|
||||
"logoUrl": "https://example.com/demo-app.png",
|
||||
"logoUrlDark": null,
|
||||
"iconAssets": {
|
||||
"256_square": "https://example.com/demo-app-square.png"
|
||||
},
|
||||
"iconDarkAssets": null,
|
||||
"distributionChannel": null,
|
||||
"branding": null,
|
||||
"appMetadata": null,
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
use codex_app_server_protocol::AppBranding as ApiAppBranding;
|
||||
use codex_app_server_protocol::AppInfo as ApiAppInfo;
|
||||
use codex_app_server_protocol::AppMetadata as ApiAppMetadata;
|
||||
use codex_app_server_protocol::AppReview as ApiAppReview;
|
||||
use codex_app_server_protocol::AppScreenshot as ApiAppScreenshot;
|
||||
use codex_connectors::AppBranding;
|
||||
use codex_connectors::AppInfo;
|
||||
use codex_connectors::AppMetadata;
|
||||
use codex_connectors::AppReview;
|
||||
use codex_connectors::AppScreenshot;
|
||||
|
||||
/// Converts connector-domain app metadata owned by `codex-connectors` into the app-server wire
|
||||
/// type owned by `codex-app-server-protocol`.
|
||||
///
|
||||
/// The types stay separate so app-server protocol ownership does not leak into the connector
|
||||
/// domain crate. Because this crate owns neither type, Rust's orphan rules require an explicit
|
||||
/// conversion function instead of a `From` implementation.
|
||||
pub(crate) fn app_info_to_api(app: AppInfo) -> ApiAppInfo {
|
||||
let AppInfo {
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
logo_url,
|
||||
logo_url_dark,
|
||||
icon_assets,
|
||||
icon_dark_assets,
|
||||
distribution_channel,
|
||||
branding,
|
||||
app_metadata,
|
||||
labels,
|
||||
install_url,
|
||||
is_accessible,
|
||||
is_enabled,
|
||||
plugin_display_names,
|
||||
} = app;
|
||||
ApiAppInfo {
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
logo_url,
|
||||
logo_url_dark,
|
||||
icon_assets,
|
||||
icon_dark_assets,
|
||||
distribution_channel,
|
||||
branding: branding.map(app_branding_to_api),
|
||||
app_metadata: app_metadata.map(app_metadata_to_api),
|
||||
labels,
|
||||
install_url,
|
||||
is_accessible,
|
||||
is_enabled,
|
||||
plugin_display_names,
|
||||
}
|
||||
}
|
||||
|
||||
fn app_branding_to_api(branding: AppBranding) -> ApiAppBranding {
|
||||
let AppBranding {
|
||||
category,
|
||||
developer,
|
||||
website,
|
||||
privacy_policy,
|
||||
terms_of_service,
|
||||
is_discoverable_app,
|
||||
} = branding;
|
||||
ApiAppBranding {
|
||||
category,
|
||||
developer,
|
||||
website,
|
||||
privacy_policy,
|
||||
terms_of_service,
|
||||
is_discoverable_app,
|
||||
}
|
||||
}
|
||||
|
||||
fn app_review_to_api(review: AppReview) -> ApiAppReview {
|
||||
let AppReview { status } = review;
|
||||
ApiAppReview { status }
|
||||
}
|
||||
|
||||
fn app_screenshot_to_api(screenshot: AppScreenshot) -> ApiAppScreenshot {
|
||||
let AppScreenshot {
|
||||
url,
|
||||
file_id,
|
||||
user_prompt,
|
||||
} = screenshot;
|
||||
ApiAppScreenshot {
|
||||
url,
|
||||
file_id,
|
||||
user_prompt,
|
||||
}
|
||||
}
|
||||
|
||||
fn app_metadata_to_api(metadata: AppMetadata) -> ApiAppMetadata {
|
||||
let AppMetadata {
|
||||
review,
|
||||
categories,
|
||||
sub_categories,
|
||||
seo_description,
|
||||
screenshots,
|
||||
developer,
|
||||
version,
|
||||
version_id,
|
||||
version_notes,
|
||||
first_party_type,
|
||||
first_party_requires_install,
|
||||
show_in_composer_when_unlinked,
|
||||
} = metadata;
|
||||
ApiAppMetadata {
|
||||
review: review.map(app_review_to_api),
|
||||
categories,
|
||||
sub_categories,
|
||||
seo_description,
|
||||
screenshots: screenshots
|
||||
.map(|screenshots| screenshots.into_iter().map(app_screenshot_to_api).collect()),
|
||||
developer,
|
||||
version,
|
||||
version_id,
|
||||
version_notes,
|
||||
first_party_type,
|
||||
first_party_requires_install,
|
||||
show_in_composer_when_unlinked,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
use codex_app_server_protocol::AuthMode as ApiAuthMode;
|
||||
use codex_protocol::auth::AuthMode;
|
||||
|
||||
/// Converts the domain auth mode owned by `codex-protocol` into the app-server wire type owned by
|
||||
/// `codex-app-server-protocol`.
|
||||
///
|
||||
/// The types stay separate so app-server protocol ownership does not leak into domain crates.
|
||||
/// Because this crate owns neither type, Rust's orphan rules require an explicit conversion
|
||||
/// function instead of a `From` implementation.
|
||||
pub(crate) fn auth_mode_to_api(auth_mode: AuthMode) -> ApiAuthMode {
|
||||
match auth_mode {
|
||||
AuthMode::ApiKey => ApiAuthMode::ApiKey,
|
||||
AuthMode::Chatgpt => ApiAuthMode::Chatgpt,
|
||||
AuthMode::ChatgptAuthTokens => ApiAuthMode::ChatgptAuthTokens,
|
||||
AuthMode::AgentIdentity => ApiAuthMode::AgentIdentity,
|
||||
AuthMode::PersonalAccessToken => ApiAuthMode::PersonalAccessToken,
|
||||
AuthMode::BedrockApiKey => ApiAuthMode::BedrockApiKey,
|
||||
}
|
||||
}
|
||||
Loaded 100 of 763 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user