Help us shape the future of Go! Take the 2026 Go Developer Survey

sessionquery

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, deps Deps) (agentkit.Tool, error)

New registers tool/session-search (alias kind tool/session-query): cross-session FTS, browse, and scroll.

Types

type Config

type Config struct {
	DefaultLimit int `json:"defaultLimit"`
}

func (*Config) SetDefaults added in v0.3.48

func (c *Config) SetDefaults()

SetDefaults implements pluginkit.Defaulter.

func (*Config) Validate added in v0.3.48

func (c *Config) Validate() error

Validate implements pluginkit.Validator.

type Deps

type Deps struct {
	Index capsessionindex.Service `json:"index"`
}

type Input

type Input struct {
	Mode string `json:"mode,omitempty" jsonschema:"search (default) | list | scroll"`
	// Search: FTS query. List: ignored. Scroll: optional when jumping to a session without a hit.
	Query string `json:"query,omitempty" jsonschema:"Keywords for mode=search"`
	// Scroll: session id from a prior search hit or list row.
	SessionID string `json:"session_id,omitempty" jsonschema:"Required for mode=scroll"`
	// Scroll: anchor event seq (from search hit); 0 means latest in session.
	Seq int64 `json:"seq,omitempty" jsonschema:"Anchor seq for mode=scroll"`
	// Scroll: lines before/after anchor (default 3 each when scroll and both zero).
	Before int `json:"before,omitempty"`
	After  int `json:"after,omitempty"`
	Limit  int `json:"limit,omitempty" jsonschema:"Max hits (search) or sessions (list); default 10, max 50"`
}

Input supports Hermes-style session_search shapes: search (FTS), list (browse sessions), scroll (context around a hit).

type Output

type Output struct {
	Mode      string                           `json:"mode"`
	Hits      []capsessionindex.Hit            `json:"hits,omitempty"`
	Sessions  []capsessionindex.SessionSummary `json:"sessions,omitempty"`
	Messages  []capsessionindex.MessageRow     `json:"messages,omitempty"`
	Count     int                              `json:"count"`
	SessionID string                           `json:"session_id,omitempty"`
	AnchorSeq int64                            `json:"anchor_seq,omitempty"`
}

Jump to

Keyboard shortcuts

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