Choose an API
Import these capability keys and their API types from@xpert-ai/plugin-sdk and resolve them from the platform registry.
Pass a server-authenticated
RuntimeActor, or OrganizationRuntimeActor where required. A View derives this identity from its resolved host; a background job restores its authorized execution context. Never copy actor fields from action bodies or model arguments. Access is checked again on each operation.
Collaborative text documents
Register a Markdown file usingContentDocumentsApi.register, supplying the authorized Project, source resource, file path and installed model key. The platform manages the collaborative state; the plugin must not create parallel rooms or review tables.
ContentDocumentInput.resourceId identifies the platform document. A provider hook’s ContentSourceInput.sourceResourceId identifies the source business resource. These identifiers are not interchangeable.
An accepted collaborative update and a materialized file are separate states: update returns materializationStatus as ready, pending or failed. Show that state, retain conflict information and do not overwrite an external file change with an old editor snapshot.
Plugin-owned editors
Register the provider in the plugin module with@ContentEditorProvider(key). Its descriptor explicitly selects text-document, file or resource; do not infer the model from a filename or title.
- A text editor supplies its typed document model for the collaboration pipeline.
- A file editor implements
create()andvalidateFile(buffer). Its own service and Remote View implement workbook, slide or other format operations. - A resource editor opens a registered business resource through its declared View.
editor.describe and, for versioned bytes, editor.files.read/write. It owns location and atomic revision checks. ContentEditorsApi.prepare validates or creates bytes but does not create a destination resource or grant permission to it. Use the returned revision as expectedRevision on writes; a conflict requires reloading and reconciling.
In a Remote View, declare workbench.content.resolve and workbench.navigation.open in clientCommands. Resolve { resourceId, providerKey }, then pass the returned navigation unchanged to the open command. This preserves the provider and selected editor. See the host bridge.
Project files and knowledge
For ordinary Project files,ProjectFilesApi.write takes expectedHash: null means create-only; an existing file requires its current hash. A mismatch preserves the current file. Registered collaborative documents must continue through their document/editor pipeline rather than raw file overwrites.
ProjectKnowledgeApi.ensureBinding({ actor, projectId, title }) creates or reuses the Project’s library. Its request/job context must match the explicit actor. Project membership remains the authority, independent of a Spaces installation or cached knowledgebase ID.
Connector document reads use the selected authorized connection. Reading an external document does not create a local copy, schedule synchronization or authorize remote write-back. An importing application owns those decisions and must explain the destination Project’s sharing boundary.
Assistant entry authorization
UseViewMiddlewareRuntimeCapability.resolve when a View needs middleware configuration and a scoped runtime. Use AssistantMiddlewareAccessRuntimeCapability.assertAccess for an entry that only needs access to the exact installed middleware.
Standalone Assistant scope follows published Assistant access. Project scope follows current membership and the requested Assistant binding, with no fallback to standalone access after a denial. Resource operations retain their own ACLs. A feature flag or another provider advertising the same feature is not an authorization grant.
Continue with Workspace Files, Artifacts and Project SDK integration.