nexus-agents - v2.80.0
    Preparing search index...

    Interface PipelinePlugin

    Plugin interface — every stage implementation must conform.

    Plugins are the ONLY way stage logic runs. They communicate via ArtifactStore and EventBus (injected via context).

    interface PipelinePlugin {
        manifest: {
            id: string;
            version: string;
            description: string;
            stages: (
                "analyze"
                | "validate"
                | "aggregate"
                | "execute"
                | "gate"
                | "route"
            )[];
            requiredCapabilities: string[];
            trustLevel: "external" | "standard" | "core" | "experimental";
            experimental: boolean;
        };
        execute(
            stage: {
                id: string;
                type: "analyze" | "validate" | "aggregate" | "execute" | "gate" | "route";
                pluginId: string;
                inputArtifacts: string[];
                outputArtifacts: string[];
                dependencies: string[];
                config: Record<string, unknown>;
                preferredCli?: string;
                maxRetries?: number;
                timeoutMs?: number;
            },
            context: StageContext,
        ): Promise<
            {
                success: boolean;
                outputArtifacts: {
                    id: string;
                    type: | "code"
                    | "plan"
                    | "analysis"
                    | "review"
                    | "test"
                    | "spec"
                    | "report"
                    | "vote";
                }[];
                metadata: Record<string, unknown>;
                error?: string;
            },
        >;
        validateConfig(config: unknown): Result<void, PluginValidationError>;
        onLoad?(): Promise<void>;
        onUnload?(): Promise<void>;
    }
    Index

    Properties

    manifest: {
        id: string;
        version: string;
        description: string;
        stages: (
            "analyze"
            | "validate"
            | "aggregate"
            | "execute"
            | "gate"
            | "route"
        )[];
        requiredCapabilities: string[];
        trustLevel: "external" | "standard" | "core" | "experimental";
        experimental: boolean;
    }

    Manifest declaring this plugin's identity and capabilities.

    Methods

    • Execute a pipeline stage.

      Parameters

      • stage: {
            id: string;
            type: "analyze" | "validate" | "aggregate" | "execute" | "gate" | "route";
            pluginId: string;
            inputArtifacts: string[];
            outputArtifacts: string[];
            dependencies: string[];
            config: Record<string, unknown>;
            preferredCli?: string;
            maxRetries?: number;
            timeoutMs?: number;
        }

        The stage specification from the PlanContract

      • context: StageContext

        Runtime context with abort signal and task

      Returns Promise<
          {
              success: boolean;
              outputArtifacts: {
                  id: string;
                  type: | "code"
                  | "plan"
                  | "analysis"
                  | "review"
                  | "test"
                  | "spec"
                  | "report"
                  | "vote";
              }[];
              metadata: Record<string, unknown>;
              error?: string;
          },
      >

      Stage result with output artifacts