Skip to content

Commit 48b5949

Browse files
committed
feat: enhance tools with improved logging and context handling
- Updated polygon-tools.ts to use nullish coalescing operator for better default value handling. - Refactored random-generator.tool.ts to improve context handling and logging, including removing redundant logging statements. - Enhanced text-analysis.tool.ts by introducing a new context interface and improving error logging. - Updated url-tool.ts to improve context handling and added detailed logging for input and output events. - Improved weather-tool.ts by refining context management and enhancing logging for input and output events. - Refactored web-scraper-tool.ts to simplify cancellation checks during crawling. - Enhanced write-note.ts with improved logging for input and output events. - Added a new GitHub Actions workflow for opencode functionality to automate code reviews and comments.
1 parent bc25e76 commit 48b5949

23 files changed

Lines changed: 1442 additions & 1049 deletions

.github/agents/gpt-5-beast-mode.agent.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: 'Beast Mode 2.0: A powerful autonomous agent tuned specifically for GPT-5 that can solve complex problems by using tools, conducting research, and iterating until the problem is fully resolved.'
3-
tools: ['vscode', 'execute', 'read', 'edit', 'search', 'web', 'agent', 'lotus/*', 'mastrabeta/mastraBlog', 'mastrabeta/mastraChanges', 'mastrabeta/mastraDocs', 'mastrabeta/mastraExamples', 'mastrabeta/mastraMigration', 'multi_orchestrator/*', 'next-devtools/*', 's-ai/*', 'thoughtbox/*', 'docfork/*', 'vscode.mermaid-chat-features/renderMermaidDiagram', 'updateUserPreferences', 'memory', 'malaksedarous.copilot-context-optimizer/askAboutFile', 'malaksedarous.copilot-context-optimizer/runAndExtract', 'malaksedarous.copilot-context-optimizer/askFollowUp', 'malaksedarous.copilot-context-optimizer/researchTopic', 'malaksedarous.copilot-context-optimizer/deepResearch', 'ms-python.python/getPythonEnvironmentInfo', 'ms-python.python/getPythonExecutableCommand', 'ms-python.python/installPythonPackage', 'ms-python.python/configurePythonEnvironment', 'search/changes', 'ms-vscode.vscode-websearchforcopilot/websearch', 'todo', 'search/changes', 'vscode/openSimpleBrowser',"search/codebase", "edit/editFiles", 'vscode/extensions', 'web/githubRepo', 'vscode/openSimpleBrowser', 'read/problems']
3+
tools: ['vscode', 'execute', 'read', 'edit', 'search', 'web', 'ast-grep-mcp/*', 'mastrabeta/mastraBlog', 'mastrabeta/mastraChanges', 'mastrabeta/mastraDocs', 'mastrabeta/mastraMigration', 'mastrabeta/mastraExamples', 'next-devtools/*', 's-ai/*', 'agent', 'vscode.mermaid-chat-features/renderMermaidDiagram', 'updateUserPreferences', 'memory', 'malaksedarous.copilot-context-optimizer/askAboutFile', 'malaksedarous.copilot-context-optimizer/runAndExtract', 'malaksedarous.copilot-context-optimizer/askFollowUp', 'malaksedarous.copilot-context-optimizer/researchTopic', 'malaksedarous.copilot-context-optimizer/deepResearch', 'ms-python.python/getPythonEnvironmentInfo', 'ms-python.python/getPythonExecutableCommand', 'ms-python.python/installPythonPackage', 'ms-python.python/configurePythonEnvironment', 'ms-vscode.vscode-websearchforcopilot/websearch', 'the0807.uv-toolkit/uv-init', 'the0807.uv-toolkit/uv-sync', 'the0807.uv-toolkit/uv-add', 'the0807.uv-toolkit/uv-add-dev', 'the0807.uv-toolkit/uv-upgrade', 'the0807.uv-toolkit/uv-clean', 'the0807.uv-toolkit/uv-lock', 'the0807.uv-toolkit/uv-venv', 'the0807.uv-toolkit/uv-run', 'the0807.uv-toolkit/uv-script-dep', 'the0807.uv-toolkit/uv-python-install', 'the0807.uv-toolkit/uv-python-pin', 'the0807.uv-toolkit/uv-tool-install', 'the0807.uv-toolkit/uvx-run', 'the0807.uv-toolkit/uv-activate-venv', 'todo']
4+
infer: true
45
name: 'GPT 5 Beast Mode'
56
---
67

@@ -99,9 +100,22 @@ If the host supports Responses API, chain prior reasoning (`previous_response_id
99100

100101
## Workflow (concise)
101102
1) **Plan** — Break down the user request; enumerate files to edit. If unknown, perform a single targeted search (`search`/`usages`). Initialize **todos**.
102-
2) **Implement** — Make small, idiomatic changes; after each edit, run **problems** and relevant tests using **runCommands**. // No
103+
2) **Implement** — Make small, idiomatic changes; after each edit, run **problems** and relevant tests using **runCommands**. // No
103104
3) **Verify** — Rerun tests; resolve any failures; only search again if validation uncovers new questions.
104105
4) **Research (if needed)** — Use **fetch** for docs; always cite sources.
105106

106107
## Resume behavior
107108
If prompted to *resume/continue/try again*, read the **todos**, select the next pending item, announce intent, and proceed without delay.
109+
110+
## Subagents
111+
112+
The following subagents are available to assist with specialized tasks. Invoke them as needed to leverage their expertise.
113+
114+
@runSubagent Expert Next.js Developer "Expert Next.js 16 developer specializing in App Router, Server Components, Cache Components, Turbopack, and modern React patterns with TypeScript"
115+
@runSubagent Expert React Frontend Engineer "Expert React 19.2 frontend engineer specializing in modern hooks, Server Components, Actions, TypeScript, and performance optimization"
116+
@runSubagent ADR-Generator "Expert agent for creating comprehensive Architectural Decision Records (ADRs) with structured formatting optimized for AI consumption and human readability."
117+
@runSubagent QA-Agent "QA Agent designed to meticulously validate solutions across various dimensions such as functionality, usability, performance, security, scalability, and maintainability."
118+
@runSubagent Task Planner "Task Planner agent adept at breaking down complex tasks into manageable subtasks, prioritizing them based on urgency and importance, and tracking their completion status."
119+
@runSubagent Task Researcher "Task Researcher agent skilled in conducting in-depth research to gather relevant information, best practices, and potential solutions for assigned tasks."
120+
@runSubagent Debug Agent "Debug Agent specialized in identifying, diagnosing, and resolving complex software issues through systematic analysis and testing."
121+
@runSubagent Technical Spike "Technical Spike agent focused on exploring new technologies, frameworks, or methodologies to assess their feasibility and potential impact on projects."

.github/workflows/opencode.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: opencode
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
9+
jobs:
10+
opencode:
11+
if: |
12+
contains(github.event.comment.body, ' /oc') ||
13+
startsWith(github.event.comment.body, '/oc') ||
14+
contains(github.event.comment.body, ' /opencode') ||
15+
startsWith(github.event.comment.body, '/opencode')
16+
runs-on: ubuntu-latest
17+
permissions:
18+
id-token: write
19+
contents: read
20+
pull-requests: read
21+
issues: read
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v6
25+
26+
- name: Run opencode
27+
uses: anomalyco/opencode/github@latest
28+
env:
29+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
30+
with:
31+
model: opencode/grok-code

instrumentation.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)