開発者ドキュメント
マニフェスト·

マニフェスト (PluginManifest)

defineManifest() で宣言する manifest.ts の必須フィールドと zod 検証。

manifest.ts はプラグインの SSOT(Single Source of Truth) です。 defineManifest() で型補完を効かせながら宣言します。

// src/manifest.ts
import { defineManifest } from "@niyase/plugin-sdk/manifest";

export const manifest = defineManifest({
  id: "@your-org/tasks",
  scope: "CERTIFIED",
  visibility: "PUBLIC",
  targetWorkspace: "BUSINESS",
  category: "extension",
  displayName: "タスク",
  description: "シンプルな業務タスク管理",
  iconName: "ListTodo",
  defaultRole: "PROVIDER",
  audiences: [
    {
      role: "executive",
      nav: {
        label: "タスク",
        href: "/plugin/tasks",
        activeColor: "text-primary",
      },
      tabs: [{ value: "list", label: "一覧" }],
    },
  ],
  tables: [
    {
      name: "task",
      columns: {
        title: { type: "TEXT", notNull: true },
        status: { type: "TEXT" },
      },
    },
  ],
  paletteMetadata: {
    intentTags: [
      "タスクを追加",
      "TODO 管理",
      "担当者を割り当て",
      "期限を設定",
      "進捗を確認",
    ],
    intentCategories: ["project"],
    capabilityKeywords: ["タスク管理", "TODO"],
    scenarios: ["朝の段取り", "週次レビュー"],
  },
});

必須フィールド

フィールド説明
id@scope/nameグローバル一意 ID。scope は claim 済み名前空間
scopeOFFICIAL | CERTIFIED | PRIVATE提供元区分
visibilityPUBLIC | PRIVATEマーケットプレイス可視性
targetWorkspaceBUSINESS | PERSONAL | BOTH対象スペース種別
categoryPluginSidebarCategoryサイドバー分類
displayNamestringUI 表示名
descriptionstring1〜2 行の説明
iconNamestringlucide-react のアイコン名
defaultRolePROVIDER | CLIENT | LOCAL有効化時の既定ロール
audiencesPluginAudience[]役割別(executive / employee / customer)のナビ・タブ
tablesPluginTableDef[]独自テーブル定義(不要なら []
paletteMetadataPluginPaletteMetadata統合パレット検索用(必須、下記)

paletteMetadata(必須)

統合パレットがプラグイン発見の主導線のため必須です。

  • intentTags: 具体語のフリーテキスト 5〜15 個
  • intentCategories: 大分類 enum 1〜3 個
  • capabilityKeywords: 機能ワード
  • scenarios: 業務シーン

任意フィールド

industries(推奨業種タグ)/ industryPresets(業種ごとの i18nTerms・seedData・conditionalTables)/ tablePrefix / version / pairedPluginId / requiresCloud など。

検証

niyase-plugin lintvalidateManifest()(zod)でマニフェストを検証します。 これは申請時にサーバ側が使うバリデータと同一なので、lint が通れば申請も通ります。

niyase-plugin lint
# ✓ tsc --noEmit
# ✓ manifest 検証 OK (@your-org/tasks)