"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import google.protobuf.descriptor
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.struct_pb2
import google.protobuf.timestamp_pb2
import insightproto.proto.common.v1.common_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _JobType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _JobTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_JobType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    JOB_TYPE_UNSPECIFIED: _JobType.ValueType  # 0
    JOB_TYPE_INSIGHT: _JobType.ValueType  # 1
    """Insight investigation jobs"""
    JOB_TYPE_AETHER: _JobType.ValueType  # 2
    """Aether MR review jobs"""
    JOB_TYPE_SIMULATOR: _JobType.ValueType  # 3
    """Simulator evaluation jobs"""
    JOB_TYPE_KNOWLEDGE: _JobType.ValueType  # 4
    """Knowledge acquisition jobs"""
    JOB_TYPE_CHAT: _JobType.ValueType  # 5
    """Chat/conversation jobs"""

class JobType(_JobType, metaclass=_JobTypeEnumTypeWrapper):
    """JobType defines the type of job"""

JOB_TYPE_UNSPECIFIED: JobType.ValueType  # 0
JOB_TYPE_INSIGHT: JobType.ValueType  # 1
"""Insight investigation jobs"""
JOB_TYPE_AETHER: JobType.ValueType  # 2
"""Aether MR review jobs"""
JOB_TYPE_SIMULATOR: JobType.ValueType  # 3
"""Simulator evaluation jobs"""
JOB_TYPE_KNOWLEDGE: JobType.ValueType  # 4
"""Knowledge acquisition jobs"""
JOB_TYPE_CHAT: JobType.ValueType  # 5
"""Chat/conversation jobs"""
Global___JobType: typing_extensions.TypeAlias = JobType

