bootstrap

package
v1.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlwaysVisible = map[string]bool{
	"clockify_whoami":           true,
	"clockify_list_tools":       true,
	"clockify_search_tools":     true,
	"clockify_activate_group":   true,
	"clockify_activate_tool":    true,
	"clockify_deactivate_group": true,
	"clockify_policy_info":      true,
	"clockify_resolve_name":     true,
	"clockify_resolve_debug":    true,
}

AlwaysVisible lists introspection tools shown regardless of mode.

View Source
var MinimalSet = map[string]bool{
	"clockify_whoami":           true,
	"clockify_list_tools":       true,
	"clockify_search_tools":     true,
	"clockify_activate_group":   true,
	"clockify_activate_tool":    true,
	"clockify_deactivate_group": true,
	"clockify_policy_info":      true,
	"clockify_resolve_name":     true,
	"clockify_resolve_debug":    true,
	"clockify_start_timer":      true,
	"clockify_stop_timer":       true,
	"clockify_timer_status":     true,
	"clockify_list_entries":     true,
	"clockify_add_entry":        true,
	"clockify_list_projects":    true,
	"clockify_log_time":         true,
}

MinimalSet lists the core tools exposed in Minimal mode.

View Source
var Tier1Catalog = []CatalogEntry{
	{Name: "clockify_whoami", Description: "Get current user and workspace context", Domain: "context", Keywords: []string{"identity", "user", "workspace", "session"}},
	{Name: "clockify_list_tools", Description: "Search and discover available tools", Domain: "context", Keywords: []string{"find", "discover", "catalog", "tools"}},
	{Name: "clockify_search_tools", Description: "Deprecated compatibility shim for tool search and activation", Domain: "context", Keywords: []string{"find", "discover", "activate", "tools", "deprecated"}},
	{Name: "clockify_activate_group", Description: "Activate every tool in a Tier 2 group", Domain: "context", Keywords: []string{"activate", "group", "tools", "tier2"}},
	{Name: "clockify_activate_tool", Description: "Activate a hidden tool by name", Domain: "context", Keywords: []string{"activate", "tool", "tools", "tier2"}},
	{Name: "clockify_deactivate_group", Description: "Deactivate a previously activated Tier 2 group", Domain: "context", Keywords: []string{"deactivate", "group", "tools", "tier2"}},
	{Name: "clockify_policy_info", Description: "Display effective policy configuration", Domain: "context", Keywords: []string{"policy", "mode", "permissions", "safety"}},
	{Name: "clockify_resolve_name", Description: "Resolve a Clockify name or email to an ID", Domain: "context", Keywords: []string{"resolve", "lookup", "name", "id", "disambiguate"}},
	{Name: "clockify_resolve_debug", Description: "Deprecated compatibility alias for name resolution", Domain: "context", Keywords: []string{"resolve", "debug", "lookup", "name", "id", "deprecated"}},
	{Name: "clockify_list_workspaces", Description: "List available workspaces", Domain: "workspaces", Keywords: []string{"workspace", "list"}},
	{Name: "clockify_get_workspace", Description: "Get workspace details", Domain: "workspaces", Keywords: []string{"workspace", "details"}},
	{Name: "clockify_current_user", Description: "Get the current Clockify user", Domain: "users", Keywords: []string{"user", "profile", "me"}},
	{Name: "clockify_list_users", Description: "List workspace members", Domain: "users", Keywords: []string{"user", "members", "team"}},
	{Name: "clockify_start_timer", Description: "Start a new timer", Domain: "timer", Keywords: []string{"timer", "start", "track", "begin"}},
	{Name: "clockify_stop_timer", Description: "Stop the running timer", Domain: "timer", Keywords: []string{"timer", "stop", "end", "finish"}},
	{Name: "clockify_timer_status", Description: "Check if a timer is running", Domain: "timer", Keywords: []string{"timer", "status", "running", "active"}},
	{Name: "clockify_list_entries", Description: "List recent time entries", Domain: "entries", Keywords: []string{"entries", "time", "list", "history"}},
	{Name: "clockify_get_entry", Description: "Get a single time entry by ID", Domain: "entries", Keywords: []string{"entry", "get", "detail"}},
	{Name: "clockify_today_entries", Description: "List today's time entries", Domain: "entries", Keywords: []string{"today", "entries", "current"}},
	{Name: "clockify_add_entry", Description: "Create a new time entry", Domain: "entries", Keywords: []string{"entry", "create", "add", "log"}},
	{Name: "clockify_update_entry", Description: "Update an existing time entry", Domain: "entries", Keywords: []string{"entry", "update", "edit", "modify"}},
	{Name: "clockify_delete_entry", Description: "Delete a time entry", Domain: "entries", Keywords: []string{"entry", "delete", "remove"}},
	{Name: "clockify_list_projects", Description: "List workspace projects", Domain: "projects", Keywords: []string{"project", "list"}},
	{Name: "clockify_get_project", Description: "Get project details by name or ID", Domain: "projects", Keywords: []string{"project", "get", "detail"}},
	{Name: "clockify_create_project", Description: "Create a new project", Domain: "projects", Keywords: []string{"project", "create", "new"}},
	{Name: "clockify_list_clients", Description: "List workspace clients", Domain: "clients", Keywords: []string{"client", "list", "customer"}},
	{Name: "clockify_create_client", Description: "Create a new client", Domain: "clients", Keywords: []string{"client", "create", "new", "customer"}},
	{Name: "clockify_list_tags", Description: "List workspace tags", Domain: "tags", Keywords: []string{"tag", "label", "list"}},
	{Name: "clockify_create_tag", Description: "Create a new tag", Domain: "tags", Keywords: []string{"tag", "create", "new", "label"}},
	{Name: "clockify_list_tasks", Description: "List tasks for a project", Domain: "tasks", Keywords: []string{"task", "list", "todo"}},
	{Name: "clockify_create_task", Description: "Create a new task in a project", Domain: "tasks", Keywords: []string{"task", "create", "new", "todo"}},
	{Name: "clockify_attendance_report", Description: "Attendance report via the Clockify Reports API", Domain: "reports", Keywords: []string{"report", "attendance", "team", "capacity"}},
	{Name: "clockify_summary_report", Description: "Summary report via the Clockify Reports API", Domain: "reports", Keywords: []string{"report", "summary", "aggregate", "project"}},
	{Name: "clockify_detailed_report", Description: "Detailed report via the Clockify Reports API", Domain: "reports", Keywords: []string{"report", "detailed", "entries", "export"}},
	{Name: "clockify_weekly_summary", Description: "Weekly report via the Clockify Reports API", Domain: "reports", Keywords: []string{"report", "weekly", "week", "summary"}},
	{Name: "clockify_quick_report", Description: "Quick high-signal summary for recent period", Domain: "reports", Keywords: []string{"report", "quick", "overview", "recent"}},
	{Name: "clockify_timesheet_review", Description: "Review timesheets for gaps, overlaps, and suggested fixes", Domain: "workflows", Keywords: []string{"timesheet", "review", "gaps", "overlaps", "suggestions"}},
	{Name: "clockify_log_time", Description: "Create a finished time entry", Domain: "workflows", Keywords: []string{"log", "time", "entry", "create", "finished"}},
	{Name: "clockify_timesheet_fill_gap", Description: "Fill a validated timesheet gap with a finished entry", Domain: "workflows", Keywords: []string{"timesheet", "gap", "fill", "entry", "create"}},
	{Name: "clockify_switch_project", Description: "Stop timer and start on different project", Domain: "workflows", Keywords: []string{"switch", "project", "timer", "change"}},
	{Name: "clockify_find_and_update_entry", Description: "Find and update a time entry by filters", Domain: "workflows", Keywords: []string{"find", "update", "search", "entry", "modify"}},
}

