oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package thin
2
3import (
4 "slices"
5
6 "amadan.net/oficina/equipo/internal/wire"
7)
8
9// toolPlacesOld: the instance cannot take a place tool yet (below
10// wire.ProtocolPlaces). For the model; people never read it.
11const toolPlacesOld = "Equipo needs an update before it can say where sites go or offer to publish one. Tell the person that in one line."
12
13// placesRefused answers a place tool here on a link below protocol 31:
14// Encode refuses the call, so it is never sent to an older instance.
15func placesRefused(call wire.ToolCall, protocol int) (wire.ToolResult, bool) {
16 if !slices.Contains(wire.PlacesTools, call.Name) || protocol == 0 || protocol >= wire.ProtocolPlaces {
17 return wire.ToolResult{}, false
18 }
19 return wire.ToolResult{CallID: call.CallID, IsError: true, Code: "places_unsupported", Text: toolPlacesOld}, true
20}
21