archastro.platform.types.expressions

 1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
 2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
 3# Content hash: 8f12e992bceb
 4
 5from typing import Any
 6
 7from pydantic import BaseModel, Field
 8
 9
10class ExpressionResult(BaseModel):
11    """
12    Schema for the result of evaluating an expression
13    """
14
15    output: list[dict[str, Any]] | None = Field(
16        default=[],
17        description="Output lines from println calls, each with :line (source line number), :text, and optional :values (JSON-serializable structured data)",
18    )
19    result: Any = Field(..., description="The evaluated JSON-safe result")
20
21
22class ExpressionValidation(BaseModel):
23    """
24    Schema for expression validation responses
25    """
26
27    error: str | None = Field(default=None, description="Validation error message")
28    findings: list[dict[str, Any]] | None = Field(
29        default=None, description="Structured findings with position info for editor diagnostics"
30    )
31    ok: bool = Field(..., description="Whether the validation call succeeded")
32    symbols: list[dict[str, Any]] | None = Field(
33        default=None,
34        description="Inferred symbol types at source positions (name, type, line, column)",
35    )
36    valid: bool | None = Field(default=None, description="Whether the expression is valid")
37    warnings: list[str] | None = Field(
38        default=None, description="Semantic analysis warnings (non-blocking)"
39    )
class ExpressionResult(pydantic.main.BaseModel):
11class ExpressionResult(BaseModel):
12    """
13    Schema for the result of evaluating an expression
14    """
15
16    output: list[dict[str, Any]] | None = Field(
17        default=[],
18        description="Output lines from println calls, each with :line (source line number), :text, and optional :values (JSON-serializable structured data)",
19    )
20    result: Any = Field(..., description="The evaluated JSON-safe result")

Schema for the result of evaluating an expression

output: list[dict[str, typing.Any]] | None = []

Output lines from println calls, each with :line (source line number), :text, and optional :values (JSON-serializable structured data)

result: Any = PydanticUndefined

The evaluated JSON-safe result

class ExpressionValidation(pydantic.main.BaseModel):
23class ExpressionValidation(BaseModel):
24    """
25    Schema for expression validation responses
26    """
27
28    error: str | None = Field(default=None, description="Validation error message")
29    findings: list[dict[str, Any]] | None = Field(
30        default=None, description="Structured findings with position info for editor diagnostics"
31    )
32    ok: bool = Field(..., description="Whether the validation call succeeded")
33    symbols: list[dict[str, Any]] | None = Field(
34        default=None,
35        description="Inferred symbol types at source positions (name, type, line, column)",
36    )
37    valid: bool | None = Field(default=None, description="Whether the expression is valid")
38    warnings: list[str] | None = Field(
39        default=None, description="Semantic analysis warnings (non-blocking)"
40    )

Schema for expression validation responses

error: str | None = None

Validation error message

findings: list[dict[str, typing.Any]] | None = None

Structured findings with position info for editor diagnostics

ok: bool = PydanticUndefined

Whether the validation call succeeded

symbols: list[dict[str, typing.Any]] | None = None

Inferred symbol types at source positions (name, type, line, column)

valid: bool | None = None

Whether the expression is valid

warnings: list[str] | None = None

Semantic analysis warnings (non-blocking)