Documentation
¶
Overview ¶
Package resources is part of the GoFastr harness.
See docs/harness-architecture.md for the architecture this package implements.
Package resources aggregates read-only catalogs (sessions, profiles, providers, tools, skills, mcp servers, slash-commands, runtime stats) for REST and mcpserver to surface.
Per § Control plane → Package map, this layer sits above session/skill/tool/profile and below the transport so transports don't need to back-import everything.
Index ¶
- type Catalog
- func (c *Catalog) ClaimNamespace(ns string)
- func (c *Catalog) Handshake(features []string) control.Handshake
- func (c *Catalog) ListProviders(ctx context.Context) []ProviderInfo
- func (c *Catalog) ListSessions() []SessionInfo
- func (c *Catalog) ListSkills() []skillmd.Tier1
- func (c *Catalog) ListSlashCommands() []SlashCommandInfo
- func (c *Catalog) ListTools() []ToolInfo
- func (c *Catalog) RegisterEngine(e *engine.Engine)
- func (c *Catalog) UnregisterEngine(s ids.SessionID)
- type ProviderInfo
- type SessionInfo
- type SlashCommandInfo
- type ToolInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// Tools is the registered tool catalog.
Tools *tool.Registry
// Providers is the configured provider list. Order is
// registration order.
Providers []provider.Provider
// Skills returns the loaded skill tier-1 metadata. The
// composition wires a callable so the catalog stays decoupled
// from skill.Registry's concrete type.
Skills func() []skillmd.Tier1
// contains filtered or unexported fields
}
Catalog is the aggregator. The harness composition layer wires the subsystem references (Engines, Tools, Skills, Providers, etc.) once at boot; transports read from this surface.
func NewCatalog ¶
func NewCatalog() *Catalog
NewCatalog returns an empty Catalog. Wire fields after construction.
func (*Catalog) ClaimNamespace ¶
ClaimNamespace adds a plugin-claimed slash-command namespace.
func (*Catalog) Handshake ¶
Handshake returns the protocol handshake. Provided here so REST and mcpserver share one implementation.
func (*Catalog) ListProviders ¶
func (c *Catalog) ListProviders(ctx context.Context) []ProviderInfo
ListProviders returns the provider catalog with model details.
func (*Catalog) ListSessions ¶
func (c *Catalog) ListSessions() []SessionInfo
ListSessions returns active sessions, sorted by SessionID.
func (*Catalog) ListSkills ¶
ListSkills returns the loaded skill tier-1 catalog.
func (*Catalog) ListSlashCommands ¶
func (c *Catalog) ListSlashCommands() []SlashCommandInfo
ListSlashCommands returns the union of built-in and plugin commands.
func (*Catalog) RegisterEngine ¶
RegisterEngine registers a session's engine for inclusion in /v1/sessions listings.
func (*Catalog) UnregisterEngine ¶
UnregisterEngine removes a session.
type ProviderInfo ¶
ProviderInfo is the shape /v1/providers returns.
type SessionInfo ¶
type SessionInfo struct {
SessionID ids.SessionID `json:"session"`
Profile string `json:"profile"`
Model string `json:"model"`
Provider string `json:"provider"`
Turns int `json:"turns"`
}
SessionInfo is the shape /v1/sessions and harness/v1://sessions return.
type SlashCommandInfo ¶
type SlashCommandInfo struct {
Namespace string `json:"namespace,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
ArgsHelp string `json:"args_help,omitempty"`
IsBuiltin bool `json:"is_builtin"`
}
SlashCommandInfo is the shape /v1/slash-commands returns.