Deletes internal/memory (Manager, builtin.Provider, memory_edit tool) now
that slices 2-4 built the CRUD engine family and its per-turn read/write
seams. Also deletes internal/infrastructure/memory/builtin/provider.go (the
memory_edit adapter over the old package -- its markdown store already
relocated in slice 2), internal/tools/provider/memory (the old tool
registration, redundant with slice 4's memory_create/update/delete/list),
config.Memory.{Provider,ProviderConfig} and the validateMemory rejection
that existed only to complain about Provider, and webui.MemoryStatus/
MemoryProviderHandle plus its dashboard page -- never wired in production
(s.Memory was always nil), confirmed by /api/capabilities always reporting
"memory": false.
Rewrites ARCHITECTURE.md's "Memory engine family" section to describe the
current engine (internal/domain/memory contract, internal/infrastructure/
memory builtin engine + its builtin/ markdown store, the per-turn read seam
in gateway/turn_memory.go, the per-turn write tools in
gateway/turn_memory_tool.go) instead of the deleted Manager. Fixes two
docs/architecture/configuration.md rows that described the deleted
manager's literals and SaveConfig mechanism.
41 lines
1.6 KiB
Go
41 lines
1.6 KiB
Go
package webui
|
|
|
|
import "net/http"
|
|
|
|
// handleCapabilities reports which dashboard sections this process can
|
|
// actually serve.
|
|
//
|
|
// The dashboard is served by the extracted UI process, which holds two remote
|
|
// contracts (Gateway ChatContract and the State Store) and nothing else.
|
|
// Sections whose capability lives only in the daemon still answer -- with an
|
|
// empty list, a "disabled" marker, or a 501 -- and the page cannot tell that
|
|
// apart from a deployment where nothing has happened yet. Rather than have
|
|
// every page guess, the server says which sections it can back, and the
|
|
// browser hides the rest.
|
|
//
|
|
// A section is reported available when the handle behind it is wired, which
|
|
// is the same condition its handler already uses to decide between real data
|
|
// and its degraded answer. Sections backed by the task store are absent from
|
|
// this list: the store is mandatory.
|
|
func (s *Server) handleCapabilities(w http.ResponseWriter, _ *http.Request) {
|
|
writeJSON(w, map[string]any{
|
|
"sections": map[string]bool{
|
|
"chat": s.Chat != nil && s.Chat.Contract != nil,
|
|
"logs": s.LogFeed != nil,
|
|
"skills": s.Skills != nil,
|
|
"curators": s.Curators != nil,
|
|
"channels": s.Channels != nil,
|
|
"captures": s.Captures != nil,
|
|
"mappings": s.Mappings != nil,
|
|
"bindings": s.Bindings != nil,
|
|
// The workflows page draws its statistics from the task store
|
|
// and its definition list from the local registry, so it is
|
|
// worth showing with only the former.
|
|
"workflows": true,
|
|
// Configuration renders from whichever source is wired; the
|
|
// page reports its own editability (see ConfigView.Editable).
|
|
"settings": true,
|
|
},
|
|
})
|
|
}
|