feat(gateway-target): add --include-domains for the web-search connector - #2269
Open
sundargthb wants to merge 1 commit into
Open
feat(gateway-target): add --include-domains for the web-search connector#2269sundargthb wants to merge 1 commit into
sundargthb wants to merge 1 commit into
Conversation
The web search connector's admin-level domainFilter accepts include and exclude, and both AgentCore SDKs expose both. The CLI could only set exclude, so a target restricted to an allowed set of domains was not expressible. Adds --include-domains alongside --exclude-domains on add gateway-target, an Include Domains step in the interactive wizard, and both lists in one domainFilter in the translator. An empty list is omitted rather than sent, since an empty include list would tell the connector to return nothing. The translator had no test file, so this adds one covering include only, exclude only, both together, and the empty cases.
sundargthb
temporarily deployed
to
e2e-testing
September 10, 2026 15:04 — with
GitHub Actions
Inactive
Contributor
Package TarballHow to installgh release download pr-2269-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.28.1.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
add gateway-targetaccepts--include-domainsfor the web-search connector, alongside the--exclude-domainsit already had. The interactive wizard gains a matching Include Domains step, and the translator now emits both lists inside onedomainFilter.{ "name": "WebSearch", "parameterValues": { "domainFilter": { "include": ["docs.aws.amazon.com", "aws.amazon.com"], "exclude": ["internal.example.com"] } } }Why
The connector's admin-level
domainFiltertakesincludeandexclude, and the tool schema documents both. Both AgentCore SDKs expose both, per-request, and so does the tool itself. The CLI could only ever setexclude, so a target restricted to an approved set of domains was not expressible through the CLI at all, and the common case of pointing a search target at a documentation set had to be done by editing the project file by hand.Behaviour worth knowing
An empty list is omitted rather than sent. An empty
includeis not the same request as an absent one: sending it would tell the connector to return nothing. Passing--include-domains ""therefore leaves the filter unset rather than producing a target that matches no domains.--include-domainsmay be given once, with a comma-separated value, matching how--exclude-domainsalready behaves and reusing the same coercer. It is rejected on any target that is not--connector web-search, which is the existing gate generalised to cover both flags.Tests
translators.tshad no test file, so this adds one covering include only, exclude only, both together, an empty list, and one list empty while the other is set. Two cases were added toGatewayTargetPrimitive.test.tsfor the include path and for both lists reaching onedomainFilter.The unit suite is unchanged apart from those additions: 30 tests fail on
mainin this repo before this change and the same 30 fail after it, with 8 added tests passing.AddGatewayJwtConfig.test.tsx > confirm screen shows Allowed Audience valuefailed on one run and passed both in isolation and on a rerun, so that one is load-sensitive rather than related. Typecheck, eslint and prettier are clean.