Add TRACaBot OpenClaw Telegram integration#9
Open
brxtrac wants to merge 9 commits into
Open
Conversation
Author
|
Correction to previous comment: shell formatting stripped inline code values. Updated for bounty review requirements:
Demo assets:
|
Author
|
Updated the PR description again after reviewing the current TRACaBot command surface. Corrections made:
Verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bounty Reference
Submitted for OriginTrail DKG v10 Bounty Program Round 1 (
cfi-dkgv10-r1): Working and Shared Memory integrations for LLM-Wiki/autoresearch agents, with OpenClaw as a priority target under Section 5.Summary
tracabot is a live OpenClaw-compatible Telegram anti-scam agent. It detects phishing, fake airdrops, investment testimonial scams, support/admin impersonation, join-then-rename impersonators, off-platform DM impersonators, suspicious moderation events, and low-risk joins that must verify with a DKG Knowledge Asset challenge, then writes structured scam knowledge to DKG v10 Shared Working Memory in the
tracabotContext Graph.It now also exposes a concrete OpenClaw skill surface through
skills/tracabot/skill.jsonandbin/tracabot-skill.js, allowing OpenClaw agents to call scan, explain, watchlist, digest, campaign, appeal, and review tools directly as JSON.TRACaBot also supports bounded conversational safety replies in Telegram. It keeps its own standalone Telegram token while optionally inheriting local OpenClaw OAuth/model/gateway configuration for LLM-drafted answers to scam-safety questions. If OpenClaw chat access is unavailable, it falls back to deterministic evidence templates.
The differentiator is the shared persistent memory loop: one community's accepted report, DM scam report, fraud finding, or ban becomes queryable DKG intelligence for every other community running tracabot against the same Context Graph. A bad actor who tests a scam in one channel or in private DMs can be flagged elsewhere by Telegram user ID, username/display-name alias, reported alias, wallet, domain, or scam pattern before repeating the attack.
Current Telegram commands registered on startup:
/start: opens the inline TRACaBot protection menu for stats, reviews, explanations, enforcement history, and settings./scan: checks a user, Telegram ID, wallet, replied user, or replied SangMata rename alert against local heuristics and DKG Shared Memory./report: queues suspicious replied messages, usernames, wallets, links, forwarded DMs, screenshots, or natural-language evidence for admin review./ban: admin-only command that bans a replied user or supported SangMata rename target when the bot has Telegram ban rights, then logs evidence./mute: admin-only command that temporarily restricts a replied or mentioned user.Stats, campaigns, sources, pending reviews, settings/status, recent enforcement actions, event explanations, and per-chat join challenge toggles are available through
/startmenu buttons rather than separate public slash commands. Admins can also reply naturally to review alerts with explicit verdicts such as "confirm scam" or "reject as not a scam"; non-admin corrections are logged as appeals. Low-risk new members can be gated by the optional DKG Knowledge Asset join challenge; challenge state, per-chat overrides, and one-off failed attempts remain local-only unless repeated abuse qualifies as aggregate shared-memory intelligence.OpenClaw skill tools are also available:
scan_target,monitor_chat_event,sort_conversation_artifact,explain_event,get_watchlist,get_digest,query_campaigns,submit_appeal,review_event,decide_artefact_action, andgenerate_safe_tip.DKG v10 Fit
DkgDaemonClientagainst the local DKG v10 daemon.sharewrites evidence-backed findings to Shared Memory with actor IDs, aliases, wallets, domains, patterns, campaign signals, confidence, evidence, target metadata, restriction expiry, review decisions, and moderation outcome;queryreads the same graph withincludeSharedMemory: truebefore scoring new joins, first posts,/scan, and/reporttargets. Plain watchlist monitoring and weak reports stay local-only.createAssertion,writeAssertion, andpromoteAssertionfor Working Memory to Shared Working Memory flow;shareremains supported as a compatibility fallback./startmenu, natural-language admin review replies, non-admin appeal logging, and OpenClawexplain_event/submit_appeal/review_eventtools make decisions explainable and correctable while preserving an auditable DKG trail instead of silently rewriting moderation history.Verification
Live DKG v10 / OpenClaw adapter verification:
Review and governance paths are covered in the automated test suite, including non-admin appeal logging, admin review callbacks, reply-based review inference from bot alerts, false-positive suppression after overturns,
/startreview queues, and visible persistent review confirmations.Tests and audit:
Telegram runtime:
Demo assets:
Security Attestation
I attest that this code is my own work or properly licensed, contains no intentional backdoors, uses no dynamic remote code loading, and has no preinstall or postinstall scripts. Network egress is declared as
api.telegram.orgplus the configured local DKG node. DKG write authority is limited to Context Graph creation, Shared Memory writes, Shared Memory queries, and targeted auto-publishing of qualifying high-confidence fraud events through the configured Curator-authorized runtime.The registry install points to the published provenance-backed
tracabot@1.0.0package, while the source, design brief, and demo links are pinned to the final reviewed commit for this PR.Maintenance
Maintainer: brxtrac
Support window: at least six months after registry acceptance.