Skip to content

refactor(codegen): add config/helpers docs and remove all MCP functionality#803

Merged
pyramation merged 1 commit intomainfrom
devin/1773364879-config-helpers-docs
Mar 13, 2026
Merged

refactor(codegen): add config/helpers docs and remove all MCP functionality#803
pyramation merged 1 commit intomainfrom
devin/1773364879-config-helpers-docs

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Mar 13, 2026

refactor(codegen): add config/helpers docs and remove all MCP functionality

Summary

This PR has two parts:

1. Document config command and helpers.ts in CLI docs generators

The Phase 2 codegen update (PR #802) added config command generation and helpers.ts typed client factories, but the CLI documentation generators were not updated to document these new features. This fills that gap across all doc generator functions.

Multi-target generators (use builtinNames.config for collision-safe naming):

  • generateMultiTargetReadme — config subcommands table + SDK Helpers section with typed factory examples and 3-tier credential resolution
  • generateMultiTargetAgentsDocs — config TOOL block + helpers (SDK) TOOL block with factories, usage, and credential resolution
  • generateMultiTargetSkills — config reference file + updated cli-common SKILL.md

Single-target generators (hardcoded "config", consistent with existing "auth"/"context" pattern):

  • generateReadme — config in commands table + config infrastructure section
  • generateAgentsDocs — config TOOL block
  • generateSkills — config reference file + updated SKILL.md

Also updates MultiTargetDocsInput.builtinNames to require config: string.

2. Remove all MCP (Model Context Protocol) tool generation

MCP tool generation has been completely removed. It was never an actual MCP server — just static JSON metadata files (mcp.json) with tool definitions. Removed:

  • McpTool interface and gqlTypeToJsonSchemaType helper from docs-utils.ts
  • getCliMcpTools / getMultiTargetCliMcpTools from cli/docs-generator.ts
  • getOrmMcpTools from orm/docs-generator.ts
  • getHooksMcpTools from hooks-docs-generator.ts
  • generateCombinedMcpConfig from target-docs-generator.ts
  • mcp?: boolean from DocsConfig interface in types/config.ts
  • All MCP imports, conditional blocks, and variable declarations from generate.ts (both single-target and multi-target paths)
  • All MCP exports from cli/index.ts
  • All MCP-related test cases and snapshots from cli-generator.test.ts

Net result: ~2,300 lines deleted across 10 files.

Review & Testing Checklist for Human

  • Breaking change for published consumers: McpTool type export, getCliMcpTools, getOrmMcpTools, getHooksMcpTools, getMultiTargetCliMcpTools, and generateCombinedMcpConfig are all removed from the public API. Any downstream code importing these will break. Verify no external consumers depend on them before publishing.
  • DocsConfig.mcp removed: Existing codegen configs with docs: { mcp: true } will produce a TypeScript error. Confirm no active projects pass this option.
  • Verify helpers.ts docs are intentionally excluded from single-target generators: Multi-target README/AGENTS get SDK Helpers documentation (typed factories + credential resolution), but single-target generators do not. Confirm this is correct — presumably helpers.ts is only generated for multi-target CLIs.
  • Test plan: Regenerate CLI docs for constructive-db or another multi-target project and verify:
    • README.md includes config commands table and SDK Helpers section
    • AGENTS.md includes config TOOL and helpers TOOL (but NOT any mcp tools)
    • No mcp.json file is generated
    • Skills directory includes cli-common/references/config.md

Notes

  • All 310 tests pass with 122 snapshots updated, 2 snapshots removed (MCP-related)
  • Build is clean (no type errors, no remaining references to removed code verified via grep)
  • Changes affect generated documentation output only; no runtime behavior changes for non-docs features

Link to Devin Session: https://app.devin.ai/sessions/6f16c8a57231488085f04a68be7d599b
Requested by: @pyramation

…rators

- Update MultiTargetDocsInput to include config in builtinNames
- Add config get/set/list/delete to generateReadme and generateMultiTargetReadme
- Add config TOOL + helpers SDK TOOL to generateAgentsDocs and generateMultiTargetAgentsDocs
- Add 4 config MCP tools to getCliMcpTools and getMultiTargetCliMcpTools
- Add config skill reference to generateSkills and generateMultiTargetSkills
- Document helpers.ts typed client factories and 3-tier credential resolution
- Update test fixtures to include config in builtinNames
- Update snapshots
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit b22e2bc into main Mar 13, 2026
43 checks passed
@pyramation pyramation deleted the devin/1773364879-config-helpers-docs branch March 13, 2026 02:21
@devin-ai-integration devin-ai-integration bot changed the title docs(codegen): add config command and helpers.ts to all CLI docs generators refactor(codegen): add config/helpers docs and remove all MCP functionality Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant