') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); feat: add VPC info messages to dev and invoke commands [3/3] by tejaskash · Pull Request #426 · aws/agentcore-cli · GitHub
Skip to content

feat: add VPC info messages to dev and invoke commands [3/3] - #426

Merged
tejaskash merged 2 commits into
mainfrom
feat/vpc-3-ux-messages
Feb 24, 2026
Merged

feat: add VPC info messages to dev and invoke commands [3/3]#426
tejaskash merged 2 commits into
mainfrom
feat/vpc-3-ux-messages

Conversation

@tejaskash

Copy link
Copy Markdown
Contributor

Summary

Add informational messages when working with VPC-mode agents in dev and invoke commands.

Depends on #424 (schema foundation). This PR includes those schema commits as a base.

Changes

  • dev command: When an agent has networkMode: 'VPC', display a note that VPC networking does not apply to local development
  • invoke command: When invoking a VPC-mode agent, display guidance about required VPC Endpoints (S3, ECR, Bedrock) and note that non-Bedrock model providers require public internet access from within the VPC

Files changed (2)

FileChange
src/cli/commands/dev/command.tsxVPC info message in logs path and before alt screen
src/cli/commands/invoke/action.tsVPC Endpoint guidance warning

Stack

This PR and PR 2/3 are independent — reviewable and mergeable in any order after PR 1/3.

Test plan

  • TypeScript compiles clean
  • Lint and prettier pass
  • agentcore dev --logs on a VPC-mode agent shows info note
  • agentcore invoke on a VPC-mode agent shows VPC Endpoint guidance

Fix NetworkModeSchema enum from PUBLIC|PRIVATE to PUBLIC|VPC to match
the AWS API. Add NetworkConfigSchema for subnet and security group
validation, and networkConfig field to AgentEnvSpec with cross-field
validation requiring networkConfig when networkMode is VPC.
Changes:
- Fix NetworkModeSchema enum: PRIVATE → VPC
- Add NetworkConfigSchema (subnet/SG ID regex, min/max array bounds)
- Add networkConfig optional field to AgentEnvSpec
- Add superRefine cross-field validation
- Update LLM-compacted schema documentation
- Add 13 new unit tests for VPC schema validation
Add informational messages when agents use VPC network mode:
- dev command: Note that VPC networking does not apply locally
- invoke command: Guidance about required VPC Endpoints (S3, ECR,
Bedrock) and public internet access for non-Bedrock providers
@tejaskash
tejaskash requested a review from a teamFebruary 24, 2026 20:32
@github-actionsgithub-actionsBot added the size/m PR size: M label Feb 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

StatusCategoryPercentageCovered / Total
🔵Lines43.91%2967 / 6756
🔵Statements43.5%3123 / 7178
🔵Functions45.76%616 / 1346
🔵Branches48.59%1932 / 3976
Generated in workflow #632 for commit 9b15955 by the Vitest Coverage Report Action

@tejaskash
tejaskash merged commit 7a81b02 into mainFeb 24, 2026
17 of 19 checks passed
@tejaskash
tejaskash deleted the feat/vpc-3-ux-messages branch February 24, 2026 23:15
tejaskash added a commit that referenced this pull request Feb 27, 2026
tejaskash added a commit that referenced this pull request Feb 27, 2026
* Revert "feat: add VPC CLI flags to create and add commands [2/3] (#425)"
This reverts commit c75f4cd.
* Revert "feat: add VPC info messages to dev and invoke commands [3/3] (#426)"
This reverts commit 7a81b02.
* Revert "feat: add VPC network mode to schema (#424)"
This reverts commit 4180646.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mPR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@tejaskash@aidandaly24