@aaplugin/platform-cursor
v1.0.0-beta.4
Published
Cursor Platform integration for AAPlugin.
Readme
@aaplugin/platform-cursor
Cursor Platform package for aaplugin.
pnpm add -D @aaplugin/kit @aaplugin/platform-cursorimport { defineConfig } from '@aaplugin/kit';
import cursor from '@aaplugin/platform-cursor';
export default defineConfig({
name: 'my-plugin',
version: '1.0.0',
description: 'Reusable AI workflows.',
platforms: [cursor()],
});The package also exports the named cursor factory, its option types, CursorPackageComponent, CursorNativeAgentComponent, PLATFORM_ID, and PLATFORM_API_VERSION.
CursorPackageComponent is for trusted Extension contributors that need Cursor-native private delivery. Cursor validates and renders it during Package finalization; it does not permit raw Plugin Manifest patches.
Runtime and installation
The complete Plugin root is dist/cursor/plugin/, including .cursor-plugin/plugin.json. For local use, place the complete directory contents in ~/.cursor/plugins/local/<plugin-name>/, then restart Cursor or run Developer: Reload Window and inspect Customize. Local plugin imports must be enabled by the host's policy.
A release branch can contain the Plugin root directly. For a first local installation:
git clone --single-branch --branch release-cursor https://github.com/OWNER/REPO.git "$HOME/.cursor/plugins/local/my-plugin"Use a real directory: the documented local importer skips symlinks pointing outside its local plugin directory. Marketplace repository/branch tracking is another supported distribution route; this package does not assume a universal CLI URL@ref installation syntax.
Runtime entries are at runtime/<id>/main.mjs. Cursor's Skill documentation defines script references relative to the Skill root. Use the loaded Skill's source directory to resolve ../../runtime/<id>/main.mjs; for the local installation above, the Plugin root is also known explicitly. Invoke node with the quoted absolute file path while keeping cwd at the business repository. Do not rely on Hook/MCP configuration variable expansion in arbitrary Skill text or shell commands.
Node must be on PATH, with Node 20 ESM as the framework target and any higher product requirement documented by the author. Install the whole Plugin: publishing or copying an individual Skill alone does not preserve its sibling Runtime. Candidate validation and Node subprocess tests do not replace a Cursor discovery/session check.
Sources: Skills, Plugins and local installation, Plugin reference.
License
MIT
