sandbox-csv
Parse and write CSV in a Code node or CodeAct action, with papaparse running on the host behind a generated facade
- License 许可
- AGPL-3.0
- 最近更新
- 2026-08-18
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- sandbox-csv
- description
- Parse and write CSV in a Code node or CodeAct action, with papaparse running on the host behind a generated facade
02 资源文件 1
- 参考文档package.json827 B
03 SKILL.md 正文
CSV in the sandbox
Specifier: @nodetool-ai/sandbox-csv. Declare it in the node's packages
property and import it at the top of the body.
papaparse imports node:stream, so it cannot be compiled into the guest. This
pack is a host module: the import resolves to a generated facade whose two
exports call NodeTool's own implementation. Both are async — a host call is a
round trip.
parse — CSV text to records
import { parse } from "@nodetool-ai/sandbox-csv";
const rows = await parse(inputs.csv); // records keyed by the header row
const raw = await parse(inputs.csv, { header: false }); // string[][]
return { count: rows.length, first: rows[0] ?? null };
Options: header (default true), delimiter (one character; omit to
auto-detect).
Values stay strings. There is no dynamicTyping, so a column never changes
shape between runs — convert what you need with Number() or new Date().
stringify — records back to CSV
import { stringify } from "@nodetool-ai/sandbox-csv";
const csv = await stringify(inputs.rows, { delimiter: ";" });
return { csv };
Takes records or row arrays. Options: header (default true), delimiter
(exactly one character).
Gotchas
- Every export is async.
parse(...)withoutawaitgives you a Promise. - 5 MB of text per call. Input over that is refused by name. Split a bigger
file, or read it in slices with
workspace.read. - Bounded concurrency still helps. Host calls start when invoked, so
Promise.allover severalparsecalls runs them together;parallelMapis the bounded form.
04 同仓库更多 Skills
sandbox-zip
Read and write zip archives in a Code node or CodeAct action, with fflate running on the host under a 50 MB inflation cap
sandbox-yaml
Read and write YAML inside a Code node or CodeAct action, with js-yaml running in the guest
sandbox-xml
Parse XML feeds and sitemaps in a Code node or CodeAct action, with fast-xml-parser running on the host
sandbox-xlsx
Read and write Excel workbooks in a Code node or CodeAct action, with exceljs running on the host
sandbox-twilio
Send SMS and WhatsApp messages and look up numbers from a Code node or CodeAct action, with NodeTool's Twilio request builder running on the host
sandbox-tfjs
Classify and embed images, detect objects, and answer from a passage in a Code node or CodeAct action, with TensorFlow.js running on the host