ollie/toolsrv/protocol/doc.go

26 lines
808 B
Go

// Package protocol defines shared types and wire formats for toolsrv communication.
//
// These types are used by both olliesrv (toolclient) and toolsrv to ensure
// consistent serialization of tool metadata, results, and requests.
//
// # Types
//
// - ToolInfo: tool metadata sent from toolsrv to olliesrv
// - ToolResult: structured result from tool execution
// - ToolResultContent: single content item (text or image)
// - BypassRequest: sandbox bypass request
//
// # Payload Format
//
// Tool execution uses a key=value payload format over 9P:
//
// token=<session-token>
// tool=<name>
// agent=<agent-id>
// path=/some/path
// content=escaped\nvalue
//
// Values are escaped: \n for newlines, \\ for backslashes. ParsePayload
// and escaping helpers handle the conversion.
package protocol