Documentation
¶
Index ¶
- Constants
- Variables
- func MarkAllRead(ctx context.Context, app core.App, actorID string) (int, error)
- func Register(app core.App)
- func SetPinned(ctx context.Context, app core.App, actorID, itemID string, pinned bool) error
- type CreateInput
- type Item
- func Create(ctx context.Context, app core.App, actorID string, input CreateInput) (Item, error)
- func Get(ctx context.Context, app core.App, actorID, itemID string, includeContent bool) (Item, error)
- func Update(ctx context.Context, app core.App, actorID, itemID string, input UpdateInput) (Item, error)
- type ItemSummary
- type SearchOptions
- type SummarizeResult
- type UpdateInput
Constants ¶
View Source
const MaxSearchResults = 20
Variables ¶
View Source
var ErrPinLimit = errors.New("you can pin at most 6 reading items")
Functions ¶
func MarkAllRead ¶ added in v0.0.7
MarkAllRead marks every active unread reading item owned by the actor as read.
Types ¶
type CreateInput ¶
type CreateInput struct {
URL string
Title string
Description string
Tags []string
Status string
ProjectID string
SummaryLanguage string
}
CreateInput holds the fields for creating a reading item.
type Item ¶
type Item struct {
ID string `json:"id"`
Title string `json:"title"`
URL string `json:"url"`
Description string `json:"description,omitempty"`
ProjectID string `json:"projectId,omitempty"`
Status string `json:"status"`
Tags []string `json:"tags,omitempty"`
Summary string `json:"summary,omitempty"`
KeyPoints []string `json:"keyPoints,omitempty"`
ContentText string `json:"contentText,omitempty"`
SummaryLanguage string `json:"summaryLanguage,omitempty"`
}
Item is the full reading item projection returned by Create and Get.
type ItemSummary ¶
type ItemSummary struct {
ID string `json:"id"`
Title string `json:"title"`
URL string `json:"url"`
Description string `json:"description,omitempty"`
ProjectID string `json:"projectId,omitempty"`
Status string `json:"status"`
Summary string `json:"summary,omitempty"`
KeyPoints []string `json:"keyPoints,omitempty"`
Tags []string `json:"tags,omitempty"`
SummaryLanguage string `json:"summaryLanguage,omitempty"`
}
ItemSummary is the lightweight projection returned by Search. It excludes content_text to avoid large payloads in tool results.
func Search ¶
func Search(ctx context.Context, app core.App, actorID string, options SearchOptions) ([]ItemSummary, error)
Search returns the reading items owned by an authenticated user, optionally filtered by a fuzzy query and status. Agent tools call this domain query instead of duplicating collection authorization logic.
type SearchOptions ¶
SearchOptions controls the reading item query.
type SummarizeResult ¶
type SummarizeResult struct {
ContentText string `json:"contentText"`
Summary string `json:"summary"`
KeyPoints []string `json:"keyPoints"`
}
SummarizeResult is the outcome of fetching and summarizing an article.
Click to show internal directories.
Click to hide internal directories.