{
  "name": "immich-core",
  "version": "2.0.0",
  "title": "Immich Core",
  "description": "Core workflow capabilities for Immich",
  "author": "Immich Team",

  "wasm": {
    "path": "dist/plugin.wasm"
  },

  "filters": [
    {
      "methodName": "filterFileName",
      "title": "Filter by filename",
      "description": "Filter assets by filename pattern using text matching or regular expressions",
      "supportedContexts": ["asset"],
      "schema": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string",
            "description": "Text or regex pattern to match against filename"
          },
          "matchType": {
            "type": "string",
            "enum": ["contains", "regex", "exact"],
            "default": "contains",
            "description": "Type of pattern matching to perform"
          },
          "caseSensitive": {
            "type": "boolean",
            "default": false,
            "description": "Whether matching should be case-sensitive"
          }
        },
        "required": ["pattern"]
      }
    },
    {
      "methodName": "filterFileType",
      "title": "Filter by file type",
      "description": "Filter assets by file type",
      "supportedContexts": ["asset"],
      "schema": {
        "type": "object",
        "properties": {
          "fileTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["IMAGE", "VIDEO"]
            },
            "description": "Allowed file types"
          }
        },
        "required": ["fileTypes"]
      }
    },
    {
      "methodName": "filterPerson",
      "title": "Filter by person",
      "description": "Filter by detected person",
      "supportedContexts": ["person"],
      "schema": {
        "type": "object",
        "properties": {
          "personIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of person to match"
          },
          "matchAny": {
            "type": "boolean",
            "default": true,
            "description": "Match any name (true) or require all names (false)"
          }
        },
        "required": ["personIds"]
      }
    }
  ],

  "actions": [
    {
      "methodName": "actionArchive",
      "title": "Archive",
      "description": "Move the asset to archive",
      "supportedContexts": ["asset"],
      "schema": {}
    },
    {
      "methodName": "actionFavorite",
      "title": "Favorite",
      "description": "Mark the asset as favorite or unfavorite",
      "supportedContexts": ["asset"],
      "schema": {
        "type": "object",
        "properties": {
          "favorite": {
            "type": "boolean",
            "default": true,
            "description": "Set favorite (true) or unfavorite (false)"
          }
        }
      }
    },
    {
      "methodName": "actionAddToAlbum",
      "title": "Add to Album",
      "description": "Add the item to a specified album",
      "supportedContexts": ["asset", "person"],
      "schema": {
        "type": "object",
        "properties": {
          "albumId": {
            "type": "string",
            "description": "Target album ID"
          }
        },
        "required": ["albumId"]
      }
    }
  ]
}
