# doc: https://developers.openai.com/codex/config-advanced
#      https://developers.openai.com/codex/config-reference

# The API key is valid just for a week
# Generate API key:
# 1. Open https://apex.oraclecorp.com/pls/apex/r/oca/api-key/home and generate an API Key for yourself.
# 2. Press 'Copy Codex Environment Setup Command'
# 3. paste the command and run it
#    #+begin_src bash
#      echo <api_key> | codex login --with-api-key
#    #+end_src


# model = "oca/gpt-5.1-codex-mini"
# profile = "gpt-5-1-codex-mini"

model = "gpt-5.4"
profile = "gpt-5-4"


web_search_request = true
trust_level = "trusted"

sandbox_mode = "workspace-write"


[features]
multi_agent = true

[agents]
max_threads = 20
max_depth = 2

[tui]
alternate_screen = "always"

[sandbox_workspace_write]
network_access = true
writable_roots = [ "/Users/jetpac/.codex/skills" ]

[analytics]
enabled = false
[model_providers.oca-responses]
base_url = "https://code-internal.aiservice.us-chicago-1.oci.oraclecloud.com/20250206/app/litellm"
http_headers = { "client" = "codex-cli", "client-version" = "0" }
model = "gpt5"
name = "Oracle Code Assist Responses"
wire_api = "responses"
[model_providers.oca-chat]
base_url = "https://code-internal.aiservice.us-chicago-1.oci.oraclecloud.com/20250206/app/litellm"
http_headers = { "client" = "codex-cli", "client-version" = "0" }
model = "gpt5"
name = "Oracle Code Assist Chat"
wire_api = "responses"
[profiles.grok-4]
model = "grok4"
model_provider = "oca-chat"
review_model = "grok4"
[profiles.grok-4-fast-reasoning]
model = "grok4-fast-reasoning"
model_provider = "oca-chat"
review_model = "grok4-fast-reasoning"
[profiles.grok-code-fast-1]
model = "grok-code-fast-1"
model_provider = "oca-chat"
review_model = "grok-code-fast-1"
[profiles.gpt-4-1]
model = "gpt-4.1"
model_provider = "oca-chat"
review_model = "gpt-4.1"
[profiles.gpt-5]
model = "gpt5"
model_provider = "oca-responses"
review_model = "gpt5"
[profiles.gpt-5-1]
model = "gpt-5.1"
model_provider = "oca-chat"
review_model = "gpt-5.1"
[profiles.gpt-5-2]
model = "gpt-5.2"
model_provider = "oca-responses"
review_model = "gpt-5.2"
[profiles.gpt-5-codex]
model = "gpt-5-codex"
model_provider = "oca-responses"
review_model = "gpt-5-codex"
personality = "pragmatic"
[profiles.gpt-5-1-codex-high]
model = "gpt-5.1-codex"
model_provider = "oca-responses"
review_model = "gpt-5.1-codex"
personality = "pragmatic"
model_reasoning_effort = "high"
[profiles.gpt-5-1-codex]
model = "gpt-5.1-codex"
model_provider = "oca-responses"
review_model = "gpt-5.1-codex"
personality = "pragmatic"
model_reasoning_effort = "medium"

[profiles.gpt-5-1-codex-mini]
model = "gpt-5.1-codex-mini"
model_provider = "oca-responses"
review_model = "gpt-5.1-codex-mini"
personality = "pragmatic"


[profiles.gpt-5-2-codex-high]
model = "gpt-5.2-codex"
model_provider = "oca-responses"
review_model = "gpt-5.2-codex"
personality = "pragmatic"
model_reasoning_effort = "high"
[profiles.gpt-5-2-codex]
model = "gpt-5.2-codex"
model_provider = "oca-responses"
review_model = "gpt-5.2-codex"
personality = "pragmatic"
model_reasoning_effort = "medium"
[profiles.gpt-5-2-codex-mini]
model = "gpt-5.2-codex-mini"
model_provider = "oca-responses"
review_model = "gpt-5.2-codex-mini"
personality = "pragmatic"


[profiles.gpt-5-3-codex]
model = "gpt-5.3-codex"
model_provider = "oca-responses"
review_model = "gpt-5.3-codex"
personality = "pragmatic"
model_reasoning_effort = "high"

