Skip to main content

nutria-plugin SDK

SDK for building, validating, signing, and packaging Nutria plugins.

Release 0.6.0 accepts only manifest schema 6.0. Capabilities use their real business effect (read, write, or external_write); preparation is expressed by producing prepared_action, not by a workflow-phase effect. Every parsed requirement resolves task_context to required, optional, or forbidden, with optional as the schema default. There is no legacy manifest compatibility.

ChatBotNutralia owns task context, reviewable drafts, revisions, approval, idempotency, and completion receipts. Plugins own authoritative provider reads and exact delivery of an approved snapshot.

Install

uv add nutria-plugin==0.6.0

Scaffold and validate

nutria-plugin new my-workspace-plugin --name "My Workspace Plugin"
nutria-plugin validate my-workspace-plugin
nutria-plugin pack my-workspace-plugin --output my-workspace-plugin-0.1.0.zip

The generated directory contains plugin.json, component directories for connections, skills, context documents, specs and hooks, plus an optional settings schema and assets.

Minimal schema 6.0 manifest

{
  "schema_version": "6.0",
  "id": "my-workspace-plugin",
  "name": "My Workspace Plugin",
  "version": "0.1.0",
  "description": "Connects Nutria to an authoritative workspace.",
  "author": "Your Name",
  "runtime_types": ["declarative_api"],
  "required_secrets": ["API_KEY"],
  "remote_endpoints": ["https://api.myworkspace.com"],
  "capabilities": [{
    "id": "workspace.search",
    "title": "Search workspace",
    "description": "Read matching workspace resources.",
    "domains": ["products"],
    "effect": "read",
    "effect_scope": "world",
    "tool": "search_workspace",
    "connection_id": "workspace",
    "requirements": {
      "authority": "read",
      "audience": ["team_internal"],
      "task_context": "optional"
    },
    "exposure": "model",
    "produces": [{
      "result_path": ".items",
      "resource_type": "workspace.item",
      "output_name": "items",
      "data_class": "non_personal",
      "many": true
    }]
  }],
  "world_providers": [{
    "id": "workspace",
    "title": "Workspace",
    "description": "Authoritative workspace resources.",
    "connection_id": "workspace",
    "resource_types": [{
      "id": "workspace.item",
      "title": "Workspace item",
      "description": "One stable workspace item.",
      "identity_fields": ["id"],
      "search_capability": "workspace.search"
    }]
  }]
}

Every capability must declare requirements and exposure. task_context defaults to optional; hosts resolve and may promote it to required when the capability consumes or produces task-owned resources such as task, artifact, or prepared_action. Host/admin-only capabilities also require a safe non_callable_reason. Every connection referenced by a capability must be represented by a matching world provider.

For customer messages, use a host-owned reviewable_actions contract. Do not create plugin draft tables or native saved-draft tools. See docs/reviewable-actions.md.

Python API

from pathlib import Path
from nutria_plugin import PluginManifest, pack_plugin, validate_plugin_dir

manifest = PluginManifest.from_file(Path("plugin.json"))
errors = validate_plugin_dir(Path("."))
archive = pack_plugin(Path("."), Path("dist/plugin.zip"))

Validate MCP results against declared outputs

Manifest validation checks the descriptor itself. Protocol-level plugin tests must also validate the payload Nutria receives after MCP transport:

from nutria_plugin import validate_capability_result

payload = validate_capability_result(
    capability,
    structured_content=call_result.structuredContent,
    text_content=call_result.content[0].text,
)

This normalizes FastMCP's scalar JSON envelope and raises MCPResultContractError when a declared path such as .items does not materialize. It does not execute the tool and should be used in a bounded, fixture-backed or read-only MCP integration test.

The package exports the strict manifest, capability, provider, reviewable-action, admin extension/flow, bundle, packaging, and signing models/functions documented in docs/python-api.md.

Bundle and security rules

  • plugin.json is required at the ZIP root.
  • Paths are relative; traversal, symlinks, hidden paths, and disallowed file extensions are rejected.
  • Maximum compressed bundle size is 20 MB and decompressed size is bounded.
  • Secrets are configured after installation and never stored in the bundle.
  • Remote endpoints are checked for unsafe local/private targets.
  • Database-backed plugins bind user/model values as SQL parameters.

Supported runtime types are remote_mcp, declarative_api, openapi_bridge, and soap_bridge.

License

MIT

Metadata

Release files for nutria-plugin 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nutria-plugin 0.6.0
File Size Uploaded Provenance Actions
nutria_plugin-0.6.0.tar.gz 106.6 kB With provenance Details for nutria_plugin-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nutria-plugin 0.6.0
File Interpreter ABI Platform Actions
nutria_plugin-0.6.0-py3-none-any.whl Python 3 none any Details for nutria_plugin-0.6.0-py3-none-any.whl

Total release size: 141.0 kB

Release files / nutria_plugin-0.6.0.tar.gz

Download URL nutria_plugin-0.6.0.tar.gz
Size 106.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d9a291d422535a4c667af183da73eadd402375803801197e84d9211a0beaf726
BLAKE2b-256 checksum
How to use checksums
cfdd7d73701d1fcca24d7eaa8dfcd33220a25c716f8c1189ee714f7f0fef85a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nutria_plugin-0.6.0-py3-none-any.whl

Download URL nutria_plugin-0.6.0-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9e5df6c561f6196244579fade2fc3386bdb6048ef5bd4f57dc0847ac76c46df
BLAKE2b-256 checksum
How to use checksums
867218d2e13d9315d2b1cca3005c0cbb7e030417411e8f82aaa68d17985c8242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Security for nutria-plugin 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nutria_plugin-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page