sha256:2f7eb2d97a7a5ce9c9bee4d06ef409bce65cd53c48867cd0696c6db61f177ace
Last pushed
3 days by sbx
Type
Sandbox Kit
Manifest digest
sha256:2f7eb2d97a7a5ce9c9bee4d06ef409bce65cd53c48867cd0696c6db61f177ace
schemaVersion: "2"
kind: mixin
name: t3code
displayName: T3 Code
description: Installs the t3 npm package that T3 Code's SSH integration runs inside a sandbox, so the first connection starts a pre-installed server.
agentInstructions:
content: |
## T3 Code
This sandbox has the `t3` npm package pre-installed and on PATH.
- T3 Code's remote bootstrap finds `t3` directly instead of falling back
to `npx --package t3@latest`, so the first connection does not reach
the npm registry.
- `t3` installs a platform package that carries prebuilt native modules,
`node-pty` among them, so nothing compiles here. Those binaries need
`libatomic1`, which this kit installs when the base image lacks it.
permissions:
network:
allow:
- registry.npmjs.org:443
- archive.ubuntu.com:80
- security.ubuntu.com:80
- ports.ubuntu.com:80
- download.docker.com:443
setup:
install:
- command: |
set -euo pipefail
command -v npm >/dev/null || { echo "npm not found: this mixin needs a base image with Node.js >= 18 (all standard agent templates ship it)" >&2; exit 1; }
if [ -n "${HTTP_PROXY:-}" ]; then
npm config set proxy "$HTTP_PROXY"
fi
if [ -n "${HTTPS_PROXY:-${HTTP_PROXY:-}}" ]; then
npm config set https-proxy "${HTTPS_PROXY:-$HTTP_PROXY}"
fi
# t3's prebuilt binaries link against libatomic1. Install it when the
# base image has not already, rather than inheriting it by accident
# from some other package's dependencies.
if ! ldconfig -p 2>/dev/null | grep -q 'libatomic\.so\.1'; then
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends libatomic1
rm -rf /var/lib/apt/lists/*
fi
npm install -g t3@latest
ln -sf "$(command -v t3)" /usr/local/bin/t3
t3 --version || { echo "t3 installed but will not start, see the error above. On a base image without apt-get, install libatomic1 with its own package manager first." >&2; exit 1; }
user: "0"
description: Install the t3 npm package globally