refworkspaceguard

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GatedToolName = "ref_ws_gated_tool"

GatedToolName is removed from the catalog until state marks the session unlocked.

View Source
const HeatToolPrefix = "ref_heat_"

HeatToolPrefix is blocked in the tool stream when LabelDenyHeat is active.

View Source
const ID = "ref-workspace-guard"

ID is the plugin id for ref-workspace-guard.

View Source
const LabelDenyHeat = "ref_deny_heat"

LabelDenyHeat enables the tool reactor heat prefix rule when set to "1" in the workspace view.

View Source
const StateKeyUnlocked = "unlocked"

StateKeyUnlocked is set by the request transform after each request.

Variables

This section is empty.

Functions

func NewCatalogFilter

func NewCatalogFilter(cfg Config) toolcatalog.Filter

NewCatalogFilter removes GatedToolName until the session unlock transform has run.

func NewHeatReactor

func NewHeatReactor(cfg Config) sdk.ToolReactor

NewHeatReactor enforces the workspace label policy on tool stream events.

func NewSessionUnlockTransform

func NewSessionUnlockTransform(cfg Config) request.Transform

NewSessionUnlockTransform records session progress so a later request can expose gated tools.

func NewStaticResolver

func NewStaticResolver(cfg Config) workspace.Resolver

NewStaticResolver returns a fixed workspace view from config.

Types

type Config

type Config struct {
	Order *int `yaml:"order"`

	ProjectRoot string            `yaml:"project_root"`
	DirtyTree   bool              `yaml:"dirty_tree"`
	Markers     []string          `yaml:"markers"`
	Labels      map[string]string `yaml:"labels"`
}

Config controls the static workspace view and state gating keys.

func DecodeConfig

func DecodeConfig(n yaml.Node) (Config, error)

DecodeConfig decodes YAML.

Jump to

Keyboard shortcuts

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