Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,52 @@ jobs:
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
pr_branch: ${{ steps.release.outputs.pr_head_branch_name }}
pr_created: ${{ steps.release.outputs.pr_created }}
steps:
- name: Release Please
id: release
uses: googleapis/release-please-action@v4
with:
release-type: python

# Sync uv.lock for the release PR
sync-uv-lock:
needs: release-please
if: ${{ needs.release-please.outputs.pr_created == 'true' || needs.release-please.outputs.pr_branch != '' }}
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.RELEASER_APP_ID || vars.GH_APP_ID }}
private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY || secrets.GH_APP_PRIVATE_KEY }}
# Fallback to standard GITHUB_TOKEN if app credentials aren't set
continue-on-error: true

- uses: actions/checkout@v4
with:
ref: ${{ needs.release-please.outputs.pr_branch }}
# Use App Token if available (to bypass branch protections), otherwise use default token
token: ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Update uv.lock
run: uv lock

- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add uv.lock
# Only commit if there are changes
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: sync uv.lock with pyproject.toml [skip ci]" && git push)

# Trigger publish workflow when release is created
publish:
needs: release-please
Expand Down
63 changes: 63 additions & 0 deletions opencode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"agent-hub": {
"type": "local",
"command": ["npx", "-y", "agent-hub-mcp@latest"],
"enabled": true
},
"context-mode": {
"type": "local",
"command": ["context-mode"],
"enabled": true
},
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"enabled": true
},
"github": {
"type": "remote",
"url": "https://api.githubcopilot.com/mcp/",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:GITHUB_TOKEN}"
}
},
"opencode-docs": {
"type": "local",
"command": ["npx", "-y", "opencode-docs-mcp@latest"],
"enabled": true
},
"tmux": {
"type": "local",
"command": ["npx", "-y", "tmux-mcp"],
"enabled": true
},

"linear": { "enabled": false },
"notion": { "enabled": false },
"aws-api-staging": { "enabled": false },
"aws-api-prod": { "enabled": false },
"aws-docs": { "enabled": false },
"grafana": { "enabled": false },
"terraform-docs": { "enabled": false },
"opentofu-docs": { "enabled": false },
"kubernetes": { "enabled": false },
"argocd-staging-eks": { "enabled": false },
"argocd-prod-eks": { "enabled": false }
},
"tools": {
"linear_*": false,
"notion_*": false,
"aws-api-staging_*": false,
"aws-api-prod_*": false,
"aws-docs_*": false,
"grafana_*": false,
"terraform-docs_*": false,
"opentofu-docs_*": false,
"kubernetes_*": false,
"argocd-staging-eks_*": false,
"argocd-prod-eks_*": false
}
}
34 changes: 34 additions & 0 deletions src/opencode_agent_hub/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,40 @@ def _get_config_value(
int,
)


# =============================================================================
# Route-specific chatty throttle
# =============================================================================

CHATTY_THROTTLE_ENABLED = _get_config_value(
"AGENT_HUB_CHATTY_THROTTLE_ENABLED",
["chatty_throttle", "enabled"],
True,
_CONFIG,
bool,
)
CHATTY_THROTTLE_MAX_MESSAGES = _get_config_value(
"AGENT_HUB_CHATTY_THROTTLE_MAX_MESSAGES",
["chatty_throttle", "max_messages"],
3,
_CONFIG,
int,
)
CHATTY_THROTTLE_WINDOW_SECONDS = _get_config_value(
"AGENT_HUB_CHATTY_THROTTLE_WINDOW_SECONDS",
["chatty_throttle", "window_seconds"],
15,
_CONFIG,
int,
)
CHATTY_THROTTLE_COOLDOWN_SECONDS = _get_config_value(
"AGENT_HUB_CHATTY_THROTTLE_COOLDOWN_SECONDS",
["chatty_throttle", "cooldown_seconds"],
15,
_CONFIG,
int,
)

# =============================================================================
# Agent & Session Configuration
# =============================================================================
Expand Down
Loading
Loading