471 lines
13 KiB
JSON
471 lines
13 KiB
JSON
{
|
|
"model": "anthropic/claude-3.5-sonnet",
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"path": "tsconfig.json",
|
|
"content": "{\n \"extends\": \"../typescript-config/base.json\",\n \"include\": [\"src/**/*.ts\"],\n \"files\": [\"src/index.ts\"],\n \"compilerOptions\": {\n \"allowJs\": true,\n \"declarationDir\": \"./dist\",\n \"outDir\": \"./dist\",\n \"sourceMap\": true,\n \n \"preserveConstEnums\": true\n },\n}\n"
|
|
},
|
|
{
|
|
"role": "user",
|
|
"path": "package.json",
|
|
"content": "{\n \"name\": \"@polymech/core\",\n \"version\": \"0.2.6\",\n \"license\": \"BSD\",\n \"type\": \"module\",\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"licenses\": [\n {\n \"type\": \"BSD\",\n \"url\": \"https://git.osr-plastic.org/osr-plastic/osr-core/blob/master/LICENSE\"\n }\n ],\n \"exports\": {\n \"./iterator.js\": {\n \"import\": \"./dist/iterator.js\",\n \"require\": \"./dist/iterator.js\"\n },\n \"./strings.js\": {\n \"import\": \"./dist/strings.js\",\n \"require\": \"./dist/strings.js\"\n }\n },\n \"main\": \"dist/index.js\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://git.osr-plastic.org/osr-plastic/osr-core.git\"\n },\n \"types\": \"index.d.ts\",\n \"dependencies\": {\n \"tslog\": \"^3.3.3\"\n },\n \"devDependencies\": {\n \"eslint-plugin-regexp\": \"^2.7.0\",\n \"@eslint/js\": \"^9.18.0\",\n \"@repo/eslint-config\": \"workspace:*\",\n \"@repo/typescript-config\": \"workspace:*\",\n \"@types/node\": \"^8.10.66\",\n \"eslint\": \"^8.57.1\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"globals\": \"^15.14.0\",\n \"ts-node\": \"^10.9.1\",\n \"typescript\": \"^4.9.5\",\n \"typescript-eslint\": \"^8.20.0\"\n },\n \"scripts\": {\n \"test\": \"tsc && mocha build/test\",\n \"build\": \"tsc -p . --declaration\",\n \"start\": \"node build/index.js\",\n \"typings\": \"tsc -p . --declaration\",\n \"dev\": \"tsc -p . --declaration -w\"\n },\n \"modules\": [],\n \"readmeFilename\": \"Readme.md\"\n}\n"
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": "init tsup"
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": ""
|
|
}
|
|
],
|
|
"tools": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "list_files",
|
|
"description": "List all files in a directory",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"pattern": {
|
|
"type": "string",
|
|
"optional": true
|
|
}
|
|
},
|
|
"required": [
|
|
"directory"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "read_files",
|
|
"description": "Reads files in a directory with a given pattern",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"pattern": {
|
|
"type": "string",
|
|
"optional": true
|
|
}
|
|
},
|
|
"required": [
|
|
"directory"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "remove_file",
|
|
"description": "Remove a file at given path",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "rename_file",
|
|
"description": "Rename or move a file or directory",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"src": {
|
|
"type": "string"
|
|
},
|
|
"dst": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "modify_project_files",
|
|
"description": "Create or modify existing project files in one shot, preferably used for creating project structure)",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"files": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "base64 encoded string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"content"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "write_file",
|
|
"description": "Writes to a file, given a path and content (base64). No directory or file exists check needed!",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "base64 encoded string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"file"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "file_exists",
|
|
"description": "check if a file or folder exists",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"file"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "read_file",
|
|
"description": "read a file, at given a path",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"file"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "init_repository",
|
|
"description": "Initialize a new git repository",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {},
|
|
"required": []
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "commit_files_git",
|
|
"description": "Commit files using git",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"files": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "ask_question",
|
|
"description": "Ask user a simple question and get response",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"question": {
|
|
"type": "string",
|
|
"description": "Question to ask the user"
|
|
},
|
|
"default": {
|
|
"type": "string",
|
|
"description": "Default answer",
|
|
"optional": true
|
|
}
|
|
},
|
|
"required": [
|
|
"question"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "choose_option",
|
|
"description": "Ask user to choose from multiple options",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Message to show the user"
|
|
},
|
|
"choices": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "List of choices"
|
|
},
|
|
"multiple": {
|
|
"type": "boolean",
|
|
"description": "Allow multiple selections",
|
|
"optional": true
|
|
}
|
|
},
|
|
"required": [
|
|
"message",
|
|
"choices"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "execute_command",
|
|
"description": "Execute a terminal command and capture output",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"type": "string",
|
|
"description": "Command to execute"
|
|
},
|
|
"args": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Command arguments",
|
|
"optional": true
|
|
},
|
|
"cwd": {
|
|
"type": "string",
|
|
"description": "Working directory for command execution",
|
|
"optional": true
|
|
},
|
|
"background": {
|
|
"type": "boolean",
|
|
"description": "Run command in background (non-blocking)",
|
|
"optional": true,
|
|
"default": false
|
|
},
|
|
"window": {
|
|
"type": "boolean",
|
|
"description": "Open command in new terminal window",
|
|
"optional": true,
|
|
"default": false
|
|
},
|
|
"detached": {
|
|
"type": "boolean",
|
|
"description": "Run process detached from parent",
|
|
"optional": true,
|
|
"default": false
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "google",
|
|
"description": "Searches Google for the given query",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "serpapi",
|
|
"description": "Searches Serpapi (finds locations (engine:google_local), places on the map (engine:google_maps) ) for the given query",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"engine": {
|
|
"type": "string",
|
|
"default": "google"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "browse_page",
|
|
"description": "Browse a webpage and return its content as markdown, all links, images and pages main image",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "URL of the webpage to browse"
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "send_email",
|
|
"description": "Sends an email",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"recipient": {
|
|
"type": [
|
|
"string",
|
|
"array"
|
|
],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "The email address of the recipient(s). Can be a single email or an array of emails. For \"me\", use the default email address"
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "the subject",
|
|
"optional": true
|
|
},
|
|
"body": {
|
|
"type": "string",
|
|
"description": "Markdown formatted body of the email",
|
|
"optional": true
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "capture_screen",
|
|
"description": "Capture a screenshot and store it as file (jpg). Returns the path to the file",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"file"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"tool_choice": "auto",
|
|
"parallel_tool_calls": false
|
|
} |