Skip to content

fix: map WASI preopened dirs to clean guest paths on Windows - #78

Open
seahound wants to merge 1 commit into
masterfrom
fix/windows-wasi-preopened-paths
Open

fix: map WASI preopened dirs to clean guest paths on Windows#78
seahound wants to merge 1 commit into
masterfrom
fix/windows-wasi-preopened-paths

Conversation

@seahound

@seahound seahound commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Windows paths like C:\Users\... were being used as WASI guest paths, which are invalid — WASI expects Unix-style paths rooted at /
  • Map each preopened directory to /preopened/N instead, and use those guest paths in ASTERAI_ALLOWED_DIRS and ASTERBOT_HOST_DIR
  • Fixes conversation.json persistence and all WASI filesystem access on Windows

Test plan

  • Build locally with cargo +stable-x86_64-pc-windows-msvc build -p asterai
  • Run asterai agents, send a message, verify conversation.json is written to ~/.asterai/agents/<env>/
  • Verify Linux/Mac are unaffected (paths were already Unix-style, now mapped to /preopened/N uniformly)

Windows paths like C:\Users\... are not valid WASI guest paths.
Map each preopened directory to /preopened/N and use those paths
in ASTERAI_ALLOWED_DIRS and ASTERBOT_HOST_DIR so components can
read and write files correctly on all platforms.
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