python_eval 샌드박스: 앱별 점검 결과 라이브러리 3차 추가(투자·회계·날씨·음악·언어·탐정·CAD·의료통계), 프롬프트 목록 갱신
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3bfb96bfc5
commit
baf7d90e43
3 files changed
+8
-2
No files matched your search
@@ -10,5 +10,11 @@ RUN pip install --no-cache-dir numpy pandas matplotlib scipy openpyxl pillow tab
|
||||
RUN pip install --no-cache-dir requests beautifulsoup4 lxml pyyaml seaborn \
|
||||
trimesh numpy-stl shapely networkx python-docx python-pptx pdfplumber pymupdf \
|
||||
reportlab xlsxwriter tqdm qrcode
|
||||
# 3차 레이어: 앱별 점검(2026-10-17) — 투자·회계·날씨·음악·언어·탐정·작업실(CAD/STL)·의료통계·문서변환
|
||||
RUN pip install --no-cache-dir yfinance numpy-financial pyproj xarray netCDF4 \
|
||||
mido pretty_midi soundfile korean-lunar-calendar holidays jamo \
|
||||
pingouin lifelines ezdxf svgwrite scikit-image manifold3d mapbox-earcut rtree pyclipper \
|
||||
pyarrow xlrd pypdf markdown markdownify jinja2 xmltodict wordcloud imageio pint haversine \
|
||||
rapidfuzz phonenumbers python-stdnum
|
||||
ENV MPLBACKEND=Agg MPLCONFIGDIR=/tmp/mpl HOME=/tmp PYTHONDONTWRITEBYTECODE=1
|
||||
WORKDIR /work
|
||||
@@ -202,7 +202,7 @@ RULES: 현재날씨/예보 → 한국은 weather_kma, 해외는 weather_openmete
|
||||
|
||||
image_ocr: `IMAGE OCR TOOL: image_read(path, lang?) → extract text from an image file via OCR. Supported formats: PNG, JPG, WEBP, BMP, TIFF. lang: "eng" (English, default), "kor" (Korean), "kor+eng" (both). Returns extracted text and confidence score. Useful for screenshots, scanned documents, and diagrams containing text.`,
|
||||
|
||||
python: `PYTHON TOOL: python_eval(code, timeout?, packages?) → execute Python code in the workspace directory. Returns stdout/stderr. timeout default 15s, max 60s. packages: comma-separated pip packages to install if missing (e.g. "numpy,pandas"). Runs in an offline Docker sandbox (no internet unless network:true; host files outside the workspace are invisible; pip install is unavailable). Preinstalled: numpy pandas matplotlib seaborn scipy sympy scikit-learn statsmodels openpyxl xlsxwriter pillow opencv requests beautifulsoup4 lxml pyyaml trimesh numpy-stl shapely networkx python-docx python-pptx pdfplumber pymupdf reportlab qrcode tqdm. For Korean text in matplotlib: fm.fontManager.addfont('/usr/share/fonts/truetype/nanum/NanumGothic.ttf'); plt.rc('font', family='NanumGothic'). Use for math, data analysis, CSV/JSON processing, charting (save chart to workspace file). IMAGE EDITING: input path = exact string from [IMAGE PATH for image_edit/python_eval — use EXACTLY this string: ...] hint in the message. Save output to uploads/<name>.jpg. FONT: For Korean/CJK text in Pillow (speech bubbles, watermarks, etc.) use ImageFont.truetype("/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf", size) — DejaVuSans does NOT support Korean.`,
|
||||
python: `PYTHON TOOL: python_eval(code, timeout?, packages?) → execute Python code in the workspace directory. Returns stdout/stderr. timeout default 15s, max 60s. packages: comma-separated pip packages to install if missing (e.g. "numpy,pandas"). Runs in an offline Docker sandbox (no internet unless network:true; host files outside the workspace are invisible; pip install is unavailable). Preinstalled (no pip needed): numpy pandas scipy sympy scikit-learn scikit-image statsmodels pingouin lifelines numpy-financial pint | matplotlib seaborn wordcloud imageio pillow opencv | openpyxl xlsxwriter xlrd pyarrow python-docx python-pptx pdfplumber pymupdf pypdf reportlab markdown jinja2 | requests beautifulsoup4 lxml xmltodict yfinance | trimesh numpy-stl manifold3d shapely networkx ezdxf svgwrite pyclipper rtree | pyproj xarray netCDF4 haversine | mido pretty_midi soundfile | korean-lunar-calendar holidays jamo rapidfuzz phonenumbers python-stdnum qrcode tqdm pyyaml. For Korean text in matplotlib: fm.fontManager.addfont('/usr/share/fonts/truetype/nanum/NanumGothic.ttf'); plt.rc('font', family='NanumGothic'). Use for math, data analysis, CSV/JSON processing, charting (save chart to workspace file). IMAGE EDITING: input path = exact string from [IMAGE PATH for image_edit/python_eval — use EXACTLY this string: ...] hint in the message. Save output to uploads/<name>.jpg. FONT: For Korean/CJK text in Pillow (speech bubbles, watermarks, etc.) use ImageFont.truetype("/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf", size) — DejaVuSans does NOT support Korean.`,
|
||||
|
||||
sqlite: `SQLITE TOOL: sqlite_query(db_path, query, write?, max_rows?) → query a SQLite .db file in the workspace. SELECT queries allowed by default. Set write=true for INSERT/UPDATE/DELETE/CREATE/DROP. Returns formatted table. db_path is relative to workspace or absolute (must be inside workspace).`,
|
||||
};
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ export const pythonEvalTool = {
|
||||
const containerName = `pyeval-${process.pid}-${Date.now()}`;
|
||||
let sandboxNote = '';
|
||||
if (args?.packages && useSandbox) {
|
||||
sandboxNote = 'packages 인자는 샌드박스에서 무시됨(설치 불가). 기본 포함: numpy pandas matplotlib seaborn scipy sympy scikit-learn statsmodels openpyxl xlsxwriter pillow opencv requests beautifulsoup4 lxml pyyaml trimesh numpy-stl shapely networkx python-docx python-pptx pdfplumber pymupdf reportlab qrcode tqdm. 그 외 패키지가 꼭 필요하면 사용자에게 알릴 것.';
|
||||
sandboxNote = 'packages 인자는 샌드박스에서 무시됨(설치 불가). 기본 포함(분야별 다수 — numpy pandas scipy scikit-learn matplotlib seaborn opencv openpyxl python-docx python-pptx pdfplumber pymupdf requests beautifulsoup4 trimesh numpy-stl shapely pyproj yfinance 등). 그 외 패키지가 꼭 필요하면 사용자에게 알릴 것. 그 외 패키지가 꼭 필요하면 사용자에게 알릴 것.';
|
||||
}
|
||||
if (args?.packages && !useSandbox) {
|
||||
const pkgs = String(args.packages).split(',').map((p: string) => p.trim()).filter((p: string) => /^[a-zA-Z0-9_\-\.]+$/.test(p));
|
||||
|
||||
Reference in new issue
Block a user