Documentation
¶
Overview ¶
Package remote implements the published, read-only integration boundary.
@facet: navigation/interfaces/remote-read-access @facet-role: primary
@facet: navigation/interfaces/claude-connector @facet-role: primary
Index ¶
- Constants
- func RegisterViewer(html string)
- func RegisteredViewer() string
- type Anchor
- type Anchors
- type AuditEvent
- type Authenticator
- type ChunkSource
- type Config
- type Corpus
- type Input
- type Key
- type OAuthConfig
- type OAuthProvider
- type Principal
- type Problem
- type Publication
- type PublishedFile
- type RAGConfig
- type RAGProvenance
- type Reader
- type Record
- type RecordList
- type Retrieval
- type SearchHit
- type SearchResult
- type Section
- type Sections
- type Server
- type Source
- type Summary
- type TokenProvider
Constants ¶
const CodeScope = "facet:code:read"
const MaxCorpusBytes = 64 << 20
const MaxFileBytes = 4 << 20
const RecordsScope = "facet:records:read"
const SearchScope = "facet:search:read"
Variables ¶
This section is empty.
Functions ¶
func RegisterViewer ¶
func RegisterViewer(html string)
RegisterViewer installs the MCP Apps viewer page for every server created afterwards. The page is not part of this package: a build that ships it registers it from package main before serving. Without a registered page a server configured with 'ui: true' offers no resources capability, attaches no '_meta.ui' to its tools and answers resources/* with JSON-RPC Method not found, so a host falls back to the text and structured results. It panics on an empty page or a second registration, because two pages would make the served resource depend on initialization order.
func RegisteredViewer ¶
func RegisteredViewer() string
RegisteredViewer returns the registered viewer page, or "" when this build carries none.
Types ¶
type AuditEvent ¶
type Authenticator ¶
type Authenticator struct {
Keys []Key
OAuth TokenProvider
MCPKeys bool
}
func (*Authenticator) Validate ¶
func (a *Authenticator) Validate() error
type ChunkSource ¶
type Config ¶
type Config struct {
Audit func(AuditEvent) `json:"-"`
UI bool `json:"ui"`
RAG *RAGConfig `json:"rag,omitempty"`
Origin string `json:"origin"`
AllowedOrigins []string `json:"allowed_origins"`
Keys []Key `json:"keys"`
MCPKeys bool `json:"mcp_api_keys"`
OAuth *OAuthConfig `json:"oauth,omitempty"`
}
type Corpus ¶
type Corpus struct {
Snapshot string
// contains filtered or unexported fields
}
func LoadCorpus ¶
func LoadCorpus(root string, publication Publication) (*Corpus, error)
LoadCorpus takes a content-addressed snapshot. Only these verified bytes are subsequently read; repository settings and environment overrides are ignored.
type Input ¶
type Input struct {
ID string `json:"id,omitempty"`
Kind string `json:"kind,omitempty"`
Query string `json:"query,omitempty"`
Limit int `json:"limit,omitempty"`
Cursor string `json:"cursor,omitempty"`
Sections []string `json:"sections,omitempty"`
Path string `json:"path,omitempty"`
Start int `json:"start,omitempty"`
End int `json:"end,omitempty"`
}
type Key ¶
type OAuthConfig ¶
type OAuthConfig struct {
Mode string `json:"mode"`
Issuer string `json:"issuer"`
Audience string `json:"audience"`
JWKSURL string `json:"jwks_url,omitempty"`
IntrospectionURL string `json:"introspection_url,omitempty"`
ClientID string `json:"client_id,omitempty"`
ClientSecret string `json:"-"`
Subjects []string `json:"subjects"`
ScopeClaim string `json:"scope_claim"`
ScopeMap map[string]string `json:"scope_map"`
}
OAuthConfig is operator-owned. A subject allowlist is mandatory and independent of the OAuth scopes: registration or consent is not repository entitlement.
type OAuthProvider ¶
type OAuthProvider struct {
// contains filtered or unexported fields
}
func NewOAuthProvider ¶
func NewOAuthProvider(cfg OAuthConfig) (*OAuthProvider, error)
type Problem ¶
type Publication ¶
type Publication struct {
SchemaVersion int `json:"schema_version"`
GitRevision string `json:"git_revision,omitempty"`
Files []PublishedFile `json:"files"`
}
func LoadPublication ¶
func LoadPublication(r io.Reader) (Publication, error)
LoadPublication accepts configuration, not an automatically discovered manifest.
type PublishedFile ¶
type RAGConfig ¶
type RAGConfig struct {
Index string `json:"index"`
IndexSHA256 string `json:"index_sha256"`
Provenance string `json:"provenance"`
Provider string `json:"provider"`
Model string `json:"model"`
BaseURL string `json:"base_url,omitempty"`
AllowQueryEgress bool `json:"allow_query_egress"`
APIKey string `json:"-"`
}
type RAGProvenance ¶
type RAGProvenance struct {
Version int `json:"version"`
Snapshot string `json:"snapshot"`
Chunks map[string]ChunkSource `json:"chunks"`
}
func BuildIndex ¶
func BuildIndex(ctx context.Context, corpus *Corpus, cfg *RAGConfig, allowRecordEgress bool) (*rag.Store, RAGProvenance, error)
BuildIndex is an operator-only offline operation. It never runs from HTTP/MCP. Chunk bytes are exact section slices, unlike the enriched general-purpose index.