@suluk/agents - v0.1.6
    Preparing search index...

    Function agentLevel

    • An agent's pyramid LEVEL: its composition height above the deterministic route-floor. A leaf agent (skills/routes only, no sub-agents) is 1 (it composes only the floor). An agent that composes sub-agents is 1 + max(child level). Returns FLOOR_LEVEL (0) for any name that is NOT an orchestrating agent (a route/leaf capability — it lives on the floor). Returns Infinity when a sub-agent cycle makes the height unbounded (a contract defect the cycle-linter / grade already fail on). Cycle-safe via the shared subtreeDepth seen-guard. Never read by D1.

      Parameters

      • doc: OpenAPIv4Document
      • name: string

      Returns number