Compare commits

..

7 Commits

Author SHA1 Message Date
Petr Nyc
4eaf054c8a MCPs config - grt,webrti,bugdb 2026-03-13 08:29:42 +01:00
Petr Nyc
7c6c295eb8 devops-mcp and codex-mcp config and auth wrapper 2026-03-11 16:59:17 +01:00
Petr Nyc
b10c0d0bda removing oca/ from model names, it's no longer needed 2026-03-06 10:09:12 +01:00
Petr Nyc
73905e4066 codex config update 2026-03-06 09:59:41 +01:00
Petr Nyc
4f23496458 codex config update 2026-02-27 11:41:16 +01:00
Petr Nyc
6832bb64d0 zellij config 2026-02-26 13:07:15 +01:00
Petr Nyc
501aea9cea zellij init bug workaround 2026-02-26 11:26:49 +01:00
4 changed files with 788 additions and 44 deletions

View File

@@ -10,14 +10,26 @@ preferred_auth_method = "apikey"
# model = "oca/gpt-5.1-codex-mini"
# profile = "gpt-5-1-codex-mini"
model = "oca/gpt-5.3-codex"
profile = "gpt-5-3-codex"
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 = 6
max_depth = 2
[tui]
alternate_screen = "always"
[sandbox_workspace_write]
network_access = true
writable_roots = [ "/Users/jetpac/.codex/skills" ]
@@ -27,103 +39,145 @@ 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 = "oca/gpt5"
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 = "oca/gpt5"
model = "gpt5"
name = "Oracle Code Assist Chat"
wire_api = "responses"
[profiles.grok-4]
model = "oca/grok4"
model = "grok4"
model_provider = "oca-chat"
review_model = "oca/grok4"
review_model = "grok4"
[profiles.grok-4-fast-reasoning]
model = "oca/grok4-fast-reasoning"
model = "grok4-fast-reasoning"
model_provider = "oca-chat"
review_model = "oca/grok4-fast-reasoning"
review_model = "grok4-fast-reasoning"
[profiles.grok-code-fast-1]
model = "oca/grok-code-fast-1"
model = "grok-code-fast-1"
model_provider = "oca-chat"
review_model = "oca/grok-code-fast-1"
review_model = "grok-code-fast-1"
[profiles.gpt-4-1]
model = "oca/gpt-4.1"
model = "gpt-4.1"
model_provider = "oca-chat"
review_model = "oca/gpt-4.1"
review_model = "gpt-4.1"
[profiles.gpt-5]
model = "oca/gpt5"
model = "gpt5"
model_provider = "oca-responses"
review_model = "oca/gpt5"
review_model = "gpt5"
[profiles.gpt-5-1]
model = "oca/gpt-5.1"
model = "gpt-5.1"
model_provider = "oca-chat"
review_model = "oca/gpt-5.1"
review_model = "gpt-5.1"
[profiles.gpt-5-2]
model = "oca/gpt-5.2"
model = "gpt-5.2"
model_provider = "oca-responses"
review_model = "oca/gpt-5.2"
review_model = "gpt-5.2"
[profiles.gpt-5-codex]
model = "oca/gpt-5-codex"
model = "gpt-5-codex"
model_provider = "oca-responses"
review_model = "oca/gpt-5-codex"
review_model = "gpt-5-codex"
personality = "pragmatic"
[profiles.gpt-5-1-codex-high]
model = "oca/gpt-5.1-codex"
model = "gpt-5.1-codex"
model_provider = "oca-responses"
review_model = "oca/gpt-5.1-codex"
review_model = "gpt-5.1-codex"
personality = "pragmatic"
model_reasoning_effort = "high"
[profiles.gpt-5-1-codex]
model = "oca/gpt-5.1-codex"
model = "gpt-5.1-codex"
model_provider = "oca-responses"
review_model = "oca/gpt-5.1-codex"
review_model = "gpt-5.1-codex"
personality = "pragmatic"
model_reasoning_effort = "medium"
[profiles.gpt-5-1-codex-mini]
model = "oca/gpt-5.1-codex-mini"
model = "gpt-5.1-codex-mini"
model_provider = "oca-responses"
review_model = "oca/gpt-5.1-codex-mini"
review_model = "gpt-5.1-codex-mini"
personality = "pragmatic"
[profiles.gpt-5-2-codex-high]
model = "oca/gpt-5.2-codex"
model = "gpt-5.2-codex"
model_provider = "oca-responses"
review_model = "oca/gpt-5.2-codex"
review_model = "gpt-5.2-codex"
personality = "pragmatic"
model_reasoning_effort = "high"
[profiles.gpt-5-2-codex]
model = "oca/gpt-5.2-codex"
model = "gpt-5.2-codex"
model_provider = "oca-responses"
review_model = "oca/gpt-5.2-codex"
review_model = "gpt-5.2-codex"
personality = "pragmatic"
model_reasoning_effort = "medium"
[profiles.gpt-5-2-codex-mini]
model = "oca/gpt-5.2-codex-mini"
model = "gpt-5.2-codex-mini"
model_provider = "oca-responses"
review_model = "oca/gpt-5.2-codex-mini"
review_model = "gpt-5.2-codex-mini"
personality = "pragmatic"
[profiles.gpt-5-3-codex]
model = "oca/gpt-5.3-codex"
model = "gpt-5.3-codex"
model_provider = "oca-responses"
review_model = "oca/gpt-5.3-codex"
review_model = "gpt-5.3-codex"
personality = "pragmatic"
model_reasoning_effort = "medium"
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"
[mcp_servers.playwright]
name = "playwright"
command = "npx"
args = ["@playwright/mcp@latest"]
# startup_timeout_sec = 20
# env = { PLAYWRIGHT_BROWSERS_PATH = "0" }
# Adjust args if you need --browser=firefox, --headed, or custom launch flags.
command = "/Users/jetpac/.codex/bin/playwright-mcp"
startup_timeout_sec = 30.0
PLAYWRIGHT_BROWSERS_PATH = "0"
[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
## 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
[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"
[mcp_servers.grt]
command = "/Users/jetpac/.codex/bin/grt-mcp"
startup_timeout_sec = 30
[mcp_servers.webrti]
command = "/Users/jetpac/.codex/bin/webrti-mcp"
startup_timeout_sec = 30
[mcp_servers.bugdb]
command = "/Users/jetpac/.codex/bin/bugdb-mcp"
startup_timeout_sec = 30

533
.config/zellij/config.kdl Normal file
View File

@@ -0,0 +1,533 @@
keybinds clear-defaults=true {
locked {
bind "Ctrl g" { SwitchToMode "normal"; }
}
pane {
bind "left" { MoveFocus "left"; }
bind "down" { MoveFocus "down"; }
bind "up" { MoveFocus "up"; }
bind "right" { MoveFocus "right"; }
bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; }
bind "d" { NewPane "down"; SwitchToMode "normal"; }
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; }
bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; }
bind "h" { MoveFocus "left"; }
bind "i" { TogglePanePinned; SwitchToMode "normal"; }
bind "j" { MoveFocus "down"; }
bind "k" { MoveFocus "up"; }
bind "l" { MoveFocus "right"; }
bind "n" { NewPane; SwitchToMode "normal"; }
bind "p" { SwitchFocus; }
bind "Ctrl p" { SwitchToMode "normal"; }
bind "r" { NewPane "right"; SwitchToMode "normal"; }
bind "s" { NewPane "stacked"; SwitchToMode "normal"; }
bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; }
bind "z" { TogglePaneFrames; SwitchToMode "normal"; }
}
tab {
bind "left" { GoToPreviousTab; }
bind "down" { GoToNextTab; }
bind "up" { GoToPreviousTab; }
bind "right" { GoToNextTab; }
bind "1" { GoToTab 1; SwitchToMode "normal"; }
bind "2" { GoToTab 2; SwitchToMode "normal"; }
bind "3" { GoToTab 3; SwitchToMode "normal"; }
bind "4" { GoToTab 4; SwitchToMode "normal"; }
bind "5" { GoToTab 5; SwitchToMode "normal"; }
bind "6" { GoToTab 6; SwitchToMode "normal"; }
bind "7" { GoToTab 7; SwitchToMode "normal"; }
bind "8" { GoToTab 8; SwitchToMode "normal"; }
bind "9" { GoToTab 9; SwitchToMode "normal"; }
bind "[" { BreakPaneLeft; SwitchToMode "normal"; }
bind "]" { BreakPaneRight; SwitchToMode "normal"; }
bind "b" { BreakPane; SwitchToMode "normal"; }
bind "h" { GoToPreviousTab; }
bind "j" { GoToNextTab; }
bind "k" { GoToPreviousTab; }
bind "l" { GoToNextTab; }
bind "n" { NewTab; SwitchToMode "normal"; }
bind "r" { SwitchToMode "renametab"; TabNameInput 0; }
bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; }
bind "Ctrl t" { SwitchToMode "normal"; }
bind "x" { CloseTab; SwitchToMode "normal"; }
bind "tab" { ToggleTab; }
}
resize {
bind "left" { Resize "Increase left"; }
bind "down" { Resize "Increase down"; }
bind "up" { Resize "Increase up"; }
bind "right" { Resize "Increase right"; }
bind "+" { Resize "Increase"; }
bind "-" { Resize "Decrease"; }
bind "=" { Resize "Increase"; }
bind "H" { Resize "Decrease left"; }
bind "J" { Resize "Decrease down"; }
bind "K" { Resize "Decrease up"; }
bind "L" { Resize "Decrease right"; }
bind "h" { Resize "Increase left"; }
bind "j" { Resize "Increase down"; }
bind "k" { Resize "Increase up"; }
bind "l" { Resize "Increase right"; }
bind "Ctrl n" { SwitchToMode "normal"; }
}
move {
bind "left" { MovePane "left"; }
bind "down" { MovePane "down"; }
bind "up" { MovePane "up"; }
bind "right" { MovePane "right"; }
bind "h" { MovePane "left"; }
bind "Ctrl h" { SwitchToMode "normal"; }
bind "j" { MovePane "down"; }
bind "k" { MovePane "up"; }
bind "l" { MovePane "right"; }
bind "n" { MovePane; }
bind "p" { MovePaneBackwards; }
bind "tab" { MovePane; }
}
scroll {
bind "e" { EditScrollback; SwitchToMode "normal"; }
bind "s" { SwitchToMode "entersearch"; SearchInput 0; }
}
search {
bind "c" { SearchToggleOption "CaseSensitivity"; }
bind "n" { Search "down"; }
bind "o" { SearchToggleOption "WholeWord"; }
bind "p" { Search "up"; }
bind "w" { SearchToggleOption "Wrap"; }
}
session {
bind "a" {
LaunchOrFocusPlugin "zellij:about" {
floating true
move_to_focused_tab true
}
SwitchToMode "normal"
}
bind "c" {
LaunchOrFocusPlugin "configuration" {
floating true
move_to_focused_tab true
}
SwitchToMode "normal"
}
bind "Ctrl o" { SwitchToMode "normal"; }
bind "p" {
LaunchOrFocusPlugin "plugin-manager" {
floating true
move_to_focused_tab true
}
SwitchToMode "normal"
}
bind "s" {
LaunchOrFocusPlugin "zellij:share" {
floating true
move_to_focused_tab true
}
SwitchToMode "normal"
}
bind "w" {
LaunchOrFocusPlugin "session-manager" {
floating true
move_to_focused_tab true
}
SwitchToMode "normal"
}
}
shared_except "locked" {
bind "Alt left" { MoveFocusOrTab "left"; }
bind "Alt down" { MoveFocus "down"; }
bind "Alt up" { MoveFocus "up"; }
bind "Alt right" { MoveFocusOrTab "right"; }
bind "Alt +" { Resize "Increase"; }
bind "Alt -" { Resize "Decrease"; }
bind "Alt =" { Resize "Increase"; }
bind "Alt [" { PreviousSwapLayout; }
bind "Alt ]" { NextSwapLayout; }
bind "Alt f" { ToggleFloatingPanes; }
bind "Ctrl g" { SwitchToMode "locked"; }
bind "Alt h" { MoveFocusOrTab "left"; }
bind "Alt i" { MoveTab "left"; }
bind "Alt j" { MoveFocus "down"; }
bind "Alt k" { MoveFocus "up"; }
bind "Alt l" { MoveFocusOrTab "right"; }
bind "Alt n" { NewPane; }
bind "Alt o" { MoveTab "right"; }
bind "Alt p" { TogglePaneInGroup; }
bind "Alt Shift p" { ToggleGroupMarking; }
bind "Ctrl q" { Quit; }
}
shared_except "locked" "move" {
bind "Ctrl h" { SwitchToMode "move"; }
}
shared_except "locked" "session" {
bind "Ctrl o" { SwitchToMode "session"; }
}
shared_except "locked" "scroll" "search" "tmux" {
bind "Ctrl b" { SwitchToMode "tmux"; }
}
shared_except "locked" "scroll" "search" {
bind "Ctrl s" { SwitchToMode "scroll"; }
}
shared_except "locked" "tab" {
bind "Ctrl t" { SwitchToMode "tab"; }
}
shared_except "locked" "pane" {
bind "Ctrl p" { SwitchToMode "pane"; }
}
shared_except "locked" "resize" {
bind "Ctrl n" { SwitchToMode "resize"; }
}
shared_except "normal" "locked" "entersearch" {
bind "enter" { SwitchToMode "normal"; }
}
shared_except "normal" "locked" "entersearch" "renametab" "renamepane" {
bind "esc" { SwitchToMode "normal"; }
}
shared_among "pane" "tmux" {
bind "x" { CloseFocus; SwitchToMode "normal"; }
}
shared_among "scroll" "search" {
bind "PageDown" { PageScrollDown; }
bind "PageUp" { PageScrollUp; }
bind "left" { PageScrollUp; }
bind "down" { ScrollDown; }
bind "up" { ScrollUp; }
bind "right" { PageScrollDown; }
bind "Ctrl b" { PageScrollUp; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; }
bind "d" { HalfPageScrollDown; }
bind "Ctrl f" { PageScrollDown; }
bind "h" { PageScrollUp; }
bind "j" { ScrollDown; }
bind "k" { ScrollUp; }
bind "l" { PageScrollDown; }
bind "Ctrl s" { SwitchToMode "normal"; }
bind "u" { HalfPageScrollUp; }
}
entersearch {
bind "Ctrl c" { SwitchToMode "scroll"; }
bind "esc" { SwitchToMode "scroll"; }
bind "enter" { SwitchToMode "search"; }
}
renametab {
bind "esc" { UndoRenameTab; SwitchToMode "tab"; }
}
shared_among "renametab" "renamepane" {
bind "Ctrl c" { SwitchToMode "normal"; }
}
renamepane {
bind "esc" { UndoRenamePane; SwitchToMode "pane"; }
}
shared_among "session" "tmux" {
bind "d" { Detach; }
}
tmux {
bind "left" { MoveFocus "left"; SwitchToMode "normal"; }
bind "down" { MoveFocus "down"; SwitchToMode "normal"; }
bind "up" { MoveFocus "up"; SwitchToMode "normal"; }
bind "right" { MoveFocus "right"; SwitchToMode "normal"; }
bind "space" { NextSwapLayout; }
bind "\"" { NewPane "down"; SwitchToMode "normal"; }
bind "%" { NewPane "right"; SwitchToMode "normal"; }
bind "," { SwitchToMode "renametab"; }
bind "[" { SwitchToMode "scroll"; }
bind "Ctrl b" { Write 2; SwitchToMode "normal"; }
bind "c" { NewTab; SwitchToMode "normal"; }
bind "h" { MoveFocus "left"; SwitchToMode "normal"; }
bind "j" { MoveFocus "down"; SwitchToMode "normal"; }
bind "k" { MoveFocus "up"; SwitchToMode "normal"; }
bind "l" { MoveFocus "right"; SwitchToMode "normal"; }
bind "n" { GoToNextTab; SwitchToMode "normal"; }
bind "o" { FocusNextPane; }
bind "p" { GoToPreviousTab; SwitchToMode "normal"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; }
}
}
// Plugin aliases - can be used to change the implementation of Zellij
// changing these requires a restart to take effect
plugins {
about location="zellij:about"
compact-bar location="zellij:compact-bar"
configuration location="zellij:configuration"
filepicker location="zellij:strider" {
cwd "/"
}
plugin-manager location="zellij:plugin-manager"
session-manager location="zellij:session-manager"
status-bar location="zellij:status-bar"
strider location="zellij:strider"
tab-bar location="zellij:tab-bar"
welcome-screen location="zellij:session-manager" {
welcome_screen true
}
}
// Plugins to load in the background when a new session starts
// eg. "file:/path/to/my-plugin.wasm"
// eg. "https://example.com/my-plugin.wasm"
load_plugins {
}
web_client {
font "monospace"
}
// Use a simplified UI without special fonts (arrow glyphs)
// Options:
// - true
// - false (Default)
//
// simplified_ui true
// Choose the theme that is specified in the themes section.
// Default: default
//
// theme "dracula"
theme "solarized-dark"
// Choose the base input mode of zellij.
// Default: normal
//
// default_mode "locked"
// Choose the path to the default shell that zellij will use for opening new panes
// Default: $SHELL
//
// default_shell "fish"
// Choose the path to override cwd that zellij will use for opening new panes
//
// default_cwd "/tmp"
// The name of the default layout to load on startup
// Default: "default"
//
// default_layout "compact"
// The folder in which Zellij will look for layouts
// (Requires restart)
//
// layout_dir "/tmp"
// The folder in which Zellij will look for themes
// (Requires restart)
//
// theme_dir "/tmp"
// Toggle enabling the mouse mode.
// On certain configurations, or terminals this could
// potentially interfere with copying text.
// Options:
// - true (default)
// - false
//
// mouse_mode false
// Toggle having pane frames around the panes
// Options:
// - true (default, enabled)
// - false
//
// pane_frames false
// When attaching to an existing session with other users,
// should the session be mirrored (true)
// or should each user have their own cursor (false)
// (Requires restart)
// Default: false
//
// mirror_session true
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
// eg. when terminal window with an active zellij session is closed
// (Requires restart)
// Options:
// - detach (Default)
// - quit
//
// on_force_close "quit"
// Configure the scroll back buffer size
// This is the number of lines zellij stores for each pane in the scroll back
// buffer. Excess number of lines are discarded in a FIFO fashion.
// (Requires restart)
// Valid values: positive integers
// Default value: 10000
//
// scroll_buffer_size 10000
// Provide a command to execute when copying text. The text will be piped to
// the stdin of the program to perform the copy. This can be used with
// terminal emulators which do not support the OSC 52 ANSI control sequence
// that will be used by default if this option is not set.
// Examples:
//
// copy_command "xclip -selection clipboard" // x11
// copy_command "wl-copy" // wayland
// copy_command "pbcopy" // osx
//
// copy_command "pbcopy"
// Choose the destination for copied text
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
// Does not apply when using copy_command.
// Options:
// - system (default)
// - primary
//
// copy_clipboard "primary"
// Enable automatic copying (and clearing) of selection when releasing mouse
// Default: true
//
// copy_on_select true
// Path to the default editor to use to edit pane scrollbuffer
// Default: $EDITOR or $VISUAL
// scrollback_editor "/usr/bin/vim"
// A fixed name to always give the Zellij session.
// Consider also setting `attach_to_session true,`
// otherwise this will error if such a session exists.
// Default: <RANDOM>
//
// session_name "My singleton session"
// When `session_name` is provided, attaches to that session
// if it is already running or creates it otherwise.
// Default: false
//
// attach_to_session true
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
// Options:
// - true (default)
// - false
//
// auto_layout false
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
// Options:
// - true (default)
// - false
//
// session_serialization false
// Whether pane viewports are serialized along with the session, default is false
// Options:
// - true
// - false (default)
//
// serialize_pane_viewport false
// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
//
// scrollback_lines_to_serialize 10000
// Enable or disable the rendering of styled and colored underlines (undercurl).
// May need to be disabled for certain unsupported terminals
// (Requires restart)
// Default: true
//
// styled_underlines false
// How often in seconds sessions are serialized
//
// serialization_interval 10000
// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know
// metadata info on this session)
// (Requires restart)
// Default: false
//
// disable_session_metadata false
// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it)
// (Requires restart)
// Default: true (if the host terminal supports it)
//
// support_kitty_keyboard_protocol false
// Whether to make sure a local web server is running when a new Zellij session starts.
// This web server will allow creating new sessions and attaching to existing ones that have
// opted in to being shared in the browser.
// When enabled, navigate to http://127.0.0.1:8082
// (Requires restart)
//
// Note: a local web server can still be manually started from within a Zellij session or from the CLI.
// If this is not desired, one can use a version of Zellij compiled without
// `web_server_capability`
//
// Possible values:
// - true
// - false
// Default: false
//
// web_server false
// Whether to allow sessions started in the terminal to be shared through a local web server, assuming one is
// running (see the `web_server` option for more details).
// (Requires restart)
//
// Note: This is an administrative separation and not intended as a security measure.
//
// Possible values:
// - "on" (allow web sharing through the local web server if it
// is online)
// - "off" (do not allow web sharing unless sessions explicitly opt-in to it)
// - "disabled" (do not allow web sharing and do not permit sessions started in the terminal to opt-in to it)
// Default: "off"
//
// web_sharing "off"
// A path to a certificate file to be used when setting up the web client to serve the
// connection over HTTPs
//
// web_server_cert "/path/to/cert.pem"
// A path to a key file to be used when setting up the web client to serve the
// connection over HTTPs
//
// web_server_key "/path/to/key.pem"
/// Whether to enforce https connections to the web server when it is bound to localhost
/// (127.0.0.0/8)
///
/// Note: https is ALWAYS enforced when bound to non-local interfaces
///
/// Default: false
//
// enforce_https_for_localhost false
// Whether to stack panes when resizing beyond a certain size
// Default: true
//
// stacked_resize false
// Whether to show tips on startup
// Default: true
//
// show_startup_tips false
// Whether to show release notes on first version run
// Default: true
//
// show_release_notes false
// Whether to enable mouse hover effects and pane grouping functionality
// default is true
// advanced_mouse_actions false
// The ip address the web server should listen on when it starts
// Default: "127.0.0.1"
// (Requires restart)
// web_server_ip "127.0.0.1"
// The port the web server should listen on when it starts
// Default: 8082
// (Requires restart)
// web_server_port 8082
// A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable)
// after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT
// of this command will be used instead of the discovered RESURRECT_COMMAND
// can be useful for removing wrappers around commands
// Note: be sure to escape backslashes and similar characters properly
// post_command_discovery_hook "echo $RESURRECT_COMMAND | sed <your_regex_here>"

