Expand description
The Copilot agent session API: the session document and its log.
These endpoints are undocumented and read-only. They live on the Copilot
API host, which GraphQL names (viewer { copilotEndpoints { api } }), so
nothing here hardcodes a host. They accept the gh CLI OAuth token only,
so a run with GH_TOKEN, GITHUB_TOKEN or a config-file token is told
what it needs rather than being sent to GitHub with a token that fails.
Structs§
- Copilot
Agent Session - One Copilot agent session, as the Copilot API describes it. It carries the fields the REST task detail does not: the pull request number and state, the workflow run, and the prompt the session was given.
- Session
Log - A parsed session log.
Enums§
- LogEntry
- One entry of a parsed session log, in the order the log holds them.
Constants§
- MAX_
LOG_ BYTES - The most of one log Subspace ever reads. A finished session’s log is 240-730 KB, so this leaves room without letting one answer grow freely.
Functions§
- needs_
oauth_ login - What the user must do when the work credential is not an OAuth token, naming Sign in with GitHub only when the app offers it.
- parse_
log - The parsed log of an event stream.
truncatedsays the read hit its cap.