config

package
v2.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Key = hooksconfig.Key + ".shell"
	// Commands to run on agent events, a list of definitions by event name
	Events = Key + ".events"
	// Every hook the events name runs without asking first
	AutoAccept = Key + ".auto_accept"
	// Addresses agent events are posted to, a table of targets by a key of their own
	Outbound = Key + ".outbound"
	// The hooks folders of the profile and of every profile declare in their HOOK.yaml run
	Folders = Key + ".folders"
	// Hook folders, by the names of their folders, that are kept and do not run
	FoldersOff = Key + ".folders_off"
)
View Source
const (
	Command = "command"
	Matcher = "matcher"
	Timeout = "timeout"
	Block   = "fail_closed"
)

Fields of one hook of the events setting

View Source
const (
	HookTimeout    = 60
	MaxHookTimeout = 300
)

Seconds a hook may take when its entry gives none, and the most it may take

View Source
const (
	PostTimeout    = 10
	MaxPostTimeout = 60
)

Seconds a post may take when its webhook gives none, and the most it may take

View Source
const (
	URL       = "url"
	Posted    = "events"
	Name      = "name"
	SecretEnv = "secret_env"
	Secret    = "secret"
)

Fields of one webhook of the outbound setting, besides the matcher and the time limit a hook has too

View Source
const (
	GroupTools    = "Tools"
	GroupReplies  = "Replies"
	GroupSessions = "Sessions"
	GroupAsking   = "Commands and questions"
	GroupHelpers  = "Subagents and skills"
	GroupRequests = "Model requests"
	GroupChat     = "Chat apps"
	GroupBoard    = "Task board"
)

Headings the events are listed under, in the order they show

View Source
const PickTools = "tool-pattern"

Kind of thing a value of tools names, a pattern of the names of the tools a hook or a webhook is for, by the name the hooks page registers its picker under

Variables

View Source
var Points = []Point{
	{hooks.PreToolCall, "Before tool call", "Can block, modify or request approval for a tool call", GroupTools},
	{hooks.PostToolCall, "After tool call", "Receives each tool call's result", GroupTools},
	{hooks.TransformToolResult, "Tool results", "Can modify tool results before the model reads them", GroupTools},
	{hooks.TransformTerminalOutput, "Command output", "Can modify terminal output before the model reads it", GroupTools},
	{hooks.PreLLMCall, "Before reply", "Can reject a message or add context for the agent", GroupReplies},
	{hooks.TransformLLMOutput, "Final answer", "Can rewrite the agent's final answer", GroupReplies},
	{hooks.PostLLMCall, "Reply completed", "Runs after the agent answers your message", GroupReplies},
	{hooks.SessionEnd, "Reply ended", "Runs when a reply ends, including failures and cancellations", GroupReplies},
	{hooks.PreVerify, "Before verification", "Can ask the agent to verify its code changes", GroupReplies},
	{hooks.InterimMessage, "Progress message", "Receives agent messages between tool calls", GroupReplies},
	{hooks.StreamStart, "Stream started", "Runs when a reply begins to stream", GroupReplies},
	{hooks.StreamDelta, "Stream update", "Receives each chunk of a streaming reply", GroupReplies},
	{hooks.StreamEnd, "Stream ended", "Runs when a reply stops streaming", GroupReplies},
	{hooks.AgentLoopStopped, "Reply stopped", "Receives the reason for an interrupted reply", GroupReplies},
	{hooks.SessionStart, "Session started", "Runs when a session starts", GroupSessions},
	{hooks.SessionFinalize, "Session closed", "Runs when a session permanently closes", GroupSessions},
	{hooks.SessionReset, "Session reset", "Runs when a window switches to a new session", GroupSessions},
	{hooks.SessionMove, "Session moved", "Runs when a session changes its working folder", GroupSessions},
	{hooks.SessionDelete, "Sessions deleted", "Runs when sessions are deleted", GroupSessions},
	{hooks.PostCompaction, "Session summarized", "Runs after session compaction", GroupSessions},
	{hooks.PreCommand, "Before command", "Can reject, answer or modify a slash command", GroupAsking},
	{hooks.PreApprovalRequest, "Before approval", "Runs before the agent asks you to approve something", GroupAsking},
	{hooks.PostApprovalResponse, "Approval resolved", "Runs when an approval request is accepted, denied or times out", GroupAsking},
	{hooks.HumanInputRequest, "Input requested", "Runs when the agent requests approval, an answer or a password", GroupAsking},
	{hooks.HumanInputResolved, "Input resolved", "Receives the outcome of an input request", GroupAsking},
	{hooks.SubagentStart, "Subagent started", "Runs when a subagent starts a task", GroupHelpers},
	{hooks.SubagentProgress, "Subagent progress", "Runs each time a subagent starts a tool call", GroupHelpers},
	{hooks.SubagentStop, "Subagent finished", "Runs when a subagent finishes its task", GroupHelpers},
	{hooks.SkillLifecycle, "Skill used or changed", "Runs when a skill is loaded, read, changed or installed", GroupHelpers},
	{hooks.PreAPIRequest, "Before model request", "Runs before each request goes to the provider", GroupRequests},
	{hooks.PostAPIRequest, "After model request", "Receives each provider response", GroupRequests},
	{hooks.APIRequestError, "Model request failed", "Runs when a provider request fails", GroupRequests},
	{hooks.PreAuxiliaryCall, "Before helper request", "Runs before each helper model request", GroupRequests},
	{hooks.PostAuxiliaryCall, "After helper request", "Receives each helper model response or error", GroupRequests},
	{hooks.PreTranscription, "Before transcription", "Can set the transcription model, language and prompt", GroupRequests},
	{hooks.AccountExhausted, "Account exhausted", "Runs when a provider account reaches a limit or is rejected", GroupRequests},
	{hooks.CronIncident, "Job incident", "Runs when a scheduled job incident opens, sends a notification or closes", GroupRequests},
	{hooks.GatewayStartup, "Chat apps started", "Runs when this profile's chat apps start connecting", GroupChat},
	{hooks.PreGatewayDispatch, "Message received", "Receives incoming chat messages before processing", GroupChat},
	{hooks.PostGatewayAdmission, "Message accepted", "Receives chat messages after access checks pass", GroupChat},
	{hooks.GatewayPlatformEvent, "Chat app events", "Receives chat app events", GroupChat},
	{hooks.RoomMemberActivity, "Room activity", "Receives room member activity", GroupChat},
	{hooks.KanbanTaskClaimed, "Task claimed", "Runs when a board task is claimed", GroupBoard},
	{hooks.KanbanTaskCompleted, "Task completed", "Runs when a board task completes", GroupBoard},
	{hooks.KanbanTaskBlocked, "Task blocked", "Runs when a board task is blocked", GroupBoard},
	{hooks.KanbanTaskUpdated, "Task updated", "Runs when a board task changes", GroupBoard},
	{hooks.KanbanWorkerSpawned, "Worker started", "Runs when a board worker starts", GroupBoard},
	{hooks.KanbanWorkerExited, "Worker exited", "Runs when a board worker exits", GroupBoard},
	{hooks.KanbanWorkerStaleClaim, "Worker stalled", "Runs when a worker holds a task too long", GroupBoard},
	{hooks.KanbanDispatchTick, "Task dispatch", "Runs on each task dispatch cycle", GroupBoard},
}

Events hooks and webhooks hear of under their headings, in the order a person is shown them, those hooks are set on most first

Functions

func HookTitle

func HookTitle(key string) string

HookTitle returns the title of the hook field the key names.

func Place

func Place(name string) int

Place of the event among the events as they are listed, those not listed last

func Register

func Register(cfg *config.Config)

func WebhookTitle

func WebhookTitle(key string) string

WebhookTitle returns the title of the webhook field the key names.

Types

type Point

type Point struct {
	Name, Title, About, Group string
}

One event a hook or a webhook hears of: its name in the settings file, what a person calls it, what a hook of it does, and the heading it is listed under

func PointOf

func PointOf(name string) Point

The event of the name as a person reads it, the name itself as its title for one icebath does not know

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL