Add plugin: mcode-webui (Wzdhehe) - #16
Open
Wzdhehe wants to merge 5 commits into
Open
Conversation
Browser-based chat frontend for the mcode agent runtime. Streams
mcode acp / exec sessions with real-time tool events, plan review,
ask-user prompts, context usage, and quota. Zero npm dependencies;
runs on Node 22+.
- New plugin at plugins/Wzdhehe/mcode-webui/ per Agent Plugins 1.0
- plugin.json (10 white-listed top-level fields, 13 capabilities)
- skills/mcode-webui/SKILL.md (frontmatter name + description 343 chars)
- LICENSE (MIT)
- README.md + README.zh-CN.md (bilingual)
- references/SECURITY-NOTES.md (canonical security disclosure)
- docs/ (ARCHITECTURE, API, CAPABILITIES, DEVELOPMENT, TROUBLESHOOTING)
- server/, public/, test/ (real directory copies, kept in sync with
the project root at github.com/Wzdhehe/mcode-webui)
- PR_DESCRIPTION.md + CONTRIBUTING.md
Source: github.com/Wzdhehe/mcode-webui (v1.0.0 + doc polish)
Validate: OK plugin Wzdhehe/mcode-webui
Mirror of the source-repo follow-up: - SKILL.md frontmatter name back to mcode-webui (spec requires it to match the directory name) - Strip CR from UTF-8 text files so the official validator sees LF-only frontmatter - Revert product-name mcode->Mcode in CLI/trigger references
…owercase by spec)
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.
PR Description — Mcode-webui plugin
What this PR adds
plugins/Wzdhehe/mcode-webui/per Agent Plugins 1.0 specplugin.jsonwith the 10 white-listed top-level fieldsskills/mcode-webui/SKILL.mdwith{name, description}frontmatter (343 chars) + body (official skills/ layout)LICENSE(MIT)README.md(user-facing quick start)references/SECURITY-NOTES.md(canonical security disclosure)docs/(ARCHITECTURE, API, CAPABILITIES, DEVELOPMENT, TROUBLESHOOTING)server/,public/,test/(real directory copies, kept in sync withthe project root; packaged as-is into
dist/for the release artifact)package.json(copy of project root, withsetup:pluginandpackage:pluginscripts)Why this plugin
A Kimi-Code-style web frontend for the
mcodeagent runtime. It letsusers open
mcodesessions in a browser instead of the terminal,stream real-time tool events, switch workspaces, and use the
ask-usermodal — all without the Mcode TUI eating their terminal.Example prompts (with expected results)
Prompt 1 — User: "open Mcode webui"
Expected:
node server.js(foreground or background, your call)openlog line on stdoutPrompt 2 — User: "Mcode webui status"
Expected:
.server.errfor last errorPrompt 3 — User: "show Mcode webui url"
Expected:
http://<lan-ip>:8080/TOKENis set) also print the full URL with?token=…Full trigger list in
SKILL.md.Dependencies
mcodeCLI 0.1.4+ (formcode acptransport)sqlite3binary (for usage panel) — auto-detected viaserver/lib/config.js#detectSqlite3Binmavis0.1.0+ (for real token usage; degrades toestimates if missing)
Network & data behavior
0.0.0.0:8080by default — loopback-only viaHOST=127.0.0.1?token=query string supported (browser convenience);Authorization: Bearerheader also acceptedmcode,mmx quota)~/.minimax/v2/sqlite/runtime-state.sqlite(read-only)~/.minimax/v2/sqlite/runtime-state.sqlite— only onDELETE /api/sessions/:id(with?dryRun=trueopt-in preview)MCODE_WEBUI_UPLOAD_DIR(default.webui-uploads/) for file uploads~/.minimax-code/webui/.webui-sessions.jsonfor session storeFull disclosure:
references/SECURITY-NOTES.md.Automated test evidence
Test breakdown:
lib-config.test.js— 28 tests (constants, env loading, sqlite detection)lib-lan.test.js— local request detection, LAN IP detectionlib-db.test.js—deleteMcodeSessionFromDbhappy path + missing-tabletolerance, dryRun path
lib-state-bus.test.js— per-cid state isolation, SSE channel mgmtmavis-usage.test.js— real sqlite3 fixture, per-turn context mathsessions.test.js—?dryRun=truepreview, route-level sessionCRUD with rollback
chat.test.js,routes-*.test.js— error path coverageCI: GitHub Actions on Node 22 / Node 24, Windows + Linux + macOS.
Manual test evidence
mavis plugin install(path mode)TOKEN=$(openssl rand -hex 16)http://127.0.0.1:8080/?token=…in browser — SSE streamconnected, model stream rendered
layout responsive
all events rendered, quota panel updated
lanBroadcast: false— phone got 403 with friendly pagetables. v1.0 E2E evidence: ran the real-delete path against a copy of
the production
runtime-state.sqlite(713 MB) viaMCODE_RUNTIME_DB=<copy>; a session with 11,176 rows across 12 tableswas reduced to 7 rows (only
questionnaire_requestsremains, skippedby design — not
local_runtime_*-prefixed). The table list covers32 of the 33 session-keyed tables in the Mcode schema.
?dryRun=true— preview shows row count, nomodification
Red-line compliance (mcode-plugin-guide)
DELETE /api/sessions/:idhas?dryRun=trueopt-in preview. Real delete runs in a SQLitetransaction()with per-table error tolerance.detectSqlite3Bin()— no hardcoded host paths.references/SECURITY-NOTES.mdis thesingle source of truth;
SKILL.md(TL;DR + link),plugin.json(
extensions.securityNotes), this PR description, and the pluginREADME.mdall reference it.plugin.json description +
extensions.securityNotes, PR template.Checklist
plugin.jsonvalidates againsthttps://agent-plugins.org/schemas/1.0.0/plugin.schema.jsonnpm run validate-plugin(planned batch H) passesnpm test— 261 pass, 0 fail, 0 lint warningreferences/SECURITY-NOTES.mdcovers all red-line 7 topicshooks/ unsupported capability fieldsplugins/Wzdhehe/mcode-webui/)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.