feature: Web interface for Cortex, in addition to the agentop TUI

未关闭
#1,926 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
go

调研方向

Start with docs/session-api.md and core/listener/httpx/loopback.go to understand the session data and browser protections. The issue leaves the process, browser access, write scope, frontend stack, and packaging undecided. Agree on those choices and a safe architecture before implementation; done means a read-only interface covers the listed views while preserving the laptop API's protections.

由索引模型根据 Issue 内容生成。

描述

Problem

agentop is the only interface to Cortex. It runs only in a terminal. Some users cannot use it, or do not want to:

  • A user who does not work in a terminal, for example a Bob IDE user.
  • A user who wants to share a view, a link, or a screenshot with a teammate.
  • A view that needs more space than a terminal gives, for example a long Timeline or a cost chart.

Proposal

Add a web interface that reads the same session API that agentop reads (:47601 on a laptop, :9094 in a pod). The web interface supplements agentop. It does not replace it.

A first version can be read-only, with these views:

  1. Sessions: the list, with the columns that the agentop Sessions pane shows.
  2. A session's events and details, with live updates from GET /v1/events.
  3. Timeline (GET /v1/sessions/{id}/timeline).
  4. Usage and cost (GET /v1/usage).
  5. Pipeline and plugin catalog (GET /v1/pipeline, GET /v1/plugins).

Constraints

  • The session API has no authentication. Its payloads hold raw prompts, completions and tool results. See docs/session-api.md.
  • The laptop session API refuses browsers. httpx.LoopbackOnly (core/listener/httpx/loopback.go) answers 403 to a non-loopback Host and to every request that carries an Origin header. This stops a page that does DNS rebinding from reading sessions. A web interface must keep that protection.
  • Bind only to loopback on a laptop. Never put the interface behind an ingress.

Open questions

  1. Where does the interface run: in the cortex binary, in agentop (for example agentop web), or as a separate binary?
  2. How does the browser get access to the data without opening the session API to every page? Options: serve the UI and a same-origin read proxy from one process, a per-launch token in the URL, or both.
  3. Do write actions (erase a session, switch a server) go into the first version, or only reads?
  4. Which frontend stack, and how do we ship it inside the binary (embed)?
  5. How does this relate to #872 (Grafana dashboard)? #872 is metrics over OTel. This issue is the session-level detail that only Cortex has.

Assisted-By: Claude (Anthropic AI) [email protected]

主要语言
Go
星标
31
派生
49
平均合并
9 小时 43 分钟
30 天内合并 PR
367

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rossoctl/cortex 的其他 Issue

查看 rossoctl/cortex 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。