You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Tool-output file uploads fail with EACCES because scratch files are written into the installed package (dist/.tmp) #286
Every tool-output file the bot tries to deliver to Telegram is dropped with EACCES when the package is installed globally and the bot runs as an unprivileged user:
In the built package that resolves to <package>/dist/.tmp. sendDocument() then calls fs.mkdir(TEMP_DIR, { recursive: true }) and fs.writeFile(...), which requires write access inside the installed package. That is true for a root install (npm i -g, Docker image, distro package), so the very first upload fails.
The same code path is fine only when the bot is started from a writable source checkout or as root — which is why this does not show up in local development.
Expected
Scratch files for outgoing documents should be written to a directory the bot process owns, e.g. under os.tmpdir(), regardless of how the package was installed.
Activity