Durable coding-agent harnesses (Claude Code, Codex, OpenCode, Pi, fx) on a Workflow SDK World
{
"source": "@earendil-works/pi-coding-agent 1.0.4 (MIT): the tool definitions createCodingToolDefinitions('/workspace') and createAllToolDefinitions('/workspace') return, and the keys of the AgentTools createCodingTools() returns",
"package": "@earendil-works/pi-coding-agent",
"version": "1.0.4",
"license": "MIT",
"createCodingTools": [
{
"name": "read",
"label": "read",
"description": "Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete.",
"parameters": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string",
"description": "Path to the file to read (relative or absolute)"
},
"offset": {
"type": "number",
"description": "Line number to start reading from (1-indexed)"
},
"limit": {
"type": "number",
"description": "Maximum number of lines to read"
}
}
}
},
{
"name": "bash",
"label": "bash",
"description": "Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.",
"parameters": {
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"type": "string",
"description": "Shell command to execute"
},
"timeout": {
"type": "number",
"description": "Timeout in seconds (optional, no default timeout)"
}
}
}
},
{
"name": "edit",
"label": "edit",
"description": "Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.",
"parameters": {
"type": "object",
"required": [
"path",
"edits"
],
"properties": {
"path": {
"type": "string",
"description": "Path to the file to edit (relative or absolute)"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"required": [
"oldText",
"newText"
],
"properties": {
"oldText": {
"type": "string",
"description": "Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."
},
"newText": {
"type": "string",
"description": "Replacement text for this targeted edit."
}
}
},
"description": "One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."
}
}
}
},
{
"name": "write",
"label": "write",
"description": "Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.",
"parameters": {
"type": "object",
"required": [
"path",
"content"
],
"properties": {
"path": {
"type": "string",
"description": "Path to the file to write (relative or absolute)"
},
"content": {
"type": "string",
"description": "Content to write to the file"
}
}
}
}
],
"allTools": [
{
"name": "read",
"description": "Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete."
},
{
"name": "bash",
"description": "Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds."
},
{
"name": "powershell",
"description": "Execute a PowerShell command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds."
},
{
"name": "edit",
"description": "Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes."
},
{
"name": "write",
"description": "Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories."
},
{
"name": "grep",
"description": "Search file contents for a pattern. Returns matching lines with file paths and line numbers. Respects .gitignore. Output is truncated to 100 matches or 50KB (whichever is hit first). Long lines are truncated to 500 chars."
},
{
"name": "find",
"description": "Search for files by glob pattern. Returns matching file paths relative to the search directory. Respects .gitignore. Output is truncated to 1000 results or 50KB (whichever is hit first)."
},
{
"name": "ls",
"description": "List directory contents. Returns entries sorted alphabetically, with '/' suffix for directories. Includes dotfiles. Output is truncated to 500 entries or 50KB (whichever is hit first)."
}
],
"agentToolKeys": [
{
"name": "read",
"keys": [
"constrainedSampling",
"description",
"execute",
"executionMode",
"label",
"name",
"outputSchema",
"parameters",
"prepareArguments"
]
},
{
"name": "bash",
"keys": [
"constrainedSampling",
"description",
"execute",
"executionMode",
"label",
"name",
"outputSchema",
"parameters",
"prepareArguments",
"promptGuidelines",
"promptSnippet"
]
},
{
"name": "edit",
"keys": [
"constrainedSampling",
"description",
"execute",
"executionMode",
"label",
"name",
"outputSchema",
"parameters",
"prepareArguments"
]
},
{
"name": "write",
"keys": [
"constrainedSampling",
"description",
"execute",
"executionMode",
"label",
"name",
"outputSchema",
"parameters",
"prepareArguments"
]
}
]
}