config

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 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 a tool runs", "Runs before each tool call and can block it, change it or ask you", GroupTools},
	{hooks.PostToolCall, "After a tool runs", "Runs after each tool call, with what the tool did", GroupTools},
	{hooks.TransformToolResult, "Tool results", "Can change the result of a tool before the model reads it", GroupTools},
	{hooks.TransformTerminalOutput, "Command output", "Can change the output of a terminal command before the model reads it", GroupTools},
	{hooks.PreLLMCall, "Before a reply starts", "Can refuse your message or give the agent more to go on", GroupReplies},
	{hooks.TransformLLMOutput, "The agent's reply", "Can rewrite the reply the agent ends with", GroupReplies},
	{hooks.PostLLMCall, "Reply answered", "Runs once the agent has answered your message", GroupReplies},
	{hooks.SessionEnd, "Reply ended", "Runs as each reply ends, also one that failed or was stopped", GroupReplies},
	{hooks.PreVerify, "Code changes checked", "Can send the agent back to check the code it changed", GroupReplies},
	{hooks.InterimMessage, "While the agent works", "Runs on what the agent says between its steps", GroupReplies},
	{hooks.StreamStart, "Reply starts", "Runs when a reply begins to stream", GroupReplies},
	{hooks.StreamDelta, "Reply streams", "Runs on each piece of a reply as it streams", GroupReplies},
	{hooks.StreamEnd, "Reply stops streaming", "Runs when a reply stops streaming", GroupReplies},
	{hooks.AgentLoopStopped, "Reply stopped", "Runs when a reply is stopped before it ended, with why", GroupReplies},
	{hooks.SessionStart, "Session starts", "Runs when a session starts", GroupSessions},
	{hooks.SessionFinalize, "Session closes", "Runs when a session closes for good", GroupSessions},
	{hooks.SessionReset, "New session in a window", "Runs when a window leaves its session for a new one", GroupSessions},
	{hooks.SessionMove, "Session moved", "Runs when a session moves to work in another folder", GroupSessions},
	{hooks.SessionDelete, "Sessions deleted", "Runs when sessions are deleted", GroupSessions},
	{hooks.PostCompaction, "Session summarized", "Runs after a long session is summarized to fit the model", GroupSessions},
	{hooks.PreCommand, "Before a slash command", "Runs before a slash command and can refuse it, answer it or change it", GroupAsking},
	{hooks.PreApprovalRequest, "Before an approval", "Runs before the agent asks you to approve something", GroupAsking},
	{hooks.PostApprovalResponse, "Approval answered", "Runs once an approval was given, refused or not answered in time", GroupAsking},
	{hooks.HumanInputRequest, "You are asked something", "Runs when the agent asks you for an approval, an answer or a password", GroupAsking},
	{hooks.HumanInputResolved, "You answered", "Runs on what came of asking you", GroupAsking},
	{hooks.SubagentStart, "Subagent starts", "Runs when a subagent starts a task", GroupHelpers},
	{hooks.SubagentProgress, "Subagent at work", "Runs each time a subagent starts a tool call", GroupHelpers},
	{hooks.SubagentStop, "Subagent finishes", "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 a model request", "Runs before each request goes to the provider", GroupRequests},
	{hooks.PostAPIRequest, "After a model request", "Runs on each answer from the provider", GroupRequests},
	{hooks.APIRequestError, "Model request failed", "Runs on each request to the provider that failed", GroupRequests},
	{hooks.PreAuxiliaryCall, "Before a helper request", "Runs before each request of a helper model", GroupRequests},
	{hooks.PostAuxiliaryCall, "After a helper request", "Runs on each answer to a helper model, or its failure", GroupRequests},
	{hooks.PreTranscription, "Speech to text starts", "Can set the model, language and prompt of a transcription", GroupRequests},
	{hooks.LoginExhausted, "An account is used up", "Runs when an account of a provider reaches a limit or is refused", GroupRequests},
	{hooks.CronIncident, "A job keeps failing", "Runs as an incident of a scheduled job opens, is told or closes", GroupRequests},
	{hooks.GatewayStartup, "Chat apps start", "Runs when the chat apps of the profile start to connect", GroupChat},
	{hooks.PreGatewayDispatch, "Chat app message arrives", "Runs on a message from a chat app before it is handled", GroupChat},
	{hooks.PostGatewayAdmission, "Chat app message let in", "Runs on a message from a chat app once it is let in", GroupChat},
	{hooks.GatewayPlatformEvent, "Chat app events", "Runs on the events of your chat apps", GroupChat},
	{hooks.RoomMemberActivity, "Room activity", "Runs on what the members of a room do", GroupChat},
	{hooks.KanbanTaskClaimed, "Board task taken", "Runs when a task on the board is taken", GroupBoard},
	{hooks.KanbanTaskCompleted, "Board task done", "Runs when a task on the board is done", GroupBoard},
	{hooks.KanbanTaskBlocked, "Board task blocked", "Runs when a task on the board is blocked", GroupBoard},
	{hooks.KanbanTaskUpdated, "Board task changed", "Runs when a task on the board changes", GroupBoard},
	{hooks.KanbanWorkerSpawned, "Board worker starts", "Runs when a worker of the board starts", GroupBoard},
	{hooks.KanbanWorkerExited, "Board worker exits", "Runs when a worker of the board exits", GroupBoard},
	{hooks.KanbanWorkerStaleClaim, "Board worker stalls", "Runs when a worker holds a task too long", GroupBoard},
	{hooks.KanbanDispatchTick, "Board hands out tasks", "Runs each time the board hands out tasks", 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 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)

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