14
.zshrc
View File

@@ -305,6 +305,20 @@ fi
export GPG_TTY=$(tty)
# zellij startup workaround:
# keep zellij aliases/functions while stripping the problematic runtime completion call.
_zellij_comp_src="$HOME/.config/zellij/comp.zsh"
_zellij_comp_safe="$HOME/.cache/zellij/comp.safe.zsh"
if [ -f "$_zellij_comp_src" ]; then
mkdir -p "${_zellij_comp_safe:h}"
if [ ! -f "$_zellij_comp_safe" ] || [ "$_zellij_comp_src" -nt "$_zellij_comp_safe" ]; then
sed '/^_zellij "\$@"$/d' "$_zellij_comp_src" > "$_zellij_comp_safe"
fi
source "$_zellij_comp_safe"
(( $+functions[compdef] )) && compdef _zellij zellij
fi
unset _zellij_comp_src _zellij_comp_safe
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
# export PATH="/Users/jetpac/.rd/bin:$PATH"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)

143
bin/codex-devops-auth.sh Executable file
View File

@@ -0,0 +1,143 @@
#!/bin/zsh
set -euo pipefail
PKCS11_LIB="${PKCS11_LIB:-/usr/local/lib/opensc-pkcs11.so}"
TOKEN_HOST="${TOKEN_HOST:-operator-access-token.svc.ad1.r2}"
SSH_CONFIG_FILE="${SSH_CONFIG_FILE:-$HOME/.ssh/config.oci}"
OCI_BIN="${OCI_BIN:-/opt/homebrew/bin/oci}"
OCI_SESSION_REGION="${OCI_SESSION_REGION:-us-chicago-1}"
RESET_AGENT="${RESET_AGENT:-0}"
DEDICATED_AGENT_PID=""
log() {
print -u2 -- "$@"
}
inherited_agent_likely_rejects_pkcs11() {
[[ -n "${SSH_AUTH_SOCK:-}" ]] || return 1
[[ -z "${SSH_AGENT_PID:-}" ]] || return 1
case "${SSH_AUTH_SOCK}" in
/private/tmp/com.apple.launchd.*/Listeners)
return 0
;;
esac
return 1
}
cleanup() {
if [[ -n "${DEDICATED_AGENT_PID}" ]]; then
SSH_AGENT_PID="${DEDICATED_AGENT_PID}" ssh-agent -k >/dev/null 2>&1 || true
fi
}
ensure_oci_session() {
if [[ ! -x "${OCI_BIN}" ]]; then
print -u2 "OCI CLI not found or not executable: ${OCI_BIN}"
exit 1
fi
set +e
"${OCI_BIN}" session validate >/dev/null 2>&1
local validate_rc=$?
set -e
if [[ ${validate_rc} -eq 0 ]]; then
log "OCI CLI session is already valid."
return 0
fi
log "OCI CLI session is not valid; attempting refresh."
set +e
"${OCI_BIN}" session refresh >/dev/null 2>&1
local refresh_rc=$?
set -e
if [[ ${refresh_rc} -eq 0 ]]; then
log "OCI CLI session refresh succeeded."
return 0
fi
log "Running OCI CLI session authenticate for ${OCI_SESSION_REGION}."
"${OCI_BIN}" session authenticate --region "${OCI_SESSION_REGION}"
}
ensure_ssh_agent() {
if [[ -n "${SSH_AUTH_SOCK:-}" && -S "${SSH_AUTH_SOCK}" ]]; then
set +e
ssh-add -l >/dev/null 2>&1
local rc=$?
set -e
case ${rc} in
0|1)
return 0
;;
esac
fi
log "Starting ssh-agent for Codex."
eval "$(ssh-agent -s)" >/dev/null
DEDICATED_AGENT_PID="${SSH_AGENT_PID:-}"
}
add_pkcs11_provider() {
log "Loading PKCS#11 provider: ${PKCS11_LIB}"
ssh-add -s "${PKCS11_LIB}" >/dev/null
}
prepare_agent() {
local had_inherited_agent=0
if [[ -n "${SSH_AUTH_SOCK:-}" && -S "${SSH_AUTH_SOCK}" ]]; then
had_inherited_agent=1
fi
if inherited_agent_likely_rejects_pkcs11; then
log "Inherited launchd SSH agent is unlikely to support PKCS#11; starting a dedicated ssh-agent for Codex."
unset SSH_AUTH_SOCK SSH_AGENT_PID
had_inherited_agent=0
fi
ensure_ssh_agent
if add_pkcs11_provider; then
return 0
fi
if [[ ${had_inherited_agent} -eq 1 ]]; then
log "Existing SSH agent rejected PKCS#11 provider; starting a dedicated ssh-agent for Codex."
unset SSH_AUTH_SOCK SSH_AGENT_PID
ensure_ssh_agent
add_pkcs11_provider
return 0
fi
return 1
}
if [[ ! -f "${SSH_CONFIG_FILE}" ]]; then
print -u2 "SSH config file not found: ${SSH_CONFIG_FILE}"
exit 1
fi
if [[ "${RESET_AGENT}" == "1" ]]; then
log "Resetting SSH agent on explicit request."
pkill -9 ssh-agent >/dev/null 2>&1 || true
pkill -9 ssh-pkcs11-helper >/dev/null 2>&1 || true
sleep 1
fi
trap cleanup EXIT INT TERM
ensure_oci_session
prepare_agent
log "Refreshing OPERATOR_ACCESS_TOKEN from ${TOKEN_HOST} using ${SSH_CONFIG_FILE}"
export OPERATOR_ACCESS_TOKEN="$(ssh -F "${SSH_CONFIG_FILE}" "${TOKEN_HOST}" "generate --mode jwt")"
export OP_TOKEN="${OPERATOR_ACCESS_TOKEN}"
log "Using fresh OP_TOKEN for Codex and DevOps MCP."
/opt/homebrew/bin/codex "$@"