WeKnora/docker/Dockerfile.sandbox

102 lines
4.2 KiB
Docker
Raw Normal View History

# WeKnora Sandbox Image
# Pre-built environment for executing agent skill scripts in Docker sandbox
# Multi-stage build, minimal dependencies
#
# Two targets ship from this file:
# runtime (default) - the plain environment. Used by the Docker backend and
# as the base image of E2B templates, whose builder
# injects its own envd.
# cube - the same environment plus Cube's envd daemon. Cube
# builds templates straight from the image and probes
# :49983/health, so an image without envd can only ever
# fail. See docs/sandbox-cluster.md.
# Stage 1: Get Node.js binaries
FROM node:20-slim AS node-base
# Stage 2: Runtime image
FROM python:3.11-slim AS runtime
# Copy Node.js from node image (avoids NodeSource install overhead)
COPY --from=node-base /usr/local/bin/node /usr/local/bin/
COPY --from=node-base /usr/local/lib/node_modules /usr/local/lib/node_modules
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) * feat(sandbox): enhance skill management in sandbox configurations Updated the skill management system to allow listing, installing, and removing skills within sandbox configurations. The ListSkills function now accepts a sandboxConfigID to filter skills based on the selected configuration. Introduced a new SandboxSkillsDrawer component for managing skills through the UI, along with necessary updates to the API and localization files to support these features. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: keep skill maintenance sessions out of the console session list Co-authored-by: Cursor <cursoragent@cursor.com> * feat: store and expose the installer transcript locators Co-authored-by: Cursor <cursoragent@cursor.com> * feat: record the skill installer agent's conversation Co-authored-by: Cursor <cursoragent@cursor.com> * feat: stream and persist the installer transcript during a skill install Co-authored-by: Cursor <cursoragent@cursor.com> * feat: expose install transcript locators on the skill type Co-authored-by: Cursor <cursoragent@cursor.com> * feat: add the floating skill install transcript window Co-authored-by: Cursor <cursoragent@cursor.com> * feat: open the install transcript from the sandbox skills drawer Co-authored-by: Cursor <cursoragent@cursor.com> * feat(sandbox): 重构技能安装体验,支持内联时间线、编辑第4步及保留镜像指针 - 替换右下角浮窗为内联安装时间线 (SkillInstallTimeline.vue) - 新增 GET /api/v1/sandbox-configs/:id/skills/:skillId/transcript 接口,支持回放与追尾 - 移除 /sessions/continue-stream 依赖,避免 404 问题 - 事件日志以 install_prompt 开头,不再将工具调用 preamble 拼入最终答案 - 删除 SkillInstallTranscript.vue,技能条目下可展开/折叠时间线 - 编辑向导新增第 4 步「管理技能」 - Cube/E2B 环境:连接 → 模板 → 运行配置 → 技能(第4步) - Docker/Local 环境:无第4步(无快照镜像) - 首次创建必须按 1→2→3 顺序,第3步保存成功后自动进入第4步 - 已有配置支持步骤条数字跳转,可直接访问任意步骤 - 卡片菜单「管理技能」打开同一抽屉并定位至第4步 - SandboxSkillsDrawer.vue 重命名为 SandboxSkillsPanel.vue,去除独立抽屉壳 - 修复保存运行配置时冲掉 skill_image 的问题 - 顶部展示信息(基础模板/快照ID/版本/构建时间)读取 config.skill_image - 编辑器保存 payload 不再包含 skill_image,合并时保留已有 SkillImage 和 VolumeMount - MergeSandboxConfigForUpdate 增加对 SkillImage 和 VolumeMount 的保护 - 已冲掉的配置需重新安装技能才能恢复镜像指针 - 「查看安装过程」在安装开始时即显示 - 技能列表中出现「正在安装」状态即展示按钮 - 若记录尚未写入,展示等待提示并自动重试,避免误报「没有留下记录」 * 沙盒内技能目录从 UUID 改成 SKILL.md 的 name。 * fix(sandbox): heal stuck skill rows and block planted maintenance sessions The reaper left a mid-upgrade install spinning forever when the old snapshot was still live, and restored removals to ready after the pointer had already moved. Client session create/update can no longer hide chats behind the skill_maintenance: prefix. * style: gofumpt the skill reaper test stubs * style: satisfy golangci on the tenant skill admin API * feat(sandbox): rebuild skill images at turn boundaries, not mid-exec Hold a session turn lease through AgentQA so an install cannot tear down the live sandbox between tool calls; the next turn's first resolve picks up the new image. Configs can instead keep existing sandboxes and boot the new snapshot only for new sessions. * fix(sandbox): judge stuck skill runs from the snapshot chain InstalledSnapshotID only records the generation that installed a skill; later installs of other skills advance the live pointer without rewriting older rows. Comparing those IDs made the reaper fail healthy installs and delete live skills whose removal had stalled. --------- Co-authored-by: hailongzhao <hailongzhao@tencent.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-08-25 03:28:12 +00:00
# Python package manager: uv (fast pip replacement). Preinstalled because each
# skill gets its own venv at install time, and building that from a cold pip is
# what dominates an install's wall clock.
COPY --from=ghcr.io/astral-sh/uv:0.12.4 /uv /usr/local/bin/uv
RUN ln -s /usr/local/bin/uv /usr/local/bin/uvx
# Node package manager: pnpm
RUN npm install -g pnpm
# Install minimal CLI tools (bash/grep/sed/coreutils/findutils already in slim
# image). `file` is not in slim; models reach for it after a script-type error.
# curl is not optional: the sandbox connectivity check probes egress with it,
# and skills that fetch a URL expect it to be there. The compression tools are
# here because skill bundles and their assets arrive archived.
RUN apt-get update && apt-get install -y --no-install-recommends \
jq \
curl \
ca-certificates \
file \
feat(sandbox): expose tenant skill management over HTTP and in the console (#2789) * feat(sandbox): enhance skill management in sandbox configurations Updated the skill management system to allow listing, installing, and removing skills within sandbox configurations. The ListSkills function now accepts a sandboxConfigID to filter skills based on the selected configuration. Introduced a new SandboxSkillsDrawer component for managing skills through the UI, along with necessary updates to the API and localization files to support these features. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: keep skill maintenance sessions out of the console session list Co-authored-by: Cursor <cursoragent@cursor.com> * feat: store and expose the installer transcript locators Co-authored-by: Cursor <cursoragent@cursor.com> * feat: record the skill installer agent's conversation Co-authored-by: Cursor <cursoragent@cursor.com> * feat: stream and persist the installer transcript during a skill install Co-authored-by: Cursor <cursoragent@cursor.com> * feat: expose install transcript locators on the skill type Co-authored-by: Cursor <cursoragent@cursor.com> * feat: add the floating skill install transcript window Co-authored-by: Cursor <cursoragent@cursor.com> * feat: open the install transcript from the sandbox skills drawer Co-authored-by: Cursor <cursoragent@cursor.com> * feat(sandbox): 重构技能安装体验,支持内联时间线、编辑第4步及保留镜像指针 - 替换右下角浮窗为内联安装时间线 (SkillInstallTimeline.vue) - 新增 GET /api/v1/sandbox-configs/:id/skills/:skillId/transcript 接口,支持回放与追尾 - 移除 /sessions/continue-stream 依赖,避免 404 问题 - 事件日志以 install_prompt 开头,不再将工具调用 preamble 拼入最终答案 - 删除 SkillInstallTranscript.vue,技能条目下可展开/折叠时间线 - 编辑向导新增第 4 步「管理技能」 - Cube/E2B 环境:连接 → 模板 → 运行配置 → 技能(第4步) - Docker/Local 环境:无第4步(无快照镜像) - 首次创建必须按 1→2→3 顺序,第3步保存成功后自动进入第4步 - 已有配置支持步骤条数字跳转,可直接访问任意步骤 - 卡片菜单「管理技能」打开同一抽屉并定位至第4步 - SandboxSkillsDrawer.vue 重命名为 SandboxSkillsPanel.vue,去除独立抽屉壳 - 修复保存运行配置时冲掉 skill_image 的问题 - 顶部展示信息(基础模板/快照ID/版本/构建时间)读取 config.skill_image - 编辑器保存 payload 不再包含 skill_image,合并时保留已有 SkillImage 和 VolumeMount - MergeSandboxConfigForUpdate 增加对 SkillImage 和 VolumeMount 的保护 - 已冲掉的配置需重新安装技能才能恢复镜像指针 - 「查看安装过程」在安装开始时即显示 - 技能列表中出现「正在安装」状态即展示按钮 - 若记录尚未写入,展示等待提示并自动重试,避免误报「没有留下记录」 * 沙盒内技能目录从 UUID 改成 SKILL.md 的 name。 * fix(sandbox): heal stuck skill rows and block planted maintenance sessions The reaper left a mid-upgrade install spinning forever when the old snapshot was still live, and restored removals to ready after the pointer had already moved. Client session create/update can no longer hide chats behind the skill_maintenance: prefix. * style: gofumpt the skill reaper test stubs * style: satisfy golangci on the tenant skill admin API * feat(sandbox): rebuild skill images at turn boundaries, not mid-exec Hold a session turn lease through AgentQA so an install cannot tear down the live sandbox between tool calls; the next turn's first resolve picks up the new image. Configs can instead keep existing sandboxes and boot the new snapshot only for new sessions. * fix(sandbox): judge stuck skill runs from the snapshot chain InstalledSnapshotID only records the generation that installed a skill; later installs of other skills advance the live pointer without rewriting older rows. Comparing those IDs made the reaper fail healthy installs and delete live skills whose removal had stalled. --------- Co-authored-by: hailongzhao <hailongzhao@tencent.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-08-25 03:28:12 +00:00
zip \
unzip \
bzip2 \
xz-utils \
zstd \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# Add packages here when installed skills actually need them:
feat(sandbox): run sandboxed execs as root by default (#3067) * feat(sandbox): run sandboxed execs as root by default Every chat session owns its own sandbox, so the in-container account is not a tenant boundary and root is the least surprising default for an agent that installs packages and writes wherever it needs. Host and cross-tenant isolation stay at the container boundary. DefaultSandboxExecUser becomes "root" (remote_client.go) and the sandbox image ends with USER root. The three backends keep naming the account explicitly on every exec so the account a call lands on does not depend on which backend a workspace selected; the adapter default, the file operations and the artifact-directory bootstrap all follow the constant. The template still provisions a uid 1000 "user" account for interop with E2B/Cube tooling that addresses it by name. Root also makes the skill-install flow's account hand-over pointless, so it goes: verification no longer runs after a chown/chmod lock-down and a repair round no longer reopens the tree (normalizeSkillPermissions and reopenSkillDirForRepair are gone), and the prepare and scratch commands stop chowning. The scratch wipe now also clears /tmp, and the cache budget guard sizes only root's caches, since no second account can grow one. Verification is asserted to stay on the ordinary executor (no AsRoot, no AllowSkillsRoot) rather than on which account it ran as. * refactor(skills): install chat-time extras into the skill's own env PYTHONPATH / NODE_PATH pointed at a per-session overlay (/workspace/.skill-packages/<skill>) because the skill tree was frozen after install: root-owned, mode 555, and often built by `uv venv` with no pip, so `pip install --target` somewhere else was the only way a chat session could add a package. None of that holds now. The lock-down is gone and execs run as root, so a missing package goes straight into the skill's own environment, and the write is already session-local: a chat sandbox is built from the config's image and its filesystem dies with the session, so nothing reaches the image other sessions start from. The overlay bought nothing over that while splitting one skill's packages across two locations. SessionSkillPackageDir goes, and applySessionPackagePath becomes applySkillNodePath: it appends the skill's own node_modules after whatever the caller supplied, replacing a `+=` that prepended a bare separator once the overlay stopped seeding the variable. No PYTHONPATH is injected at all. Python dependencies are reached through the skill's venv interpreter, which the shell wrapper already puts first on PATH; the overlay-era value named the venv root, which is not an importable path. PYTHONPATH stays on the injected-name blacklist so a stored value cannot shadow the venv. The runtime hints and every prompt that described the overlay now name `<skillDir>/.venv/bin/python -m pip install` and `npm install` in the skill directory. frozenSkillTreeGuidance / isFrozenSkillVenvFailure are renamed for what they detect now that nothing is frozen. * docs(prompts): reserve /workspace/output for finished deliverables /workspace/output is the one directory an artifact collector reads, so everything written there is offered to the user as a deliverable. The prompts described it as the place for "deliverables" or "downloadable artifacts" without saying it is exclusively that, which reads as "the directory you write results to" — and a model doing multi-step work has results at every step. Drafts, intermediate renders and debug dumps land next to the finished file and the user is handed all of them. The four places that describe the workspace now say the same thing: the collector reads only /workspace/output, so finished deliverables go there and everything in progress goes anywhere else under /workspace. The attachment block gains the matching half for the other direction — /workspace/input holds the user's own files and is not ours to write to, which it previously implied by calling the paths "read-only inputs" while the tools that enforce it say so plainly. Only the /workspace/input half is enforced (write_sandbox_file refuses that tree). Whether a file is finished is a judgement no tool can make, so the output half stays guidance and is stated wherever the model is already reading about the workspace rather than in one place it might not see. * fix(skills): restore executable bundles and package recovery * style(sandbox): wrap prompt text for repository lint checks * fix(sandbox): guard recovery paths and document root execution --------- Co-authored-by: hailongzhao <hailongzhao@tencent.com> Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-07 05:03:35 +00:00
# Sandbox scripts run as root by default: each chat session owns its own
# sandbox, so the in-container account is not a tenant boundary, and agents are
# expected to install packages and write wherever they need. A non-root
# "user" account (UID 1000) is still created and named for interop — E2B
# templates expose it and some tooling still addresses it by name — and it
# gives something for `sudo` and E2B/Cube requests that target a named account
# to land on. The Docker backend can also address it numerically as 1000:1000.
RUN groupadd -g 1000 user && \
useradd -u 1000 -g user -m -s /bin/bash user
feat(sandbox): run sandboxed execs as root by default (#3067) * feat(sandbox): run sandboxed execs as root by default Every chat session owns its own sandbox, so the in-container account is not a tenant boundary and root is the least surprising default for an agent that installs packages and writes wherever it needs. Host and cross-tenant isolation stay at the container boundary. DefaultSandboxExecUser becomes "root" (remote_client.go) and the sandbox image ends with USER root. The three backends keep naming the account explicitly on every exec so the account a call lands on does not depend on which backend a workspace selected; the adapter default, the file operations and the artifact-directory bootstrap all follow the constant. The template still provisions a uid 1000 "user" account for interop with E2B/Cube tooling that addresses it by name. Root also makes the skill-install flow's account hand-over pointless, so it goes: verification no longer runs after a chown/chmod lock-down and a repair round no longer reopens the tree (normalizeSkillPermissions and reopenSkillDirForRepair are gone), and the prepare and scratch commands stop chowning. The scratch wipe now also clears /tmp, and the cache budget guard sizes only root's caches, since no second account can grow one. Verification is asserted to stay on the ordinary executor (no AsRoot, no AllowSkillsRoot) rather than on which account it ran as. * refactor(skills): install chat-time extras into the skill's own env PYTHONPATH / NODE_PATH pointed at a per-session overlay (/workspace/.skill-packages/<skill>) because the skill tree was frozen after install: root-owned, mode 555, and often built by `uv venv` with no pip, so `pip install --target` somewhere else was the only way a chat session could add a package. None of that holds now. The lock-down is gone and execs run as root, so a missing package goes straight into the skill's own environment, and the write is already session-local: a chat sandbox is built from the config's image and its filesystem dies with the session, so nothing reaches the image other sessions start from. The overlay bought nothing over that while splitting one skill's packages across two locations. SessionSkillPackageDir goes, and applySessionPackagePath becomes applySkillNodePath: it appends the skill's own node_modules after whatever the caller supplied, replacing a `+=` that prepended a bare separator once the overlay stopped seeding the variable. No PYTHONPATH is injected at all. Python dependencies are reached through the skill's venv interpreter, which the shell wrapper already puts first on PATH; the overlay-era value named the venv root, which is not an importable path. PYTHONPATH stays on the injected-name blacklist so a stored value cannot shadow the venv. The runtime hints and every prompt that described the overlay now name `<skillDir>/.venv/bin/python -m pip install` and `npm install` in the skill directory. frozenSkillTreeGuidance / isFrozenSkillVenvFailure are renamed for what they detect now that nothing is frozen. * docs(prompts): reserve /workspace/output for finished deliverables /workspace/output is the one directory an artifact collector reads, so everything written there is offered to the user as a deliverable. The prompts described it as the place for "deliverables" or "downloadable artifacts" without saying it is exclusively that, which reads as "the directory you write results to" — and a model doing multi-step work has results at every step. Drafts, intermediate renders and debug dumps land next to the finished file and the user is handed all of them. The four places that describe the workspace now say the same thing: the collector reads only /workspace/output, so finished deliverables go there and everything in progress goes anywhere else under /workspace. The attachment block gains the matching half for the other direction — /workspace/input holds the user's own files and is not ours to write to, which it previously implied by calling the paths "read-only inputs" while the tools that enforce it say so plainly. Only the /workspace/input half is enforced (write_sandbox_file refuses that tree). Whether a file is finished is a judgement no tool can make, so the output half stays guidance and is stated wherever the model is already reading about the workspace rather than in one place it might not see. * fix(skills): restore executable bundles and package recovery * style(sandbox): wrap prompt text for repository lint checks * fix(sandbox): guard recovery paths and document root execution --------- Co-authored-by: hailongzhao <hailongzhao@tencent.com> Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-07 05:03:35 +00:00
# Pre-create the two directories every backend writes to. Root can create them
# at exec time too. Ownership stays with the compatibility account so tools
# explicitly selecting user can also write here; default root execs do not
# rely on that ownership.
RUN mkdir -p /workspace/input /workspace/output && \
chown -R user:user /workspace
WORKDIR /workspace
feat(sandbox): run sandboxed execs as root by default (#3067) * feat(sandbox): run sandboxed execs as root by default Every chat session owns its own sandbox, so the in-container account is not a tenant boundary and root is the least surprising default for an agent that installs packages and writes wherever it needs. Host and cross-tenant isolation stay at the container boundary. DefaultSandboxExecUser becomes "root" (remote_client.go) and the sandbox image ends with USER root. The three backends keep naming the account explicitly on every exec so the account a call lands on does not depend on which backend a workspace selected; the adapter default, the file operations and the artifact-directory bootstrap all follow the constant. The template still provisions a uid 1000 "user" account for interop with E2B/Cube tooling that addresses it by name. Root also makes the skill-install flow's account hand-over pointless, so it goes: verification no longer runs after a chown/chmod lock-down and a repair round no longer reopens the tree (normalizeSkillPermissions and reopenSkillDirForRepair are gone), and the prepare and scratch commands stop chowning. The scratch wipe now also clears /tmp, and the cache budget guard sizes only root's caches, since no second account can grow one. Verification is asserted to stay on the ordinary executor (no AsRoot, no AllowSkillsRoot) rather than on which account it ran as. * refactor(skills): install chat-time extras into the skill's own env PYTHONPATH / NODE_PATH pointed at a per-session overlay (/workspace/.skill-packages/<skill>) because the skill tree was frozen after install: root-owned, mode 555, and often built by `uv venv` with no pip, so `pip install --target` somewhere else was the only way a chat session could add a package. None of that holds now. The lock-down is gone and execs run as root, so a missing package goes straight into the skill's own environment, and the write is already session-local: a chat sandbox is built from the config's image and its filesystem dies with the session, so nothing reaches the image other sessions start from. The overlay bought nothing over that while splitting one skill's packages across two locations. SessionSkillPackageDir goes, and applySessionPackagePath becomes applySkillNodePath: it appends the skill's own node_modules after whatever the caller supplied, replacing a `+=` that prepended a bare separator once the overlay stopped seeding the variable. No PYTHONPATH is injected at all. Python dependencies are reached through the skill's venv interpreter, which the shell wrapper already puts first on PATH; the overlay-era value named the venv root, which is not an importable path. PYTHONPATH stays on the injected-name blacklist so a stored value cannot shadow the venv. The runtime hints and every prompt that described the overlay now name `<skillDir>/.venv/bin/python -m pip install` and `npm install` in the skill directory. frozenSkillTreeGuidance / isFrozenSkillVenvFailure are renamed for what they detect now that nothing is frozen. * docs(prompts): reserve /workspace/output for finished deliverables /workspace/output is the one directory an artifact collector reads, so everything written there is offered to the user as a deliverable. The prompts described it as the place for "deliverables" or "downloadable artifacts" without saying it is exclusively that, which reads as "the directory you write results to" — and a model doing multi-step work has results at every step. Drafts, intermediate renders and debug dumps land next to the finished file and the user is handed all of them. The four places that describe the workspace now say the same thing: the collector reads only /workspace/output, so finished deliverables go there and everything in progress goes anywhere else under /workspace. The attachment block gains the matching half for the other direction — /workspace/input holds the user's own files and is not ours to write to, which it previously implied by calling the paths "read-only inputs" while the tools that enforce it say so plainly. Only the /workspace/input half is enforced (write_sandbox_file refuses that tree). Whether a file is finished is a judgement no tool can make, so the output half stays guidance and is stated wherever the model is already reading about the workspace rather than in one place it might not see. * fix(skills): restore executable bundles and package recovery * style(sandbox): wrap prompt text for repository lint checks * fix(sandbox): guard recovery paths and document root execution --------- Co-authored-by: hailongzhao <hailongzhao@tencent.com> Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-07 05:03:35 +00:00
USER root
# Stage 3: Cube template image
#
# envd is what Cube talks to for everything — the readiness probe that decides
# whether a template build succeeds, plus every later exec and file call. It
feat(sandbox): run sandboxed execs as root by default (#3067) * feat(sandbox): run sandboxed execs as root by default Every chat session owns its own sandbox, so the in-container account is not a tenant boundary and root is the least surprising default for an agent that installs packages and writes wherever it needs. Host and cross-tenant isolation stay at the container boundary. DefaultSandboxExecUser becomes "root" (remote_client.go) and the sandbox image ends with USER root. The three backends keep naming the account explicitly on every exec so the account a call lands on does not depend on which backend a workspace selected; the adapter default, the file operations and the artifact-directory bootstrap all follow the constant. The template still provisions a uid 1000 "user" account for interop with E2B/Cube tooling that addresses it by name. Root also makes the skill-install flow's account hand-over pointless, so it goes: verification no longer runs after a chown/chmod lock-down and a repair round no longer reopens the tree (normalizeSkillPermissions and reopenSkillDirForRepair are gone), and the prepare and scratch commands stop chowning. The scratch wipe now also clears /tmp, and the cache budget guard sizes only root's caches, since no second account can grow one. Verification is asserted to stay on the ordinary executor (no AsRoot, no AllowSkillsRoot) rather than on which account it ran as. * refactor(skills): install chat-time extras into the skill's own env PYTHONPATH / NODE_PATH pointed at a per-session overlay (/workspace/.skill-packages/<skill>) because the skill tree was frozen after install: root-owned, mode 555, and often built by `uv venv` with no pip, so `pip install --target` somewhere else was the only way a chat session could add a package. None of that holds now. The lock-down is gone and execs run as root, so a missing package goes straight into the skill's own environment, and the write is already session-local: a chat sandbox is built from the config's image and its filesystem dies with the session, so nothing reaches the image other sessions start from. The overlay bought nothing over that while splitting one skill's packages across two locations. SessionSkillPackageDir goes, and applySessionPackagePath becomes applySkillNodePath: it appends the skill's own node_modules after whatever the caller supplied, replacing a `+=` that prepended a bare separator once the overlay stopped seeding the variable. No PYTHONPATH is injected at all. Python dependencies are reached through the skill's venv interpreter, which the shell wrapper already puts first on PATH; the overlay-era value named the venv root, which is not an importable path. PYTHONPATH stays on the injected-name blacklist so a stored value cannot shadow the venv. The runtime hints and every prompt that described the overlay now name `<skillDir>/.venv/bin/python -m pip install` and `npm install` in the skill directory. frozenSkillTreeGuidance / isFrozenSkillVenvFailure are renamed for what they detect now that nothing is frozen. * docs(prompts): reserve /workspace/output for finished deliverables /workspace/output is the one directory an artifact collector reads, so everything written there is offered to the user as a deliverable. The prompts described it as the place for "deliverables" or "downloadable artifacts" without saying it is exclusively that, which reads as "the directory you write results to" — and a model doing multi-step work has results at every step. Drafts, intermediate renders and debug dumps land next to the finished file and the user is handed all of them. The four places that describe the workspace now say the same thing: the collector reads only /workspace/output, so finished deliverables go there and everything in progress goes anywhere else under /workspace. The attachment block gains the matching half for the other direction — /workspace/input holds the user's own files and is not ours to write to, which it previously implied by calling the paths "read-only inputs" while the tools that enforce it say so plainly. Only the /workspace/input half is enforced (write_sandbox_file refuses that tree). Whether a file is finished is a judgement no tool can make, so the output half stays guidance and is stated wherever the model is already reading about the workspace rather than in one place it might not see. * fix(skills): restore executable bundles and package recovery * style(sandbox): wrap prompt text for repository lint checks * fix(sandbox): guard recovery paths and document root execution --------- Co-authored-by: hailongzhao <hailongzhao@tencent.com> Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-07 05:03:35 +00:00
# runs as root and selects the account named in each request. WeKnora names
# root by default, matching the runtime stage.
#
# This target is linux/amd64 only: cubesandbox-base publishes no arm64 image,
# which matches Cube itself (PVM is x86_64-only).
FROM ghcr.io/tencentcloud/cubesandbox-base:2026.16 AS cube-base
FROM runtime AS cube
USER root
COPY --from=cube-base /usr/bin/envd /usr/bin/envd
COPY --from=cube-base /usr/local/bin/cube-entrypoint.sh /usr/local/bin/cube-entrypoint.sh
EXPOSE 49983
# The entrypoint backgrounds envd and then waits on it, since this image
# defines no CMD of its own.
ENTRYPOINT ["/usr/local/bin/cube-entrypoint.sh"]
# Stage 4: default target
#
# Docker builds the last stage when none is named, and that must stay the plain
# runtime: a bare `docker build -f docker/Dockerfile.sandbox .` is expected to
# produce the image the Docker backend runs, not the Cube variant.
FROM runtime AS sandbox