api: v1doc/zh/design/plugins/README.md · doc/zh/guide/plugin-development.md

Plugin System & plugin.yaml

Three execution forms, typed roles, MCP + progressive SKILL.md disclosure, hooks, and approve-on-change trust.

Three Forms, One Manifest, One Governance Path

FormImplementationExamples
builtinGo compiled into the Host binary (embedded plugin.yaml)feishu, httpapi, agent, openai, parse-pdf
processExecutable in any language speaking JSON-RPC 2.0 over stdioPython/Rust/Node tools, channels, or parsers
manifestZero-code directory: MCP servers + SKILL.md + hooksrail-12306, safe-shell, imported Claude Code / Codex plugins

Builtin, first-party, and third-party plugins pass through identical schema validation, operator policy, and authorization checks. Directory plugins require approval and automatically deactivate (changed_since_approved) if any file changes.

Zero-Code Manifest Example

plugins/release-helper/plugin.yaml
api: v1
name: release-helper
version: 0.1.0
description: Release tools from an MCP server, a release-notes skill, and two hooks.
host: ">=0.1.0 <1.0.0"
execution: manifest
roles: [tool, skill, guard, context]
mcp_servers:
  - name: gh
    command: [npx, -y, "@modelcontextprotocol/server-github"]
    env: { GITHUB_TOKEN: "${option.token}" }
    approval: ["create_*", "merge_*"]
options:
  token: { type: string, title: "GitHub token", required: true, sensitive: true }
skills:
  - skills/release-notes
hooks:
  - event: pre_tool
    match: "bash|powershell"
    command: [python3, "${PLUGIN_ROOT}/hooks/no-force-push.py"]
    timeout: 5s

Progressive Skills & Ecosystem Importer

  • ◆Three-tier disclosure: skill name & description live in the prompt (~100 tokens); full SKILL.md body loads on demand via load_skill(name); reference files load individually.
  • ◆Claude Code & Codex import: orquelo plugin install converts .claude-plugin/plugin.json, .mcp.json, commands, and hooks directly into manifest plugins.
  • ◆Capability intersection: a run can act only within roles ∩ runtime.uses ∩ instance.scope ∩ approvals ∩ operator policy.