Documentation
¶
Overview ¶
Package intercomtools defines the provider-neutral tool contract exposed to every agent adapter.
Index ¶
Constants ¶
View Source
const ( SendMessageName = "send_message" ListPeersName = "list_peers" // MaxOutboundMessageBytes is the raw UTF-8 message ceiling. Validation also // measures the encoded delivery frame because JSON escaping can expand a // message substantially. MaxOutboundMessageBytes = 200 * 1024 )
View Source
const ( SendMessageDescription = "" /* 137-byte string literal not displayed */ ListPeersDescription = "Lists the names of other agent sessions connected to the Intercom broker." )
Variables ¶
View Source
var ( SendMessageInputSchema = json.RawMessage(`{ "type": "object", "properties": { "to": {"type": "string", "description": "The peer name of the destination session."}, "message": {"type": "string", "description": "The message body."} }, "required": ["to", "message"], "additionalProperties": false }`) ListPeersInputSchema = json.RawMessage(`{"type":"object","properties":{},"additionalProperties":false}`) )
Functions ¶
func DecodeListPeers ¶
func DecodeListPeers(raw json.RawMessage) error
DecodeListPeers validates the empty-object contract shared by all adapters.
func FormatPeers ¶
func ListPeersFailed ¶
func SendAccepted ¶
func SendFailed ¶
Types ¶
type SendMessageArgs ¶
func DecodeSendMessage ¶
func DecodeSendMessage(raw json.RawMessage) (SendMessageArgs, error)
DecodeSendMessage decodes and validates the shared send_message contract.
Click to show internal directories.
Click to hide internal directories.