Skip to content

Check Agent Host dynamic dependencies#326084

Draft
roblourens wants to merge 1 commit into
mainfrom
roblou/agents/agent-host-dynamic-dependency-check
Draft

Check Agent Host dynamic dependencies#326084
roblourens wants to merge 1 commit into
mainfrom
roblou/agents/agent-host-dynamic-dependency-check

Conversation

@roblourens

Copy link
Copy Markdown
Member

Follow-up to #326019.

Summary

  • include statically named dynamic import(...) calls in the remote Agent Host dependency graph
  • support string literals, no-substitution template literals, and import attributes
  • narrowly exclude the standalone server mock-agent branch and the dev-only Claude SDK bare-import fallback by importer and specifier
  • add focused coverage proving the exclusions do not become specifier-wide

Testing

  • cd build && npm run typecheck
  • cd build && npm test (229 passing)
  • npm run precommit
  • verified the guard fails specifically on node-pty when that lazy dependency is removed from remote/package.json

(Written by Copilot)

Include statically named dynamic imports in the remote Agent Host dependency graph while excluding exact dev-only and test-only imports.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 16, 2026 01:09

Copilot AI 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.

Pull request overview

Extends the Agent Host packaging guard to trace literal dynamic imports while preserving narrowly scoped development/test exclusions.

Changes:

  • Detects string and template-literal dynamic imports, including import attributes.
  • Excludes two importer-specific non-production dependencies.
  • Adds focused coverage for detection and exclusion scope.
Show a summary per file
File Description
build/lib/test/agentHostDependencies.test.ts Expands dependency tracing and tests narrow dynamic-import exclusions.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

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.

2 participants