MCPcopy Index your code
hub / github.com/Miezhiko/Amadeus

github.com/Miezhiko/Amadeus @16.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 16.1.0 ↗ · + Follow
446 symbols 974 edges 109 files 14 documented · 3% updated 39d ago16.1.0 · 2024-08-15★ 52
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Amadeus

Memory storage and artificial intelligence system.

FeaturesCookingDevelopmentServiceNotes

Looking for a drinks and hosting.

Build Status GitHub Appveyor GitHub contributors GitHub last commit codecov

Discord Twitter Follow

Features

  • Too many small commands
  • Slash commands support (type /)
  • Chatty (set activity 66 is default)
  • Automatic translation with rust-bert models
  • Live games tracking on w3champions
  • W3info news tracking using calendar
  • Replays parsing (click emoji to get report)
  • Points system on Cannyls
  • Emoji roles system on Cannyls
  • Various gifs commands using Tenor API
  • Using Fluent for localization
  • Sled for editable info archive
  • Plays music streams using Songbird! (~join ~play)
  • Dhall and YAML config files, dhall for per-guild teams configurations
  • Multi-server streams notifications/trackers for twitch and goodgame.ru (using channels from dhall conf)
  • Tracking pull requests of watching by some user repositories on GitHub and posting detailed PR embeds
  • Veto helper (for banning maps against some player) using W3C statistics (~veto command)
  • Versus command showing score for one player against another for x seasons (~vs command)
  • Bets on live games with ~bet and emojis under Live tracking games
  • Warcraft 3 commands ~stats, ~today and more with info from wacraft3.info and W3C ladder
  • Warcraft 3 hostbot API integration (creating games) using flo services and tonic for RPC
  • Some anti-spam protection (Free nitro scam and maybe more) using this
  • Query package atoms from Zugaina
  • Some moderation automation, like timeout commands creating room for communicating with target user.
  • Slur words auto-removal / warnings system.
  • Using Celery and RabbitMQ for distributed tasks queue.
  • Using tokio UnixStream on various sockets for IPC
  • Warcraft 3 Status Grid with active players on modes and weekly team players statistics.
  • FloTV tokens generation using GraphQL API to Flo Stats.
  • chat.rs integration to RabbitMQ/Kafka services.

Cooking

  • Salieri needs RabbitMQ to work properly
  • Strauss needs to link with PyTorch, instructions on tch-rs
  • tokens.txt file for poe API to work
  • to compile just use cargo build --release or hake
  • cp conf.example.dhall conf.dhall (initial constant options)
  • cp conf.example.yml conf.yml (those options may change in runtime)
  • generate token here: https://discord.com/developers/applications
  • optionally for twitch support: https://dev.twitch.tv/docs/authentication
  • modify conf.dhall and fill discord, tenor_key and optionally twitch client data
  • conf.yml twitch value is OAuth access token, you can regenerate it with bot command ~twitch_token_update
let SType = < Safe
            | Unsafe >
let Server : Type =
  { id: Natural, kind: SType }
let u = λ(id: Natural) → { id = id, kind = SType.Unsafe }
let s = λ(id: Natural) → { id = id, kind = SType.Safe }
let additional_servers : List Server =
  [ u 676119422418550815 -- "Unsafe Server"
  , s 728694826203349072 -- "Rusty Tools"
  ]
in { discord                = "AAAAAAAAA.AAA.AAAA-AAAAAAA"
   , app_id                 = 000000000000000000
   , guild                  = 611822838831251466
   , amadeus_guild          = 000000000000000000
   , servers                = additional_servers
   , twitch_client_id       = "AAAAAA"
   , twitch_client_secret   = "AAAAAAAAAAAAAAAAAAAAAAAA"
   , tenor_key              = "AAAA"
   , flo_secret             = "AAAAAAAAAAAAAAA"
   , gencache_on_start      = True
   , gencache_on_start_only = False
   , upgrade_on_resume      = False
   , github_auth            = "AccountName:access_token"
   }

Optional Build Features:

  • trackers - enable games trackers / w3info news trackers / streams trackers
  • flo - gather flo nodes information / register players / host games
  • flotv - GraphQL integration with flotv services to get keys for running games
  • ggru - streaming on GoodGame integration is optional due their instability
  • spam_filter - detect and early remove various phishing links
  • full - enable all

cargo build --release --features flo,trackers enabled by default, use following to ignore non-needed features cargo build --release --no-default-features

installation environment for typescript parsing backend (optional) typescript replay parsing will be replaced in future.

npm install -D typescript
npm install -D ts-node
npm i @types/node
npm install w3gjs

to test typescript code you may run

node node_modules/ts-node/dist/bin.js ./js/w3g_parse.ts ./LastReplay.w3g > gg.out

Note: will lag at first run due pre-trained models downloading. The models will be downloaded to the environment variable RUSTBERT_CACHE if it exists, otherwise to ~/.cache/.rustbert

Development

  • Strauss is set of tasks running on distributed tasks queue
  • Amadeus is discord bot service on Serenity
  • Salieri is celery daemon running on rabbitmq and processing tasks

rustfmt usage is forbidden, stylish-haskell is a must, pep8 is OK

Service

cp misc/Salieri.service /etc/systemd/system/Salieri.service
cp misc/Amadeus.service /etc/systemd/system/Amadeus.service
systemctl daemon-reload
systemctl enable Amadeus
systemctl start Amadeus

it's safe to rebuild and restart it

systemctl restart Amadeus

Notes

  • Check TODO.md for planned work (also if you want to help me)
  • deepspeech mode was dropped (due bad voice to text model quality)
  • Code open sourced just for my friend Sirius to be able to see it, please don't pay attention
  • Fingon is cute
  • Additional thank to @fluxxu for removing my ban on W3C (this was kind of important for my motivation to improve flo/w3c aspects of Amadeus)
  • I feel weird
  • Thank to RiplEy for giving me his part for cup winning money
  • Thank to Reyenir for playing dota2 with me
  • Thank to Rici for yet another acc after my new ban

Extension points exported contracts — how you extend this code

Chainable (Interface)
The definition of all types that can be used in a `Chain`. [1 implementers]
Amadeus/src/common/markov.rs
States (Interface)
A collection of states for the Markov chain. [1 implementers]
Amadeus/src/common/markov.rs

Core symbols most depended-on inside this repo

is_empty
called by 204
Amadeus/src/common/markov.rs
channel_message
called by 51
Amadeus/src/common/msg.rs
gifx
called by 40
Amadeus/src/commands/images.rs
gifs
called by 40
Amadeus/src/commands/images.rs
message
called by 24
Amadeus/src/handler.rs
own
called by 23
Amadeus/src/commands/images.rs
load
called by 10
Amadeus/src/common/markov.rs
max
called by 9
Amadeus/src/commands/w3c.rs

Shape

Function 326
Class 77
Method 34
Enum 7
Interface 2

Languages

Rust100%

Modules by API surface

Amadeus/src/commands/images.rs50 symbols
Amadeus/src/common/markov.rs19 symbols
Amadeus/src/handler.rs14 symbols
Amadeus/src/common/msg.rs14 symbols
Amadeus/src/commands/owner.rs14 symbols
Amadeus/src/commands/meta.rs13 symbols
Amadeus/src/types/serenity.rs11 symbols
Amadeus/src/steins/warcraft/flotv.rs11 symbols
Amadeus/src/groups.rs11 symbols
Amadeus/src/commands/w3c.rs11 symbols
Amadeus/src/steins/warcraft/utils.rs10 symbols
Amadeus/src/commands/moderator.rs10 symbols

For agents

$ claude mcp add Amadeus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page