Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 v0.1.0 Jun 22, 2026 Changes in this version + const SystemPromptDynamicBoundary + func BuildContext(sessionID string, turnNumber int, workingDirectory string, ...) map[string]string + func BuildContextWithGit(sessionID string, turnNumber int, workingDirectory string, ...) map[string]string + func BuildProviderRequest(canonicalPrompt CacheSafePrompt, model types.ModelIdentifier, ...) types.APIRequest + func BuildProviderRequestWithAppendPrompt(ctx context.Context, builder *Builder, sessionID types.SessionID, ...) (types.APIRequest, error) + func BuildProviderRequestWithHints(canonicalPrompt CacheSafePrompt, model types.ModelIdentifier, ...) types.APIRequest + func BuildProviderToolDefinitions(tools map[string]tool.Tool) []types.APIToolDefinition + func BuildProviderToolDefinitionsWithHints(tools map[string]tool.Tool, hints map[string]string) []types.APIToolDefinition + func HashTools(tools map[string]tool.Tool) string + func SeshatCoreStablePrompt() string + type Assembler struct + func NewAssembler() *Assembler + func (a *Assembler) AddSection(section Section) + func (a *Assembler) AddSections(sections []Section) + func (a *Assembler) Build(input BuildInput) (BuildResult, error) + func (a *Assembler) SetDefaultSections(sections []Section) + type BuildInput struct + Model string + OverrideSystemPrompt *string + Sections []Section + Variables map[string]string + type BuildResult struct + CacheBreakpoint int + DynamicText string + FullText string + StaticText string + SystemPrompt string + VariablesUsed []string + type Builder struct + func NewBuilder(assembler *Assembler, config *BuilderConfig) *Builder + func (b *Builder) BuildCacheSafeParams(ctx context.Context, input FetchSystemPromptPartsInput) (CacheSafeParams, error) + func (b *Builder) BuildCanonicalPrompt(ctx context.Context, sessionID types.SessionID, turnNumber int, ...) (CacheSafePrompt, error) + func (b *Builder) BuildSystemPrompt(ctx context.Context, sessionID types.SessionID, turnNumber int, ...) (string, error) + func (b *Builder) ClearStaleEntries() int + func (b *Builder) FetchSystemPromptParts(ctx context.Context, input FetchSystemPromptPartsInput) (SystemPromptParts, error) + func (b *Builder) GetCacheSize() int + func (b *Builder) InvalidateByToolHash(toolHash string) + func (b *Builder) InvalidateCache() + func (b *Builder) InvalidateSectionCache(sectionNames []string) + type BuilderConfig struct + CacheBoundaryPosition int + EnableCaching bool + func DefaultBuilderConfig() *BuilderConfig + type CacheEntry struct + ComputedAt time.Time + Content string + ModelConfig string + SectionNames []string + ToolHash string + ValidUntil *time.Time + type CacheHitResult struct + CachedAt time.Time + Content string + IsStale bool + ToolHash string + type CacheSafeParams struct + AppendPrompt *string + CustomPrompt *string + Model types.ModelIdentifier + SystemContext map[string]string + SystemPrompt string + Tools map[string]tool.Tool + UserContext map[string]string + type CacheSafePrompt struct + CacheBreakpoint int + DynamicText string + StableText string + SystemContext map[string]string + SystemPrompt string + SystemPromptBlocks []types.SystemPromptBlock + UserContext map[string]string + type ExecutionStage string + const StageContinuation + const StageDefault + const StagePlan + const StageToolCall + const StageToolResult + type FetchSystemPromptPartsInput struct + AdditionalWorkingDirectories []string + AppendSystemPrompt *string + CustomSystemPrompt *string + DeferredToolNames []string + MCPClients []string + MemoryContext string + Model types.ModelIdentifier + ProjectInstructions string + Stage ExecutionStage + StageOverrides map[ExecutionStage]string + ToolHints map[string]string + Tools map[string]tool.Tool + WorkingDirectory string + type PromptCache struct + func NewPromptCache() *PromptCache + func (c *PromptCache) ClearStaleEntries() int + func (c *PromptCache) GetSectionCache(sectionNames []string, tools map[string]tool.Tool, model types.ModelIdentifier, ...) (*CacheHitResult, bool) + func (c *PromptCache) InvalidateAll() + func (c *PromptCache) InvalidateByToolHash(toolHash string) + func (c *PromptCache) InvalidateSectionCache(sectionNames []string) + func (c *PromptCache) SetSectionCache(sectionNames []string, content string, tools map[string]tool.Tool, ...) + func (c *PromptCache) Size() int + type Section struct + Cacheable bool + Content string + DynamicBoundary bool + Enabled bool + Name string + Priority int + Type SectionType + func DefaultSystemPromptSections() []Section + type SectionType string + const SectionTypeAppend + const SectionTypeDefault + const SectionTypeDynamic + const SectionTypeSystem + const SectionTypeUser + type SystemPromptParts struct + CacheBreakpoint int + DefaultSystemPrompt []string + DynamicText string + StableText string + Stage ExecutionStage + StageOverrides map[ExecutionStage]string + SystemContext map[string]string + ToolHints map[string]string + UserContext map[string]string