Expand description
Typed model of the Copilot CLI events.jsonl stream.
⚠️ The events.jsonl schema is undocumented and reverse-engineered.
See docs/agents/formats/copilot-cli/events.md. Everything here is built
to be tolerant: the line envelope accepts the payload inline, under
data, or under payload; field extraction tries several key spellings;
unrecognized event types fall through to CopilotEvent::Unknown so a
schema change degrades gracefully instead of dropping data.
When a real session is captured (see
docs/agents/formats/copilot-cli/known-gaps-and-sourcing.md), tighten the
extraction here against the observed shapes and upgrade the confidence
tags in the docs.
Structs§
- Event
Line - One line of
events.jsonl. - Message
Event - A
user.message,assistant.message, orsystem.message. - Session
- A parsed Copilot session: the ordered event lines plus the directory id.
- Session
Metadata - Lightweight metadata for a session, for listing without a full walk.
- Session
Shutdown session.shutdown— carries per-session token/model metrics.- Session
Start session.start— the session-meta line.- Subagent
- A
subagent.started/subagent.completed. - Tool
Execution - A
tool.execution_start/tool.execution_complete. - Workspace
- Git/workspace context parsed from a session’s
workspace.yaml.
Enums§
- Copilot
Event - A semantically classified
events.jsonlline.
Constants§
- EV_
ABORT - EV_
ASSISTANT_ MESSAGE - EV_
ASSISTANT_ TURN_ END - EV_
ASSISTANT_ TURN_ START - EV_
HOOK_ END - EV_
HOOK_ START - EV_
SESSION_ COMPACTION_ COMPLETE - EV_
SESSION_ COMPACTION_ START - EV_
SESSION_ MODEL_ CHANGE - EV_
SESSION_ MODE_ CHANGED - EV_
SESSION_ PLAN_ CHANGED - EV_
SESSION_ SHUTDOWN - EV_
SESSION_ START - EV_
SESSION_ TASK_ COMPLETE - EV_
SKILL_ INVOKED - EV_
SUBAGENT_ COMPLETED - EV_
SUBAGENT_ STARTED - EV_
TOOL_ EXECUTION_ COMPLETE - EV_
TOOL_ EXECUTION_ START - EV_
USER_ MESSAGE
Functions§
- parse_
workspace - Parse a (reverse-engineered)
workspace.yamlbody.