Conversation
`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.
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
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 invalidateEntryand surfaces "must be a whole number", but it doesn't prevent typing non-digits. Matches the existingTextField.numbersemantics though, so consistent.src/handlers/project/add/runtime-endpoint/index.ts:50andscreen.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.
|
Claude Security Review: no high-confidence findings. (run) |
Description
Adds the
agentcore add runtime-endpointwizard: running the command without flags in a TTY now opens a four-step TUI instead of failing on the missing--runtime.agentcore add runtimefirst.MultiTextField, same as branch + commit in config-bundle). Version is prefilled with the flag default1and must be a whole number ≥ 1.agentcore deploynext 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.MultiTextFieldinputs gain thenumberoptionTextFieldalready had. Wiring follows the other wizards:Root.tsxroute,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
Testing
How have you tested the change?
bun test(3783 pass; 13 new screen + dispatch tests inruntime-endpoint.screen.test.tsx)bun run test:e2e, or explained why they are not applicable — TUI-only change, covered by screen testsbun run typecheckbun run lint:checkbun run format:checkbun run buildsrc/assets/, I updated affected snapshots withbun test <test-file> --update-snapshotsand committed themChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.