Skip to content

feat: IRC — add first-class channel support#11482

Merged
Takhoffman merged 13 commits into
mainfrom
codex/irc-first-class-channel
Feb 10, 2026
Merged

feat: IRC — add first-class channel support#11482
Takhoffman merged 13 commits into
mainfrom
codex/irc-first-class-channel

Conversation

@vignesh07

@vignesh07 vignesh07 commented Feb 7, 2026

Copy link
Copy Markdown
Member

Summary

  • add IRC as a first-class channel plugin under extensions/irc with inbound/outbound handling, config schema, onboarding hooks, monitor/probe support, and docs
  • wire IRC into channel registry/dock/config types so it appears in onboarding and shared channel surfaces
  • add IRC-focused tests for protocol parsing/sanitization, onboarding behavior, policy gates, and config validation
  • fix security/policy follow-ups:
    • honor nickserv.enabled=false during nick collision recovery so NickServ credentials are not sent when disabled
    • resolve IRC group tool/mention policy keys case-insensitively so #Ops and #ops map consistently
    • honor groupPolicy=open semantics for unconfigured channels while still respecting explicit disables

Why

  • enables IRC deployments with the same operational and policy controls available in built-in channels like Telegram and Discord
  • keeps security surfaces explicit for group access and tool execution in shared channels

Testing

  • AI-assisted: implemented along with Codex 5.3 ✨
  • Testing level: new tests added and run.
  • Manual validation performed on IRC connectivity and message flow.

Greptile Overview

Greptile Summary

This PR introduces IRC as a first-class channel plugin under extensions/irc, including protocol parsing/sanitization, an IRC client + monitor loop, inbound policy gates (DM policy, group allowlist/open/disabled, sender allowlists, mention-gating), onboarding flows, config schema/validation, and status/probe integration.

It also wires IRC into the core channel registry/dock and shared config types/zod schemas so it shows up in onboarding and common “channel surfaces” (status, policy resolution).

Confidence Score: 3/5

  • This PR is close to merge-ready but has a couple of correctness issues in IRC onboarding/policy/session semantics that should be fixed first.
  • Core integration and sanitization/policy logic look solid and are covered by new tests, but there are still mismatches in how DM targets are represented (bot nick vs peer) and how dmPolicy/open validation interacts with per-account allowFrom during onboarding. These are likely to surface as confusing behavior or invalid configs in common setups.
  • extensions/irc/src/monitor.ts, extensions/irc/src/inbound.ts, extensions/irc/src/onboarding.ts

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Feb 7, 2026
@vignesh07
vignesh07 marked this pull request as ready for review February 7, 2026 21:58
@vignesh07 vignesh07 changed the title IRC: add first-class channel support feat: IRC — add first-class channel support Feb 7, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment thread extensions/irc/src/onboarding.ts
Comment thread extensions/irc/src/send.ts
Comment thread extensions/irc/src/monitor.ts
@vignesh07
vignesh07 force-pushed the codex/irc-first-class-channel branch from a93ffd3 to 4f577a4 Compare February 7, 2026 22:02
@Takhoffman Takhoffman self-assigned this Feb 9, 2026
@Takhoffman

Takhoffman commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for pushing this through. Overall direction looks good: IRC is wired into shared channel surfaces (registry/dock/config/schema), plugin packaging looks sane, and you added a solid set of focused tests + docs.

Requests before merge

  • Config schema parity: please double-check IRC allowlist fields are consistently typed as Array<string | number> everywhere (core zod schema, any plugin schema, and runtime normalization). Today dock.ts coerces entries to String(...), and docs/examples use strings, so a mixed-type config should not fail validation in one place but pass in another.
  • Duplicate group matching logic: core now supports case-insensitive groupId matching via src/config/group-policy.ts (used by IRC dock tool/mention policy resolution), while the IRC extension also does its own case-insensitive matching in extensions/irc/src/policy.ts. Please either unify on one canonical resolver or add a small parity test so inbound enforcement stays aligned with shared surfaces (status/config UX/tool policy resolution).

Optional follow-ups (can be post-merge if you prefer)

  • In docs/channels/irc.md, consider explicitly stating that IRC config lives under channels.irc (not plugin config), since this is an extension but behaves like a first-class channel in core surfaces.

@thewilloftheshadow thewilloftheshadow added the maintainer Maintainer-authored PR label Feb 10, 2026
@vignesh07

Copy link
Copy Markdown
Member Author

Addressed all three points from your review in f2c2e63:

  1. Config schema parity for IRC allowlists
  • Extension IRC schema now accepts Array<string | number> for:
    • allowFrom
    • groupAllowFrom
    • groups[...].allowFrom
  • Extension IRC types were updated to match.
  • Added tests for numeric/mixed allowlist entries in:
    • extensions/irc/src/config-schema.test.ts
    • src/config/config.irc.test.ts
  1. Group matching parity with shared resolver
  • Added a parity test in extensions/irc/src/policy.test.ts that compares IRC inbound matching behavior against resolveChannelGroupPolicy(..., groupIdCaseInsensitive: true) for case-insensitive direct and disabled channel cases.
  1. Docs clarification
  • Added explicit note to docs/channels/irc.md that IRC ships as an extension plugin but is configured under channels.irc.

Ran locally:

  • pnpm format
  • pnpm lint
  • pnpm -s tsgo

@Takhoffman
Takhoffman merged commit fa906b2 into main Feb 10, 2026
24 checks passed
@Takhoffman
Takhoffman deleted the codex/irc-first-class-channel branch February 10, 2026 23:33
@Takhoffman

Copy link
Copy Markdown
Contributor

Merged via squash.

  • Merge commit: fa906b2
  • PR head at merge time: ecb3962
  • Local verification (merge worktree): pnpm build && pnpm check && pnpm test
  • Follow-up fixups pushed during prep:
    • a2347e4 (merge origin/main into branch)
    • ecb3962 (docs quickstart path + changelog entry)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants