Support changing port and base path of dev chat UI

Abierto
#1,685 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
cli, frontend

Línea de trabajo

Comienza en el punto de entrada agentcore dev y sigue cómo --port inicia el servidor del agente y la interfaz web de chat de desarrollo. Inspecciona en la UI el manejo de /index.js, /api/status y de las cabeceras Host, Origin y X-Agentcore-Local. Se considera terminado cuando la UI admite un puerto configurable, una ruta base y comprobaciones opcionales de cabeceras, con el comportamiento cubierto por las pruebas relevantes del repositorio.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
Description

My goal is to use the agentcore dev UI in a cloud IDE like VS Code Server or possibly SageMaker Studio. In these contexts:

  1. There are often restrictions to which ports can be used (since typically the IDE itself is running on one, and a web proxy like nginx on another), and
  2. Forwarded ports are typically accessed via some non-base path e.g. https://...cloudfront.net/port/9000/

Both of these pose problems for the AgentCore CLI today:

  1. Currently, the --port option in agentcore dev does not set the port of the web UI that's spun up... In fact in my specific environment, it didn't seem to correspond to the agent server that's started either? So it's counter-intuitive at best and maybe pointless at worst. It always seems to use 8081.
  2. The web UI also assumes it's running at the root / with no way to configure this... So first assets (like /index.js) and later API calls (like /api/status) try to pull from the "wrong" URL when used in this environment.
  3. The web UI also seems to check request host headers and reject any connections that don't come from 127.0.0.1/localhost - which further complicates things

I did manage to get the current app working with some creative nginx configuration - but it's pretty messy, especially number 2 that requires a broad range of sub_filters manipulating inbound requests. It'd be much better if the CLI itself could provide more direct support for running in this kind of remote IDE environment.

Acceptance Criteria

The dev chat web UI:

  • Can be overridden to launch on a different port
  • Can be configured with a "base path" prefix for all resource & API fetches (for e.g. /port/9000/)
  • Can disable checks on Host, Origin, X-Agentcore-Local headers

Even better if:

  • We can configure these options somewhere central they'll be transparently picked up without needing to be included in every agentcore dev command - or even auto-detect when running in such an environment
Additional Context

No response

Lenguaje dominante
TypeScript
Estrellas
339
Forks
129
Merge medio
19 h 21 min
PR fusionados (30 d)
125

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aws/agentcore-cli

Todos los issues de aws/agentcore-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.