Skip to content

feat(project): add runtime-endpoint TUI wizard - #2472

Open
notgitika wants to merge 2 commits into
aws:refactorfrom
notgitika:feat/project-add-runtime-endpoint-tui
Open

notgitika wants to merge 2 commits into
aws:refactorfrom
notgitika:feat/project-add-runtime-endpoint-tui

Conversation

@notgitika

@notgitika notgitika commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds the agentcore add runtime-endpoint wizard: running the command without flags in a TTY now opens a four-step TUI instead of failing on the missing --runtime.

  • runtime — pick the parent Runtime; each is listed with the endpoints it already has. With no Runtimes the step says to agentcore add runtime first.
  • name — validated live against the endpoint name rule and against the chosen Runtime's existing endpoints, so a duplicate is caught while typing rather than at submit.
  • details — version and optional description on one step (MultiTextField, same as branch + commit in config-bundle). Version is prefilled with the flag default 1 and must be a whole number ≥ 1.
  • review → submit. Success message and agentcore deploy next step match the flag path.

The flag handler and the wizard both build the endpoint through a shared toAddRuntimeEndpointInput, so they default the version and drop a blank description identically. MultiTextField inputs gain the number option TextField already had. Wiring follows the other wizards: Root.tsx route, supportedTuiCommands, WITH_SCREENS.

Live-checked from the built bundle in a scratch project.

Related Issue

Closes #

Documentation PR

Not applicable — no new flags; the wizard collects what the existing flags already document.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran bun test (3783 pass; 13 new screen + dispatch tests in runtime-endpoint.screen.test.tsx)
  • I ran the relevant end-to-end tests with bun run test:e2e, or explained why they are not applicable — TUI-only change, covered by screen tests
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run build
  • If I modified src/assets/, I updated affected snapshots with bun test <test-file> --update-snapshots and committed them

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

`agentcore add runtime-endpoint` without flags in a TTY now opens a
wizard: pick the Runtime (each listed with the endpoints it already
has), name the endpoint (checked live against the name rule and the
Runtime's existing endpoints), give the version and an optional
description on one step (version prefilled with the flag's default),
review, submit.

The flag handler and the wizard build the endpoint through one shared
toAddRuntimeEndpointInput, so both default the version and drop a blank
description the same way. MultiTextField inputs gain the whole-number
check TextField already had.
@github-actions github-actions Bot added the size/l PR size: L label Sep 30, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 30, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 30, 2026
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 30, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AgentCore Harness Review

Verdict: Looks good

Nice PR. The refactor to share toAddRuntimeEndpointInput between the flag handler and the wizard means both paths default version and drop empty descriptions the same way, and the tests explicitly assert that equivalence. The wizard behavior — live uniqueness check on the name step, review-time race handled by re-entering the form, and empty-runtime list dispatch to agentcore add runtime — is all covered.

A few minor observations, none blocking:

  • src/components/wizard/fields.tsx:440-441 — comment says "number rejects anything but digits before the schema sees the value". The check happens in validateEntry and surfaces "must be a whole number", but it doesn't prevent typing non-digits. Matches the existing TextField.number semantics though, so consistent.
  • src/handlers/project/add/runtime-endpoint/index.ts:50 and screen.tsx:66 + index.ts:28 — the version default is applied in multiple places (flag handler, toAddRuntimeEndpointInput, wizard state init). Harmless redundancy.
  • screen.tsx:179 — the help text "prefilled with the flag's default, 1" surfaces an internal cross-path detail to the user; consider just "defaults to 1".

Test setup uses real temp dirs and only mocks at true I/O boundaries — aligned with the excessive-mocking guidance. Telemetry-wise, sibling add handlers (runtime, memory, gateway) don't instrument explicitly either, so this fits the existing pattern.

Looks good to merge.

The flag handler reads the resolved version from the built input rather
than applying the default a second time; the version help says
"defaults to 1" instead of pointing at the flag; the TextInputSpec.number
comment says what the option does (fails validation on non-digits) rather
than implying it restricts typing.
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 30, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 30, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 30, 2026

@nborges-aws nborges-aws left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants