fix(scripts): provisioning instructions

This commit is contained in:
null 2026-05-22 01:55:35 -05:00
parent d7b3c08d06
commit d17aadec7d
2 changed files with 8 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class AgentBase(SQLModel):
heartbeat_config: dict[str, Any] | None = Field(
default=None,
description="Runtime heartbeat behavior overrides for this agent.",
examples=[{"interval_seconds": 30, "missing_tolerance": 120}],
examples=[{"every": "10m", "target": "last", "includeReasoning": False}],
)
identity_profile: dict[str, Any] | None = Field(
default=None,
@ -173,7 +173,7 @@ class AgentUpdate(SQLModel):
heartbeat_config: dict[str, Any] | None = Field(
default=None,
description="Optional heartbeat policy override.",
examples=[{"interval_seconds": 45}],
examples=[{"every": "15m", "target": "last", "includeReasoning": False}],
)
identity_profile: dict[str, Any] | None = Field(
default=None,

View File

@ -113,10 +113,15 @@ def _templates_root() -> Path:
return _repo_root() / "templates"
_VALID_HEARTBEAT_KEYS = frozenset(DEFAULT_HEARTBEAT_CONFIG.keys())
def _heartbeat_config(agent: Agent) -> dict[str, Any]:
merged = DEFAULT_HEARTBEAT_CONFIG.copy()
if isinstance(agent.heartbeat_config, dict):
merged.update(agent.heartbeat_config)
for key, value in agent.heartbeat_config.items():
if key in _VALID_HEARTBEAT_KEYS:
merged[key] = value
return merged