mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
chore(automation): tighten run.py + envelope.py docstrings
Re-apply the trim style after the prior refactor commit re-introduced a multi-line docstring on AutomationRun. - AutomationRun: drop the four-line docstring explaining where per-step session ids live; move the note to a single-line inline comment right above ``step_results`` where it's actionable. - AutomationDefinition: drop the design-plan cross-reference; the module docstring already establishes what the file is. No behaviour change.
This commit is contained in:
parent
35117a952d
commit
a4fbfd8c0d
2 changed files with 4 additions and 7 deletions
|
|
@ -1,9 +1,4 @@
|
||||||
"""``automation_runs`` table — immutable per-fire execution record.
|
"""``automation_runs`` table — immutable per-fire execution record."""
|
||||||
|
|
||||||
Per-step metadata (incl. any LangGraph session id for an ``agent_task`` step)
|
|
||||||
lives inside ``step_results[i]``, since a single run may contain zero, one,
|
|
||||||
or N agent steps.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
@ -51,6 +46,8 @@ class AutomationRun(BaseModel, TimestampMixin):
|
||||||
|
|
||||||
trigger_payload = Column(JSONB, nullable=True)
|
trigger_payload = Column(JSONB, nullable=True)
|
||||||
resolved_inputs = Column(JSONB, nullable=False, server_default="{}")
|
resolved_inputs = Column(JSONB, nullable=False, server_default="{}")
|
||||||
|
# one entry per executed step; agent_task entries carry their own
|
||||||
|
# `agent_session_id` (LangGraph thread reference) inside this JSONB
|
||||||
step_results = Column(JSONB, nullable=False, server_default="[]")
|
step_results = Column(JSONB, nullable=False, server_default="[]")
|
||||||
output = Column(JSONB, nullable=True)
|
output = Column(JSONB, nullable=True)
|
||||||
artifacts = Column(JSONB, nullable=False, server_default="[]")
|
artifacts = Column(JSONB, nullable=False, server_default="[]")
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ from .trigger_spec import TriggerSpec
|
||||||
|
|
||||||
|
|
||||||
class AutomationDefinition(BaseModel):
|
class AutomationDefinition(BaseModel):
|
||||||
"""Top-level shape of an automation. See automation-design-plan.md §5."""
|
"""Top-level shape of an automation."""
|
||||||
|
|
||||||
model_config = ConfigDict(extra="forbid")
|
model_config = ConfigDict(extra="forbid")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue