package thin import ( "slices" "amadan.net/oficina/equipo/internal/wire" ) // toolStuckOld: the instance cannot take a stuck-task tool yet (below // wire.ProtocolStuckTasks). For the model; people never read it. const 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." // stuckRefused answers a stuck-task tool here on a link below protocol 30: // Encode refuses the call, so it is never sent to an older instance. func stuckRefused(call wire.ToolCall, protocol int) (wire.ToolResult, bool) { if !slices.Contains(wire.StuckTools, call.Name) || protocol == 0 || protocol >= wire.ProtocolStuckTasks { return wire.ToolResult{}, false } return wire.ToolResult{CallID: call.CallID, IsError: true, Code: "stuck_unsupported", Text: toolStuckOld}, true }