fix: normalize unicode escape sequences and reformat multi-line expressions across codebase

This commit is contained in:
2026-06-09 16:48:08 +00:00
parent 66dfda88bc
commit c4f2937415
175 changed files with 12660 additions and 4175 deletions
+70 -14
View File
@@ -5,8 +5,16 @@ from __future__ import annotations
from ..actions.spec import Action, Param
def arg(name: str, description: str, required: bool = False, kind: str = "string") -> Param:
return Param(name=name, location="body", description=description, required=required, type=kind)
def arg(
name: str, description: str, required: bool = False, kind: str = "string"
) -> Param:
return Param(
name=name,
location="body",
description=description,
required=required,
type=kind,
)
AGENTIC_ACTIONS: tuple[Action, ...] = (
@@ -20,9 +28,22 @@ AGENTIC_ACTIONS: tuple[Action, ...] = (
requires_auth=False,
params=(
arg("goal", "One-line restatement of the user's goal.", required=True),
arg("steps", "Ordered list of step objects, each with id, action, depends_on.", required=True, kind="array"),
arg("success_criteria", "Concrete criteria for declaring the task complete.", required=True),
arg("confidence", "Self-estimate of plan correctness from 0.0 to 1.0.", kind="number"),
arg(
"steps",
"Ordered list of step objects, each with id, action, depends_on.",
required=True,
kind="array",
),
arg(
"success_criteria",
"Concrete criteria for declaring the task complete.",
required=True,
),
arg(
"confidence",
"Self-estimate of plan correctness from 0.0 to 1.0.",
kind="number",
),
),
),
Action(
@@ -34,9 +55,21 @@ AGENTIC_ACTIONS: tuple[Action, ...] = (
handler="agentic",
requires_auth=False,
params=(
arg("observation", "What was observed: the failure mode or notable outcome.", required=True),
arg("conclusion", "Diagnosis or interpretation of the observation.", required=True),
arg("next_action", "The chosen next step or the rule to apply in future.", required=True),
arg(
"observation",
"What was observed: the failure mode or notable outcome.",
required=True,
),
arg(
"conclusion",
"Diagnosis or interpretation of the observation.",
required=True,
),
arg(
"next_action",
"The chosen next step or the rule to apply in future.",
required=True,
),
arg("tags", "Optional comma-separated keywords to aid later recall."),
),
),
@@ -49,7 +82,11 @@ AGENTIC_ACTIONS: tuple[Action, ...] = (
handler="agentic",
requires_auth=False,
params=(
arg("query", "Natural-language or keyword query describing the current situation.", required=True),
arg(
"query",
"Natural-language or keyword query describing the current situation.",
required=True,
),
arg("k", "Number of lessons to return.", kind="integer"),
),
),
@@ -66,7 +103,10 @@ AGENTIC_ACTIONS: tuple[Action, ...] = (
handler="agentic",
requires_auth=False,
params=(
arg("query", "Optional topic/keywords; only matching lessons are forgotten. Omit to forget everything."),
arg(
"query",
"Optional topic/keywords; only matching lessons are forgotten. Omit to forget everything.",
),
),
),
Action(
@@ -82,7 +122,11 @@ AGENTIC_ACTIONS: tuple[Action, ...] = (
requires_auth=False,
params=(
arg("summary", "What was confirmed and how.", required=True),
arg("confirmed", "Whether the change was confirmed successful.", kind="boolean"),
arg(
"confirmed",
"Whether the change was confirmed successful.",
kind="boolean",
),
),
),
Action(
@@ -94,8 +138,16 @@ AGENTIC_ACTIONS: tuple[Action, ...] = (
handler="agentic",
requires_auth=False,
params=(
arg("task", "Clear, scoped task description for the sub-agent.", required=True),
arg("allowed_tools", "Optional list of tool names the sub-agent may use.", kind="array"),
arg(
"task",
"Clear, scoped task description for the sub-agent.",
required=True,
),
arg(
"allowed_tools",
"Optional list of tool names the sub-agent may use.",
kind="array",
),
),
),
Action(
@@ -111,7 +163,11 @@ AGENTIC_ACTIONS: tuple[Action, ...] = (
handler="agentic",
requires_auth=False,
params=(
arg("prompt", "The instruction to run as a fresh sub-agent request.", required=True),
arg(
"prompt",
"The instruction to run as a fresh sub-agent request.",
required=True,
),
),
),
)