Copy the kept call's ask id from its request header into the call's _meta as mesh/ask
Every tool call and seat verb the tool runner serves hands the bundle the ask id the kept call set in the header x-ask (stdio.AskHeader) under _meta mesh/ask (stdio.MetaAsk), beside mesh/call; a call whose header carries none names none. Builds: design 47 H2 §775, H-A-351
This commit is contained in:
@@ -25,11 +25,11 @@ type Gate interface {
|
||||
}
|
||||
|
||||
// gatedRun is how a handler calls a tool: through the gate where there is one.
|
||||
type gatedRun func(call approval.Call, t launch.Tool, caller string) (any, error)
|
||||
type gatedRun func(call approval.Call, t launch.Tool, caller, ask string) (any, error)
|
||||
|
||||
// gated calls the tool through the gate, or straight where the runner has none.
|
||||
func (c *consumers) gated(call approval.Call, t launch.Tool, caller string) (any, error) {
|
||||
run := func() (any, error) { return t.Run(caller, call.Args) }
|
||||
func (c *consumers) gated(call approval.Call, t launch.Tool, caller, ask string) (any, error) {
|
||||
run := func() (any, error) { return t.Call(caller, ask, call.Args) }
|
||||
if c.gate == nil {
|
||||
return run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user