Documentation
¶
Overview ¶
Package copilot is the GitHub Copilot CLI provider (ADR-0019). It is built from a reading of Copilot's docs, its event schema (1.0.60) and its bundle. No real session checked it, so it is unverified: smif shows these sessions and never types into them, forks them or installs hooks for them.
A session is a folder $COPILOT_HOME/session-state/<id> with events.jsonl and workspace.yaml. A running process holds inuse.<pid>.lock in it. A lock can outlive a crash, so the pid must be alive, be copilot, sit on a terminal and not have started after the lock.
Index ¶
- Constants
- type Provider
- func (p *Provider) Check() (state, detail string)
- func (p *Provider) Discover() []harness.Session
- func (p *Provider) Info() harness.Info
- func (p *Provider) Read(sessionID string, limit int) harness.Reading
- func (p *Provider) Stamp(sessionID string) string
- func (p *Provider) State(s harness.Session) (string, time.Time)
Constants ¶
const Name = "copilot"
Name is the harness name of Copilot sessions.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider reads one Copilot home folder.
func NewWithLook ¶
NewWithLook takes the process check from look: tests use it.
func (*Provider) Check ¶
Check compares the newest event logs on this machine with the source reading. The detail names counts only, never a value from a file.
func (*Provider) Discover ¶
Discover returns the sessions a live Copilot process holds. A session that two processes hold shows once, with the newest process.
func (*Provider) Info ¶
Info names the provider. Verified stays false until a real session checks it and docs/compat.md has a row with that version.
func (*Provider) Read ¶
Read reads a session's event log. A waiting permission is the pending step: a request can come before its tool's start record.