Tier1Catalog contains all Tier 1 tools with searchable metadata.

Functions

This section is empty.

Types

type CatalogEntry

type CatalogEntry struct {
	Name        string
	Description string
	Domain      string
	Keywords    []string
}

CatalogEntry describes a single tool for search/discovery.

func SearchCatalog

func SearchCatalog(query string) []CatalogEntry

SearchCatalog performs a case-insensitive substring search across all catalog entries, matching against Name, Description, Domain, and Keywords. An empty query returns all entries.

type Config

type Config struct {
	Mode        Mode
	CustomTools map[string]bool
	ActiveTools map[string]bool
	Tier1Names  map[string]bool // set post-registry via SetTier1Tools
}

Config holds the bootstrap configuration for tool visibility.

func ConfigFromEnv

func ConfigFromEnv() (Config, error)

ConfigFromEnv reads bootstrap configuration from environment variables.

CLOCKIFY_BOOTSTRAP_MODE: "full_tier1" (default), "minimal", "custom" (case-insensitive) CLOCKIFY_BOOTSTRAP_TOOLS: comma-separated tool names (only used in custom mode)

func (*Config) ActivateTool

func (c *Config) ActivateTool(name string)

ActivateTool marks a tool as visible regardless of bootstrap mode.

func (*Config) ActivateTools

func (c *Config) ActivateTools(names []string)

ActivateTools marks multiple tools as visible regardless of bootstrap mode.

func (*Config) Clone

func (c *Config) Clone() *Config

func (*Config) DeactivateTools added in v1.2.1

func (c *Config) DeactivateTools(names []string)

DeactivateTools removes dynamically activated visibility markers. AlwaysVisible, MinimalSet, and CustomTools still take precedence when IsVisible is evaluated, so this only reverses runtime activation.

func (*Config) IsVisible

func (c *Config) IsVisible(name string) bool

IsVisible reports whether a tool should be exposed to the LLM.

func (*Config) SetTier1Tools

func (c *Config) SetTier1Tools(names map[string]bool)

SetTier1Tools stores the set of Tier 1 tool names for visibility checking.

func (*Config) VisibleCount

func (c *Config) VisibleCount() int

VisibleCount returns how many of the registered Tier 1 tool names pass IsVisible.

type Mode

type Mode int

Mode controls which tools are visible to the LLM.

const (
	FullTier1 Mode = iota
	Minimal
	Custom
)

func (Mode) String

func (m Mode) String() string

String returns the string representation of a Mode.

Jump to

Keyboard shortcuts

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