Scaffold¶
xcore_agent.scaffold — generates a starter install.yaml.
xcore_agent.scaffold
¶
Generates a starter install.yaml for a new project.
Hand-writing an install.yaml means re-deriving the same shape every time
(prepare -> one install_plugin per plugin -> optional write_env ->
start -> optional healthcheck) while also getting every step id,
depends_on edge, and the closed action enum right by hand. This module
builds that shape as a plain dict — the same shape a human would hand-write
— and validates it through InstallPlan.model_validate before it's ever
written to disk, so a scaffolded plan is guaranteed loadable by
validate/deploy/deploy-marketplace as-is.
PluginSpec
dataclass
¶
Source code in xcore_agent/scaffold.py
ExtensionSpec
dataclass
¶
ScaffoldOptions
dataclass
¶
Source code in xcore_agent/scaffold.py
project_id: str
instance-attribute
¶
plugins: list[PluginSpec] = field(default_factory=list)
class-attribute
instance-attribute
¶
extensions: list[ExtensionSpec] = field(default_factory=list)
class-attribute
instance-attribute
¶
version: str = '0.1.0'
class-attribute
instance-attribute
¶
with_healthcheck: bool = True
class-attribute
instance-attribute
¶
healthcheck_timeout: str = '30s'
class-attribute
instance-attribute
¶
healthcheck_retries: int = 3
class-attribute
instance-attribute
¶
__init__(project_id: str, plugins: list[PluginSpec] = list(), extensions: list[ExtensionSpec] = list(), version: str = '0.1.0', with_healthcheck: bool = True, healthcheck_timeout: str = '30s', healthcheck_retries: int = 3) -> None
¶
scaffold_install_plan(options: ScaffoldOptions) -> dict[str, Any]
¶
Build an install.yaml-shaped dict and validate it via InstallPlan
(raising on any inconsistency) before returning it. The returned dict —
not a round-tripped pydantic dump — is what gets rendered to YAML, so
the output matches what a human would hand-write.