archastro.platform.types.config
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: c40cfc6ce670 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 version_number: int = Field( 41 ..., 42 description="Monotonically increasing integer identifying this version within the config. Starts at 1.", 43 ) 44 45 46class Config(BaseModel): 47 """ 48 A versioned config file owned by a team or user, representing a typed artifact such as an agent definition or API tool specification. 49 """ 50 51 agent: str | None = Field( 52 default=None, 53 description="Agent ID (`agt_...`) associated with this config. `null` if not linked to an agent.", 54 ) 55 created_at: datetime | None = Field( 56 default=None, description="When this config was first created (ISO 8601)." 57 ) 58 current_version: ConfigVersion | None = Field( 59 default=None, 60 description="The most recently saved version of this config. `null` if the config has never been saved with content.", 61 ) 62 id: str = Field(..., description="Config ID (`cfg_...`).") 63 is_archived: bool | None = Field( 64 default=None, 65 description="Whether this config has been archived. Archived configs are hidden from default listings but remain accessible by ID.", 66 ) 67 kind: str = Field( 68 ..., 69 description='Type of config, e.g. `"Agent"` or `"APITool"`. Determines which fields and validation rules apply.', 70 ) 71 lookup_key: str | None = Field( 72 default=None, 73 description="Stable, user-defined key used to look up this config without knowing its ID. `null` if not set.", 74 ) 75 mime_type: str | None = Field( 76 default=None, 77 description='MIME type of the config\'s content, e.g. `"text/yaml"`. `null` if not determined.', 78 ) 79 org: str | None = Field( 80 default=None, 81 description="Organization ID (`org_...`) this config belongs to. `null` for configs not scoped to an org.", 82 ) 83 parent: str | None = Field( 84 default=None, 85 description="Parent bundle config ID (`cfg_...`). Present only for configs that are children of a bundle; `null` otherwise.", 86 ) 87 parent_solution: str | None = Field( 88 default=None, 89 description="ID (`cfg_...`) of the solution config this config was imported with. `null` if the config was not imported via a solution.", 90 ) 91 raw_content: str | None = Field( 92 default=None, 93 description="Raw file content as a string. Populated only for system configs; `null` for user-owned configs.", 94 ) 95 relative_path: str | None = Field( 96 default=None, 97 description="Path of this config relative to its parent bundle root. Present only for bundle children; `null` otherwise.", 98 ) 99 sandbox: str | None = Field( 100 default=None, 101 description="Sandbox identifier this config belongs to. `null` for production configs.", 102 ) 103 team: str | None = Field( 104 default=None, 105 description="Team ID (`tea_...`) that owns this config. `null` for personal (user-scoped) configs.", 106 ) 107 updated_at: datetime | None = Field( 108 default=None, description="When this config was last modified (ISO 8601)." 109 ) 110 user: str | None = Field( 111 default=None, 112 description="User ID (`usr_...`) who owns this config. `null` for team-scoped configs.", 113 ) 114 virtual_path: str | None = Field( 115 default=None, 116 description='Logical path uniquely identifying this config within its team, e.g. `"agents/my-agent.yaml"`. `null` for configs without an explicit path.', 117 ) 118 119 120class ConfigKindFacet(BaseModel): 121 """ 122 A facet entry grouping configs by kind, returning the kind name and the number of matching configs visible to the authenticated viewer. 123 """ 124 125 count: int = Field( 126 ..., 127 description="Number of configs of this kind that are visible to the authenticated viewer. Always `0` or greater.", 128 ) 129 kind: str = Field( 130 ..., 131 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 132 ) 133 134 135class ConfigPathPrefixFacet(BaseModel): 136 """ 137 A facet entry grouping configs by their leading path segment, returning the prefix and the number of matching configs visible to the authenticated viewer. 138 """ 139 140 count: int = Field( 141 ..., 142 description="Number of configs whose `virtual_path` begins with this prefix that are visible to the authenticated viewer. Always `0` or greater.", 143 ) 144 prefix: str = Field( 145 ..., 146 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.', 147 ) 148 149 150class ConfigFacets(BaseModel): 151 """ 152 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. 153 """ 154 155 kinds: list[ConfigKindFacet] = Field( 156 ..., 157 description="All distinct config kinds present in the viewer's dataset, each with its total count. Use these values to populate kind filter options.", 158 ) 159 path_prefixes: list[ConfigPathPrefixFacet] = Field( 160 ..., 161 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.", 162 ) 163 164 165class ConfigKindSchema(BaseModel): 166 """ 167 The JSON Schema definition and sample YAML for a specific config kind, used to validate and scaffold new configs of that kind. 168 """ 169 170 json_schema: dict[str, Any] | None = Field( 171 default=None, 172 description="JSON Schema object describing the valid structure of a config of this kind. `null` when no schema has been registered for this kind.", 173 ) 174 kind: str = Field( 175 ..., 176 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 177 ) 178 sample_yaml: str | None = Field( 179 default=None, 180 description="A sample YAML document illustrating a minimal valid config of this kind. `null` when no sample has been registered for this kind.", 181 )
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 version_number: int = Field( 42 ..., 43 description="Monotonically increasing integer identifying this version within the config. Starts at 1.", 44 )
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.
47class Config(BaseModel): 48 """ 49 A versioned config file owned by a team or user, representing a typed artifact such as an agent definition or API tool specification. 50 """ 51 52 agent: str | None = Field( 53 default=None, 54 description="Agent ID (`agt_...`) associated with this config. `null` if not linked to an agent.", 55 ) 56 created_at: datetime | None = Field( 57 default=None, description="When this config was first created (ISO 8601)." 58 ) 59 current_version: ConfigVersion | None = Field( 60 default=None, 61 description="The most recently saved version of this config. `null` if the config has never been saved with content.", 62 ) 63 id: str = Field(..., description="Config ID (`cfg_...`).") 64 is_archived: bool | None = Field( 65 default=None, 66 description="Whether this config has been archived. Archived configs are hidden from default listings but remain accessible by ID.", 67 ) 68 kind: str = Field( 69 ..., 70 description='Type of config, e.g. `"Agent"` or `"APITool"`. Determines which fields and validation rules apply.', 71 ) 72 lookup_key: str | None = Field( 73 default=None, 74 description="Stable, user-defined key used to look up this config without knowing its ID. `null` if not set.", 75 ) 76 mime_type: str | None = Field( 77 default=None, 78 description='MIME type of the config\'s content, e.g. `"text/yaml"`. `null` if not determined.', 79 ) 80 org: str | None = Field( 81 default=None, 82 description="Organization ID (`org_...`) this config belongs to. `null` for configs not scoped to an org.", 83 ) 84 parent: str | None = Field( 85 default=None, 86 description="Parent bundle config ID (`cfg_...`). Present only for configs that are children of a bundle; `null` otherwise.", 87 ) 88 parent_solution: str | None = Field( 89 default=None, 90 description="ID (`cfg_...`) of the solution config this config was imported with. `null` if the config was not imported via a solution.", 91 ) 92 raw_content: str | None = Field( 93 default=None, 94 description="Raw file content as a string. Populated only for system configs; `null` for user-owned configs.", 95 ) 96 relative_path: str | None = Field( 97 default=None, 98 description="Path of this config relative to its parent bundle root. Present only for bundle children; `null` otherwise.", 99 ) 100 sandbox: str | None = Field( 101 default=None, 102 description="Sandbox identifier this config belongs to. `null` for production configs.", 103 ) 104 team: str | None = Field( 105 default=None, 106 description="Team ID (`tea_...`) that owns this config. `null` for personal (user-scoped) configs.", 107 ) 108 updated_at: datetime | None = Field( 109 default=None, description="When this config was last modified (ISO 8601)." 110 ) 111 user: str | None = Field( 112 default=None, 113 description="User ID (`usr_...`) who owns this config. `null` for team-scoped configs.", 114 ) 115 virtual_path: str | None = Field( 116 default=None, 117 description='Logical path uniquely identifying this config within its team, e.g. `"agents/my-agent.yaml"`. `null` for configs without an explicit path.', 118 )
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.
121class ConfigKindFacet(BaseModel): 122 """ 123 A facet entry grouping configs by kind, returning the kind name and the number of matching configs visible to the authenticated viewer. 124 """ 125 126 count: int = Field( 127 ..., 128 description="Number of configs of this kind that are visible to the authenticated viewer. Always `0` or greater.", 129 ) 130 kind: str = Field( 131 ..., 132 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 133 )
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.
136class ConfigPathPrefixFacet(BaseModel): 137 """ 138 A facet entry grouping configs by their leading path segment, returning the prefix and the number of matching configs visible to the authenticated viewer. 139 """ 140 141 count: int = Field( 142 ..., 143 description="Number of configs whose `virtual_path` begins with this prefix that are visible to the authenticated viewer. Always `0` or greater.", 144 ) 145 prefix: str = Field( 146 ..., 147 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.', 148 )
A facet entry grouping configs by their leading path segment, returning the prefix and the number of matching configs visible to the authenticated viewer.
151class ConfigFacets(BaseModel): 152 """ 153 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. 154 """ 155 156 kinds: list[ConfigKindFacet] = Field( 157 ..., 158 description="All distinct config kinds present in the viewer's dataset, each with its total count. Use these values to populate kind filter options.", 159 ) 160 path_prefixes: list[ConfigPathPrefixFacet] = Field( 161 ..., 162 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.", 163 )
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.
166class ConfigKindSchema(BaseModel): 167 """ 168 The JSON Schema definition and sample YAML for a specific config kind, used to validate and scaffold new configs of that kind. 169 """ 170 171 json_schema: dict[str, Any] | None = Field( 172 default=None, 173 description="JSON Schema object describing the valid structure of a config of this kind. `null` when no schema has been registered for this kind.", 174 ) 175 kind: str = Field( 176 ..., 177 description='The config kind identifier (e.g., `"Agent"`, `"WorkflowGraph"`). Matches the `kind` field on config objects.', 178 ) 179 sample_yaml: str | None = Field( 180 default=None, 181 description="A sample YAML document illustrating a minimal valid config of this kind. `null` when no sample has been registered for this kind.", 182 )
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.