Release v1.0.127: document executionProfile stream for HTML token streaming
All checks were successful
技能自动化发布 / release (push) Successful in 6s
All checks were successful
技能自动化发布 / release (push) Successful in 6s
This commit is contained in:
@@ -16,7 +16,7 @@ from util.constants import SKILL_SLUG
|
||||
_TEMPLATE_PLACEHOLDER_SLUG = "your-skill-slug"
|
||||
_ALLOWED_PLACEMENTS = frozenset({"toolbar", "row", "batch", "cron", "agent", "skill-detail"})
|
||||
_RESERVED_ACTION_FIELDS = frozenset({"concurrency", "locks"})
|
||||
_ALLOWED_EXECUTION_PROFILES = frozenset({"sync", "async"})
|
||||
_ALLOWED_EXECUTION_PROFILES = frozenset({"sync", "async", "stream"})
|
||||
_REQUIRED_MANIFEST_KEYS = frozenset({"schemaVersion", "skill", "actions"})
|
||||
_REQUIRED_ACTION_KEYS = frozenset(
|
||||
{"id", "label", "description", "placements", "entrypoint", "executionProfile"}
|
||||
@@ -232,7 +232,7 @@ class TestActionsManifest(unittest.TestCase):
|
||||
self.assertIn(
|
||||
profile,
|
||||
_ALLOWED_EXECUTION_PROFILES,
|
||||
msg=f"{action['id']} executionProfile must be sync|async, got {profile!r}",
|
||||
msg=f"{action['id']} executionProfile must be sync|async|stream, got {profile!r}",
|
||||
)
|
||||
|
||||
def test_schema_requires_execution_profile_and_defines_bind(self) -> None:
|
||||
@@ -240,7 +240,7 @@ class TestActionsManifest(unittest.TestCase):
|
||||
action_def = schema["$defs"]["action"]
|
||||
self.assertIn("executionProfile", action_def.get("required") or [])
|
||||
profile = action_def["properties"]["executionProfile"]
|
||||
self.assertEqual(set(profile.get("enum") or []), {"sync", "async"})
|
||||
self.assertEqual(set(profile.get("enum") or []), {"sync", "async", "stream"})
|
||||
self.assertIn("bind", schema["$defs"])
|
||||
self.assertIn("bind", action_def["properties"])
|
||||
bind_def = schema["$defs"]["bind"]
|
||||
@@ -424,14 +424,14 @@ class TestActionsManifest(unittest.TestCase):
|
||||
self.assertEqual(missing, [], msg="\n".join(missing))
|
||||
|
||||
def test_schema_allows_all_placement_execution_profile_combinations(self) -> None:
|
||||
"""POLICY-SKILL-ACTION-004:6 placements × 2 profiles 必须全部通过 Schema。"""
|
||||
"""POLICY-SKILL-ACTION-004:6 placements × 3 profiles 必须全部通过 Schema。"""
|
||||
try:
|
||||
import jsonschema
|
||||
except ImportError:
|
||||
self.fail("jsonschema is required to validate placement×executionProfile orthogonality")
|
||||
schema = _load_actions_schema()
|
||||
placements = ("toolbar", "row", "batch", "cron", "agent", "skill-detail")
|
||||
profiles = ("sync", "async")
|
||||
profiles = ("sync", "async", "stream")
|
||||
for placement in placements:
|
||||
for profile in profiles:
|
||||
action: dict = {
|
||||
|
||||
Reference in New Issue
Block a user