feat(prompt): 环境段按部署形态二选一,修正本地模式的环境事实
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
- You run on the user's own machine, not in a disposable sandbox: `terminal` is a
|
||||
real shell with their permissions, other conversations share the same machine,
|
||||
and `/tmp` is the system temp directory (shared, never cleaned for you). Work
|
||||
inside the working directory; treat everything outside it as the user's.
|
||||
- `python3` may be missing; when the skills list below is empty it is not
|
||||
available. Never install runtimes or system packages yourself.
|
||||
@@ -0,0 +1,16 @@
|
||||
- Linux container, isolated per conversation: you see the working directory, a
|
||||
session-scoped `/tmp`, read-only `/workspace/skills`, and system paths — never
|
||||
other sessions.
|
||||
- `terminal` runs POSIX sh (`/bin/sh` is dash); use `bash` for scripts.
|
||||
- `/tmp` persists across calls in a conversation; `/dev/shm` and `/var/tmp` are
|
||||
wiped on every call.
|
||||
- Python 3.11; system packages are read-only. Add packages in a venv in the
|
||||
working directory: `python3 -m venv --system-site-packages .venv`, then
|
||||
`.venv/bin/pip` / `.venv/bin/python`. Don't reinstall packages that are
|
||||
already importable.
|
||||
- System packages can't be installed at runtime (`apt-get` fails). A missing CLI
|
||||
tool must be added on the server — tell the user.
|
||||
- No C/C++ compiler or `make`: `pip install` only works for pure-Python or
|
||||
prebuilt-wheel packages.
|
||||
- Chinese text in matplotlib: set `font.sans-serif` to `Noto Sans CJK SC`. For
|
||||
ZIPs with GBK filenames, use `unar` or `7z x` to avoid garbled names.
|
||||
@@ -56,19 +56,4 @@ domain must never be hand-rolled.
|
||||
|
||||
## Environment
|
||||
|
||||
- Linux container, isolated per conversation: you see the working directory, a
|
||||
session-scoped `/tmp`, read-only `/workspace/skills`, and system paths — never
|
||||
other sessions.
|
||||
- `terminal` runs POSIX sh (`/bin/sh` is dash); use `bash` for scripts.
|
||||
- `/tmp` persists across calls in a conversation; `/dev/shm` and `/var/tmp` are
|
||||
wiped on every call.
|
||||
- Python 3.11; system packages are read-only. Add packages in a venv in the
|
||||
working directory: `python3 -m venv --system-site-packages .venv`, then
|
||||
`.venv/bin/pip` / `.venv/bin/python`. Don't reinstall packages that are
|
||||
already importable.
|
||||
- System packages can't be installed at runtime (`apt-get` fails). A missing CLI
|
||||
tool must be added on the server — tell the user.
|
||||
- No C/C++ compiler or `make`: `pip install` only works for pure-Python or
|
||||
prebuilt-wheel packages.
|
||||
- Chinese text in matplotlib: set `font.sans-serif` to `Noto Sans CJK SC`. For
|
||||
ZIPs with GBK filenames, use `unar` or `7z x` to avoid garbled names.
|
||||
{APP_ENV_SECTION}
|
||||
|
||||
Reference in New Issue
Block a user