1625 lines
50 KiB
JSON
1625 lines
50 KiB
JSON
{
|
|
"booting": [
|
|
{
|
|
"function": {
|
|
"description": "Write down what you intend to do. This must be your FIRST call - nothing else runs until there is a list. Give 2-20 steps, each one something you could report on, not every command you expect to type. Include a step for checking the work.",
|
|
"name": "plan_tasks",
|
|
"parameters": {
|
|
"properties": {
|
|
"tasks": {
|
|
"description": "The steps, in order.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"tasks"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Move a task to in_progress, done, blocked or dropped. Mark one in_progress when you start it and closed when you stop. A note is REQUIRED for blocked and dropped: that sentence is what the user reads when work comes back unfinished.",
|
|
"name": "update_task",
|
|
"parameters": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "The task number.",
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"description": "Why. Required unless status is done.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"in_progress",
|
|
"done",
|
|
"blocked",
|
|
"dropped"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Add a step you did not plan for. Use it when the work turns out to need something real, not to record every command. Added tasks are marked as added in the report.",
|
|
"name": "add_task",
|
|
"parameters": {
|
|
"properties": {
|
|
"after_id": {
|
|
"type": "integer"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
}
|
|
],
|
|
"ubuntu": [
|
|
{
|
|
"function": {
|
|
"description": "Write down what you intend to do. This must be your FIRST call - nothing else runs until there is a list. Give 2-20 steps, each one something you could report on, not every command you expect to type. Include a step for checking the work.",
|
|
"name": "plan_tasks",
|
|
"parameters": {
|
|
"properties": {
|
|
"tasks": {
|
|
"description": "The steps, in order.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"tasks"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Move a task to in_progress, done, blocked or dropped. Mark one in_progress when you start it and closed when you stop. A note is REQUIRED for blocked and dropped: that sentence is what the user reads when work comes back unfinished.",
|
|
"name": "update_task",
|
|
"parameters": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "The task number.",
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"description": "Why. Required unless status is done.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"in_progress",
|
|
"done",
|
|
"blocked",
|
|
"dropped"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Add a step you did not plan for. Use it when the work turns out to need something real, not to record every command. Added tasks are marked as added in the report.",
|
|
"name": "add_task",
|
|
"parameters": {
|
|
"properties": {
|
|
"after_id": {
|
|
"type": "integer"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Run a shell command in the machine and get back the exit code, stdout AND stderr. This is a root bash login shell - you are already root. Commands start in /mnt/project. It is the main thing you do: read what actually happened rather than predicting it.",
|
|
"name": "run",
|
|
"parameters": {
|
|
"properties": {
|
|
"command": {
|
|
"description": "The command line to run.",
|
|
"type": "string"
|
|
},
|
|
"timeout_s": {
|
|
"description": "Seconds to wait, default 120, maximum 900.",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Create a file in the project folder, /mnt/project, or replace one whole. Paths are relative to that folder, which is the ONLY place whose contents survive the end of this session - everything else in the machine is destroyed. One write takes at most 16 KB: that is deliberate, and it is what stops you designing a whole program before writing any of it. Start with the skeleton, then append_file the sections and edit_file the parts you got wrong.",
|
|
"name": "write_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"description": "Relative path, e.g. 'src/main.py'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"content"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Add to the end of a file in the project folder, creating it if it is not there. This is how you build something too big for one write: put down a section, check it, then add the next. Prefer it over holding a whole file in your head.",
|
|
"name": "append_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"content"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Change part of a file by replacing exact text. `old` must appear EXACTLY once, whitespace and indentation included - read the file first rather than guessing at the wording. It refuses if the text is missing or ambiguous, which means a failed edit tells you your idea of the file is wrong before you build on it. Use this to revise; use append_file to extend; use write_file only to start.",
|
|
"name": "edit_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"new": {
|
|
"description": "What to put in its place.",
|
|
"type": "string"
|
|
},
|
|
"old": {
|
|
"description": "Exact text to replace, with enough surrounding lines to be unique.",
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"replace_all": {
|
|
"description": "Replace every occurrence instead of requiring one.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"old",
|
|
"new"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read part of a file from the project folder. Windowed, so a large log does not fill your context; ask for the next window with offset if you need more.",
|
|
"name": "read_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"description": "Bytes to return, default 40000.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Search the web and get back ranked results with titles, URLs and snippets. Use it before guessing at a download URL, a package name, a flag or an error message. Snippets are thin: read_page the one that looks right, or open_page it if you need to see the page rather than read it.",
|
|
"name": "web_search",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_results": {
|
|
"description": "1 to 15, default 6.",
|
|
"type": "integer"
|
|
},
|
|
"query": {
|
|
"description": "Search terms as they would appear on a good result page - include version numbers and error strings verbatim.",
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"description": "Restrict to one domain, e.g. 'docs.python.org'.",
|
|
"type": "string"
|
|
},
|
|
"time_range": {
|
|
"description": "'day', 'week', 'month' or 'year'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Fetch a web page or PDF and return its text. This is how you read documentation: it costs one call, where reading the same page off the screen costs a screenshot per scroll. Long pages come back a window at a time - ask for the next with offset.",
|
|
"name": "read_page",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_chars": {
|
|
"description": "500 to 20000, default 6000.",
|
|
"type": "integer"
|
|
},
|
|
"offset": {
|
|
"description": "Continue from this character.",
|
|
"type": "integer"
|
|
},
|
|
"search": {
|
|
"description": "Jump to the first mention of this term.",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "Full URL, exactly as web_search gave it.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "List a directory in the project folder, with sizes and modification times.",
|
|
"name": "list_dir",
|
|
"parameters": {
|
|
"properties": {
|
|
"path": {
|
|
"description": "Relative path, default '.'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Check whether the machine can actually reach the internet. Use this rather than ping: ping can NEVER work here for a reason that has nothing to do with the network, and reading its failure as 'no internet' will waste the session.",
|
|
"name": "check_internet",
|
|
"parameters": {
|
|
"properties": {},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Commit the project folder's current state. Commit when something works, not at the end - a commit is how the user sees what you did, and the push happens for you when the session ends. Test scripts, probes, captured output and build products are NOT committed and never reach the release; the result names anything it held back.",
|
|
"name": "git_commit",
|
|
"parameters": {
|
|
"properties": {
|
|
"message": {
|
|
"description": "What changed, in one line.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Reboot the machine. The disk survives, so nothing you have written is lost. Use it when something needs a restart to take effect, or when you have broken the machine's networking or a service badly enough that starting again is quicker.",
|
|
"name": "reboot_vm",
|
|
"parameters": {
|
|
"properties": {},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Ask the user a question and pause. Use it only when the answer cannot be found in the machine - a choice about what they want, a credential, a decision you should not make for them. Anything you could determine by running a command, run.",
|
|
"name": "ask_operator",
|
|
"parameters": {
|
|
"properties": {
|
|
"question": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"question"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Ask the operator to unfreeze the base image so software can be added permanently. You cannot do this and it will not happen during this session. Only ask when something is needed by EVERY future session; for this one, install it normally - that works fine, it just does not persist.",
|
|
"name": "request_unfreeze",
|
|
"parameters": {
|
|
"properties": {
|
|
"reason": {
|
|
"description": "What is needed and why it must be in the base image.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"reason"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Wait, without spending a turn on it. Use it while something long is running - a package install, a build, a first boot, a window that has not appeared yet. Far cheaper and more reliable than running the same command over and over to see if it has finished yet.",
|
|
"name": "wait",
|
|
"parameters": {
|
|
"properties": {
|
|
"seconds": {
|
|
"description": "How many seconds to wait.",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"seconds"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "End the session. Refused while any task is still open, and refused if you have not run anything. The verification command is RE-RUN by the supervisor afterwards and its real exit code is what the user is shown - so choose a command that would fail if the work were wrong.",
|
|
"name": "finish",
|
|
"parameters": {
|
|
"properties": {
|
|
"summary": {
|
|
"description": "What you did and what the user should know.",
|
|
"type": "string"
|
|
},
|
|
"verification": {
|
|
"properties": {
|
|
"command": {
|
|
"description": "One command that demonstrates it works.",
|
|
"type": "string"
|
|
},
|
|
"expected": {
|
|
"description": "What you expect it to print.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"summary",
|
|
"verification"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Search Stack Exchange for a technical answer - error messages, API behaviour, 'why does this fail'. Returns question titles with the accepted answer.",
|
|
"name": "search_stackexchange",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_results": {
|
|
"type": "integer"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"description": "e.g. 'stackoverflow', 'unix', 'serverfault'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read a Linux manual page, including for software this machine does not have installed. Faster and more exact than guessing at flags.",
|
|
"name": "read_man_page",
|
|
"parameters": {
|
|
"properties": {
|
|
"name": {
|
|
"description": "e.g. 'rsync' or 'systemd.exec'.",
|
|
"type": "string"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"search": {
|
|
"description": "Jump to the first mention of this.",
|
|
"type": "string"
|
|
},
|
|
"section": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Get the current published version of a package - pypi, npm, crates, apt and more. Use it instead of pinning a version from memory.",
|
|
"name": "lookup_package",
|
|
"parameters": {
|
|
"properties": {
|
|
"ecosystem": {
|
|
"description": "pypi, npm, crates, apt, and others.",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"ecosystem"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read a Wikipedia article. For background and definitions, not for anything that changes often.",
|
|
"name": "wikipedia_lookup",
|
|
"parameters": {
|
|
"properties": {
|
|
"full_article": {
|
|
"type": "boolean"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"search": {
|
|
"type": "string"
|
|
},
|
|
"topic": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"topic"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read or search IETF RFCs - the actual protocol text, when behaviour has to be right rather than plausible.",
|
|
"name": "lookup_rfc",
|
|
"parameters": {
|
|
"properties": {
|
|
"number": {
|
|
"type": "integer"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"search": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Look up a CVE by id, or search for vulnerabilities in a product or version.",
|
|
"name": "lookup_cve",
|
|
"parameters": {
|
|
"properties": {
|
|
"cve_id": {
|
|
"description": "e.g. 'CVE-2024-3094'.",
|
|
"type": "string"
|
|
},
|
|
"keyword": {
|
|
"description": "Product or version to search for.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Search academic papers. For methods and published results, not for software how-to.",
|
|
"name": "search_papers",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_results": {
|
|
"type": "integer"
|
|
},
|
|
"open_access_only": {
|
|
"type": "boolean"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Find the datasheet for an electronic component by part number.",
|
|
"name": "find_datasheet",
|
|
"parameters": {
|
|
"properties": {
|
|
"part_number": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"part_number"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Open a URL in the machine's own browser, in one call - no clicking into the address bar and no typing. Use it when you need to SEE a page: a download, a rendered diagram, a form. If you only need to know what a page SAYS, read_page is cheaper and does not touch the screen. Take a screenshot afterwards to see it.",
|
|
"name": "open_page",
|
|
"parameters": {
|
|
"properties": {
|
|
"url": {
|
|
"description": "Full http(s) URL, exactly as web_search gave it.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Start a program in the project folder on the machine's REAL desktop, where a screenshot can see it. Use this for anything with a window - starting it with `run` puts it on a desktop nobody is looking at, which does not fail, it just never appears. Returns once the program is confirmed still running a few seconds later; take a screenshot next to see the window.",
|
|
"name": "launch_app",
|
|
"parameters": {
|
|
"properties": {
|
|
"path": {
|
|
"description": "Relative path in the project folder, e.g. 'Toolkit.ps1'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Look at the machine's screen. Returns the image and its size in pixels; click coordinates are in those pixels, measured from the top left.",
|
|
"name": "screenshot",
|
|
"parameters": {
|
|
"properties": {},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Click at a pixel position. Take a screenshot first - the pointer goes exactly where you say, so a stale idea of what is on screen puts it in the wrong place.",
|
|
"name": "click",
|
|
"parameters": {
|
|
"properties": {
|
|
"button": {
|
|
"enum": [
|
|
"left",
|
|
"right",
|
|
"middle"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"x": {
|
|
"type": "integer"
|
|
},
|
|
"y": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"x",
|
|
"y"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Move the pointer without clicking, for hover menus and drags.",
|
|
"name": "move",
|
|
"parameters": {
|
|
"properties": {
|
|
"x": {
|
|
"type": "integer"
|
|
},
|
|
"y": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"x",
|
|
"y"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Press a key or a chord, e.g. 'ret', 'tab', 'esc', 'ctrl+alt+t', 'alt+f4'. Names are QEMU's, and an unknown one is refused rather than guessed at.",
|
|
"name": "key",
|
|
"parameters": {
|
|
"properties": {
|
|
"keys": {
|
|
"description": "One key, or a chord joined by '+'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"keys"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Type literal text at the keyboard. ASCII only. For anything long, write a file and open it in the machine instead - typing 2,000 characters one key at a time is slow and every keystroke is a chance for the focus to move.",
|
|
"name": "type",
|
|
"parameters": {
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Scroll the wheel. Negative scrolls down, positive up.",
|
|
"name": "scroll",
|
|
"parameters": {
|
|
"properties": {
|
|
"amount": {
|
|
"type": "integer"
|
|
},
|
|
"x": {
|
|
"type": "integer"
|
|
},
|
|
"y": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
}
|
|
],
|
|
"windows": [
|
|
{
|
|
"function": {
|
|
"description": "Write down what you intend to do. This must be your FIRST call - nothing else runs until there is a list. Give 2-20 steps, each one something you could report on, not every command you expect to type. Include a step for checking the work.",
|
|
"name": "plan_tasks",
|
|
"parameters": {
|
|
"properties": {
|
|
"tasks": {
|
|
"description": "The steps, in order.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"tasks"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Move a task to in_progress, done, blocked or dropped. Mark one in_progress when you start it and closed when you stop. A note is REQUIRED for blocked and dropped: that sentence is what the user reads when work comes back unfinished.",
|
|
"name": "update_task",
|
|
"parameters": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "The task number.",
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"description": "Why. Required unless status is done.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"in_progress",
|
|
"done",
|
|
"blocked",
|
|
"dropped"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Add a step you did not plan for. Use it when the work turns out to need something real, not to record every command. Added tasks are marked as added in the report.",
|
|
"name": "add_task",
|
|
"parameters": {
|
|
"properties": {
|
|
"after_id": {
|
|
"type": "integer"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Run a shell command in the machine and get back the exit code, stdout AND stderr. This is an elevated PowerShell 5.1 - already administrator, and note it has no `&&` or `||`, so chain with `;` or use separate calls. Commands start in Z:\\. It is the main thing you do: read what actually happened rather than predicting it.",
|
|
"name": "run",
|
|
"parameters": {
|
|
"properties": {
|
|
"command": {
|
|
"description": "The command line to run.",
|
|
"type": "string"
|
|
},
|
|
"timeout_s": {
|
|
"description": "Seconds to wait, default 120, maximum 900.",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Create a file in the project folder, Z:\\, or replace one whole. Paths are relative to that folder, which is the ONLY place whose contents survive the end of this session - everything else in the machine is destroyed. One write takes at most 16 KB: that is deliberate, and it is what stops you designing a whole program before writing any of it. Start with the skeleton, then append_file the sections and edit_file the parts you got wrong.",
|
|
"name": "write_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"description": "Relative path, e.g. 'src\\main.ps1'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"content"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Add to the end of a file in the project folder, creating it if it is not there. This is how you build something too big for one write: put down a section, check it, then add the next. Prefer it over holding a whole file in your head.",
|
|
"name": "append_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"content"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Change part of a file by replacing exact text. `old` must appear EXACTLY once, whitespace and indentation included - read the file first rather than guessing at the wording. It refuses if the text is missing or ambiguous, which means a failed edit tells you your idea of the file is wrong before you build on it. Use this to revise; use append_file to extend; use write_file only to start.",
|
|
"name": "edit_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"new": {
|
|
"description": "What to put in its place.",
|
|
"type": "string"
|
|
},
|
|
"old": {
|
|
"description": "Exact text to replace, with enough surrounding lines to be unique.",
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"replace_all": {
|
|
"description": "Replace every occurrence instead of requiring one.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"old",
|
|
"new"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read part of a file from the project folder. Windowed, so a large log does not fill your context; ask for the next window with offset if you need more.",
|
|
"name": "read_file",
|
|
"parameters": {
|
|
"properties": {
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"description": "Bytes to return, default 40000.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Search the web and get back ranked results with titles, URLs and snippets. Use it before guessing at a download URL, a package name, a flag or an error message. Snippets are thin: read_page the one that looks right, or open_page it if you need to see the page rather than read it.",
|
|
"name": "web_search",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_results": {
|
|
"description": "1 to 15, default 6.",
|
|
"type": "integer"
|
|
},
|
|
"query": {
|
|
"description": "Search terms as they would appear on a good result page - include version numbers and error strings verbatim.",
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"description": "Restrict to one domain, e.g. 'docs.python.org'.",
|
|
"type": "string"
|
|
},
|
|
"time_range": {
|
|
"description": "'day', 'week', 'month' or 'year'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Fetch a web page or PDF and return its text. This is how you read documentation: it costs one call, where reading the same page off the screen costs a screenshot per scroll. Long pages come back a window at a time - ask for the next with offset.",
|
|
"name": "read_page",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_chars": {
|
|
"description": "500 to 20000, default 6000.",
|
|
"type": "integer"
|
|
},
|
|
"offset": {
|
|
"description": "Continue from this character.",
|
|
"type": "integer"
|
|
},
|
|
"search": {
|
|
"description": "Jump to the first mention of this term.",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "Full URL, exactly as web_search gave it.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "List a directory in the project folder, with sizes and modification times.",
|
|
"name": "list_dir",
|
|
"parameters": {
|
|
"properties": {
|
|
"path": {
|
|
"description": "Relative path, default '.'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Check whether the machine can actually reach the internet. Use this rather than ping: ping can NEVER work here for a reason that has nothing to do with the network, and reading its failure as 'no internet' will waste the session.",
|
|
"name": "check_internet",
|
|
"parameters": {
|
|
"properties": {},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Commit the project folder's current state. Commit when something works, not at the end - a commit is how the user sees what you did, and the push happens for you when the session ends. Test scripts, probes, captured output and build products are NOT committed and never reach the release; the result names anything it held back.",
|
|
"name": "git_commit",
|
|
"parameters": {
|
|
"properties": {
|
|
"message": {
|
|
"description": "What changed, in one line.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Reboot the machine. The disk survives, so nothing you have written is lost. Use it when something needs a restart to take effect, or when you have broken the machine's networking or a service badly enough that starting again is quicker.",
|
|
"name": "reboot_vm",
|
|
"parameters": {
|
|
"properties": {},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Ask the user a question and pause. Use it only when the answer cannot be found in the machine - a choice about what they want, a credential, a decision you should not make for them. Anything you could determine by running a command, run.",
|
|
"name": "ask_operator",
|
|
"parameters": {
|
|
"properties": {
|
|
"question": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"question"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Ask the operator to unfreeze the base image so software can be added permanently. You cannot do this and it will not happen during this session. Only ask when something is needed by EVERY future session; for this one, install it normally - that works fine, it just does not persist.",
|
|
"name": "request_unfreeze",
|
|
"parameters": {
|
|
"properties": {
|
|
"reason": {
|
|
"description": "What is needed and why it must be in the base image.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"reason"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Wait, without spending a turn on it. Use it while something long is running - a package install, a build, a first boot, a window that has not appeared yet. Far cheaper and more reliable than running the same command over and over to see if it has finished yet.",
|
|
"name": "wait",
|
|
"parameters": {
|
|
"properties": {
|
|
"seconds": {
|
|
"description": "How many seconds to wait.",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"seconds"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "End the session. Refused while any task is still open, and refused if you have not run anything. The verification command is RE-RUN by the supervisor afterwards and its real exit code is what the user is shown - so choose a command that would fail if the work were wrong.",
|
|
"name": "finish",
|
|
"parameters": {
|
|
"properties": {
|
|
"summary": {
|
|
"description": "What you did and what the user should know.",
|
|
"type": "string"
|
|
},
|
|
"verification": {
|
|
"properties": {
|
|
"command": {
|
|
"description": "One command that demonstrates it works.",
|
|
"type": "string"
|
|
},
|
|
"expected": {
|
|
"description": "What you expect it to print.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"summary",
|
|
"verification"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Search Stack Exchange for a technical answer - error messages, API behaviour, 'why does this fail'. Returns question titles with the accepted answer.",
|
|
"name": "search_stackexchange",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_results": {
|
|
"type": "integer"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"description": "e.g. 'stackoverflow', 'unix', 'serverfault'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read a Linux manual page, including for software this machine does not have installed. Faster and more exact than guessing at flags.",
|
|
"name": "read_man_page",
|
|
"parameters": {
|
|
"properties": {
|
|
"name": {
|
|
"description": "e.g. 'rsync' or 'systemd.exec'.",
|
|
"type": "string"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"search": {
|
|
"description": "Jump to the first mention of this.",
|
|
"type": "string"
|
|
},
|
|
"section": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Get the current published version of a package - pypi, npm, crates, apt and more. Use it instead of pinning a version from memory.",
|
|
"name": "lookup_package",
|
|
"parameters": {
|
|
"properties": {
|
|
"ecosystem": {
|
|
"description": "pypi, npm, crates, apt, and others.",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"ecosystem"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read a Wikipedia article. For background and definitions, not for anything that changes often.",
|
|
"name": "wikipedia_lookup",
|
|
"parameters": {
|
|
"properties": {
|
|
"full_article": {
|
|
"type": "boolean"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"search": {
|
|
"type": "string"
|
|
},
|
|
"topic": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"topic"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Read or search IETF RFCs - the actual protocol text, when behaviour has to be right rather than plausible.",
|
|
"name": "lookup_rfc",
|
|
"parameters": {
|
|
"properties": {
|
|
"number": {
|
|
"type": "integer"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"search": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Look up a CVE by id, or search for vulnerabilities in a product or version.",
|
|
"name": "lookup_cve",
|
|
"parameters": {
|
|
"properties": {
|
|
"cve_id": {
|
|
"description": "e.g. 'CVE-2024-3094'.",
|
|
"type": "string"
|
|
},
|
|
"keyword": {
|
|
"description": "Product or version to search for.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Search academic papers. For methods and published results, not for software how-to.",
|
|
"name": "search_papers",
|
|
"parameters": {
|
|
"properties": {
|
|
"max_results": {
|
|
"type": "integer"
|
|
},
|
|
"open_access_only": {
|
|
"type": "boolean"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Find the datasheet for an electronic component by part number.",
|
|
"name": "find_datasheet",
|
|
"parameters": {
|
|
"properties": {
|
|
"part_number": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"part_number"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Open a URL in the machine's own browser, in one call - no clicking into the address bar and no typing. Use it when you need to SEE a page: a download, a rendered diagram, a form. If you only need to know what a page SAYS, read_page is cheaper and does not touch the screen. Take a screenshot afterwards to see it.",
|
|
"name": "open_page",
|
|
"parameters": {
|
|
"properties": {
|
|
"url": {
|
|
"description": "Full http(s) URL, exactly as web_search gave it.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Start a program in the project folder on the machine's REAL desktop, where a screenshot can see it. Use this for anything with a window - starting it with `run` puts it on a desktop nobody is looking at, which does not fail, it just never appears. Returns once the program is confirmed still running a few seconds later; take a screenshot next to see the window.",
|
|
"name": "launch_app",
|
|
"parameters": {
|
|
"properties": {
|
|
"path": {
|
|
"description": "Relative path in the project folder, e.g. 'Toolkit.ps1'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Look at the machine's screen. Returns the image and its size in pixels; click coordinates are in those pixels, measured from the top left.",
|
|
"name": "screenshot",
|
|
"parameters": {
|
|
"properties": {},
|
|
"required": [],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Click at a pixel position. Take a screenshot first - the pointer goes exactly where you say, so a stale idea of what is on screen puts it in the wrong place.",
|
|
"name": "click",
|
|
"parameters": {
|
|
"properties": {
|
|
"button": {
|
|
"enum": [
|
|
"left",
|
|
"right",
|
|
"middle"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"x": {
|
|
"type": "integer"
|
|
},
|
|
"y": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"x",
|
|
"y"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Move the pointer without clicking, for hover menus and drags.",
|
|
"name": "move",
|
|
"parameters": {
|
|
"properties": {
|
|
"x": {
|
|
"type": "integer"
|
|
},
|
|
"y": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"x",
|
|
"y"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Press a key or a chord, e.g. 'ret', 'tab', 'esc', 'ctrl+alt+t', 'alt+f4'. Names are QEMU's, and an unknown one is refused rather than guessed at.",
|
|
"name": "key",
|
|
"parameters": {
|
|
"properties": {
|
|
"keys": {
|
|
"description": "One key, or a chord joined by '+'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"keys"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Type literal text at the keyboard. ASCII only. For anything long, write a file and open it in the machine instead - typing 2,000 characters one key at a time is slow and every keystroke is a chance for the focus to move.",
|
|
"name": "type",
|
|
"parameters": {
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"function": {
|
|
"description": "Scroll the wheel. Negative scrolls down, positive up.",
|
|
"name": "scroll",
|
|
"parameters": {
|
|
"properties": {
|
|
"amount": {
|
|
"type": "integer"
|
|
},
|
|
"x": {
|
|
"type": "integer"
|
|
},
|
|
"y": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "function"
|
|
}
|
|
]
|
|
}
|