Plugins

简体中文

A plugin is declared by a leaf package.ts. It lists executable entries, configuration, imports and exports. A Cargo crate is a compilation unit: one plugin may use several crates, and related plugins may share an implementation crate.

FamilyWhat it owns
agentConversations, model execution, tools, goals and scheduling
workspaceFiles, processes, Web and Jev services
settingsConnections, credentials and preferences
skillsSkill discovery, reads and publication
interactionsQuestions and forms
workhubTask coordination and worker results
application/Deployment management, plugin installation and UI authoring
shared/Shared TypeScript contracts and authoring helpers

For an existing plugin, start with its declaration and follow its selected implementation. Native entries select an implementation supplied by the executable; JavaScript entries name their bundled local module. Neither a family directory nor a linked crate activates a plugin.

The product selects business Host services. The terminal shell and desktop shell author their interfaces separately and connect to those same public Host capabilities. General SDK scene contracts remain available for independently authored runtimes; the default bundle has no scene presenter packages.

Build a single package from the repository root:

node scripts/plugins/build.mjs   --plugin plugins/workspace/workspace-web --output /tmp/maka-web-bundle

The builder replaces its output directory. It emits immutable-package inputs under packages/; inspect one with maka application inspect-package --package /tmp/maka-web-bundle/packages/workspace-web.

To include a plugin in Maka, add its path to the product selection, then add instances and bindings in the composition. A new native implementation also needs a factory in the product registry. An import identifies a dependency; Host grants determine which calls are allowed.

The plugin-authoring skill includes a runnable standalone starter and guides for services, UI, state and native extensions. The SDK supplies the exact contracts.

Plugin lists use the package author's displayName and description. Describe what the user can do in one sentence; internal package IDs remain stable technical identities. Optional localizations maps language tags to translated names and descriptions:

{
  id: 'example.notes',
  displayName: 'Notes',
  description: 'Write and find your notes.',
  localizations: {
    'zh-CN': { displayName: '笔记', description: '记录和查找笔记。' },
  },
  // application: ...
}

The plugin manager displays and searches this copy. Missing translations fall back to the default copy, then the instance name or package ID. Labels should predict the action or destination, following Apple's guidance on clear names. Use familiar icons with accessible labels and tooltips for common actions; keep explicit text for consequential or unfamiliar actions. Shell lists use their native virtualized controls and preserve the visible row; data cursors remain an implementation detail.