Skip to main content

Module types

Module types 

Source
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§

EventLine
One line of events.jsonl.
MessageEvent
A user.message, assistant.message, or system.message.
Session
A parsed Copilot session: the ordered event lines plus the directory id.
SessionMetadata
Lightweight metadata for a session, for listing without a full walk.
SessionShutdown
session.shutdown — carries per-session token/model metrics.
SessionStart
session.start — the session-meta line.
Subagent
A subagent.started / subagent.completed.
ToolExecution
A tool.execution_start / tool.execution_complete.
Workspace
Git/workspace context parsed from a session’s workspace.yaml.

Enums§

CopilotEvent
A semantically classified events.jsonl line.

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.yaml body.