Files
RockChinQandmultica-agent e18195bc7c fix(plugins): name the installation binding instead of re-creating an invocation (#2915)
ai-source-v2 finding F-01 for RockChinQ/GitHubKit 0.2.3: the background poller
wrapped its whole lifetime in bind_invocation(handler, config, binding), so
after the scheduling command ended the loop still ran under a freshly created,
active invocation - tenant config, GitHub token and Host authority retained
outside the SDK's invocation lifetime.

Background Host calls (plugin KV read/write and message pushes) now pass the
immutable installation binding as their explicit action_context. call_action
validates it against the live connection (Workspace, installation, revision and
artifact), so the Host decides whether that installation may still act and
refuses a detached or superseded revision. The poller task starts in an empty
Context and keeps no invocation and no config snapshot; GC-visible token,
interval and language settings are re-read when the poller is (re)created.

Co-authored-by: multica-agent <github@multica.ai>
2026-11-06 17:19:20 +08:00
..

GitHubKit — GitHub toolbox in your IM

Query GitHub, search repositories, and push repository events (commits / PRs / issues / releases / stars / forks) into any chat. Powered by background polling of the GitHub Events API, so it needs no public webhook ingress and works in any deployment.

简体中文

Commands

Query / integration

Command Description
!gh repo <owner/repo> Repo info (stars/forks/language/license…)
!gh issues <owner/repo> [open|closed|all] Issue list
!gh prs <owner/repo> [open|closed|all] PR list
!gh issue <owner/repo> <number> Issue/PR detail
!gh releases <owner/repo> Release list
!gh user <username> User info
!gh search <keyword> Search repos (by stars)

You can also paste a repo URL directly (https://github.com/owner/repo).

Event push (subscriptions)

Command Description
!gh sub <owner/repo> [events...] Subscribe push to this chat
!gh unsub <owner/repo> Unsubscribe
!gh subs List this chat's subscriptions

Event types (multi-select, default all): push(commits) / pr / issue / release / star / fork.

Example:

!gh sub langbot-app/LangBot push pr release

Only posts when that repo has new commits, PR changes, or a new release.

How it works

  • On the first invocation of an installation the plugin starts a background asyncio poller for that installation's subscriptions, fetching GET /repos/{owner}/{repo}/events at the configured interval. Pollers are keyed by installation binding and stopped by on_installation_revoked.
  • Deduplicates with last_event_id, pushing only events newer than the last seen; on first subscription it records the current cursor and never backfills history.
  • Subscriptions (including bot_uuid + chat target) are persisted in the plugin KV store, so push continues after a restart.

Configuration

  • language (default zh_Hans): language for all bot messages and event-push notifications — en_US or zh_Hans.
  • github_token: GitHub personal access token. Strongly recommended — raises the rate limit from 60/hr to 5000/hr (required for event polling) and enables private repos.
  • poll_interval (default 120, min 60): poll interval in seconds. GitHub caches the events feed ~60s, so lower values don't help.
  • max_events_per_push (default 5): max events per repo per push, to avoid flooding after downtime.

Rate limit note

Without a token the anonymous quota is only 60 requests/hour, which a few subscribed repos will exhaust quickly. Always configure a token for production use.

Shared runtime

manifest.yaml declares sharedRuntime: shared-runtime-v1 + componentModel: stateless-v1, so this plugin can be placed on a multi-tenant shared worker: config is read per invocation, subscriptions are namespaced per installation, and each installation's poller is stopped in on_installation_revoked. See SHARED_RUNTIME.md for what is per-invocation, what is binding-keyed, and the known limits. This source is not certified.