マニフェスト·
マニフェスト (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 済み名前空間 |
scope | OFFICIAL | CERTIFIED | PRIVATE | 提供元区分 |
visibility | PUBLIC | PRIVATE | マーケットプレイス可視性 |
targetWorkspace | BUSINESS | PERSONAL | BOTH | 対象スペース種別 |
category | PluginSidebarCategory | サイドバー分類 |
displayName | string | UI 表示名 |
description | string | 1〜2 行の説明 |
iconName | string | lucide-react のアイコン名 |
defaultRole | PROVIDER | CLIENT | LOCAL | 有効化時の既定ロール |
audiences | PluginAudience[] | 役割別(executive / employee / customer)のナビ・タブ |
tables | PluginTableDef[] | 独自テーブル定義(不要なら []) |
paletteMetadata | PluginPaletteMetadata | 統合パレット検索用(必須、下記) |
paletteMetadata(必須)
統合パレットがプラグイン発見の主導線のため必須です。
intentTags: 具体語のフリーテキスト 5〜15 個intentCategories: 大分類 enum 1〜3 個capabilityKeywords: 機能ワードscenarios: 業務シーン
任意フィールド
industries(推奨業種タグ)/ industryPresets(業種ごとの i18nTerms・seedData・conditionalTables)/ tablePrefix / version / pairedPluginId / requiresCloud など。
検証
niyase-plugin lint が validateManifest()(zod)でマニフェストを検証します。
これは申請時にサーバ側が使うバリデータと同一なので、lint が通れば申請も通ります。
niyase-plugin lint
# ✓ tsc --noEmit
# ✓ manifest 検証 OK (@your-org/tasks)