Mount the live Mods tree read-only and add two MCP tools over it: a metadata-only mod inventory and an AutoGen C# source reader #243
Labels
No labels
burndown-2026-06
headless
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/eco-app#243
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Extends the #42 privileged surface with the one on-disk root it never got tools for in depth: the live
Mods/tree, including Eco's generatedAutoGenC#.Why this is cheaper than #42 made it sound
#42 scoped a whole node-pinned deployment — node pin, hostPath mounts, loopback pin, tailnet sidecar. Two of those already exist. The
${NAME}-appDeployment incoilyco-bridge/deploy/services/eco-app/deploy/main.ymlis alreadynodeSelector: kubernetes.io/hostname: kai-server, and already carries ahostAliasespin for the Eco host.So this needs no new deployment: a
hostPathvolume for/home/kai/Steam/steamapps/common/EcoServer/ModswithreadOnly: true, avolumeMount, andECO_STATE_DIRpointing at a root containing it.admin/state.pyalready owns every relative path and verifies resolution stays under the root through symlinks, so the safety half is written.That also means this lands a real slice of #42 phase 2 — one of the four mounts, on the pod that already exists — rather than waiting for the full privileged deployment.
The two tools
1.
admin_mods_tree— metadata only, never content.Walks
Mods/and returns relative path, type, size, mtime, and extension per entry, plus per-top-level-directory rollups (file count, total bytes, extension histogram). No file contents at any disclosure level.This must be summary-first from day one. Eco's
AutoGenis thousands of generated.csfiles; a flat enumeration would land straight in the #240 family-3 response-cap problem. Default to rollups plus top-N, with a boundedsubtreeargument (resolved under the root, not a free path) anddepth/limitcaps to walk into detail.It does not replace
admin_mods_installed. That one answers "which mods are installed, at what version, and what's configured but missing" from manifests. This one answers "what files are actually on disk". Different questions; keep both.2.
admin_mod_source— full text, C# only.Reads one
.csfile under a fixed root and returns its text. Extension allowlist, not a general file reader. Arguments: a relativepath(resolved and checked under the root, symlink-safe, per the existing_fixed_pathcontract) and a boundedmax_bytesdefaulting to something an MCP client can actually consume — call it 64 KB, with an explicittruncated: trueandtotalByteswhen it clips, so a caller knows to page rather than silently getting half a file.Discovery comes from tool 1; this one only reads.
The decision I want a second opinion on
Which surface do these go on?
/mcpis public and unauthenticated — I can calltools/listonhttps://eco-app.coilysiren.me/mcpfrom anywhere with no credential.Mods/AutoGenis SLG's generated game source, andMods/UserCodemay carry private mods from eco-ops. Serving that verbatim over the public MCP is republishing someone else's game content to the internet, which is a licensing question rather than a technical one.Recommendation: both tools go on the
/adminsurface, which already assumes an authenticated, non-public boundary and already has the disclosure-level machinery. Concretely that means settingECO_ADMIN_ENABLEDon the existing pod and mounting onlyMods— not all four #42 roots — so the blast radius stays at "the mods tree" andConfigs/secrets stay unmounted.If the metadata tool should be public and only the source reader privileged, that split works too: tool 1 has no licensing exposure, since paths and sizes aren't content.
Why the AutoGen half is worth the trouble
Mods/AutoGenis the authoritative, per-server, post-mod definition of every item, recipe, skill, and block — the same ground truth the Eco Gnome DataExporter reads. #242 currently proposes reading recipes from a vendored vanilla snapshot pinned to July, because that was the only source available. A C# reader over the live tree is a way to verify that snapshot against the running server, and eventually to replace it for modded content. Worth sequencing the two together.Acceptance
readOnly: trueand coversModsonly.admin_mods_treeanswers against the live tree without exceeding the response cap, at default arguments, on a tree with thousands of files.admin_mod_sourcerefuses any path that resolves outside the root, and any extension outside the allowlist, with a test for each.docs/admin-mcp.mdgains the two tools and the new mount in its filesystem-boundary section.Open questions
AutoGenonly, orUserCodetoo? UserCode is where private eco-ops mods would sit, so it may want a separate flag./home/kai/Steam/steamapps/common/EcoServer/Modsis outside the node-stats MCP's readable-root allowlist, so the layout above is from Eco's documented structure and #42's notes, not from a listing. One look on the host before implementing would confirm the directory names and rough file counts..csonly, or also the.csproj/.jsonthat sit beside it?Refs: #42 (parent, still open — phases 1 and 3 landed, phase 2 deploy did not), #242 (Eco Gnome data plane), #240 (response-size findings),
docs/admin-mcp.md.Superseded in one respect by #244:
/adminis being decommissioned rather than finished, so the recommendation in "The decision I want a second opinion on" — put both tools on the privileged surface, enableECO_ADMIN_ENABLED, mount onlyMods— no longer applies.Everything else here stands, and gets simpler. The tools go on core
/mcp. The hostPath mount is unchanged and still cheap, because${NAME}-appis already node-pinned to kai-server; it just no longer needsECO_ADMIN_ENABLEDalongside it. Note thatadmin/state.pyholds the symlink-safe path resolution this depends on, and #244 deletes that package — so the resolution helper needs lifting into the core module before the delete lands, or these two tools inherit a path-safety gap. Sequence #243 first, or move the helper as part of #244.The licensing question the
/adminrecommendation was answering still needs an answer. #244 lists three options: metadata public with the C# reader behind the existingpage_auth.py, or scope the reader toMods/UserCodeonly, or ship both public. My preference is the first.admin_mods_installedalso lands here per #244 — it becomes publicget_modsand should be built alongside the tree tool rather than ported separately.