Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
// GetPrompt returns the raw template content with {{SOUL.MD}} /
// {{USER.MD}} / {{MEMORY.MD}} placeholders preserved. Intended for
// the settings UI so edits round-trip without loss.
GetPrompt(ctx context.Context, key string) (string, error)
// ResolvePrompt returns the content with all reference placeholders
// expanded against the latest SOUL / USER / MEMORY values. Runtime
// consumers (agent session init, IM gateway) must use this instead
// of GetPrompt so updates to SOUL / USER / MEMORY propagate without
// requiring users to re-save every dependent prompt.
ResolvePrompt(ctx context.Context, key string) (string, error)
// SavePrompt stores the content as-is (raw, with placeholders
// preserved).
SavePrompt(ctx context.Context, key string, content string) error
// PromptFilePath returns the absolute on-disk path used to persist the
// given prompt key, or "" if the key is not file-backed (e.g. stored in
// the prompt DB).
// Callers use this to render "saved to <path>" hints in the UI without
// the frontend having to know the on-disk layout.
PromptFilePath(key string) (string, error)
}
func NewService ¶
Click to show internal directories.
Click to hide internal directories.