Skip to content

Add terminal explorer tooling for headless configuration#40

Merged
Hamedghz merged 1 commit into
AIONOSfrom
codex/document-headless-unix-cli-setup
Nov 1, 2025
Merged

Add terminal explorer tooling for headless configuration#40
Hamedghz merged 1 commit into
AIONOSfrom
codex/document-headless-unix-cli-setup

Conversation

@Hamedghz

@Hamedghz Hamedghz commented Nov 1, 2025

Copy link
Copy Markdown
Owner

Summary

  • add a reusable Control API client and command processor for headless explorers
  • ship a Textual-based terminal explorer app plus a FastAPI text-browser bridge and launcher script
  • document three terminal-first options for running the explorer alongside the headless deployment guide

Testing

  • not run (tooling and documentation only)

https://chatgpt.com/codex/tasks/task_e_6906565536688328a4a285dfe9cc4934

@Hamedghz Hamedghz merged commit e29910b into AIONOS Nov 1, 2025
1 check failed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/ghasemzadeh-hamed/OMERTAOS/blob/3e1d57840410116eb9397cbb8d7f9d69eb62bf03/console/tui/api.py#L195-L198
P1 Badge Default provider type ignores key= alias

The provider command defaults kind to "api" only when a "api_key" parameter is present, but the CLI help and examples use the shorter key= alias. In the common call add provider openai key=sk-…, params contains "key" and this branch sets kind to "local", registering a local provider with an API key that the control plane will never use. Users must manually add kind=api to get the expected behaviour. Consider treating either key or api_key as a signal to default to the api kind.


https://github.com/ghasemzadeh-hamed/OMERTAOS/blob/3e1d57840410116eb9397cbb8d7f9d69eb62bf03/console/tui/api.py#L157-L159
P1 Badge Unhandled request failures crash the terminal explorer

The command processor only traps ControlAPIError, but every API operation uses requests and will raise requests.RequestException on connection failures, TLS errors, etc. When the control service is offline or misconfigured, those exceptions bubble out of execute and tear down the Textual app or the FastAPI bridge instead of returning a friendly error. Catch RequestException (or a broader exception) alongside ControlAPIError and surface a message so the UI does not exit unexpectedly.


https://github.com/ghasemzadeh-hamed/OMERTAOS/blob/3e1d57840410116eb9397cbb8d7f9d69eb62bf03/console/tui/web_server.py#L68-L75
P1 Badge History output allows HTML/script injection

User commands and Control API responses are interpolated directly into the INDEX_TEMPLATE without HTML escaping. An attacker can craft a command such as <script>alert(1)</script> or a provider name that includes markup, and the / handler will render it verbatim in the history div. When the explorer is exposed on 0.0.0.0 or accessed through a graphical browser, this becomes an XSS vector. Escape user input and API output before inserting into the template or render through a templating engine that handles escaping by default.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Hamedghz Hamedghz deleted the codex/document-headless-unix-cli-setup branch November 11, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant