Skip to content

Check plugins ​

Plugins are trusted TypeScript modules passed directly to the core API in a source workspace. Project configuration and MCP inputs cannot load modules. Package or review extensions as part of a trusted wrapper.

ts
import { verify, type Check } from "@shipwitness/core";

const releaseNotes: Check = {
  id: "release-notes",
  description: "Check whether release notes are included",
  async run({ project, signal }) {
    signal.throwIfAborted();
    const { readWorkspace } = await import("@shipwitness/core");
    const notes = await readWorkspace(project.root, "CHANGELOG.md");
    return {
      status: notes.length > 32 ? "passed" : "failed",
      message: "Checked the declared changelog",
    };
  },
};

await verify(
  process.cwd(),
  { only: ["release-notes"] },
  {},
  undefined,
  undefined,
  [releaseNotes],
);

Use after to declare dependencies and effect to require command, browser or network permission. Check IDs must be unique. Honor the cancellation signal and keep reads bounded. Registered code is trusted and runs inside the main process.

For contributor setup, see CONTRIBUTING.md.