Paseo GitHub Proxy

How it works

The proxy runs inside the Paseo daemon, as part of the plugin. There is no external service.

The injected tools

When an agent session opens, the plugin adds its github_* tools to it (Paseo exposes plugin agent tools to the agent as MCP tools). Every agent gets them; sessions opened for history do not. With the soft rule on, a short instruction is also added to the system prompt: saved when an agent is created (the only path on Paseo 0.16, marked in the agent metadata) and appended when a session opens on Paseo 0.17 or later, and each tool description says to use it instead of gh or curl.

The pipeline of one call

  1. Classify. A curated tool states its action (for example create_pr). github_api is classified from the request: the method, the path, or the GraphQL root fields.
  2. Owner allowlist. Every owner the call touches must be allowed. A call that cannot be tied to an owner is refused, unless every owner is allowed.
  3. Policy. Each needed action is checked. A matching deny rule wins, then an allow rule, then the default permissions. A denial returns a message naming the rule and reason.
  4. Cache. A read younger than the TTL is answered locally. An older one is sent with If-None-Match; a 304 costs no rate limit and restarts the clock.
  5. Credentials. The active source is used, then the other if fallback is on. With GitHub Apps, the App is chosen by the owner of the call: the App claiming it, else the default App. A credential that is rate limited is skipped until it resets.
  6. Response. The rate-limit headers are recorded, the response is cached, a write drops the cached reads of that repository, and the call is added to the activity log.

Cache

Entries are keyed by method, URL and request body, kept in memory and in cache.json so they survive a restart, and trimmed oldest-used first (500 entries or about 25 MB). Reads are served locally for the TTL (30 seconds by default, 0 to 3600, set in the Policy tab). Past it, the saved ETag is sent. GraphQL queries have no ETag, so they are cached by TTL only; mutations are never cached.

Rate limits

The plugin tracks x-ratelimit-* per credential (the gh CLI and each GitHub App) and per resource (core, graphql, search). A credential is blocked until its reset (the other Apps keep working) when a response says the limit is exhausted, carries retry-after, or reports a secondary limit. With nothing left to try, the agent gets a cached answer marked as stale when one exists, and otherwise an error such as Retry at 14:07 (in about 12 min). The Overview tab shows the remaining count, a live countdown, and a warning when a limit is nearly used up.

Policy

A policy is a default list of allowed actions (from a preset, read-only by default) plus ordered rules. See the reference for the actions and how generic calls are classified. The generic github_api tool can never bypass a rule: a merge through it needs both merge and generic_api_write.

What is stored, and where

FileContents
config.jsonActive source, fallback, allowed owners, TTL, soft rule, hard rule, policy.
apps.jsonThe GitHub Apps: organization, App ID, installation ID, extra owners, default flag. No secret.
secrets.json (0600)The private key of each GitHub App.
cache.jsonCached GitHub responses, kept per credential so an answer is never shared between Apps.

All four are in $PASEO_HOME/plugin-data/lerenn/paseo-github-proxy/. The activity log and counters live in memory and reset when the plugin restarts.

Limits