CanvasPluginManifest
Describes a canvas-environment plugin, so a host can validate it before running any of its code.
@internote/canvas-sdkimport { CanvasPluginManifest } from '@internote/canvas-sdk';The plugin's code default-exports a defineEnvironment definition, which loadEnvironmentFromManifest imports and registers. The module runtime loads today; worker, a sandboxed runtime for untrusted plugins, is reserved.
#Fields
authorWho wrote the plugin.
stringchalkThe environment the plugin provides. Its name must match the loaded definition's.
CanvasPluginChalkSpecdescriptionWhat the plugin adds, in a sentence.
stringidThe plugin's unique id, named in every load error.
stringnameThe plugin's human-readable name.
stringpermissionsThe permissions the plugin requests, such as
storage:db.string[]runtimeHow the runtime loads the plugin's code:
module is a dynamic import of an ES module whose default export is the definition, for a trusted plugin; worker is reserved for a sandboxed runtime.moduleworkersrcThe URL or path of the plugin's entry module.
stringversionThe plugin's version.
string#Example
const manifest: CanvasPluginManifest = {
id: 'example.greeting',
name: 'Greeting',
version: '1.0.0',
chalk: { environment: 'greeting' },
runtime: 'module',
src: '/plugins/greeting.js',
};Declared in packages/canvas-sdk/src/plugin/manifest.ts:41.