Join 9: the indexer, teller and pipeline name no seat list verb in their operatorask contract (A-126)
operatorask finds the holder through seatlist.HolderOf, so Contract.Lists and ListBody are gone. Builds: design 47 G A-126 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -142,8 +142,7 @@ func newRegistry(js jetstream.JetStream, conn *nats.Conn, cred process.Account,
|
||||
// warrant is then left unapplied and said while the record cannot be read.
|
||||
func routerRecordOf(module string, call toolCaller, record func(bucket, id string) (*stdio.StateEntry, error)) func(id string) (string, *oc.Warrant, error) {
|
||||
asker := &operatorask.Asker[oc.Warrant]{Module: module, Call: operatorask.Caller(call), Record: record,
|
||||
Contract: operatorask.Contract{Lists: "seat:" + mma.Seat + "." + mma.VerbAssignments, ListBody: mma.AssignmentsInput{Seats: mma.AssignmentsInputSeatsTrue},
|
||||
Seat: oc.Seat, StateAsks: oc.StateAsks}}
|
||||
Contract: operatorask.Contract{Seat: oc.Seat, StateAsks: oc.StateAsks}}
|
||||
return asker.Where
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/nats-io/nats.go"
|
||||
"github.com/nats-io/nats.go/jetstream"
|
||||
|
||||
mma "git.novox.be/novox/mesh-contracts/go/seats/meshmoduleassigner"
|
||||
oc "git.novox.be/novox/mesh-contracts/operator-and-conversation/go/seats/operatorchannel"
|
||||
stdio "git.novox.be/novox/mesh-sdk/go"
|
||||
"git.novox.be/novox/mesh-sdk/go/operatorask"
|
||||
@@ -26,8 +25,7 @@ type toolCaller func(key string, body any) (json.RawMessage, error)
|
||||
// `<module>.<id>` on the process's own bus connection: never the decided event's body.
|
||||
func routerRecordOf(module string, call toolCaller, record func(bucket, id string) (*stdio.StateEntry, error)) func(id string) (string, *oc.Warrant, error) {
|
||||
asker := &operatorask.Asker[oc.Warrant]{Module: module, Call: operatorask.Caller(call), Record: record,
|
||||
Contract: operatorask.Contract{Lists: "seat:" + mma.Seat + "." + mma.VerbAssignments, ListBody: mma.AssignmentsInput{Seats: mma.AssignmentsInputSeatsTrue},
|
||||
Seat: oc.Seat, StateAsks: oc.StateAsks}}
|
||||
Contract: operatorask.Contract{Seat: oc.Seat, StateAsks: oc.StateAsks}}
|
||||
return asker.Where
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
mma "git.novox.be/novox/mesh-contracts/go/seats/meshmoduleassigner"
|
||||
occ "git.novox.be/novox/mesh-contracts/operator-and-conversation/go/clients/operatorchannelclient"
|
||||
oc "git.novox.be/novox/mesh-contracts/operator-and-conversation/go/seats/operatorchannel"
|
||||
"strings"
|
||||
@@ -42,8 +41,7 @@ func publishVia(ctx context.Context, js jetstream.JetStream) func(subject string
|
||||
// of is nil. call asks the seat list's verb (process.Conn.Call) and ask is the get of the record (process.Conn.Ask), which the
|
||||
// controller grants for a module that uses the seat.
|
||||
func recordVia(call operatorask.Caller, ask func(bucket, id string) (*stdio.StateEntry, error)) func(id string) (*stdio.StateEntry, error) {
|
||||
contract := operatorask.Contract{Lists: "seat:" + mma.Seat + "." + mma.VerbAssignments, ListBody: mma.AssignmentsInput{Seats: mma.AssignmentsInputSeatsTrue},
|
||||
Seat: oc.Seat, StateAsks: oc.StateAsks}
|
||||
contract := operatorask.Contract{Seat: oc.Seat, StateAsks: oc.StateAsks}
|
||||
return func(id string) (*stdio.StateEntry, error) {
|
||||
bucket, err := operatorask.Bucket(call, contract)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user