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// toolStuckOld: the instance cannot take a stuck-task tool yet (below
10// wire.ProtocolStuckTasks). For the model; people never read it.
11const toolStuckOld = "Equipo needs an update before it can do that. Tell the person what stopped and that they can use Retry or Merge on the task themselves."
12
13// stuckRefused answers a stuck-task tool here on a link below protocol 30:
14// Encode refuses the call, so it is never sent to an older instance.
15func stuckRefused(call wire.ToolCall, protocol int) (wire.ToolResult, bool) {
16 if !slices.Contains(wire.StuckTools, call.Name) || protocol == 0 || protocol >= wire.ProtocolStuckTasks {
17 return wire.ToolResult{}, false
18 }
19 return wire.ToolResult{CallID: call.CallID, IsError: true, Code: "stuck_unsupported", Text: toolStuckOld}, true
20}
21