ResourcePlugin interface is the core contract between your plugin and the formae agent. This page documents all methods, their parameters, return types, and behavioral contracts.
Interface definition
Configuration methods
RateLimit
Returns rate limiting configuration for your plugin.
Example:
DiscoveryFilters
Returns filters to exclude resources from discovery.nil to discover all resources.
LabelConfig
Returns configuration for extracting human-readable labels from discovered resources.
Example:
CRUD methods
Create
Provisions a new resource.- On success: Set
OperationStatustoSuccess, provideNativeIDandResourceProperties - On async: Set
OperationStatustoInProgress, provideRequestIDfor polling - On failure: Set
OperationStatustoFailure, provideErrorCodeandStatusMessage - Return Go error only for unexpected or unrecoverable errors
Read
Fetches current state of an existing resource.- On success: Provide
ResourcePropertieswith current state - If not found: Set
ErrorCodetoOperationErrorCodeNotFound - Never return Go error for “not found”
PriorProperties(optional) carries the caller’s last-known model. When set, aReadmay tailor which fields it reports to match what the caller manages (for example, embedding a child collection only when the prior model declares it inline). It is empty when the caller has no prior state, such as a create/status read-back or discovery; treat empty as unknown and fall back to default behaviour. Populated by the agent from formae 0.87.1.
Update
Modifies an existing resource.- Use
DesiredPropertiesfor full replacement orPatchDocumentfor partial update - On success: Provide updated
ResourceProperties - On async: Return
InProgresswithRequestID
Delete
Removes a resource.- Must be idempotent: deleting a non-existent resource should succeed
- On success: Set
OperationStatustoSuccess - On async: Return
InProgresswithRequestID
Status
Polls for completion of an async operation.- Called when Create/Update/Delete returns
InProgress - Return
InProgressto continue polling - Return
SuccessorFailurewhen complete - Provide
NativeIDandResourcePropertieson success
List
Returns all resource identifiers of a given type for discovery.- Return all native IDs for resources of the given type
- Use pagination for large result sets
- Set
NextPageTokenif more pages available
ProgressResult
Common result structure for operations:Operation
OperationStatus
OperationErrorCode
See also
- Tutorial: Create - Implementing Create, Read, Update, Delete
- Tutorial: List - Implementing List for discovery

