Documentation
¶
Index ¶
- func ExecTrackPaths(frontendDirectory string) (channel, directory string)
- func HasModelOverride(args []string) bool
- func PrintUsage(w io.Writer)
- func ProviderModelCatalog(body []byte, session Session) ([]byte, error)
- func RunOwnedToolPluginWorker(ctx context.Context, argv0 string, args []string, stdin *os.File, ...) (bool, int)
- func RunPostCompactHook(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) int
- func RunSession(ctx context.Context, args []string, issues *CriticalErrors, ...) (runErr error)
- func RunSessionCorpusInspection(ctx context.Context, args []string, stdout, stderr io.Writer) int
- func RunSessionInspection(ctx context.Context, args []string, stdout, stderr io.Writer) int
- func RunSessionUIReplay(ctx context.Context, args []string, stdin, stdout, stderr *os.File) (code int)
- func RunStorageInspection(ctx context.Context, args []string, stdout, stderr io.Writer) int
- func RunToolPluginWorker(ctx context.Context, argv0 string, args []string, stdin *os.File, ...) (bool, int)
- func SplitCommand(args []string) (routerArgs, command []string, err error)
- func StartAppServerUI(ctx context.Context, cmd *exec.Cmd, stdin, stdout *os.File, ...) (func() error, error)
- type CriticalErrors
- type OpenCodeConfig
- type OpenCodeServiceConfig
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecTrackPaths ¶
ExecTrackPaths names the session-private request FIFO that receives segment requests and the directory where the router creates per-command files.
func HasModelOverride ¶
HasModelOverride distinguishes a user's model selection from an automatic launch default, without interpreting option operands or prompt text.
func PrintUsage ¶
PrintUsage describes the session-only launch interface.
func ProviderModelCatalog ¶
ProviderModelCatalog adds only configured providers to the private catalog. It rebuilds cached provider entries from a native v2 template, preserving other models and Codex’s evolving instruction and executor metadata.
func RunOwnedToolPluginWorker ¶
func RunOwnedToolPluginWorker(ctx context.Context, argv0 string, args []string, stdin *os.File, stdout, stderr io.Writer) (bool, int)
RunToolPluginWorker handles the private child-process mode used by a stable contributed-tool frontend.
func RunPostCompactHook ¶
func RunPostCompactHook(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) int
RunPostCompactHook implements Codex's context-injecting SessionStart hook, not PostCompact (which does not accept additionalContext). Codex owns when it runs and records its output; no router request or model round trip is needed.
func RunSession ¶
func RunSession(ctx context.Context, args []string, issues *CriticalErrors, ready func(Session), artifacts func([]string)) (runErr error)
RunSession owns the private router for one wrapped Codex process. artifacts receives retained debug paths at completion, even if startup was canceled.
func RunSessionCorpusInspection ¶
RunSessionCorpusInspection is read-only. Counts are per rollout: inherited calls in forks are not summed into an invented global workload.
func RunSessionInspection ¶
RunSessionInspection is an offline, read-only entry point. It deliberately does not open the writable replay store or install a router/runtime.
func RunSessionUIReplay ¶
func RunSessionUIReplay(ctx context.Context, args []string, stdin, stdout, stderr *os.File) (code int)
RunSessionUIReplay is an offline entry point. It shares the native presenter, but constructs no host, upstream connection, execution capability, or store.
func RunStorageInspection ¶
RunStorageInspection reads only an explicitly selected retained call or object. It does not open the writable store, acquire/create locks, scan other sessions, alter permissions or execute retained inputs.
func RunToolPluginWorker ¶
func SplitCommand ¶
SplitCommand parses router flags without consuming the following command or its arguments.
func StartAppServerUI ¶
func StartAppServerUI(ctx context.Context, cmd *exec.Cmd, stdin, stdout *os.File, resumeThread string, resumeArgv []string, approvals bool) (func() error, error)
StartAppServerUI starts the native terminal frontend without router observers. Codex app-server owns execution; the launcher still owns routing, environment, invocation-local configuration and cancellation.
Types ¶
type CriticalErrors ¶
type CriticalErrors struct {
// contains filtered or unexported fields
}
CriticalErrors retains bounded, actionable session notices with complete error text, but no request snapshots or operational event history. It outlives router shutdown so the launcher can report notices that could not reach Codex.
func NewCriticalErrors ¶
func NewCriticalErrors() *CriticalErrors
func (*CriticalErrors) Pending ¶
func (c *CriticalErrors) Pending() []string
Pending is called after the router has stopped, outside Codex's terminal UI.
type OpenCodeConfig ¶
type OpenCodeConfig struct {
Go OpenCodeServiceConfig `toml:"opencode_go"`
Zen OpenCodeServiceConfig `toml:"opencode_zen"`
// contains filtered or unexported fields
}
OpenCodeConfig enables each independently authenticated service when its key is nonempty. It is invocation-local; loading never writes user configuration.
func (OpenCodeConfig) DefaultModel ¶
func (c OpenCodeConfig) DefaultModel() string
DefaultModel picks a stable available model from the first authenticated service. An explicit invocation model always takes precedence.
func (OpenCodeConfig) Enabled ¶
func (c OpenCodeConfig) Enabled() bool
type OpenCodeServiceConfig ¶
type OpenCodeServiceConfig struct {
APIKey string `toml:"api_key"`
}
type Session ¶
type Session struct {
BaseURL string
JournalEnabled bool
PostCompactRecovery bool
VCSGuard bool
GrokEnabled bool
GrokUnprefixed bool
ThirdPartyOnly bool
OpenCode OpenCodeConfig
AXReadOutput string
SkillsManagerAvailable bool
// StartAppUI starts the UI and returns its joined lifetime.
// VCSGuard controls remote-write prompts independently of Codex policy.
StartAppUI func(ctx context.Context, cmd *exec.Cmd, stdin, stdout *os.File, resumeThread string, resumeArgv []string, approvals bool) (func() error, error)
StartHeadless func(context.Context, *exec.Cmd, io.Reader, io.Writer) (func() error, error)
FrontendDirectory string
NativeTraceDirectory string
}
Session is available only after initialization and listener binding succeed.
Source Files
¶
- access_programs.go
- active_work_timer.go
- activity_roles.go
- activity_shimmer.go
- app_server_approvals.go
- app_server_btw.go
- app_server_clipboard.go
- app_server_commands.go
- app_server_composer.go
- app_server_composer_editor.go
- app_server_composer_history.go
- app_server_context.go
- app_server_controls.go
- app_server_copy.go
- app_server_edit_receipts.go
- app_server_events.go
- app_server_exit.go
- app_server_file_picker.go
- app_server_guard_hook.go
- app_server_headless.go
- app_server_history_pages.go
- app_server_input.go
- app_server_input_queue.go
- app_server_journal.go
- app_server_keybindings.go
- app_server_lifecycle.go
- app_server_managed_skills.go
- app_server_notifications.go
- app_server_panes.go
- app_server_picker.go
- app_server_picker_render.go
- app_server_progress.go
- app_server_questions.go
- app_server_restore_content.go
- app_server_restore_rollout.go
- app_server_resume.go
- app_server_resume_picker.go
- app_server_resume_settings.go
- app_server_search.go
- app_server_session_metrics.go
- app_server_session_title.go
- app_server_settings.go
- app_server_shell.go
- app_server_skill_history.go
- app_server_skills.go
- app_server_status.go
- app_server_status_render.go
- app_server_summary_stream.go
- app_server_text_spans.go
- app_server_thread_metadata.go
- app_server_turn_lifecycle.go
- app_server_ui.go
- app_server_wait_targets.go
- authored_changes.go
- change_stream.go
- client.go
- client_websocket.go
- code_mode_commentary.go
- code_mode_commentary_parser.go
- code_mode_failure.go
- code_mode_shell_preview.go
- command_segments.go
- commentary.go
- commentary_publisher.go
- composer_directory_attachment.go
- composer_file_attachment.go
- composer_notice.go
- composer_selection.go
- composer_skill_attachment.go
- critical_errors.go
- debug.go
- debug_ax.go
- debug_cancellation.go
- debug_instructions.go
- debug_storage.go
- diagnose.go
- error_details.go
- exec_clock_linux.go
- exec_ignore.go
- exec_inventory.go
- exec_observation.go
- exec_overlap.go
- exec_scope_fixers.go
- exec_scope_go_packages.go
- exec_scope_javascript.go
- exec_scope_mchanges.go
- exec_scope_producers.go
- exec_scope_providers.go
- exec_scope_python.go
- exec_scope_shell.go
- exec_scope_source.go
- exec_scope_vcs.go
- exec_track.go
- execution_continuation.go
- failure_store.go
- feature_usage.go
- final_answer_stream.go
- flags.go
- frontend_guidance.go
- frontend_options.go
- frontend_reader.go
- grok_auth.go
- grok_catalog.go
- grok_client.go
- handle_scope.go
- instruction_conflicts.go
- instruction_omit.go
- journal.go
- journal_card.go
- journal_catalog.go
- journal_changes.go
- journal_compaction.go
- journal_continue.go
- journal_counters.go
- journal_delivery.go
- journal_finish_result.go
- journal_host_finish.go
- journal_host_turn.go
- journal_latency.go
- journal_mounts.go
- journal_native_ui.go
- journal_natural_answer.go
- journal_question_source.go
- journal_replay.go
- journal_reset.go
- journal_reset_driver.go
- journal_root_live.go
- journal_summary.go
- journal_timing.go
- journal_tool.go
- journal_tree.go
- live_activity.go
- live_activity_app_server.go
- live_activity_attachments.go
- live_activity_blocks.go
- live_activity_conversation.go
- live_activity_events.go
- live_activity_record.go
- live_activity_skills.go
- live_activity_view.go
- live_diff_auto.go
- live_diff_data.go
- live_diff_events.go
- live_diff_exec_running.go
- live_diff_interpreter.go
- live_diff_navigation.go
- live_diff_preview.go
- live_diff_python_values.go
- live_diff_reveal.go
- live_diff_shell_edit.go
- live_diff_shell_write.go
- live_diff_source_boundary.go
- live_diff_sources.go
- live_diff_stock_patch.go
- live_diff_stream.go
- live_diff_terminal.go
- live_diff_turn.go
- markdown_file_dialog.go
- mchanges.go
- mchanges_apply.go
- mchanges_display.go
- mchanges_view.go
- mekugi_capture_order.go
- mekugi_changes.go
- mekugi_history.go
- mekugi_proxy.go
- mekugi_response_transform.go
- mekugi_store.go
- mekugi_tool_catalog.go
- metadata.go
- models_cache.go
- mrun.go
- mrun_terminal_unix.go
- native_activity_assignments.go
- native_apply_patch.go
- native_edit_navigation.go
- native_edit_receipt.go
- native_journal.go
- native_journal_reset.go
- native_patch_open_unix.go
- native_roster.go
- native_roster_roles.go
- native_shell.go
- native_tool_trace.go
- native_welcome.go
- opencode.go
- opencode_catalog.go
- opencode_config.go
- opencode_protocol.go
- output_dedupe.go
- output_dialog.go
- output_throughput.go
- post_compact.go
- profiling_disabled.go
- provider_boundary.go
- provider_chat.go
- provider_endpoint.go
- provider_history.go
- provider_http_error.go
- provider_messages.go
- provider_protocol.go
- provider_responses.go
- provider_stream.go
- provider_stream_decode.go
- replay_snapshots.go
- request.go
- request_execution.go
- request_observation.go
- request_wire.go
- resolved_stock_edits.go
- response_hooks.go
- responses_input.go
- responses_item.go
- responses_tools.go
- server.go
- server_websocket.go
- session.go
- session_corpus.go
- session_corpus_reads.go
- session_inspect.go
- session_inspect_commands.go
- session_inspect_debug.go
- session_title.go
- session_title_generate.go
- session_ui_replay.go
- session_ui_replay_input.go
- session_ui_replay_journal.go
- session_ui_replay_read.go
- shell_output_read.go
- shell_output_store.go
- shell_read_bundle.go
- shell_read_page.go
- shell_script_projection.go
- short_handle.go
- skill_instructions.go
- source_parse.go
- storage_inspect.go
- storage_prune.go
- storage_retention.go
- stream_diagnostics.go
- subagent_activity.go
- subagent_activity_pane.go
- subagent_bridge.go
- subagent_commentary.go
- subagent_tool_activity.go
- subagent_tool_display.go
- subagent_tool_display_edit.go
- subagent_tool_display_javascript.go
- subagent_tool_display_search.go
- subagent_tool_display_shell.go
- subagent_tool_display_temporary.go
- terminal_clipboard.go
- terminal_hints.go
- terminal_scroll.go
- terminal_selection.go
- terminal_ui.go
- thread_usage.go
- thread_usage_store.go
- token_cost.go
- tool_carrier.go
- tool_input_emission.go
- tool_plugin_worker.go
- tool_registry.go
- tool_registry_types.go
- tool_wrapper.go
- ui_clock.go
- vcs_display.go
- vcs_guard.go
- worker_executable.go
- worker_executable_linux.go
- workspace_snapshot.go