Versions in this module Expand all Collapse all v0 v0.5.1 Mar 19, 2026 v0.5.0 Mar 6, 2026 Changes in this version + const HookNameAgentStop + const HookNameErrorOccurred + const HookNamePostToolUse + const HookNamePreToolUse + const HookNameSessionEnd + const HookNameSessionStart + const HookNameSubagentStop + const HookNameUserPromptSubmitted + const HooksFileName + func ExtractModelFromTranscript(ctx context.Context, transcriptPath string) string + func NewCopilotCLIAgent() agent.Agent + type CopilotCLIAgent struct + func (c *CopilotCLIAgent) AreHooksInstalled(ctx context.Context) bool + func (c *CopilotCLIAgent) CalculateTokenUsage(transcriptData []byte, fromOffset int) (*agent.TokenUsage, error) + func (c *CopilotCLIAgent) ChunkTranscript(_ context.Context, content []byte, maxSize int) ([][]byte, error) + func (c *CopilotCLIAgent) Description() string + func (c *CopilotCLIAgent) DetectPresence(ctx context.Context) (bool, error) + func (c *CopilotCLIAgent) ExtractModifiedFilesFromOffset(path string, startOffset int) (files []string, currentPosition int, err error) + func (c *CopilotCLIAgent) ExtractPrompts(sessionRef string, fromOffset int) ([]string, error) + func (c *CopilotCLIAgent) ExtractSummary(sessionRef string) (string, error) + func (c *CopilotCLIAgent) FormatResumeCommand(sessionID string) string + func (c *CopilotCLIAgent) GetSessionDir(_ string) (string, error) + func (c *CopilotCLIAgent) GetSessionID(input *agent.HookInput) string + func (c *CopilotCLIAgent) GetSupportedHooks() []agent.HookType + func (c *CopilotCLIAgent) GetTranscriptPosition(path string) (int, error) + func (c *CopilotCLIAgent) HookNames() []string + func (c *CopilotCLIAgent) InstallHooks(ctx context.Context, localDev bool, force bool) (int, error) + func (c *CopilotCLIAgent) IsPreview() bool + func (c *CopilotCLIAgent) Name() types.AgentName + func (c *CopilotCLIAgent) ParseHookEvent(ctx context.Context, hookName string, stdin io.Reader) (*agent.Event, error) + func (c *CopilotCLIAgent) ProtectedDirs() []string + func (c *CopilotCLIAgent) ReadSession(input *agent.HookInput) (*agent.AgentSession, error) + func (c *CopilotCLIAgent) ReadTranscript(sessionRef string) ([]byte, error) + func (c *CopilotCLIAgent) ReassembleTranscript(chunks [][]byte) ([]byte, error) + func (c *CopilotCLIAgent) ResolveSessionFile(sessionDir, agentSessionID string) string + func (c *CopilotCLIAgent) Type() types.AgentType + func (c *CopilotCLIAgent) UninstallHooks(ctx context.Context) error + func (c *CopilotCLIAgent) WriteSession(_ context.Context, session *agent.AgentSession) error + type CopilotHookEntry struct + Bash string + Comment string + Cwd string + Env map[string]string + TimeoutSec int + Type string + type CopilotHooks struct + AgentStop []CopilotHookEntry + ErrorOccurred []CopilotHookEntry + PostToolUse []CopilotHookEntry + PreToolUse []CopilotHookEntry + SessionEnd []CopilotHookEntry + SessionStart []CopilotHookEntry + SubagentStop []CopilotHookEntry + UserPromptSubmitted []CopilotHookEntry + type CopilotHooksFile struct + Hooks CopilotHooks + Version int