Skip to content

feat: add cross-platform utilities for Windows/Unix compatibility#16

Closed
tejaskash wants to merge 5 commits into
mainfrom
feat/cross-platform-utilities
Closed

feat: add cross-platform utilities for Windows/Unix compatibility#16
tejaskash wants to merge 5 commits into
mainfrom
feat/cross-platform-utilities

Conversation

@tejaskash

Copy link
Copy Markdown
Contributor

Creates comprehensive platform utilities to abstract Windows/Unix differences across the codebase.

Changes:

  • Created src/lib/utils/platform.ts with:
    • getVenvExecutable() for Python venv paths (bin/ vs Scripts/)
    • Platform detection flags (isWindows, isMacOS, isLinux)
    • Shell command helpers
  • Updated dev server to use getVenvExecutable()
  • Updated persistent-shell to use isWindows flag
  • Added documentation to AGENTS.md files

Provides a centralized way to handle platform-specific code paths.

…lity

- Replace rsync with Node.js script (scripts/copy-assets.mjs) for copying assets
- Replace 'rm -rf' with Node.js fs.rmSync for clean script
- Fix AGENTS.md exclusion to only apply at root level, preserving src/assets/agents/AGENTS.md
- Ensures build works on Windows without requiring Unix tools
- Check ptyAvailable flag before attempting to spawn script command
- Skip warmup on Windows where PTY is not available
- Prevents 'spawn script ENOENT' error on Windows
- Falls back to one-shot command execution automatically
- Remove code that was overwriting postinstall with wrong package name
- Template already has correct '@aws/agentcore-l3-cdk-constructs' in postinstall
- Fixes npm link to use full scoped package name instead of 'agentcore'
- Enables proper local development workflow with npm link
- Document npm link workflow for unpublished L3 constructs package
- Include troubleshooting steps for common issues
- Explain LOCAL_L3_PATH alternative approach
- Helps developers work with local packages before npm publication
- Create platform utilities module (lib/utils/platform.ts) with:
  - getVenvExecutable() for Python venv paths (bin/ vs Scripts/)
  - Platform detection flags (isWindows, isMacOS, isLinux)
  - Shell command helpers (getShellCommand, getShellArgs)
- Update dev server to use getVenvExecutable() for uvicorn path
- Update persistent-shell to use isWindows flag
- Abstracts platform differences for cleaner, maintainable code
- Fixes dev server spawn error on Windows (ENOENT)
@tejaskash tejaskash requested a review from a team February 1, 2026 00:28
@tejaskash tejaskash closed this Feb 1, 2026
@tejaskash tejaskash deleted the feat/cross-platform-utilities branch February 1, 2026 00:47
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.

1 participant