claudemanaged

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManagedSettingsPath        = "/Library/Application Support/ClaudeCode/managed-settings.json"
	LinuxManagedSettingsPath   = "/etc/claude-code/managed-settings.json"
	WindowsManagedSettingsPath = `C:\Program Files\ClaudeCode\managed-settings.json`
	DefaultKontextBinary       = "/usr/local/bin/kontext"
	DefaultHookTimeout         = 20
)

Variables

View Source
var SupportedEvents = []Event{
	{Name: hook.HookSessionStart, Alias: "session-start", Async: true},
	{Name: hook.HookPreToolUse, Alias: "pre-tool-use"},
	{Name: hook.HookPostToolUse, Alias: "post-tool-use"},
	{Name: hook.HookPostToolUseFailed, Alias: "post-tool-use-failure"},
	{Name: hook.HookSessionEnd, Alias: "session-end", Async: true},
}

Functions

func AliasForEvent

func AliasForEvent(name hook.HookName) (string, bool)

func DefaultManagedSettingsPath

func DefaultManagedSettingsPath() string

func ParseEventAlias

func ParseEventAlias(value string) (hook.HookName, bool)

func TemplateJSON

func TemplateJSON(kontextBinary string) ([]byte, error)

func Validate

func Validate(data []byte, kontextBinary string) error

Types

type Event

type Event struct {
	Name  hook.HookName
	Alias string
	Async bool
}

type Handler

type Handler struct {
	Type    string   `json:"type"`
	Command string   `json:"command"`
	Args    []string `json:"args,omitempty"`
	Timeout int      `json:"timeout,omitempty"`
	Async   *bool    `json:"async,omitempty"`
}

type MatcherGroup

type MatcherGroup struct {
	Matcher string    `json:"matcher"`
	Hooks   []Handler `json:"hooks"`
}

type Settings

type Settings struct {
	Hooks                 map[string][]MatcherGroup `json:"hooks"`
	DisableAllHooks       *bool                     `json:"disableAllHooks,omitempty"`
	AllowManagedHooksOnly *bool                     `json:"allowManagedHooksOnly,omitempty"`
}

func Template

func Template(kontextBinary string) Settings

Jump to

Keyboard shortcuts

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