Skip to main content

Module social_plugin_protocol

Module social_plugin_protocol 

Source
Expand description

JSON-over-stdio protocol types for external social media adapter plugins.

Social adapter plugins communicate with TA using a request/response protocol over stdin/stdout. TA spawns the plugin process, writes one JSON request line to stdin, reads one JSON response line from stdout.

§Protocol overview

Every exchange is a single JSON line in each direction:

TA → plugin: {"op":"<name>",...params...}
plugin → TA: {"ok":true,...result...}   or   {"ok":false,"error":"..."}

§Operations

OpDescription
create_draftWrite a draft to the platform’s native draft state
create_scheduledSchedule a post at a future time (platform scheduler)
draft_statusPoll whether a draft was published, deleted, or open
healthConnectivity + credential check
capabilitiesAdvertise which optional ops this plugin supports

§Safety invariant — publish is absent by design

The publish operation is intentionally absent from this protocol. TA never publishes social media posts on behalf of the user. Plugins expose only create_draft and create_scheduled; the user publishes from their native platform UI or scheduler (e.g., LinkedIn, Buffer). This is a deliberate safety boundary enforced at the type level.

Structs§

CreateScheduledParams
Parameters for the create_scheduled operation.
CreateSocialDraftParams
Parameters for the create_draft operation.
SocialCapabilitiesParams
Parameters for the capabilities operation.
SocialDraftStatusParams
Parameters for the draft_status operation.
SocialHealthParams
Parameters for the health operation.
SocialPluginResponse
Response sent from a social media plugin to TA over stdout.
SocialPostContent
The content of a social media post to be drafted or scheduled.

Enums§

SocialPluginError
Errors from social media plugin operations.
SocialPluginRequest
Request sent from TA to a social media plugin over stdin.
SocialPostState
Current state of a social post as reported by the platform.

Constants§

SOCIAL_PROTOCOL_VERSION
Protocol version implemented by this TA build.