archastro.platform.types.config
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: ac241c103c04 4 5from datetime import datetime 6from typing import Any 7 8from pydantic import BaseModel, Field 9 10 11class ConfigVersion(BaseModel): 12 """ 13 A single immutable snapshot of a config's content, created each time the config is saved. 14 """ 15 16 change_description: str | None = Field( 17 default=None, 18 description="Human-readable summary of what changed in this version, as provided by the author. `null` if no description was supplied.", 19 ) 20 content_hash: str | None = Field( 21 default=None, 22 description="SHA-256 digest of the raw config content encoded as `sha256:<hex>`. Uses the same algorithm as the CLI `computeContentHash` helper. `null` for versions created before this field was introduced.", 23 ) 24 created_at: datetime | None = Field( 25 default=None, description="When this config version was created (ISO 8601)." 26 ) 27 data: dict[str, Any] | None = Field( 28 default=None, 29 description="Arbitrary structured metadata stored alongside this version. `null` when no extra data was provided.", 30 ) 31 id: str = Field(..., description="Config version ID (`cfv_...`).") 32 org: str | None = Field( 33 default=None, 34 description="Organization ID (`org_...`) that owns this config version. `null` for personal configs.", 35 ) 36 sandbox: str | None = Field( 37 default=None, 38 description="Sandbox ID (`sbx_...`) this version was saved under. `null` for production configs.", 39 ) 40 source_solution_config_version: str | None = Field( 41 default=None, 42 description="Config version ID (`cfv_...`) for the Solution version this config version was installed from. `null` for standalone configs and legacy rows.", 43 ) 44 version_number: int = Field( 45 ..., 46 description="Monotonically increasing integer identifying this version within the config. Starts at 1.", 47 ) 48 49 50class Config(BaseModel): 51 """ 52 A versioned config file owned by a team or user, representing a typed artifact such as an agent definition or API tool specification. 53 """ 54 55 agent: str | None = Field( 56 default=None, 57 description="Agent ID (`agt_...`) associated with this config. `null` if not linked to an agent.", 58 ) 59 created_at: datetime | None = Field( 60 default=None, description="When this config was first created (ISO 8601)." 61 ) 62 current_version: ConfigVersion | None = Field( 63 default=None, 64 description="The most recently saved version of this config. `null` if the config has never been saved with content.", 65 ) 66 id: str = Field(..., description="Config ID (`cfg_...`).") 67 is_archived: bool | None = Field( 68 default=None, 69 description="Whether this config has been archived. Archived configs are hidden from default listings but remain accessible by ID.", 70 ) 71 kind: str = Field( 72 ..., 73 description='Type of config, e.g. `"Agent"` or `"APITool"`. Determines which fields and validation rules apply.', 74 ) 75 lookup_key: str | None = Field( 76 default=None, 77 description="Stable, user-defined key used to look up this config without knowing its ID. `null` if not set.", 78 ) 79 mime_type: str | None = Field( 80 default=None, 81 description='MIME type of the config\'s content, e.g. `"text/yaml"`. `null` if not determined.', 82 ) 83 org: str | None = Field( 84 default=None, 85 description="Organization ID (`org_...`) this config belongs to. `null` for configs not scoped to an org.", 86 ) 87 parent: str | None = Field( 88 default=None, 89 description="Parent bundle config ID (`cfg_...`). Present only for configs that are children of a bundle; `null` otherwise.", 90 ) 91 parent_solution: str | None = Field( 92 default=None, 93 description="ID (`cfg_...`) of the solution config this config was imported with. `null` if the config was not imported via a solution.", 94 ) 95 raw_content: str | None = Field( 96 default=None, 97 description="Raw file content as a string. Populated only for system configs; `null` for user-owned configs.", 98 ) 99 relative_path: str | None = Field( 100 default=None, 101 description="Path of this config relative to its parent bundle root. Present only for bundle children; `null` otherwise.", 102 ) 103 sandbox: str | None = Field( 104 default=None, 105 description="Sandbox identifier this config belongs to. `null` for production configs.", 106 ) 107 team: str | None = Field( 108 default=None, 109 description="Team ID (`tea_...`) that owns this config. `null` for personal (user-scoped) configs.", 110 ) 111 updated_at: datetime | None = Field( 112 default=None, description="When this config was last modified (ISO 8601)." 113 ) 114 user: str | None = Field( 115 default=None, 116 description="User ID (`usr_...`) who owns this config. `null` for team-scoped configs.", 117 ) 118 virtual_path: str | None = Field( 119 default=None, 120 description='Logical path uniquely identifying this config within its team, e.g. `"agents/my-agent.yaml"`. `null` for configs without an explicit path.', 121 ) 122 123 124class ConfigKindFacet(BaseModel): 125 """ 126 A facet entry grouping configs by kind, returning the kind name and the number of matching configs visible to the authenticated viewer. 127 """ 128 129 count: int = Field( 130 ..., 131 description="Number of configs of this kind that are visible to the authenticated viewer. Always `0` or greater.", 132 ) 133 kind: str = Field( 134 ..., 135 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 136 ) 137 138 139class ConfigPathPrefixFacet(BaseModel): 140 """ 141 A facet entry grouping configs by their leading path segment, returning the prefix and the number of matching configs visible to the authenticated viewer. 142 """ 143 144 count: int = Field( 145 ..., 146 description="Number of configs whose `virtual_path` begins with this prefix that are visible to the authenticated viewer. Always `0` or greater.", 147 ) 148 prefix: str = Field( 149 ..., 150 description='The leading path segment of the config\'s `virtual_path`, always slash-terminated (e.g., `"agents/"`, `"__editor/"`). Pass this value as the `path_prefix` filter to narrow config listings.', 151 ) 152 153 154class ConfigFacets(BaseModel): 155 """ 156 Aggregated facet counts for the authenticated viewer's configs. Reports all distinct kinds and path prefixes across the full dataset, regardless of any active list filters. 157 """ 158 159 kinds: list[ConfigKindFacet] = Field( 160 ..., 161 description="All distinct config kinds present in the viewer's dataset, each with its total count. Use these values to populate kind filter options.", 162 ) 163 path_prefixes: list[ConfigPathPrefixFacet] = Field( 164 ..., 165 description="All distinct slash-terminated path prefixes present in the viewer's dataset, each with its total count. Use these values to populate path prefix filter options.", 166 ) 167 168 169class ConfigKindSchema(BaseModel): 170 """ 171 The JSON Schema definition and sample YAML for a specific config kind, used to validate and scaffold new configs of that kind. 172 """ 173 174 json_schema: dict[str, Any] | None = Field( 175 default=None, 176 description="JSON Schema object describing the valid structure of a config of this kind. `null` when no schema has been registered for this kind.", 177 ) 178 kind: str = Field( 179 ..., 180 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 181 ) 182 sample_yaml: str | None = Field( 183 default=None, 184 description="A sample YAML document illustrating a minimal valid config of this kind. `null` when no sample has been registered for this kind.", 185 )
12class ConfigVersion(BaseModel): 13 """ 14 A single immutable snapshot of a config's content, created each time the config is saved. 15 """ 16 17 change_description: str | None = Field( 18 default=None, 19 description="Human-readable summary of what changed in this version, as provided by the author. `null` if no description was supplied.", 20 ) 21 content_hash: str | None = Field( 22 default=None, 23 description="SHA-256 digest of the raw config content encoded as `sha256:<hex>`. Uses the same algorithm as the CLI `computeContentHash` helper. `null` for versions created before this field was introduced.", 24 ) 25 created_at: datetime | None = Field( 26 default=None, description="When this config version was created (ISO 8601)." 27 ) 28 data: dict[str, Any] | None = Field( 29 default=None, 30 description="Arbitrary structured metadata stored alongside this version. `null` when no extra data was provided.", 31 ) 32 id: str = Field(..., description="Config version ID (`cfv_...`).") 33 org: str | None = Field( 34 default=None, 35 description="Organization ID (`org_...`) that owns this config version. `null` for personal configs.", 36 ) 37 sandbox: str | None = Field( 38 default=None, 39 description="Sandbox ID (`sbx_...`) this version was saved under. `null` for production configs.", 40 ) 41 source_solution_config_version: str | None = Field( 42 default=None, 43 description="Config version ID (`cfv_...`) for the Solution version this config version was installed from. `null` for standalone configs and legacy rows.", 44 ) 45 version_number: int = Field( 46 ..., 47 description="Monotonically increasing integer identifying this version within the config. Starts at 1.", 48 )
A single immutable snapshot of a config's content, created each time the config is saved.
Human-readable summary of what changed in this version, as provided by the author. null if no description was supplied.
SHA-256 digest of the raw config content encoded as sha256:<hex>. Uses the same algorithm as the CLI computeContentHash helper. null for versions created before this field was introduced.
Arbitrary structured metadata stored alongside this version. null when no extra data was provided.
Organization ID (org_...) that owns this config version. null for personal configs.
Sandbox ID (sbx_...) this version was saved under. null for production configs.
51class Config(BaseModel): 52 """ 53 A versioned config file owned by a team or user, representing a typed artifact such as an agent definition or API tool specification. 54 """ 55 56 agent: str | None = Field( 57 default=None, 58 description="Agent ID (`agt_...`) associated with this config. `null` if not linked to an agent.", 59 ) 60 created_at: datetime | None = Field( 61 default=None, description="When this config was first created (ISO 8601)." 62 ) 63 current_version: ConfigVersion | None = Field( 64 default=None, 65 description="The most recently saved version of this config. `null` if the config has never been saved with content.", 66 ) 67 id: str = Field(..., description="Config ID (`cfg_...`).") 68 is_archived: bool | None = Field( 69 default=None, 70 description="Whether this config has been archived. Archived configs are hidden from default listings but remain accessible by ID.", 71 ) 72 kind: str = Field( 73 ..., 74 description='Type of config, e.g. `"Agent"` or `"APITool"`. Determines which fields and validation rules apply.', 75 ) 76 lookup_key: str | None = Field( 77 default=None, 78 description="Stable, user-defined key used to look up this config without knowing its ID. `null` if not set.", 79 ) 80 mime_type: str | None = Field( 81 default=None, 82 description='MIME type of the config\'s content, e.g. `"text/yaml"`. `null` if not determined.', 83 ) 84 org: str | None = Field( 85 default=None, 86 description="Organization ID (`org_...`) this config belongs to. `null` for configs not scoped to an org.", 87 ) 88 parent: str | None = Field( 89 default=None, 90 description="Parent bundle config ID (`cfg_...`). Present only for configs that are children of a bundle; `null` otherwise.", 91 ) 92 parent_solution: str | None = Field( 93 default=None, 94 description="ID (`cfg_...`) of the solution config this config was imported with. `null` if the config was not imported via a solution.", 95 ) 96 raw_content: str | None = Field( 97 default=None, 98 description="Raw file content as a string. Populated only for system configs; `null` for user-owned configs.", 99 ) 100 relative_path: str | None = Field( 101 default=None, 102 description="Path of this config relative to its parent bundle root. Present only for bundle children; `null` otherwise.", 103 ) 104 sandbox: str | None = Field( 105 default=None, 106 description="Sandbox identifier this config belongs to. `null` for production configs.", 107 ) 108 team: str | None = Field( 109 default=None, 110 description="Team ID (`tea_...`) that owns this config. `null` for personal (user-scoped) configs.", 111 ) 112 updated_at: datetime | None = Field( 113 default=None, description="When this config was last modified (ISO 8601)." 114 ) 115 user: str | None = Field( 116 default=None, 117 description="User ID (`usr_...`) who owns this config. `null` for team-scoped configs.", 118 ) 119 virtual_path: str | None = Field( 120 default=None, 121 description='Logical path uniquely identifying this config within its team, e.g. `"agents/my-agent.yaml"`. `null` for configs without an explicit path.', 122 )
A versioned config file owned by a team or user, representing a typed artifact such as an agent definition or API tool specification.
Agent ID (agt_...) associated with this config. null if not linked to an agent.
The most recently saved version of this config. null if the config has never been saved with content.
Whether this config has been archived. Archived configs are hidden from default listings but remain accessible by ID.
Type of config, e.g. "Agent" or "APITool". Determines which fields and validation rules apply.
Stable, user-defined key used to look up this config without knowing its ID. null if not set.
MIME type of the config's content, e.g. "text/yaml". null if not determined.
Organization ID (org_...) this config belongs to. null for configs not scoped to an org.
Parent bundle config ID (cfg_...). Present only for configs that are children of a bundle; null otherwise.
ID (cfg_...) of the solution config this config was imported with. null if the config was not imported via a solution.
Raw file content as a string. Populated only for system configs; null for user-owned configs.
Path of this config relative to its parent bundle root. Present only for bundle children; null otherwise.
125class ConfigKindFacet(BaseModel): 126 """ 127 A facet entry grouping configs by kind, returning the kind name and the number of matching configs visible to the authenticated viewer. 128 """ 129 130 count: int = Field( 131 ..., 132 description="Number of configs of this kind that are visible to the authenticated viewer. Always `0` or greater.", 133 ) 134 kind: str = Field( 135 ..., 136 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 137 )
A facet entry grouping configs by kind, returning the kind name and the number of matching configs visible to the authenticated viewer.
Number of configs of this kind that are visible to the authenticated viewer. Always 0 or greater.
The config kind identifier (e.g., "Agent", "WorkflowGraph"). Matches the kind field on config objects.
140class ConfigPathPrefixFacet(BaseModel): 141 """ 142 A facet entry grouping configs by their leading path segment, returning the prefix and the number of matching configs visible to the authenticated viewer. 143 """ 144 145 count: int = Field( 146 ..., 147 description="Number of configs whose `virtual_path` begins with this prefix that are visible to the authenticated viewer. Always `0` or greater.", 148 ) 149 prefix: str = Field( 150 ..., 151 description='The leading path segment of the config\'s `virtual_path`, always slash-terminated (e.g., `"agents/"`, `"__editor/"`). Pass this value as the `path_prefix` filter to narrow config listings.', 152 )
A facet entry grouping configs by their leading path segment, returning the prefix and the number of matching configs visible to the authenticated viewer.
155class ConfigFacets(BaseModel): 156 """ 157 Aggregated facet counts for the authenticated viewer's configs. Reports all distinct kinds and path prefixes across the full dataset, regardless of any active list filters. 158 """ 159 160 kinds: list[ConfigKindFacet] = Field( 161 ..., 162 description="All distinct config kinds present in the viewer's dataset, each with its total count. Use these values to populate kind filter options.", 163 ) 164 path_prefixes: list[ConfigPathPrefixFacet] = Field( 165 ..., 166 description="All distinct slash-terminated path prefixes present in the viewer's dataset, each with its total count. Use these values to populate path prefix filter options.", 167 )
Aggregated facet counts for the authenticated viewer's configs. Reports all distinct kinds and path prefixes across the full dataset, regardless of any active list filters.
All distinct config kinds present in the viewer's dataset, each with its total count. Use these values to populate kind filter options.
170class ConfigKindSchema(BaseModel): 171 """ 172 The JSON Schema definition and sample YAML for a specific config kind, used to validate and scaffold new configs of that kind. 173 """ 174 175 json_schema: dict[str, Any] | None = Field( 176 default=None, 177 description="JSON Schema object describing the valid structure of a config of this kind. `null` when no schema has been registered for this kind.", 178 ) 179 kind: str = Field( 180 ..., 181 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 182 ) 183 sample_yaml: str | None = Field( 184 default=None, 185 description="A sample YAML document illustrating a minimal valid config of this kind. `null` when no sample has been registered for this kind.", 186 )
The JSON Schema definition and sample YAML for a specific config kind, used to validate and scaffold new configs of that kind.
JSON Schema object describing the valid structure of a config of this kind. null when no schema has been registered for this kind.
The config kind identifier (e.g., "Agent", "WorkflowGraph"). Matches the kind field on config objects.