Skip to content

feat: add config-bundle CLI commands - #1945

Merged
nborges-aws merged 3 commits into
refactorfrom
config-bundle-commands
Aug 13, 2026
Merged

feat: add config-bundle CLI commands#1945
nborges-aws merged 3 commits into
refactorfrom
config-bundle-commands

Conversation

@nborges-aws

Copy link
Copy Markdown
Contributor

Description

Adds imperative CRUDL and version listing commands for AgentCore evaluation configuration bundles:

  • eval config-bundle create
  • eval config-bundle get
  • eval config-bundle list
  • eval config-bundle update
  • eval config-bundle delete
  • eval config-bundle version list

Summary of changes

  • --components accepts inline JSON, file://<path>, or stdin (-) via SourceResolver.
  • Component input parsed and validated via parseJsonFlagWithSchema utility.
  • get calls the latest-bundle API by default and the version API when optional --version is provided.
  • list returns configuration bundles, while version list returns all versions belonging to one bundle.
  • update requires --id, --components, and --commit-message; --kms-key-arn remains optional. This counteracts the service API docs and smithy models, but is the confirmed validation structure in the service itself
  • Updates fetches the latest bundle version and pass it as the sole parentVersionIds entry, as required by service lineage validation.

Type of Change

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

Testing

How have you tested the change?
Manually smoke tested all commands against a configuration bundle in my personal account:

  • Creating a bundle from a components file
  • Listing bundles
  • Getting the latest bundle
  • Getting a specific version
  • Updating components and creating a new version
  • Listing bundle versions
  • Deleting the bundle
  • bun run test (993 pass, 0 fail)

  • I ran npm run test:unit and npm run test:integ

  • I ran npm run typecheck

  • I ran npm run lint

  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

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.

@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 7, 2026
@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.78049% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.81%. Comparing base (531d068) to head (7e7fd5a).

Files with missing lines Patch % Lines
src/handlers/eval/config-bundle/components.ts 95.65% 1 Missing ⚠️
src/handlers/eval/config-bundle/delete/index.tsx 94.44% 1 Missing ⚠️
src/handlers/eval/config-bundle/get/index.tsx 96.96% 1 Missing ⚠️
...handlers/eval/config-bundle/version/list/index.tsx 96.55% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #1945      +/-   ##
============================================
+ Coverage     96.78%   96.81%   +0.03%     
============================================
  Files           326      335       +9     
  Lines         18061    18388     +327     
============================================
+ Hits          17480    17803     +323     
- Misses          581      585       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 7, 2026
Comment thread src/core/eval.tsx Outdated
options: CoreOptions,
): Promise<UpdateConfigurationBundleResponse> {
const control = this.clients.control(toClientConfig(options));
const current = await control.send(new GetConfigurationBundleCommand({ bundleId: id }));

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.

I may be missing the intended branch behavior, but can we select the branch explicitly before choosing the parent version? I live-tested a mainline v1 followed by a review-branch v2. GetConfigurationBundle without branchName returned v2, and this CLI update then created v3 on review-branch. Passing branchName: "mainline" correctly returned v1. Would it make sense to expose --branch-name, default it to mainline, and pass it to both Get and Update so an ordinary update cannot silently continue whichever branch was modified most recently?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed it makes sense to have branch name here. Good catch. I've added the flag and updated tests around it

Comment on lines +114 to +117
export type CreateConfigurationBundleInput = Pick<
CreateConfigurationBundleRequest,
"bundleName" | "components" | "kmsKeyArn"
>;

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.

Are these field exclusions intentional? The live service accepted description, branchName, commitMessage, createdBy, and tags during create, and accepted description plus branchName during update when the required components, commit message, and parent were supplied. The SDK also models bundleName and explicit parentVersionIds. Would it make sense to expose the common scalar fields and typed JSON for the structured ones? Also definitely get if you have reasoning behind why these are not included.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These exclusions were intentional for first pass implementation. I think we want to avoid adding a bespoke flag for each of these options, but could be supported in typed JSON perhaps. I will discuss with TJ and see if this something we want to pursue in a follow up PR.

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.

I don't see a user setting a createdBy by I can see customers wanting to set branchName, commitMessage. We can do this as Follow up PR.

@nborges-aws
nborges-aws force-pushed the config-bundle-commands branch from 7a4527d to 4f027e9 Compare August 12, 2026 14:05
aidandaly24
aidandaly24 previously approved these changes Aug 12, 2026
flags: [
flag("name", "the name of the configuration bundle", z.string().optional()),
flag(
"components",

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.

Should this be sensitive?

@jariy17 jariy17 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.

Looks good but needs golden tests.

@@ -0,0 +1,207 @@
import { describe, expect, test } from "bun:test";

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.

Shouldn't the handler's golden tests cover these core functions?

Comment thread src/core/eval.tsx
const current = await control.send(
new GetConfigurationBundleCommand({ bundleId: id, branchName: update.branchName }),
);
if (!current.versionId) {

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.

According to the internal service model, this is required. I don't know why aws sdk v3 has all required response parameters as | undefined.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I saw the field was required, but the SDK type has string | undefined. I added this check to follow the service model

@@ -0,0 +1,473 @@
import { afterEach, describe, expect, test } from "bun:test";

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.

SHould this be a golden test?

Comment on lines +114 to +117
export type CreateConfigurationBundleInput = Pick<
CreateConfigurationBundleRequest,
"bundleName" | "components" | "kmsKeyArn"
>;

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.

I don't see a user setting a createdBy by I can see customers wanting to set branchName, commitMessage. We can do this as Follow up PR.

@jariy17 jariy17 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.

Unit tests could changed as a follow up

@aidandaly24 aidandaly24 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.

Thanks for making the updates!

@nborges-aws
nborges-aws merged commit b0963eb into refactor Aug 13, 2026
13 checks passed
@nborges-aws
nborges-aws deleted the config-bundle-commands branch August 13, 2026 16:23
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.

4 participants