copilot

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package copilot is the GitHub Copilot cloud agent module, a cloud-only module: the agent works in GitHub's cloud and hands back a pull request on a copilot/… branch, and hopsesh reaches it only through the GitHub CLI's agent-task commands (gh agent-task list, gh agent-task view [--log]) and gh pr, signed in as the user. It keeps nothing on any machine, so the file methods come from agent.NoLocal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct{ agent.NoLocal }

Module is the Copilot cloud agent module.

func New

func New() *Module

New returns the module.

func (*Module) Detect

func (m *Module) Detect(_ context.Context, h agent.Host) (agent.Install, error)

Detect finds gh; there is no data folder.

func (*Module) FetchCloud

FetchCloud reads a task, its pull request's branch (gh pr view) and its session log (gh agent-task view --log). The code comes home as the pull request's branch, which the core fetches into a worktree; the log is the conversation as text. Neither changes anything on GitHub.

func (*Module) ListCloud

ListCloud lists the agent tasks gh can see (gh agent-task list --json), refreshes the ones hopsesh recorded that the listing leaves out (view --json), and reads the branches of their pull requests (gh pr list --json, once per repository).

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) Spec

func (*Module) Spec() agent.Spec

Spec declares the Copilot cloud agent, reached through gh.

func (*Module) TestCloud

func (m *Module) TestCloud(ctx context.Context, h agent.Host, _ agent.Install, _ string) (agent.CloudTest, error)

TestCloud asks gh which GitHub login it uses (gh auth status --json hosts; never the token), asks for one task to learn whether the account has the cloud agent, and checks that gh still has the agent-task commands the module uses. It starts nothing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL