Plugin SDK Reference
Contract reference for FlowMason plugin authors. Every interface, MDT field, and registration path a plugin can touch.
Plugin types
| Type | Surface | Distribution |
|---|---|---|
| Component plugin | New stage type in Studio palette | FM_Component_Type__mdt + BaseComponent subclass |
| Provider plugin | New LLM / audio / document / vector backend | FM_Provider_Type__mdt + provider interface impl |
| Trigger / event / schedule binding | Subscribe a pipeline to a platform signal | FM_Trigger_Binding__mdt / FM_Event_Binding__mdt / FM_Schedule_Binding__mdt |
| Callable plugin | Expose Apex via SubPipeline dispatch | FM_Callable__mdt + System.Callable impl |
| Pipeline plugin | Ship pipelines themselves | FlowMasonPipeline__mdt + optional Pipeline_Template__mdt |
FM_Plugin_Manifest__mdt. Distribution manifest
Required for any plugin published to AppExchange or the Packages browser. One row per plugin (not per component).
Fields: Vendor_Slug__c · Vendor_Display_Name__c · Plugin_Display_Name__c · Description__c · Version__c · Status__c · Min_Flowmason_Version__c · Package_Id__c (2GP) · Components_Included__c (CSV) · Tags__c · Icon_Url__c · Documentation_Url__c · Support_Url__c · Support_Email__c · Privacy_Url__c · License_Type__c · Listing_Url__c · Published_Date__c
Component plugin. BaseComponent family
Subclass exactly one of:
BaseNode— AI nodesBaseLLMNode— LLM-call subsetBaseOperator— data / IO transformsBaseFlowControl— branch / loop / fan-out
Skeleton:
public class MySmsComponent extends BaseOperator {
protected override Map<String,Object> executeImpl(
ExecutionContext ctx,
Map<String,Object> resolvedConfig
) {
String to = (String) resolvedConfig.get('to');
String body = (String) resolvedConfig.get('body');
// ... call Twilio via Named Credential ...
return new Map<String,Object>{ 'sid' => '<twilio-message-sid>' };
}
} Register via FM_Component_Type__mdt: DeveloperName (type string in pipeline JSON), Apex_Class_Name__c, Category__c, Display_Name__c, Description__c, Icon_Token__c, Config_Schema_Json__c.
Provider plugin. Interface menu
// LLM provider (required)
public interface LLMProvider {
ProviderResponse call(ProviderRequest req);
String getName();
Boolean isReady();
}
// Optional ADR-013 extension for tool-calling
public interface LLMToolCapableProvider {
Boolean supportsTools();
ProviderResponse invokeWithTools(
ProviderRequest req,
List<FMToolSchema> tools,
FMOrgChatToolDispatcher dispatcher,
FMThreadState state
);
}
// Audio (transcribe + TTS)
public interface AudioProvider {
interface AudioTranscriber { String transcribe(Blob audio, Map<String,Object> opts); }
interface TextToSpeech { Blob synthesize(String text, Map<String,Object> opts); }
}
// Documents (OCR + form extraction)
public interface DocumentProvider {
interface DocumentReader { Map<String,Object> read(Blob doc, Map<String,Object> opts); }
interface FormExtractor { Map<String,Object> extract(Blob doc, List<String> fields); }
}
// Vector / RAG
public interface VectorDBProvider {
interface RAGRetriever { List<Map<String,Object>> retrieve(String query, Map<String,Object> opts); }
interface KnowledgeQuery { List<Map<String,Object>> query(String index, String query, Map<String,Object> opts); }
}
// Cache
public interface CacheClient {
Object get(String key);
void put(String key, Object value, Integer ttlSeconds);
void remove(String key);
Boolean contains(String key);
} Register via FM_Provider_Type__mdt: DeveloperName · Apex_Class_Name__c · Default_Endpoint__c · Surface__c (llm / audio / document / vector / cache) · Supports_Tools__c.
Trigger / event / schedule bindings
Each binds a Salesforce signal to a target pipeline. See Trigger Framework for the dispatcher signatures + execution modes (sync / async / bulk).
Callable plugin. System.Callable
public class MyCallable implements System.Callable {
public Object call(String action, Map<String,Object> args) {
if (action == 'doThing') { return runThing(args); }
throw new FMException('Unknown action: ' + action);
}
} Register via FM_Callable__mdt with DeveloperName · Apex_Class_Name__c · Allowed_Actions__c (CSV).
Distribution checklist
- 2GP package created; package id captured in
FM_Plugin_Manifest__mdt.Package_Id__c. - Manifest fields populated (vendor + plugin + version + min FM + components).
- AppExchange security review (if listing publicly).
- Documentation URL points at a public landing page.
- License type declared.
- Released package version installed in a vanilla scratch org and verified end-to-end.
Versioning + compatibility
- FlowMason follows semver.
Min_Flowmason_Version__cdeclares the lowest host version your plugin supports. - Within a major host version,
BaseComponent/LLMProvider/ registration MDT shapes are stable. ExecutionState.schemaVersion = 1is part of the contract — your plugin must not depend on unstable internal fields.- The
globalkeyword is the strongest commitment. If FlowMason's interface has it, you can rely on it across upgrades.
Related
- Component Catalog — every shipped type
- Provider Configuration — built-in providers
- Tool-calling — adding tool support to a new provider