Skip to main content

tai42-tools-github

License: Apache 2.0

GitHub provisioning tools for the TAI ecosystem — manifest-loaded repository-webhook setup tools that create a repository webhook, list a repository's webhooks (following Link-header pagination to exhaustion), and delete a repository webhook. They are the provider-side setup counterpart to a runtime webhook-signature verifier: these tools register the hook a verifier later authenticates.

All GitHub traffic is direct REST v3 through tai42-kit's curl client (no SDK); the X-GitHub-Api-Version header is pinned in code. The package registers its tools through the tai42_app handle from tai42_contract.app and never imports the skeleton.

The TAI ecosystem

TAI is an open-source runtime for MCP tools, agents, and workflows. A tool is a callable the host loads from a plugin manifest; this package supplies the GitHub repository-webhook provisioning tools. The ecosystem is open-ended, so this repo is these tools' own full doc home, and the documentation site covers the platform-level story:

The current release line tracks the 7.x contract (tai42-contract>=7,<8).

Install

Requires Python 3.13+. Install from PyPI into the environment that runs the server:

uv add tai42-tools-github

Or from source — clone this repo and add it as an editable dependency; the tai42-* dependencies resolve in-tree from the workspace.

git clone https://github.com/tai42ai/tai42   # next to your app checkout
cd /path/to/your/app
uv add --editable ../tai42/plugins/tools-github

Catalog

Tool Description
create_github_webhook Creates a repository webhook on owner/name and returns its id, delivery url, events and active flag. The caller supplies the signing secret; GitHub never returns it.
list_github_webhooks Lists every webhook on owner/name, following the Link header to exhaustion, returning each hook's id, delivery url, events and active flag.
delete_github_webhook Deletes the webhook hook_id from owner/name; succeeds only on GitHub's 204, otherwise raises.

The signing secret is the caller's

GitHub does not mint the webhook secret — create_github_webhook sends the secret the caller supplies, GitHub keys each delivery's X-Hub-Signature-256 with it, and the caller keeps its own copy for the verifier that authenticates inbound deliveries. GitHub never returns the secret on create or list, and these tools never echo it: it appears in no return value and in no raised message.

Error model

Every non-2xx GitHub response raises loudly with the status and body — create and list require a 2xx, delete requires exactly 204. Nothing is caught or remapped to success, and no raised message ever contains the token or the caller's secret. Redirects are not followed: a 3xx off the pinned host would replay the Authorization header to another origin, so it surfaces as its own status instead.

Configuration

Setting Env var Default Purpose
Token TOOLS_GITHUB_TOKEN The GitHub token (Authorization: Bearer). Required.
API base TOOLS_GITHUB_API_BASE https://api.github.com GitHub REST base. Privileged — receives the Authorization header.
Request timeout TOOLS_GITHUB_REQUEST_TIMEOUT_SECONDS 20 Per-request timeout.

The token needs the scope GitHub requires to administer repository webhooks (admin:repo_hook on a classic token, or repository Webhooks read/write on a fine-grained token). Secrets live only in the environment. A missing or empty token raises loudly (fails closed) — never a silently-unauthenticated request.

Development

uv venv --python 3.13
uv pip install --no-sources --extra dev --editable .
uv run --no-sync pytest --cov --cov-report=term-missing
uv run --no-sync ruff check .
uv run --no-sync ruff format --check .
uv run --no-sync pyright

License

Apache-2.0. See LICENSE and NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tai42_tools_github-1.0.8.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tai42_tools_github-1.0.8-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file tai42_tools_github-1.0.8.tar.gz.

File metadata

  • Download URL: tai42_tools_github-1.0.8.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tai42_tools_github-1.0.8.tar.gz
Algorithm Hash digest
SHA256 548844704f247867b965a1878f6970152b9ce82ed7148d194c65fab3d55a4e3e
MD5 19905f1aa8f5ecadc00d5d00d0f22f3a
BLAKE2b-256 fe97f43415e4a47ccb0b5e8c49f1808fbbc8b722e7d4550f365280407535e3fd

See more details on using hashes here.

File details

Details for the file tai42_tools_github-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for tai42_tools_github-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 77aaf8de6dc26331f3ebd26ff1fc6b67558f6ed1fbe222ff63fbd5c44ed0a8bd
MD5 505b165ae942263f6fe293de8c1ec43b
BLAKE2b-256 f0c553fc8798eb244bf0ec3c61fcad3081ce971daccddba81e482730a1e13714

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.10

2 files

1.0.9

2 files

This release

1.0.8 This release

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page