diff --git a/.claude/hooks/ensure-pnpm-check.test.sh b/.claude/hooks/ensure-pnpm-check.test.sh new file mode 100755 index 000000000..4305b4b6f --- /dev/null +++ b/.claude/hooks/ensure-pnpm-check.test.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# Test harness for ensure-pnpm-check.sh + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +HOOK="$SCRIPT_DIR/ensure-pnpm-check.sh" +TEST_DIR="$SCRIPT_DIR/test-fixtures" + +mkdir -p "$TEST_DIR" + +PASS=0 +FAIL=0 + +test_result() { + local name="$1" + local expected="$2" # "block" (exit 2) or "allow" (exit 0) + local exit_code="$3" + + if [ "$expected" = "block" ]; then + if [ "$exit_code" -eq 2 ]; then + echo " PASS: $name" + ((PASS++)) + else + echo " FAIL: $name - expected exit 2 (block), got exit $exit_code" + ((FAIL++)) + fi + else + if [ "$exit_code" -eq 0 ]; then + echo " PASS: $name" + ((PASS++)) + else + echo " FAIL: $name - expected exit 0 (allow), got exit $exit_code" + ((FAIL++)) + fi + fi +} + +# Test 1: No pnpm check run - should block +echo "Test 1: No pnpm check run" +cat > "$TEST_DIR/no-check.jsonl" << 'EOF' +{"type":"user","message":{"role":"user","content":"hello"}} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"hi there"}]}} +EOF +echo "{\"transcript_path\": \"$TEST_DIR/no-check.jsonl\", \"stop_hook_active\": false}" | "$HOOK" 2>/dev/null +exit_code=$? +test_result "No pnpm check - should block" "block" "$exit_code" + +# Test 2: pnpm check was EXECUTED - should allow +echo "Test 2: pnpm check was executed" +cat > "$TEST_DIR/with-check.jsonl" << 'EOF' +{"type":"user","message":{"role":"user","content":"hello"}} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"tool_use","name":"Bash","input":{"command":"pnpm check"}}]}} +{"type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"ok"}]}} +EOF +echo "{\"transcript_path\": \"$TEST_DIR/with-check.jsonl\", \"stop_hook_active\": false}" | "$HOOK" 2>/dev/null +exit_code=$? +test_result "pnpm check was executed - should allow" "allow" "$exit_code" + +# Test 3: pnpm check MENTIONED but not executed - should block +echo "Test 3: pnpm check mentioned but not executed" +cat > "$TEST_DIR/mentioned-only.jsonl" << 'EOF' +{"type":"user","message":{"role":"user","content":"please run pnpm check"}} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"I will run pnpm check for you"}]}} +EOF +echo "{\"transcript_path\": \"$TEST_DIR/mentioned-only.jsonl\", \"stop_hook_active\": false}" | "$HOOK" 2>/dev/null +exit_code=$? +test_result "pnpm check mentioned only - should block" "block" "$exit_code" + +# Test 4: pnpm check executed BEFORE last stop - should block +echo "Test 4: pnpm check before last stop" +cat > "$TEST_DIR/check-before-stop.jsonl" << 'EOF' +{"type":"assistant","message":{"role":"assistant","content":[{"type":"tool_use","name":"Bash","input":{"command":"pnpm check"}}]}} +{"type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"ok"}]}} +{"type":"result","subtype":"stop"} +{"type":"user","message":{"role":"user","content":"continue please"}} +EOF +echo "{\"transcript_path\": \"$TEST_DIR/check-before-stop.jsonl\", \"stop_hook_active\": false}" | "$HOOK" 2>/dev/null +exit_code=$? +test_result "pnpm check before stop - should block" "block" "$exit_code" + +# Test 5: pnpm check executed AFTER last stop - should allow +echo "Test 5: pnpm check after last stop" +cat > "$TEST_DIR/check-after-stop.jsonl" << 'EOF' +{"type":"result","subtype":"stop"} +{"type":"user","message":{"role":"user","content":"continue please"}} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"tool_use","name":"Bash","input":{"command":"pnpm check"}}]}} +{"type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"ok"}]}} +EOF +echo "{\"transcript_path\": \"$TEST_DIR/check-after-stop.jsonl\", \"stop_hook_active\": false}" | "$HOOK" 2>/dev/null +exit_code=$? +test_result "pnpm check after stop - should allow" "allow" "$exit_code" + +# Test 6: stop_hook_active=true - should always allow (prevent infinite loop) +echo "Test 6: stop_hook_active=true (infinite loop prevention)" +echo "{\"transcript_path\": \"$TEST_DIR/no-check.jsonl\", \"stop_hook_active\": true}" | "$HOOK" 2>/dev/null +exit_code=$? +test_result "stop_hook_active=true - should allow" "allow" "$exit_code" + +# Cleanup +rm -rf "$TEST_DIR" + +echo "" +echo "Results: $PASS passed, $FAIL failed" +[ "$FAIL" -eq 0 ] && exit 0 || exit 1 diff --git a/.claude/hooks/extract-qa.py b/.claude/hooks/extract-qa.py new file mode 100755 index 000000000..78611e709 --- /dev/null +++ b/.claude/hooks/extract-qa.py @@ -0,0 +1,228 @@ +#!/usr/bin/env python3 +""" +Extract Q&A pairs from Claude Code session files. +Finds AskUserQuestion tool calls and their corresponding user answers. + +Usage: + python extract-qa.py [--output-dir ] [--format md|json|both] + +Or as a hook: + Receives session data via stdin (hook context) +""" + +import json +import sys +import os +import argparse +from datetime import datetime +from pathlib import Path + + +def extract_qa_from_session(session_lines: list[str]) -> list[dict]: + """Extract Q&A pairs from session JSONL lines.""" + qa_pairs = [] + tool_use_map = {} # Map tool_use_id to question data + + for line in session_lines: + if not line.strip(): + continue + try: + entry = json.loads(line) + except json.JSONDecodeError: + continue + + # Look for AskUserQuestion tool_use + message = entry.get("message", {}) + content = message.get("content", []) + + if isinstance(content, list): + for item in content: + if isinstance(item, dict): + # Found a tool_use for AskUserQuestion + if item.get("type") == "tool_use" and item.get("name") == "AskUserQuestion": + tool_id = item.get("id") + questions = item.get("input", {}).get("questions", []) + timestamp = entry.get("timestamp") + if tool_id and questions: + tool_use_map[tool_id] = { + "questions": questions, + "timestamp": timestamp + } + + # Found a tool_result - check if it's for an AskUserQuestion + if item.get("type") == "tool_result": + tool_id = item.get("tool_use_id") + if tool_id and tool_id in tool_use_map: + # Get answers from toolUseResult + tool_result = entry.get("toolUseResult", {}) + answers = tool_result.get("answers", {}) + + if answers: + question_data = tool_use_map[tool_id] + qa_pairs.append({ + "timestamp": question_data["timestamp"], + "answer_timestamp": entry.get("timestamp"), + "questions": question_data["questions"], + "answers": answers + }) + + return qa_pairs + + +def format_qa_markdown(qa_pairs: list[dict], session_id: str = None) -> str: + """Format Q&A pairs as markdown.""" + lines = ["# Claude Code Q&A Extraction\n"] + + if session_id: + lines.append(f"Session: `{session_id}`\n") + + lines.append(f"Extracted: {datetime.now().isoformat()}\n") + lines.append("---\n") + + for i, qa in enumerate(qa_pairs, 1): + lines.append(f"## Q&A #{i}\n") + + if qa.get("timestamp"): + lines.append(f"*Asked: {qa['timestamp']}*\n") + + for question in qa.get("questions", []): + q_text = question.get("question", "Unknown question") + header = question.get("header", "") + options = question.get("options", []) + answer = qa.get("answers", {}).get(q_text, "No answer recorded") + + lines.append(f"### {header}: {q_text}\n") + + if options: + lines.append("**Options:**") + for opt in options: + label = opt.get("label", "") + desc = opt.get("description", "") + marker = "**[Selected]**" if label == answer else "" + lines.append(f"- {label}: {desc} {marker}") + lines.append("") + + lines.append(f"**Answer:** {answer}\n") + + lines.append("---\n") + + return "\n".join(lines) + + +def format_qa_json(qa_pairs: list[dict], session_id: str = None) -> str: + """Format Q&A pairs as JSON.""" + output = { + "session_id": session_id, + "extracted_at": datetime.now().isoformat(), + "qa_pairs": qa_pairs + } + return json.dumps(output, indent=2) + + +def process_session_file(filepath: str, output_dir: str = None, output_format: str = "md"): + """Process a single session file and extract Q&A pairs.""" + with open(filepath, "r") as f: + lines = f.readlines() + + qa_pairs = extract_qa_from_session(lines) + + if not qa_pairs: + print(f"No Q&A pairs found in {filepath}", file=sys.stderr) + return None + + session_id = Path(filepath).stem + + if output_dir: + os.makedirs(output_dir, exist_ok=True) + base_name = f"qa-{session_id}-{datetime.now().strftime('%Y%m%d-%H%M%S')}" + + if output_format in ("md", "both"): + md_path = os.path.join(output_dir, f"{base_name}.md") + with open(md_path, "w") as f: + f.write(format_qa_markdown(qa_pairs, session_id)) + print(f"Markdown saved to: {md_path}", file=sys.stderr) + + if output_format in ("json", "both"): + json_path = os.path.join(output_dir, f"{base_name}.json") + with open(json_path, "w") as f: + f.write(format_qa_json(qa_pairs, session_id)) + print(f"JSON saved to: {json_path}", file=sys.stderr) + else: + # Output to stdout + if output_format == "json": + print(format_qa_json(qa_pairs, session_id)) + else: + print(format_qa_markdown(qa_pairs, session_id)) + + return qa_pairs + + +def process_hook_input(): + """Process input when running as a Claude Code hook.""" + # Read hook context from stdin + try: + hook_input = json.load(sys.stdin) + except json.JSONDecodeError: + print("Error: Invalid JSON input from hook", file=sys.stderr) + sys.exit(1) + + session_id = hook_input.get("session_id") + cwd = hook_input.get("cwd", os.getcwd()) + + # PreCompact hook provides transcript_path directly + transcript_path = hook_input.get("transcript_path") + + if transcript_path: + # Expand ~ in path + session_file = os.path.expanduser(transcript_path) + else: + # Fallback: Find the session file from session_id + home = os.path.expanduser("~") + project_path = cwd.replace("/", "-").lstrip("-") + session_dir = os.path.join(home, ".claude", "projects", f"-{project_path}") + session_file = os.path.join(session_dir, f"{session_id}.jsonl") + + if not os.path.exists(session_file): + print(f"Session file not found: {session_file}", file=sys.stderr) + sys.exit(0) # Don't fail the hook + + # Extract to project's .claude directory + output_dir = os.path.join(cwd, ".claude", "qa-extractions") + qa_pairs = process_session_file(session_file, output_dir, "md") + + # Return success for hook + if qa_pairs: + print(f"Extracted {len(qa_pairs)} Q&A pair(s) before compaction", file=sys.stderr) + + +def main(): + parser = argparse.ArgumentParser(description="Extract Q&A pairs from Claude Code sessions") + parser.add_argument("session_file", nargs="?", help="Path to session .jsonl file") + parser.add_argument("--output-dir", "-o", help="Directory to save output files") + parser.add_argument("--format", "-f", choices=["md", "json", "both"], default="md", + help="Output format (default: md)") + parser.add_argument("--hook", action="store_true", help="Run in hook mode (read from stdin)") + + args = parser.parse_args() + + # If explicit --hook flag, run in hook mode + if args.hook: + process_hook_input() + return + + # If session file provided, process it directly + if args.session_file: + process_session_file(args.session_file, args.output_dir, args.format) + return + + # No args - check if running as a hook with stdin + if not sys.stdin.isatty(): + process_hook_input() + return + + parser.print_help() + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 86998d7e4..db796bf80 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,13 +1,57 @@ { "permissions": { "allow": [ - "Bash(npm test:*)", "Bash(ls:*)", + "Bash(cat:*)", "Bash(echo:*)", + "Bash(find:*)", + "Bash(grep:*)", + "Bash(chmod:*)", + "Bash(file-tree)", + "Bash(query)", + "Bash(node --version)", + "Bash(timeout 20 node:*)", + "Bash(timeout 30 node:*)", + "Bash(timeout 60 node:*)", + "Bash(npm test:*)", "Bash(pnpm run build:*)", + "Bash(pnpm run lint:*)", + "Bash(pnpm lint:*)", + "Bash(pnpm check:*)", "Bash(pnpm test:*)", + "Bash(pnpm test:unit:*)", + "Bash(pnpm test:single:*)", + "Bash(pnpm run test:unit:*)", + "Bash(pnpm run test:single:*)", + "Bash(pnpm run test:postgres:*)", + "Bash(timeout 30 pnpm test:single:*)", + "Bash(timeout 60 pnpm test:single:*)", + "Bash(pnpm summaries build:*)", + "Bash(pnpm summaries:*)", + "Bash(timeout 30 pnpm nextgen:*)", + "Bash(timeout 60 pnpm nextgen:*)", + "Bash(timeout 180 pnpm run nextgen:*)", + "WebSearch", + "WebFetch(domain:github.com)", + "WebFetch(domain:code.claude.com)", + "WebFetch(domain:docs.anthropic.com)", + "WebFetch(domain:docs.docker.com)", + "WebFetch(domain:docs.cloud.google.com)", + "WebFetch(domain:docs.github.com)", + "WebFetch(domain:docs.gitlab.com)", + "WebFetch(domain:angular.dev)", + "WebFetch(domain:ai-sdk.dev)", + "WebFetch(domain:fastify.dev)", + "WebFetch(domain:zod.dev)", + "WebFetch(domain:biomejs.dev)", + "WebFetch(domain:ui.shadcn.com)", + "mcp__ide__getDiagnostics", + "mcp__perplexity__search" ], "deny": [], "ask": [] - } + }, + "enabledMcpjsonServers": [ + "perplexity" + ] } diff --git a/.dockerignore b/.dockerignore index c6d4be239..54c5bdca4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,17 @@ node_modules dist bin .venv -.typedai/ +.typedai/_docs +.typedai/agents +.typedai/aider +.typedai/cli +.typedai/codeTask +.typedai/docs +.typedai/docs-orig +.typedai/dts +.typedai/filestore +.typedai/github +.typedai/gitlab +.typedai/runtime +.typedai/users +.typedai/vibe diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0245ea67f..0ee2cb59c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ jobs: unit-tests: name: Backend (Unit Tests) runs-on: ubuntu-latest + env: + NODE_OPTIONS: --max-old-space-size=6144 steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 @@ -27,6 +29,9 @@ jobs: run: pnpm install --save-dev @biomejs/cli-linux-x64 || true - name: Lint (server) run: pnpm run lint:ci + # Getting OOM errors, so pre-generate and commit + # - name: Generate function schemas + # run: pnpm functionSchemas - name: Run unit tests (server) run: pnpm run test:unit @@ -53,10 +58,10 @@ jobs: runs-on: ubuntu-latest services: postgres: - image: postgres:15-alpine + image: postgres:16-alpine env: - POSTGRES_USER: user - POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres POSTGRES_DB: test ports: - 5432:5432 diff --git a/.gitignore b/.gitignore index 93d57c458..da7e4d641 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,17 @@ firestore-debug.log .pm2/ bench /benchmarks +.tmp/ +llmCall.json +kb/ +template-repos/ +.claude/todos/ +.claude/projects/ +.claude/debug/ +.claude/statsig/ +.claude/hooks/__pycache__/ +.claude/.credentials.json +.claude.json +.claude.json.backup +.claude/history.jsonl +.claude/stats-cache.json diff --git a/.mocharc.cjs b/.mocharc.cjs new file mode 100644 index 000000000..800363458 --- /dev/null +++ b/.mocharc.cjs @@ -0,0 +1,17 @@ +/** + * Mocha Configuration + * + * Dynamically selects reporter based on TEST_REPORTER environment variable: + * - Default (unset): failure-only reporter for CI/LLM consumption + * - TEST_REPORTER=spec: standard spec reporter for local development + * + * Usage: + * pnpm test # Uses failure-only reporter + * TEST_REPORTER=spec pnpm test # Uses standard spec reporter + */ + +'use strict'; + +module.exports = { + reporter: process.env.TEST_REPORTER || './src/test/failureOnlyReporter.cjs', +}; diff --git a/.typedai.json b/.typedai.json index f7b2e0c4c..f9ab0d7c3 100644 --- a/.typedai.json +++ b/.typedai.json @@ -9,11 +9,16 @@ "staticAnalysis": "node build.js lint", "test": "node build.js test", "devBranch": "main", - "indexDocs": [ + "check": "pnpm check", + "summaries": [ "src/**/*.ts", "frontend/src/**/*.ts", "bin/**", "shared/**" - ] + ], + "fileSystemTree": { + "exclude": [".cache", ".local", ".npm", ".pnpm-store", ".typedai", "frontend/dist"], + "collapse": ["variables", "test/filesystem", "resources/codeReview"] + } } ] diff --git a/.typedai/functions/src/agent/agentFeedback.json b/.typedai/functions/src/agent/agentFeedback.json new file mode 100644 index 000000000..02203a2a9 --- /dev/null +++ b/.typedai/functions/src/agent/agentFeedback.json @@ -0,0 +1,15 @@ +{ + "AgentFeedback_requestFeedback": { + "class": "AgentFeedback", + "name": "AgentFeedback_requestFeedback", + "description": "Request feedback/interaction from a supervisor when a decision or approval needs to be made, or additional details are required, before proceeding with the plan.\nMinimise calls to requestFeedback by attempting/verifying possible options first.", + "parameters": [ + { + "index": 0, + "name": "request", + "type": "string", + "description": "Notes on what additional information/decision is required. Be specific on what you have been doing up to this point, and provide relevant information to help with the decision/feedback." + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/agentFunctions.json b/.typedai/functions/src/agent/agentFunctions.json new file mode 100644 index 000000000..506debfaf --- /dev/null +++ b/.typedai/functions/src/agent/agentFunctions.json @@ -0,0 +1,62 @@ +{ + "Agent_completed": { + "class": "Agent", + "name": "Agent_completed", + "description": "Notifies that the user request has completed and there is no more work to be done, or that no more useful progress can be made with the functions.", + "parameters": [ + { + "index": 0, + "name": "note", + "type": "string", + "description": "A detailed description that answers/completes the user request." + } + ] + }, + "Agent_saveMemory": { + "class": "Agent", + "name": "Agent_saveMemory", + "description": "Stores content to your working memory, and continues on with the plan. You can assume the memory element now contains this key and content.", + "parameters": [ + { + "index": 0, + "name": "key", + "type": "string", + "description": "A descriptive identifier (alphanumeric and underscores allowed, under 30 characters) for the new memory contents explaining the source of the content. This must not exist in the current memory." + }, + { + "index": 1, + "name": "content", + "type": "string", + "description": "The plain text contents to store in the working memory" + } + ] + }, + "Agent_deleteMemory": { + "class": "Agent", + "name": "Agent_deleteMemory", + "description": "Updates existing content in your working memory, and continues on with the plan. You can assume the memory element now contains this key and content.\nNote this will over-write any existing memory content", + "parameters": [ + { + "index": 0, + "name": "key", + "type": "string", + "description": "An existing key in the memory contents to update the contents of." + } + ] + }, + "Agent_getMemory": { + "class": "Agent", + "name": "Agent_getMemory", + "description": "Retrieves contents from memory", + "parameters": [ + { + "index": 0, + "name": "key", + "type": "string", + "description": "An existing key in the memory to retrieve." + } + ], + "returnType": "string", + "returns": "The memory contents" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/autonomous/functions/agentFeedback.json b/.typedai/functions/src/agent/autonomous/functions/agentFeedback.json new file mode 100644 index 000000000..a5a2e3992 --- /dev/null +++ b/.typedai/functions/src/agent/autonomous/functions/agentFeedback.json @@ -0,0 +1,28 @@ +{ + "AgentFeedback_requestFeedback": { + "class": "AgentFeedback", + "name": "AgentFeedback_requestFeedback", + "description": "Request feedback/interaction from a supervisor when a decision or approval needs to be made, or additional details are required, before proceeding with the plan.\nMinimise calls to requestFeedback by attempting/verifying possible options first.", + "parameters": [ + { + "index": 0, + "name": "request", + "type": "string", + "description": "Notes on what additional information/decision is required. Be specific on what you have been doing up to this point, and provide relevant information to help with the decision/feedback." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "request": { + "type": "string", + "description": "Notes on what additional information/decision is required. Be specific on what you have been doing up to this point, and provide relevant information to help with the decision/feedback." + } + }, + "required": [ + "request" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/autonomous/functions/agentFunctions.json b/.typedai/functions/src/agent/autonomous/functions/agentFunctions.json new file mode 100644 index 000000000..ecb0b7a29 --- /dev/null +++ b/.typedai/functions/src/agent/autonomous/functions/agentFunctions.json @@ -0,0 +1,122 @@ +{ + "Agent_completed": { + "class": "Agent", + "name": "Agent_completed", + "description": "Notifies that the user request has completed and there is no more work to be done, or that no more useful progress can be made with the functions.", + "parameters": [ + { + "index": 0, + "name": "note", + "type": "string", + "description": "A detailed description that answers/completes the user request using Markdown formatting." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "note": { + "type": "string", + "description": "A detailed description that answers/completes the user request using Markdown formatting." + } + }, + "required": [ + "note" + ], + "additionalProperties": false + } + }, + "Agent_memory": { + "class": "Agent", + "name": "Agent_memory", + "description": "Interacts with the memory entries", + "parameters": [ + { + "index": 0, + "name": "operation", + "type": "\"SAVE\" | \"DELETE\" | \"GET\"", + "description": "'SAVE', 'DELETE', or 'GET'" + }, + { + "index": 1, + "name": "key", + "type": "string", + "description": "The memory key to save, delete, or get" + }, + { + "index": 2, + "name": "content", + "type": "string", + "description": "The content to save to the memory (when operation is 'SAVE')", + "optional": true + }, + { + "index": 3, + "name": "description", + "type": "string", + "description": "A description identifiying the source of the content (when operation is 'SAVE')", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "operation": { + "type": "string", + "enum": [ + "SAVE", + "DELETE", + "GET" + ], + "description": "'SAVE', 'DELETE', or 'GET'" + }, + "key": { + "type": "string", + "description": "The memory key to save, delete, or get" + }, + "content": { + "type": "string", + "description": "The content to save to the memory (when operation is 'SAVE')" + }, + "description": { + "type": "string", + "description": "A description identifiying the source of the content (when operation is 'SAVE')" + } + }, + "required": [ + "operation", + "key" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "Void, or string when operation is 'GET'" + }, + "Agent_countTextTokens": { + "class": "Agent", + "name": "Agent_countTextTokens", + "description": "Counts the number of tokens in the provided text", + "parameters": [ + { + "index": 0, + "name": "text", + "type": "string", + "description": "The text to count tokens for" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "The text to count tokens for" + } + }, + "required": [ + "text" + ], + "additionalProperties": false + }, + "returnType": "number", + "returns": "The number of tokens in the text" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/autonomous/functions/fileSystemTree.json b/.typedai/functions/src/agent/autonomous/functions/fileSystemTree.json new file mode 100644 index 000000000..8d7f1cd34 --- /dev/null +++ b/.typedai/functions/src/agent/autonomous/functions/fileSystemTree.json @@ -0,0 +1,70 @@ +{ + "FileSystemTree_collapseFolder": { + "class": "FileSystemTree", + "name": "FileSystemTree_collapseFolder", + "description": "Collapses a folder in the FileSystemTree view to reduce LLM token usage. Any collapsed child folders are removed from the collapsed list.", + "parameters": [ + { + "index": 0, + "name": "folderPath", + "type": "string", + "description": "The folder to collapse in the File System tree view" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "folderPath": { + "type": "string", + "description": "The folder to collapse in the File System tree view" + } + }, + "required": [ + "folderPath" + ], + "additionalProperties": false + }, + "returnType": "boolean", + "returns": "If the node was collapsed, i.e. the folderPath exists and is a folder" + }, + "FileSystemTree_expandAll": { + "class": "FileSystemTree", + "name": "FileSystemTree_expandAll", + "description": "Expands all directories in the file system tree view", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "FileSystemTree_expandFolder": { + "class": "FileSystemTree", + "name": "FileSystemTree_expandFolder", + "description": "Expands a folder in the FileSystemTree view when needing to view a relevant part of the file system", + "parameters": [ + { + "index": 0, + "name": "folderPath", + "type": "string", + "description": "The folder to expand in the File System tree view. If no value is provided, then all folders are expanded and always returns true." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "folderPath": { + "type": "string", + "description": "The folder to expand in the File System tree view. If no value is provided, then all folders are expanded and always returns true." + } + }, + "required": [ + "folderPath" + ], + "additionalProperties": false + }, + "returnType": "boolean", + "returns": "If the node was expanded, i.e. the folderPath exists and is a folder and was previously collapsed" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/autonomous/functions/liveFiles.json b/.typedai/functions/src/agent/autonomous/functions/liveFiles.json new file mode 100644 index 000000000..2c6b1b873 --- /dev/null +++ b/.typedai/functions/src/agent/autonomous/functions/liveFiles.json @@ -0,0 +1,60 @@ +{ + "LiveFiles_addFiles": { + "class": "LiveFiles", + "name": "LiveFiles_addFiles", + "description": "Add files which will always have their current contents displayed in the section (increasing LLM token costs)", + "parameters": [ + { + "index": 0, + "name": "files", + "type": "string[]", + "description": "The files to always include the current contents of in the prompt" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The files to always include the current contents of in the prompt" + } + }, + "required": [ + "files" + ], + "additionalProperties": false + } + }, + "LiveFiles_removeFiles": { + "class": "LiveFiles", + "name": "LiveFiles_removeFiles", + "description": "Remove files from the section which are no longer required to reduce LLM token costs.", + "parameters": [ + { + "index": 0, + "name": "files", + "type": "string[]", + "description": "The files to remove" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The files to remove" + } + }, + "required": [ + "files" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/liveFiles.json b/.typedai/functions/src/agent/liveFiles.json new file mode 100644 index 000000000..b15486144 --- /dev/null +++ b/.typedai/functions/src/agent/liveFiles.json @@ -0,0 +1,28 @@ +{ + "LiveFiles_addFiles": { + "class": "LiveFiles", + "name": "LiveFiles_addFiles", + "description": "Add files which will always have their current contents displayed in the section (increasing LLM token costs)", + "parameters": [ + { + "index": 0, + "name": "files", + "type": "string[]", + "description": "The files to always include the current contents of in the prompt" + } + ] + }, + "LiveFiles_removeFiles": { + "class": "LiveFiles", + "name": "LiveFiles_removeFiles", + "description": "Remove files from the section which are no longer required to reduce LLM token costs.", + "parameters": [ + { + "index": 0, + "name": "files", + "type": "string[]", + "description": "The files to remove" + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/orchestrator/functions/agentFeedback.json b/.typedai/functions/src/agent/orchestrator/functions/agentFeedback.json new file mode 100644 index 000000000..02203a2a9 --- /dev/null +++ b/.typedai/functions/src/agent/orchestrator/functions/agentFeedback.json @@ -0,0 +1,15 @@ +{ + "AgentFeedback_requestFeedback": { + "class": "AgentFeedback", + "name": "AgentFeedback_requestFeedback", + "description": "Request feedback/interaction from a supervisor when a decision or approval needs to be made, or additional details are required, before proceeding with the plan.\nMinimise calls to requestFeedback by attempting/verifying possible options first.", + "parameters": [ + { + "index": 0, + "name": "request", + "type": "string", + "description": "Notes on what additional information/decision is required. Be specific on what you have been doing up to this point, and provide relevant information to help with the decision/feedback." + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/orchestrator/functions/agentFunctions.json b/.typedai/functions/src/agent/orchestrator/functions/agentFunctions.json new file mode 100644 index 000000000..506debfaf --- /dev/null +++ b/.typedai/functions/src/agent/orchestrator/functions/agentFunctions.json @@ -0,0 +1,62 @@ +{ + "Agent_completed": { + "class": "Agent", + "name": "Agent_completed", + "description": "Notifies that the user request has completed and there is no more work to be done, or that no more useful progress can be made with the functions.", + "parameters": [ + { + "index": 0, + "name": "note", + "type": "string", + "description": "A detailed description that answers/completes the user request." + } + ] + }, + "Agent_saveMemory": { + "class": "Agent", + "name": "Agent_saveMemory", + "description": "Stores content to your working memory, and continues on with the plan. You can assume the memory element now contains this key and content.", + "parameters": [ + { + "index": 0, + "name": "key", + "type": "string", + "description": "A descriptive identifier (alphanumeric and underscores allowed, under 30 characters) for the new memory contents explaining the source of the content. This must not exist in the current memory." + }, + { + "index": 1, + "name": "content", + "type": "string", + "description": "The plain text contents to store in the working memory" + } + ] + }, + "Agent_deleteMemory": { + "class": "Agent", + "name": "Agent_deleteMemory", + "description": "Updates existing content in your working memory, and continues on with the plan. You can assume the memory element now contains this key and content.\nNote this will over-write any existing memory content", + "parameters": [ + { + "index": 0, + "name": "key", + "type": "string", + "description": "An existing key in the memory contents to update the contents of." + } + ] + }, + "Agent_getMemory": { + "class": "Agent", + "name": "Agent_getMemory", + "description": "Retrieves contents from memory", + "parameters": [ + { + "index": 0, + "name": "key", + "type": "string", + "description": "An existing key in the memory to retrieve." + } + ], + "returnType": "string", + "returns": "The memory contents" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/agent/orchestrator/functions/liveFiles.json b/.typedai/functions/src/agent/orchestrator/functions/liveFiles.json new file mode 100644 index 000000000..b15486144 --- /dev/null +++ b/.typedai/functions/src/agent/orchestrator/functions/liveFiles.json @@ -0,0 +1,28 @@ +{ + "LiveFiles_addFiles": { + "class": "LiveFiles", + "name": "LiveFiles_addFiles", + "description": "Add files which will always have their current contents displayed in the section (increasing LLM token costs)", + "parameters": [ + { + "index": 0, + "name": "files", + "type": "string[]", + "description": "The files to always include the current contents of in the prompt" + } + ] + }, + "LiveFiles_removeFiles": { + "class": "LiveFiles", + "name": "LiveFiles_removeFiles", + "description": "Remove files from the section which are no longer required to reduce LLM token costs.", + "parameters": [ + { + "index": 0, + "name": "files", + "type": "string[]", + "description": "The files to remove" + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/cli/query.json b/.typedai/functions/src/cli/query.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/.typedai/functions/src/cli/query.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.typedai/functions/src/functionSchema/functionSchemaParser.test.json b/.typedai/functions/src/functionSchema/functionSchemaParser.test.json new file mode 100644 index 000000000..ed2e9e9ac --- /dev/null +++ b/.typedai/functions/src/functionSchema/functionSchemaParser.test.json @@ -0,0 +1,194 @@ +{ + "TestClass_simpleMethod": { + "class": "TestClass", + "name": "TestClass_simpleMethod", + "description": "Simple method without parameters", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "TestClass_methodWithVoidReturn": { + "class": "TestClass", + "name": "TestClass_methodWithVoidReturn", + "description": "Method with void return type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "TestClass_methodWithPromiseVoidReturn": { + "class": "TestClass", + "name": "TestClass_methodWithPromiseVoidReturn", + "description": "Method with Promise return type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "TestClass_methodWithParams": { + "class": "TestClass", + "name": "TestClass_methodWithParams", + "description": "Method with parameters", + "parameters": [ + { + "index": 0, + "name": "arg1", + "type": "string", + "description": "First argument" + }, + { + "index": 1, + "name": "arg2", + "type": "number", + "description": "Second argument" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "arg1": { + "type": "string", + "description": "First argument" + }, + "arg2": { + "type": "number", + "description": "Second argument" + } + }, + "required": [ + "arg1", + "arg2" + ], + "additionalProperties": false + } + }, + "TestClass_methodWithOptionalParam": { + "class": "TestClass", + "name": "TestClass_methodWithOptionalParam", + "description": "Method with optional parameter and no types or dash in jsdoc", + "parameters": [ + { + "index": 0, + "name": "arg1", + "type": "string", + "description": "First argument" + }, + { + "index": 1, + "name": "arg2", + "type": "number", + "description": "Optional second argument", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "arg1": { + "type": "string", + "description": "First argument" + }, + "arg2": { + "type": "number", + "description": "Optional second argument" + } + }, + "required": [ + "arg1" + ], + "additionalProperties": false + } + }, + "TestClass_methodWithHiddenParam": { + "class": "TestClass", + "name": "TestClass_methodWithHiddenParam", + "description": "Method with a parameter without a param tag, which is hidden from the LLM", + "parameters": [ + { + "index": 0, + "name": "arg1", + "type": "string", + "description": "First argument" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "arg1": { + "type": "string", + "description": "First argument" + } + }, + "required": [ + "arg1" + ], + "additionalProperties": false + } + }, + "TestClass_methodWithReturnType": { + "class": "TestClass", + "name": "TestClass_methodWithReturnType", + "description": "Method with return type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "A string value" + }, + "TestClass_methodReturnsPromise": { + "class": "TestClass", + "name": "TestClass_methodReturnsPromise", + "description": "Method with Promise return type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "A string value" + }, + "TestClass_methodWithComplexReturnType": { + "class": "TestClass", + "name": "TestClass_methodWithComplexReturnType", + "description": "Method with complex return type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "Record", + "returns": "A record of string keys and number values" + }, + "TestClass_methodWithPromiseComplexReturnType": { + "class": "TestClass", + "name": "TestClass_methodWithPromiseComplexReturnType", + "description": "Method with Promise and complex return type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "Record", + "returns": "A promise that resolves to a record of string keys and number values" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functionSchema/functionSchemaParserWithTypes.test.json b/.typedai/functions/src/functionSchema/functionSchemaParserWithTypes.test.json new file mode 100644 index 000000000..aecabcd1e --- /dev/null +++ b/.typedai/functions/src/functionSchema/functionSchemaParserWithTypes.test.json @@ -0,0 +1,94 @@ +{ + "TestClassWithTypes_getProject": { + "class": "TestClassWithTypes", + "name": "TestClassWithTypes_getProject", + "description": "Method that returns a custom interface type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "SimpleProject", + "returns": "The project details", + "typeDefinitions": [ + { + "name": "SimpleProject", + "description": "A simple project interface for testing", + "properties": [ + { + "name": "id", + "type": "number", + "optional": false, + "description": "The project ID" + }, + { + "name": "name", + "type": "string", + "optional": false, + "description": "The project name" + }, + { + "name": "description", + "type": "string | null", + "optional": false, + "description": "Optional description" + }, + { + "name": "tags", + "type": "string[]", + "optional": true, + "description": "List of tags" + } + ] + } + ] + }, + "TestClassWithTypes_getProjects": { + "class": "TestClassWithTypes", + "name": "TestClassWithTypes_getProjects", + "description": "Method that returns an array of custom interface type", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "SimpleProject[]", + "returns": "Array of projects", + "typeDefinitions": [ + { + "name": "SimpleProject", + "description": "A simple project interface for testing", + "properties": [ + { + "name": "id", + "type": "number", + "optional": false, + "description": "The project ID" + }, + { + "name": "name", + "type": "string", + "optional": false, + "description": "The project name" + }, + { + "name": "description", + "type": "string | null", + "optional": false, + "description": "Optional description" + }, + { + "name": "tags", + "type": "string[]", + "optional": true, + "description": "List of tags" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/airflow.json b/.typedai/functions/src/functions/airflow.json new file mode 100644 index 000000000..f4cdb632e --- /dev/null +++ b/.typedai/functions/src/functions/airflow.json @@ -0,0 +1,130 @@ +{ + "AirflowClient_fetchDagRuns": { + "class": "AirflowClient", + "name": "AirflowClient_fetchDagRuns", + "description": "Fetches DAG runs for the given DAG ID and Google Cloud Project.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID where the Composer environment lives." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG to fetch runs for." + }, + { + "index": 2, + "name": "limit", + "type": "number", + "description": "The maximum number of runs to fetch. (Defaults to 20)", + "optional": true + } + ] + }, + "AirflowClient_fetchTaskInstances": { + "class": "AirflowClient", + "name": "AirflowClient_fetchTaskInstances", + "description": "Fetches all task instances for a specific DAG run.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG." + }, + { + "index": 2, + "name": "dagRunId", + "type": "string", + "description": "The ID of the specific DAG run." + } + ], + "returnType": "TaskInstance[]", + "returns": "A promise that resolves to an array of task instance objects." + }, + "AirflowClient_fetchTaskLog": { + "class": "AirflowClient", + "name": "AirflowClient_fetchTaskLog", + "description": "Fetches the raw log for a specific task attempt.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG." + }, + { + "index": 2, + "name": "dagRunId", + "type": "string", + "description": "The ID of the DAG run." + }, + { + "index": 3, + "name": "taskId", + "type": "string", + "description": "The ID of the task." + }, + { + "index": 4, + "name": "tryNumber", + "type": "number", + "description": "The attempt number of the task." + } + ], + "returnType": "string", + "returns": "A promise that resolves to the raw log content as a string." + }, + "AirflowClient_fetchDagDetails": { + "class": "AirflowClient", + "name": "AirflowClient_fetchDagDetails", + "description": "Fetches detailed metadata for a specific DAG.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG." + } + ], + "returnType": "any", + "returns": "A promise that resolves to the DAG detail object." + }, + "AirflowClient_fetchAirflowConfig": { + "class": "AirflowClient", + "name": "AirflowClient_fetchAirflowConfig", + "description": "Fetches the current Airflow configuration (airflow.cfg).", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + } + ], + "returnType": "any", + "returns": "A promise that resolves to the Airflow configuration object." + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/cloud/google/bigquery.json b/.typedai/functions/src/functions/cloud/google/bigquery.json new file mode 100644 index 000000000..3eb7e3395 --- /dev/null +++ b/.typedai/functions/src/functions/cloud/google/bigquery.json @@ -0,0 +1,76 @@ +{ + "BigQuery_query": { + "class": "BigQuery", + "name": "BigQuery_query", + "description": "Run a BigQuery query and return the results.", + "parameters": [ + { + "index": 0, + "name": "sqlQuery", + "type": "string", + "description": "The query to run" + }, + { + "index": 1, + "name": "location", + "type": "string", + "description": "The (multi)region to run the query in. eg. us, us-central1" + }, + { + "index": 2, + "name": "projectId", + "type": "string", + "description": "The Google Cloud project id to run the query from. Defaults to the GCLOUD_PROJECT environment variable" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "sqlQuery": { + "type": "string", + "description": "The query to run" + }, + "location": { + "type": "string", + "description": "The (multi)region to run the query in. eg. us, us-central1" + }, + "projectId": { + "type": "string", + "description": "The Google Cloud project id to run the query from. Defaults to the GCLOUD_PROJECT environment variable" + } + }, + "required": [ + "sqlQuery", + "location", + "projectId" + ], + "additionalProperties": false + } + }, + "BigQuery_getTableSchema": { + "class": "BigQuery", + "name": "BigQuery_getTableSchema", + "description": "Get the schema of a BigQuery table.", + "parameters": [ + { + "index": 0, + "name": "tableId", + "type": "string", + "description": "Table id in the format project_id:dataset.table" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Table id in the format project_id:dataset.table" + } + }, + "required": [ + "tableId" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/cloud/google/composerAirflow.json b/.typedai/functions/src/functions/cloud/google/composerAirflow.json new file mode 100644 index 000000000..fc490c69b --- /dev/null +++ b/.typedai/functions/src/functions/cloud/google/composerAirflow.json @@ -0,0 +1,145 @@ +{ + "ComposerAirflowClient_fetchDags": { + "class": "ComposerAirflowClient", + "name": "ComposerAirflowClient_fetchDags", + "description": "Fetches detailed metadata for a specific DAG.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + } + ], + "returnType": "any", + "returns": "A promise that resolves to the DAG detail object." + }, + "ComposerAirflowClient_fetchDagRuns": { + "class": "ComposerAirflowClient", + "name": "ComposerAirflowClient_fetchDagRuns", + "description": "Fetches DAG runs for the given DAG ID and Google Cloud Project.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID where the Composer environment lives." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG to fetch runs for." + }, + { + "index": 2, + "name": "limit", + "type": "number", + "description": "The maximum number of runs to fetch. (Defaults to 20)", + "optional": true + } + ] + }, + "ComposerAirflowClient_fetchTaskInstances": { + "class": "ComposerAirflowClient", + "name": "ComposerAirflowClient_fetchTaskInstances", + "description": "Fetches all task instances for a specific DAG run.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG." + }, + { + "index": 2, + "name": "dagRunId", + "type": "string", + "description": "The ID of the specific DAG run." + } + ], + "returnType": "TaskInstance[]", + "returns": "A promise that resolves to an array of task instance objects." + }, + "ComposerAirflowClient_fetchTaskLog": { + "class": "ComposerAirflowClient", + "name": "ComposerAirflowClient_fetchTaskLog", + "description": "Fetches the raw log for a specific task attempt.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG." + }, + { + "index": 2, + "name": "dagRunId", + "type": "string", + "description": "The ID of the DAG run." + }, + { + "index": 3, + "name": "taskId", + "type": "string", + "description": "The ID of the task." + }, + { + "index": 4, + "name": "tryNumber", + "type": "number", + "description": "The attempt number of the task." + } + ], + "returnType": "string", + "returns": "A promise that resolves to the raw log content as a string." + }, + "ComposerAirflowClient_fetchDagDetails": { + "class": "ComposerAirflowClient", + "name": "ComposerAirflowClient_fetchDagDetails", + "description": "Fetches detailed metadata for a specific DAG.", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + }, + { + "index": 1, + "name": "dagId", + "type": "string", + "description": "The ID of the DAG." + } + ], + "returnType": "any", + "returns": "A promise that resolves to the DAG detail object." + }, + "ComposerAirflowClient_fetchAirflowConfig": { + "class": "ComposerAirflowClient", + "name": "ComposerAirflowClient_fetchAirflowConfig", + "description": "Fetches the current Airflow configuration (airflow.cfg).", + "parameters": [ + { + "index": 0, + "name": "gcpProjectId", + "type": "string", + "description": "The Google Cloud Project ID." + } + ], + "returnType": "any", + "returns": "A promise that resolves to the Airflow configuration object." + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/cloud/google/google-cloud.json b/.typedai/functions/src/functions/cloud/google/google-cloud.json new file mode 100644 index 000000000..f9285bc6b --- /dev/null +++ b/.typedai/functions/src/functions/cloud/google/google-cloud.json @@ -0,0 +1,165 @@ +{ + "GoogleCloud_getCloudLoggingLogs": { + "class": "GoogleCloud", + "name": "GoogleCloud_getCloudLoggingLogs", + "description": "Gets the logs from Google Cloud Logging.\nEither provide freshness or provide dateFromIso and/or dateToIso.\nThe results will be limited to 1000 results. Make further calls adjusting the time options to get more results.", + "parameters": [ + { + "index": 0, + "name": "projectId", + "type": "string", + "description": "The Google Cloud projectId" + }, + { + "index": 1, + "name": "filter", + "type": "string", + "description": "The Cloud Logging filter to search (e.g. \"resource.type=cloud_run_revision\" and \"resource.labels.service_name=the-service-name\")" + }, + { + "index": 2, + "name": "options", + "type": "{ dateFromIso?: string; dateToIso?: string; freshness?: string; order?: \"asc\" | \"desc\"; limit?: number; format?: \"json\" | \"yaml\"; }", + "description": "Configuration options\n\t * @param {string} [options.dateFromIso] - The date/time to get the logs from. Optional.\n\t * @param {string} [options.dateToIso] - The date/time to get the logs to. Optional.\n\t * @param {string} [options.freshness] - The freshness of the logs (eg. 10m, 1h). Optional.\n\t * @param {string} [options.format] - Format of the response. Defaults to 'yaml' which is more compact and token efficient than 'json'. If you need to parse the results into JSON for programatic use, set this to 'json'.\n\t * @param {'asc'|'desc'} [options.order] - The order of the logs (asc or desc. defaults to desc). Optional.\n\t * @param {number} [options.limit] - The limit of the logs. Optional. Defaults to 200. Maximum of 500." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "The Google Cloud projectId" + }, + "filter": { + "type": "string", + "description": "The Cloud Logging filter to search (e.g. \"resource.type=cloud_run_revision\" and \"resource.labels.service_name=the-service-name\")" + }, + "options": { + "type": "string", + "enum": [ + "desc\"; limit?: number; format?: \"json" + ], + "description": "Configuration options\n\t * @param {string} [options.dateFromIso] - The date/time to get the logs from. Optional.\n\t * @param {string} [options.dateToIso] - The date/time to get the logs to. Optional.\n\t * @param {string} [options.freshness] - The freshness of the logs (eg. 10m, 1h). Optional.\n\t * @param {string} [options.format] - Format of the response. Defaults to 'yaml' which is more compact and token efficient than 'json'. If you need to parse the results into JSON for programatic use, set this to 'json'.\n\t * @param {'asc'|'desc'} [options.order] - The order of the logs (asc or desc. defaults to desc). Optional.\n\t * @param {number} [options.limit] - The limit of the logs. Optional. Defaults to 200. Maximum of 500." + } + }, + "required": [ + "projectId", + "filter", + "options" + ], + "additionalProperties": false + }, + "returnType": "string" + }, + "GoogleCloud_executeBqCommand": { + "class": "GoogleCloud", + "name": "GoogleCloud_executeBqCommand", + "description": "Runs the BigQuery bq command line tool\nExample command:\nbq ls -j --max_results=50 --format=prettyjson --project_id=test_project_id --filter=\"labels.costcode:daily-data-aggregation\"\nIf you are having issues wih the arguments, either call this function with `bq help [COMMAND]` or read https://cloud.google.com/bigquery/docs/reference/bq-cli-reference\nThe only supported commands are: ls, query, show, get-iam-policy, head", + "parameters": [ + { + "index": 0, + "name": "bqCommand", + "type": "string", + "description": "The bq command to execute" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "bqCommand": { + "type": "string", + "description": "The bq command to execute" + } + }, + "required": [ + "bqCommand" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The console output if the exit code is 0, else throws the console output" + }, + "GoogleCloud_executeGcloudCommandQuery": { + "class": "GoogleCloud", + "name": "GoogleCloud_executeGcloudCommandQuery", + "description": "Query resource information by executing the gcloud command line tool. This must ONLY be used for querying information, and MUST NOT update or modify resources.\nIf the command supports the --project= argument then it MUST be included.", + "parameters": [ + { + "index": 0, + "name": "gcloudQueryCommand", + "type": "string", + "description": "The gcloud query command to execute (incuding --project= if allowed)" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "gcloudQueryCommand": { + "type": "string", + "description": "The gcloud query command to execute (incuding --project= if allowed)" + } + }, + "required": [ + "gcloudQueryCommand" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The console output if the exit code is 0, else throws the console output" + }, + "GoogleCloud_getCloudMonitoringMetrics": { + "class": "GoogleCloud", + "name": "GoogleCloud_getCloudMonitoringMetrics", + "description": "Queries Cloud Monitoring metrics using the Monitoring API.", + "parameters": [ + { + "index": 0, + "name": "projectId", + "type": "string", + "description": "The Google Cloud project ID" + }, + { + "index": 1, + "name": "metricType", + "type": "string", + "description": "The metric type (e.g., 'compute.googleapis.com/instance/cpu/utilization')" + }, + { + "index": 2, + "name": "options", + "type": "{ filter?: string; intervalMinutes?: number; alignmentPeriodSeconds?: number; aggregation?: \"ALIGN_MEAN\" | \"ALIGN_MAX\" | \"ALIGN_SUM\" | \"ALIGN_RATE\" | \"ALIGN_DELTA\"; }", + "description": "Configuration options", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "The Google Cloud project ID" + }, + "metricType": { + "type": "string", + "description": "The metric type (e.g., 'compute.googleapis.com/instance/cpu/utilization')" + }, + "options": { + "type": "string", + "enum": [ + "ALIGN_MAX", + "ALIGN_SUM", + "ALIGN_RATE" + ], + "description": "Configuration options" + } + }, + "required": [ + "projectId", + "metricType" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "Metrics data as YAML string for token efficiency" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/cloud/google/security-command-center.json b/.typedai/functions/src/functions/cloud/google/security-command-center.json new file mode 100644 index 000000000..4d7592822 --- /dev/null +++ b/.typedai/functions/src/functions/cloud/google/security-command-center.json @@ -0,0 +1,10 @@ +{ + "GoogleCloudSecurityCommandCenter_getSecurityCommandCenterFindings": { + "class": "GoogleCloudSecurityCommandCenter", + "name": "GoogleCloudSecurityCommandCenter_getSecurityCommandCenterFindings", + "description": "Gets all the active, non-muted findings for the organisation from Security Command Center", + "parameters": [], + "returnType": "import(\"/Users/danielcampagnoli/gh/sophia/temp\").SccFinding[]", + "returns": "The findings in JSON format as an object" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/commandLine.json b/.typedai/functions/src/functions/commandLine.json new file mode 100644 index 000000000..2e715809d --- /dev/null +++ b/.typedai/functions/src/functions/commandLine.json @@ -0,0 +1,30 @@ +{ + "CommandLineInterface_execute": { + "class": "CommandLineInterface", + "name": "CommandLineInterface_execute", + "description": "", + "parameters": [ + { + "index": 0, + "name": "command", + "type": "string", + "description": "The command to execute in the current working directory" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The command to execute in the current working directory" + } + }, + "required": [ + "command" + ], + "additionalProperties": false + }, + "returnType": "{ stdout: string; stderr: string; }", + "returns": "An object with the stdout and stderr properties" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/confluence.json b/.typedai/functions/src/functions/confluence.json new file mode 100644 index 000000000..5761fe7b4 --- /dev/null +++ b/.typedai/functions/src/functions/confluence.json @@ -0,0 +1,69 @@ +{ + "Confluence_search": { + "class": "Confluence", + "name": "Confluence_search", + "description": "Searches Confluence pages and pre-filters the results.\nFor example:\nsearchString: cloud-project-XYZ network\nsearchResultFilterQuery: Im looking for information specifically about the networking configuration of the cloud-project-XYZ", + "parameters": [ + { + "index": 0, + "name": "searchString", + "type": "string", + "description": "The string to search for" + }, + { + "index": 1, + "name": "searchResultFilterQuery", + "type": "string", + "description": "The LLM generated query to filter the search results to" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "searchString": { + "type": "string", + "description": "The string to search for" + }, + "searchResultFilterQuery": { + "type": "string", + "description": "The LLM generated query to filter the search results to" + } + }, + "required": [ + "searchString", + "searchResultFilterQuery" + ], + "additionalProperties": false + }, + "returnType": "{ id: string; title: string; summary: string; }[]", + "returns": ">>}" + }, + "Confluence_getPageContents": { + "class": "Confluence", + "name": "Confluence_getPageContents", + "description": "Fetches the full content and attachments of a Confluence page (as XML).", + "parameters": [ + { + "index": 0, + "name": "pageId", + "type": "string", + "description": "The Confluence page ID." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "pageId": { + "type": "string", + "description": "The Confluence page ID." + } + }, + "required": [ + "pageId" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The page content as XML." + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/customFunctions.json b/.typedai/functions/src/functions/customFunctions.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/.typedai/functions/src/functions/customFunctions.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.typedai/functions/src/functions/deepThink.json b/.typedai/functions/src/functions/deepThink.json new file mode 100644 index 000000000..d65b2e3f2 --- /dev/null +++ b/.typedai/functions/src/functions/deepThink.json @@ -0,0 +1,69 @@ +{ + "DeepThink_deepThink": { + "class": "DeepThink", + "name": "DeepThink_deepThink", + "description": "Generates a response to a query using a multi-agent implementation of the most expensive, intelligent LLM models.\nUse sparingly, as instructed or when stuck on a task, as this is expensive to use. Be careful to minimize the tokens inputted.\nThis query runs independent of any context and understanding you currently have. All required information to answer the query must be passed in as arguments.", + "parameters": [ + { + "index": 0, + "name": "files", + "type": "string[]", + "description": "Any filesystem files to include in the query" + }, + { + "index": 1, + "name": "memoryKeys", + "type": "string[]", + "description": "Any memory keys to include in the query" + }, + { + "index": 2, + "name": "additionalInformation", + "type": "string", + "description": "Any additional information to include in the query (logs, function outputs, etc)" + }, + { + "index": 3, + "name": "queryOrRequirements", + "type": "string", + "description": "The query to answer or requirements to generate a response for" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Any filesystem files to include in the query" + }, + "memoryKeys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Any memory keys to include in the query" + }, + "additionalInformation": { + "type": "string", + "description": "Any additional information to include in the query (logs, function outputs, etc)" + }, + "queryOrRequirements": { + "type": "string", + "description": "The query to answer or requirements to generate a response for" + } + }, + "required": [ + "files", + "memoryKeys", + "additionalInformation", + "queryOrRequirements" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The response to the query" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/googleCalendar.json b/.typedai/functions/src/functions/googleCalendar.json new file mode 100644 index 000000000..6378580df --- /dev/null +++ b/.typedai/functions/src/functions/googleCalendar.json @@ -0,0 +1,61 @@ +{ + "GoogleCalendar_listEvents": { + "class": "GoogleCalendar", + "name": "GoogleCalendar_listEvents", + "description": "", + "parameters": [ + { + "index": 0, + "name": "from", + "type": "string", + "description": "The start of the time range to get events for" + }, + { + "index": 1, + "name": "to", + "type": "string", + "description": "The end of the time range to get events for" + }, + { + "index": 2, + "name": "targetTimezone", + "type": "string", + "description": "(Optional) defaults to Australia/Perth", + "optional": true + }, + { + "index": 3, + "name": "calendarId", + "type": "string", + "description": "(Optional) defaults to primary", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "The start of the time range to get events for" + }, + "to": { + "type": "string", + "description": "The end of the time range to get events for" + }, + "targetTimezone": { + "type": "string", + "description": "(Optional) defaults to Australia/Perth" + }, + "calendarId": { + "type": "string", + "description": "(Optional) defaults to primary" + } + }, + "required": [ + "from", + "to" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/image.json b/.typedai/functions/src/functions/image.json new file mode 100644 index 000000000..06d0ce06f --- /dev/null +++ b/.typedai/functions/src/functions/image.json @@ -0,0 +1,42 @@ +{ + "ImageGen_generateImage": { + "class": "ImageGen", + "name": "ImageGen_generateImage", + "description": "Generates an image with the given description", + "parameters": [ + { + "index": 0, + "name": "description", + "type": "string", + "description": "A detailed description of the image" + }, + { + "index": 1, + "name": "size", + "type": "ImageSize", + "description": "The generated image size. Defaults to 256x256", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A detailed description of the image" + }, + "size": { + "type": "object", + "additionalProperties": true, + "description": "The generated image size. Defaults to 256x256" + } + }, + "required": [ + "description" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The location of the image file" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/jira.json b/.typedai/functions/src/functions/jira.json new file mode 100644 index 000000000..8601ae25a --- /dev/null +++ b/.typedai/functions/src/functions/jira.json @@ -0,0 +1,206 @@ +{ + "Jira_getJiraKey": { + "class": "Jira", + "name": "Jira_getJiraKey", + "description": "Gets the key of a JIRA issue", + "parameters": [ + { + "index": 0, + "name": "issueId", + "type": "string", + "description": "The numeric issue id (e.g. 73479)" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The numeric issue id (e.g. 73479)" + } + }, + "required": [ + "issueId" + ], + "additionalProperties": false + }, + "returnType": "{ key: string; summary: string; }", + "returns": "The issue key (e.g. XYZ-123)" + }, + "Jira_getJiraDetails": { + "class": "Jira", + "name": "Jira_getJiraDetails", + "description": "Gets the details of a JIRA issue (title, description, comments, attachments)", + "parameters": [ + { + "index": 0, + "name": "issueId", + "type": "string", + "description": "The issue id (e.g. XYZ-123)" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The issue id (e.g. XYZ-123)" + } + }, + "required": [ + "issueId" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The issue details" + }, + "Jira_createIssue": { + "class": "Jira", + "name": "Jira_createIssue", + "description": "Creates a new JIRA issue", + "parameters": [ + { + "index": 0, + "name": "projectKey", + "type": "string", + "description": "The Jira project key (usually a short capitalized code)" + }, + { + "index": 1, + "name": "title", + "type": "string", + "description": "The issue summary" + }, + { + "index": 2, + "name": "description", + "type": "string", + "description": "The issue description in Markdown format" + }, + { + "index": 3, + "name": "reporterEmail", + "type": "string", + "description": "The email address of the user who be assigned as the reporter for this issue." + }, + { + "index": 4, + "name": "relatedContentForIssueTypeDetection", + "type": "string", + "description": "User content (chat messages etc) which could assist with the issue type detection", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectKey": { + "type": "string", + "description": "The Jira project key (usually a short capitalized code)" + }, + "title": { + "type": "string", + "description": "The issue summary" + }, + "description": { + "type": "string", + "description": "The issue description in Markdown format" + }, + "reporterEmail": { + "type": "string", + "description": "The email address of the user who be assigned as the reporter for this issue." + }, + "relatedContentForIssueTypeDetection": { + "type": "string", + "description": "User content (chat messages etc) which could assist with the issue type detection" + } + }, + "required": [ + "projectKey", + "title", + "description", + "reporterEmail" + ], + "additionalProperties": false + }, + "returnType": "{ key: string; url: string; }", + "returns": ">} The created issue key and URL" + }, + "Jira_postComment": { + "class": "Jira", + "name": "Jira_postComment", + "description": "Posts a comment to an existing JIRA issue", + "parameters": [ + { + "index": 0, + "name": "issueId", + "type": "string", + "description": "The issue ID (e.g., ABC-123)" + }, + { + "index": 1, + "name": "comment", + "type": "string", + "description": "The comment text to post" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The issue ID (e.g., ABC-123)" + }, + "comment": { + "type": "string", + "description": "The comment text to post" + } + }, + "required": [ + "issueId", + "comment" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The ID of the created comment" + }, + "Jira_updateJiraDescription": { + "class": "Jira", + "name": "Jira_updateJiraDescription", + "description": "Updates the description of an existing JIRA issue", + "parameters": [ + { + "index": 0, + "name": "issueId", + "type": "string", + "description": "The issue ID or key (e.g., ABC-123)" + }, + { + "index": 1, + "name": "description", + "type": "string", + "description": "The new description in Markdown format" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "issueId": { + "type": "string", + "description": "The issue ID or key (e.g., ABC-123)" + }, + "description": { + "type": "string", + "description": "The new description in Markdown format" + } + }, + "required": [ + "issueId", + "description" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/llmTools.json b/.typedai/functions/src/functions/llmTools.json new file mode 100644 index 000000000..74ad28512 --- /dev/null +++ b/.typedai/functions/src/functions/llmTools.json @@ -0,0 +1,80 @@ +{ + "LlmTools_processText": { + "class": "LlmTools", + "name": "LlmTools_processText", + "description": "Uses a large language model to transform the input content by applying the provided natural language instruction", + "parameters": [ + { + "index": 0, + "name": "text", + "type": "string", + "description": "The input text" + }, + { + "index": 1, + "name": "descriptionOfChanges", + "type": "string", + "description": "A description of the changes/processing to apply to the text" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "The input text" + }, + "descriptionOfChanges": { + "type": "string", + "description": "A description of the changes/processing to apply to the text" + } + }, + "required": [ + "text", + "descriptionOfChanges" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The processed text" + }, + "LlmTools_analyseFile": { + "class": "LlmTools", + "name": "LlmTools_analyseFile", + "description": "Uses a large language model to analyse an image/document", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The path to the image/document" + }, + { + "index": 1, + "name": "query", + "type": "string", + "description": "The query ask about the image/document" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The path to the image/document" + }, + "query": { + "type": "string", + "description": "The query ask about the image/document" + } + }, + "required": [ + "filePath", + "query" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The analysis of the image/document" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/scm/git.json b/.typedai/functions/src/functions/scm/git.json new file mode 100644 index 000000000..98d5a292d --- /dev/null +++ b/.typedai/functions/src/functions/scm/git.json @@ -0,0 +1,110 @@ +{ + "Git_getDiff": { + "class": "Git", + "name": "Git_getDiff", + "description": "Returns the diff from the merge-base (common ancestor) of HEAD and a reference, up to HEAD.\nThis effectively shows changes introduced on the current branch relative to that base.", + "parameters": [ + { + "index": 0, + "name": "baseRef", + "type": "string", + "description": "Optional commit SHA or branch name.\n\t * - If provided: Uses `git merge-base HEAD` to find the diff start point.\n\t * - If omitted: Attempts to guess the source branch (e.g., main, develop)\n\t * by inspecting other local branches and uses that for the merge-base calculation.\n\t * Note: Guessing the source branch may be unreliable in some cases.", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "baseRef": { + "type": "string", + "description": "Optional commit SHA or branch name.\n\t * - If provided: Uses `git merge-base HEAD` to find the diff start point.\n\t * - If omitted: Attempts to guess the source branch (e.g., main, develop)\n\t * by inspecting other local branches and uses that for the merge-base calculation.\n\t * Note: Guessing the source branch may be unreliable in some cases." + } + }, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The git diff. Note this could be a large string." + }, + "Git_getStagedDiff": { + "class": "Git", + "name": "Git_getStagedDiff", + "description": "Gets the diff of all currently staged files against the HEAD commit.", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The git diff for staged changes. This could be a large string." + }, + "Git_getStagedFiles": { + "class": "Git", + "name": "Git_getStagedFiles", + "description": "Gets the list of file paths for all currently staged files.", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "An array of file paths that are staged for the next commit." + }, + "Git_commit": { + "class": "Git", + "name": "Git_commit", + "description": "Commits the staged changes to the repository", + "parameters": [ + { + "index": 0, + "name": "commitMessage", + "type": "string", + "description": "The commit message" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "commitMessage": { + "type": "string", + "description": "The commit message" + } + }, + "required": [ + "commitMessage" + ], + "additionalProperties": false + } + }, + "Git_getRecentCommits": { + "class": "Git", + "name": "Git_getRecentCommits", + "description": "Gets the details of the most recent commits", + "parameters": [ + { + "index": 0, + "name": "n", + "type": "number", + "description": "The number of commits (defaults to 2)", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "n": { + "type": "number", + "description": "The number of commits (defaults to 2)" + } + }, + "required": [], + "additionalProperties": false + }, + "returnType": "Commit[]", + "returns": "An array of the commit details" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/scm/github.json b/.typedai/functions/src/functions/scm/github.json new file mode 100644 index 000000000..6aa7b8c74 --- /dev/null +++ b/.typedai/functions/src/functions/scm/github.json @@ -0,0 +1,505 @@ +{ + "GitHub_runIntegrationTest": { + "class": "GitHub", + "name": "GitHub_runIntegrationTest", + "description": "Runs the integration test for the GitHub service class", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "GitHub_createIssue": { + "class": "GitHub", + "name": "GitHub_createIssue", + "description": "Creates an issue in a GitHub repository.", + "parameters": [ + { + "index": 0, + "name": "projectPathWithNamespace", + "type": "string", + "description": "The full path of the project, e.g., 'owner/repo'." + }, + { + "index": 1, + "name": "title", + "type": "string", + "description": "The title of the issue." + }, + { + "index": 2, + "name": "body", + "type": "string", + "description": "Optional description for the issue.", + "optional": true + }, + { + "index": 3, + "name": "labels", + "type": "string[]", + "description": "Optional array of labels to add to the issue.", + "optional": true + }, + { + "index": 4, + "name": "assignees", + "type": "string[]", + "description": "Optional array of GitHub usernames to assign to the issue.", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPathWithNamespace": { + "type": "string", + "description": "The full path of the project, e.g., 'owner/repo'." + }, + "title": { + "type": "string", + "description": "The title of the issue." + }, + "body": { + "type": "string", + "description": "Optional description for the issue." + }, + "labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional array of labels to add to the issue." + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional array of GitHub usernames to assign to the issue." + } + }, + "required": [ + "projectPathWithNamespace", + "title" + ], + "additionalProperties": false + }, + "returnType": "GitHubIssue", + "returns": "A promise that resolves to the created GitHubIssue object.", + "typeDefinitions": [ + { + "name": "GitHubIssue", + "properties": [ + { + "name": "id", + "type": "number", + "optional": false + }, + { + "name": "number", + "type": "number", + "optional": false + }, + { + "name": "url", + "type": "string", + "optional": false + }, + { + "name": "apiUrl", + "type": "string", + "optional": false + }, + { + "name": "title", + "type": "string", + "optional": false + }, + { + "name": "state", + "type": "string", + "optional": false + } + ] + } + ] + }, + "GitHub_postCommentOnIssue": { + "class": "GitHub", + "name": "GitHub_postCommentOnIssue", + "description": "Posts a comment on a GitHub issue.", + "parameters": [ + { + "index": 0, + "name": "projectPathWithNamespace", + "type": "string", + "description": "The full path of the project, e.g., 'owner/repo'." + }, + { + "index": 1, + "name": "issueNumber", + "type": "number", + "description": "The number of the issue to comment on." + }, + { + "index": 2, + "name": "body", + "type": "string", + "description": "The content of the comment." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPathWithNamespace": { + "type": "string", + "description": "The full path of the project, e.g., 'owner/repo'." + }, + "issueNumber": { + "type": "number", + "description": "The number of the issue to comment on." + }, + "body": { + "type": "string", + "description": "The content of the comment." + } + }, + "required": [ + "projectPathWithNamespace", + "issueNumber", + "body" + ], + "additionalProperties": false + }, + "returnType": "GitHubIssueComment", + "returns": "A promise that resolves to the created GitHubIssueComment object.", + "typeDefinitions": [ + { + "name": "GitHubIssueComment", + "properties": [ + { + "name": "id", + "type": "number", + "optional": false + }, + { + "name": "html_url", + "type": "string", + "optional": false + }, + { + "name": "body", + "type": "string", + "optional": false + }, + { + "name": "user", + "type": "{\n\t\t// Basic user information\n\t\tlogin: string;\n\t\tid: number;\n\t} | null", + "optional": false + }, + { + "name": "created_at", + "type": "string", + "optional": false + }, + { + "name": "updated_at", + "type": "string", + "optional": false + } + ] + } + ] + }, + "GitHub_getIssueComments": { + "class": "GitHub", + "name": "GitHub_getIssueComments", + "description": "Gets all comments for a specific GitHub issue.", + "parameters": [ + { + "index": 0, + "name": "projectPathWithNamespace", + "type": "string", + "description": "The full path of the project, e.g., 'owner/repo'." + }, + { + "index": 1, + "name": "issueNumber", + "type": "number", + "description": "The number of the issue to get comments for." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPathWithNamespace": { + "type": "string", + "description": "The full path of the project, e.g., 'owner/repo'." + }, + "issueNumber": { + "type": "number", + "description": "The number of the issue to get comments for." + } + }, + "required": [ + "projectPathWithNamespace", + "issueNumber" + ], + "additionalProperties": false + }, + "returnType": "GitHubIssueComment[]", + "returns": "A promise that resolves to an array of GitHubIssueComment objects.", + "typeDefinitions": [ + { + "name": "GitHubIssueComment", + "properties": [ + { + "name": "id", + "type": "number", + "optional": false + }, + { + "name": "html_url", + "type": "string", + "optional": false + }, + { + "name": "body", + "type": "string", + "optional": false + }, + { + "name": "user", + "type": "{\n\t\t// Basic user information\n\t\tlogin: string;\n\t\tid: number;\n\t} | null", + "optional": false + }, + { + "name": "created_at", + "type": "string", + "optional": false + }, + { + "name": "updated_at", + "type": "string", + "optional": false + } + ] + } + ] + }, + "GitHub_cloneProject": { + "class": "GitHub", + "name": "GitHub_cloneProject", + "description": "Clones a project from GitHub to the file system.\nTo use this project the function FileSystem.setWorkingDirectory must be called after with the returned value", + "parameters": [ + { + "index": 0, + "name": "projectPathWithNamespace", + "type": "string", + "description": "The full project path in GitLab" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPathWithNamespace": { + "type": "string", + "description": "The full project path in GitLab" + } + }, + "required": [ + "projectPathWithNamespace" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The file system path where the repository is located. You will need to call FileSystem_setWorkingDirectory() with this result to work with the project." + }, + "GitHub_createMergeRequest": { + "class": "GitHub", + "name": "GitHub_createMergeRequest", + "description": "Creates a Pull Request", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "MergeRequest", + "returns": "The MergeRequest details" + }, + "GitHub_getProjects": { + "class": "GitHub", + "name": "GitHub_getProjects", + "description": "", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "GitProject[]", + "returns": "The projects available for the account" + }, + "GitHub_getBranches": { + "class": "GitHub", + "name": "GitHub_getBranches", + "description": "Gets the list of branches for a given GitHub repository.", + "parameters": [ + { + "index": 0, + "name": "projectId", + "type": "string | number", + "description": "The project identifier, either as 'owner/repo' string or the numeric repository ID as a string or number." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "The project identifier, either as 'owner/repo' string or the numeric repository ID as a string or number." + } + }, + "required": [ + "projectId" + ], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "A promise that resolves to an array of branch names." + }, + "GitHub_listJobsForWorkflowRun": { + "class": "GitHub", + "name": "GitHub_listJobsForWorkflowRun", + "description": "Lists all jobs for a specific workflow run.", + "parameters": [ + { + "index": 0, + "name": "projectPath", + "type": "string", + "description": "The path to the project, e.g., 'owner/repo'." + }, + { + "index": 1, + "name": "runId", + "type": "number", + "description": "The ID of the workflow run." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPath": { + "type": "string", + "description": "The path to the project, e.g., 'owner/repo'." + }, + "runId": { + "type": "number", + "description": "The ID of the workflow run." + } + }, + "required": [ + "projectPath", + "runId" + ], + "additionalProperties": false + }, + "returnType": "GitHubWorkflowJob[]", + "returns": "A promise that resolves to an array of workflow job objects." + }, + "GitHub_testCreateIssueE2E": { + "class": "GitHub", + "name": "GitHub_testCreateIssueE2E", + "description": "Runs an E2E test for creating an issue in a GitHub repository.\nThis method will attempt to create a real issue in a pre-defined test repository.", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "GitHubIssue", + "returns": "A promise that resolves to the created GitHubIssue object.", + "typeDefinitions": [ + { + "name": "GitHubIssue", + "properties": [ + { + "name": "id", + "type": "number", + "optional": false + }, + { + "name": "number", + "type": "number", + "optional": false + }, + { + "name": "url", + "type": "string", + "optional": false + }, + { + "name": "apiUrl", + "type": "string", + "optional": false + }, + { + "name": "title", + "type": "string", + "optional": false + }, + { + "name": "state", + "type": "string", + "optional": false + } + ] + } + ] + }, + "GitHub_getJobLogs": { + "class": "GitHub", + "name": "GitHub_getJobLogs", + "description": "Fetches the logs for a specific job in a GitHub Actions workflow.", + "parameters": [ + { + "index": 0, + "name": "projectPath", + "type": "string", + "description": "The path to the project, typically in the format 'owner/repo'" + }, + { + "index": 1, + "name": "jobId", + "type": "string", + "description": "The ID of the job for which to fetch logs" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPath": { + "type": "string", + "description": "The path to the project, typically in the format 'owner/repo'" + }, + "jobId": { + "type": "string", + "description": "The ID of the job for which to fetch logs" + } + }, + "required": [ + "projectPath", + "jobId" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "A promise that resolves to the job logs as a string\n\t *" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/scm/gitlab-code-review.json b/.typedai/functions/src/functions/scm/gitlab-code-review.json new file mode 100644 index 000000000..71ca2ef4e --- /dev/null +++ b/.typedai/functions/src/functions/scm/gitlab-code-review.json @@ -0,0 +1,40 @@ +{ + "GitLabCodeReview_getJobLogs": { + "class": "GitLabCodeReview", + "name": "GitLabCodeReview_getJobLogs", + "description": "Gets the logs for a CI/CD job", + "parameters": [ + { + "index": 0, + "name": "projectIdOrProjectPath", + "type": "string | number", + "description": "Full path or numeric id" + }, + { + "index": 1, + "name": "jobId", + "type": "string", + "description": "The job id" + } + ] + }, + "GitLabCodeReview_getJobCommitDiff": { + "class": "GitLabCodeReview", + "name": "GitLabCodeReview_getJobCommitDiff", + "description": "Returns the Git diff for the commit in the git repository that the job is running the pipeline on.", + "parameters": [ + { + "index": 0, + "name": "projectPath", + "type": "string", + "description": "Full project path or numeric id" + }, + { + "index": 1, + "name": "jobId", + "type": "string", + "description": "The job id" + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/scm/gitlab.json b/.typedai/functions/src/functions/scm/gitlab.json new file mode 100644 index 000000000..cd561a001 --- /dev/null +++ b/.typedai/functions/src/functions/scm/gitlab.json @@ -0,0 +1,361 @@ +{ + "GitLab_getProjects": { + "class": "GitLab", + "name": "GitLab_getProjects", + "description": "", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "GitProject[]", + "returns": "The details of all the projects available" + }, + "GitLab_cloneProject": { + "class": "GitLab", + "name": "GitLab_cloneProject", + "description": "Clones a project from GitLab to the file system.\nTo use this project the function FileSystem.setWorkingDirectory must be called after with the returned value", + "parameters": [ + { + "index": 0, + "name": "projectPathWithNamespace", + "type": "string", + "description": "The full project path in GitLab" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPathWithNamespace": { + "type": "string", + "description": "The full project path in GitLab" + } + }, + "required": [ + "projectPathWithNamespace" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The file system path where the repository is located. You will need to call FileSystem_setWorkingDirectory() with this result to work with the project." + }, + "GitLab_createMergeRequest": { + "class": "GitLab", + "name": "GitLab_createMergeRequest", + "description": "Creates a Merge request", + "parameters": [ + { + "index": 0, + "name": "projectId", + "type": "string | number", + "description": "The full project path or numeric id" + }, + { + "index": 1, + "name": "title", + "type": "string", + "description": "The title of the merge request" + }, + { + "index": 2, + "name": "description", + "type": "string", + "description": "The description of the merge request" + }, + { + "index": 3, + "name": "sourceBranch", + "type": "string", + "description": "The branch to merge in" + }, + { + "index": 4, + "name": "targetBranch", + "type": "string", + "description": "The branch to merge to" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "The full project path or numeric id" + }, + "title": { + "type": "string", + "description": "The title of the merge request" + }, + "description": { + "type": "string", + "description": "The description of the merge request" + }, + "sourceBranch": { + "type": "string", + "description": "The branch to merge in" + }, + "targetBranch": { + "type": "string", + "description": "The branch to merge to" + } + }, + "required": [ + "projectId", + "title", + "description", + "sourceBranch", + "targetBranch" + ], + "additionalProperties": false + }, + "returnType": "MergeRequest", + "returns": "The merge request URL" + }, + "GitLab_getMergeRequestLatestPipeline": { + "class": "GitLab", + "name": "GitLab_getMergeRequestLatestPipeline", + "description": "Gets the latest pipeline details from a merge request", + "parameters": [ + { + "index": 0, + "name": "gitlabProjectId", + "type": "string | number", + "description": "The full path or numeric id" + }, + { + "index": 1, + "name": "mergeRequestIId", + "type": "number", + "description": "The merge request IID. Can be found in the URL to a pipeline" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "gitlabProjectId": { + "type": "string", + "description": "The full path or numeric id" + }, + "mergeRequestIId": { + "type": "number", + "description": "The merge request IID. Can be found in the URL to a pipeline" + } + }, + "required": [ + "gitlabProjectId", + "mergeRequestIId" + ], + "additionalProperties": false + } + }, + "GitLab_getPipelineFailedJobLogs": { + "class": "GitLab", + "name": "GitLab_getPipelineFailedJobLogs", + "description": "Gets the logs from the jobs which have failed in a pipeline", + "parameters": [ + { + "index": 0, + "name": "gitlabProjectId", + "type": "string | number", + "description": "GitLab project full path or the numeric id" + }, + { + "index": 1, + "name": "pipelineId", + "type": "number", + "description": "The pipelineId. Can be determined from the URL of a pipeline. https:////[/]/-/pipelines/" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "gitlabProjectId": { + "type": "string", + "description": "GitLab project full path or the numeric id" + }, + "pipelineId": { + "type": "number", + "description": "The pipelineId. Can be determined from the URL of a pipeline. https:////[/]/-/pipelines/" + } + }, + "required": [ + "gitlabProjectId", + "pipelineId" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "A Record with the job name as the key and the logs as the value." + }, + "GitLab_getMergeRequestPipelineFailedJobLogs": { + "class": "GitLab", + "name": "GitLab_getMergeRequestPipelineFailedJobLogs", + "description": "Gets the logs from the jobs which have failed in the latest pipeline of a merge request", + "parameters": [ + { + "index": 0, + "name": "gitlabProjectId", + "type": "string | number", + "description": "GitLab project full path or the numeric id" + }, + { + "index": 1, + "name": "mergeRequestIId", + "type": "number", + "description": "The merge request IID. Can get this from the URL of the merge request. https:////[/]/-/merge_requests/" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "gitlabProjectId": { + "type": "string", + "description": "GitLab project full path or the numeric id" + }, + "mergeRequestIId": { + "type": "number", + "description": "The merge request IID. Can get this from the URL of the merge request. https:////[/]/-/merge_requests/" + } + }, + "required": [ + "gitlabProjectId", + "mergeRequestIId" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "A Record with the job name as the key and the logs as the value." + }, + "GitLab_getJobCommitDiff": { + "class": "GitLab", + "name": "GitLab_getJobCommitDiff", + "description": "Returns the Git diff for the commit in the git repository that the job is running the pipeline on.", + "parameters": [ + { + "index": 0, + "name": "projectPath", + "type": "string", + "description": "Full project path or numeric id" + }, + { + "index": 1, + "name": "jobId", + "type": "string | number", + "description": "The job id" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectPath": { + "type": "string", + "description": "Full project path or numeric id" + }, + "jobId": { + "type": "string", + "description": "The job id" + } + }, + "required": [ + "projectPath", + "jobId" + ], + "additionalProperties": false + } + }, + "GitLab_getJobLogs": { + "class": "GitLab", + "name": "GitLab_getJobLogs", + "description": "Gets the logs for a CI/CD job", + "parameters": [ + { + "index": 0, + "name": "projectIdOrProjectPath", + "type": "string | number", + "description": "GitLab projectId. Either the full path (group(s) and project id) or the numeric id" + }, + { + "index": 1, + "name": "jobId", + "type": "string | number", + "description": "The job id. Can get this from a job URL in the format https:////[/]/-/jobs/" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectIdOrProjectPath": { + "type": "string", + "description": "GitLab projectId. Either the full path (group(s) and project id) or the numeric id" + }, + "jobId": { + "type": "string", + "description": "The job id. Can get this from a job URL in the format https:////[/]/-/jobs/" + } + }, + "required": [ + "projectIdOrProjectPath", + "jobId" + ], + "additionalProperties": false + } + }, + "GitLab_getBranches": { + "class": "GitLab", + "name": "GitLab_getBranches", + "description": "Gets the list of branches for a given GitLab project.", + "parameters": [ + { + "index": 0, + "name": "projectId", + "type": "string | number", + "description": "The full project path (e.g., 'group/subgroup/project') or the numeric project ID." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "The full project path (e.g., 'group/subgroup/project') or the numeric project ID." + } + }, + "required": [ + "projectId" + ], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "A promise that resolves to an array of branch names." + }, + "GitLab_getSingleFileContents": { + "class": "GitLab", + "name": "GitLab_getSingleFileContents", + "description": "Retrieves the raw contents of a single file from a GitLab repository using a web UI blob URL.", + "parameters": [ + { + "index": 0, + "name": "url", + "type": "string", + "description": "The GitLab blob URL in the format: https:////-/blob//\n\t * Example: https://gitlab.internal.company.com/engineering/services/user-service/-/blob/main/src/model/user.ts" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The GitLab blob URL in the format: https:////-/blob//\n\t * Example: https://gitlab.internal.company.com/engineering/services/user-service/-/blob/main/src/model/user.ts" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The raw file contents as a string\n\t *" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/scm/gitlabCodeReview.json b/.typedai/functions/src/functions/scm/gitlabCodeReview.json new file mode 100644 index 000000000..71ca2ef4e --- /dev/null +++ b/.typedai/functions/src/functions/scm/gitlabCodeReview.json @@ -0,0 +1,40 @@ +{ + "GitLabCodeReview_getJobLogs": { + "class": "GitLabCodeReview", + "name": "GitLabCodeReview_getJobLogs", + "description": "Gets the logs for a CI/CD job", + "parameters": [ + { + "index": 0, + "name": "projectIdOrProjectPath", + "type": "string | number", + "description": "Full path or numeric id" + }, + { + "index": 1, + "name": "jobId", + "type": "string", + "description": "The job id" + } + ] + }, + "GitLabCodeReview_getJobCommitDiff": { + "class": "GitLabCodeReview", + "name": "GitLabCodeReview_getJobCommitDiff", + "description": "Returns the Git diff for the commit in the git repository that the job is running the pipeline on.", + "parameters": [ + { + "index": 0, + "name": "projectPath", + "type": "string", + "description": "Full project path or numeric id" + }, + { + "index": 1, + "name": "jobId", + "type": "string", + "description": "The job id" + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/storage/FileSystemRead.json b/.typedai/functions/src/functions/storage/FileSystemRead.json new file mode 100644 index 000000000..8174e125b --- /dev/null +++ b/.typedai/functions/src/functions/storage/FileSystemRead.json @@ -0,0 +1,321 @@ +{ + "FileSystemRead_getWorkingDirectory": { + "class": "FileSystemRead", + "name": "FileSystemRead_getWorkingDirectory", + "description": "", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The full path of the working directory on the filesystem" + }, + "FileSystemRead_setWorkingDirectory": { + "class": "FileSystemRead", + "name": "FileSystemRead_setWorkingDirectory", + "description": "Set the working directory. The dir argument may be an absolute filesystem path, otherwise relative to the current working directory.\nIf the dir starts with / it will first be checked as an absolute directory, then as relative path to the working directory.", + "parameters": [ + { + "index": 0, + "name": "dir", + "type": "string", + "description": "The new working directory" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "dir": { + "type": "string", + "description": "The new working directory" + } + }, + "required": [ + "dir" + ], + "additionalProperties": false + } + }, + "FileSystemRead_getFileContentsRecursively": { + "class": "FileSystemRead", + "name": "FileSystemRead_getFileContentsRecursively", + "description": "Returns the file contents of all the files under the provided directory path", + "parameters": [ + { + "index": 0, + "name": "dirPath", + "type": "string", + "description": "The directory to return all the files contents under" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "dirPath": { + "type": "string", + "description": "The directory to return all the files contents under" + } + }, + "required": [ + "dirPath" + ], + "additionalProperties": false + }, + "returnType": "Map", + "returns": "The contents of the file(s) as a Map keyed by the file path" + }, + "FileSystemRead_getFileContentsRecursivelyAsXml": { + "class": "FileSystemRead", + "name": "FileSystemRead_getFileContentsRecursivelyAsXml", + "description": "Returns the file contents of all the files recursively under the provided directory path", + "parameters": [ + { + "index": 0, + "name": "dirPath", + "type": "string", + "description": "The directory to return all the files contents under" + }, + { + "index": 1, + "name": "storeToMemory", + "type": "boolean", + "description": "If the file contents should be stored to memory. The key will be in the format file-contents--" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "dirPath": { + "type": "string", + "description": "The directory to return all the files contents under" + }, + "storeToMemory": { + "type": "boolean", + "description": "If the file contents should be stored to memory. The key will be in the format file-contents--" + } + }, + "required": [ + "dirPath", + "storeToMemory" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The contents of the file(s) in format file1 contentsfile2 contents" + }, + "FileSystemRead_searchFilesMatchingContents": { + "class": "FileSystemRead", + "name": "FileSystemRead_searchFilesMatchingContents", + "description": "Searches for files on the filesystem (using ripgrep) with contents matching the search regex.", + "parameters": [ + { + "index": 0, + "name": "contentsRegex", + "type": "string", + "description": "The regular expression to search the content all the files recursively for" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "contentsRegex": { + "type": "string", + "description": "The regular expression to search the content all the files recursively for" + } + }, + "required": [ + "contentsRegex" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The list of filenames (with postfix :) which have contents matching the regular expression." + }, + "FileSystemRead_searchFilesMatchingName": { + "class": "FileSystemRead", + "name": "FileSystemRead_searchFilesMatchingName", + "description": "Searches for files on the filesystem where the filename matches the regex.", + "parameters": [ + { + "index": 0, + "name": "fileNameRegex", + "type": "string", + "description": "The regular expression to match the filename." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "fileNameRegex": { + "type": "string", + "description": "The regular expression to match the filename." + } + }, + "required": [ + "fileNameRegex" + ], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "The list of filenames matching the regular expression." + }, + "FileSystemRead_listFilesInDirectory": { + "class": "FileSystemRead", + "name": "FileSystemRead_listFilesInDirectory", + "description": "Lists the file and folder names in a single directory.\nFolder names will end with a /", + "parameters": [ + { + "index": 0, + "name": "dirPath", + "type": "string", + "description": "The folder to list the files in. Defaults to the working directory", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "dirPath": { + "type": "string", + "description": "The folder to list the files in. Defaults to the working directory" + } + }, + "required": [], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "The list of file and folder names" + }, + "FileSystemRead_listFilesRecursively": { + "class": "FileSystemRead", + "name": "FileSystemRead_listFilesRecursively", + "description": "List all the files recursively under the given path, excluding any paths in a .gitignore file if it exists", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "The list of files" + }, + "FileSystemRead_readFile": { + "class": "FileSystemRead", + "name": "FileSystemRead_readFile", + "description": "Gets the contents of a local file on the file system. If the user has only provided a filename you may need to find the full path using the searchFilesMatchingName function.", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file path to read the contents of (e.g. src/index.ts)" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file path to read the contents of (e.g. src/index.ts)" + } + }, + "required": [ + "filePath" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The contents of the file(s) in format file1 contentsfile2 contents" + }, + "FileSystemRead_readFileAsXML": { + "class": "FileSystemRead", + "name": "FileSystemRead_readFileAsXML", + "description": "Gets the contents of a local file on the file system and returns it in XML tags", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file path to read the contents of (e.g. src/index.ts)" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file path to read the contents of (e.g. src/index.ts)" + } + }, + "required": [ + "filePath" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The contents of the file(s) in format file1 contents" + }, + "FileSystemRead_readFilesAsXml": { + "class": "FileSystemRead", + "name": "FileSystemRead_readFilesAsXml", + "description": "Gets the contents of a list of files, returning a formatted XML string of all file contents", + "parameters": [ + { + "index": 0, + "name": "filePaths", + "type": "string | string[]", + "description": "The files paths to read the contents of" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePaths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The files paths to read the contents of" + } + }, + "required": [ + "filePaths" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The contents of the file(s) in format file1 contentsfile2 contents" + }, + "FileSystemRead_fileExists": { + "class": "FileSystemRead", + "name": "FileSystemRead_fileExists", + "description": "Check if a file exists. A filePath starts with / is it relative to FileSystem.basePath, otherwise its relative to FileSystem.workingDirectory", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file path to check" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file path to check" + } + }, + "required": [ + "filePath" + ], + "additionalProperties": false + }, + "returnType": "boolean", + "returns": "True if the file exists, else false" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/storage/FileSystemWrite.json b/.typedai/functions/src/functions/storage/FileSystemWrite.json new file mode 100644 index 000000000..0c10837ea --- /dev/null +++ b/.typedai/functions/src/functions/storage/FileSystemWrite.json @@ -0,0 +1,161 @@ +{ + "FileSystemWrite_writeFile": { + "class": "FileSystemWrite", + "name": "FileSystemWrite_writeFile", + "description": "Writes to a file. If the file exists it will overwrite the contents. This will create any parent directories required,", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file path (either full filesystem path or relative to current working directory)" + }, + { + "index": 1, + "name": "contents", + "type": "string", + "description": "The contents to write to the file" + }, + { + "index": 2, + "name": "allowOverwrite", + "type": "boolean", + "description": "If the filePath already exists, then it will overwrite or throw an error based on the allowOverwrite property" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file path (either full filesystem path or relative to current working directory)" + }, + "contents": { + "type": "string", + "description": "The contents to write to the file" + }, + "allowOverwrite": { + "type": "boolean", + "description": "If the filePath already exists, then it will overwrite or throw an error based on the allowOverwrite property" + } + }, + "required": [ + "filePath", + "contents", + "allowOverwrite" + ], + "additionalProperties": false + } + }, + "FileSystemWrite_editFileContents": { + "class": "FileSystemWrite", + "name": "FileSystemWrite_editFileContents", + "description": "Reads a file, then transforms the contents using a LLM to perform the described changes, then writes back to the file.", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file to update" + }, + { + "index": 1, + "name": "descriptionOfChanges", + "type": "string", + "description": "A natual language description of the changes to make to the file contents" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file to update" + }, + "descriptionOfChanges": { + "type": "string", + "description": "A natual language description of the changes to make to the file contents" + } + }, + "required": [ + "filePath", + "descriptionOfChanges" + ], + "additionalProperties": false + } + }, + "FileSystemWrite_deleteFile": { + "class": "FileSystemWrite", + "name": "FileSystemWrite_deleteFile", + "description": "Delete a file", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file to delete" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file to delete" + } + }, + "required": [ + "filePath" + ], + "additionalProperties": false + } + }, + "FileSystemWrite_patchEditFile": { + "class": "FileSystemWrite", + "name": "FileSystemWrite_patchEditFile", + "description": "Edits a file using a search and replace. Provide the minimal lines of text from the file contents as the unique search string.", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file to edit" + }, + { + "index": 1, + "name": "search", + "type": "string", + "description": "The lines of text in the file to replace. Note that all the whitespace must be identical." + }, + { + "index": 2, + "name": "replace", + "type": "string", + "description": "The new text to use as a replacement" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file to edit" + }, + "search": { + "type": "string", + "description": "The lines of text in the file to replace. Note that all the whitespace must be identical." + }, + "replace": { + "type": "string", + "description": "The new text to use as a replacement" + } + }, + "required": [ + "filePath", + "search", + "replace" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/storage/fileSystemList.json b/.typedai/functions/src/functions/storage/fileSystemList.json new file mode 100644 index 000000000..dad986d1e --- /dev/null +++ b/.typedai/functions/src/functions/storage/fileSystemList.json @@ -0,0 +1,167 @@ +{ + "FileSystemList_getWorkingDirectory": { + "class": "FileSystemList", + "name": "FileSystemList_getWorkingDirectory", + "description": "", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The full path of the working directory on the filesystem" + }, + "FileSystemList_setWorkingDirectory": { + "class": "FileSystemList", + "name": "FileSystemList_setWorkingDirectory", + "description": "Set the working directory. The dir argument may be an absolute filesystem path, otherwise relative to the current working directory.\nIf the dir starts with / it will first be checked as an absolute directory, then as relative path to the working directory.", + "parameters": [ + { + "index": 0, + "name": "dir", + "type": "string", + "description": "The new working directory" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "dir": { + "type": "string", + "description": "The new working directory" + } + }, + "required": [ + "dir" + ], + "additionalProperties": false + } + }, + "FileSystemList_searchFilesMatchingContents": { + "class": "FileSystemList", + "name": "FileSystemList_searchFilesMatchingContents", + "description": "Searches for files on the filesystem (using ripgrep) with contents matching the search regex.", + "parameters": [ + { + "index": 0, + "name": "contentsRegex", + "type": "string", + "description": "The regular expression to search the content all the files recursively for" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "contentsRegex": { + "type": "string", + "description": "The regular expression to search the content all the files recursively for" + } + }, + "required": [ + "contentsRegex" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The list of filenames (with postfix :) which have contents matching the regular expression." + }, + "FileSystemList_searchFilesMatchingName": { + "class": "FileSystemList", + "name": "FileSystemList_searchFilesMatchingName", + "description": "Searches for files on the filesystem where the filename matches the regex.", + "parameters": [ + { + "index": 0, + "name": "fileNameRegex", + "type": "string", + "description": "The regular expression to match the filename." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "fileNameRegex": { + "type": "string", + "description": "The regular expression to match the filename." + } + }, + "required": [ + "fileNameRegex" + ], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "The list of filenames matching the regular expression." + }, + "FileSystemList_listFilesInDirectory": { + "class": "FileSystemList", + "name": "FileSystemList_listFilesInDirectory", + "description": "Lists the file and folder names in a single directory.\nFolder names will end with a /", + "parameters": [ + { + "index": 0, + "name": "dirPath", + "type": "string", + "description": "The folder to list the files in. Defaults to the working directory", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "dirPath": { + "type": "string", + "description": "The folder to list the files in. Defaults to the working directory" + } + }, + "required": [], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "The list of file and folder names" + }, + "FileSystemList_listFilesRecursively": { + "class": "FileSystemList", + "name": "FileSystemList_listFilesRecursively", + "description": "List all the files recursively under the given path, excluding any paths in a .gitignore file if it exists", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "The list of files relative to the working directory" + }, + "FileSystemList_fileExists": { + "class": "FileSystemList", + "name": "FileSystemList_fileExists", + "description": "Check if a file exists. A filePath starts with / is it relative to FileSystem.basePath, otherwise its relative to FileSystem.workingDirectory", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The file path to check" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filePath": { + "type": "string", + "description": "The file path to check" + } + }, + "required": [ + "filePath" + ], + "additionalProperties": false + }, + "returnType": "boolean", + "returns": "True if the file exists, else false" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/storage/localFileStore.json b/.typedai/functions/src/functions/storage/localFileStore.json new file mode 100644 index 000000000..d06048cd1 --- /dev/null +++ b/.typedai/functions/src/functions/storage/localFileStore.json @@ -0,0 +1,78 @@ +{ + "LocalFileStore_saveFile": { + "class": "LocalFileStore", + "name": "LocalFileStore_saveFile", + "description": "Saves the contents to a file with the given filename and updates metadata.", + "parameters": [ + { + "index": 0, + "name": "filename", + "type": "string", + "description": "The name of the file to save." + }, + { + "index": 1, + "name": "contents", + "type": "string | Buffer", + "description": "The contents to save to the file." + }, + { + "index": 2, + "name": "description", + "type": "string", + "description": "A description of the contents which can be used to identify it later." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "description": "The name of the file to save." + }, + "contents": { + "type": "string", + "description": "The contents to save to the file." + }, + "description": { + "type": "string", + "description": "A description of the contents which can be used to identify it later." + } + }, + "required": [ + "filename", + "contents", + "description" + ], + "additionalProperties": false + }, + "returnType": "string" + }, + "LocalFileStore_getFile": { + "class": "LocalFileStore", + "name": "LocalFileStore_getFile", + "description": "Retrieves the contents of a file.", + "parameters": [ + { + "index": 0, + "name": "filename", + "type": "string", + "description": "The name of the file to read." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "description": "The name of the file to read." + } + }, + "required": [ + "filename" + ], + "additionalProperties": false + }, + "returnType": "string" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/subProcess.json b/.typedai/functions/src/functions/subProcess.json new file mode 100644 index 000000000..8de7b1b69 --- /dev/null +++ b/.typedai/functions/src/functions/subProcess.json @@ -0,0 +1,36 @@ +{ + "SubProcess_run": { + "class": "SubProcess", + "name": "SubProcess_run", + "description": "Runs a command in a new subprocess.", + "parameters": [ + { + "index": 0, + "name": "command", + "type": "string", + "description": "The command to execute." + }, + { + "index": 1, + "name": "args", + "type": "string[]", + "description": "The arguments for the command." + } + ], + "returnType": "number", + "returns": "The Process ID (PID) of the new process." + }, + "SubProcess_kill": { + "class": "SubProcess", + "name": "SubProcess_kill", + "description": "Kills a running subprocess.", + "parameters": [ + { + "index": 0, + "name": "pid", + "type": "number", + "description": "The Process ID (PID) of the process to kill." + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/supportKnowledgebase.json b/.typedai/functions/src/functions/supportKnowledgebase.json new file mode 100644 index 000000000..c4898e565 --- /dev/null +++ b/.typedai/functions/src/functions/supportKnowledgebase.json @@ -0,0 +1,30 @@ +{ + "SupportKnowledgebase_getCoreDocumentation": { + "class": "SupportKnowledgebase", + "name": "SupportKnowledgebase_getCoreDocumentation", + "description": "", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The core documentation which must be known to resolve support requests" + }, + "SupportKnowledgebase_searchDocs": { + "class": "SupportKnowledgebase", + "name": "SupportKnowledgebase_searchDocs", + "description": "", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The search various sources (docs, wiki, issues etc) for content relevant to the support request." + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/tempo.json b/.typedai/functions/src/functions/tempo.json new file mode 100644 index 000000000..75901468d --- /dev/null +++ b/.typedai/functions/src/functions/tempo.json @@ -0,0 +1,68 @@ +{ + "Tempo_getWorklogsForDay": { + "class": "Tempo", + "name": "Tempo_getWorklogsForDay", + "description": "Retrieves all worklogs for a specific calendar day.", + "parameters": [ + { + "index": 0, + "name": "date", + "type": "string", + "description": "In 'YYYY-MM-DD' format" + } + ], + "returnType": "any", + "returns": "Worklogs matching the day" + }, + "Tempo_addWorklog": { + "class": "Tempo", + "name": "Tempo_addWorklog", + "description": "Adds a new worklog entry in Tempo", + "parameters": [ + { + "index": 0, + "name": "params", + "type": "import(\"/Users/danielcampagnoli/gh/sophia/src/functions/temp\").AddWorklogParams", + "description": "{ issueKey, hours, startDate, description }" + } + ], + "returnType": "any", + "returns": "Tempo worklog response object" + }, + "Tempo_updateWorklog": { + "class": "Tempo", + "name": "Tempo_updateWorklog", + "description": "Updates an existing worklog in Tempo", + "parameters": [ + { + "index": 0, + "name": "worklogId", + "type": "string", + "description": "Tempo worklog ID to update" + }, + { + "index": 1, + "name": "updateData", + "type": "import(\"/Users/danielcampagnoli/gh/sophia/src/functions/temp\").UpdateWorklogParams", + "description": "{ hours, description }" + } + ], + "returnType": "any", + "returns": "Updated Tempo worklog object" + }, + "Tempo_deleteWorklog": { + "class": "Tempo", + "name": "Tempo_deleteWorklog", + "description": "Deletes a worklog in Tempo", + "parameters": [ + { + "index": 0, + "name": "worklogId", + "type": "string", + "description": "Tempo worklog ID to delete" + } + ], + "returnType": "boolean", + "returns": "True if successful (204 No Content)" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/testFunctions.json b/.typedai/functions/src/functions/testFunctions.json new file mode 100644 index 000000000..0df781e3e --- /dev/null +++ b/.typedai/functions/src/functions/testFunctions.json @@ -0,0 +1,41 @@ +{ + "TestFunctions_noop": { + "class": "TestFunctions", + "name": "TestFunctions_noop", + "description": "No-op function", + "parameters": [] + }, + "TestFunctions_sum": { + "class": "TestFunctions", + "name": "TestFunctions_sum", + "description": "Calculates the sum of two numbers. Always use this when needing to sum numbers.", + "parameters": [ + { + "index": 0, + "name": "num1", + "type": "number", + "description": "The first number" + }, + { + "index": 1, + "name": "num2", + "type": "number", + "description": "The second number" + } + ], + "returnType": "number", + "returns": "The sum of the numbers" + }, + "TestFunctions_skyColour": { + "class": "TestFunctions", + "name": "TestFunctions_skyColour", + "description": "Returns what colour the sky is", + "parameters": [] + }, + "TestFunctions_throwError": { + "class": "TestFunctions", + "name": "TestFunctions_throwError", + "description": "This function always throws an error", + "parameters": [] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/util.json b/.typedai/functions/src/functions/util.json new file mode 100644 index 000000000..b750b57a4 --- /dev/null +++ b/.typedai/functions/src/functions/util.json @@ -0,0 +1,44 @@ +{ + "LlmTools_processText": { + "class": "LlmTools", + "name": "LlmTools_processText", + "description": "Uses a large language model to transform the input content by applying the provided natural language instruction", + "parameters": [ + { + "index": 0, + "name": "text", + "type": "string", + "description": "The input text" + }, + { + "index": 1, + "name": "descriptionOfChanges", + "type": "string", + "description": "A description of the changes/processing to apply to the text" + } + ], + "returnType": "string", + "returns": "The processed text" + }, + "LlmTools_analyseFile": { + "class": "LlmTools", + "name": "LlmTools_analyseFile", + "description": "Uses a large language model to analyse an image or document", + "parameters": [ + { + "index": 0, + "name": "filePath", + "type": "string", + "description": "The path to the image or document" + }, + { + "index": 1, + "name": "query", + "type": "string", + "description": "A query to analyse the image or document" + } + ], + "returnType": "string", + "returns": "The analysis of the image or document" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/web/perplexity.json b/.typedai/functions/src/functions/web/perplexity.json new file mode 100644 index 000000000..2ba8384cc --- /dev/null +++ b/.typedai/functions/src/functions/web/perplexity.json @@ -0,0 +1,84 @@ +{ + "Perplexity_research": { + "class": "Perplexity", + "name": "Perplexity_research", + "description": "Calls Perplexity.ai agent to perform online research.", + "parameters": [ + { + "index": 0, + "name": "researchTask", + "type": "string", + "description": "The comprehensive, detailed task to for the AI agent with online research capabilities to answer." + }, + { + "index": 1, + "name": "saveToMemory", + "type": "boolean", + "description": "If the response should be saved to the agent memory." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "researchTask": { + "type": "string", + "description": "The comprehensive, detailed task to for the AI agent with online research capabilities to answer." + }, + "saveToMemory": { + "type": "boolean", + "description": "If the response should be saved to the agent memory." + } + }, + "required": [ + "researchTask", + "saveToMemory" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "If saveToMemory is true then returns the memory key. If saveToMemory is false then returns the research contents." + }, + "Perplexity_webSearch": { + "class": "Perplexity", + "name": "Perplexity_webSearch", + "description": "Performs a web search using Perplexity's search API.", + "parameters": [ + { + "index": 0, + "name": "query", + "type": "string | string[]", + "description": "The search query." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The search query." + } + }, + "required": [ + "query" + ], + "additionalProperties": false + }, + "returnType": "PerplexitySearchResponse", + "returns": "The search results with titles, URLs, snippets.", + "typeDefinitions": [ + { + "name": "PerplexitySearchResponse", + "properties": [ + { + "name": "results", + "type": "PerplexitySearchResult[]", + "optional": false + } + ] + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/functions/web/web.json b/.typedai/functions/src/functions/web/web.json new file mode 100644 index 000000000..f949e6b83 --- /dev/null +++ b/.typedai/functions/src/functions/web/web.json @@ -0,0 +1,98 @@ +{ + "PublicWeb_getWebPage": { + "class": "PublicWeb", + "name": "PublicWeb_getWebPage", + "description": "Get the contents of a web page on the public open internet at the provided URL. NOTE: Do NOT use this for URLs websites/SaaS which would require authentication.", + "parameters": [ + { + "index": 0, + "name": "url", + "type": "string", + "description": "{string} The web page URL (https://...)" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "{string} The web page URL (https://...)" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The web page contents in Markdown format" + }, + "PublicWeb_downloadFile": { + "class": "PublicWeb", + "name": "PublicWeb_downloadFile", + "description": "Downloads a file from the specified URL and saves it locally.", + "parameters": [ + { + "index": 0, + "name": "url", + "type": "string", + "description": "The URL of the file to download." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The URL of the file to download." + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The local file path where the file was saved." + }, + "PublicWeb_serpApiSearch": { + "class": "PublicWeb", + "name": "PublicWeb_serpApiSearch", + "description": "Performs a Google search and returns the URL and title of the search results", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "PublicWeb_takeScreenshotAndLogs": { + "class": "PublicWeb", + "name": "PublicWeb_takeScreenshotAndLogs", + "description": "Takes a screenshot of a web page while hiding cookie banners", + "parameters": [ + { + "index": 0, + "name": "url", + "type": "string", + "description": "The URL of the web page to screenshot. Must be a complete URL with http(s)://" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The URL of the web page to screenshot. Must be a complete URL with http(s)://" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "returnType": "{ image: ImageSource; logs: string[]; }", + "returns": "The screenshot image data in .png format, and the browser logs" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/modules/slack/slack.json b/.typedai/functions/src/modules/slack/slack.json new file mode 100644 index 000000000..e2d8cf08a --- /dev/null +++ b/.typedai/functions/src/modules/slack/slack.json @@ -0,0 +1,28 @@ +{ + "Slack_sendMessage": { + "class": "Slack", + "name": "Slack_sendMessage", + "description": "Sends a message to the supervisor", + "parameters": [ + { + "index": 0, + "name": "message", + "type": "string", + "description": "The message text" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The message text" + } + }, + "required": [ + "message" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/modules/slack/slackSupportBotFunctions.json b/.typedai/functions/src/modules/slack/slackSupportBotFunctions.json new file mode 100644 index 000000000..acca83e44 --- /dev/null +++ b/.typedai/functions/src/modules/slack/slackSupportBotFunctions.json @@ -0,0 +1,18 @@ +{ + "SlackSupportBotFunctions_getCoreDocumentation": { + "class": "SlackSupportBotFunctions", + "name": "SlackSupportBotFunctions_getCoreDocumentation", + "description": "", + "parameters": [], + "returnType": "string", + "returns": "The core documentation which must be known to resolve support requests" + }, + "SlackSupportBotFunctions_searchDocs": { + "class": "SlackSupportBotFunctions", + "name": "SlackSupportBotFunctions_searchDocs", + "description": "", + "parameters": [], + "returnType": "string", + "returns": "The search various sources (docs, wiki, issues etc) for content relevant to the support request." + } +} \ No newline at end of file diff --git a/.typedai/functions/src/swe/aideCodeEditor.json b/.typedai/functions/src/swe/aideCodeEditor.json new file mode 100644 index 000000000..5bebae9f9 --- /dev/null +++ b/.typedai/functions/src/swe/aideCodeEditor.json @@ -0,0 +1,21 @@ +{ + "AiderCodeEditor_editFilesToMeetRequirements": { + "class": "AiderCodeEditor", + "name": "AiderCodeEditor_editFilesToMeetRequirements", + "description": "Makes the changes to the project files to meet the task requirements", + "parameters": [ + { + "index": 0, + "name": "requirements", + "type": "string", + "description": "The complete task requirements with all the supporting documentation and code samples" + }, + { + "index": 1, + "name": "filesToEdit", + "type": "string[]", + "description": "The names of any existing relevant files to edit" + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/swe/aiderCodeEditor.json b/.typedai/functions/src/swe/aiderCodeEditor.json new file mode 100644 index 000000000..393ec12aa --- /dev/null +++ b/.typedai/functions/src/swe/aiderCodeEditor.json @@ -0,0 +1,42 @@ +{ + "AiderCodeEditor_editFilesToMeetRequirements": { + "class": "AiderCodeEditor", + "name": "AiderCodeEditor_editFilesToMeetRequirements", + "description": "Makes the changes to the project files to meet the task requirements", + "parameters": [ + { + "index": 0, + "name": "requirements", + "type": "string", + "description": "The complete task requirements with all the supporting documentation and code samples" + }, + { + "index": 1, + "name": "filesToEdit", + "type": "string[]", + "description": "The names of any existing relevant files to edit" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "requirements": { + "type": "string", + "description": "The complete task requirements with all the supporting documentation and code samples" + }, + "filesToEdit": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The names of any existing relevant files to edit" + } + }, + "required": [ + "requirements", + "filesToEdit" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/swe/codeEditingAgent.json b/.typedai/functions/src/swe/codeEditingAgent.json new file mode 100644 index 000000000..b5a514a30 --- /dev/null +++ b/.typedai/functions/src/swe/codeEditingAgent.json @@ -0,0 +1,42 @@ +{ + "CodeEditingAgent_implementDetailedDesignPlan": { + "class": "CodeEditingAgent", + "name": "CodeEditingAgent_implementDetailedDesignPlan", + "description": "Edits the files to implement the plan and commits changes to version control\nIt also compiles, formats, lints, and runs tests where applicable.", + "parameters": [ + { + "index": 0, + "name": "implementationPlan", + "type": "string", + "description": "The detailed implementation plan to make the changes for. Include any git branch and commit naming conventions to follow" + }, + { + "index": 1, + "name": "fileSelection", + "type": "string[]", + "description": "{string[]} An array of files which the code editing agent will have access to." + } + ], + "inputSchema": { + "type": "object", + "properties": { + "implementationPlan": { + "type": "string", + "description": "The detailed implementation plan to make the changes for. Include any git branch and commit naming conventions to follow" + }, + "fileSelection": { + "type": "array", + "items": { + "type": "string" + }, + "description": "{string[]} An array of files which the code editing agent will have access to." + } + }, + "required": [ + "implementationPlan", + "fileSelection" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/swe/codeFunctions.json b/.typedai/functions/src/swe/codeFunctions.json new file mode 100644 index 000000000..1f8e20b5f --- /dev/null +++ b/.typedai/functions/src/swe/codeFunctions.json @@ -0,0 +1,82 @@ +{ + "CodeFunctions_initialiseProject": { + "class": "CodeFunctions", + "name": "CodeFunctions_initialiseProject", + "description": "Runs the initialise command from the .typedai.json configuration file", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "CodeFunctions_compileFormatLintTest": { + "class": "CodeFunctions", + "name": "CodeFunctions_compileFormatLintTest", + "description": "Compiles, lints and runs tests the project using the commands from the .typedai.json config file", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "CodeFunctions_queryRepository": { + "class": "CodeFunctions", + "name": "CodeFunctions_queryRepository", + "description": "Searches across files under the current working directory to provide an answer to the query", + "parameters": [ + { + "index": 0, + "name": "query", + "type": "string", + "description": "The detailed natural language query" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The detailed natural language query" + } + }, + "required": [ + "query" + ], + "additionalProperties": false + }, + "returnType": "string", + "returns": "The response from the query agent" + }, + "CodeFunctions_findRelevantFiles": { + "class": "CodeFunctions", + "name": "CodeFunctions_findRelevantFiles", + "description": "Selects a set of files relevant to the requirements provided.", + "parameters": [ + { + "index": 0, + "name": "requirements", + "type": "string", + "description": "The detailed requirements to implement, or a detailed natural language query about the repository codebase" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "requirements": { + "type": "string", + "description": "The detailed requirements to implement, or a detailed natural language query about the repository codebase" + } + }, + "required": [ + "requirements" + ], + "additionalProperties": false + }, + "returnType": "string[]", + "returns": "A list of the relevant files" + } +} \ No newline at end of file diff --git a/.typedai/functions/src/swe/coder/searchReplaceCoder.json b/.typedai/functions/src/swe/coder/searchReplaceCoder.json new file mode 100644 index 000000000..c9cef8c9d --- /dev/null +++ b/.typedai/functions/src/swe/coder/searchReplaceCoder.json @@ -0,0 +1,78 @@ +{ + "SearchReplaceCoder_editFilesToMeetRequirements": { + "class": "SearchReplaceCoder", + "name": "SearchReplaceCoder_editFilesToMeetRequirements", + "description": "Makes the changes to the project files to meet the task requirements using search/replace blocks.\nMax attempts for the LLM to generate valid and applicable edits is 5.", + "parameters": [ + { + "index": 0, + "name": "requirements", + "type": "string", + "description": "The complete task requirements with all supporting documentation and code samples." + }, + { + "index": 1, + "name": "filesToEdit", + "type": "string[]", + "description": "Relative paths of files that can be edited. These will be included in the chat context." + }, + { + "index": 2, + "name": "readOnlyFiles", + "type": "string[]", + "description": "Relative paths of files to be used as read-only context." + }, + { + "index": 3, + "name": "autoCommit", + "type": "boolean", + "description": "Whether to commit the changes automatically after applying them.", + "optional": true + }, + { + "index": 4, + "name": "dirtyCommits", + "type": "boolean", + "description": "If files which have uncommitted changes should be committed before applying changes.", + "optional": true + } + ], + "inputSchema": { + "type": "object", + "properties": { + "requirements": { + "type": "string", + "description": "The complete task requirements with all supporting documentation and code samples." + }, + "filesToEdit": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Relative paths of files that can be edited. These will be included in the chat context." + }, + "readOnlyFiles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Relative paths of files to be used as read-only context." + }, + "autoCommit": { + "type": "boolean", + "description": "Whether to commit the changes automatically after applying them." + }, + "dirtyCommits": { + "type": "boolean", + "description": "If files which have uncommitted changes should be committed before applying changes." + } + }, + "required": [ + "requirements", + "filesToEdit", + "readOnlyFiles" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/.typedai/functions/src/swe/lang/nodejs/npmPackages.json b/.typedai/functions/src/swe/lang/nodejs/npmPackages.json new file mode 100644 index 000000000..af1fdf957 --- /dev/null +++ b/.typedai/functions/src/swe/lang/nodejs/npmPackages.json @@ -0,0 +1,59 @@ +{ + "NpmPackages_getLatestNpmPackageVersion": { + "class": "NpmPackages", + "name": "NpmPackages_getLatestNpmPackageVersion", + "description": "Gets the latest version of a NPM package from registry.npmjs.org", + "parameters": [ + { + "index": 0, + "name": "packageName", + "type": "string", + "description": "The NPM package name" + } + ], + "inputSchema": { + "type": "object", + "properties": { + "packageName": { + "type": "string", + "description": "The NPM package name" + } + }, + "required": [ + "packageName" + ], + "additionalProperties": false + } + }, + "NpmPackages_getPackageInfo": { + "class": "NpmPackages", + "name": "NpmPackages_getPackageInfo", + "description": "Gets the GitHub URL and the documentation site URL, if either exist, for a NPM package.", + "parameters": [], + "inputSchema": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "returnType": "NpmPackageInfo", + "returns": "Promise<{docUrl: string; gitHubUrl: string;}>", + "typeDefinitions": [ + { + "name": "NpmPackageInfo", + "properties": [ + { + "name": "docUrl", + "type": "string | null", + "optional": false + }, + { + "name": "gitHubUrl", + "type": "string | null", + "optional": false + } + ] + } + ] + } +} \ No newline at end of file diff --git a/.typedai/functions/src/swe/lang/nodejs/typescriptRefactor.json b/.typedai/functions/src/swe/lang/nodejs/typescriptRefactor.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/.typedai/functions/src/swe/lang/nodejs/typescriptRefactor.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.typedai/functions/src/swe/lang/nodejs/typescriptTools.json b/.typedai/functions/src/swe/lang/nodejs/typescriptTools.json new file mode 100644 index 000000000..214dcaaed --- /dev/null +++ b/.typedai/functions/src/swe/lang/nodejs/typescriptTools.json @@ -0,0 +1,82 @@ +{ + "TypescriptTools_runNpmScript": { + "class": "TypescriptTools", + "name": "TypescriptTools_runNpmScript", + "description": "Runs the command `npm run