Support changing port and base path of dev chat UI

Aberta
#1,685 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
typescript
Domínio
cli, frontend

Direção de pesquisa

Comece pelo ponto de entrada agentcore dev e rastreie como --port inicia o servidor do agente e a interface web de chat de desenvolvimento. Inspecione o tratamento, na UI, de /index.js, /api/status e dos headers Host, Origin e X-Agentcore-Local. Está concluído quando a UI oferece suporte a uma porta configurável, um caminho base e verificações opcionais de headers, com o comportamento coberto pelos testes relevantes do repositório.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
TypeScript
Estrelas
339
Forks
129
Merge médio
19h 21min
PRs com merge (30d)
125

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de aws/agentcore-cli

Todas as issues de aws/agentcore-cli

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.