archastro.platform.types.artifacts

 1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
 2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
 3# Content hash: e73922c92163
 4
 5from datetime import datetime
 6
 7from pydantic import BaseModel, Field
 8
 9from .image import ImageSource
10
11
12class Artifact(BaseModel):
13    """
14    A versioned artifact produced or managed by an agent, such as a generated file, report, or code output.
15    """
16
17    agent: str | None = Field(
18        default=None,
19        description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.",
20    )
21    content_type: str | None = Field(
22        default=None,
23        description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.',
24    )
25    created_at: datetime | None = Field(
26        default=None, description="When the artifact was first created (ISO 8601)."
27    )
28    current_version: str | None = Field(
29        default=None,
30        description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.",
31    )
32    description: str | None = Field(
33        default=None,
34        description="Optional longer description of the artifact's contents or purpose. `null` if not set.",
35    )
36    file: str | None = Field(
37        default=None,
38        description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.",
39    )
40    file_name: str | None = Field(
41        default=None,
42        description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.',
43    )
44    file_url: str | None = Field(
45        default=None,
46        description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.",
47    )
48    id: str = Field(..., description="Artifact ID (`art_...`).")
49    image_source: ImageSource | None = Field(
50        default=None,
51        description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.',
52    )
53    name: str | None = Field(
54        default=None,
55        description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.',
56    )
57    org: str | None = Field(
58        default=None, description="ID of the organization this artifact belongs to (`org_...`)."
59    )
60    sandbox: str | None = Field(
61        default=None,
62        description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.",
63    )
64    team: str | None = Field(
65        default=None,
66        description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.",
67    )
68    thread: str | None = Field(
69        default=None,
70        description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.",
71    )
72    updated_at: datetime | None = Field(
73        default=None, description="When the artifact record was last modified (ISO 8601)."
74    )
75    user: str | None = Field(
76        default=None,
77        description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.",
78    )
79    version: int | None = Field(
80        default=None,
81        description="Current version number of the artifact. Increments each time a new version is published.",
82    )
class Artifact(pydantic.main.BaseModel):
13class Artifact(BaseModel):
14    """
15    A versioned artifact produced or managed by an agent, such as a generated file, report, or code output.
16    """
17
18    agent: str | None = Field(
19        default=None,
20        description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.",
21    )
22    content_type: str | None = Field(
23        default=None,
24        description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.',
25    )
26    created_at: datetime | None = Field(
27        default=None, description="When the artifact was first created (ISO 8601)."
28    )
29    current_version: str | None = Field(
30        default=None,
31        description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.",
32    )
33    description: str | None = Field(
34        default=None,
35        description="Optional longer description of the artifact's contents or purpose. `null` if not set.",
36    )
37    file: str | None = Field(
38        default=None,
39        description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.",
40    )
41    file_name: str | None = Field(
42        default=None,
43        description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.',
44    )
45    file_url: str | None = Field(
46        default=None,
47        description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.",
48    )
49    id: str = Field(..., description="Artifact ID (`art_...`).")
50    image_source: ImageSource | None = Field(
51        default=None,
52        description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.',
53    )
54    name: str | None = Field(
55        default=None,
56        description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.',
57    )
58    org: str | None = Field(
59        default=None, description="ID of the organization this artifact belongs to (`org_...`)."
60    )
61    sandbox: str | None = Field(
62        default=None,
63        description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.",
64    )
65    team: str | None = Field(
66        default=None,
67        description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.",
68    )
69    thread: str | None = Field(
70        default=None,
71        description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.",
72    )
73    updated_at: datetime | None = Field(
74        default=None, description="When the artifact record was last modified (ISO 8601)."
75    )
76    user: str | None = Field(
77        default=None,
78        description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.",
79    )
80    version: int | None = Field(
81        default=None,
82        description="Current version number of the artifact. Increments each time a new version is published.",
83    )

A versioned artifact produced or managed by an agent, such as a generated file, report, or code output.

agent: str | None = None

ID of the agent that produced this artifact (agt_...). null if not agent-produced.

content_type: str | None = None

MIME type of the current version's file, e.g. "text/csv" or "image/png". null if no file is attached.

created_at: datetime.datetime | None = None

When the artifact was first created (ISO 8601).

current_version: str | None = None

ID of the current (latest published) artifact version (artv_...). null if no version has been published.

description: str | None = None

Optional longer description of the artifact's contents or purpose. null if not set.

file: str | None = None

Storage file ID for the current version (fil_...). null if no file is attached.

file_name: str | None = None

Original filename of the current version's file, e.g. "output.csv". null if no file is attached.

file_url: str | None = None

Short-lived signed URL for downloading the current version's file. null if no file is attached.

id: str = PydanticUndefined

Artifact ID (art_...).

image_source: archastro.platform.types.image.ImageSource | None = None

Image source metadata for rendering the current version's file inline. Present only when content_type starts with "image/". null otherwise.

name: str | None = None

Human-readable name for the artifact, e.g. "Q2 Report". null if not set.

org: str | None = None

ID of the organization this artifact belongs to (org_...).

sandbox: str | None = None

Identifier of the sandbox environment associated with this artifact. null if not sandbox-scoped.

team: str | None = None

ID of the team that owns this artifact (tea_...). null if not team-scoped.

thread: str | None = None

ID of the thread in which this artifact was created (thr_...). null if not thread-scoped.

updated_at: datetime.datetime | None = None

When the artifact record was last modified (ISO 8601).

user: str | None = None

ID of the user who created this artifact (usr_...). null if not user-scoped.

version: int | None = None

Current version number of the artifact. Increments each time a new version is published.