Skip to content

feat: make container dev mode language-agnostic#500

Merged
aidandaly24 merged 1 commit intomainfrom
worktree-fix-container-dev-mode
Mar 6, 2026
Merged

feat: make container dev mode language-agnostic#500
aidandaly24 merged 1 commit intomainfrom
worktree-fix-container-dev-mode

Conversation

@tejaskash
Copy link
Contributor

Summary

  • Remove Python/uvicorn-specific code from container dev mode - now works with any language
  • Container simply builds the user's Dockerfile and runs it without hot reloading
  • Add proper headers for bedrock-agentcore TS runtime (sessionId, Accept: text/event-stream)
  • Support {"text": "..."} SSE format from bedrock-agentcore runtime
  • Show "Stopping container..." message when exiting

Changes

  • container-dev-server.ts: Remove dev layer, entrypoint overrides, volume mount; stream build output; async container stop
  • invoke.ts: Add sessionId header, Accept header; parse {"text": "..."} SSE format
  • DevScreen.tsx: Show "Stopping container..." for container agents

Test plan

  • Unit tests pass (26 container-dev-server tests, 87 total dev tests)
  • Tested manually with TypeScript Vercel AI SDK agent in container
  • Test with existing Python container agents to ensure no regression

Remove Python/uvicorn-specific code from container dev mode. The container
now simply builds the user's Dockerfile and runs it without hot reloading.

Changes:
- Remove dev layer that installed uvicorn; build image directly
- Remove entrypoint/user overrides; use Dockerfile's CMD/ENTRYPOINT
- Remove source volume mount (no hot reload)
- Stream build output in real-time instead of blocking
- Use async spawn for container stop so UI can render "Stopping..."
- Add sessionId header and Accept: text/event-stream for invoke requests
- Support {"text": "..."} SSE format from bedrock-agentcore runtime
- Show "Stopping container..." instead of generic "Stopping server..."
@tejaskash tejaskash requested a review from a team March 5, 2026 18:44
@github-actions github-actions bot added the size/m PR size: M label Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.25% 3597 / 8512
🔵 Statements 41.91% 3798 / 9062
🔵 Functions 44.09% 720 / 1633
🔵 Branches 44.06% 2321 / 5267
Generated in workflow #874 for commit 2771897 by the Vitest Coverage Report Action

aidandaly24
aidandaly24 previously approved these changes Mar 6, 2026
Copy link
Contributor

@aidandaly24 aidandaly24 left a comment

Choose a reason for hiding this comment

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

lgtm

@aidandaly24
Copy link
Contributor

e2e test failed going to try rerunning it

@aidandaly24 aidandaly24 dismissed their stale review March 6, 2026 14:26

e2e test failed

Copy link
Contributor

@aidandaly24 aidandaly24 left a comment

Choose a reason for hiding this comment

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

code lgtm and the e2e tests passed now

@aidandaly24 aidandaly24 merged commit a158ffb into main Mar 6, 2026
22 of 24 checks passed
@aidandaly24 aidandaly24 deleted the worktree-fix-container-dev-mode branch March 6, 2026 14:48
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