[profiles.gpt-5-4]
model = "gpt-5.4"
model_provider = "oca-responses"
review_model = "gpt-5.4"
personality = "pragmatic"
model_reasoning_effort = "high"
plan_mode_reasoning_effort = "high"

[profiles.gpt-5-4-pro]
model = "gpt-5.4-pro"
model_provider = "oca-responses"
review_model = "gpt-5.4"
personality = "pragmatic"
# model_reasoning_effort = "high"




[mcp_servers.playwright]
command = "/Users/jetpac/.codex/bin/playwright-mcp"
startup_timeout_sec = 30.0
PLAYWRIGHT_BROWSERS_PATH = "0"

[mcp_servers.playwright.tools.browser_navigate]
approval_mode = "approve"


[mcp_servers.oci-kb]
command = "/Users/jetpac/.local/bin/ocikb-mcp-server"
#
# command = "uvx"
# args = ["--index", "https://artifactory.oci.oraclecorp.com/api/pypi/global-release-pypi/simple/", "--from", "oci-kb-mcp@latest", "ocikb-mcp-server"]
startup_timeout_sec = 30.0

[mcp_servers.oci-kb.tools.search]
approval_mode = "approve"

[mcp_servers.oci-kb.tools.getDocument]
approval_mode = "approve"
##  Adjust args if you need --browser=firefox, --headed, or custom launch flags.


[mcp_servers.devops_mcp]
command = "/Users/jetpac/bin/devops-mcp-wrapper.sh"
env_vars = ["OP_TOKEN", "OPERATOR_ACCESS_TOKEN"]
startup_timeout_sec = 180.0

[mcp_servers.devops_mcp.tools.get_regions]
approval_mode = "approve"

[mcp_servers.devops_mcp.tools.list_shepherd_region_details]
approval_mode = "approve"

[mcp_servers.devops_mcp.tools.search_runbooks]
approval_mode = "approve"

[mcp_servers.devops_mcp.tools.get_runbook_projects]
approval_mode = "approve"

[mcp_servers.devops_mcp.tools.get_realms]
approval_mode = "approve"

[mcp_servers.devops_mcp.tools.search_phonebook]
approval_mode = "approve"

[mcp_servers.devops_mcp.tools.get_tenancy_by_name]
approval_mode = "approve"

[projects."/Users/jetpac/bin"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/solaris-cluster/solaris/cluster"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/solaris-cluster"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/jenkins-study"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/userland-pipeline/solaris/userland/sru"]
trust_level = "trusted"

[projects."/Users/jetpac/.codex"]
trust_level = "trusted"

