TLS-5, TLS-6: the tool runner holds the indexer's manifests and modules and the assigner's placement and seat-holders from their first views and views events, never their state, and the console gains mesh_first_views and mesh_first_view_again (ADR 0615, ADR 0621, issue 1966)

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 12:06:20 +01:00
parent 8b1ab467a9
commit 31247dff6b
17 changed files with 577 additions and 64 deletions
+5 -4
View File
@@ -47,6 +47,7 @@ type RPCError struct {
// Surface answers MCP requests over one bus connection, as one account.
type Surface struct {
conn *bus.Conn
src Source
who string
mu sync.Mutex
known *Listing
@@ -69,7 +70,7 @@ const MethodSeats = "mesh/seats"
// seatsAnswer is MethodSeats' answer: mesh-sdk's seat definitions, with each seat's holders by placement.
func (s *Surface) seatsAnswer() map[string]any {
placed, err := seatHoldersOn(s.conn)
placed, err := seatHoldersOn(s.src)
x := &index{Placed: placed}
seats := []map[string]any{}
for _, st := range catalogue.DefaultSeats() {
@@ -91,8 +92,8 @@ func (s *Surface) seatsAnswer() map[string]any {
}
// NewSurface is the surface over a connection, as `who`.
func NewSurface(conn *bus.Conn, who string) *Surface {
return &Surface{conn: conn, who: who, Flat: os.Getenv("MESH_CONSOLE_FLAT") == "1"}
func NewSurface(conn *bus.Conn, src Source, who string) *Surface {
return &Surface{conn: conn, src: src, who: who, Flat: os.Getenv("MESH_CONSOLE_FLAT") == "1"}
}
func (s *Surface) listing() (*Listing, error) {
@@ -103,7 +104,7 @@ func (s *Surface) listing() (*Listing, error) {
return l, nil
}
s.mu.Unlock()
l, err := toolsOn(s.conn)
l, err := toolsOn(s.conn, s.src)
if err != nil {
return nil, err
}