{
  "protocol": "1.0.0-beta.1",
  "cases": [
    {
      "id": "minimal-root-entry",
      "valid": true,
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "example-plugin",
        "entry": ".",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2 <0.1.2",
          "harness": ">=0.1.1-rc.1 <0.1.2",
          "node": "^22.19.0 || >=24.0.0"
        },
        "capabilities": {
          "required": [],
          "optional": []
        }
      }
    },
    {
      "id": "all-capabilities-and-resources",
      "valid": true,
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/full-plugin",
        "entry": "./blue",
        "api": ">=1.0.0-beta.1 <2.0.0",
        "compatibility": {
          "blue": ">=0.1.1-rc.2 <0.2.0",
          "harness": "0.1.1-rc.1 || 0.1.1-rc.2",
          "node": "^22.19.0 || >=24.0.0"
        },
        "capabilities": {
          "required": [
            {
              "name": "commands",
              "version": "^1.0.0",
              "resources": {
                "names": [
                  "context.open",
                  "context.refresh"
                ]
              }
            },
            {
              "name": "status",
              "version": "^1.0.0"
            },
            {
              "name": "panes",
              "version": "^1.0.0",
              "resources": {
                "placements": [
                  "header",
                  "right",
                  "bottom"
                ]
              }
            },
            {
              "name": "overlays",
              "version": "^1.0.0"
            },
            {
              "name": "notifications.publish",
              "version": "^1.0.0"
            }
          ],
          "optional": [
            {
              "name": "session.read",
              "version": "^1.0.0",
              "resources": {
                "fields": [
                  "identity",
                  "cwd",
                  "status",
                  "mode",
                  "model"
                ]
              }
            },
            {
              "name": "session.projections.read",
              "version": "^1.0.0",
              "resources": {
                "keys": [
                  "costUsage",
                  "contextTimeline"
                ]
              }
            }
          ]
        }
      }
    },
    {
      "id": "invalid-identity",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "Bad Plugin",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [],
          "optional": []
        }
      }
    },
    {
      "id": "invalid-entry-not-export-subpath",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "lib/index.js",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [],
          "optional": []
        }
      }
    },
    {
      "id": "invalid-semver",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "next release",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [],
          "optional": []
        }
      }
    },
    {
      "id": "invalid-required-shape",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [
            "status"
          ],
          "optional": []
        }
      }
    },
    {
      "id": "invalid-optional-capability",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [],
          "optional": [
            {
              "name": "editor.provider",
              "version": "^1.0.0"
            }
          ]
        }
      }
    },
    {
      "id": "invalid-resource-for-capability",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [
            {
              "name": "commands",
              "version": "^1.0.0",
              "resources": {
                "placements": [
                  "right"
                ]
              }
            }
          ],
          "optional": []
        }
      }
    },
    {
      "id": "unknown-field",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [],
          "optional": []
        },
        "form": "adapter"
      }
    },
    {
      "id": "duplicate-required-capability",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_DUPLICATE_CAPABILITY",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [
            {
              "name": "status",
              "version": "^1.0.0"
            },
            {
              "name": "status",
              "version": ">=1.0.0 <2.0.0"
            }
          ],
          "optional": []
        }
      }
    },
    {
      "id": "duplicate-identical-capability",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_DUPLICATE_CAPABILITY",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [
            {
              "name": "status",
              "version": "^1.0.0"
            },
            {
              "name": "status",
              "version": "^1.0.0"
            }
          ],
          "optional": []
        }
      }
    },
    {
      "id": "duplicate-cross-group-capability",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_DUPLICATE_CAPABILITY",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [
            {
              "name": "panes",
              "version": "^1.0.0",
              "resources": {
                "placements": [
                  "bottom"
                ]
              }
            }
          ],
          "optional": [
            {
              "name": "panes",
              "version": "^1.1.0",
              "resources": {
                "placements": [
                  "right"
                ]
              }
            }
          ]
        }
      }
    },
    {
      "id": "duplicate-resource",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [],
          "optional": [
            {
              "name": "session.projections.read",
              "version": "^1.0.0",
              "resources": {
                "keys": [
                  "costUsage",
                  "costUsage"
                ]
              }
            }
          ]
        }
      }
    },
    {
      "id": "projection-resource-too-long",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "compatibility": {
          "blue": ">=0.1.1-rc.2",
          "harness": "^0.1.1-rc.2",
          "node": ">=22.19.0"
        },
        "capabilities": {
          "required": [
            {
              "name": "session.projections.read",
              "version": "^1.0.0",
              "resources": {
                "keys": [
                  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                ]
              }
            }
          ],
          "optional": []
        }
      }
    },
    {
      "id": "missing-compatibility",
      "valid": false,
      "code": "BLUE_PLUGIN_MANIFEST_SCHEMA_INVALID",
      "manifest": {
        "$schema": "https://dsh-blue.dev/schema/blue.plugin.v1.schema.json",
        "schemaVersion": 1,
        "id": "@acme/example",
        "entry": "./blue",
        "api": "^1.0.0-beta.1",
        "capabilities": {
          "required": [],
          "optional": []
        }
      }
    }
  ]
}
