refactor: expose tools, prompts, resources, argo via pkg/#170
Conversation
Promotes the four packages downstream MCP servers need to consume to pkg/, so they can be imported directly. server, config, and version remain in internal/ as binary-specific glue. API surface remains pre-v1 and volatile. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (33)
📒 Files selected for processing (117)
WalkthroughThis PR promotes the ChangesPackage Promotion: Internal to Public
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The changes are mechanically simple (import path redirects) and highly repetitive across ~100+ files, making individual file review quick. However, the sheer volume and interconnected nature of the refactoring across multiple packages and tests requires systematic verification to ensure no import cycles, broken references, or inconsistencies were introduced. The presence of both production code and test files doubling the scope adds moderate complexity. Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
internal/{argo,tools,prompts,resources}topkg/so other MCP servers can import them. The four packages keep their existing public shape (tools.RegisterAll(s, client),prompts.RegisterAll,resources.RegisterAll,argo.ClientInterface).internal/{server,config,version}stay internal — they're binary-specific glue.pkg/resources/docs/*.mdcontinues to work via//go:embed, so downstream consumers ship the same Argo docs/examples.Makefiletest target,.golangci.yml,.coderabbit.yaml,CLAUDE.md,docs/RESOURCES.md, and the two.claude/agents/*.mdfiles to point at the new paths.Notes
git mv, so blame/history is preserved.Test plan
make allpasses (fmt, vet, lint 0 issues, tests across all packages, linux/amd64 build)pkg/argo51.6%,pkg/prompts65.4%,pkg/resources86.2%,pkg/tools91.9%,internal/server91.2% — all unchanged from before the movemake test-e2e) — not run locally; CI will exercise these🤖 Generated with Claude Code
Summary by CodeRabbit
pkg/directory, enabling external integration and reusability of core components.