Documentation
¶
Overview ¶
Package vogon implements the Agent interface for a deterministic test agent used as an E2E canary. It exercises the full checkpoint/hook lifecycle without real API calls. Named after the Vogons from The Hitchhiker's Guide to the Galaxy — bureaucratic, procedural, and deterministic to a fault.
Index ¶
- Constants
- func NewAgent() agent.Agent
- type Agent
- func (v *Agent) AreHooksInstalled(_ context.Context) bool
- func (v *Agent) ChunkTranscript(_ context.Context, content []byte, maxSize int) ([][]byte, error)
- func (v *Agent) Description() string
- func (v *Agent) DetectPresence(_ context.Context) (bool, error)
- func (v *Agent) FormatResumeCommand(sessionID string) string
- func (v *Agent) GetSessionDir(_ string) (string, error)
- func (v *Agent) GetSessionID(input *agent.HookInput) string
- func (v *Agent) HookNames() []string
- func (v *Agent) InstallHooks(_ context.Context, _ bool, _ bool) (int, error)
- func (v *Agent) IsPreview() bool
- func (v *Agent) IsTestOnly() bool
- func (v *Agent) Name() types.AgentName
- func (v *Agent) ParseHookEvent(_ context.Context, hookName string, stdin io.Reader) (*agent.Event, error)
- func (v *Agent) ProtectedDirs() []string
- func (v *Agent) ReadSession(input *agent.HookInput) (*agent.AgentSession, error)
- func (v *Agent) ReadTranscript(sessionRef string) ([]byte, error)
- func (v *Agent) ReassembleTranscript(chunks [][]byte) ([]byte, error)
- func (v *Agent) ResolveSessionFile(sessionDir, agentSessionID string) string
- func (v *Agent) Type() types.AgentType
- func (v *Agent) UninstallHooks(_ context.Context) error
- func (v *Agent) WriteHookResponse(message string) error
- func (v *Agent) WriteSession(_ context.Context, session *agent.AgentSession) error
Constants ¶
const ( HookNameSessionStart = "session-start" HookNameSessionEnd = "session-end" HookNameStop = "stop" HookNameUserPromptSubmit = "user-prompt-submit" )
const ( // AgentNameVogon is the registry key for the vogon agent. AgentNameVogon types.AgentName = "vogon" // AgentTypeVogon is the type identifier stored in metadata. AgentTypeVogon types.AgentType = "Vogon Agent" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct{}
Agent implements agent.Agent and agent.HookSupport for E2E canary tests.
func (*Agent) AreHooksInstalled ¶
AreHooksInstalled returns false — vogon agent has no external hooks to install. The vogon binary fires hooks directly via `entire hooks vogon <verb>`.
func (*Agent) ChunkTranscript ¶
func (*Agent) Description ¶
func (*Agent) DetectPresence ¶
DetectPresence returns false — vogon agent is never auto-detected.
func (*Agent) FormatResumeCommand ¶
func (*Agent) InstallHooks ¶
InstallHooks is a no-op — the vogon binary fires hooks directly.
func (*Agent) IsTestOnly ¶
IsTestOnly marks this agent as test-only, excluding it from `entire enable`.
func (*Agent) ParseHookEvent ¶
func (v *Agent) ParseHookEvent(_ context.Context, hookName string, stdin io.Reader) (*agent.Event, error)
ParseHookEvent translates vogon agent hook JSON into a normalized lifecycle Event.
func (*Agent) ProtectedDirs ¶
func (*Agent) ReadSession ¶
func (*Agent) ReassembleTranscript ¶
func (*Agent) ResolveSessionFile ¶
func (*Agent) UninstallHooks ¶
UninstallHooks is a no-op.
func (*Agent) WriteHookResponse ¶
WriteHookResponse writes a plain text message to stdout.