Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Add web session creation API and UI flow - #155

Merged
Panacota96 merged 2 commits into
developfrom
codex/add-post-api-sessions-endpoint
Apr 9, 2026
Merged

Add web session creation API and UI flow#155
Panacota96 merged 2 commits into
developfrom
codex/add-post-api-sessions-endpoint

Conversation

@Codex

@Codex Codex AI commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Web users could not start sessions without CLI access; add a browser-driven flow plus supporting APIs for session lifecycle.

  • API — New POST /api/sessions validates name/metadata, scaffolds session directories, returns SessionMeta; 409 on duplicates, 422 on invalid names. Close/delete now return JSON, heartbeat helper added, asset upload/serve endpoints hardened, TLS options exposed on create_server.
  • Session modelSessionMeta gains target; create_session_scaffold() centralizes creation with HMAC/encryption keys and metadata validation; asset path validation tightened.
  • Web UI — Index page adds “New Session” modal and live session cards with close/delete; session page shows heartbeat badge, upload dropzone, and uses JS to update session list/status safely.
  • CLI/Docsgscroll serve reports port-in-use clearly; README documents new endpoints, metadata fields, and binding/TLS notes; tests updated for new shapes and metadata.

Example:

curl -X POST http://localhost:1551/api/sessions \
  -H 'Content-Type: application/json' \
  -d '{"name":"htb-machine","operator":"alice","target":"10.10.11.1"}'
# -> 201 {"session": {...}, "status": "active", "url": "/session/htb-machine"}

Co-authored-by: Panacota96 <118935424+Panacota96@users.noreply.github.com>
@Codex Codex AI changed the title [WIP] Add POST /api/sessions endpoint and web UI form Add web session creation API and UI flow Apr 6, 2026
@Codex
Codex AI requested a review from Panacota96 April 6, 2026 21:31
@Panacota96
Panacota96 marked this pull request as ready for review April 9, 2026 15:03
@Panacota96
Panacota96 merged commit 5a67cc1 into develop Apr 9, 2026
9 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Panacota96
Panacota96 deleted the codex/add-post-api-sessions-endpoint branch April 9, 2026 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WEB] Create Session — POST /api/sessions endpoint and web UI form

2 participants