Split Gate into minimal standalone package (KaimonGate.jl) #20
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kahliburke/Kaimon.jl#20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
Kaimon.jl has ~120 transitive dependencies (HTTP server, Qdrant client, JSON3, Documenter, SQLite, etc.) because it bundles the MCP server, TUI dashboard, indexing, and REPL gate into a single package. Users who only want the gate (
Gate.serve()) to connect their REPL to Kaimon must either install the full Kaimon in their global environment, pulling in all those deps and risking version conflicts, or add Kaimon as a dep to every project that needs the gate.The root issue was raised in #19 — JSON 1.5 (required by Kaimon) conflicts with packages still on JSON 0.21 (WebIO.jl and 30+ others). ShareAdd.jl helps with `Project.toml` pollution but can't solve runtime conflicts since Julia only loads one version of a package per session.
Proposal
Extract `src/gate.jl` into a standalone `KaimonGate.jl` package with a minimal dependency surface:
That's it. No HTTP, no JSON3, no Qdrant, no Documenter. Users who only want the REPL-side gate install `KaimonGate.jl` instead of full `Kaimon.jl`. The TUI/MCP server (`Kaimon.jl`) depends on `KaimonGate.jl` for the protocol and socket types.
Scope
Open questions
I have Kaimon added as a Julia app, and launch the dashboard from terminal with
kaimon.I also have Kaimon in my global env and
using Kaimon; Gate.serve()in mystartup.jl.With this proposed change, I would still have
Kaimon.jlinstalled as a Julia app, but onlyKaimonGate.jlinstalled in the global environment.Q: Is there any functionality from
Kaimon.jl, besides the Gate module, that I (as a user) need to access from the global environment?If no, then I support this change. It would probably address the issue I had in https://github.com/kahliburke/Kaimon.jl/issues/15#issuecomment-4128159073, in which Kaimon and JuliaFormatter couldn't be installed in the same environment.
I like this proposal, thanks!
My 2 cents on (some of) your open questions: if it were me, I'd go for a monorepo, and the name "KaimonGate.jl".
And another question: if Kaimon.jl depends on KaimonGate.jl for the protocol implementation, would that raise (in)compatibility issues in case the TUI/MCP server and the Gate are installed in different versions? I could see that as a potential source of problems in the medium/long run when users will want to upgrade Kaimon and/or KaimonGate to benefit from newer versions.
@ffevotte I would add a version compatibility check, but good observation.
It's something I'll probably tackle soon-ish.
Update here, this work is essentially done and will be present in 2.0.0 to be released in the near future.
Done in 2.0 — KaimonGate is now a standalone package (lib/KaimonGate) with a minimal dependency set, so the gate runs without pulling in the full Kaimon stack. Shipping in 2.0.