prompt

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "prompt"

Variables

This section is empty.

Functions

func WithAgentFinder

func WithAgentFinder(f agentmdl.Finder) func(*Service)

func WithConversationClient

func WithConversationClient(c apiconv.Client) func(*Service)

func WithMCPManager

func WithMCPManager(m promptdef.MCPManager) func(*Service)

Types

type EvidenceContract added in v0.1.9

type EvidenceContract struct {
	Required   []string `json:"required,omitempty"`
	Optional   []string `json:"optional,omitempty"`
	Forbidden  []string `json:"forbidden,omitempty"`
	Completion []string `json:"completion,omitempty"`
}

type GetInput

type GetInput struct {
	ID              string `json:"id"`
	IncludeDocument *bool  `json:"includeDocument,omitempty"`
}

GetInput is the request payload for prompt:get.

type GetOutput

type GetOutput struct {
	ID               string            `json:"id"`
	Name             string            `json:"name,omitempty"`
	Description      string            `json:"description,omitempty"`
	EvidenceContract *EvidenceContract `json:"evidenceContract,omitempty"`
	ToolBundles      []string          `json:"toolBundles,omitempty"`
	PreferredTools   []string          `json:"preferredTools,omitempty"`
	Template         string            `json:"template,omitempty"`
	Templates        []string          `json:"templates,omitempty"`
	Resources        []string          `json:"resources,omitempty"`
	Messages         []Message         `json:"messages,omitempty"`
	// Injected is true when includeDocument=true and messages were written into
	// the conversation.
	Injected bool `json:"injected,omitempty"`
}

GetOutput is the response payload for prompt:get. Messages are always returned regardless of includeDocument. includeDocument controls only whether messages are also injected into the current conversation via AddMessage().

type ListInput

type ListInput struct{}

ListInput is the request payload for prompt:list.

type ListItem

type ListItem struct {
	ID               string            `json:"id"`
	Name             string            `json:"name,omitempty"`
	Description      string            `json:"description,omitempty"`
	AppliesTo        []string          `json:"appliesTo,omitempty"`
	EvidenceContract *EvidenceContract `json:"evidenceContract,omitempty"`
	ToolBundles      []string          `json:"toolBundles,omitempty"`
	Template         string            `json:"template,omitempty"`
	Templates        []string          `json:"templates,omitempty"`
}

ListItem is a single entry in a prompt:list response. Instruction content is intentionally omitted — descriptions are selection guidance only so that orchestrators can choose a profile without seeing its full instruction text.

type ListOutput

type ListOutput struct {
	Profiles []ListItem `json:"profiles"`
}

ListOutput is the response payload for prompt:list.

type Message

type Message struct {
	Role string `json:"role"`
	Text string `json:"text"`
}

Message is a rendered role+content pair returned in GetOutput.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements the prompt:list and prompt:get tools.

func New

func New(repo *promptrepo.Repository, opts ...func(*Service)) *Service

func (*Service) Method

func (s *Service) Method(name string) (svc.Executable, error)

func (*Service) Methods

func (s *Service) Methods() svc.Signatures

func (*Service) Name

func (s *Service) Name() string

Jump to

Keyboard shortcuts

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