[projects."/private/tmp/q"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/event-horizon"]
trust_level = "trusted"

[projects."/private/tmp/ff"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/PRs/R2D2"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/userland-pipeline"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/overview"]
trust_level = "trusted"

[projects."/Users/jetpac"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/oci-desktop-service-shepherd"]
trust_level = "trusted"

[projects."/private/tmp/ips-tracker"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/ips-tracker"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/akidr/solaris/akidr"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/akidr/solaris/akidr/tf"]
trust_level = "trusted"

[projects."/private/tmp/empty"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/nori"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/tenancy-creator/valentin/tenancy-creator"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/akidr/solaris/akidr/oci/scripts"]
trust_level = "trusted"

[projects."/private/tmp/emptydir"]
trust_level = "trusted"

[projects."/private/tmp/eee"]
trust_level = "trusted"

[projects."/private/tmp/testy"]
trust_level = "trusted"

[projects."/private/tmp/pepa"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/release-tools/release-tools"]
trust_level = "trusted"

[projects."/private/tmp/proxy"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents"]
trust_level = "trusted"

[projects."/private/tmp/training"]
trust_level = "trusted"

[projects."/private/tmp/demo"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/codex-tools/MCPs/notmuch"]
trust_level = "trusted"

[projects."/private/tmp/review/oci-desktop-service-shepherd"]
trust_level = "trusted"

[projects."/private/tmp/people"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/python-code-analyzer"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/jenkins-test"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/jenkins-plugin"]
trust_level = "trusted"

[projects."/private/tmp/prs/desktop-image-builds"]
trust_level = "trusted"

[projects."/private/tmp/effe"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/PRs/ted"]
trust_level = "trusted"

[projects."/private/tmp/runbooks"]
trust_level = "trusted"

[projects."/private/tmp"]
trust_level = "trusted"

[projects."/Users/jetpac/PycharmProjects/ips-gate"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/PRs/dragos/oci-desktop-service-shepherd"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/codex/presso"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/limits/vmicp-limits-shepherd"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/OSD/PRs/dragos/pr2/oci-desktop-service-shepherd"]
trust_level = "trusted"

[projects."/Users/jetpac/Documents/codex-tools"]
trust_level = "trusted"

[projects."/Users/jetpac/.ssh"]
trust_level = "trusted"

[projects."/private/tmp/qq"]
trust_level = "trusted"

[mcp_servers.grt]
command = "/Users/jetpac/.codex/bin/grt-mcp"
startup_timeout_sec = 30

[mcp_servers.grt.tools."grt.search_entries"]
approval_mode = "approve"

[mcp_servers.grt.tools."grt.get_entry"]
approval_mode = "approve"

[mcp_servers.grt.tools."grt.get_rtis_by_target"]
approval_mode = "approve"

[mcp_servers.webrti]
command = "/Users/jetpac/.codex/bin/webrti-mcp"
startup_timeout_sec = 30

[mcp_servers.webrti.tools."webrti.get_entry"]
approval_mode = "approve"

[mcp_servers.bugdb]
command = "/Users/jetpac/.codex/bin/bugdb-mcp"
startup_timeout_sec = 30

[mcp_servers.bugdb.tools."bugdb.get_bug"]
approval_mode = "approve"

[mcp_servers.bugdb.tools."bugdb.get_comments"]
approval_mode = "approve"

[mcp_servers.bugdb.tools."bugdb.get_header_history"]
approval_mode = "approve"

[mcp_servers.bugdb.tools."bugdb.get_references"]
approval_mode = "approve"

[mcp_servers.bugdb.tools."bugdb.get_releases_affected"]
approval_mode = "approve"

[mcp_servers.bugdb.tools."bugdb.get_summary"]
approval_mode = "approve"

[mcp_servers.bugdb.tools."bugdb.search_bugs"]
approval_mode = "approve"

[mcp_servers.central_confluence]
command = "uvx"
args = [
  "--python", "3.12",
  "--default-index", "https://artifactory.oci.oraclecorp.com/api/pypi/global-dev-pypi/simple",
  "mcp-atlassian",
  "--confluence-url", "https://confluence.oraclecorp.com/confluence",
  "--confluence-use-web-session",
  "--browser", "chrome",
]
startup_timeout_sec = 300

[mcp_servers.central_confluence.tools.confluence_get_page_children]
approval_mode = "approve"

[mcp_servers.notmuch]
command = "node"
args = ["/Users/jetpac/Documents/codex-tools/MCPs/notmuch/dist/index.js"]
startup_timeout_sec = 30

[mcp_servers.notmuch.tools.notmuch_search_threads]
approval_mode = "approve"

[mcp_servers.notmuch.tools.notmuch_get_thread]
approval_mode = "approve"

[mcp_servers.notmuch.tools.notmuch_get_message]
approval_mode = "approve"

[mcp_servers.vm]
command = "node"
args = ["/Users/jetpac/Documents/codex-tools/MCPs/vm/dist/index.js"]
startup_timeout_sec = 30

[mcp_servers.oracle-bitbucket]
command = "node"
args = ["/Users/jetpac/Documents/codex-tools/MCPs/bitbucket-mcp/build/index.js"]
env_vars = ["BITBUCKET_TOKEN"]
startup_timeout_sec = 60

[mcp_servers.oracle-bitbucket.env]
BITBUCKET_URL = "https://bitbucket.oci.oraclecorp.com"
BITBUCKET_ENABLE_READ_ONLY = "true"
BITBUCKET_ENABLE_SAFE_WRITE = "true"
MCP_PROJECT_DEFAULT = "ODAAS"
MCP_PROJECT_LIST = "ODAAS"

[mcp_servers.oracle-bitbucket.tools.list_projects]
approval_mode = "approve"

[mcp_servers.oracle-bitbucket.tools.list_repositories]
approval_mode = "approve"

[mcp_servers.oracle-bitbucket.tools.search]
approval_mode = "approve"
