Documentation
¶
Overview ¶
Package devin is the Devin module (Cognition's coding agent), a cloud-only module for Devin's cloud sessions: hopsesh reaches them only through the Devin CLI's non-interactive commands (devin auth status, devin list --format json), signed in as the user. The CLI's own way home (/pickup or /handoff in `devin --cloud -r <id>`) is interactive, so hopsesh brings the session's pull request branch instead. It keeps nothing on any machine, so the file methods come from agent.NoLocal.
Index ¶
- type Module
- func (m *Module) CloudURL(_ string, sid agent.SessionID) string
- func (m *Module) Detect(_ context.Context, h agent.Host) (agent.Install, error)
- func (m *Module) FetchCloud(ctx context.Context, h agent.Host, _ agent.Install, sid agent.SessionID, ...) (agent.Fetched, error)
- func (m *Module) ListCloud(ctx context.Context, h agent.Host, _ agent.Install, q agent.CloudQuery) (agent.CloudListing, error)
- func (m *Module) ParseCloudLink(s string) (string, agent.SessionID, bool)
- func (m *Module) SendCloud(ctx context.Context, h agent.Host, _ agent.Install, r agent.SendRequest) (agent.Sent, error)
- func (*Module) Spec() agent.Spec
- func (m *Module) TestCloud(ctx context.Context, h agent.Host, _ agent.Install, _ string) (agent.CloudTest, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
Module is the Devin module.
func (*Module) FetchCloud ¶
func (m *Module) FetchCloud(ctx context.Context, h agent.Host, _ agent.Install, sid agent.SessionID, _ agent.FetchTarget) (agent.Fetched, error)
FetchCloud brings a session's code: its pull request branch, as the listing names it. Devin's own way home (/pickup) runs only inside the CLI's interactive session, and the messages are not printed by any non-interactive command, so they stay in the cloud.
func (*Module) ListCloud ¶
func (m *Module) ListCloud(ctx context.Context, h agent.Host, _ agent.Install, q agent.CloudQuery) (agent.CloudListing, error)
ListCloud lists Devin's cloud sessions from `devin list --format json`, leaving out local ones.
func (*Module) ParseCloudLink ¶
ParseCloudLink reads a session's link on app.devin.ai or its devin-… id.
func (*Module) SendCloud ¶
func (m *Module) SendCloud(ctx context.Context, h agent.Host, _ agent.Install, r agent.SendRequest) (agent.Sent, error)
SendCloud starts the session without a terminal (send) and returns it.
func (*Module) TestCloud ¶
func (m *Module) TestCloud(ctx context.Context, h agent.Host, _ agent.Install, _ string) (agent.CloudTest, error)
TestCloud asks the CLI for its login (devin auth status; its wording is unverified, so only its exit code and first line are used), lists the sessions once to learn whether the account has Devin Cloud, and starts nothing.