ci / check (push) Canceled after 0s
tools/python.json: unavailable is now only "no page of this chat is open" and says where to open it; texts.no_answer (a page is open but did not answer) and texts.timeout (the run passed its seconds) are their own texts. conformance/python.json; the server's tool alone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
55 lines
2.7 KiB
JSON
55 lines
2.7 KiB
JSON
{
|
|
"name": "python",
|
|
"scope": "llembas",
|
|
"sessions": "chat",
|
|
"risk": "execute",
|
|
"exclusive": false,
|
|
"block": "shell",
|
|
"purpose": "purpose",
|
|
"requires": [
|
|
"page"
|
|
],
|
|
"unavailable": "Python cannot run now: no page of this chat is open. Python runs in the person's browser — ask them to open this chat in the LLeMbas web or desktop app and keep it open, then call python again.",
|
|
"texts": {
|
|
"no_answer": "Python did not run: a page of this chat is open, but it did not answer. It may still be loading Python, or be asleep in a background tab — ask the person to bring this chat to the front (or reload it), then call python again.",
|
|
"timeout": "Python stopped: the run took longer than {{seconds}} seconds, and nothing it wrote was saved. Do less in one call, or split the work over several calls."
|
|
},
|
|
"aliases": {
|
|
"cli": [],
|
|
"llembas": []
|
|
},
|
|
"variables": {
|
|
"packages": "the packages the instance provides beyond the standard library, as a list, or \"none\" — implementation-defined; LLeMbas 2.0: none (the standard library only)",
|
|
"seconds": "the time limit of one call, in seconds — implementation-defined; LLeMbas 2.0: 30",
|
|
"memory": "the memory limit of one call, with its unit — implementation-defined; LLeMbas 2.0: 512 MB",
|
|
"output": "how much printed output comes back, with its unit — implementation-defined; LLeMbas 2.0: 20,000 characters"
|
|
},
|
|
"description": "Run Python for calculations and for working with files — parse JSON or CSV, transform text, compute. It runs in the user's browser (Pyodide), sandboxed: no network, no shell, no packages beyond the standard library and these: {{packages}}. Returns what the code printed and the value of its last expression.\n\n- `files` are copied in before the run, at the same paths, from what this session can read.\n- Files the code writes come back only when listed in `save`: each is written as the write tool would write it, with this session's permissions.\n- At most {{seconds}} seconds and {{memory}} of memory per call; printed output past {{output}} is cut.\n- Every call starts fresh: nothing is kept between calls.",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "The Python code to run"
|
|
},
|
|
"files": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Files to copy in before the run"
|
|
},
|
|
"save": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Files the code writes that are to be saved back"
|
|
}
|
|
},
|
|
"required": [
|
|
"code"
|
|
]
|
|
}
|
|
}
|