Recycler: the clanker / Clanktank bot, split into its own service (AI via Sojourns)#1
Closed
HiLleywyn wants to merge 3 commits into
Closed
Recycler: the clanker / Clanktank bot, split into its own service (AI via Sojourns)#1HiLleywyn wants to merge 3 commits into
HiLleywyn wants to merge 3 commits into
Conversation
…Sojourns Recycler is the clanker economy split out as its own bot with the model brain lifted into the Sojourns platform. The full economy (tokens, networks, trading, staking, shops, minigames, NFTs, seasons, quests) ships intact; only AI inference changes. - Centralize every model call through one configurable seam in core/framework/ai/client.py (and auto_repair.py): an OpenAI-compatible backend selected by AI_BACKEND_URL / AI_BACKEND_KEY. - Add AI_ENABLED master switch. AI is optional: with it off, or the backend unreachable, the economy runs and AI-gated features (Disco / AI Chat, clanker pattern controller, AI helpers) degrade gracefully instead of erroring. - Default AI_BACKEND_URL to OpenRouter so a standalone deploy still works; point it at a Sojourns host to serve AI through the platform. - README, .env.example and CHANGELOG document the split and wiring.
- .env.example: concrete AI_BACKEND_URL pointing at Sojourns over Railway private networking (sojourns.railway.internal:8080/v1), shared AI_BACKEND_KEY example, AI_ENABLED=1, with public-domain and local-dev alternatives documented. - railway.toml: rename persistent volume discoin_data -> recycler_data. - README: Railway deploy topology (Sojourns = controlling platform / AI host, Recycler = economy service beside it; both Dockerfied).
Corrects the scope: Recycler is the clanker / Clanktank containment bot, not the economy. The economy / games / NFTs stay in Discoin. - Prune to a single cog: keep cogs/clanktank.py, remove every other economy cog; trim the COGS registry in core/framework/bot.py to cogs.clanktank so only the ,clanker command surface runs. - Remove the economy REST API/dashboard (api/, frontend/, charts/) and Discoin's local AI memory sidecar (ai/). Skip the embedded FastAPI cleanly when the package is absent (PORT injected on Railway); drop the Railway healthcheck since Recycler serves no HTTP. - Keep core/, database/, configs/, services/, constants/ as the shared runtime substrate (verified no module-load deps on the removed packages). - AI stays routed to Sojourns via the AI_BACKEND_* seam; clanker's one AI touch degrades gracefully when AI is off. - README, CHANGELOG and railway.toml updated to the clanker-only bot.
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.
What this is
Recycler is the clanker bot: the standalone Clanktank containment system — the
,clankercommand set, evidence clustering, cases, and the multi-station escape room — carved out of the old all-in-one Discoin build into its own Discord bot.It does exactly one job. The economy, games, NFTs and markets stay in Discoin. Recycler's cog registry (
core/framework/bot.py) is trimmed to a single cog,cogs.clanktank, so only the,clankersurface runs.No built-in AI
Recycler ships no model brain. The clanker's few AI-assisted touches (e.g. escape-room reflection reformulation) call out to the Sojourns platform over an OpenAI-compatible HTTP backend, through one seam (
core/framework/ai/client.py):AI_BACKEND_URLhttps://openrouter.ai/api/v1/v1base of the Sojourns AI backend; OpenRouter default keeps a standalone run workingAI_BACKEND_KEYOPENROUTER_API_KEYAI_BACKEND_KEYAI_ENABLEDAI_ENABLED=0runs the clanker with zero AI callsAI is optional — with it off or the backend unreachable, containment, cases and the escape room run in full; only the AI-flavoured extras stand down.
What changed structurally
cogs/clanktank.py; remove every other economy cog and trimCOGStocogs.clanktank.api/,frontend/,charts/) and Discoin's local AI memory sidecar (ai/).PORT); drop the Railway healthcheck since Recycler serves no HTTP.core/,database/,configs/,services/,constants/as the shared runtime substrate — verified no module-load dependency on any removed package.Deploy (Railway)
Three services in one Railway project: Sojourns (controlling platform / AI host), Discoin (economy), Recycler (clanker). Recycler reaches the AI at
http://sojourns.railway.internal:8080/v1with a matchingAI_BACKEND_KEY. Volumerecycler_dataat/dataholds the containment DB.Caveats
py_compileon changed files plus import-closure analysis confirming the boot path has no module-load deps on removed packages.services//configs/remain as the shared substrate; further physical slimming is a follow-up that needs runtime verification.Pairs with the Sojourns PR (#115, AI backend) and the Discoin PR (AI routed out + clanker removed).