feat: Add intelligent auto-router and enhanced integrations

- Add intelligent-router.sh hook for automatic agent routing
- Add AUTO-TRIGGER-SUMMARY.md documentation
- Add FINAL-INTEGRATION-SUMMARY.md documentation
- Complete Prometheus integration (6 commands + 4 tools)
- Complete Dexto integration (12 commands + 5 tools)
- Enhanced Ralph with access to all agents
- Fix /clawd command (removed disable-model-invocation)
- Update hooks.json to v5 with intelligent routing
- 291 total skills now available
- All 21 commands with automatic routing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
admin
2026-01-28 00:27:56 +04:00
Unverified
parent 3b128ba3bd
commit b52318eeae
1724 changed files with 351216 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
# GitHub Integration Agent
Bring GitHub context into any workspace. This agent starts the `@truffle-ai/github-mcp-server` in `stdio` mode so the assistant can explore repositories, manage pull requests, and automate GitHub project workflows directly from chat.
## What You Get
- Full coverage of GitHub toolsets (repos, pull requests, issues, actions, discussions, notifications, security, projects, and more)
- Automatic OAuth device-flow login with cached tokens, no personal access token required for most users
- Safe-guarded write operations (issues, PRs, workflow runs, comments, etc.) that the agent confirms before executing
- Optional read-only or scoped toolsets to limit the surface area for sensitive environments
## Requirements
- Node.js 18+ with access to `npx`
- A GitHub account with access to the repositories you plan to manage
- Browser access to complete the one-time device-code OAuth prompt (opened automatically)
- `OPENAI_API_KEY` (or another configured LLM key) exported in your shell for the agent
## Run the Agent
```bash
npm start -- --agent agents/github-agent/github-agent.yml
```
The CLI launches `npx -y @truffle-ai/github-mcp-server stdio`. On first run you will see a device code and a browser window prompting you to authorize the "GitHub MCP Server" application. Approving the flow stores an access token at:
```
~/.config/truffle/github-mcp/<host>-token.json
```
Subsequent sessions reuse the cached token unless it expires or you delete the file. Once the server reports it is ready, start chatting with Dexto about repositories, issues, CI failures, releases, or team activity.
## Optional Configuration
You can tailor the underlying MCP server by exporting environment variables before starting Dexto:
- `GITHUB_PERSONAL_ACCESS_TOKEN`: Provide a PAT (with `repo` and `read:user` at minimum) if you need to bypass OAuth or run in headless environments.
- `GITHUB_OAUTH_SCOPES="repo read:user"`: Override the scopes requested during the OAuth device flow (space or comma separated). Use this to request additional permissions (e.g., `gist`) or limit scopes in tightly controlled environments.
- `GITHUB_TOOLSETS="repos,issues,pull_requests,actions"`: Restrict which groups of tools the agent loads. Available groups include `repos`, `issues`, `pull_requests`, `actions`, `notifications`, `discussions`, `projects`, `code_security`, `dependabot`, `secret_protection`, `security_advisories`, `users`, `orgs`, `gists`, `context`, and `experiments`.
- `GITHUB_READ_ONLY=1`: Offer only read-only tools; write operations will be hidden.
- `GITHUB_DYNAMIC_TOOLSETS=1`: Enable on-demand toolset discovery so the model only activates tools as needed.
- `GITHUB_HOST=https://github.mycompany.com`: Point the agent at GitHub Enterprise Server or ghe.com tenants.
- `GITHUB_LOG_FILE=~/github-mcp.log` and `GITHUB_ENABLE_COMMAND_LOGGING=1`: Persist detailed MCP command logs for auditing.
- `GITHUB_CONTENT_WINDOW_SIZE=7500`: Increase the amount of content retrieved for large diffs or logs.
Refer to the upstream [`github-mcp-server`](https://github.com/github/github-mcp-server) documentation for the full flag list (every CLI flag is mirrored as an environment variable using the `GITHUB_` prefix).
## Switching to the Remote GitHub MCP Server (optional)
If you prefer to connect to the GitHub-hosted remote MCP server instead of running the bundled binary, replace the `mcpServers.github` block in `github-agent.yml` with:
```yaml
mcpServers:
github:
type: http
url: https://api.githubcopilot.com/mcp/
connectionMode: strict
```
You can optionally add `headers` for PAT authentication if your host does not support OAuth. Restart Dexto after saving the change.
## Resetting Authorization
To force a new OAuth login, delete the cached token file (`rm ~/.config/truffle/github-mcp/*-token.json`) and relaunch the agent. The next startup will trigger a fresh device flow.

View File

@@ -0,0 +1,107 @@
# GitHub Integration Agent configuration
# Connects Dexto to GitHub via the bundled GitHub MCP server binary
mcpServers:
github:
# type: http
# url: https://api.githubcopilot.com/mcp/
# # timeout: 45000
# connectionMode: strict
type: stdio
command: npx
args:
- -y
- '@truffle-ai/github-mcp-server'
- stdio
# Optional: uncomment to override the default OAuth scopes requested during the device flow
# env:
# GITHUB_OAUTH_SCOPES: 'repo read:user'
# Optional greeting shown at chat start (UI can consume this)
greeting: "🐙 Hello! I'm your GitHub Agent. How can I help with your repositories?"
systemPrompt:
contributors:
- id: primary
type: static
priority: 0
content: |
You are the GitHub Integration Agent for Dexto. Collaborate with users on GitHub repositories by leveraging the GitHub tools available in this runtime. Inspect repositories, manage pull requests and issues, coordinate releases, and share actionable guidance while honoring GitHub permissions and organizational policies.
## Core Responsibilities
- Surface repository structure, history, and code insights that help users understand the current state of their projects
- Draft, triage, and refine issues, pull requests, project boards, and release notes on request
- Perform focused code reviews, flag risky changes, and suggest remediation steps or next actions
- Present step-by-step plans before executing write operations or multi-step procedures
## Interaction Guidelines
- For queries related to starring repos, do not ask for confirmation, just star the repo
- Confirm the repository, branch, or resource when a request is ambiguous or spans multiple contexts
- For read-only requests, respond concisely and include relevant references, links, or identifiers.
- Before taking any action that modifies GitHub state, summarize the intended change and obtain confirmation
- If you are blocked (missing scopes, inaccessible repository, conflicting state), say so clearly and offer next steps or alternatives
## Tool Usage
- Prefer live GitHub data from the provided tools instead of relying on local filesystem copies or stale context
- Break complex objectives into sequential tool calls, narrating progress so the user can follow along
- After each tool interaction, decide whether additional context is needed or if you can deliver a confident answer
Stay practical, keep responses focused on the users goal, and highlight any assumptions or risks you notice.
- id: date
type: dynamic
priority: 10
source: date
enabled: true
# Storage configuration
storage:
cache:
type: in-memory
database:
type: sqlite
blob:
type: local # CLI provides storePath automatically
maxBlobSize: 52428800 # 50MB per blob
maxTotalSize: 1073741824 # 1GB total storage
cleanupAfterDays: 30
llm:
provider: openai
model: gpt-5-mini
apiKey: $OPENAI_API_KEY
# Prompts - GitHub operations examples shown as clickable buttons in WebUI
prompts:
- type: inline
id: repo-info
title: "📊 Repository Info"
description: "Get details about the Dexto repository"
prompt: "Show me information about the truffle-ai/dexto repository including stars, forks, and recent activity."
category: info
priority: 10
showInStarters: true
- type: inline
id: list-issues
title: "📋 List Issues"
description: "View open issues in Dexto"
prompt: "List all open issues in the truffle-ai/dexto repository."
category: issues
priority: 9
showInStarters: true
- type: inline
id: star-dexto
title: "⭐ Star Dexto"
description: "Star the Dexto repository"
prompt: "Star the truffle-ai/dexto repository on GitHub."
category: engagement
priority: 8
showInStarters: true
- type: inline
id: recent-commits
title: "📝 Recent Commits"
description: "View latest commits to Dexto"
prompt: "Show me the recent commits to the truffle-ai/dexto repository."
category: activity
priority: 7
showInStarters: true