PriNova / codypy

Python Binding for Cody Agent from Sourcegraph: JSON-RPC over TCP or stdio. Establish seamless connectivity with the Cody Agent using this Python binding. Leverage the power of JSON-RPC over TCP or stdio for efficient communication.
MIT License
18 stars 4 forks source link

[Discussion] Externalize downloading the binary? #9

Open PriNova opened 3 months ago

PriNova commented 3 months ago

As mentioned by @oriordan to externalize the downloading of the cody agent binary, what do we need to consider here?

If codypy would be embed into an application as plugin, a script to check for newest version and download if need would not apply in this scenario. If codypy would be used as a core library a separate script could be considered.

It definitely makes sense to put the logic into an own file to separate the concern here. Let's brainstorm.

oriordan commented 3 months ago

As of now, interfacing with Cody is only possible via cody-agent and the undocumented JSON-RPC protocol. Codypy is the first (python) wrapper which makes this programmatically convenient so I consider this a super useful library.

Adding helper functions for ease of integration like taking care of downloading the agent could be useful for various applications, as long as they fit the problem scope and does not intertwine with the core library functionality. The library should be lean and single purpose, allowing the applications to make decisions around it's use.

Having an executable endpoint (e.g. cli.py) exposing this feature along with stuff like ask, chat could be very useful.