Skip to content

feat(update): add cached CLI update experience - #54

Closed
Hweinstock wants to merge 11 commits into
refactorfrom
feat/cli-updater
Closed

Hweinstock wants to merge 11 commits into
refactorfrom
feat/cli-updater

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Problem

AgentCore only checks for updates when users run agentcore update, so users can remain on an old version without knowing it. This change adds cached npm version checks, a once-daily notice, and a TUI version/update flow while keeping passive checks non-fatal.

Solution

  • Add CliVersionManager, implemented by NpmCliVersionManager, for active/latest versions, notices, and installation.
  • Cache latestVersion and lastCheckedAt per npm dist-tag in ~/.agentcore/update/{dist-tag}.json.
  • Put the version manager in routed context under CliVersionManagerKey; feedback, update commands, and the TUI use that single dependency.
  • Run the passive notice check as a root-level best-effort lifecycle step alongside telemetry.
  • Read the package version once at startup for logger and telemetry setup.
  • Show current/latest versions in the TUI and require confirmation before installing.
  • Log passive registry and cache failures while preserving command execution.

Verification

  • bun test — 3,595 passed
  • bun run typecheck
  • bun run lint
  • bun run format -- --check
  • bun run build

Notes

  • Passive checks occur at most once per 24-hour cache window.
  • Explicit checks and installs perform live registry lookups.
  • Updates install the exact version returned by npm.
  • The registry request uses a two-second timeout.
  • Manual screenshots and screen-recording evidence can be attached before moving the PR out of draft.

@Hweinstock
Hweinstock force-pushed the feat/cli-updater branch 10 times, most recently from 15f2896 to 92e0333 Compare September 28, 2026 20:49
@Hweinstock

Copy link
Copy Markdown
Owner Author

TUI update evidence

Current version indicator

Current version indicator

Available update and confirmation

Available update and confirmation

The update screen is reached through normal TUI navigation: filter for update, press Enter, and stop at the confirmation prompt. No installation was confirmed or run.

@Hweinstock
Hweinstock force-pushed the feat/cli-updater branch 19 times, most recently from dc8c1ea to ba53475 Compare September 29, 2026 22:19
notgitika and others added 2 commits September 30, 2026 11:29
aws#2480)

Six tests have failed on every platform since aws#2436 and aws#2475–aws#2477 landed
within minutes of each other:

- The four harness wizard tests still asserted the flat `{ provider,
  modelId }` model that aws#2436 replaced with the API shape keyed by provider
  (`bedrockModelConfig`, `openAiModelConfig`, `liteLlmModelConfig`). They
  now assert what harness.yaml actually holds, as create.screen.test does.
- The add menu no longer draws a "── cli" divider: with the credentials
  wizards every add resource has a screen. The add-menu test now asserts
  exactly that (every subcommand listed as a screen, no divider) instead of
  maintaining a WITH_SCREENS list, and the narrow-terminal test drops its
  wait for the divider — `resize` already resolves once the frame is laid
  out at the new width.
@Hweinstock Hweinstock closed this Sep 30, 2026
@Hweinstock
Hweinstock deleted the feat/cli-updater branch September 30, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants