Skip to content

feat: add rtk to sandbox image and auto-mount gain data dir - #35

Merged
malaporte merged 1 commit into
mainfrom
rtk
Jun 12, 2026
Merged

malaporte merged 1 commit into
mainfrom
rtk

Conversation

@malaporte

Copy link
Copy Markdown
Owner

Summary

Installs the rtk CLI (token-optimized proxy for LLM dev commands) into the default sandbox image, and automatically mounts the host's rtk data directory into the container so that rtk gain on the host reflects savings recorded inside the sandbox.

Changes

  • default-dockerfile.ts: add RUN block to install rtk via its official installer and symlink to /usr/local/bin/rtk
  • sandbox.ts: unconditionally mount the host rtk data dir (~/Library/Application Support/rtk on macOS, ~/.local/share/rtk on Linux) to the fixed container path /root/.local/share/rtk; creates the directory on the host if it doesn't exist yet

Testing

  • Typecheck passes (bun run typecheck)
  • Build passes (bun run build)
  • Host path → container path remapping follows the same pattern as dotfile mounts (hostHome → /root)

Reviewer Notes

The rtk data dir mount is always added (unconditional, like known_hosts), silently creating the host directory if absent. This avoids requiring any user config change to get gain persistence working.

@malaporte
malaporte marked this pull request as ready for review June 12, 2026 07:04
@malaporte
malaporte merged commit 9de1422 into main Jun 12, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.23.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant