#  Copyright (c) 2026 Cisco Systems, Inc. and its affiliates
#  SPDX-License-Identifier: Apache-2.0
$schema: "http://json-schema.org/draft-07/schema#"
$id: "mas-lab/lab/v1"
title: "mas-lab lab manifest (v1)"
description: >
  Lab metadata beside experiments.  ``libraries`` declares installable library
  schemes or forward-relative paths injected at run time.  ``plugins`` register
  lab-local modules (pythonpath, step registration, …).

type: object
required: [lab]
additionalProperties: false

properties:
  lab:
    type: object
    required: [name]
    additionalProperties: false
    properties:
      name:
        type: string
        minLength: 1
      description:
        type: string
      libraries:
        type: array
        description: >
          Library paths (same role as workspace ``manifest_libraries:``).
          Directories with ``library.yaml`` become ``name:path`` libraries
          (name = basename). Directories without it are import-path only.
          In-repo labs that list a local dir must ship ``library.yaml``
          there. Lab-local names win over workspace and installed
          libraries. See docs/labs-and-libraries.md.
        items:
          type: string
          minLength: 1
      plugins:
        type: array
        description: >
          Lab-local plugins.  Each entry is a module name or a plugin spec object.
        items:
          oneOf:
            - type: string
              minLength: 1
            - type: object
              additionalProperties: false
              properties:
                id:
                  type: string
                path:
                  type: string
                module:
                  type: string
              anyOf:
                - required: [path]
                - required: [module]
      enable_plugins:
        type: array
        description: >
          Overlay plugin URNs this lab turns on (same catalog as workspace
          config.yaml plugins). Off unless listed. Not agent spec slots.
        items:
          type: string
          minLength: 1
