-
Notifications
You must be signed in to change notification settings - Fork 2
plat 183
| Coordination | Value |
|---|---|
| Assigned agent | unassigned |
| Ticket state |
open — proposal only, not implemented, not scheduled
|
| Last synchronized | 2026-08-23 |
- Priority: P3 — no defect, no user-facing symptom; this is a repo-structure simplification the user asked to have written down for later, explicitly "don't merge it yet."
-
Owner: repo/module structure — spans
multi-llm-provider-go(its own repo),mcpagent, andmcp-agent-builder-go'sagent_go/. - Related: none — this is a new proposal, not a fix for a prior ticket.
multi-llm-provider-go is a separately-tagged Go module (real semver tags
through v0.7.3+) that exists purely to be consumed by mcpagent (pinned via a
pseudo-version in mcpagent/go.mod) and, directly, by agent_go itself. The
user's observation: maintaining it as a second repository adds coordination
overhead (a two-repo pull/push/pin cycle for every change to the coding-agent
adapters) without buying any real isolation, since it has exactly one
consumer family. Proposed: first make mcpagent the sole provider-facing
contract used by agent_go, then move multi-llm-provider-go's code into
mcpagent/llmprovider/..., retire the standalone module after a soak period,
and update every consumer's import path. Do not place the moved packages under
Go's specially restricted internal/ directory while agent_go still needs
to import any of them.
This ticket documents what has to be taken care of before that move is safe. It does not perform the move.
-
No external consumer exists.
gh search code "github.com/manishiitg/multi-llm-provider-go" --owner manishiitgand a broadergh api search/codesweep (not owner-scoped) both returned matches only insidemanishiitg/coding-agent-loop(this repo,mcp-agent-builder-go) andmanishiitg/mcpagent. No third-party or external repository imports it. Caveat: GitHub code search only covers public repos plus whatever private repos the querying token can see — it is evidence, not a provable universal guarantee. Re-run this exact search immediately before actually migrating, not just once now, since time will have passed. -
agent_goimportsmulti-llm-provider-godirectly, not only transitively throughmcpagent. Confirmed viagrep -rl '"github.com/manishiitg/multi-llm-provider-go' agent_go --include="*.go"— dozens of files acrossagent_go/cmd/server/,agent_go/cmd/testing/,agent_go/cmd/family-server/, andagent_go/pkg/orchestrator/...import it directly (e.g.llm_provider_manifest.go,cli_security_routes.go,pkg/clisecurity/store.go,pkg/browser/tools.go,pkg/agentprofiles/skillfiles.go,pkg/workflowtypes/types.go,pkg/orchestrator/agents/workflow/step_based_workflow/*.go). This means a fold-into-mcpagent move changes two dependency graphs, not one:mcpagent's own internal imports, and every direct import insideagent_go— both need their import path rewritten to whatever the new internal path becomes (e.g.github.com/manishiitg/mcpagent/llmprovider/llmtypes). -
Deployment scripts and Dockerfile reference the standalone module's
replacedirective explicitly, not justagent_go/go.mod:deploy/dedicated-vm/deploy.sh,deploy/dedicated-vm/quick-deploy.sh, andagent_go/Dockerfileall scriptgo mod edit -replace=github.com/manishiitg/multi-llm-provider-go=.../-dropreplace=...steps. These need to be found and removed, not just thego.mod/go.workentries. -
Docs reference the standalone repo directly, including at least
install.sh(fetches a release tarball) anddeploy/k8s/README.md(documentsgo get github.com/manishiitg/multi-llm-provider-go@vX.Y.Z). These need auditing for anything that still assumes the module is independently fetchable/taggable after the move. -
Local development uses the live checkout, but released builds do not guarantee "latest." The shared
go.workand localreplacedirectives make local builds use the checked-outmulti-llm-provider-gosource. Released/container builds drop those replacements and use pinned module versions. As of this review,mcpagentpins provider commit99ad881, whileagent_godirectly pins newer provider commit6f23e9b. Go's module selection normally chooses the newer version when buildingagent_go, but buildingmcpagentalone uses its older pin. If the intended invariant is that mcpagent always uses exactly one current provider implementation, the separate modules do not enforce it today.
Treat this as a staged, reversible migration. Do not combine the dependency boundary change, repository move, and old-repository retirement in one commit.
- Enumerate the existing P0/real-contract tests for claude-code, codex-cli, cursor-cli, and pi-cli, including streaming, tool-call receipts and payloads, final assistant response, completion, retained session reuse, live input, resume, and tmux behavior.
- Run them against the current layout and retain the results as the pre-migration baseline. Tests must not be deleted, weakened, replaced by mocks, or rewritten merely to pass the migration.
- Add stable provider-facing contract/facade packages in
mcpagentthat initially alias or delegate to the existing standalone provider module; this phase must not change runtime behavior. - Replace all direct
agent_go -> multi-llm-provider-goimports with the mcpagent-owned facade. Removeagent_go's direct provider requirement only after the import count reaches zero. - Run the unchanged P0 suite and normal builds. This is an independent commit and rollback point.
- Import the provider repository into
mcpagent/llmprovider/...using a history-preserving method (git subtreeor a deliberategit filter-repoworkflow), retaining blame where practical. - Move the existing provider tests, real P0 runners, fixtures, CLI
programs, MCP server, packaging, examples, skills, and relevant CI—not
only the library
.gofiles. - Rewrite mcpagent's facade to use the embedded implementation, then remove its standalone-module dependency.
- Run the same unchanged P0 suite again and compare it with Phase 0. A passing compile/unit suite alone is not sufficient.
- Remove obsolete
go.mod,go.work, Docker, deploy-script, install, and documentation references to the standalone module. - Run full builds/tests in
mcpagentandagent_go, plus at least one live retained-session contract run for each supported coding CLI. - Keep the old repository read-only and recoverable for at least one release/production soak period. Archive it only after the embedded path is proven; deletion is not part of this migration.
- Any missing or weakened P0 coverage blocks the move.
- Any provider-specific change in structured events, tool payloads, final response, completion, session reuse, or resume behavior blocks the move.
- Any remaining direct
agent_goimport of the old provider blocks retirement of the standalone module. - The migration must remain bisectable: each phase builds, tests, and can be reverted independently.
- Full P0/real-contract test coverage across all four coding-agent
adapters (claude-code, codex-cli, cursor-cli, pi-cli) must pass
post-move, not just
go build. This repo has extensive real-tmux contract tests already (e.g.picli_real_contract_test.go'sTestPiCLIRealMCPBridgeToolCallReportsRealToolName, added this session) — these are the actual safety net for a move like this and must be re-run live (not skipped/mocked) against the moved code before calling the migration done. - Git history preservation. Decide whether to
git subtree add/git filter-repo-mergemulti-llm-provider-go's commit history intomcpagent(preserves blame/history) versus a flat copy-paste (loses it, simpler). This should be a deliberate choice, not a default. - Import path rewrite, both repos. Every
mcpagentinternal import ofmulti-llm-provider-go/...AND everyagent_godirect import (see confirmed finding #2's file list) needs a mechanical but exhaustive rewrite to the new internal path. Agoimports/gofmtpass plus a fullgo build ./...in both repos is the correctness check, but the file list should be enumerated up front so nothing is missed silently. -
agent_go/go.modandagent_go/go.workcleanup. Remove thereplacedirective(s) formulti-llm-provider-go, re-point at the updatedmcpagentmodule/version instead. Regeneratego.work.sumviago work syncafterward (this repo just did exactly that cleanup this session for an unrelated drift — same command applies). - Deployment script updates.
deploy/dedicated-vm/deploy.sh,deploy/dedicated-vm/quick-deploy.sh,agent_go/Dockerfile— remove the now-dead-replace=.../multi-llm-provider-go=.../-dropreplace=...steps for that module specifically (they may still need the equivalent formcpagentitself, unchanged). - Docs updates.
install.sh,deploy/k8s/README.md, and any other doc referencinggo get github.com/manishiitg/multi-llm-provider-goor the repo directly — audit and update or remove. - Versioning/release implications.
multi-llm-provider-gocurrently has real, independently-tagged releases (up to v0.7.3+). Decide whether that tagging discipline continues to matter post-merge (probably not, since it becomes an internal package with no separate consumers per finding #1) — but this should be a stated decision, not silently dropped. - CI/build pipeline. Check whether
multi-llm-provider-go's own repo has any GitHub Actions/CI workflows that would need porting intomcpagent's CI (or can simply be retired ifmcpagent's existing CI already covers the same test paths once the code moves in). - Re-confirm "no external consumer" immediately before migrating, not
only now — re-run the
gh search code/gh api search/codecheck from finding #1 as the literal last step before starting the move, since this ticket may sit open for a while. - Decide the fate of the old
multi-llm-provider-gorepo itself (archive read-only vs. delete) as an explicit, separate decision at migration time — not assumed here. Deletion is hard to reverse and should get its own confirmation regardless of what this ticket recommends.
- The merge itself is not being performed. This ticket is proposal + checklist only, per explicit instruction.
- No code changes, no import rewrites, no repo deletions in this ticket.
N/A — no code changed. This ticket exists to be read and executed against when the user decides to actually do the migration.
Auto-synced from docs/ on main. Edit there, not here.