Skip to content
Merged
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
18 changes: 8 additions & 10 deletions code-review-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,15 @@ cp .env.example .env.local

## 2. Import Tilde State

Replace `https://YOUR_DEPLOYMENT.example/api/code-review` in
[`tilde-state.yaml`](./tilde-state.yaml) with the endpoint you intend to use.
For local development, use the public URL from your Tilde development tunnel.
Set `CODEX_REVIEW_CHATKIT_ENDPOINT_URL` when importing
[`tilde.state.yaml`](./tilde.state.yaml) to the complete endpoint you intend to use.

Import from Mission Control, or with the Tilde CLI:
[![Deploy with Tilde](https://api.trytilde.ai/deploy-button.svg)](https://api.trytilde.ai/deploy?repository-url=https%3A%2F%2Fgithub.com%2Ftrytilde%2Fexamples&state-path=code-review-bot%2Ftilde.state.yaml)

```bash
tilde auth login
tilde auth set-team
tilde state import tilde-state.yaml .tilde/imports/code-review-output.yaml
```
For local development, use the public URL from your Tilde development tunnel.

Use the deploy button above, or import the file from Mission Control and provide
the variable when prompted.

The state creates:

Expand Down Expand Up @@ -211,7 +209,7 @@ found.
- [`lib/tilde.ts`](./lib/tilde.ts): the single configured Harness SDK client.
- [Tilde Harness SDK](https://github.com/trytilde/harness-sdk): ChatKit, MCP,
reverse-proxy, and typed provider-context integration.
- [`tilde-state.yaml`](./tilde-state.yaml): portable Tilde resources.
- [`tilde.state.yaml`](./tilde.state.yaml): portable Tilde resources.

## Limitations

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
metadata:
name: code-review-bot
description: GitHub pull request reviewer with Tilde MCP and a Modal sandbox.
variables:
CODEX_REVIEW_CHATKIT_ENDPOINT_URL:
type: string
description: ex. https://acme.com/api/agent. The planned URL to your Tilde agent.
resources:
chatkit/agent/code-review:
configuration:
local_running_endpoint: false
local_runtime_path: /api/code-review
provider: chatkit.http-vercel-ai-sdk
streaming: true
timeout_ms: 300000
displayName: Code Review
enabled: true
endpointUrl: https://YOUR_DEPLOYMENT.example/api/code-review
endpointUrl: ${CODEX_REVIEW_CHATKIT_ENDPOINT_URL}
chatkit/provider/trytilde:
refs:
default_agent: chatkit/agent/code-review
defaultAgentInboxId: code-review
desiredEnabled: true
displayName: GitHub
providerConfiguration: {}
providerId: chatkit.channel.github
credential/setup_item/github:
credentialSourceTypeId: server_token_exchange
desiredEnabled: true
Expand All @@ -23,6 +34,7 @@ resources:
ownerType: tool_group_instance
provider_display_name: GitHub
provider_icon_key: github
provider_provisioner_id: provider_provisioner.github
source: state_import
ownerId: github
ownerType: state_import_credential
Expand Down Expand Up @@ -62,6 +74,39 @@ resources:
status: brokering_initiated
toolGroupSourceTypeId: modal_sandbox
userCredentialId: null
reverse_proxy/profile/github-rest:
refs:
resource_server_credential: credential/setup_item/github
baseUrl: https://api.github.com
customHeaders: {}
desiredEnabled: true
displayName: GitHub REST
ownerId: null
providerId: github
resourceServerCredentialId: null
userCredentialId: null
reverse_proxy/profile/github-git-https:
refs:
resource_server_credential: credential/setup_item/github
baseUrl: https://github.com
customHeaders: {}
desiredEnabled: true
displayName: GitHub Git HTTPS
ownerId: null
providerId: github_git_https
resourceServerCredentialId: null
userCredentialId: null
reverse_proxy/profile/modal-sandbox-api:
refs:
resource_server_credential: credential/setup_item/modal-sandbox
baseUrl: https://api.modal.com
customHeaders: {}
desiredEnabled: true
displayName: Modal
ownerId: null
providerId: modal_sandbox
resourceServerCredentialId: null
userCredentialId: null
mcp/server/code-review:
refs:
tool_provider_github: mcp/tool_provider/github
Expand Down
10 changes: 7 additions & 3 deletions sentry-remediation-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ Sentry note. It does not resolve the issue before deployment.

## Setup

[![Deploy with Tilde](https://api.trytilde.ai/deploy-button.svg)](https://api.trytilde.ai/deploy?repository-url=https%3A%2F%2Fgithub.com%2Ftrytilde%2Fexamples&state-path=sentry-remediation-bot%2Ftilde.state.yaml)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Deploy imports placeholder signing secret

When a user follows this deploy button, Tilde imports the committed state file directly with REPLACE_WITH_SENTRY_APP_CLIENT_SECRET as its webhook signing key, causing Sentry webhook verification to fail and preventing remediation sessions from starting.


1. Run `pnpm install` and copy `.env.example` to `.env.local`.
2. Replace the deployment URL and `REPLACE_WITH_SENTRY_APP_CLIENT_SECRET` in
`tilde-state.yaml` before importing it. Never commit the real secret.
3. Import state with `tilde state import tilde-state.yaml .tilde/imports/sentry-remediation-output.yaml`.
2. Set `SENTRY_REMEDIATION_CHATKIT_ENDPOINT_URL` during import and replace
`REPLACE_WITH_SENTRY_APP_CLIENT_SECRET` in `tilde.state.yaml`. Never commit
the real secret.
3. Use the deploy button above, or import `tilde.state.yaml` from Mission Control
and provide the variable when prompted.
4. Complete the pending Sentry, GitHub, and Modal credentials in Mission Control.
The Sentry API token needs `org:read`, `project:read`, `event:read`, and
`event:write`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
metadata:
name: sentry-remediation-bot
description: Sentry issue signals routed to a GitHub and Modal remediation agent.
variables:
SENTRY_REMEDIATION_CHATKIT_ENDPOINT_URL:
type: string
description: ex. https://acme.com/api/agent. The planned URL to your Tilde agent.
resources:
chatkit/agent/sentry-remediation:
configuration:
local_running_endpoint: false
local_runtime_path: /api/sentry-remediation
provider: chatkit.http-vercel-ai-sdk
streaming: true
timeout_ms: 300000
displayName: Sentry Remediation
enabled: true
endpointUrl: https://YOUR_DEPLOYMENT.example/api/sentry-remediation
endpointUrl: ${SENTRY_REMEDIATION_CHATKIT_ENDPOINT_URL}

credential/setup_item/github:
credentialSourceTypeId: server_token_exchange
credentialSourceTypeId: api_key
desiredEnabled: true
displayName: GitHub
metadata:
Expand All @@ -28,7 +31,7 @@ resources:
status: pending
mcp/tool_provider/github:
refs: { resource_server_credential: credential/setup_item/github }
credentialSourceTypeId: server_token_exchange
credentialSourceTypeId: api_key
displayName: GitHub
resourceServerCredentialId: null
status: brokering_initiated
Expand All @@ -46,6 +49,17 @@ resources:
resourceServerCredentialId: null
userCredentialId: null

reverse_proxy/profile/github-rest:
refs: { resource_server_credential: credential/setup_item/github }
providerId: github
baseUrl: https://api.github.com
customHeaders: {}
desiredEnabled: true
displayName: GitHub REST
ownerId: null
resourceServerCredentialId: null
userCredentialId: null

credential/setup_item/modal-sandbox:
credentialSourceTypeId: modal_custom_json_schema
desiredEnabled: true
Expand All @@ -68,6 +82,17 @@ resources:
toolGroupSourceTypeId: modal_sandbox
userCredentialId: null

reverse_proxy/profile/modal-sandbox-api:
refs: { resource_server_credential: credential/setup_item/modal-sandbox }
providerId: modal_sandbox
baseUrl: https://api.modal.com
customHeaders: {}
desiredEnabled: true
displayName: Modal
ownerId: null
resourceServerCredentialId: null
userCredentialId: null

credential/setup_item/sentry:
credentialSourceTypeId: api_key
desiredEnabled: true
Expand All @@ -91,8 +116,27 @@ resources:
toolGroupSourceTypeId: sentry
userCredentialId: null

reverse_proxy/profile/sentry-rest:
refs: { resource_server_credential: credential/setup_item/sentry }
providerId: sentry
baseUrl: https://sentry.io/api/0
customHeaders: {}
desiredEnabled: true
displayName: Sentry REST
ownerId: null
resourceServerCredentialId: null
userCredentialId: null

mcp/tool_provider/tilde-human-approval:
credentialSourceTypeId: no_auth
displayName: Tilde Human Approval
resourceServerCredentialId: null
status: active
toolGroupSourceTypeId: tilde_human_approval
userCredentialId: null

signals/provider_instance/spi_6a4815cc-449d-4a10-bf1c-a30717442071:
providerType: sentry
signalProviderSourceTypeId: sentry
credentialSourceTypeId: no_auth
displayName: Sentry Issues
desiredEnabled: true
Expand Down Expand Up @@ -124,6 +168,7 @@ resources:
tool_provider_github: mcp/tool_provider/github
tool_provider_modal_sandbox: mcp/tool_provider/modal-sandbox
tool_provider_sentry: mcp/tool_provider/sentry
tool_provider_tilde_human_approval: mcp/tool_provider/tilde-human-approval
displayName: Sentry Remediation
isDynamicToolDiscovery: false
functions:
Expand All @@ -145,6 +190,7 @@ resources:
- { configuredParams: {}, enabled: true, toolDescription: Read a full Sentry event and stacktrace., toolGroupInstanceId: sentry, toolGroupSourceTypeId: sentry, toolName: sentry_get_event_stacktrace, toolSourceTypeId: sentry_get_event_stacktrace }
- { configuredParams: {}, enabled: true, toolDescription: Assign or update a Sentry issue., toolGroupInstanceId: sentry, toolGroupSourceTypeId: sentry, toolName: sentry_update_issue, toolSourceTypeId: sentry_update_issue }
- { configuredParams: {}, enabled: true, toolDescription: Add a visible note to a Sentry issue., toolGroupInstanceId: sentry, toolGroupSourceTypeId: sentry, toolName: sentry_add_issue_note, toolSourceTypeId: sentry_add_issue_note }
- { configuredParams: {}, enabled: true, toolDescription: Wait for human assistance when remediation needs approval or credentials., toolGroupInstanceId: tilde-human-approval, toolGroupSourceTypeId: tilde_human_approval, toolName: wait_for_human_assistance_to_complete, toolSourceTypeId: wait_for_human_assistance_to_complete }
- { configuredParams: {}, enabled: true, toolDescription: Search GitHub issues and pull requests for related work., toolGroupInstanceId: github, toolGroupSourceTypeId: github, toolName: github_search_issues, toolSourceTypeId: github_search_issues }
- { configuredParams: {}, enabled: true, toolDescription: Read a matching GitHub issue or pull request., toolGroupInstanceId: github, toolGroupSourceTypeId: github, toolName: github_get_issue, toolSourceTypeId: github_get_issue }
- { configuredParams: {}, enabled: true, toolDescription: List open pull requests to avoid duplicates., toolGroupInstanceId: github, toolGroupSourceTypeId: github, toolName: github_list_pull_requests, toolSourceTypeId: github_list_pull_requests }
Expand Down
Loading