feat(tools): rename gitea_* -> mokogitea_* with deprecated aliases; metadata brand fix (#33) #34
Reference in New Issue
Block a user
Delete Branch "feat/33-rename-mokogitea-tools"
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?
Summary
Implements #33 (Gitea -> MokoGitea brand normalization for the MCP tool surface).
Part 1 - rename
gitea_*->mokogitea_*with backward-compatible aliasesregisterTool()wrapper (near server creation) that derives the canonicalmokogitea_*name from eachgitea_*literal and registers it, then also registers the legacygitea_*name as a deprecated alias pointing at the same handler.server.tool(...)definition call sites withregisterTool(...); a grep confirms zeroserver.tool(definition calls remain outside the wrapper.MOKOGITEA_MCP_LEGACY_ALIASESto a falsy value (0/false/off/no).Tradeoff: while aliases are enabled, dual-registration roughly doubles the exposed tool count (~222) during the deprecation window. Disabling the env var returns to the 111 canonical names.
Wrapper typing note: an initial
...rest: [string, any, any]signature compiled the wrapper but erased zod-schema -> handler-arg inference at every call site (noImplicitAny errors on handler params). Resolved by makingregisterToolgeneric to mirror the SDK's typed overload:registerTool<Args extends ZodRawShapeCompat>(name, description, paramsSchema: Args, cb: ToolCallback<Args>), importingToolCallbackandZodRawShapeCompatfrom the MCP SDK. Full inference preserved;npm run buildis clean.Part 2 - metadata fields + brand fix
display_name: not added as a settable param. The fork'sRepoMetadatahas nodisplay_namecolumn; it is derived server-side (DerivedDisplayName()fromextension_type+name). Added a code comment documenting this so it isn't re-added as a silent no-op.standards_versiondescription changed frommokoplatform standards version->mokocli standards version. No othermokoplatform/moko-platformstrings remain insrc/or README./repos/{owner}/{repo}/metadata; no/manifestreferences remain anywhere in the MCP.Build / housekeeping
npm run build(tsc) succeeds with no errors.package.json1.4.2 -> 1.5.0; CHANGELOG updated.Closes #33
Claude-Session: https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
Wiki reminder: docs are wiki-first -- if this PR changes behavior, usage, config, or standards, please update the repo wiki before/after merge. (non-blocking)