Skip to content

Latest commit

 

History

History
91 lines (68 loc) · 3.61 KB

File metadata and controls

91 lines (68 loc) · 3.61 KB

AI Publish Pipeline Plugin Spec

Scope

The AI publish pipeline plugin type provides review or interception logic before AI resources are published. It is designed for generic AI resources such as Skill, Prompt, MCP, AgentSpec, and future AI resource types.

This is an ordered chain plugin. Matching nodes execute serially by PublishPipelineService.getPreferOrder() in ascending order. A failed node stops the remaining pipeline and marks the execution rejected. Common lifecycle and state rules are defined by the Nacos Plugin Spec.

Pipeline is AI resource governance. It is allowed to approve or reject a publish operation, but it must not change the canonical identity of the AI resource being published. Domain lifecycle reaction to pipeline results is defined by the AI Resource Lifecycle Spec.

Concepts

Concept Meaning
Pipeline node One review or interception unit.
Pipeline execution Persisted execution record for one publish operation.
Supported resource type AI resource types a node can process.
Approved All selected nodes passed.
Rejected One selected node failed and stopped the chain.

SPI

Pipeline implementations are created by PublishPipelineServiceBuilder.

Builder method Requirement
pipelineId() Stable pipeline node id.
build(properties) Build a configured PublishPipelineService.

The service implements:

Service method Requirement
pipelineId() Runtime node id.
execute(context) Execute review or interception logic.
getPreferOrder() Chain order. Lower values execute earlier.
pipelineResourceTypes() AI resource types supported by this node.

The plugin is exposed to the core plugin manager as type ai-pipeline.

Execution

The pipeline executor:

  1. Reads pipeline configuration.
  2. Selects nodes that are configured and support the target resource type.
  3. Creates a pipeline execution record with IN_PROGRESS.
  4. Executes selected nodes asynchronously and serially.
  5. Persists each node result.
  6. Completes as approved only when every node passes.

If the pipeline is disabled or no matching nodes exist, publication proceeds without pipeline interception. Pipeline output must remain compatible with visibility filtering and with any AI storage used for the published content.

Pipeline nodes should return deterministic results for the same resource version and input metadata. Nodes that call external systems must define timeout and retry behavior in their implementation documentation.

Current Integration Note

The core plugin manager can list loaded AI pipeline plugins. Current code notes that enable or disable through unified plugin management is not yet wired into pipeline execution. Pipeline execution is controlled by the pipeline config until that integration is completed.