@typing.final
class JobIdentifier(google.protobuf.message.Message):
    """============================================
    Core Identifiers
    ============================================

    JobIdentifier uniquely identifies a job across all types
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    JOB_ID_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    job_id: builtins.str
    """Job ID"""
    type: Global___JobType.ValueType
    """Job type"""
    def __init__(
        self,
        *,
        job_id: builtins.str = ...,
        type: Global___JobType.ValueType = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["job_id", b"job_id", "type", b"type"]) -> None: ...

Global___JobIdentifier: typing_extensions.TypeAlias = JobIdentifier

@typing.final
class JobEvent(google.protobuf.message.Message):
    """============================================
    Job Events
    ============================================

    JobEvent represents an event that occurred during job processing
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ORG_FIELD_NUMBER: builtins.int
    JOB_FIELD_NUMBER: builtins.int
    TIMESTAMP_FIELD_NUMBER: builtins.int
    AGENT_FIELD_NUMBER: builtins.int
    THOUGHT_FIELD_NUMBER: builtins.int
    TOOL_CALL_FIELD_NUMBER: builtins.int
    TOOL_RESULT_FIELD_NUMBER: builtins.int
    AGENT_STARTED_FIELD_NUMBER: builtins.int
    AGENT_STOPPED_FIELD_NUMBER: builtins.int
    PROGRESS_FIELD_NUMBER: builtins.int
    CHAT_CONTENT_FIELD_NUMBER: builtins.int
    @property
    def org(self) -> insightproto.proto.common.v1.common_pb2.Organisation:
        """The owner organisation"""

    @property
    def job(self) -> Global___JobIdentifier:
        """The job this event belongs to"""

    @property
    def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """When this event occurred"""

    @property
    def agent(self) -> Global___Agent:
        """The agent this event is from"""

    @property
    def thought(self) -> Global___ThoughtEvent:
        """Agent reasoning/thinking"""

    @property
    def tool_call(self) -> Global___ToolCallEvent:
        """Tool invocation started"""

    @property
    def tool_result(self) -> Global___ToolResultEvent:
        """Tool execution completed"""

    @property
    def agent_started(self) -> Global___AgentStartedEvent:
        """Sub-agent started"""

    @property
    def agent_stopped(self) -> Global___AgentStoppedEvent:
        """Sub-agent stopped"""

    @property
    def progress(self) -> Global___ProgressEvent:
        """Progress update"""

    @property
    def chat_content(self) -> Global___ChatContentEvent:
        """Streamed chat content"""

    def __init__(
        self,
        *,
        org: insightproto.proto.common.v1.common_pb2.Organisation | None = ...,
        job: Global___JobIdentifier | None = ...,
        timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        agent: Global___Agent | None = ...,
        thought: Global___ThoughtEvent | None = ...,
        tool_call: Global___ToolCallEvent | None = ...,
        tool_result: Global___ToolResultEvent | None = ...,
        agent_started: Global___AgentStartedEvent | None = ...,
        agent_stopped: Global___AgentStoppedEvent | None = ...,
        progress: Global___ProgressEvent | None = ...,
        chat_content: Global___ChatContentEvent | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["agent", b"agent", "agent_started", b"agent_started", "agent_stopped", b"agent_stopped", "chat_content", b"chat_content", "event", b"event", "job", b"job", "org", b"org", "progress", b"progress", "thought", b"thought", "timestamp", b"timestamp", "tool_call", b"tool_call", "tool_result", b"tool_result"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["agent", b"agent", "agent_started", b"agent_started", "agent_stopped", b"agent_stopped", "chat_content", b"chat_content", "event", b"event", "job", b"job", "org", b"org", "progress", b"progress", "thought", b"thought", "timestamp", b"timestamp", "tool_call", b"tool_call", "tool_result", b"tool_result"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["event", b"event"]) -> typing.Literal["thought", "tool_call", "tool_result", "agent_started", "agent_stopped", "progress", "chat_content"] | None: ...

Global___JobEvent: typing_extensions.TypeAlias = JobEvent

@typing.final
class Agent(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    NAME_FIELD_NUMBER: builtins.int
    name: builtins.str
    """the name of the agent e.g. knowledge_agent.KnowledgeAgent"""
    def __init__(
        self,
        *,
        name: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["name", b"name"]) -> None: ...

Global___Agent: typing_extensions.TypeAlias = Agent

@typing.final
class ThoughtEvent(google.protobuf.message.Message):
    """ThoughtEvent represents agent reasoning or thinking"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    THOUGHT_FIELD_NUMBER: builtins.int
    thought: builtins.str
    """The thought/reasoning content"""
    def __init__(
        self,
        *,
        thought: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["thought", b"thought"]) -> None: ...

Global___ThoughtEvent: typing_extensions.TypeAlias = ThoughtEvent

@typing.final
class ToolCallEvent(google.protobuf.message.Message):
    """ToolCallEvent represents a tool being invoked"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TOOL_CALL_ID_FIELD_NUMBER: builtins.int
    TOOL_NAME_FIELD_NUMBER: builtins.int
    MCP_SERVER_FIELD_NUMBER: builtins.int
    ARGUMENTS_FIELD_NUMBER: builtins.int
    tool_call_id: builtins.str
    """Unique identifier for this tool call"""
    tool_name: builtins.str
    """The name of the tool being called"""
    mcp_server: builtins.str
    """The MCP server name if this is an MCP tool"""
    @property
    def arguments(self) -> google.protobuf.struct_pb2.Struct:
        """The arguments passed to the tool"""

    def __init__(
        self,
        *,
        tool_call_id: builtins.str = ...,
        tool_name: builtins.str = ...,
        mcp_server: builtins.str | None = ...,
        arguments: google.protobuf.struct_pb2.Struct | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_mcp_server", b"_mcp_server", "arguments", b"arguments", "mcp_server", b"mcp_server"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_mcp_server", b"_mcp_server", "arguments", b"arguments", "mcp_server", b"mcp_server", "tool_call_id", b"tool_call_id", "tool_name", b"tool_name"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_mcp_server", b"_mcp_server"]) -> typing.Literal["mcp_server"] | None: ...

Global___ToolCallEvent: typing_extensions.TypeAlias = ToolCallEvent

@typing.final
class ToolResultEvent(google.protobuf.message.Message):
    """ToolResultEvent represents the result of a tool execution"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TOOL_CALL_ID_FIELD_NUMBER: builtins.int
    SUCCESS_FIELD_NUMBER: builtins.int
    RESULT_FIELD_NUMBER: builtins.int
    ERROR_MESSAGE_FIELD_NUMBER: builtins.int
    DURATION_MS_FIELD_NUMBER: builtins.int
    tool_call_id: builtins.str
    """The tool call ID this result corresponds to"""
    success: builtins.bool
    """Whether the tool execution was successful"""
    error_message: builtins.str
    """Error message (if failed)"""
    duration_ms: builtins.int
    """Execution duration in milliseconds"""
    @property
    def result(self) -> google.protobuf.struct_pb2.Struct:
        """The result data (if successful)"""

    def __init__(
        self,
        *,
        tool_call_id: builtins.str = ...,
        success: builtins.bool = ...,
        result: google.protobuf.struct_pb2.Struct | None = ...,
        error_message: builtins.str | None = ...,
        duration_ms: builtins.int = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_error_message", b"_error_message", "_result", b"_result", "error_message", b"error_message", "result", b"result"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_error_message", b"_error_message", "_result", b"_result", "duration_ms", b"duration_ms", "error_message", b"error_message", "result", b"result", "success", b"success", "tool_call_id", b"tool_call_id"]) -> None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing.Literal["_error_message", b"_error_message"]) -> typing.Literal["error_message"] | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing.Literal["_result", b"_result"]) -> typing.Literal["result"] | None: ...

Global___ToolResultEvent: typing_extensions.TypeAlias = ToolResultEvent

@typing.final
class AgentStartedEvent(google.protobuf.message.Message):
    """AgentStartedEvent represents a sub-agent being spawned"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    GOAL_FIELD_NUMBER: builtins.int
    goal: builtins.str
    """The goal/task assigned to this agent"""
    def __init__(
        self,
        *,
        goal: builtins.str | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_goal", b"_goal", "goal", b"goal"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_goal", b"_goal", "goal", b"goal"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_goal", b"_goal"]) -> typing.Literal["goal"] | None: ...

Global___AgentStartedEvent: typing_extensions.TypeAlias = AgentStartedEvent

@typing.final
class AgentStoppedEvent(google.protobuf.message.Message):
    """AgentStoppedEvent represents a sub-agent completing"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ERROR_FIELD_NUMBER: builtins.int
    error: builtins.str
    """Error message if the agent failed"""
    def __init__(
        self,
        *,
        error: builtins.str | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_error", b"_error", "error", b"error"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ...

Global___AgentStoppedEvent: typing_extensions.TypeAlias = AgentStoppedEvent

@typing.final
class ProgressEvent(google.protobuf.message.Message):
    """ProgressEvent represents a progress update"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    MESSAGE_FIELD_NUMBER: builtins.int
    PERCENT_FIELD_NUMBER: builtins.int
    message: builtins.str
    """Human-readable progress message"""
    percent: builtins.int
    """Progress percentage (0-100)"""
    def __init__(
        self,
        *,
        message: builtins.str = ...,
        percent: builtins.int | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_percent", b"_percent", "percent", b"percent"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_percent", b"_percent", "message", b"message", "percent", b"percent"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_percent", b"_percent"]) -> typing.Literal["percent"] | None: ...

Global___ProgressEvent: typing_extensions.TypeAlias = ProgressEvent

@typing.final
class ChatContentEvent(google.protobuf.message.Message):
    """ChatContentEvent represents streamed content from an AI response"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TEXT_FIELD_NUMBER: builtins.int
    SEQUENCE_FIELD_NUMBER: builtins.int
    COMPLETE_FIELD_NUMBER: builtins.int
    CONVERSATION_ID_FIELD_NUMBER: builtins.int
    RESPONSE_ID_FIELD_NUMBER: builtins.int
    text: builtins.str
    """The text content being streamed"""
    sequence: builtins.int
    """Sequence number for ordering"""
    complete: builtins.bool
    """Marks this message as complete"""
    conversation_id: builtins.str
    """the id of the conversation"""
    response_id: builtins.str
    """response id of the response to update"""
    def __init__(
        self,
        *,
        text: builtins.str = ...,
        sequence: builtins.int | None = ...,
        complete: builtins.bool = ...,
        conversation_id: builtins.str = ...,
        response_id: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_sequence", b"_sequence", "sequence", b"sequence"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_sequence", b"_sequence", "complete", b"complete", "conversation_id", b"conversation_id", "response_id", b"response_id", "sequence", b"sequence", "text", b"text"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["_sequence", b"_sequence"]) -> typing.Literal["sequence"] | None: ...

Global___ChatContentEvent: typing_extensions.TypeAlias = ChatContentEvent
