GIT13: the forge module keeps no trusted callers; who may call a verb is the seat definition's
The config value callers, the package seats' list of callers with its watch, and the seat git's caller judgement are gone: the grants part grants by each definition's callers and the bus refuses the rest. Builds: design 47 G §68, §127, §313, §321 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -488,7 +488,7 @@ func TestToolsAreTheOnesTheReadmeNamesAndSayWhatTheyDo(t *testing.T) {
|
||||
t.Errorf("transfers has options (a lifetime): %s", req)
|
||||
}
|
||||
// The retention asks the builder's versions; the forge's other bundles ask the catalog half and record a re-read.
|
||||
if strings.Join(m.Invokes, ",") != "seat:mesh-catalog.revision,seat:mesh-hand-acts.hand-act,mesh-delivery-builder.builder_versions" {
|
||||
if strings.Join(m.Invokes, ",") != "seat:mesh-catalog.revision,seat:mesh-catalog.registrations,seat:mesh-hand-acts.hand-act,mesh-delivery-builder.builder_versions" {
|
||||
t.Errorf("the manifest invokes %v", m.Invokes)
|
||||
}
|
||||
if len(m.Tools) != 0 {
|
||||
|
||||
@@ -276,11 +276,7 @@ var boundCap = parts.BusCap(packageseats.IncomingObjects)
|
||||
|
||||
// busHolder is the holder over the runtime's bus state, the builder's numbering and the forge.
|
||||
func busHolder(forge func() (*Forge, error)) (*packageseats.Holder, error) {
|
||||
callers, err := packageseats.ConfiguredCallers()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &packageseats.Holder{Callers: callers, Objects: parts.BusObjects(packageseats.IncomingObjects),
|
||||
return &packageseats.Holder{Objects: parts.BusObjects(packageseats.IncomingObjects),
|
||||
Transfers: parts.BusTransfers[packageseats.Opening](packageseats.TransfersState),
|
||||
Builder: builds.BuilderVersions{Ask: stdio.Ask}, Store: seatStore{forge}, Say: say, Finding: finding,
|
||||
Cap: boundCap, Record: recordAct, Idle: parts.BusArm(packageseats.IdleState)}, nil
|
||||
|
||||
@@ -6,7 +6,7 @@ package main
|
||||
// the built package-registry bundle, played over its real stdin and stdout as the node's tool runtime plays it, its
|
||||
// `incoming` an object store and its `transfers` and `findings` key-value buckets of a nats-server of this test alone
|
||||
// (so the publish in parts runs through mesh-sdk's parts.BusObjects and BusTransfers, ruling 4 of the lead's 14:0x), the
|
||||
// builder's builder_versions answered on mesh/ask, the config value `callers` watched on mesh/provision.watch, and the forge an
|
||||
// builder's builder_versions answered on mesh/ask, and the forge an
|
||||
// httptest server that takes reads only with the tools' token and writes only with the packages account's.
|
||||
//
|
||||
// A Go package the builder numbered goes up in two chunks, is uploaded whole as the packages account and says
|
||||
@@ -113,7 +113,6 @@ func (p *player) handle(m wire) {
|
||||
Data []byte `json:"data"`
|
||||
Subject string `json:"subject"`
|
||||
Body json.RawMessage `json:"body"`
|
||||
Kind string `json:"kind"`
|
||||
TTL int `json:"ttl_seconds"`
|
||||
}
|
||||
_ = json.Unmarshal(m.Params, &a)
|
||||
@@ -123,12 +122,6 @@ func (p *player) handle(m wire) {
|
||||
_ = json.Unmarshal(a.Body, &q)
|
||||
d, ok := p.numbered[q.Name+"@"+q.Version]
|
||||
p.answer(m.ID, map[string]any{"recorded": ok && d == q.Digest, "why": "not numbered with that digest"}, nil)
|
||||
case m.Method == "mesh/provision.watch" && a.Kind == "config":
|
||||
// The watch of `callers`, as the runtime answers it: the value now as one change (mesh/provision,
|
||||
// named by the watch's id) handed over before the watch is answered, here unset, so design 51's list holds.
|
||||
p.send(map[string]any{"id": "change-" + watchID(m.ID), "method": "mesh/provision", "params": map[string]any{
|
||||
"watch": watchID(m.ID), "change": map[string]any{"kind": "config", "key": a.Key}}})
|
||||
p.answer(m.ID, map[string]any{}, nil)
|
||||
case m.Method == "mesh/seat.publish":
|
||||
p.answer(m.ID, map[string]any{}, p.nc.Publish(a.Subject, a.Body))
|
||||
case m.Method == "mesh/publish":
|
||||
@@ -142,15 +135,6 @@ func (p *player) handle(m wire) {
|
||||
}
|
||||
}
|
||||
|
||||
// watchID is the watch's id as a string, the form the change names it by.
|
||||
func watchID(raw json.RawMessage) string {
|
||||
var id string
|
||||
if json.Unmarshal(raw, &id) != nil {
|
||||
return string(raw)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
func (p *player) objects(m wire, local, name string, data []byte) {
|
||||
os, err := p.js.ObjectStore(p.ctx, "gitea_"+local)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user