# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class NodeJsSessionInfo(UniversalBaseModel):
    session_id: str = pydantic.Field()
    """
    Session ID
    """

    cwd: str = pydantic.Field()
    """
    Working directory
    """

    created_at: float = pydantic.Field()
    """
    Session creation timestamp (ms since epoch)
    """

    last_used: float = pydantic.Field()
    """
    Last activity timestamp (ms since epoch)
    """

    max_idle_time: int = pydantic.Field()
    """
    Maximum idle time in milliseconds
    """

    age_seconds: int = pydantic.Field()
    """
    Seconds since last activity
    """

    state: str = pydantic.Field()
    """
    Session state: IDLE or EXECUTING
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
