context

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package context loads shared enterprise context mounts for agent prompts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mount

type Mount struct {
	Name            string
	Path            string
	Description     string
	Classification  int
	Content         string // CleanContent (private sections stripped)
	RawContent      string // Full content including private sections
	PrivateStripped int
}

Mount represents a single loaded context mount.

type SharedContext

type SharedContext struct {
	Mounts []Mount
}

SharedContext holds all loaded context mounts for a policy.

func LoadSharedContext

func LoadSharedContext(pol *policy.Policy) (*SharedContext, error)

LoadSharedContext reads all configured shared mounts from the policy.

func (*SharedContext) FormatForPrompt

func (sc *SharedContext) FormatForPrompt() string

FormatForPrompt formats all mounts for inclusion in the LLM prompt. Uses RawContent so the agent sees <private> content in-session.

func (*SharedContext) GetMaxTier

func (sc *SharedContext) GetMaxTier() int

GetMaxTier returns the highest data tier across all loaded mounts.

Jump to

Keyboard shortcuts

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