node-tools: a runner rereads the list only for a verb of a seat it defines, one read shared; asks of undefined seats and tools unchanged (A-490m)
Builds: design 47 G A-490m Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -872,7 +872,11 @@ type consumers struct {
|
||||
// definitions are the seat definitions a seat verb's callers are read from (gate.go); nil admits every caller.
|
||||
definitions func() map[string]seatdef.Definition
|
||||
// reread reads the seat list again (gate.go, chunkedAsked); nil reads nothing.
|
||||
reread func() error
|
||||
reread func() error
|
||||
rereadMu sync.Mutex
|
||||
rereading *rereadFlight
|
||||
// askPlain and askChunked are how a bundle's ask is sent (the bus connection's AskAs and AskAsChunked); a test gives its own.
|
||||
askPlain, askChunked func(module, key string, body any) (bus.Answered, error)
|
||||
}
|
||||
|
||||
type moduleEvents struct {
|
||||
@@ -1001,13 +1005,19 @@ func (b *moduleBus) Ask(params json.RawMessage) (json.RawMessage, error) {
|
||||
if len(asked.Body) == 0 {
|
||||
body = map[string]any{}
|
||||
}
|
||||
ask := b.all.conn.AskAs
|
||||
ask := b.all.askPlain
|
||||
if ask == nil {
|
||||
ask = b.all.conn.AskAs
|
||||
}
|
||||
chunks, err := b.all.chunkedAsked(asked.Key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if chunks {
|
||||
ask = b.all.conn.AskAsChunked // the runner receives the chunks of the answer; the bundle receives none (design 47 G A-249)
|
||||
if ask = b.all.askChunked; ask == nil {
|
||||
ask = b.all.conn.AskAsChunked
|
||||
}
|
||||
// the runner receives the chunks of the answer; the bundle receives none (design 47 G A-249)
|
||||
}
|
||||
answered, err := ask(b.module, asked.Key, body)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user