Skip to content

feat: add config command with dot-notation support#1387

Open
Hweinstock wants to merge 4 commits into
aws:mainfrom
Hweinstock:feat/config-command
Open

feat: add config command with dot-notation support#1387
Hweinstock wants to merge 4 commits into
aws:mainfrom
Hweinstock:feat/config-command

Conversation

@Hweinstock
Copy link
Copy Markdown
Contributor

@Hweinstock Hweinstock commented May 26, 2026

Description

Add a new agentcore config [key] [value] command for reading and writing global CLI configuration values using dot-notation keys.

  • agentcore config — lists all config
  • agentcore config telemetry.enabled — gets a value
  • agentcore config telemetry.enabled true — sets a value

Also introduces:

  • resilientParse: a util for parsing zod schemas field by field, and allow for fallbacks, skipping, and additional fields. Unifies implementation with existing telemetry implementation.
  • Refactored global-config.ts to use a single strict schema as source of truth

Related Issue

Closes #

Documentation PR

N/A

Type of Change

  • New feature

Testing

How have you tested the change?

  • 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 size/m PR size: M agentcore-harness-reviewing AgentCore Harness review in progress labels May 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.15.0.tgz

How to install

gh release download pr-1387-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.15.0.tgz

@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 May 26, 2026
Copy link
Copy Markdown

@agentcore-cli-automation agentcore-cli-automation left a comment

Choose a reason for hiding this comment

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

Nice work on this — the schema split between strict (write) and lenient (read) is a clean pattern, and the integ tests are thorough. I found one issue that I think needs to be addressed before merging, plus a softer note about telemetry instrumentation.

Main concern: validating the merged config against a strict schema is incompatible with the documented behavior that readGlobalConfig preserves unknown keys (see existing test preserves unknown fields via passthrough in src/cli/__tests__/global-config.test.ts). Any user whose config file contains a legacy or future field will be unable to set any config value. Details inline.

Softer note: telemetry instrumentation — see inline comment on command.ts.

Comment thread src/cli/commands/config/actions.ts
Comment thread src/cli/commands/config/command.ts
Comment thread src/lib/utils/zod.ts
@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label May 26, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 27, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 27, 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 May 27, 2026
@Hweinstock Hweinstock force-pushed the feat/config-command branch from e521336 to 4d3cef1 Compare May 27, 2026 00:14
@github-actions github-actions Bot removed the size/m PR size: M label May 27, 2026
@github-actions github-actions Bot added the size/m PR size: M label May 27, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 27, 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 May 27, 2026
Comment thread src/cli/tui/copy.ts
validate: 'Validate agentcore/ config files.',
'config-bundle': '[preview] Manage configuration bundle versions and diffs.',
archive: '[preview] Archive (delete) a batch evaluation or recommendation on the service and clear local history.',
config: 'Adjust global configuration settings such as telemetry opt-out status',
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.

we should move this to another file, IMO its not intuitive that descriptions are in src/cli/tui/copy.ts

Comment thread src/cli/commands/config/command.ts
Comment thread src/lib/utils/zod.ts
@Hweinstock Hweinstock marked this pull request as ready for review May 27, 2026 13:03
@Hweinstock Hweinstock requested a review from a team May 27, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants