Skip to content

fix: add package root entrypoint - #186

Open
xianzuyang9-blip wants to merge 1 commit into
aws:mainfrom
xianzuyang9-blip:codex/add-root-package-entry
Open

fix: add package root entrypoint#186
xianzuyang9-blip wants to merge 1 commit into
aws:mainfrom
xianzuyang9-blip:codex/add-root-package-entry

Conversation

@xianzuyang9-blip

Copy link
Copy Markdown

Fixes #185.

The package root export points to dist/src/index.js, but the repository did not have src/index.ts, so npm run build produced subpath entrypoints like runtime while leaving the root export missing.

This adds a root entrypoint that exposes the existing public modules as namespaces (identity, runtime, browser, and codeInterpreter). Using namespace exports avoids collisions between shared names such as SessionInfo, DEFAULT_TIMEOUT, and WebSocketConnection while making the existing root export resolve to real JS and type files.

Verification:

  • Before the change: npm run build completed, but dist/src/index.js was missing while dist/src/runtime/index.js existed.
  • After the change: npm run build completes and emits dist/src/index.js.
  • Packed and installed the package into a clean consumer; verified dist/src/index.js and dist/src/index.d.ts exist and import('bedrock-agentcore') exposes runtime, identity, browser, and codeInterpreter.
  • npm test: 16 test files / 398 tests passed.

Note: the local pre-commit hook ran tests and lint successfully, then stopped on an existing Prettier warning in tests_integ/otel-no-user-content.test.ts, which this PR does not touch. I committed with --no-verify to keep the change scoped.

@xianzuyang9-blip
xianzuyang9-blip requested a review from a team June 9, 2026 02:39
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.

package root export points to missing dist/src/index.js

1 participant