Documentation
¶
Index ¶
Constants ¶
const ( ScopeStation = "station" ScopeStationLocker = "station-locker" )
ScopeStation is required by every tool here. ScopeStationLocker is RESERVED and gates the locker tools, on the reasoning that reserved `comm-file` beside `comm`: splitting a shipped scope is a MAJOR, merging two is free.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Store is the knowledge base: it holds stations, their assets, and the keys this
// endpoint authenticates. Unlike COMM's Deps.Store, this one is read AND written —
// but only station tables. Nothing here writes a curated row.
Store *store.Store
// TokenLimiter is this endpoint's own rate bucket. Optional.
TokenLimiter ratelimit.Limiter
// Metrics is optional.
Metrics *metrics.Registry
// Hearsay reports whether an actor recently RECEIVED inter-session traffic, so a
// note or task written mid-conversation is marked (§7). Optional: with COMM off it
// is nil and the marking is simply absent — "no signal", never "known clean".
Hearsay func(ctx context.Context, actorID int64) bool
// Staffing reports, per station id, how many live COMM endpoints are reading for
// it and when the freshest was last seen. Optional, and shaped as a hook for the
// same reason Hearsay is: this package must not depend on COMM. With COMM off it
// is nil and the directory OMITS reachability entirely rather than reporting
// every station as unstaffed — "unknown" and "nobody is there" are different
// facts, and a directory that conflates them is worse than one that says less.
Staffing func(ctx context.Context) (map[string]StationStaffing, error)
// Limits bound the assets. Every one is a BACKUP decision (S12). These are the
// STARTING values; SetLimits replaces them live.
TaskLimits store.StationTaskLimits
NoteLimits store.StationNoteLimits
LockerLimits store.StationLockerLimits
// contains filtered or unexported fields
}
Deps are the collaborators for the station endpoint.
type Handler ¶
Handler is the station MCP endpoint.
func NewHTTPHandler ¶
NewHTTPHandler builds the endpoint: a streamable-HTTP MCP server wrapped in station-only bearer auth.
func (*Handler) SetLimits ¶ added in v1.5.0
func (h *Handler) SetLimits(task store.StationTaskLimits, note store.StationNoteLimits, locker store.StationLockerLimits)
SetLimits applies new bounds live. Zero-valued members keep their defaults, so a partially-filled struct cannot silently set a cap to zero — which for a retention bound would mean "prune everything".
type StationStaffing ¶ added in v1.6.0
StationStaffing is what COMM knows about who is actually at a station. Declared here rather than imported so the dependency runs one way: the wiring in cmd/ken adapts comm's own type into this one.