{
  "name": "forge.core",
  "language": "python",
  "version": "0.1.0",
  "description": "Python core package; imports are explicit from this package.",
  "manifest": "forge-py/pyproject.toml",
  "manifestSha256": "7f96957378b21995bf2e583af2afd1b9e6fb3b0089ff3559d62c7e012a034696",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/python/core",
  "features": {},
  "files": [
    {
      "path": "forge-py/src/forge/core/__init__.py",
      "sha256": "0bb91f7f170e3b488bcf5fc3b5fb16885bd77c0ad28662752322cfa0d686b332",
      "artifactSha256": "e6cffbd26e89ab329ed5a3b31ff2ea6c284ea6623e079181daf1240d9ce75bb3",
      "url": "/reference/source/forge-py/src/forge/core/__init__.py.txt",
      "declarations": []
    },
    {
      "path": "forge-py/src/forge/core/brew.py",
      "sha256": "74181c2a257bae3139fc1fb5b3bbff7be5c46879d692a3845deb813dbc007f14",
      "artifactSha256": "5d12053882e84aed54d28f7296f79bb566da38e5416fbec941dfadff16d2343a",
      "url": "/reference/source/forge-py/src/forge/core/brew.py.txt",
      "declarations": [
        {
          "name": "JoinMode",
          "line": 26,
          "signature": "class JoinMode(Enum)",
          "documentation": "Strategy for joining results from parallel fork branches.\n\n``AWAIT_ALL``: Wait for all branches to complete.\n``FIRST_SUCCESS``: Return as soon as one branch completes.\n``FIRST_N``: Return as soon as N branches complete (use ``JoinModeFirstN``)."
        },
        {
          "name": "JoinModeFirstN",
          "line": 39,
          "signature": "class JoinModeFirstN()",
          "documentation": "Join mode: return as soon as N branches complete successfully.\n\nArgs:\n    n: The number of branches required."
        },
        {
          "name": "JoinModeFirstN.to_dict",
          "line": 48,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary with ``first_n`` key."
        },
        {
          "name": "join_mode_to_dict",
          "line": 57,
          "signature": "def join_mode_to_dict(mode: JoinMode | JoinModeFirstN) -> Any",
          "documentation": "Serialize a join mode to a JSON-compatible value.\n\nArgs:\n    mode: The join mode.\n\nReturns:\n    A string or dict depending on the join mode type."
        },
        {
          "name": "join_mode_from_dict",
          "line": 71,
          "signature": "def join_mode_from_dict(data: Any) -> JoinMode | JoinModeFirstN",
          "documentation": "Deserialize a join mode from a JSON-compatible value.\n\nArgs:\n    data: A string or dict.\n\nReturns:\n    The deserialized join mode."
        },
        {
          "name": "BrewId",
          "line": 86,
          "signature": "class BrewId()",
          "documentation": "Opaque identifier for a brew definition.\n\nArgs:\n    value: The identifier string.\n\nExample:\n    >>> bid = BrewId(\"research-pipeline\")\n    >>> bid.as_str()\n    'research-pipeline'"
        },
        {
          "name": "BrewId.as_str",
          "line": 100,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the inner string.\n\nReturns:\n    The identifier string."
        },
        {
          "name": "NodeId",
          "line": 113,
          "signature": "class NodeId()",
          "documentation": "Opaque identifier for a node within a brew graph.\n\nArgs:\n    value: The node identifier string.\n\nExample:\n    >>> nid = NodeId(\"fetch-data\")\n    >>> nid.as_str()\n    'fetch-data'"
        },
        {
          "name": "NodeId.as_str",
          "line": 127,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the inner string.\n\nReturns:\n    The node identifier string."
        },
        {
          "name": "BrewVersion",
          "line": 140,
          "signature": "class BrewVersion()",
          "documentation": "Semantic version string for a brew definition.\n\nArgs:\n    value: The version string.\n\nExample:\n    >>> v = BrewVersion(\"1.0.0\")\n    >>> v.as_str()\n    '1.0.0'"
        },
        {
          "name": "BrewVersion.as_str",
          "line": 154,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the inner string.\n\nReturns:\n    The version string."
        },
        {
          "name": "BrewEdgeKind",
          "line": 166,
          "signature": "class BrewEdgeKind(Enum)",
          "documentation": "The semantics of a directed edge in the brew graph.\n\n``DATA_FLOW``: Output of source feeds as input to target.\n``CONTROL_FLOW``: Target executes after source completes.\n``ERROR_FLOW``: Target executes when source fails."
        },
        {
          "name": "BrewEdge",
          "line": 180,
          "signature": "class BrewEdge()",
          "documentation": "A directed edge in the brew graph connecting two nodes.\n\nArgs:\n    from_node: The source node identifier.\n    to_node: The target node identifier.\n    kind: The edge semantics."
        },
        {
          "name": "BrewEdge.to_dict",
          "line": 193,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "BrewEdge.from_dict",
          "line": 206,
          "signature": "def from_dict(data: dict[str, Any]) -> BrewEdge",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized BrewEdge."
        },
        {
          "name": "BrewEdge.sort_key",
          "line": 221,
          "signature": "def sort_key(self) -> tuple[str, str, str]",
          "documentation": "Return a sort key for deterministic ordering.\n\nReturns:\n    A tuple of (from, to, kind) strings."
        },
        {
          "name": "AgentStepNode",
          "line": 235,
          "signature": "class AgentStepNode()",
          "documentation": "An agent step: send a prompt to a model, optionally with tools.\n\nArgs:\n    provider: Provider reference (e.g., ``openai:gpt-4o``).\n    system_prompt: Optional system prompt for this step.\n    max_steps: Maximum tool-loop steps for this agent invocation."
        },
        {
          "name": "ToolInvocationNode",
          "line": 250,
          "signature": "class ToolInvocationNode()",
          "documentation": "A direct tool invocation without an LLM in the loop.\n\nArgs:\n    tool_id: Tool identifier.\n    tier: Tool tier classification."
        },
        {
          "name": "McpCallNode",
          "line": 263,
          "signature": "class McpCallNode()",
          "documentation": "An MCP tool call routed through a connected MCP server.\n\nArgs:\n    server_id: MCP server identifier (URI or alias).\n    tool_name: MCP tool name on the remote server."
        },
        {
          "name": "WebOperationNode",
          "line": 276,
          "signature": "class WebOperationNode()",
          "documentation": "A web operation (HTTP request, browser action, etc.).\n\nArgs:\n    operation: The operation kind identifier."
        },
        {
          "name": "ConditionalBranchNode",
          "line": 287,
          "signature": "class ConditionalBranchNode()",
          "documentation": "A conditional branch routing to one of two targets.\n\nArgs:\n    condition_expr: JSONPath or simple expression evaluated against data.\n    true_target: The node to route to when the condition is true.\n    false_target: The node to route to when the condition is false."
        },
        {
          "name": "ParallelForkNode",
          "line": 302,
          "signature": "class ParallelForkNode()",
          "documentation": "A parallel fork spawning concurrent execution of branches.\n\nArgs:\n    branches: The set of branch targets to execute concurrently.\n    join_mode: Strategy for joining parallel results."
        },
        {
          "name": "SubBrewRefNode",
          "line": 315,
          "signature": "class SubBrewRefNode()",
          "documentation": "A reference to another brew, enabling composition.\n\nArgs:\n    brew_id: The referenced brew's identifier."
        },
        {
          "name": "HumanCheckpointNode",
          "line": 326,
          "signature": "class HumanCheckpointNode()",
          "documentation": "A human-in-the-loop checkpoint.\n\nArgs:\n    prompt: The prompt displayed to the human reviewer.\n    timeout_ms: Maximum wait time in milliseconds. None means indefinite."
        },
        {
          "name": "brew_node_kind_to_dict",
          "line": 350,
          "signature": "def brew_node_kind_to_dict(kind: BrewNodeKind) -> dict[str, Any]",
          "documentation": "Serialize a BrewNodeKind to a dictionary with type tag.\n\nArgs:\n    kind: The node kind.\n\nReturns:\n    Dictionary with a ``type`` discriminator."
        },
        {
          "name": "brew_node_kind_from_dict",
          "line": 409,
          "signature": "def brew_node_kind_from_dict(data: dict[str, Any]) -> BrewNodeKind",
          "documentation": "Deserialize a BrewNodeKind from a dictionary with type tag.\n\nArgs:\n    data: Dictionary with ``type`` discriminator.\n\nReturns:\n    The deserialized BrewNodeKind.\n\nRaises:\n    ValueError: If the type tag is unknown."
        },
        {
          "name": "BrewNode",
          "line": 463,
          "signature": "class BrewNode()",
          "documentation": "A single node in the brew execution graph.\n\nArgs:\n    id: Stable identifier within this brew.\n    kind: The node's execution semantics.\n    metadata: Arbitrary key-value metadata for tooling."
        },
        {
          "name": "BrewNode.to_dict",
          "line": 476,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "BrewNode.from_dict",
          "line": 491,
          "signature": "def from_dict(data: dict[str, Any]) -> BrewNode",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized BrewNode."
        },
        {
          "name": "Brew",
          "line": 508,
          "signature": "class Brew()",
          "documentation": "A composable execution graph of typed nodes and typed edges.\n\nA ``Brew`` is a mutable, dynamic structure carrying symbolic references\nthat have not yet been validated against a live environment.\n\nANVIL Spec Reference: ANVIL Spec SS7.2 -- Workflows.\n\nArgs:\n    id: Unique identifier for this brew definition.\n    version: Semantic version of this brew definition.\n    nodes: The graph's nodes, keyed by stable node ID string.\n    edges: The graph's edges.\n    entry_nodes: Designated entry nodes.\n    exit_nodes: Designated exit nodes.\n    topology: Optional model topology for this brew."
        },
        {
          "name": "Brew.to_dict",
          "line": 534,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation with deterministic ordering."
        },
        {
          "name": "Brew.from_dict",
          "line": 559,
          "signature": "def from_dict(data: dict[str, Any]) -> Brew",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized Brew."
        },
        {
          "name": "Brew.to_json",
          "line": 581,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string.\n\nReturns:\n    JSON string."
        },
        {
          "name": "Brew.from_json",
          "line": 590,
          "signature": "def from_json(data: str) -> Brew",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON string.\n\nReturns:\n    The deserialized Brew."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/brew_builder.py",
      "sha256": "e3ec9469ced6efc5cb7548ef0674508c4afce052f0861672e9d144e6ae3ae464",
      "artifactSha256": "faca7329ac874c3d4c3ca7e3da818843067178e21ac2377ebd24c1b4ccf8b7cf",
      "url": "/reference/source/forge-py/src/forge/core/brew_builder.py.txt",
      "declarations": [
        {
          "name": "BrewBuilder",
          "line": 35,
          "signature": "class BrewBuilder()",
          "documentation": "Builder for constructing ``Brew`` instances with structural validation.\n\nThe builder accumulates nodes and edges, then validates the graph\nstructure at ``build()`` time.\n\nExample:\n    >>> from forge.core.brew import WebOperationNode\n    >>> builder = BrewBuilder(\"pipeline\", \"1.0.0\")\n    >>> builder.add_node(\"start\", WebOperationNode(operation=\"fetch\"))\n    <...>\n    >>> builder.set_entry(\"start\").set_exit(\"start\")\n    <...>\n    >>> brew = builder.build()\n    >>> len(brew.nodes)\n    1"
        },
        {
          "name": "BrewBuilder.__init__",
          "line": 53,
          "signature": "def __init__(self, brew_id: str, version: str) -> None",
          "documentation": "Create a new BrewBuilder.\n\nArgs:\n    brew_id: The brew identifier string.\n    version: The semantic version string."
        },
        {
          "name": "BrewBuilder.add_node",
          "line": 68,
          "signature": "def add_node(self, node_id: str, kind: BrewNodeKind) -> BrewBuilder",
          "documentation": "Add a node to the brew graph.\n\nIf a node with the same ID already exists, it is replaced.\n\nArgs:\n    node_id: The unique node identifier within this brew.\n    kind: The execution semantics of the node.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "BrewBuilder.add_edge",
          "line": 84,
          "signature": "def add_edge(self, from_id: str, to_id: str, edge_kind: BrewEdgeKind) -> BrewBuilder",
          "documentation": "Add a directed edge between two nodes.\n\nEdge validity is checked at build time, not at insertion time.\n\nArgs:\n    from_id: The source node identifier.\n    to_id: The target node identifier.\n    edge_kind: The edge semantics.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "BrewBuilder.set_entry",
          "line": 108,
          "signature": "def set_entry(self, node_id: str) -> BrewBuilder",
          "documentation": "Designate a node as an entry node.\n\nArgs:\n    node_id: The node identifier to designate as an entry.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "BrewBuilder.set_exit",
          "line": 120,
          "signature": "def set_exit(self, node_id: str) -> BrewBuilder",
          "documentation": "Designate a node as an exit node.\n\nArgs:\n    node_id: The node identifier to designate as an exit.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "BrewBuilder.with_topology",
          "line": 132,
          "signature": "def with_topology(self, topology: ModelTopology) -> BrewBuilder",
          "documentation": "Set the model topology for this brew.\n\nArgs:\n    topology: The model topology to associate with this brew.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "BrewBuilder.with_metadata",
          "line": 144,
          "signature": "def with_metadata(self, node_id: str, key: str, value: str) -> BrewBuilder",
          "documentation": "Add a metadata key-value pair to a specific node.\n\nIf the node does not exist, this method is a no-op.\n\nArgs:\n    node_id: The node to annotate.\n    key: The metadata key.\n    value: The metadata value.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "BrewBuilder.build",
          "line": 162,
          "signature": "def build(self) -> Brew",
          "documentation": "Build the brew, validating all structural invariants.\n\nReturns:\n    A validated Brew.\n\nRaises:\n    ForgeSchemaValidationError: If any invariant is violated."
        },
        {
          "name": "topological_sort",
          "line": 228,
          "signature": "def topological_sort(nodes: dict[str, BrewNode], edges: list[BrewEdge]) -> list[str]",
          "documentation": "Perform Kahn's algorithm for topological sort on the brew graph.\n\nOnly DataFlow and ControlFlow edges participate in cycle detection.\nErrorFlow edges are excluded because they may form intentional cycles.\n\nArgs:\n    nodes: The graph nodes keyed by ID string.\n    edges: The graph edges.\n\nReturns:\n    The sorted node IDs.\n\nRaises:\n    ForgeSchemaValidationError: If the graph contains a cycle."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/brew_resolver.py",
      "sha256": "87c16b6a6537a646d2c11b131dbe881b14b104bb07ef10f8a9f2e8345b38dc62",
      "artifactSha256": "217e2f1d8956707c5fd42b6a24e09016e6d8af492abf67e368ea5f2f23729cb8",
      "url": "/reference/source/forge-py/src/forge/core/brew_resolver.py.txt",
      "declarations": [
        {
          "name": "BrewResolutionErrorKind",
          "line": 44,
          "signature": "class BrewResolutionErrorKind(Enum)",
          "documentation": "The kind of resolution error encountered for a specific node."
        },
        {
          "name": "BrewResolutionError",
          "line": 55,
          "signature": "class BrewResolutionError()",
          "documentation": "A resolution error for a specific node in the brew graph.\n\nArgs:\n    node_id: The node that failed resolution.\n    error_kind: What went wrong."
        },
        {
          "name": "BrewResolutionError.to_dict",
          "line": 69,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "BrewEnvironment",
          "line": 82,
          "signature": "class BrewEnvironment()",
          "documentation": "The runtime environment against which a brew is resolved.\n\nArgs:\n    providers: Registered model providers, keyed by ``namespace:model``.\n    tools: Registered tool names available in this environment.\n    mcp_servers: Connected MCP server identifiers.\n    web_capabilities: Web capabilities available in this environment."
        },
        {
          "name": "BrewEnvironment.to_dict",
          "line": 97,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "BrewEnvironment.compute_hash",
          "line": 110,
          "signature": "def compute_hash(self) -> str",
          "documentation": "Compute a deterministic hash of this environment.\n\nReturns:\n    A hex-encoded SHA-256 hash string."
        },
        {
          "name": "ResolvedBrewPlan",
          "line": 121,
          "signature": "class ResolvedBrewPlan()",
          "documentation": "A frozen, validated execution plan produced by resolving a Brew.\n\nArgs:\n    plan_id: Deterministic identifier for this plan.\n    brew_id: The source brew's identifier.\n    brew_version: The source brew's version.\n    execution_order: Topologically sorted node IDs.\n    edges: The validated edges.\n    entry_nodes: Designated entry node IDs.\n    exit_nodes: Designated exit node IDs.\n    environment_hash: Hash of the environment used for resolution.\n    resolved_at: ISO 8601 timestamp of resolution."
        },
        {
          "name": "ResolvedBrewPlan.to_dict",
          "line": 146,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "BrewResolutionFailed",
          "line": 165,
          "signature": "class BrewResolutionFailed(Exception)",
          "documentation": "Raised when brew resolution fails with one or more errors.\n\nArgs:\n    errors: The list of resolution errors."
        },
        {
          "name": "BrewResolutionFailed.__init__",
          "line": 172,
          "signature": "def __init__(self, errors: list[BrewResolutionError]) -> None",
          "documentation": ""
        },
        {
          "name": "resolve",
          "line": 181,
          "signature": "def resolve(brew: Brew, env: BrewEnvironment) -> ResolvedBrewPlan",
          "documentation": "Resolve a Brew against a runtime environment.\n\nValidates every symbolic reference in the brew against the environment\nand collects all errors before returning.\n\nArgs:\n    brew: The dynamic brew to resolve.\n    env: The runtime environment.\n\nReturns:\n    A frozen ResolvedBrewPlan.\n\nRaises:\n    BrewResolutionFailed: If any node references cannot be resolved."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/config.py",
      "sha256": "f635578ffed23e7673dac184ad116436c88515e7b355bf679de11e2ee0958dbd",
      "artifactSha256": "dba648c69b689516bd966f5dbb739cedde4bda3e861917171b59ae5667097b73",
      "url": "/reference/source/forge-py/src/forge/core/config.py.txt",
      "declarations": [
        {
          "name": "GenerateOptions",
          "line": 20,
          "signature": "class GenerateOptions()",
          "documentation": "Options for text generation calls.\n\nControls model behavior during inference. All fields are optional;\nproviders use sensible defaults when not specified.\n\nANVIL Spec section 6.1: The cognitive interface accepts inference options.\n\nExample:\n    >>> opts = GenerateOptions()\n    >>> opts = opts.with_temperature(0.7).with_max_tokens(1024)\n    >>> opts.temperature\n    0.7\n    >>> opts.max_tokens\n    1024"
        },
        {
          "name": "GenerateOptions.with_temperature",
          "line": 46,
          "signature": "def with_temperature(self, temperature: float) -> GenerateOptions",
          "documentation": "Set the temperature.\n\nArgs:\n    temperature: Sampling temperature (0.0 = deterministic, 2.0 = max randomness).\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.with_max_tokens",
          "line": 58,
          "signature": "def with_max_tokens(self, max_tokens: int) -> GenerateOptions",
          "documentation": "Set the maximum tokens.\n\nArgs:\n    max_tokens: Maximum tokens to generate.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.with_top_p",
          "line": 70,
          "signature": "def with_top_p(self, top_p: float) -> GenerateOptions",
          "documentation": "Set the top-p value.\n\nArgs:\n    top_p: Top-p (nucleus) sampling threshold.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.with_stop_sequences",
          "line": 82,
          "signature": "def with_stop_sequences(self, sequences: list[str]) -> GenerateOptions",
          "documentation": "Set the stop sequences.\n\nArgs:\n    sequences: List of stop sequences.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.with_frequency_penalty",
          "line": 94,
          "signature": "def with_frequency_penalty(self, penalty: float) -> GenerateOptions",
          "documentation": "Set the frequency penalty.\n\nArgs:\n    penalty: Frequency penalty (-2.0 to 2.0).\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.with_presence_penalty",
          "line": 106,
          "signature": "def with_presence_penalty(self, penalty: float) -> GenerateOptions",
          "documentation": "Set the presence penalty.\n\nArgs:\n    penalty: Presence penalty (-2.0 to 2.0).\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.with_seed",
          "line": 118,
          "signature": "def with_seed(self, seed: int) -> GenerateOptions",
          "documentation": "Set the seed for deterministic generation.\n\nArgs:\n    seed: Random seed value.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.with_output_schema",
          "line": 130,
          "signature": "def with_output_schema(self, schema: JsonSchema) -> GenerateOptions",
          "documentation": "Set the output schema for structured generation.\n\nArgs:\n    schema: JSON Schema for structured output.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "GenerateOptions.to_dict",
          "line": 142,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary, omitting None values.\n\nReturns:\n    Dictionary representation with only set fields."
        },
        {
          "name": "GenerateOptions.from_dict",
          "line": 168,
          "signature": "def from_dict(data: dict[str, Any]) -> GenerateOptions",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized GenerateOptions."
        },
        {
          "name": "GenerateOptions.to_json",
          "line": 189,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string."
        },
        {
          "name": "GenerateOptions.from_json",
          "line": 194,
          "signature": "def from_json(data: str) -> GenerateOptions",
          "documentation": "Deserialize from JSON string."
        },
        {
          "name": "EmbedOptions",
          "line": 200,
          "signature": "class EmbedOptions()",
          "documentation": "Options for embedding calls.\n\nExample:\n    >>> opts = EmbedOptions()\n    >>> opts.model is None\n    True"
        },
        {
          "name": "EmbedOptions.with_model",
          "line": 212,
          "signature": "def with_model(self, model: str) -> EmbedOptions",
          "documentation": "Set the embedding model.\n\nArgs:\n    model: Model identifier.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "EmbedOptions.with_dimensions",
          "line": 224,
          "signature": "def with_dimensions(self, dimensions: int) -> EmbedOptions",
          "documentation": "Set the embedding dimensions.\n\nArgs:\n    dimensions: Number of dimensions.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "EmbedOptions.to_dict",
          "line": 236,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary, omitting None values.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "EmbedOptions.from_dict",
          "line": 250,
          "signature": "def from_dict(data: dict[str, Any]) -> EmbedOptions",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized EmbedOptions."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/error.py",
      "sha256": "1463e316f7c6090f85b1bfd041dbae575fb0f38e1d34ca5b55ceced41e6f7364",
      "artifactSha256": "3b8fda5af128f45493c8e294b412e2b336095e97ffa45eb2a8c03afd4ea5d2b4",
      "url": "/reference/source/forge-py/src/forge/core/error.py.txt",
      "declarations": [
        {
          "name": "ForgeError",
          "line": 16,
          "signature": "class ForgeError(Exception)",
          "documentation": "Base exception for all Forge SDK errors.\n\nEvery subclass includes actionable context: what failed, why, and what the\ndeveloper should check. No generic \"something went wrong\" messages."
        },
        {
          "name": "ForgeProviderNotFoundError",
          "line": 24,
          "signature": "class ForgeProviderNotFoundError(ForgeError)",
          "documentation": "A provider was not found in the registry.\n\nArgs:\n    provider_ref: The provider reference that was looked up (e.g., \"openai:gpt-4o\").\n\nExample:\n    >>> raise ForgeProviderNotFoundError(\"openai:gpt-4o\")\n    Traceback (most recent call last):\n        ...\n    forge.core.error.ForgeProviderNotFoundError: ...register..."
        },
        {
          "name": "ForgeProviderNotFoundError.__init__",
          "line": 37,
          "signature": "def __init__(self, provider_ref: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeInvalidProviderRefError",
          "line": 45,
          "signature": "class ForgeInvalidProviderRefError(ForgeError)",
          "documentation": "A provider reference string is malformed.\n\nArgs:\n    input_str: The malformed input string."
        },
        {
          "name": "ForgeInvalidProviderRefError.__init__",
          "line": 52,
          "signature": "def __init__(self, input_str: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeSchemaValidationError",
          "line": 60,
          "signature": "class ForgeSchemaValidationError(ForgeError)",
          "documentation": "JSON schema validation failed.\n\nArgs:\n    path: JSON pointer path to the failing field.\n    reason: Human-readable description of what was expected."
        },
        {
          "name": "ForgeSchemaValidationError.__init__",
          "line": 68,
          "signature": "def __init__(self, path: str, reason: str) -> None",
          "documentation": ""
        },
        {
          "name": "InvalidLifecycleTransitionError",
          "line": 74,
          "signature": "class InvalidLifecycleTransitionError(ForgeError)",
          "documentation": "An invalid lifecycle state transition was attempted.\n\nSee ANVIL Spec section 13.2 -- Lifecycle State Machine for valid transitions.\n\nArgs:\n    from_state: The current state name.\n    to_state: The attempted target state name.\n    reason: Why this transition is invalid."
        },
        {
          "name": "InvalidLifecycleTransitionError.__init__",
          "line": 85,
          "signature": "def __init__(self, from_state: str, to_state: str, reason: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeToolInvocationDeniedError",
          "line": 95,
          "signature": "class ForgeToolInvocationDeniedError(ForgeError)",
          "documentation": "A tool invocation was denied due to insufficient capabilities.\n\nArgs:\n    tool_name: The tool that was being invoked.\n    agent_did: The agent's DID.\n    required_capability: The capability that was required but missing.\n    act_id: The ACT that was checked."
        },
        {
          "name": "ForgeToolInvocationDeniedError.__init__",
          "line": 105,
          "signature": "def __init__(self, tool_name: str, agent_did: str, required_capability: str, act_id: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeToolExecutionError",
          "line": 122,
          "signature": "class ForgeToolExecutionError(ForgeError)",
          "documentation": "A tool execution failed.\n\nArgs:\n    tool_name: The tool that failed.\n    reason: What went wrong."
        },
        {
          "name": "ForgeToolExecutionError.__init__",
          "line": 130,
          "signature": "def __init__(self, tool_name: str, reason: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeJsonError",
          "line": 136,
          "signature": "class ForgeJsonError(ForgeError)",
          "documentation": "JSON serialization or deserialization failed.\n\nArgs:\n    message: The JSON error message."
        },
        {
          "name": "ForgeJsonError.__init__",
          "line": 143,
          "signature": "def __init__(self, message: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeMissingConfigError",
          "line": 148,
          "signature": "class ForgeMissingConfigError(ForgeError)",
          "documentation": "A required configuration value is missing.\n\nArgs:\n    field: The configuration field name.\n    hint: A hint about where to set this value."
        },
        {
          "name": "ForgeMissingConfigError.__init__",
          "line": 156,
          "signature": "def __init__(self, field: str, hint: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeStopConditionError",
          "line": 162,
          "signature": "class ForgeStopConditionError(ForgeError)",
          "documentation": "The stop condition limit was reached.\n\nArgs:\n    reason: Why generation was stopped.\n    steps: Number of steps completed.\n    tokens: Total tokens consumed."
        },
        {
          "name": "ForgeStopConditionError.__init__",
          "line": 171,
          "signature": "def __init__(self, reason: str, steps: int, tokens: int) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeTelemetryError",
          "line": 180,
          "signature": "class ForgeTelemetryError(ForgeError)",
          "documentation": "A telemetry emission failed. Non-fatal but logged.\n\nArgs:\n    reason: What went wrong with telemetry."
        },
        {
          "name": "ForgeTelemetryError.__init__",
          "line": 187,
          "signature": "def __init__(self, reason: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeUnsupportedOperationError",
          "line": 192,
          "signature": "class ForgeUnsupportedOperationError(ForgeError)",
          "documentation": "The model does not support the requested operation.\n\nArgs:\n    model: The model identifier.\n    operation: The operation that was requested."
        },
        {
          "name": "ForgeUnsupportedOperationError.__init__",
          "line": 200,
          "signature": "def __init__(self, model: str, operation: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeProviderUnavailableError",
          "line": 206,
          "signature": "class ForgeProviderUnavailableError(ForgeError)",
          "documentation": "The provider exists but is not currently available."
        },
        {
          "name": "ForgeProviderUnavailableError.__init__",
          "line": 209,
          "signature": "def __init__(self, provider_ref: str, reason: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeProviderAuthenticationFailedError",
          "line": 215,
          "signature": "class ForgeProviderAuthenticationFailedError(ForgeError)",
          "documentation": "Provider authentication failed."
        },
        {
          "name": "ForgeProviderAuthenticationFailedError.__init__",
          "line": 218,
          "signature": "def __init__(self, provider_ref: str, reason: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeCapabilityUnsupportedError",
          "line": 224,
          "signature": "class ForgeCapabilityUnsupportedError(ForgeError)",
          "documentation": "The provider does not support a required runtime capability."
        },
        {
          "name": "ForgeCapabilityUnsupportedError.__init__",
          "line": 227,
          "signature": "def __init__(self, provider_ref: str, capability: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeProviderNegotiationFailedError",
          "line": 235,
          "signature": "class ForgeProviderNegotiationFailedError(ForgeError)",
          "documentation": "Provider runtime negotiation failed."
        },
        {
          "name": "ForgeProviderNegotiationFailedError.__init__",
          "line": 238,
          "signature": "def __init__(self, provider_ref: str, reason: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeProviderSessionExpiredError",
          "line": 244,
          "signature": "class ForgeProviderSessionExpiredError(ForgeError)",
          "documentation": "The provider session expired before the requested action completed."
        },
        {
          "name": "ForgeProviderSessionExpiredError.__init__",
          "line": 247,
          "signature": "def __init__(self, provider_ref: str, session_id: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeProviderInterruptUnsupportedError",
          "line": 255,
          "signature": "class ForgeProviderInterruptUnsupportedError(ForgeError)",
          "documentation": "The provider does not support session interrupts."
        },
        {
          "name": "ForgeProviderInterruptUnsupportedError.__init__",
          "line": 258,
          "signature": "def __init__(self, provider_ref: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeProviderResumeUnsupportedError",
          "line": 263,
          "signature": "class ForgeProviderResumeUnsupportedError(ForgeError)",
          "documentation": "The provider does not support resuming sessions."
        },
        {
          "name": "ForgeProviderResumeUnsupportedError.__init__",
          "line": 266,
          "signature": "def __init__(self, provider_ref: str) -> None",
          "documentation": ""
        },
        {
          "name": "ForgeInternalError",
          "line": 271,
          "signature": "class ForgeInternalError(ForgeError)",
          "documentation": "An internal error that should not occur in normal operation.\n\nArgs:\n    message: Description of the internal error."
        },
        {
          "name": "ForgeInternalError.__init__",
          "line": 278,
          "signature": "def __init__(self, message: str) -> None",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/message.py",
      "sha256": "03402bf69ba4770958bd6c70169b00e8b4ed5b9b7db0cc5f2ff38cdc8224351e",
      "artifactSha256": "c0939b4f22466c3c766be02f26c7673ff33146ab46ef7dd96388bc82892fbf42",
      "url": "/reference/source/forge-py/src/forge/core/message.py.txt",
      "declarations": [
        {
          "name": "Role",
          "line": 18,
          "signature": "class Role(Enum)",
          "documentation": "The role of a message participant.\n\nANVIL Spec section 6.1: Four roles are defined: System (runtime instructions),\nUser (human input), Assistant (model output), and Tool (tool execution results).\n\nExample:\n    >>> Role.SYSTEM.value\n    'system'\n    >>> Role.ASSISTANT.value\n    'assistant'"
        },
        {
          "name": "Role.as_str",
          "line": 36,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the role as a lowercase string.\n\nReturns:\n    The lowercase role string."
        },
        {
          "name": "TextPart",
          "line": 50,
          "signature": "class TextPart()",
          "documentation": "Plain text content part.\n\nArgs:\n    text: The text content."
        },
        {
          "name": "ImagePart",
          "line": 62,
          "signature": "class ImagePart()",
          "documentation": "An image part (base64 or URL).\n\nArgs:\n    data: Base64-encoded image data, or a URL.\n    media_type: MIME type (e.g., \"image/png\")."
        },
        {
          "name": "ToolCallPart",
          "line": 76,
          "signature": "class ToolCallPart()",
          "documentation": "A tool call request from the model.\n\nArgs:\n    id: Unique identifier for this tool call.\n    name: The tool name.\n    arguments: JSON arguments for the tool."
        },
        {
          "name": "ToolResultPart",
          "line": 92,
          "signature": "class ToolResultPart()",
          "documentation": "A result from a tool execution.\n\nArgs:\n    tool_call_id: The tool call ID this result corresponds to.\n    name: The tool name.\n    content: The result content (typically stringified).\n    is_error: Whether the tool execution resulted in an error."
        },
        {
          "name": "ModelMessage",
          "line": 176,
          "signature": "class ModelMessage()",
          "documentation": "A message in a conversation, consisting of a role and content parts.\n\nANVIL Spec section 6.1: Messages carry the conversation history for inference.\n\nExample:\n    >>> msg = ModelMessage.text(Role.USER, \"What is 2+2?\")\n    >>> msg.role\n    <Role.USER: 'user'>\n    >>> len(msg.parts)\n    1"
        },
        {
          "name": "ModelMessage.new",
          "line": 193,
          "signature": "def new(role: Role, parts: list[MessagePart]) -> ModelMessage",
          "documentation": "Create a new message with the given role and content parts.\n\nArgs:\n    role: The message participant role.\n    parts: One or more content parts.\n\nReturns:\n    A new ModelMessage."
        },
        {
          "name": "ModelMessage.text",
          "line": 206,
          "signature": "def text(role: Role, text: str) -> ModelMessage",
          "documentation": "Create a simple text message.\n\nArgs:\n    role: The message participant role.\n    text: The text content.\n\nReturns:\n    A ModelMessage with a single TextPart.\n\nExample:\n    >>> msg = ModelMessage.text(Role.SYSTEM, \"You are a helpful assistant.\")\n    >>> msg.text_content()\n    'You are a helpful assistant.'"
        },
        {
          "name": "ModelMessage.tool_calls",
          "line": 223,
          "signature": "def tool_calls(self) -> list[ToolCallPart]",
          "documentation": "Extract all tool calls from this message.\n\nReturns:\n    List of ToolCallPart instances found in this message."
        },
        {
          "name": "ModelMessage.text_content",
          "line": 231,
          "signature": "def text_content(self) -> str",
          "documentation": "Return the concatenated text content of all text parts.\n\nReturns:\n    Concatenated text from all TextPart instances."
        },
        {
          "name": "ModelMessage.to_dict",
          "line": 239,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation suitable for JSON serialization."
        },
        {
          "name": "ModelMessage.from_dict",
          "line": 251,
          "signature": "def from_dict(data: dict[str, Any]) -> ModelMessage",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary with 'role' and 'parts' keys.\n\nReturns:\n    The deserialized ModelMessage."
        },
        {
          "name": "ModelMessage.to_json",
          "line": 264,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string.\n\nReturns:\n    JSON string representation."
        },
        {
          "name": "ModelMessage.from_json",
          "line": 273,
          "signature": "def from_json(data: str) -> ModelMessage",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON string.\n\nReturns:\n    The deserialized ModelMessage."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/model.py",
      "sha256": "918fcb914f00f4611621c2345adcf4969359f4af91c0a450c2c81b8e183aa606",
      "artifactSha256": "f2f73cd5c15c825c4caa8e176d2a7cfe3f4d0933648ada4ef9f1d4348555ffef",
      "url": "/reference/source/forge-py/src/forge/core/model.py.txt",
      "declarations": [
        {
          "name": "LanguageModel",
          "line": 23,
          "signature": "class LanguageModel(ABC)",
          "documentation": "The core language model interface.\n\nEvery LLM provider implements this abstract class. The interface is\nintentionally minimal: ``generate`` for buffered inference and ``stream``\nfor streaming.\n\nANVIL Spec section 6.1:\n    - ``infer()`` maps to ``generate``\n    - ``infer_stream()`` maps to ``stream``\n    - ``model_info()`` maps to ``model_id``, ``supports_*``\n\nExample:\n    Implement a custom provider::\n\n        class MyModel(LanguageModel):\n            @property\n            def model_id(self) -> str:\n                return \"my-model-v1\"\n\n            @property\n            def provider(self) -> str:\n                return \"custom\"\n\n            async def generate(self, messages, tools, options):\n                ...\n\n            async def stream(self, messages, tools, options):\n                ..."
        },
        {
          "name": "LanguageModel.model_id",
          "line": 56,
          "signature": "def model_id(self) -> str",
          "documentation": "Return the model identifier (e.g., \"gpt-4o\", \"claude-sonnet-4-5-20250929\").\n\nReturns:\n    The model identifier string."
        },
        {
          "name": "LanguageModel.provider",
          "line": 65,
          "signature": "def provider(self) -> str",
          "documentation": "Return the provider namespace (e.g., \"openai\", \"anthropic\").\n\nReturns:\n    The provider namespace string."
        },
        {
          "name": "LanguageModel.generate",
          "line": 73,
          "signature": "async def generate(self, messages: list[object], tools: list[ToolDefinition], options: GenerateOptions) -> GenerateResult",
          "documentation": "Generate a complete response from the model.\n\nArgs:\n    messages: The conversation history (list of ModelMessage).\n    tools: Available tool definitions for this inference call.\n    options: Generation options (temperature, max_tokens, etc.).\n\nReturns:\n    A GenerateResult containing the model's response, usage statistics,\n    and finish reason.\n\nRaises:\n    ForgeError: If the provider call fails, times out, or returns\n        an invalid response."
        },
        {
          "name": "LanguageModel.stream",
          "line": 96,
          "signature": "async def stream(self, messages: list[object], tools: list[ToolDefinition], options: GenerateOptions) -> AsyncGenerator[StreamChunk, None]",
          "documentation": "Stream a response from the model as chunks.\n\nArgs:\n    messages: The conversation history (list of ModelMessage).\n    tools: Available tool definitions for this inference call.\n    options: Generation options.\n\nYields:\n    StreamChunk instances representing the streamed response.\n\nRaises:\n    ForgeError: If the provider call fails."
        },
        {
          "name": "LanguageModel.supports_tool_calling",
          "line": 120,
          "signature": "def supports_tool_calling(self) -> bool",
          "documentation": "Return True if this model supports tool calling.\n\nReturns:\n    True by default."
        },
        {
          "name": "LanguageModel.supports_structured_output",
          "line": 129,
          "signature": "def supports_structured_output(self) -> bool",
          "documentation": "Return True if this model supports structured output (JSON mode).\n\nReturns:\n    True by default."
        },
        {
          "name": "LanguageModel.supports_image_input",
          "line": 138,
          "signature": "def supports_image_input(self) -> bool",
          "documentation": "Return True if this model supports image input.\n\nReturns:\n    False by default."
        },
        {
          "name": "LanguageModel.supports_streaming",
          "line": 147,
          "signature": "def supports_streaming(self) -> bool",
          "documentation": "Return True if this model supports streaming.\n\nReturns:\n    True by default."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/output.py",
      "sha256": "e989eae23d455fc1de5cc331ba256be4ac4b62ca639ec97d541f42e5da0e861f",
      "artifactSha256": "43f95697bc405edf5da1199cb5d5084add4a424c4330bad1936e95eab1fb491e",
      "url": "/reference/source/forge-py/src/forge/core/output.py.txt",
      "declarations": [
        {
          "name": "FinishReason",
          "line": 17,
          "signature": "class FinishReason(Enum)",
          "documentation": "The reason generation stopped.\n\nExample:\n    >>> FinishReason.STOP.is_complete()\n    True\n    >>> FinishReason.TOOL_CALLS.is_tool_call()\n    True"
        },
        {
          "name": "FinishReason.is_complete",
          "line": 34,
          "signature": "def is_complete(self) -> bool",
          "documentation": "Return True if generation completed normally (Stop or StopSequence).\n\nReturns:\n    True if this is a normal completion."
        },
        {
          "name": "FinishReason.is_tool_call",
          "line": 42,
          "signature": "def is_tool_call(self) -> bool",
          "documentation": "Return True if the model wants to call tools.\n\nReturns:\n    True if this is a tool call finish reason."
        },
        {
          "name": "Usage",
          "line": 56,
          "signature": "class Usage()",
          "documentation": "Token usage statistics from an inference call.\n\nArgs:\n    prompt_tokens: Tokens consumed by the input prompt.\n    completion_tokens: Tokens generated in the response.\n    total_tokens: Total tokens (prompt + completion)."
        },
        {
          "name": "Usage.zero",
          "line": 70,
          "signature": "def zero() -> Usage",
          "documentation": "Create a zero-usage instance.\n\nReturns:\n    Usage with all counters at zero."
        },
        {
          "name": "Usage.add",
          "line": 78,
          "signature": "def add(self, other: Usage) -> Usage",
          "documentation": "Add two usage statistics together.\n\nArgs:\n    other: The other Usage to add.\n\nReturns:\n    A new Usage with summed counters."
        },
        {
          "name": "Usage.to_dict",
          "line": 93,
          "signature": "def to_dict(self) -> dict[str, int]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "Usage.from_dict",
          "line": 106,
          "signature": "def from_dict(data: dict[str, Any]) -> Usage",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized Usage."
        },
        {
          "name": "Usage.to_json",
          "line": 121,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string."
        },
        {
          "name": "Usage.from_json",
          "line": 126,
          "signature": "def from_json(data: str) -> Usage",
          "documentation": "Deserialize from JSON string."
        },
        {
          "name": "GenerateResult",
          "line": 132,
          "signature": "class GenerateResult()",
          "documentation": "The result of a text generation call.\n\nContains the model's response message, the reason generation stopped,\nand token usage statistics.\n\nArgs:\n    message: The model's response message.\n    finish_reason: Why generation stopped.\n    usage: Token usage statistics."
        },
        {
          "name": "GenerateResult.text",
          "line": 148,
          "signature": "def text(self) -> str",
          "documentation": "Return the text content of the response message.\n\nReturns:\n    Concatenated text from all text parts."
        },
        {
          "name": "GenerateResult.has_tool_calls",
          "line": 156,
          "signature": "def has_tool_calls(self) -> bool",
          "documentation": "Return True if the response contains tool calls.\n\nReturns:\n    True if any parts are tool calls."
        },
        {
          "name": "GenerateResult.to_dict",
          "line": 164,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "GenerateResult.from_dict",
          "line": 177,
          "signature": "def from_dict(data: dict[str, Any]) -> GenerateResult",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized GenerateResult."
        },
        {
          "name": "GenerateResult.to_json",
          "line": 192,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string."
        },
        {
          "name": "GenerateResult.from_json",
          "line": 197,
          "signature": "def from_json(data: str) -> GenerateResult",
          "documentation": "Deserialize from JSON string."
        },
        {
          "name": "TextDelta",
          "line": 206,
          "signature": "class TextDelta()",
          "documentation": "A text content delta in a streaming response.\n\nArgs:\n    text: The text fragment."
        },
        {
          "name": "TextDelta.as_text",
          "line": 216,
          "signature": "def as_text(self) -> str | None",
          "documentation": "Extract the text content.\n\nReturns:\n    The text string."
        },
        {
          "name": "ToolCallDelta",
          "line": 226,
          "signature": "class ToolCallDelta()",
          "documentation": "A tool call delta (streaming tool arguments).\n\nArgs:\n    index: The tool call index (for parallel tool calls).\n    id: The tool call ID (may be empty until fully received).\n    name: The tool name (may be empty until fully received).\n    arguments_delta: Partial JSON arguments."
        },
        {
          "name": "ToolCallDelta.as_text",
          "line": 242,
          "signature": "def as_text(self) -> str | None",
          "documentation": "Extract text content (not applicable for tool deltas).\n\nReturns:\n    None."
        },
        {
          "name": "StreamDone",
          "line": 252,
          "signature": "class StreamDone()",
          "documentation": "The stream has finished.\n\nArgs:\n    finish_reason: Why generation stopped.\n    usage: Final usage statistics."
        },
        {
          "name": "StreamDone.as_text",
          "line": 264,
          "signature": "def as_text(self) -> str | None",
          "documentation": "Extract text content (not applicable for done chunks).\n\nReturns:\n    None."
        },
        {
          "name": "stream_chunk_text_delta",
          "line": 276,
          "signature": "def stream_chunk_text_delta(text: str) -> TextDelta",
          "documentation": "Create a text delta chunk.\n\nArgs:\n    text: The text fragment.\n\nReturns:\n    A TextDelta stream chunk."
        },
        {
          "name": "stream_chunk_done",
          "line": 288,
          "signature": "def stream_chunk_done(finish_reason: FinishReason, usage: Usage) -> StreamDone",
          "documentation": "Create a done chunk.\n\nArgs:\n    finish_reason: Why generation stopped.\n    usage: Final usage statistics.\n\nReturns:\n    A StreamDone chunk."
        },
        {
          "name": "is_text_delta",
          "line": 301,
          "signature": "def is_text_delta(chunk: StreamChunk) -> bool",
          "documentation": "Return True if the chunk is a text delta.\n\nArgs:\n    chunk: The stream chunk to check.\n\nReturns:\n    True if it is a TextDelta."
        },
        {
          "name": "is_done",
          "line": 313,
          "signature": "def is_done(chunk: StreamChunk) -> bool",
          "documentation": "Return True if the chunk is a done marker.\n\nArgs:\n    chunk: The stream chunk to check.\n\nReturns:\n    True if it is a StreamDone."
        },
        {
          "name": "stream_chunk_to_dict",
          "line": 325,
          "signature": "def stream_chunk_to_dict(chunk: StreamChunk) -> dict[str, Any]",
          "documentation": "Serialize a StreamChunk to a dictionary.\n\nArgs:\n    chunk: The chunk to serialize.\n\nReturns:\n    Dictionary with type discriminator."
        },
        {
          "name": "stream_chunk_from_dict",
          "line": 354,
          "signature": "def stream_chunk_from_dict(data: dict[str, Any]) -> StreamChunk",
          "documentation": "Deserialize a StreamChunk from a dictionary.\n\nArgs:\n    data: Dictionary with type discriminator.\n\nReturns:\n    The deserialized StreamChunk.\n\nRaises:\n    ValueError: If the type is unknown."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/provider.py",
      "sha256": "79890e8e26703deeba873014554c6b35743bc4c254851ae66b654e04b1014279",
      "artifactSha256": "40b01ddb60fc687d4e9a259cc48c654499dc41bc98d57a9e351c5182a1bd1f32",
      "url": "/reference/source/forge-py/src/forge/core/provider.py.txt",
      "declarations": [
        {
          "name": "ProviderRef",
          "line": 47,
          "signature": "class ProviderRef()",
          "documentation": "A parsed provider reference in ``namespace:model`` format.\n\nArgs:\n    namespace: The provider namespace (e.g., \"openai\").\n    model: The model name (e.g., \"gpt-4o\").\n    full: The full reference string.\n\nExample:\n    >>> ref = ProviderRef.parse(\"openai:gpt-4o\")\n    >>> ref.namespace\n    'openai'\n    >>> ref.model\n    'gpt-4o'\n    >>> ref.as_str()\n    'openai:gpt-4o'"
        },
        {
          "name": "ProviderRef.parse",
          "line": 70,
          "signature": "def parse(input_str: str) -> ProviderRef",
          "documentation": "Parse a provider reference string.\n\nArgs:\n    input_str: A string in ``namespace:model`` format.\n\nReturns:\n    The parsed ProviderRef.\n\nRaises:\n    ForgeInvalidProviderRefError: If the input does not contain exactly\n        one colon separator, or if either part is empty.\n\nExample:\n    >>> ProviderRef.parse(\"anthropic:claude-sonnet-4-5-20250929\").namespace\n    'anthropic'"
        },
        {
          "name": "ProviderRef.as_str",
          "line": 92,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the full reference string (e.g., \"openai:gpt-4o\").\n\nReturns:\n    The full provider reference string."
        },
        {
          "name": "ProviderRef.to_json",
          "line": 100,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON.\n\nReturns:\n    JSON string."
        },
        {
          "name": "ProviderRef.from_json",
          "line": 113,
          "signature": "def from_json(data: str) -> ProviderRef",
          "documentation": "Deserialize from JSON.\n\nArgs:\n    data: JSON string.\n\nReturns:\n    The deserialized ProviderRef."
        },
        {
          "name": "ProviderMetadata",
          "line": 131,
          "signature": "class ProviderMetadata()",
          "documentation": "Metadata about a registered provider.\n\nArgs:\n    name: Human-readable name.\n    namespace: Provider namespace (e.g., \"openai\").\n    supports_tool_calling: Whether the provider supports tool calling.\n    supports_structured_output: Whether the provider supports structured output.\n    supports_streaming: Whether the provider supports streaming.\n    supports_image_input: Whether the provider supports image input."
        },
        {
          "name": "ProviderMetadata.to_dict",
          "line": 153,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "RuntimeCapability",
          "line": 170,
          "signature": "class RuntimeCapability(str, Enum)",
          "documentation": "Advanced provider runtime capabilities beyond the mandatory baseline."
        },
        {
          "name": "RuntimeCapability.ordinal",
          "line": 185,
          "signature": "def ordinal(self) -> int",
          "documentation": ""
        },
        {
          "name": "ProviderRuntimeCapabilities",
          "line": 190,
          "signature": "class ProviderRuntimeCapabilities()",
          "documentation": "Runtime capability descriptor for a provider."
        },
        {
          "name": "ProviderRuntimeCapabilities.baseline",
          "line": 197,
          "signature": "def baseline() -> ProviderRuntimeCapabilities",
          "documentation": ""
        },
        {
          "name": "ProviderRuntimeCapabilities.with_capability",
          "line": 200,
          "signature": "def with_capability(self, capability: RuntimeCapability) -> ProviderRuntimeCapabilities",
          "documentation": ""
        },
        {
          "name": "ProviderRuntimeCapabilities.supports",
          "line": 211,
          "signature": "def supports(self, capability: RuntimeCapability) -> bool",
          "documentation": ""
        },
        {
          "name": "ProviderRuntimeCapabilities.to_dict",
          "line": 214,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": ""
        },
        {
          "name": "ProviderNegotiationRequest",
          "line": 222,
          "signature": "class ProviderNegotiationRequest()",
          "documentation": ""
        },
        {
          "name": "ProviderNegotiationResult",
          "line": 229,
          "signature": "class ProviderNegotiationResult()",
          "documentation": ""
        },
        {
          "name": "ProviderSessionState",
          "line": 235,
          "signature": "class ProviderSessionState(str, Enum)",
          "documentation": ""
        },
        {
          "name": "ProviderUsageSummary",
          "line": 248,
          "signature": "class ProviderUsageSummary()",
          "documentation": ""
        },
        {
          "name": "ProviderSessionEvent",
          "line": 255,
          "signature": "class ProviderSessionEvent()",
          "documentation": ""
        },
        {
          "name": "ProviderRegistry",
          "line": 262,
          "signature": "class ProviderRegistry()",
          "documentation": "Registry of language model providers.\n\nMaps ``ProviderRef`` strings to concrete ``LanguageModel`` implementations.\nAgents look up models through this registry rather than constructing\nprovider instances directly.\n\nANVIL Spec section 6.2: Provider Abstraction.\n\nExample:\n    >>> registry = ProviderRegistry()\n    >>> registry.is_empty()\n    True\n    >>> registry.get(\"openai:gpt-4o\") is None\n    True"
        },
        {
          "name": "ProviderRegistry.__init__",
          "line": 279,
          "signature": "def __init__(self) -> None",
          "documentation": ""
        },
        {
          "name": "ProviderRegistry.register",
          "line": 283,
          "signature": "def register(self, provider_ref: str, model: LanguageModel) -> None",
          "documentation": "Register a language model with its provider reference.\n\nArgs:\n    provider_ref: The ``namespace:model`` reference string.\n    model: The LanguageModel implementation.\n\nRaises:\n    ForgeInvalidProviderRefError: If the reference is malformed."
        },
        {
          "name": "ProviderRegistry.register_with_runtime",
          "line": 297,
          "signature": "def register_with_runtime(self, provider_ref: str, model: LanguageModel, runtime_capabilities: ProviderRuntimeCapabilities) -> None",
          "documentation": ""
        },
        {
          "name": "ProviderRegistry.get",
          "line": 316,
          "signature": "def get(self, provider_ref: str) -> LanguageModel | None",
          "documentation": "Retrieve a registered language model.\n\nArgs:\n    provider_ref: The ``namespace:model`` reference string.\n\nReturns:\n    The registered model, or None if not found."
        },
        {
          "name": "ProviderRegistry.require",
          "line": 327,
          "signature": "def require(self, provider_ref: str) -> LanguageModel",
          "documentation": "Retrieve a registered language model, raising an error if not found.\n\nArgs:\n    provider_ref: The ``namespace:model`` reference string.\n\nReturns:\n    The registered model.\n\nRaises:\n    ForgeProviderNotFoundError: If the provider is not registered."
        },
        {
          "name": "ProviderRegistry.metadata",
          "line": 344,
          "signature": "def metadata(self, provider_ref: str) -> ProviderMetadata | None",
          "documentation": "Return metadata for a registered provider.\n\nArgs:\n    provider_ref: The ``namespace:model`` reference string.\n\nReturns:\n    The provider metadata, or None if not found."
        },
        {
          "name": "ProviderRegistry.list",
          "line": 355,
          "signature": "def list(self) -> list[str]",
          "documentation": "List all registered provider reference strings.\n\nReturns:\n    List of registered provider references."
        },
        {
          "name": "ProviderRegistry.is_empty",
          "line": 367,
          "signature": "def is_empty(self) -> bool",
          "documentation": "Return True if no providers are registered.\n\nReturns:\n    True if the registry is empty."
        },
        {
          "name": "ProviderRegistry.negotiate",
          "line": 375,
          "signature": "def negotiate(self, request: ProviderNegotiationRequest) -> ProviderNegotiationResult",
          "documentation": ""
        },
        {
          "name": "ProviderFamily",
          "line": 433,
          "signature": "class ProviderFamily(str, Enum)",
          "documentation": ""
        },
        {
          "name": "AuthStrategy",
          "line": 439,
          "signature": "class AuthStrategy(str, Enum)",
          "documentation": ""
        },
        {
          "name": "ProviderPreset",
          "line": 448,
          "signature": "class ProviderPreset()",
          "documentation": ""
        },
        {
          "name": "ProviderExecutionRequest",
          "line": 460,
          "signature": "class ProviderExecutionRequest()",
          "documentation": ""
        },
        {
          "name": "ProviderInstallOptions",
          "line": 474,
          "signature": "class ProviderInstallOptions()",
          "documentation": ""
        },
        {
          "name": "approved_coding_provider_presets",
          "line": 499,
          "signature": "def approved_coding_provider_presets() -> list[ProviderPreset]",
          "documentation": ""
        },
        {
          "name": "approved_direct_provider_presets",
          "line": 509,
          "signature": "def approved_direct_provider_presets() -> list[ProviderPreset]",
          "documentation": ""
        },
        {
          "name": "approved_gateway_provider_presets",
          "line": 528,
          "signature": "def approved_gateway_provider_presets() -> list[ProviderPreset]",
          "documentation": ""
        },
        {
          "name": "register_official_coding_providers",
          "line": 538,
          "signature": "def register_official_coding_providers(registry: ProviderRegistry, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> None",
          "documentation": ""
        },
        {
          "name": "register_default_core_direct_providers",
          "line": 637,
          "signature": "def register_default_core_direct_providers(registry: ProviderRegistry, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> list[str]",
          "documentation": ""
        },
        {
          "name": "register_openai_model",
          "line": 651,
          "signature": "def register_openai_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_anthropic_model",
          "line": 676,
          "signature": "def register_anthropic_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_google_model",
          "line": 701,
          "signature": "def register_google_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_xai_model",
          "line": 726,
          "signature": "def register_xai_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_deepseek_model",
          "line": 730,
          "signature": "def register_deepseek_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_mistral_model",
          "line": 734,
          "signature": "def register_mistral_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_cohere_model",
          "line": 738,
          "signature": "def register_cohere_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_groq_model",
          "line": 742,
          "signature": "def register_groq_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_moonshot_model",
          "line": 746,
          "signature": "def register_moonshot_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_zai_model",
          "line": 750,
          "signature": "def register_zai_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_minimax_model",
          "line": 754,
          "signature": "def register_minimax_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_openrouter_model",
          "line": 758,
          "signature": "def register_openrouter_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_bedrock_model",
          "line": 762,
          "signature": "def register_bedrock_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_vertex_ai_model",
          "line": 778,
          "signature": "def register_vertex_ai_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_microsoft_foundry_model",
          "line": 794,
          "signature": "def register_microsoft_foundry_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        },
        {
          "name": "register_foundry_model",
          "line": 810,
          "signature": "def register_foundry_model(registry: ProviderRegistry, model_id: str, *, env: ProviderEnvironment | None=None, generate: ProviderGenerateHook | None=None, stream: ProviderStreamHook | None=None) -> str",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/routing.py",
      "sha256": "3b5742e5dfeba17804286b7e03f0c120173de971098fbc4cdc215776f8d165ca",
      "artifactSha256": "23a4a872977b8cdc4bb8b20d3ae4fe50bc4f551a4b0268925e879d637732207d",
      "url": "/reference/source/forge-py/src/forge/core/routing.py.txt",
      "declarations": [
        {
          "name": "TaskMode",
          "line": 24,
          "signature": "class TaskMode(Enum)",
          "documentation": "The phase of work a model call serves.\n\nTask modes represent the different phases of agent work. The model\nrouter uses the task mode to select an appropriate model slot."
        },
        {
          "name": "TaskMode.as_role_name",
          "line": 36,
          "signature": "def as_role_name(self) -> str",
          "documentation": "Return the role name string corresponding to this task mode.\n\nReturns:\n    A string matching the lowercase variant name."
        },
        {
          "name": "ExecutionTopology",
          "line": 45,
          "signature": "class ExecutionTopology(Enum)",
          "documentation": "How the current model call fits into a larger execution pattern.\n\nExecution topology describes the concurrency pattern surrounding the\ncurrent inference call."
        },
        {
          "name": "ModelCapabilities",
          "line": 59,
          "signature": "class ModelCapabilities()",
          "documentation": "Capabilities of a resolved model.\n\nArgs:\n    text_generation: Whether the model supports text generation.\n    structured_output: Whether the model supports structured output.\n    tool_calling: Whether the model supports tool calling.\n    vision: Whether the model supports vision (image input).\n    audio: Whether the model supports audio input/output.\n    embedding: Whether the model supports embedding generation.\n    max_context_tokens: Maximum tokens in the context window.\n    max_output_tokens: Maximum tokens per response."
        },
        {
          "name": "ModelCapabilities.to_dict",
          "line": 82,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "ModelCapabilities.from_dict",
          "line": 100,
          "signature": "def from_dict(data: dict[str, Any]) -> ModelCapabilities",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized ModelCapabilities."
        },
        {
          "name": "RoutingContext",
          "line": 122,
          "signature": "class RoutingContext()",
          "documentation": "The context supplied to a ModelRouter when requesting a routing decision.\n\nAll fields are optional. A caller that provides no context gets the\ndefault slot from the topology.\n\nArgs:\n    domain: What subject area the task concerns.\n    task_mode: The phase of work.\n    execution_topology: Whether the call is sequential, parallel, etc.\n    tool_requirements: Tool capabilities the selected model must support.\n    role_override: Explicit role override."
        },
        {
          "name": "RoutingContext.to_dict",
          "line": 142,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "RoutingContext.from_dict",
          "line": 162,
          "signature": "def from_dict(data: dict[str, Any]) -> RoutingContext",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized RoutingContext."
        },
        {
          "name": "RoutingContext.to_json",
          "line": 185,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string.\n\nReturns:\n    JSON string."
        },
        {
          "name": "RoutingContext.from_json",
          "line": 194,
          "signature": "def from_json(data: str) -> RoutingContext",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON string.\n\nReturns:\n    The deserialized RoutingContext."
        },
        {
          "name": "ResolvedRoute",
          "line": 207,
          "signature": "class ResolvedRoute()",
          "documentation": "A routing decision: which slot was selected and why.\n\nArgs:\n    slot_role: The role name of the selected slot.\n    provider: The specific ProviderRef to use.\n    model_capabilities: The model capabilities of the selected provider.\n    fallback_used: Whether a fallback model was selected."
        },
        {
          "name": "ResolvedRoute.to_dict",
          "line": 222,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "ResolvedRoute.from_dict",
          "line": 236,
          "signature": "def from_dict(data: dict[str, Any]) -> ResolvedRoute",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized ResolvedRoute."
        },
        {
          "name": "ModelRouter",
          "line": 255,
          "signature": "class ModelRouter(ABC)",
          "documentation": "Selects a model slot from a topology given a routing context.\n\nImplementations range from trivial (always return default) to\nsophisticated (heuristic classification, budget-aware optimization)."
        },
        {
          "name": "ModelRouter.name",
          "line": 263,
          "signature": "def name(self) -> str",
          "documentation": "Return the name of this routing strategy.\n\nReturns:\n    The strategy name string."
        },
        {
          "name": "ModelRouter.route",
          "line": 271,
          "signature": "def route(self, context: RoutingContext, topology: ModelTopology) -> ResolvedRoute",
          "documentation": "Select a slot from the topology.\n\nArgs:\n    context: The routing context describing the current task.\n    topology: The model topology to select from.\n\nReturns:\n    A ResolvedRoute identifying the selected slot and provider.\n\nRaises:\n    ForgeSchemaValidationError: If routing fails."
        },
        {
          "name": "DefaultModelRouter",
          "line": 290,
          "signature": "class DefaultModelRouter(ModelRouter)",
          "documentation": "The default model router shipped with Forge.\n\nImplements a cascading match strategy:\n\n1. If ``context.role_override`` is set, return that slot directly.\n2. If the topology has a slot whose role matches ``context.domain``,\n   return it.\n3. If the topology has a slot whose role matches ``context.task_mode``,\n   return it.\n4. Otherwise, return the \"default\" slot."
        },
        {
          "name": "DefaultModelRouter.name",
          "line": 303,
          "signature": "def name(self) -> str",
          "documentation": "Return \"default\" as the strategy name.\n\nReturns:\n    The string \"default\"."
        },
        {
          "name": "DefaultModelRouter.route",
          "line": 311,
          "signature": "def route(self, context: RoutingContext, topology: ModelTopology) -> ResolvedRoute",
          "documentation": "Route using the cascading match strategy.\n\nArgs:\n    context: The routing context.\n    topology: The model topology.\n\nReturns:\n    A ResolvedRoute with the selected slot's primary model.\n\nRaises:\n    ForgeSchemaValidationError: If an explicit role override\n        references a role that does not exist."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/schema.py",
      "sha256": "ade6156e26eeecc31f4ba3027cd1559a826b1c8b4dea4d17397be184c0d58679",
      "artifactSha256": "a6c95bef8c071fa18f9b38b9406d883a5bbc0ec69570237475111785cde2d6ba",
      "url": "/reference/source/forge-py/src/forge/core/schema.py.txt",
      "declarations": [
        {
          "name": "SchemaType",
          "line": 26,
          "signature": "class SchemaType(Enum)",
          "documentation": "The primitive JSON Schema types.\n\nExample:\n    >>> SchemaType.STRING.value\n    'string'"
        },
        {
          "name": "JsonSchema",
          "line": 44,
          "signature": "class JsonSchema()",
          "documentation": "A JSON Schema definition for tool parameters and structured output.\n\nExample:\n    >>> schema = JsonSchema.object_().property(\"name\", JsonSchema.string())\n    >>> schema.required_(\"name\")  # doctest: +ELLIPSIS\n    JsonSchema(...)"
        },
        {
          "name": "JsonSchema.string",
          "line": 68,
          "signature": "def string() -> JsonSchema",
          "documentation": "Create a string schema.\n\nReturns:\n    A JsonSchema with type STRING."
        },
        {
          "name": "JsonSchema.number",
          "line": 77,
          "signature": "def number() -> JsonSchema",
          "documentation": "Create a number schema.\n\nReturns:\n    A JsonSchema with type NUMBER."
        },
        {
          "name": "JsonSchema.integer",
          "line": 86,
          "signature": "def integer() -> JsonSchema",
          "documentation": "Create an integer schema.\n\nReturns:\n    A JsonSchema with type INTEGER."
        },
        {
          "name": "JsonSchema.boolean",
          "line": 95,
          "signature": "def boolean() -> JsonSchema",
          "documentation": "Create a boolean schema.\n\nReturns:\n    A JsonSchema with type BOOLEAN."
        },
        {
          "name": "JsonSchema.array",
          "line": 104,
          "signature": "def array() -> JsonSchema",
          "documentation": "Create an array schema.\n\nReturns:\n    A JsonSchema with type ARRAY."
        },
        {
          "name": "JsonSchema.object_",
          "line": 113,
          "signature": "def object_() -> JsonSchema",
          "documentation": "Create an object schema.\n\nReturns:\n    A JsonSchema with type OBJECT.\n\nNote:\n    Named ``object_`` to avoid shadowing Python's built-in ``object``."
        },
        {
          "name": "JsonSchema.null",
          "line": 125,
          "signature": "def null() -> JsonSchema",
          "documentation": "Create a null schema.\n\nReturns:\n    A JsonSchema with type NULL."
        },
        {
          "name": "JsonSchema.set_description",
          "line": 135,
          "signature": "def set_description(self, desc: str) -> JsonSchema",
          "documentation": "Set the description.\n\nArgs:\n    desc: Human-readable description.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.property",
          "line": 147,
          "signature": "def property(self, name: str, schema: JsonSchema) -> JsonSchema",
          "documentation": "Add a property (for object schemas).\n\nArgs:\n    name: Property name.\n    schema: Property schema.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.required_",
          "line": 162,
          "signature": "def required_(self, name: str) -> JsonSchema",
          "documentation": "Mark a property as required (for object schemas).\n\nArgs:\n    name: Property name to mark as required.\n\nReturns:\n    Self for chaining.\n\nNote:\n    Named ``required_`` to avoid shadowing the concept name."
        },
        {
          "name": "JsonSchema.items_schema",
          "line": 179,
          "signature": "def items_schema(self, schema: JsonSchema) -> JsonSchema",
          "documentation": "Set the items schema (for array schemas).\n\nArgs:\n    schema: Schema for array items.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.set_enum_values",
          "line": 191,
          "signature": "def set_enum_values(self, values: list[Any]) -> JsonSchema",
          "documentation": "Set allowed enum values.\n\nArgs:\n    values: List of allowed values.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.set_minimum",
          "line": 203,
          "signature": "def set_minimum(self, min_val: float) -> JsonSchema",
          "documentation": "Set the minimum numeric value.\n\nArgs:\n    min_val: Minimum allowed value.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.set_maximum",
          "line": 215,
          "signature": "def set_maximum(self, max_val: float) -> JsonSchema",
          "documentation": "Set the maximum numeric value.\n\nArgs:\n    max_val: Maximum allowed value.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.set_min_length",
          "line": 227,
          "signature": "def set_min_length(self, length: int) -> JsonSchema",
          "documentation": "Set the minimum string length.\n\nArgs:\n    length: Minimum string length.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.set_max_length",
          "line": 239,
          "signature": "def set_max_length(self, length: int) -> JsonSchema",
          "documentation": "Set the maximum string length.\n\nArgs:\n    length: Maximum string length.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.set_additional_properties",
          "line": 251,
          "signature": "def set_additional_properties(self, allowed: bool) -> JsonSchema",
          "documentation": "Set whether additional properties are allowed (for object schemas).\n\nArgs:\n    allowed: Whether to allow additional properties.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "JsonSchema.validate",
          "line": 265,
          "signature": "def validate(self, value: Any) -> None",
          "documentation": "Validate a JSON-compatible value against this schema.\n\nArgs:\n    value: The value to validate (Python object, not raw JSON string).\n\nRaises:\n    ForgeSchemaValidationError: If validation fails.\n\nExample:\n    >>> schema = JsonSchema.string()\n    >>> schema.validate(\"hello\")  # passes\n    >>> try:\n    ...     schema.validate(42)\n    ... except ForgeSchemaValidationError:\n    ...     print(\"validation failed\")\n    validation failed"
        },
        {
          "name": "JsonSchema.to_dict",
          "line": 415,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary compatible with JSON Schema.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "JsonSchema.from_dict",
          "line": 445,
          "signature": "def from_dict(data: dict[str, Any]) -> JsonSchema",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation of a JSON Schema.\n\nReturns:\n    The deserialized JsonSchema."
        },
        {
          "name": "JsonSchema.to_json",
          "line": 471,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string.\n\nReturns:\n    JSON string representation."
        },
        {
          "name": "JsonSchema.from_json",
          "line": 480,
          "signature": "def from_json(data: str) -> JsonSchema",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON string.\n\nReturns:\n    The deserialized JsonSchema."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/telemetry.py",
      "sha256": "527738083224d5d969d059dee445d628d492c6027a806be24d36febe34466595",
      "artifactSha256": "de6ed7e0bab8bf4edb6741db70d53ec224d0f437c7c5502ad8652ff6dab4fa01",
      "url": "/reference/source/forge-py/src/forge/core/telemetry.py.txt",
      "declarations": [
        {
          "name": "SpanAttributeString",
          "line": 25,
          "signature": "class SpanAttributeString()",
          "documentation": "A string span attribute value."
        },
        {
          "name": "SpanAttributeInt",
          "line": 32,
          "signature": "class SpanAttributeInt()",
          "documentation": "An integer span attribute value."
        },
        {
          "name": "SpanAttributeFloat",
          "line": 39,
          "signature": "class SpanAttributeFloat()",
          "documentation": "A float span attribute value."
        },
        {
          "name": "SpanAttributeBool",
          "line": 46,
          "signature": "class SpanAttributeBool()",
          "documentation": "A boolean span attribute value."
        },
        {
          "name": "to_span_attribute",
          "line": 55,
          "signature": "def to_span_attribute(value: str | int | float | bool) -> SpanAttribute",
          "documentation": "Convert a Python primitive to a SpanAttribute.\n\nArgs:\n    value: The primitive value to wrap.\n\nReturns:\n    The wrapped SpanAttribute.\n\nRaises:\n    TypeError: If the value type is not supported."
        },
        {
          "name": "span_attribute_value",
          "line": 79,
          "signature": "def span_attribute_value(attr: SpanAttribute) -> str | int | float | bool",
          "documentation": "Extract the raw value from a SpanAttribute.\n\nArgs:\n    attr: The span attribute.\n\nReturns:\n    The underlying primitive value."
        },
        {
          "name": "SpanStatusCode",
          "line": 93,
          "signature": "class SpanStatusCode(Enum)",
          "documentation": "Span status code following OpenTelemetry conventions."
        },
        {
          "name": "SpanStatusUnset",
          "line": 102,
          "signature": "class SpanStatusUnset()",
          "documentation": "Status not set (default)."
        },
        {
          "name": "SpanStatusOk",
          "line": 109,
          "signature": "class SpanStatusOk()",
          "documentation": "Operation completed successfully."
        },
        {
          "name": "SpanStatusError",
          "line": 116,
          "signature": "class SpanStatusError()",
          "documentation": "Operation failed with an error.\n\nArgs:\n    message: Error message."
        },
        {
          "name": "ForgeSpan",
          "line": 133,
          "signature": "class ForgeSpan()",
          "documentation": "A telemetry span representing a unit of work.\n\nSpans follow OpenTelemetry semantics: they have a name, start/end times,\nattributes, and optional parent span ID for distributed tracing.\n\nArgs:\n    name: The span name (use dotted notation: \"forge.agent.generate\").\n\nExample:\n    >>> span = ForgeSpan(\"forge.agent.tool_loop.step\")\n    >>> span.name\n    'forge.agent.tool_loop.step'"
        },
        {
          "name": "ForgeSpan.set_attribute",
          "line": 156,
          "signature": "def set_attribute(self, key: str, value: str | int | float | bool) -> None",
          "documentation": "Set an attribute on this span.\n\nArgs:\n    key: The attribute key.\n    value: The attribute value."
        },
        {
          "name": "ForgeSpan.end",
          "line": 165,
          "signature": "def end(self) -> None",
          "documentation": "Mark this span as completed. End time is set to now."
        },
        {
          "name": "ForgeSpan.end_with_error",
          "line": 169,
          "signature": "def end_with_error(self, message: str) -> None",
          "documentation": "Mark this span as completed with an error.\n\nArgs:\n    message: The error message."
        },
        {
          "name": "ForgeSpan.with_parent",
          "line": 178,
          "signature": "def with_parent(self, parent_id: str) -> ForgeSpan",
          "documentation": "Set the parent span ID.\n\nArgs:\n    parent_id: The parent span's ID.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "ForgeEvent",
          "line": 192,
          "signature": "class ForgeEvent()",
          "documentation": "A telemetry event (a point-in-time annotation within a span).\n\nEvents record significant moments: tool invocations, lifecycle transitions,\nerror occurrences, etc.\n\nArgs:\n    name: The event name.\n\nExample:\n    >>> event = ForgeEvent(\"forge.tool.invoked\")\n    >>> event.set_attribute(\"tool.name\", \"search\")"
        },
        {
          "name": "ForgeEvent.set_attribute",
          "line": 210,
          "signature": "def set_attribute(self, key: str, value: str | int | float | bool) -> None",
          "documentation": "Set an attribute on this event.\n\nArgs:\n    key: The attribute key.\n    value: The attribute value."
        },
        {
          "name": "TelemetryEmitter",
          "line": 222,
          "signature": "class TelemetryEmitter(ABC)",
          "documentation": "Abstract base class for emitting telemetry data.\n\nImplementations can send spans and events to OpenTelemetry collectors,\nlog files, or in-memory buffers for testing."
        },
        {
          "name": "TelemetryEmitter.emit_span",
          "line": 230,
          "signature": "def emit_span(self, span: ForgeSpan) -> None",
          "documentation": "Emit a completed span.\n\nArgs:\n    span: The span to emit."
        },
        {
          "name": "TelemetryEmitter.emit_event",
          "line": 238,
          "signature": "def emit_event(self, event: ForgeEvent) -> None",
          "documentation": "Emit an event.\n\nArgs:\n    event: The event to emit."
        },
        {
          "name": "NoopEmitter",
          "line": 246,
          "signature": "class NoopEmitter(TelemetryEmitter)",
          "documentation": "A no-op telemetry emitter that discards all data."
        },
        {
          "name": "NoopEmitter.emit_span",
          "line": 249,
          "signature": "def emit_span(self, span: ForgeSpan) -> None",
          "documentation": "Discard the span."
        },
        {
          "name": "NoopEmitter.emit_event",
          "line": 252,
          "signature": "def emit_event(self, event: ForgeEvent) -> None",
          "documentation": "Discard the event."
        },
        {
          "name": "RecordingEmitter",
          "line": 256,
          "signature": "class RecordingEmitter(TelemetryEmitter)",
          "documentation": "A telemetry emitter that records all spans and events for testing.\n\nExample:\n    >>> emitter = RecordingEmitter()\n    >>> span = ForgeSpan(\"test\")\n    >>> span.end()\n    >>> emitter.emit_span(span)\n    >>> len(emitter.spans)\n    1"
        },
        {
          "name": "RecordingEmitter.__init__",
          "line": 268,
          "signature": "def __init__(self) -> None",
          "documentation": ""
        },
        {
          "name": "RecordingEmitter.emit_span",
          "line": 272,
          "signature": "def emit_span(self, span: ForgeSpan) -> None",
          "documentation": "Record the span.\n\nArgs:\n    span: The span to record."
        },
        {
          "name": "RecordingEmitter.emit_event",
          "line": 280,
          "signature": "def emit_event(self, event: ForgeEvent) -> None",
          "documentation": "Record the event.\n\nArgs:\n    event: The event to record."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/tool.py",
      "sha256": "ccb5ad8af2baf0c71bbfbb7b12855a6aa3a434ce1a8c347432d59b42a2b6d338",
      "artifactSha256": "a6f3826d2fe6d66d2049b6bab6cfa953734aa2c12f597d98e2cad42891e66400",
      "url": "/reference/source/forge-py/src/forge/core/tool.py.txt",
      "declarations": [
        {
          "name": "ToolTier",
          "line": 20,
          "signature": "class ToolTier(Enum)",
          "documentation": "Tool tier classification per ANVIL Spec section 8.1.\n\nThe three tiers determine where a tool executes, how it is discovered,\nand what authorization is required.\n\n========= ========= ==================== ===========================\nTier      Name      Location             Auth\n========= ========= ==================== ===========================\n1         Platform  Inside sandbox       Always available\n2         External  Outside sandbox      Arsenal ACT required\n3         Embedded  Inside WASM module   Module-scoped\n========= ========= ==================== ==========================="
        },
        {
          "name": "ToolTier.requires_authorization",
          "line": 39,
          "signature": "def requires_authorization(self) -> bool",
          "documentation": "Return True if this tier requires Arsenal ACT authorization.\n\nOnly Tier 2 (External) tools require ACT checks. Platform tools are\nalways available, and embedded tools are sandbox-confined.\n\nReturns:\n    True if authorization is required."
        },
        {
          "name": "ToolTier.as_str",
          "line": 50,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the tier as a string.\n\nReturns:\n    Lowercase tier name."
        },
        {
          "name": "ToolDefinition",
          "line": 64,
          "signature": "class ToolDefinition()",
          "documentation": "Definition of a tool that an agent can invoke.\n\nANVIL Spec section 8.2: Every tool has a unique name, human-readable\ndescription, a JSON Schema for its parameters, and a tier classification.\n\nArgs:\n    name: Unique tool name.\n    description: Human-readable description shown to the model.\n    parameters: JSON Schema defining the tool's parameters.\n    tier: Tier classification (Platform/External/Embedded).\n\nExample:\n    >>> from forge.core.schema import JsonSchema\n    >>> tool = ToolDefinition(\n    ...     name=\"get_weather\",\n    ...     description=\"Get weather for a city\",\n    ...     parameters=JsonSchema.object_(),\n    ...     tier=ToolTier.EXTERNAL,\n    ... )\n    >>> tool.name\n    'get_weather'"
        },
        {
          "name": "ToolDefinition.builder",
          "line": 94,
          "signature": "def builder(name: str) -> ToolDefinitionBuilder",
          "documentation": "Create a builder for constructing a ToolDefinition.\n\nArgs:\n    name: The unique tool name.\n\nReturns:\n    A ToolDefinitionBuilder."
        },
        {
          "name": "ToolDefinition.to_dict",
          "line": 105,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "ToolDefinition.from_dict",
          "line": 119,
          "signature": "def from_dict(data: dict[str, Any]) -> ToolDefinition",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized ToolDefinition."
        },
        {
          "name": "ToolDefinition.to_json",
          "line": 135,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string.\n\nReturns:\n    JSON string."
        },
        {
          "name": "ToolDefinition.from_json",
          "line": 144,
          "signature": "def from_json(data: str) -> ToolDefinition",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON string.\n\nReturns:\n    The deserialized ToolDefinition."
        },
        {
          "name": "ToolDefinitionBuilder",
          "line": 156,
          "signature": "class ToolDefinitionBuilder()",
          "documentation": "Builder for ToolDefinition.\n\nArgs:\n    name: The tool name."
        },
        {
          "name": "ToolDefinitionBuilder.__init__",
          "line": 163,
          "signature": "def __init__(self, name: str) -> None",
          "documentation": ""
        },
        {
          "name": "ToolDefinitionBuilder.description",
          "line": 169,
          "signature": "def description(self, desc: str) -> ToolDefinitionBuilder",
          "documentation": "Set the tool description.\n\nArgs:\n    desc: Human-readable description.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "ToolDefinitionBuilder.parameters",
          "line": 181,
          "signature": "def parameters(self, schema: JsonSchema) -> ToolDefinitionBuilder",
          "documentation": "Set the parameter schema.\n\nArgs:\n    schema: JSON Schema for parameters.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "ToolDefinitionBuilder.tier",
          "line": 193,
          "signature": "def tier(self, tier: ToolTier) -> ToolDefinitionBuilder",
          "documentation": "Set the tool tier classification.\n\nArgs:\n    tier: The tool tier.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "ToolDefinitionBuilder.build",
          "line": 205,
          "signature": "def build(self) -> ToolDefinition",
          "documentation": "Build the ToolDefinition.\n\nReturns:\n    The constructed ToolDefinition."
        },
        {
          "name": "ToolCall",
          "line": 220,
          "signature": "class ToolCall()",
          "documentation": "A tool invocation request from the model.\n\nGenerated by the model during inference when it decides to call a tool.\n\nArgs:\n    id: Unique identifier for this call (used to match with results).\n    name: The tool name being invoked.\n    arguments: JSON arguments for the tool."
        },
        {
          "name": "ToolCall.to_dict",
          "line": 235,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "ToolCall.from_dict",
          "line": 244,
          "signature": "def from_dict(data: dict[str, Any]) -> ToolCall",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized ToolCall."
        },
        {
          "name": "ToolCall.to_json",
          "line": 255,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string."
        },
        {
          "name": "ToolCall.from_json",
          "line": 260,
          "signature": "def from_json(data: str) -> ToolCall",
          "documentation": "Deserialize from JSON string."
        },
        {
          "name": "ToolResult",
          "line": 266,
          "signature": "class ToolResult()",
          "documentation": "The result of a tool execution.\n\nReturned to the model as context for the next inference step.\n\nArgs:\n    tool_call_id: The tool call ID this result corresponds to.\n    name: The tool name.\n    content: The result content (stringified).\n    is_error: Whether the tool execution resulted in an error."
        },
        {
          "name": "ToolResult.to_dict",
          "line": 283,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary."
        },
        {
          "name": "ToolResult.from_dict",
          "line": 293,
          "signature": "def from_dict(data: dict[str, Any]) -> ToolResult",
          "documentation": "Deserialize from a dictionary."
        },
        {
          "name": "ToolResult.to_json",
          "line": 302,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string."
        },
        {
          "name": "ToolResult.from_json",
          "line": 307,
          "signature": "def from_json(data: str) -> ToolResult",
          "documentation": "Deserialize from JSON string."
        },
        {
          "name": "ToolApprovalApprove",
          "line": 313,
          "signature": "class ToolApprovalApprove()",
          "documentation": "The tool call is approved as-is.\n\nANVIL Spec section 8.6: Approval step in the tool execution lifecycle."
        },
        {
          "name": "ToolApprovalDeny",
          "line": 323,
          "signature": "class ToolApprovalDeny()",
          "documentation": "The tool call is denied with a reason.\n\nANVIL Spec section 8.6: Approval step in the tool execution lifecycle.\n\nArgs:\n    reason: Why the tool call was denied."
        },
        {
          "name": "ToolApprovalModify",
          "line": 337,
          "signature": "class ToolApprovalModify()",
          "documentation": "The tool call is approved but with modified arguments.\n\nANVIL Spec section 8.6: Approval step in the tool execution lifecycle.\n\nArgs:\n    arguments: The modified arguments to use instead."
        },
        {
          "name": "tool_approval_to_dict",
          "line": 353,
          "signature": "def tool_approval_to_dict(approval: ToolApproval) -> dict[str, Any]",
          "documentation": "Serialize a ToolApproval to a dictionary.\n\nArgs:\n    approval: The approval decision.\n\nReturns:\n    Dictionary representation with type discriminator."
        },
        {
          "name": "tool_approval_from_dict",
          "line": 372,
          "signature": "def tool_approval_from_dict(data: dict[str, Any]) -> ToolApproval",
          "documentation": "Deserialize a ToolApproval from a dictionary.\n\nArgs:\n    data: Dictionary with type discriminator.\n\nReturns:\n    The deserialized ToolApproval.\n\nRaises:\n    ValueError: If the type is unknown."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/topology.py",
      "sha256": "1837aebb8f262829daeb1acb69d0d5cf54c98522726dd0e3834a3d246e901d29",
      "artifactSha256": "6393ee7f082a617c1f9e5266affda8ebe481a11171168c0e17f69fbb896ad220",
      "url": "/reference/source/forge-py/src/forge/core/topology.py.txt",
      "declarations": [
        {
          "name": "CostPreference",
          "line": 29,
          "signature": "class CostPreference(Enum)",
          "documentation": "Cost preference for a model slot.\n\nGuides the router's cost-sensitivity when selecting among multiple\neligible slots or fallback candidates."
        },
        {
          "name": "CostPreference.as_str",
          "line": 40,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the preference as a lowercase string.\n\nReturns:\n    Lowercase preference name."
        },
        {
          "name": "LatencyPreference",
          "line": 49,
          "signature": "class LatencyPreference(Enum)",
          "documentation": "Latency preference for a model slot.\n\nGuides the router's latency-sensitivity when selecting among multiple\neligible slots or fallback candidates."
        },
        {
          "name": "LatencyPreference.as_str",
          "line": 60,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the preference as a lowercase string.\n\nReturns:\n    Lowercase preference name."
        },
        {
          "name": "ModelSlot",
          "line": 70,
          "signature": "class ModelSlot()",
          "documentation": "A named model assignment within a topology.\n\nEach slot represents a role that a model fills (e.g., \"planner\",\n\"coder\", \"classifier\"). The slot carries the primary model reference,\nan ordered fallback list, capability requirements, and optional\nArsenal scope narrowing.\n\nANVIL Spec Reference: ANVIL Spec SS6.2 -- Provider Abstraction.\n\nArgs:\n    role: The role name for this slot.\n    primary: Primary model for this slot.\n    fallbacks: Ordered fallback models.\n    required_capabilities: Runtime capabilities required for this slot.\n    cost_preference: Optional cost preference for the router.\n    latency_preference: Optional latency preference for the router.\n    arsenal_scope_narrowing: Optional Arsenal scope narrowing."
        },
        {
          "name": "ModelSlot.to_dict",
          "line": 98,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "ModelSlot.from_dict",
          "line": 119,
          "signature": "def from_dict(data: dict[str, Any]) -> ModelSlot",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized ModelSlot."
        },
        {
          "name": "ModelTopology",
          "line": 148,
          "signature": "class ModelTopology()",
          "documentation": "The complete model assignment for an agent or Brew.\n\nA topology is a named collection of ``ModelSlot`` entries keyed by role.\nEvery topology must contain exactly one slot with ``role == \"default\"``.\nSlots are stored sorted by role name for deterministic serialization.\n\nANVIL Spec Reference: ANVIL Spec SS6.1-6.2.\n\nArgs:\n    name: Human-readable name for this topology.\n    slots: The model slots keyed by role name.\n    default_role: The role name designated as the default."
        },
        {
          "name": "ModelTopology.single",
          "line": 168,
          "signature": "def single(provider_ref: ProviderRef) -> ModelTopology",
          "documentation": "Create a single-model topology with one \"default\" slot.\n\nThis is the backward-compatible constructor for agents that use a\nsingle model for everything.\n\nArgs:\n    provider_ref: The provider reference for the sole model.\n\nReturns:\n    A ModelTopology with one default slot.\n\nExample:\n    >>> ref = ProviderRef.parse(\"openai:gpt-4o\")\n    >>> topology = ModelTopology.single(ref)\n    >>> topology.default_slot().role\n    'default'"
        },
        {
          "name": "ModelTopology.builder",
          "line": 194,
          "signature": "def builder() -> TopologyBuilder",
          "documentation": "Return a builder for multi-slot topologies.\n\nReturns:\n    A new TopologyBuilder."
        },
        {
          "name": "ModelTopology.default_slot",
          "line": 202,
          "signature": "def default_slot(self) -> ModelSlot",
          "documentation": "Return the default slot.\n\nThis method is guaranteed to return a valid slot because the\ntopology is validated at construction time.\n\nReturns:\n    The default ModelSlot."
        },
        {
          "name": "ModelTopology.slot_for_role",
          "line": 217,
          "signature": "def slot_for_role(self, role: str) -> ModelSlot",
          "documentation": "Return the slot for the given role, or the default slot.\n\nArgs:\n    role: The role name to look up.\n\nReturns:\n    The slot for the given role, or the default slot if not found."
        },
        {
          "name": "ModelTopology.has_role",
          "line": 231,
          "signature": "def has_role(self, role: str) -> bool",
          "documentation": "Return True if a slot with the given role name exists.\n\nArgs:\n    role: The role name to check.\n\nReturns:\n    True if the role exists."
        },
        {
          "name": "ModelTopology.slot_count",
          "line": 242,
          "signature": "def slot_count(self) -> int",
          "documentation": "Return the number of slots in this topology.\n\nReturns:\n    The slot count."
        },
        {
          "name": "ModelTopology.all_provider_refs",
          "line": 250,
          "signature": "def all_provider_refs(self) -> list[ProviderRef]",
          "documentation": "Return all distinct ProviderRef values, sorted and deduplicated.\n\nReturns:\n    A sorted, deduplicated list of ProviderRef values."
        },
        {
          "name": "ModelTopology.to_dict",
          "line": 269,
          "signature": "def to_dict(self) -> dict[str, Any]",
          "documentation": "Serialize to a dictionary.\n\nReturns:\n    Dictionary representation."
        },
        {
          "name": "ModelTopology.from_dict",
          "line": 284,
          "signature": "def from_dict(data: dict[str, Any]) -> ModelTopology",
          "documentation": "Deserialize from a dictionary.\n\nArgs:\n    data: Dictionary representation.\n\nReturns:\n    The deserialized ModelTopology."
        },
        {
          "name": "ModelTopology.to_json",
          "line": 302,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string.\n\nReturns:\n    JSON string."
        },
        {
          "name": "ModelTopology.from_json",
          "line": 311,
          "signature": "def from_json(data: str) -> ModelTopology",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON string.\n\nReturns:\n    The deserialized ModelTopology."
        },
        {
          "name": "TopologyBuilder",
          "line": 323,
          "signature": "class TopologyBuilder()",
          "documentation": "Builder for constructing ModelTopology instances with validation.\n\nThe builder enforces two invariants at build time:\n1. Exactly one slot must have the role \"default\".\n2. At least one slot must exist.\n\nExample:\n    >>> builder = ModelTopology.builder()\n    >>> builder.slot(\"default\", ProviderRef.parse(\"openai:gpt-4o\"))\n    <...>\n    >>> topology = builder.build()\n    >>> topology.slot_count()\n    1"
        },
        {
          "name": "TopologyBuilder.__init__",
          "line": 339,
          "signature": "def __init__(self) -> None",
          "documentation": ""
        },
        {
          "name": "TopologyBuilder.name",
          "line": 343,
          "signature": "def name(self, name: str) -> TopologyBuilder",
          "documentation": "Set the topology name.\n\nArgs:\n    name: Human-readable name for this topology.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "TopologyBuilder.slot",
          "line": 355,
          "signature": "def slot(self, role: str, primary: ProviderRef) -> TopologyBuilder",
          "documentation": "Add a slot with the given role and primary model.\n\nIf a slot with the same role already exists, it is replaced.\n\nArgs:\n    role: The role name.\n    primary: The primary model for this slot.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "TopologyBuilder.with_fallback",
          "line": 370,
          "signature": "def with_fallback(self, role: str, fallback: ProviderRef) -> TopologyBuilder",
          "documentation": "Add a fallback model to an existing slot.\n\nIf the specified role does not exist, this method is a no-op.\n\nArgs:\n    role: The role name of the slot.\n    fallback: The fallback model to append.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "TopologyBuilder.with_required_capability",
          "line": 387,
          "signature": "def with_required_capability(self, role: str, cap: RuntimeCapability) -> TopologyBuilder",
          "documentation": "Add a required runtime capability to an existing slot.\n\nIf the specified role does not exist, this method is a no-op.\n\nArgs:\n    role: The role name of the slot.\n    cap: The runtime capability to require.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "TopologyBuilder.with_cost_preference",
          "line": 406,
          "signature": "def with_cost_preference(self, role: str, pref: CostPreference) -> TopologyBuilder",
          "documentation": "Set the cost preference for an existing slot.\n\nIf the specified role does not exist, this method is a no-op.\n\nArgs:\n    role: The role name of the slot.\n    pref: The cost preference to set.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "TopologyBuilder.with_latency_preference",
          "line": 425,
          "signature": "def with_latency_preference(self, role: str, pref: LatencyPreference) -> TopologyBuilder",
          "documentation": "Set the latency preference for an existing slot.\n\nIf the specified role does not exist, this method is a no-op.\n\nArgs:\n    role: The role name of the slot.\n    pref: The latency preference to set.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "TopologyBuilder.with_scope_narrowing",
          "line": 444,
          "signature": "def with_scope_narrowing(self, role: str, scopes: list[str]) -> TopologyBuilder",
          "documentation": "Set Arsenal scope narrowing for an existing slot.\n\nIf the specified role does not exist, this method is a no-op.\n\nArgs:\n    role: The role name of the slot.\n    scopes: The scope names to narrow to.\n\nReturns:\n    Self for chaining."
        },
        {
          "name": "TopologyBuilder.build",
          "line": 463,
          "signature": "def build(self) -> ModelTopology",
          "documentation": "Build the topology, validating invariants.\n\nReturns:\n    A validated ModelTopology.\n\nRaises:\n    ForgeSchemaValidationError: If the topology has no \"default\" slot\n        or is empty."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/core/types.py",
      "sha256": "51e173002332d0cba1bb6c4f89232f212d4dbfef504fa477cc56bda14c7e1756",
      "artifactSha256": "c5d12e25715549deef3b56e8259cbe4cfe3b22eb2343ddeb86244cd7c4c6d1a9",
      "url": "/reference/source/forge-py/src/forge/core/types.py.txt",
      "declarations": [
        {
          "name": "AgentDid",
          "line": 15,
          "signature": "class AgentDid()",
          "documentation": "A DID (Decentralized Identifier) representing an agent's identity.\n\nFormat: ``did:oas:<namespace>:<kind>:<identifier>``\n\nANVIL Spec Reference: Agent identity binding per ANVIL Spec section 11.1.\n\nArgs:\n    value: The full DID string.\n\nExample:\n    >>> did = AgentDid.new(\"did:oas:l1fe:agent:data-analyzer\")\n    >>> did is not None\n    True\n    >>> did.as_str()\n    'did:oas:l1fe:agent:data-analyzer'"
        },
        {
          "name": "AgentDid.new",
          "line": 36,
          "signature": "def new(did: str) -> AgentDid | None",
          "documentation": "Create a new AgentDid from a DID string.\n\nArgs:\n    did: A DID string in the format ``did:oas:<namespace>:<kind>:<identifier>``.\n\nReturns:\n    The validated AgentDid, or None if the format is invalid.\n\nExample:\n    >>> AgentDid.new(\"did:oas:l1fe:agent:bot-1\") is not None\n    True\n    >>> AgentDid.new(\"not-a-did\") is None\n    True"
        },
        {
          "name": "AgentDid.from_trusted",
          "line": 56,
          "signature": "def from_trusted(did: str) -> AgentDid",
          "documentation": "Create an AgentDid without validation.\n\nThe caller must ensure the string is a valid OAS DID. This is provided\nfor interop with the OAS SDK which already validates DIDs.\n\nArgs:\n    did: A trusted DID string.\n\nReturns:\n    The AgentDid wrapper."
        },
        {
          "name": "AgentDid.as_str",
          "line": 70,
          "signature": "def as_str(self) -> str",
          "documentation": "Return the DID string.\n\nReturns:\n    The raw DID string value."
        },
        {
          "name": "AgentDid.to_json",
          "line": 78,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON string.\n\nReturns:\n    JSON-encoded DID string."
        },
        {
          "name": "AgentDid.from_json",
          "line": 87,
          "signature": "def from_json(data: str) -> AgentDid",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON-encoded DID string.\n\nReturns:\n    The deserialized AgentDid.\n\nRaises:\n    ValueError: If the JSON is invalid or DID format is wrong."
        },
        {
          "name": "Timestamp",
          "line": 112,
          "signature": "class Timestamp()",
          "documentation": "A UTC timestamp used throughout the Forge SDK.\n\nWraps a ``datetime`` with Forge-specific serialization.\n\nExample:\n    >>> ts = Timestamp.now()\n    >>> iso = ts.to_iso8601()\n    >>> \"T\" in iso\n    True"
        },
        {
          "name": "Timestamp.now",
          "line": 127,
          "signature": "def now() -> Timestamp",
          "documentation": "Create a Timestamp for the current UTC time.\n\nReturns:\n    A Timestamp representing the current moment."
        },
        {
          "name": "Timestamp.from_iso8601",
          "line": 136,
          "signature": "def from_iso8601(s: str) -> Timestamp | None",
          "documentation": "Create a Timestamp from an ISO 8601 string.\n\nArgs:\n    s: An ISO 8601 formatted date-time string.\n\nReturns:\n    The parsed Timestamp, or None if parsing fails.\n\nExample:\n    >>> Timestamp.from_iso8601(\"2026-01-15T00:00:00Z\") is not None\n    True\n    >>> Timestamp.from_iso8601(\"not-a-date\") is None\n    True"
        },
        {
          "name": "Timestamp.to_iso8601",
          "line": 159,
          "signature": "def to_iso8601(self) -> str",
          "documentation": "Format this timestamp as an ISO 8601 string.\n\nReturns:\n    ISO 8601 formatted string with timezone info."
        },
        {
          "name": "Timestamp.to_json",
          "line": 167,
          "signature": "def to_json(self) -> str",
          "documentation": "Serialize to JSON.\n\nReturns:\n    JSON string containing the ISO 8601 timestamp."
        },
        {
          "name": "Timestamp.from_json",
          "line": 176,
          "signature": "def from_json(data: str) -> Timestamp | None",
          "documentation": "Deserialize from JSON string.\n\nArgs:\n    data: JSON string containing an ISO 8601 timestamp.\n\nReturns:\n    The parsed Timestamp, or None if invalid."
        }
      ]
    }
  ]
}
