mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
refactor(automation): rename schema config to params, drop dead fields
This commit is contained in:
parent
c8a89ccac8
commit
9fa35f21cf
11 changed files with 31 additions and 37 deletions
|
|
@ -16,9 +16,6 @@ class ExecutionBlock(BaseModel):
|
|||
max_retries: int = Field(default=2, ge=0, description="Per-step retry budget.")
|
||||
retry_backoff: Literal["exponential", "linear", "none"] = "exponential"
|
||||
concurrency: Literal["drop_if_running", "queue", "always"] = "drop_if_running"
|
||||
budget_cap_usd: float | None = Field(
|
||||
default=None, gt=0, description="Kill the run when accumulated cost exceeds this."
|
||||
)
|
||||
on_failure: list[PlanStep] = Field(
|
||||
default_factory=list,
|
||||
description="Steps run when the main plan fails after retries.",
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@ class InputsBlock(BaseModel):
|
|||
schema_: dict[str, Any] = Field(
|
||||
...,
|
||||
alias="schema",
|
||||
description="JSON Schema (draft-07) for accepted inputs.",
|
||||
description="JSON Schema (draft 2020-12) for accepted inputs.",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,3 @@ class MetadataBlock(BaseModel):
|
|||
model_config = ConfigDict(extra="allow")
|
||||
|
||||
tags: list[str] = Field(default_factory=list)
|
||||
created_from_nl: bool = Field(
|
||||
default=False, description="True when produced by the NL generator."
|
||||
)
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ class PlanStep(BaseModel):
|
|||
action: str = Field(..., min_length=1, description="Action type; resolved via registry.")
|
||||
when: str | None = Field(
|
||||
default=None,
|
||||
description="Optional Jinja expression; step is skipped when falsy.",
|
||||
description="Optional predicate; step is skipped when falsy.",
|
||||
)
|
||||
config: dict[str, Any] = Field(
|
||||
params: dict[str, Any] = Field(
|
||||
default_factory=dict,
|
||||
description="Action-type-specific config; Jinja-rendered at execute time.",
|
||||
description="Action-type-specific params; rendered at execute time.",
|
||||
)
|
||||
output_as: str | None = Field(
|
||||
default=None,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class TriggerSpec(BaseModel):
|
|||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
type: str = Field(..., min_length=1, description="Trigger type; resolved via registry.")
|
||||
config: dict[str, Any] = Field(
|
||||
params: dict[str, Any] = Field(
|
||||
default_factory=dict,
|
||||
description="Type-specific config; validated against the trigger's schema.",
|
||||
description="Type-specific params; validated against the trigger's schema.",
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue